:root{--bg:#f4f7fb;--text:#17375e;--muted:#68758a;--line:#e3e8ef;--primary:#1f6feb;--shadow:0 10px 28px rgba(35,55,80,.08)}
*{box-sizing:border-box}html,body{margin:0;background:var(--bg);color:#1f2937;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei","PingFang SC",sans-serif}
button,input,select,textarea{font:inherit}button{cursor:pointer}.topbar{height:68px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 22px;position:sticky;top:0;z-index:40}
.brand{font-size:21px;font-weight:800;color:var(--text)}.brand span{font-size:13px;color:#65758b}.subline{font-size:12px;color:var(--muted);margin-top:3px}.top-actions{display:flex;align-items:center;gap:10px}.sync-dot{width:9px;height:9px;border-radius:50%;background:#2fb344;box-shadow:0 0 0 4px #e9f8ed}
.desktop-nav{height:48px;position:sticky;top:68px;z-index:35;background:#fff;border-bottom:1px solid var(--line);display:flex;justify-content:center;gap:4px;padding:6px 12px}.desktop-nav button{border:0;background:transparent;border-radius:9px;padding:7px 16px;color:#64748b}.desktop-nav button.active{background:#eaf2ff;color:#1767d2;font-weight:800}
main{max-width:1480px;margin:0 auto;padding:22px 18px 90px}.page{display:none}.page.active{display:block}.hero{display:flex;justify-content:space-between;align-items:end;gap:12px;margin-bottom:18px}.hero h1{margin:4px 0 0;font-size:29px;color:#12385f}.eyebrow{font-size:13px;color:#6d7f95}.hero-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.primary,.ghost,.small-btn{border:0;border-radius:10px;padding:10px 14px;font-weight:700}.primary{background:var(--primary);color:#fff}.ghost{background:#f3f6fa;color:#4c6076}.small-btn{padding:6px 9px;background:#f2f5f8;color:#456}.big{width:100%;padding:12px}
.summary-grid,.stats-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:16px}.summary-grid{grid-template-columns:repeat(3,1fr)}.summary-card,.stat-card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:15px 17px;box-shadow:var(--shadow)}.summary-card b,.stat-card b{display:block;font-size:26px;color:#12385f}.summary-card span,.stat-card span{font-size:12px;color:var(--muted)}
.panel{background:#fff;border:1px solid var(--line);border-radius:15px;padding:16px;margin-bottom:16px;box-shadow:var(--shadow)}.panel-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.panel h2{font-size:18px;margin:0;color:#1d3857}.panel-head span{font-size:12px;color:var(--muted)}
.task-row,.schedule-row{display:grid;grid-template-columns:80px 1fr auto auto auto;align-items:center;gap:10px;padding:11px 4px;border-top:1px solid #eef1f5}.task-row:first-child,.schedule-row:first-child{border-top:0}.task-time{color:#44556b;font-size:13px;font-variant-numeric:tabular-nums}.task-title{font-weight:700}.task-note{font-size:12px;color:var(--muted);margin-top:3px}.status-select{border:0;border-radius:999px;padding:5px 9px;font-weight:700}.edit-btn{border:0;background:#edf4ff;color:#175ca8;border-radius:8px;padding:6px 8px}.delete-btn{border:0;background:#fff0f0;color:#b42318;border-radius:8px;padding:6px 8px}.host-chip{display:inline-block;border-radius:999px;padding:5px 10px;font-size:12px;font-weight:800;color:#243b53;background:#d9ecff}.schedule-row{grid-template-columns:120px 1fr auto}.shift,.shift-early,.shift-late{border-radius:999px;padding:4px 9px;font-size:12px;font-weight:700}.shift-early{background:#d9ecff;color:#1f5f99}.shift-late{background:#ffe1d7;color:#a63b1f}
.empty{text-align:center;color:#98a3b2;padding:22px 8px}.bottom-nav{display:none}
.kanban{display:grid;grid-template-columns:repeat(6,minmax(210px,1fr));gap:12px;overflow-x:auto;padding-bottom:12px}.kanban-col{background:#eef3f8;border:1px solid #dfe6ee;border-radius:14px;min-height:520px;padding:10px}.kanban-head{display:flex;justify-content:space-between;align-items:center;font-weight:800;color:#28425f;padding:5px 4px 10px}.kanban-count{font-size:12px;background:#fff;border-radius:999px;padding:3px 8px;color:#69788c}.kanban-body{min-height:450px}.task-card{background:#fff;border:1px solid #e3e8ef;border-radius:11px;padding:11px;margin-bottom:8px;box-shadow:0 4px 12px rgba(30,50,70,.05)}.task-card[draggable=true]{cursor:grab}.task-card-title{font-weight:750;color:#233a53}.task-card-meta{display:flex;gap:6px;flex-wrap:wrap;margin-top:7px;font-size:11px;color:#738195}.task-card-actions{display:flex;justify-content:flex-end;gap:5px;margin-top:8px}.drop-active{outline:2px dashed #4b91f1;outline-offset:-4px}
.month-board{display:grid;grid-template-columns:repeat(4,minmax(260px,1fr));gap:14px}.day-card{background:#fff;border:1px solid #dfe6ee;border-radius:15px;overflow:hidden;min-height:180px;box-shadow:var(--shadow)}.day-card:nth-child(5n+1){background:#fff7d9}.day-card:nth-child(5n+2){background:#eaf4ff}.day-card:nth-child(5n+3){background:#e9f8df}.day-card:nth-child(5n+4){background:#ffe9e1}.day-card:nth-child(5n){background:#f0f2f6}.day-head{display:flex;align-items:center;justify-content:space-between;padding:12px 13px 9px;border-bottom:1px solid rgba(130,150,170,.18)}.day-title{font-size:18px;font-weight:800;color:#17375e}.day-add{width:30px;height:30px;border:1px solid #ccd7e4;border-radius:9px;background:rgba(255,255,255,.7);font-weight:800}.day-item{display:grid;grid-template-columns:85px 1fr auto;align-items:center;gap:7px;padding:8px 12px;border-top:1px solid rgba(130,150,170,.16);font-size:12px}.day-item:first-of-type{border-top:0}.day-main{font-weight:700;color:#29415b;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.day-actions{display:flex;gap:3px}.icon-btn{border:0;background:transparent;padding:3px;color:#61768d}
.stats-columns{display:grid;grid-template-columns:1fr 1fr;gap:14px}.stat-row{display:grid;grid-template-columns:1fr auto;gap:12px;padding:9px 3px;border-top:1px solid #eef1f5}.stat-row:first-child{border-top:0}.stat-value{font-weight:800;color:#17375e}.progress{height:7px;background:#eef2f6;border-radius:999px;overflow:hidden;margin-top:5px}.progress>span{display:block;height:100%;background:#72a8ee;border-radius:999px}
.search-box{display:flex;gap:8px;margin-bottom:14px}.search-box input{flex:1}.search-section-title{font-size:14px;font-weight:800;color:#40546a;margin:14px 0 4px}.search-item{padding:10px 4px;border-top:1px solid #eef1f5}.search-item b{color:#253d56}.search-item small{display:block;color:#7a8796;margin-top:3px}
.modal{display:none;position:fixed;inset:0;background:rgba(20,35,55,.4);z-index:60;align-items:center;justify-content:center;padding:18px}.modal.show{display:flex}.modal-card{width:min(540px,100%);max-height:90vh;overflow:auto;background:#fff;border-radius:16px;padding:18px;box-shadow:0 22px 60px rgba(0,0,0,.2)}.modal-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.modal-head h3{margin:0}.close{border:0;background:#f3f5f7;border-radius:9px;width:34px;height:34px;font-size:22px}
label{display:block;font-size:13px;color:#526275;margin-bottom:12px}input,select,textarea{width:100%;border:1px solid #dce3eb;border-radius:9px;padding:10px;background:#fff;color:#1f2937}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.toast{position:fixed;left:50%;bottom:28px;transform:translateX(-50%);background:#17375e;color:#fff;border-radius:999px;padding:9px 15px;font-size:13px;display:none;z-index:80}.toast.show{display:block}
.login-body{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:18px;background:linear-gradient(180deg,#eef5ff,#f7f9fc)}.login-card{width:min(390px,100%);background:#fff;border:1px solid var(--line);border-radius:20px;padding:28px;box-shadow:0 20px 55px rgba(30,55,90,.12)}.login-card h1{color:#17375e;margin:8px 0 3px}.login-card p{color:var(--muted);margin:0 0 22px}.error{color:#b42318;font-size:13px;margin-top:12px}
@media(max-width:900px){.month-board{grid-template-columns:repeat(2,minmax(240px,1fr))}.stats-summary{grid-template-columns:repeat(2,1fr)}}
@media(max-width:700px){
  .topbar{height:60px;padding:0 14px}.brand{font-size:18px}.desktop-nav{display:none}main{padding:16px 12px 82px}.hero{align-items:center;flex-wrap:wrap}.hero h1{font-size:25px}.hero-actions{width:100%}.hero-actions input,.hero-actions select{flex:1;min-width:120px}.summary-grid{gap:8px}.summary-card{padding:12px}.panel{padding:13px}.task-row{grid-template-columns:52px 1fr auto;gap:7px}.task-row .edit-btn,.task-row .delete-btn{grid-column:auto}.schedule-row{grid-template-columns:95px 1fr auto}.kanban{grid-template-columns:repeat(6,82vw);scroll-snap-type:x proximity}.kanban-col{scroll-snap-align:start}.month-board{grid-template-columns:1fr}.stats-columns{grid-template-columns:1fr}.stats-summary{grid-template-columns:repeat(2,1fr)}.form-grid{grid-template-columns:1fr}.bottom-nav{display:grid;position:fixed;left:0;right:0;bottom:0;z-index:45;grid-template-columns:repeat(6,1fr);background:#fff;border-top:1px solid var(--line);padding-bottom:env(safe-area-inset-bottom)}.bottom-nav button{border:0;background:#fff;padding:12px 1px;font-size:11px;color:#7b8796}.bottom-nav button.active{color:var(--primary);font-weight:800}
}

.small-modal{width:min(440px,100%)}.export-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}.export-note{margin-top:12px;line-height:1.6}@media(max-width:700px){.export-actions{grid-template-columns:1fr}}


[hidden]{display:none!important}
.login-secondary{margin-top:9px}
.register-tip{font-size:12px;line-height:1.6;color:#718096;margin-top:12px}
.success-msg{color:#18794e;font-size:13px;margin-top:12px}
.access-legend{display:flex;gap:18px;flex-wrap:wrap;background:#f6f8fb;border-radius:10px;padding:11px 13px;margin-bottom:10px;font-size:12px;color:#5f6f82}
.users-list{display:flex;flex-direction:column}
.user-row{display:grid;grid-template-columns:minmax(190px,1fr) auto minmax(150px,205px) minmax(240px,auto);align-items:center;gap:12px;padding:16px 4px;border-top:1px solid #eef1f5}
.user-row:first-child{border-top:0}
.user-main b{display:block;color:#243b53}.user-main small{display:block;color:#8591a1;margin-top:3px}
.access-badge{display:inline-block;border-radius:999px;padding:5px 10px;font-size:12px;font-weight:800;white-space:nowrap}
.admin-badge{background:#e8efff;color:#2d58a0}.pending-badge{background:#fff4cf;color:#8a6510}.active-badge{background:#e6f7ea;color:#23723a}.disabled-badge{background:#f0f1f3;color:#6f7782}
.user-actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}.user-note{font-size:12px;color:#7c8998}
.user-modal-account{padding:10px 12px;margin-bottom:14px;background:#f4f7fb;border-radius:10px;color:#445971;font-size:13px;overflow-wrap:anywhere}
.user-modal-note{color:#697a90;font-size:12px;line-height:1.65;margin:10px 0 15px}
.user-main small{line-height:1.6;overflow-wrap:anywhere}
@media(max-width:1100px){.user-row{grid-template-columns:minmax(180px,1fr) auto minmax(130px,190px)}.user-actions{grid-column:1/-1;justify-content:flex-start}}
.schedule-only .desktop-nav{justify-content:center}
.schedule-only .bottom-nav{grid-template-columns:1fr}
.schedule-only .bottom-nav button[data-page="schedule"]{font-size:13px}
@media(max-width:700px){
  .user-row{grid-template-columns:1fr auto;gap:9px}
  .user-access-select{grid-column:1/3}
  .user-actions{grid-column:1/3}
}

/* V6.4 copy + batch tools */
.day-head-actions{display:flex;align-items:center;gap:6px}.day-copy{border:1px solid #ccd7e4;border-radius:8px;background:rgba(255,255,255,.72);padding:5px 9px;font-size:12px;font-weight:700;color:#4b6077}.danger-ghost{color:#b42318;background:#fff1f0}.batch-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;background:#fff;border:1px solid #f1c7c4;border-radius:12px;padding:10px 12px;margin:-6px 0 14px;box-shadow:var(--shadow);font-size:13px}.batch-actions{display:flex;gap:7px;flex-wrap:wrap}.batch-delete-confirm{font-weight:800;padding:9px 12px}.batch-delete-confirm:disabled{opacity:.45;cursor:not-allowed}.batch-check{margin:0;display:flex;align-items:center}.batch-check input{width:18px;height:18px;margin:0}.day-item:has(.batch-check){grid-template-columns:auto 85px 1fr auto}.selected-row{outline:2px solid rgba(31,111,235,.22);outline-offset:-2px;background:rgba(255,255,255,.35)}.copy-source{background:#f5f8fc;border:1px solid #e1e7ef;border-radius:10px;padding:10px 12px;margin-bottom:12px;font-weight:700;color:#29415b}.copy-note{line-height:1.6;margin:2px 0 12px}
@media(max-width:700px){.batch-bar{align-items:flex-start;flex-direction:column}.batch-actions{width:100%}.batch-actions button{flex:1}.day-item:has(.batch-check){grid-template-columns:auto 72px 1fr auto}.day-copy{padding:5px 8px}.day-head-actions{gap:4px}}

/* V6.5 multi-host schedules + marquee selection */
.host-multi{display:flex;flex-wrap:wrap;gap:8px;padding:10px;border:1px solid #d8e0e8;border-radius:10px;background:#fafbfd;min-height:44px}
.host-choice{display:inline-flex;align-items:center;gap:6px;margin:0;padding:6px 9px;border-radius:999px;background:var(--host-color,#d9ecff);font-size:12px;font-weight:800;color:#243b53;cursor:pointer}
.host-choice input{width:16px;height:16px;margin:0;accent-color:#1f6feb}
.host-chip-group{display:inline-flex;flex-wrap:wrap;gap:4px;vertical-align:middle}
.schedule-main{display:flex;align-items:center;gap:5px;flex-wrap:wrap;white-space:normal}
.batch-hint{display:block;margin-top:3px;color:var(--muted);font-weight:400}
.batch-selectable{cursor:crosshair;user-select:none}
.batch-selectable:hover{outline:2px solid rgba(31,111,235,.14);outline-offset:-2px}
.selection-box{position:fixed;z-index:9999;border:1.5px solid #1f6feb;background:rgba(31,111,235,.12);pointer-events:none;border-radius:5px}
.marquee-active,.marquee-active *{user-select:none!important}
@media(max-width:700px){.host-multi{gap:6px}.host-choice{padding:6px 8px}.batch-hint{font-size:11px}}

/* V6.6 personal schedule */
.today-stack{display:flex;flex-direction:column;gap:16px}.today-panel{margin-bottom:0}.today-list{display:flex;flex-direction:column;gap:10px}.today-item-card{border:1px solid #e6ebf1;border-radius:13px;padding:13px 14px;background:#fbfcfe}.today-item-top{display:flex;align-items:center;justify-content:space-between;gap:10px}.today-time{font-size:14px;font-weight:800;color:#36506c;font-variant-numeric:tabular-nums}.today-badges{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.today-item-title{font-size:16px;font-weight:800;color:#213b58;margin-top:8px}.today-item-actions{display:flex;justify-content:flex-end;gap:6px;margin-top:10px}.today-hosts{margin-top:9px}.today-schedule-card{background:#fffdf9}
.task-title-line,.day-title-line,.search-title-line,.stat-label-line{display:flex;align-items:center;gap:7px;min-width:0}.day-title-line>span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.type-chip{display:inline-flex;align-items:center;justify-content:center;border-radius:999px;padding:3px 8px;font-size:11px;font-weight:800;white-space:nowrap;line-height:1.35}.type-work{background:#e8f1ff;color:#235f9f}.type-personal{background:#f2eaff;color:#6a49a5}.type-fitness{background:#e6f7ed;color:#26734c}.type-study{background:#fff2cf;color:#8a6410}.type-travel{background:#e7f7f7;color:#286b70}.type-other{background:#eef1f5;color:#5d6978}
.task-date-drop{transition:outline-color .12s ease,transform .12s ease}.task-date-drop.date-drop-active{outline:2px dashed #1f6feb;outline-offset:2px;transform:translateY(-1px)}.day-item[draggable=true]{cursor:grab}.day-item.dragging-task{opacity:.45}.day-main{min-width:0}
.stats-grid-v66{display:grid;grid-template-columns:1fr 1fr;gap:14px}.stats-grid-v66>.panel:last-child{grid-column:1/-1}.stat-label-line>span:last-child{font-size:12px;color:var(--muted)}
@media(max-width:700px){.today-item-top{align-items:flex-start}.today-badges{justify-content:flex-end}.stats-grid-v66{grid-template-columns:1fr}.stats-grid-v66>.panel:last-child{grid-column:auto}.type-chip{font-size:10px;padding:3px 7px}}

/* V6.6.1 weekly calendar layout */
.today-stack{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;align-items:start}
.today-panel{min-width:0}

/* Both monthly schedule boards are true Mon-Sun weekly calendars. */
.month-board{grid-template-columns:repeat(7,minmax(150px,1fr));gap:10px;overflow-x:auto;align-items:stretch;padding-bottom:8px}
.calendar-week-head{position:sticky;top:116px;z-index:2;text-align:center;font-size:13px;font-weight:800;color:#40546a;padding:8px 4px;border-radius:10px;border:1px solid rgba(120,140,165,.14)}
.calendar-empty{min-height:168px;visibility:hidden}
.day-card{min-height:168px;border-radius:13px;box-shadow:0 5px 16px rgba(35,55,80,.055)}
.day-card:nth-child(n){background:#fff}
.day-title{font-size:16px}
.day-head{padding:10px 10px 8px}
.day-item{grid-template-columns:auto minmax(0,1fr) auto;gap:6px;padding:7px 9px;background:rgba(255,255,255,.42)}
.calendar-time{font-size:11px;white-space:nowrap;border-radius:999px;background:rgba(255,255,255,.78);padding:3px 6px;color:#40546a}
.calendar-empty-text{font-size:11px;padding:16px 4px}
.task-bubble{display:inline-block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-radius:999px;padding:4px 9px;background:rgba(255,255,255,.9);border:1px solid rgba(125,145,168,.18);box-shadow:0 2px 7px rgba(30,50,70,.05);font-weight:800;color:#29415b}
.day-title-line{flex-wrap:wrap;gap:5px}
.day-actions{white-space:nowrap}
.day-copy{padding:4px 6px;font-size:10px}.day-add{width:27px;height:27px}.day-head-actions{gap:3px}

/* Exactly seven weekday colors, reused every week on both boards. */
.weekday-1{background:#fff7d9!important}
.weekday-2{background:#eaf4ff!important}
.weekday-3{background:#e9f8df!important}
.weekday-4{background:#ffe9e1!important}
.weekday-5{background:#f2ecff!important}
.weekday-6{background:#e7f7f7!important}
.weekday-7{background:#f0f2f6!important}

@media(max-width:900px){
  .month-board{grid-template-columns:repeat(7,minmax(145px,1fr))}
  .calendar-week-head{top:108px}
}
@media(max-width:700px){
  .today-stack{grid-template-columns:1fr}
  .month-board{grid-template-columns:repeat(7,minmax(138px,1fr));gap:8px}
  .calendar-week-head{position:static;font-size:11px;padding:6px 3px}
  .day-card{min-height:150px}
  .calendar-empty{min-height:150px}
  .day-title{font-size:14px}
  .day-item{grid-template-columns:1fr auto;align-items:start}
  .calendar-time{grid-column:1/2;width:max-content}
  .day-main{grid-column:1/2}
  .day-actions{grid-column:2/3;grid-row:1/3}
}

/* V6.6.3 corrected weekly header + readable calendar cards */
/* The board itself is one scroll container. Header and dates share the exact same 7-column geometry. */
.month-board{
  display:block;
  width:100%;
  overflow-x:auto;
  padding-bottom:8px;
}
.calendar-week-row,
.calendar-days-grid{
  display:grid;
  grid-template-columns:repeat(7,minmax(145px,1fr));
  gap:10px;
  min-width:1085px;
}
.calendar-week-row{
  margin:0 0 8px 0;
}
.calendar-week-head{
  position:static;
  text-align:center;
  padding:9px 4px;
  font-size:13px;
  font-weight:800;
  color:#40546a;
  border-radius:10px;
  border:1px solid rgba(120,140,165,.14);
}
.calendar-days-grid{
  align-items:stretch;
}
.calendar-days-grid .calendar-empty{
  min-height:168px;
  visibility:hidden;
}
.calendar-days-grid .day-card{
  min-width:0;
  min-height:168px;
}
/* Event row: time uses only what it needs; content takes the rest; actions float on hover. */
.calendar-days-grid .day-item{
  position:relative;
  display:grid;
  grid-template-columns:max-content minmax(0,1fr);
  align-items:start;
  gap:7px;
  padding:8px 9px;
}
.calendar-days-grid .calendar-time{
  width:max-content;
  padding:3px 6px;
  font-size:11px;
  white-space:nowrap;
}
.calendar-days-grid .day-main{
  min-width:0;
  overflow:visible;
  text-overflow:clip;
  white-space:normal;
}
/* Type chip and title stay together visually; the title wraps inside ONE bubble. */
.calendar-days-grid .day-title-line{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:5px;
  width:100%;
  min-width:0;
}
.calendar-days-grid .day-title-line>span:last-child{
  overflow:visible;
  text-overflow:clip;
  white-space:normal;
}
.calendar-days-grid .task-bubble{
  display:block;
  box-sizing:border-box;
  width:100%;
  max-width:100%;
  white-space:normal;
  overflow:visible;
  text-overflow:clip;
  overflow-wrap:anywhere;
  word-break:break-word;
  line-height:1.35;
  border-radius:14px;
  padding:5px 9px;
  background:rgba(255,255,255,.92);
  border:1px solid rgba(125,145,168,.18);
  box-shadow:0 2px 7px rgba(30,50,70,.05);
  font-weight:800;
  color:#29415b;
}
/* Schedule host chips already use bubbles; make them wrap cleanly in narrow weekday cards. */
.calendar-days-grid .schedule-main{
  min-width:0;
  display:flex;
  align-items:flex-start;
  gap:5px;
  flex-wrap:wrap;
  white-space:normal;
}
.calendar-days-grid .host-chip-group{
  min-width:0;
  display:flex;
  flex-wrap:wrap;
  gap:4px;
}
/* Desktop: action icons no longer steal text width. */
@media (hover:hover) and (pointer:fine){
  .calendar-days-grid .day-item .day-actions{
    display:none;
    position:absolute;
    right:5px;
    top:5px;
    z-index:4;
    padding:2px;
    border-radius:8px;
    background:rgba(255,255,255,.97);
    box-shadow:0 3px 10px rgba(30,50,70,.10);
  }
  .calendar-days-grid .day-item:hover .day-actions,
  .calendar-days-grid .day-item:focus-within .day-actions{
    display:flex;
  }
}
@media(max-width:900px){
  .calendar-week-row,
  .calendar-days-grid{
    grid-template-columns:repeat(7,minmax(140px,1fr));
    min-width:1040px;
    gap:8px;
  }
}
@media(max-width:700px){
  .calendar-week-row,
  .calendar-days-grid{
    grid-template-columns:repeat(7,minmax(138px,1fr));
    min-width:1010px;
    gap:8px;
  }
  /* Touch screens keep buttons visible. */
  .calendar-days-grid .day-item{
    grid-template-columns:max-content minmax(0,1fr) auto;
  }
  .calendar-days-grid .day-actions{
    grid-column:3;
    grid-row:1;
  }
}


/* V6.7 all-day anchor rest */
.rest-chip{display:inline-flex;align-items:center;border-radius:999px;padding:5px 10px;font-size:12px;font-weight:850;color:#5b4d78;background:#ebe6f5;border:1px solid #d8cfee;white-space:normal;line-height:1.3}
.rest-badge{display:inline-flex;border-radius:999px;padding:4px 9px;font-size:12px;font-weight:800;color:#66557f;background:#eee8f7}
.rest-today-card{background:#fbf9ff;border-color:#e4dcf1}
.calendar-days-grid .rest-schedule-item{grid-template-columns:minmax(0,1fr);background:rgba(248,245,253,.78)}
.calendar-days-grid .rest-schedule-main{min-width:0;display:flex;align-items:flex-start}
.calendar-days-grid .rest-schedule-main .rest-chip{max-width:100%;overflow-wrap:anywhere}
.host-stat-row{display:grid;grid-template-columns:minmax(110px,1.2fr) repeat(4,minmax(90px,1fr));align-items:center;gap:10px;padding:11px 3px;border-top:1px solid #eef1f5}
.host-stat-row:first-child{border-top:0}.host-stat-metric{display:flex;flex-direction:column;gap:2px}.host-stat-metric b{font-size:15px;color:#17375e}.host-stat-metric span{font-size:11px;color:var(--muted)}
@media(max-width:700px){.host-stat-row{grid-template-columns:1fr 1fr;gap:9px}.host-stat-row>.host-chip{grid-column:1/-1;width:max-content}.calendar-days-grid .rest-schedule-item{grid-template-columns:1fr auto}}

.schedule-date-drop{transition:outline-color .12s ease,transform .12s ease}.schedule-date-drop.schedule-drop-active{outline:2px dashed #7253b6;outline-offset:2px;transform:translateY(-1px)}.day-item[draggable=true]{cursor:grab}.day-item.dragging-schedule{opacity:.45}

/* --------------------------------------------------------------------------
 * V6.9 · 视觉升级 / 独立覆盖层
 * 作用域明确：不改变 /api 路由、数据模型、事件选择器及批量操作逻辑。
 * 主调 #6264A7；分区层次背景；七列日历 + 自动换行。
 * -------------------------------------------------------------------------- */
:root{
  --bg:#eef1f7;
  --text:#202e4c;
  --muted:#7a849b;
  --line:#e4e8f1;
  --primary:#6264a7;
  --primary-deep:#515397;
  --primary-soft:#ececfa;
  --shadow:0 9px 30px rgba(55,66,110,.085),0 2px 7px rgba(55,66,110,.035);
  --sidebar-size:238px;
  --card-radius:12px;
}
body{
  color:var(--text);
  background:linear-gradient(135deg,#f1f3f8 0%,#ebeff8 50%,#f3f5f9 100%);
  min-height:100vh;
}
body.sidebar-collapsed{--sidebar-size:76px}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,
[tabindex]:focus-visible{outline:2px solid var(--primary);outline-offset:2px}
button{transition:background-color .16s ease,box-shadow .16s ease,transform .16s ease,color .16s ease}
button:disabled{cursor:not-allowed;opacity:.52}
.topbar{
  height:70px;position:sticky;top:0;z-index:50;
  padding:0 28px 0 0;
  background:rgba(255,255,255,.95);
  border-bottom:1px solid #e9edf3;
  box-shadow:0 1px 8px rgba(38,50,83,.025);
}
.topbar>div:first-child{
  width:var(--sidebar-size);min-width:var(--sidebar-size);height:70px;
  display:flex;flex-direction:column;justify-content:center;
  border-right:1px solid #edf0f6;padding:0 20px;
  transition:width .2s ease,min-width .2s ease,padding .2s ease;
}
.brand{position:relative;color:#202c4b;font-size:20px;font-weight:850;white-space:nowrap;letter-spacing:-.6px}
.brand span{font-size:11px;font-weight:700;letter-spacing:0;color:#616e8e}
.subline{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sidebar-collapsed .topbar>div:first-child{padding:0 8px;align-items:center}
.sidebar-collapsed .brand{font-size:0;letter-spacing:0}
.sidebar-collapsed .brand:before{content:'▦';font-size:25px;line-height:38px;color:#fff;display:inline-block;width:38px;height:38px;text-align:center;background:#6264a7;border-radius:10px;box-shadow:0 4px 12px rgba(98,100,167,.22)}
.sidebar-collapsed .brand span,.sidebar-collapsed .subline{display:none}
.top-actions{gap:12px}.top-actions .ghost{font-size:13px}.sync-dot{background:#2ead70;box-shadow:0 0 0 4px #e6f5ec}
.desktop-nav{
  display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;
  position:fixed;z-index:39;left:0;top:70px;bottom:0;width:var(--sidebar-size);height:auto;
  padding:18px 13px 84px;gap:8px;overflow-x:hidden;overflow-y:auto;
  background:rgba(255,255,255,.93);border:0;border-right:1px solid #e5e9f3;
  transition:width .2s ease,padding .2s ease;
}
.desktop-nav .nav-entry{
  display:flex;align-items:center;justify-content:flex-start;gap:12px;
  min-height:48px;flex:0 0 auto;width:100%;padding:10px 13px;
  border:1px solid #eef1f8;border-radius:12px;
  background:linear-gradient(135deg,#f8f9fc,#f3f5fa);
  box-shadow:0 2px 6px rgba(48,56,90,.025);
  color:#596680;font-weight:680;text-align:left;font-size:14px;white-space:nowrap;
}
.desktop-nav .nav-entry:hover{border-color:#d8d9ef;background:#f0f0fb;transform:translateX(1px)}
.desktop-nav .nav-entry.active{
  color:var(--primary-deep);background:linear-gradient(100deg,#e9eafa,#f4f3ff);
  border-color:#dddef7;font-weight:800;box-shadow:inset 3px 0 0 #6264a7,0 5px 12px rgba(98,100,167,.08)
}
.nav-icon{display:block;width:19px;height:19px;min-width:19px;color:#697595}
.nav-entry.active .nav-icon{color:#5b5dc0}
.desktop-nav .nav-label{white-space:nowrap}
.sidebar-toggle{
  position:fixed;left:14px;bottom:18px;width:calc(var(--sidebar-size) - 28px);
  border:1px solid #e9ecf5;border-radius:11px;background:#f1f3fa;color:#5a6689;
  display:flex;gap:11px;align-items:center;justify-content:center;height:42px;
  font-size:12px;font-weight:700;transition:width .2s ease;
}
.sidebar-toggle:hover{background:#e7e9f7}
.sidebar-chevron{font-size:22px;line-height:1}
.sidebar-collapsed .desktop-nav{padding-left:10px;padding-right:10px}
.sidebar-collapsed .desktop-nav .nav-entry{justify-content:center;padding:10px 0}
.sidebar-collapsed .desktop-nav .nav-label{display:none}
.sidebar-collapsed .sidebar-toggle{left:10px;width:56px}
main{
  margin:0 0 0 var(--sidebar-size);padding:24px clamp(18px,2.3vw,34px) 90px;
  max-width:none;min-width:0;width:auto;transition:margin-left .2s ease;
}
.page{min-width:0}
.hero{
  position:relative;isolation:isolate;overflow:hidden;
  align-items:center;gap:18px;min-height:132px;padding:23px 26px;margin-bottom:18px;
  background:linear-gradient(112deg,rgba(231,235,249,.96),rgba(244,246,251,.86) 68%,rgba(236,237,251,.92));
  border:1px solid #e6eafa;border-radius:16px;
}
.hero:after{
  content:'';pointer-events:none;position:absolute;z-index:-1;right:-10%;top:-110%;width:52%;height:270%;
  transform:rotate(-24deg);border-radius:50%;background:radial-gradient(ellipse at center,rgba(183,186,226,.22),transparent 67%);
}
.hero h1{font-size:30px;letter-spacing:-.5px;color:#253151;margin:7px 0 0}
.eyebrow{color:#697793;font-size:12px;line-height:1.5}
.hero-actions{justify-content:flex-end;max-width:75%;gap:8px}
.hero input,.hero select{width:auto;min-width:135px}
.primary,.ghost,.small-btn,.edit-btn,.delete-btn,.day-copy,.day-add{
  border-radius:10px;font-weight:700;min-height:34px;
}
.primary{background:#6264a7;color:#fff;box-shadow:0 6px 14px rgba(98,100,167,.18)}
.primary:hover{background:#53559c;box-shadow:0 8px 18px rgba(98,100,167,.23)}
.ghost{background:#f8f9fc;border:1px solid #e4e8f2;color:#505d7a}
.ghost:hover,.small-btn:hover{background:#ededf8;border-color:#d5d8ec}
.danger-ghost,.delete-btn{background:#fff2f1;color:#b65156;border-color:#f7dedf}
.edit-btn{background:#f0f0fa;color:#565998}
.small-btn{color:#515c7c}
input,select,textarea{border-color:#dce2ee;border-radius:10px;color:#34415e;background:#fff}
input:focus,select:focus,textarea:focus{border-color:#a8a9cf;outline:2px solid rgba(98,100,167,.13)}
.summary-grid,.stats-summary{gap:16px;margin-bottom:18px}
.summary-card,.stat-card{
  position:relative;min-width:0;min-height:112px;overflow:hidden;
  padding:21px 24px;background:#fff;border:1px solid #e7ebf2;border-radius:13px;
  box-shadow:var(--shadow);
}
.summary-card{padding-left:83px}
.summary-card:before,.stat-card:before{
  position:absolute;top:25px;left:22px;width:44px;height:44px;display:grid;place-items:center;
  border-radius:13px;background:#eeeeFA;color:#6264a7;font-size:22px;font-weight:700;
}
.summary-tasks:before{content:'▦'}
.summary-done:before{content:'✓';background:#e7f5ed;color:#269669}
.summary-live:before{content:'▶';background:#f4ecf7;color:#9b6d9c;font-size:19px}
.summary-card b,.stat-card b{color:#253252;font-size:30px;line-height:1.12}
.summary-card span,.stat-card span{display:block;color:#77829a;margin-top:8px;font-size:12px}
.mini-bars{display:flex;align-items:flex-end;gap:4px;position:absolute;right:23px;bottom:25px;height:34px;opacity:.72}
.mini-bars i{display:block;width:5px;border-radius:4px;background:#a0a2d8;height:35%}
.mini-bars i:nth-child(2){height:48%}.mini-bars i:nth-child(3){height:68%}
.mini-bars i:nth-child(4){height:53%}.mini-bars i:nth-child(5){height:86%}.mini-bars i:nth-child(6){height:100%}
.summary-done .mini-bars i{background:#7acaad}.summary-live .mini-bars i{background:#b8a1c6}
.panel{background:rgba(255,255,255,.98);border:1px solid #e4e9f3;border-radius:14px;box-shadow:var(--shadow);padding:19px 20px;margin-bottom:17px;min-width:0}
.panel h2{color:#283552;font-size:17px}.panel-head{gap:10px;margin-bottom:15px;min-height:28px}
.panel-head h2:before{content:'';display:inline-block;width:8px;height:18px;border-radius:5px;background:#8687c2;margin-right:10px;vertical-align:-3px}
.today-stack{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px;align-items:start}
.today-list{gap:10px}.today-item-card{
  background:#fbfcff;border:1px solid #e4eaf3;border-left:3px solid #a0a2cf;
  box-shadow:0 3px 12px rgba(48,56,86,.04);border-radius:12px;padding:15px;
}
.today-item-card:nth-child(2n){border-left-color:#9db4d8}
.today-item-title{font-size:15px;line-height:1.5;color:#2b3956;overflow-wrap:anywhere}
.today-schedule-card{background:#fff;border-left-color:#d8ddec!important}
.today-schedule-card .shift-early,.today-schedule-card .shift-late{display:none}
@media (hover:hover) and (pointer:fine){.today-schedule-card:hover .shift-early,.today-schedule-card:hover .shift-late{display:inline-flex}}
.today-schedule-card:focus-within .shift-early,.today-schedule-card:focus-within .shift-late{display:inline-flex}
.host-chip{background:color-mix(in srgb,var(--host-color,#d9ecff) 65%,#fff);color:#3b4760;border:1px solid rgba(125,130,160,.12);font-weight:750}
.rest-chip,.rest-badge{background:#efedf6;color:#626183;border-color:#e1dff0}
.type-work{background:#e9effa;color:#436a9c}.type-personal{background:#f0ebf8;color:#745b9c}
.type-fitness{background:#e8f3ed;color:#437a64}.type-study{background:#f6f0e4;color:#957844}
.type-travel{background:#e9f3f2;color:#477d81}.type-other{background:#edf0f5;color:#66728b}
.status-select{color:#34415d;background:#f0f2f8;border:1px solid #e3e8f1;max-width:100%}
.kanban{gap:12px;grid-template-columns:repeat(6,minmax(196px,1fr));padding:2px 3px 17px;overflow-x:auto}
.kanban-col{min-width:0;padding:12px;min-height:540px;border:1px solid #e2e6f1;border-radius:13px;background:#f1f3f9;box-shadow:0 5px 17px rgba(55,68,105,.045)}
.kanban-col:nth-child(6n+1){background:#f0effa}.kanban-col:nth-child(6n+2){background:#eef3f9}.kanban-col:nth-child(6n+3){background:#f7f1f4}
.kanban-col:nth-child(6n+4){background:#eef5f3}.kanban-col:nth-child(6n+5){background:#f7f3ed}.kanban-col:nth-child(6n+6){background:#edf5f2}
.kanban-head{border-radius:9px;color:#34415e;font-size:13px;padding:8px 5px 13px}
.kanban-count{box-shadow:0 2px 8px rgba(45,58,93,.035);padding:4px 9px}
.task-card{min-width:0;border-radius:12px;border-color:#e6eaf1;padding:12px;box-shadow:0 5px 13px rgba(39,53,90,.06)}
.task-card-title{overflow-wrap:anywhere;color:#283652;line-height:1.55}
.task-card-actions{align-items:center}
.task-card-actions select{min-width:0}
/* Monthly boards: same column geometry for weekday header and dates. */
.month-board{
  display:block;min-width:0;width:100%;padding:13px 13px 17px;overflow-x:auto;
  background:rgba(255,255,255,.96);border:1px solid #e4e8f3;
  border-radius:15px;box-shadow:var(--shadow);scrollbar-color:#ccd1e6 transparent;
}
.calendar-week-row,.calendar-days-grid{
  display:grid;width:100%;min-width:1036px;
  grid-template-columns:repeat(7,minmax(0,1fr));gap:9px;
}
.calendar-week-row{margin-bottom:9px}
.calendar-week-head{
  position:static;min-width:0;background:#f3f4f9!important;
  font-size:12px;color:#4b5877;padding:10px 3px;border:0;border-radius:9px;
}
.calendar-week-head.weekday-1{background:#f6f2e9!important}
.calendar-week-head.weekday-2{background:#edf3f9!important}
.calendar-week-head.weekday-3{background:#edf5ef!important}
.calendar-week-head.weekday-4{background:#f7eeed!important}
.calendar-week-head.weekday-5{background:#f0edf9!important}
.calendar-week-head.weekday-6{background:#ebf4f4!important}
.calendar-week-head.weekday-7{background:#eff1f6!important}
.calendar-days-grid{align-items:stretch;grid-auto-flow:row}
.calendar-days-grid .day-card{
  min-width:0;width:100%;overflow:hidden;min-height:165px;
  border-radius:12px;background:#fff!important;
  border:1px solid #e2e8f3;box-shadow:0 3px 13px rgba(48,60,100,.085);
}
.calendar-days-grid .day-card:hover{border-color:#c9c9e5;box-shadow:0 7px 22px rgba(48,60,100,.12)}
.calendar-days-grid .day-head{background:#f5f6fb;padding:10px;border-bottom:1px solid #e9edf5;gap:6px;min-height:48px}
.calendar-days-grid .day-title{font-size:15px;color:#25324c}
.calendar-days-grid .day-card.weekday-1 .day-head{background:#f8f5ef}
.calendar-days-grid .day-card.weekday-2 .day-head{background:#f1f5fa}
.calendar-days-grid .day-card.weekday-3 .day-head{background:#f1f7f2}
.calendar-days-grid .day-card.weekday-4 .day-head{background:#fbf3f2}
.calendar-days-grid .day-card.weekday-5 .day-head{background:#f6f3fb}
.calendar-days-grid .day-card.weekday-6 .day-head{background:#f0f7f7}
.calendar-days-grid .day-card.weekday-7 .day-head{background:#f4f5f8}
.day-add,.day-copy{background:#fff;border:1px solid #dce2ee;color:#626c8f;box-shadow:0 2px 7px rgba(40,55,90,.05)}
.day-add:hover,.day-copy:hover{background:#f0f0fa;border-color:#c9cbeb;color:#515397}
.calendar-days-grid .calendar-empty{visibility:hidden;min-height:165px}
.calendar-empty-text{padding:25px 7px;color:#a5afbf;font-size:11px}
.calendar-days-grid .day-item{
  min-width:0;width:100%;position:relative;display:block;
  padding:5px 6px;border-top:0;background:transparent;
}
.calendar-days-grid .day-item:first-of-type{padding-top:9px}
/* Critical: task titles wrap INSIDE day cells, never increase their columns' width. */
#monthlyBoard .day-event-content{
  display:grid;grid-template-columns:7px minmax(0,1fr);gap:6px;
  align-items:start;min-width:0;max-width:100%;width:100%;
  padding:7px 7px;background:#f8f9fd;border:1px solid #e9ecf5;border-radius:10px;
}
#monthlyBoard .event-dot{display:block;width:7px;height:7px;background:#8285b8;border-radius:50%;margin-top:9px}
#monthlyBoard .event-dot.type-work{background:#6e96bf}
#monthlyBoard .event-dot.type-personal{background:#9d80b3}
#monthlyBoard .event-dot.type-fitness{background:#79a494}
#monthlyBoard .event-dot.type-study{background:#b7a06c}
#monthlyBoard .event-dot.type-travel{background:#78a5a5}
#monthlyBoard .day-event-info{display:flex;flex-direction:column;gap:4px;min-width:0;width:100%}
#monthlyBoard .day-event-top{display:flex;align-items:center;gap:4px;flex-wrap:wrap;min-width:0;width:100%}
#monthlyBoard .day-event-top .type-chip{font-size:10px;padding:2px 6px;flex-shrink:0}
#monthlyBoard .event-time{font-size:10px;color:#919ab0;white-space:nowrap}
#monthlyBoard .event-title{
  display:block;min-width:0;max-width:100%;width:100%;
  color:#344260;font-size:11px;font-weight:730;line-height:1.5;
  white-space:normal;overflow-wrap:anywhere;word-break:break-word;hyphens:auto;
}
/* Hover action bar, does not consume event text width. */
#monthlyBoard .day-item .day-actions{position:absolute;right:6px;top:5px;z-index:4;background:#fff;border:1px solid #e1e5ef;border-radius:9px;box-shadow:0 3px 11px rgba(30,41,73,.08)}
@media (hover:hover) and (pointer:fine){
  #monthlyBoard .day-item .day-actions{display:none}
  #monthlyBoard .day-item:hover .day-actions,
  #monthlyBoard .day-item:focus-within .day-actions{display:flex}
}
/* Schedule: 1 muted badge color per host, no visible day-wide multi-color blocks. */
#scheduleBoard .day-card{background:#fff!important;box-shadow:0 6px 17px rgba(44,56,96,.12),0 1px 3px rgba(44,56,96,.04);border-color:#dce2ed}
#scheduleBoard .day-item{min-height:38px;border-top:0;padding:5px 6px;background:transparent}
#scheduleBoard .day-item:not(.rest-schedule-item) .calendar-time{
  display:inline-block;min-width:0;max-width:100%;white-space:nowrap;
  background:#f0f3f9;color:#586781;font-size:10px;padding:4px 5px;
}
#scheduleBoard .day-item:not(.rest-schedule-item){
  display:grid;grid-template-columns:minmax(0,1fr);gap:4px;
}
#scheduleBoard .schedule-main{min-width:0;width:100%;display:flex;align-items:center;flex-wrap:wrap;gap:4px}
#scheduleBoard .host-chip-group{min-width:0;max-width:100%;display:flex;flex-wrap:wrap;gap:4px}
#scheduleBoard .host-chip{font-size:11px;padding:3px 8px;max-width:100%;overflow-wrap:anywhere}
#scheduleBoard .day-item:not(.rest-schedule-item):before{
  content:'';position:absolute;left:3px;top:8px;bottom:5px;width:2px;border-radius:4px;background:#d9dced;
}
#scheduleBoard .day-item:not(.rest-schedule-item) .schedule-shift-tooltip{
  position:absolute;right:6px;top:3px;z-index:5;
  opacity:0;visibility:hidden;transform:translateY(-3px);pointer-events:none;
  padding:3px 8px;color:#555f86!important;background:#edeef8!important;
  border:1px solid #dfe2f3;box-shadow:0 4px 12px rgba(54,57,92,.15);
  transition:opacity .14s ease,transform .14s ease,visibility .14s;
}
#scheduleBoard .day-item:not(.rest-schedule-item):hover .schedule-shift-tooltip,
#scheduleBoard .day-item:not(.rest-schedule-item):focus .schedule-shift-tooltip,
#scheduleBoard .day-item:not(.rest-schedule-item):focus-within .schedule-shift-tooltip{
  opacity:1;visibility:visible;transform:translateY(0)
}
#scheduleBoard .rest-schedule-item{display:block;background:#f4f2f8;border-radius:9px;margin:4px 6px;width:calc(100% - 12px)}
#scheduleBoard .rest-chip{font-size:10px;padding:5px 7px;white-space:normal}
#scheduleBoard .day-item .day-actions{position:absolute;right:4px;top:4px;z-index:6;background:#fff;border-radius:8px;box-shadow:0 3px 10px rgba(40,55,90,.08)}
@media (hover:hover) and (pointer:fine){
  #scheduleBoard .day-item .day-actions{display:none}
  #scheduleBoard .day-item:hover .day-actions,
  #scheduleBoard .day-item:focus-within .day-actions{display:flex}
}
/* Day cell can be selected/dragged without mixing layout with the batch checkmark. */
.month-board .day-item.selected-row{background:rgba(98,100,167,.10);outline-color:rgba(98,100,167,.5)}
.month-board .day-item:focus-visible{outline:2px solid #6264a7;outline-offset:-1px}
.batch-bar{border-color:#ded9eb;box-shadow:var(--shadow)}
/* Stats: visually separate the two primary analytics cards. */
.stats-summary .stat-card{padding:21px 19px 19px 76px;min-height:110px}
.stats-summary .stat-card:nth-child(1):before{content:'▦'}
.stats-summary .stat-card:nth-child(2):before{content:'✓';background:#e7f5ed;color:#259b72}
.stats-summary .stat-card:nth-child(3):before{content:'▶';background:#f4ecf7;color:#a47ba8;font-size:17px}
.stats-summary .stat-card:nth-child(4):before{content:'◷';background:#edf0fa;color:#697db8}
.stats-summary .stat-card:after{content:'';position:absolute;right:20px;bottom:25px;width:48px;height:28px;background:linear-gradient(90deg,transparent 12%,#b5b7db 12% 20%,transparent 20% 31%,#c7c9e5 31% 40%,transparent 40% 51%,#9d9fcd 51% 60%,transparent 60% 71%,#c3c5df 71% 80%,transparent 80%);opacity:.7}
.stats-grid-v66{gap:18px;grid-template-columns:repeat(2,minmax(0,1fr))}
.stats-grid-v66>.panel{padding:20px;min-width:0;box-shadow:0 10px 30px rgba(57,65,112,.10),0 2px 5px rgba(47,55,91,.035)}
.stats-type-panel{background:linear-gradient(150deg,#f5f4fc 0%,#fff 35%)!important;border-color:#dddff1}
.stats-status-panel{background:linear-gradient(150deg,#f1f4fc 0%,#fff 35%)!important;border-color:#dce5f1}
.stats-type-panel .panel-head h2:before{background:#8985bd}
.stats-status-panel .panel-head h2:before{background:#7f9cc1}
.stats-grid-v66 .panel-head{background:rgba(255,255,255,.78);padding:10px 12px;border:1px solid #edf0f8;border-radius:11px;margin-bottom:14px}
.stats-grid-v66 .stat-row{padding:14px 5px;border-top-color:#e9edf4}
.stat-row .progress{height:9px;background:#edf0f6;margin-top:11px}
.stat-row .progress>span{background:#8286ba}
.stats-status-panel .progress>span{background:#819ec6}
#hostStats .host-stat-row{gap:12px;padding:14px 5px}
.search-box{display:flex;align-items:center;padding:15px;gap:12px;background:#fff;border:1px solid #e4e8f3;border-radius:14px;box-shadow:var(--shadow);margin-bottom:17px}
.search-box input{min-width:0;flex:1;border-color:#e2e7f1;padding:13px 15px}
.search-results{min-height:260px}.search-results>.empty{padding:85px 12px 100px;background:linear-gradient(180deg,#fff,#fafbff);border-radius:10px;color:#8c96ad}
.search-item{padding:14px 8px}.search-item:hover{background:#f8f9fc}
.access-legend,.copy-source,.host-multi{background:#f5f6fb}
.modal-card{border:1px solid #e5e8f1;box-shadow:0 24px 70px rgba(30,40,70,.22);border-radius:16px}
.toast{background:#373b66}
.login-body{background:linear-gradient(130deg,#e9eaf5,#f2f5f9 58%,#e7eaf5)}
.login-card{border-radius:16px;box-shadow:0 22px 62px rgba(49,56,98,.13)}
.login-card h1{color:#283456}
@media(max-width:1250px){
  .hero{align-items:flex-start;flex-wrap:wrap}
  .hero-actions{max-width:100%;justify-content:flex-start}
  .stats-summary .stat-card:after{display:none}
}
@media(max-width:900px){
  :root{--sidebar-size:76px}
  .desktop-nav{padding-left:10px;padding-right:10px}
  .desktop-nav .nav-entry{justify-content:center;padding:10px 0}
  .desktop-nav .nav-entry .nav-label,.sidebar-toggle .nav-label{display:none}
  .sidebar-toggle{left:10px;width:56px}
  .topbar>div:first-child{padding:0 8px;align-items:center}
  .brand{font-size:0}.brand:before{content:'▦';display:inline-block;background:#6264a7;color:#fff;font-size:25px;width:38px;height:38px;line-height:38px;border-radius:10px;text-align:center}
  .brand span,.subline{display:none}
  main{padding:20px 14px 80px}
  .summary-card{padding:18px}.summary-card:before{display:none}
  .mini-bars{right:12px}
  .stats-grid-v66{grid-template-columns:1fr}
  .stats-grid-v66>.panel:last-child{grid-column:auto}
}
@media(max-width:700px){
  :root{--sidebar-size:0px}
  .topbar{height:60px;padding:0 13px}
  .topbar>div:first-child{height:60px;width:auto;min-width:0;border-right:0;padding:0;align-items:flex-start}
  .brand{font-size:17px}.brand:before{display:none}.brand span{display:inline;font-size:10px}
  .subline{display:block;max-width:150px;font-size:10px}
  .top-actions{gap:6px}.top-actions .ghost{padding:7px 8px;font-size:11px}
  .desktop-nav{display:none}
  main{margin-left:0;padding:13px 12px 95px}
  .hero{padding:17px;min-height:110px;gap:13px;margin-bottom:13px}
  .hero h1{font-size:25px}
  .hero-actions{width:100%;max-width:100%;gap:7px}
  .hero-actions input,.hero-actions select{flex:1;min-width:114px}
  .hero-actions button{flex:0 1 auto;font-size:12px;padding:8px 10px}
  .summary-grid{gap:8px}
  .summary-card{padding:13px;min-height:92px}
  .summary-card b{font-size:24px}
  .summary-card span{font-size:11px}
  .mini-bars{display:none}
  .today-stack{grid-template-columns:1fr}
  .stats-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
  .stats-summary .stat-card{padding:16px;min-height:91px}
  .stats-summary .stat-card:before{display:none}
  .bottom-nav{display:grid;position:fixed;left:0;right:0;bottom:0;background:#fff;z-index:52;box-shadow:0 -5px 18px rgba(43,55,90,.07);border-top:1px solid #e5e8f1;grid-template-columns:repeat(6,1fr);padding-bottom:env(safe-area-inset-bottom)}
  .bottom-nav button{background:#fff;color:#65718d;font-size:11px;border:0;padding:13px 0}
  .bottom-nav button.active{color:#5d5faf;background:#f2f1fc;font-weight:800}
  .search-box{padding:10px}.search-box input{padding:10px}
  .calendar-week-row,.calendar-days-grid{min-width:1036px;grid-template-columns:repeat(7,minmax(0,1fr));gap:9px}
  /* On touch devices the shift is revealed by focusing (tapping) the row. */
  #scheduleBoard .day-item:focus .schedule-shift-tooltip{opacity:1;visibility:visible}
}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;transition:none!important}}

/* V6.9 final refinement: compact shift rows and readable real-world titles. */
#monthlyBoard .event-title{font-size:12px;line-height:1.45}
#scheduleBoard .day-item:not(.rest-schedule-item){
  grid-template-columns:minmax(0,80px) minmax(0,1fr);
  align-items:center;gap:4px;
  min-height:35px;
}
#scheduleBoard .day-item:not(.rest-schedule-item) .calendar-time{font-size:10px;padding:5px 3px;letter-spacing:-.2px}
#scheduleBoard .day-item:not(.rest-schedule-item) .schedule-main{align-self:center}
#scheduleBoard .day-item:not(.rest-schedule-item) .host-chip{font-size:10px;padding:4px 6px}
/* Muted placeholders for dates outside the selected month: no blank white voids. */
.calendar-days-grid .calendar-empty{
  visibility:visible;min-height:165px;
  background:linear-gradient(145deg,#f5f6fa,#eff1f7);
  border:1px dashed #e3e6f0;border-radius:12px;opacity:.76;
}
/* ---------------------------------------------------------------------------
 * V6.9.1 TEST ONLY — lake blue × mint / medium decoration.
 * Keep the existing structural layout and all interaction bindings intact.
 * --------------------------------------------------------------------------- */
:root{
  --bg:#eff6f7;
  --text:#203d52;
  --muted:#6c8796;
  --line:#dcebf0;
  --primary:#237f9b;
  --primary-deep:#176f8b;
  --primary-soft:#dff1f5;
  --mint:#41af94;
  --mint-soft:#e3f6ee;
  --shadow:0 11px 27px rgba(34,108,121,.085),0 2px 6px rgba(34,108,121,.035);
}
html,body{background:#eff7f8;color:#203d52}
body{background:linear-gradient(135deg,#edf5f7 0%,#f1f8f8 53%,#e9f6f3 100%)}
.topbar{border-bottom-color:#dcebef;background:rgba(255,255,255,.96)}
.brand{color:#1d435b}
.brand span,.subline{color:#6a8394}
.sidebar-collapsed .brand:before,.brand:before{background:#237f9b}
.desktop-nav{background:linear-gradient(180deg,rgba(248,253,252,.98),rgba(237,249,248,.97));border-right:1px solid #d8e9eb}
.desktop-nav .nav-entry{
  border:1px solid #d8e9ec;background:linear-gradient(115deg,rgba(255,255,255,.99),rgba(243,250,250,.93));
  color:#4b6f81;box-shadow:0 3px 9px rgba(35,110,125,.055);
}
.desktop-nav .nav-entry:hover{background:#e8f6f5;border-color:#b4e5e2;color:#176d84}
.desktop-nav .nav-entry.active{
  color:#0d728b;background:linear-gradient(110deg,#d7eef5,#e0f7ef);
  border-color:#a9dade;box-shadow:inset 4px 0 0 #1490a6,0 6px 15px rgba(35,127,155,.12)
}
.nav-icon{color:#5d8a98}.nav-entry.active .nav-icon{color:#147f9a}
.sidebar-toggle{background:#e7f3f4;border-color:#d1e9eb;color:#3d798b}
.sidebar-toggle:hover{background:#d5eff0}
.top-actions .ghost{background:#f4fafb;color:#456f83;border-color:#d8e7ed}
.top-actions .ghost:hover{background:#e6f2f6}
.sync-dot{background:#24ac80!important;box-shadow:0 0 0 4px #e5f7ed}
.hero{
  min-height:142px;background:linear-gradient(111deg,#d9f2f8 0%,#ecfafa 42%,#d6f4ed 76%,#e2f4f8 100%);
  border:1px solid #cfe8ed;border-radius:17px;box-shadow:0 9px 21px rgba(37,126,147,.07)
}
.hero:after{right:-8%;top:-155%;height:345%;width:64%;background:radial-gradient(ellipse at center,rgba(65,175,148,.22),transparent 65%)}
.hero h1{color:#19415a}.eyebrow{color:#668b9e}
.primary{background:linear-gradient(110deg,#2186a2,#2095a8);color:#fff;box-shadow:0 5px 15px rgba(35,127,155,.20)}
.primary:hover{background:#147b95;box-shadow:0 7px 18px rgba(35,127,155,.23)}
.ghost,.small-btn{background:#fff;border-color:#dceaf0;color:#4e7586}
.ghost:hover,.small-btn:hover{background:#edf9f8;border-color:#bee4e2}
.edit-btn{background:#e3f4f7;color:#177d94}
.danger-ghost,.delete-btn{background:#fff4f3;border-color:#f5dbdb;color:#b85458}
input,select,textarea{border-color:#d5e6ed;color:#314c60}
input:focus,select:focus,textarea:focus{border-color:#64b6c4;outline:2px solid rgba(45,153,168,.13)}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,[tabindex]:focus-visible{outline-color:#168ca1}
.summary-card,.stat-card{border:1px solid #dbecef;background:linear-gradient(140deg,#fff,#fbfefd);box-shadow:var(--shadow)}
.summary-card:nth-child(1){border-top:3px solid #4aafd0}
.summary-card:nth-child(2){border-top:3px solid #50bd9f}
.summary-card:nth-child(3){border-top:3px solid #9d99cf}
.summary-card:before,.stat-card:before{background:#e6f5fb;color:#2585a8}
.summary-done:before,.stats-summary .stat-card:nth-child(2):before{background:#e2f6ed;color:#2c9c7a}
.summary-live:before,.stats-summary .stat-card:nth-child(3):before{background:#efedfa;color:#7472b1}
.summary-card b,.stat-card b{color:#174a60}
.summary-card span,.stat-card span{color:#7590a0}
.mini-bars i{background:#85c4d5}.summary-done .mini-bars i{background:#78ceb3}
.panel{background:#fff;border-color:#daebef;box-shadow:var(--shadow)}
.panel h2{color:#234a60}.panel-head h2:before{background:linear-gradient(#24a9ad,#50c7aa)}
.today-item-card{background:linear-gradient(120deg,#fff,#fafdfe);border-color:#e0edf0;border-left-color:#72c8c7!important}
.today-item-card:nth-child(2n){border-left-color:#a9b7d8!important}
.today-item-title,.task-card-title{color:#244e63}
.today-time{color:#297e98}
.today-schedule-card .shift-early,.today-schedule-card .shift-late{display:none!important}
.host-chip,.host-choice{
  background:var(--host-badge-bg,#e0f4f2)!important;
  color:var(--host-badge-ink,#147d75)!important;
  border:1px solid var(--host-badge-border,#c3e8e3)!important;
  border-radius:9px;font-weight:790;
}
.host-choice input{accent-color:#198ca2}
.rest-chip{display:inline-flex;align-items:center;flex-wrap:wrap;gap:5px;padding:3px 5px;background:#f2f6f9;color:#587485;border-color:#e1eaf0;border-radius:9px}
.rest-chip-label{padding-right:4px;font-weight:690;font-size:11px}
.rest-badge{background:#f1f4f8;color:#647b8e;border-color:#dfe9ee}
.kanban-col{background:linear-gradient(180deg,#e6f4f9,#f2fafb);border-color:#d2e9f0;box-shadow:0 4px 12px rgba(35,99,120,.045)}
.kanban-col:nth-child(6n+1){background:linear-gradient(#e3f3f9,#eff9fa)}
.kanban-col:nth-child(6n+2){background:linear-gradient(#e6eefb,#f4f8fd)}
.kanban-col:nth-child(6n+3){background:linear-gradient(#f0eafa,#f9f7fd)}
.kanban-col:nth-child(6n+4){background:linear-gradient(#e5f6ee,#f3fcf7)}
.kanban-col:nth-child(6n+5){background:linear-gradient(#e9f6f4,#f6fcfa)}
.kanban-col:nth-child(6n+6){background:linear-gradient(#e9f0f3,#f6fafb)}
.kanban-head{color:#2d6374}
.task-card{border-color:#e0edf1;box-shadow:0 5px 14px rgba(31,96,118,.07)}
.task-card:hover{border-color:#a9d7df;box-shadow:0 7px 18px rgba(31,96,118,.11)}
.type-work{background:#e3f1fb;color:#3176a3}
.type-personal{background:#efe9fa;color:#7959a6}
.type-fitness{background:#e0f5ed;color:#2f9171}
.type-study{background:#fff2da;color:#997342}
.type-travel{background:#def5f3;color:#347f82}
.status-select{background:#edf8f8;color:#336c7e;border-color:#d5eaec}
.month-board{border-color:#d7e9ed;background:rgba(255,255,255,.95);box-shadow:var(--shadow)}
.calendar-week-head{background:#e9f5f7!important;color:#326c80;border:1px solid #d8ebef}
.calendar-week-head.weekday-1{background:#e9f5f9!important}
.calendar-week-head.weekday-2{background:#e7f6f3!important}
.calendar-week-head.weekday-3{background:#e8f5f7!important}
.calendar-week-head.weekday-4{background:#e5f5f3!important}
.calendar-week-head.weekday-5{background:#e8f4f8!important}
.calendar-week-head.weekday-6{background:#eef7f5!important}
.calendar-week-head.weekday-7{background:#edf5f7!important}
.calendar-days-grid .day-card{
  background:#fff!important;border:1px solid #d5e8ee;border-radius:12px;
  box-shadow:0 7px 16px rgba(35,99,120,.10),0 1px 3px rgba(35,99,120,.035);
  overflow:hidden
}
.calendar-days-grid .day-card:hover{box-shadow:0 9px 21px rgba(35,99,120,.15);border-color:#9dd4d8}
.calendar-days-grid .day-head{
  min-height:43px;background:linear-gradient(120deg,#eaf6fa,#effaf7);border-bottom:1px solid #dcebf0
}
.calendar-days-grid .day-title{color:#245e79;font-size:14px}
.calendar-days-grid .calendar-empty{background:linear-gradient(145deg,#f3f8f9,#eaf3f6);border-color:#dce9ed}
.calendar-days-grid .day-copy,.calendar-days-grid .day-add{background:#fff;color:#437c91;border-color:#d6e7ed}
.calendar-days-grid .day-item{border-top-color:#f0f5f6}
#scheduleBoard .day-card{background:#fff!important;border-color:#d3e7ea;box-shadow:0 7px 19px rgba(35,99,120,.10)}
#scheduleBoard .day-item:not(.rest-schedule-item){
  grid-template-columns:minmax(0,80px) minmax(0,1fr);
  gap:5px;min-height:36px;align-items:center;
  margin:3px 5px;padding:3px 3px 3px 5px;border-radius:7px
}
#scheduleBoard .day-item:not(.rest-schedule-item):hover{background:#f0fafb}
#scheduleBoard .day-item:not(.rest-schedule-item):before{background:#7ac8ca;left:0;top:3px;bottom:3px;width:2px}
#scheduleBoard .day-item:not(.rest-schedule-item) .calendar-time{
  display:inline-flex;align-items:center;justify-content:center;
  width:80px;max-width:100%;height:25px;min-width:0;
  border-radius:7px;white-space:nowrap;font-size:10px;
  background:#eaf7f9;color:#327b93;padding:3px 3px;letter-spacing:-.1px
}
#scheduleBoard .schedule-main{display:flex;align-items:center;flex-wrap:wrap;gap:4px;max-width:100%}
#scheduleBoard .host-chip-group{display:flex;flex-wrap:wrap;gap:4px;min-width:0;max-width:100%}
#scheduleBoard .host-chip{font-size:10px;max-width:100%;padding:4px 7px;overflow-wrap:anywhere;white-space:normal}
#scheduleBoard .rest-schedule-item{background:#f3f8f9;border:1px solid #e4edf0}
/* Shift remains only in schedule editor; no hover/focus/title exposure. */
#scheduleBoard .schedule-shift-tooltip{display:none!important}
#scheduleBoard .day-item.selected-row{background:#e0f5f3;outline-color:#59afa8}
#monthlyBoard .day-item{min-width:0}
#monthlyBoard .day-main,#monthlyBoard .day-title-line,#monthlyBoard .task-bubble{min-width:0;max-width:100%}
#monthlyBoard .event-title,#monthlyBoard .task-bubble{
  white-space:normal;overflow-wrap:anywhere;word-break:break-word;line-height:1.45
}
#monthlyBoard .task-bubble{background:#fff;border-color:#e0edf0;box-shadow:0 2px 7px rgba(35,99,120,.07)}
.stats-grid-v66>.panel{border:1px solid #d8eaf0;box-shadow:0 10px 27px rgba(35,99,120,.11)}
.stats-type-panel{background:linear-gradient(145deg,#ecf9fb,#fff 37%)!important}
.stats-status-panel{background:linear-gradient(145deg,#e7f8f1,#fff 37%)!important}
.stats-type-panel .panel-head h2:before{background:#329eb8}
.stats-status-panel .panel-head h2:before{background:#3db79a}
.stats-grid-v66 .panel-head{border-color:#dfedf0}
.stats-summary .stat-card:nth-child(3):before{background:#e8f6f3;color:#309d86}
.stats-summary .stat-card:after{background:linear-gradient(90deg,transparent 12%,#8bc8d5 12% 20%,transparent 20% 31%,#65b6c6 31% 40%,transparent 40% 51%,#85d1b7 51% 60%,transparent 60% 71%,#81c7d4 71% 80%)}
.stat-row .progress{background:#e8f2f5}
.stat-row .progress>span{background:linear-gradient(90deg,#3a9cb6,#68c4cb)}
.stats-status-panel .progress>span{background:linear-gradient(90deg,#41af94,#80d6b3)}
.search-box{border-color:#d6e9ef;background:linear-gradient(105deg,#fff,#f7fdfd)}
.search-box input{border-color:#d6e8ee}
.search-item{border-top-color:#e5eef0;border-radius:8px;padding:14px 11px;overflow-wrap:anywhere}
.search-item:hover{background:#f2faf9}
.search-section-title{color:#277c91}
.search-results>.empty{background:linear-gradient(150deg,#fff,#eff9f8);color:#7893a1}
.access-legend,.copy-source,.host-multi{background:#f1f9f9;border-color:#dcebf0}
.modal-card{border-color:#d4e6ec;box-shadow:0 24px 65px rgba(24,83,99,.18)}
.toast{background:#245b6a}
.login-body{background:linear-gradient(135deg,#e9f6fa,#f5fbfb 52%,#e4f7ef)}
.login-card{border-color:#d6e9ed;box-shadow:0 20px 55px rgba(35,99,120,.12)}
.login-card h1{color:#22556a}
@media(max-width:700px){
  .bottom-nav{border-top-color:#d7e8ec}
  .bottom-nav button{color:#578293}
  .bottom-nav button.active{background:#e4f6f4;color:#167d98}
  .calendar-days-grid,.calendar-week-row{min-width:1036px;grid-template-columns:repeat(7,minmax(0,1fr))}
  #scheduleBoard .day-item:not(.rest-schedule-item){grid-template-columns:minmax(0,1fr);gap:2px}
  #scheduleBoard .day-item:not(.rest-schedule-item) .calendar-time{width:max-content;max-width:100%}
  #scheduleBoard .day-item:not(.rest-schedule-item) .schedule-main{grid-column:1}
  .hero{min-height:112px}
}
