*{box-sizing:border-box} :root{--navy:#7a263a;--burg:#7a263a;--ink:#172033;--muted:#667085;--line:#d9e0e8;--bg:#f4f7fa;--white:#fff;--soft:#eaf0f6}
body{margin:0;font-family:Inter,Segoe UI,Arial,sans-serif;background:var(--bg);color:var(--ink)}
button,input,textarea{font:inherit}.topbar{position:sticky;top:0;z-index:10;display:flex;justify-content:space-between;gap:24px;align-items:center;padding:18px 28px;background:var(--burg);color:white;box-shadow:0 3px 16px #0002}
.eyebrow{font-size:11px;letter-spacing:.22em;opacity:.72}.topbar h1{margin:2px 0 0;font-size:25px}.topbar h1 span{font-weight:400;opacity:.7}.actions{display:flex;gap:8px;flex-wrap:wrap}
button,.file-btn{border:0;border-radius:9px;padding:10px 14px;cursor:pointer}.primary{background:var(--burg);color:#fff;font-weight:700}.ghost{background:#ffffff18;color:inherit;border:1px solid #ffffff2d}.file-btn input{display:none}
main{max-width:1440px;margin:auto;padding:28px}.hidden{display:none!important}.page-head{display:flex;justify-content:space-between;gap:16px;align-items:end;margin-bottom:20px}.page-head h2{margin:0;font-size:30px;color:var(--navy)}.sub{color:var(--muted);margin-top:5px}
.year-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.month-card{background:white;border:1px solid var(--line);border-radius:14px;padding:24px;text-align:left;box-shadow:0 5px 20px #17365d0b;cursor:pointer}.month-card:hover{transform:translateY(-2px);box-shadow:0 8px 24px #17365d18}.month-card b{display:block;color:var(--navy);font-size:19px}.month-card small{color:var(--muted)}
.calendar{display:grid;grid-template-columns:repeat(8,1fr);gap:8px}.dow{font-weight:700;text-align:center;color:var(--muted);padding:8px}.day{min-height:145px;background:white;border:1px solid var(--line);border-radius:12px;padding:10px;cursor:pointer;overflow:hidden}.day:hover{border-color:var(--burg)}.day.empty{background:transparent;border:0;cursor:default}.day-num{font-weight:800;color:var(--navy);margin-bottom:8px}.day.todayish{box-shadow:inset 0 0 0 2px var(--burg)}
.task-chip{font-size:12px;padding:6px 7px;margin:5px 0;border-radius:7px;background:var(--soft);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.week-link{font-size:12px;color:var(--burg);font-weight:800}
.week-day{background:#fff;border:1px solid var(--line);border-radius:13px;margin:13px 0;overflow:hidden}.week-title{display:flex;justify-content:space-between;padding:13px 16px;background:var(--burg);color:white;font-weight:800}.week-title button{padding:3px 9px;background:#fff2;color:white;border:1px solid #fff4}
table{width:100%;border-collapse:collapse;background:white}th,td{padding:11px 12px;border-bottom:1px solid var(--line);text-align:left;vertical-align:top}th{font-size:12px;color:var(--muted);background:#fafbfc}.click-row{cursor:pointer}.click-row:hover td{background:#f8fafc}.empty-state{text-align:center;color:var(--muted);padding:24px}
.toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.toolbar input{padding:10px 12px;border:1px solid var(--line);border-radius:9px;background:white}
.modal{position:fixed;inset:0;background:#0d1c30a8;display:grid;place-items:center;z-index:50;padding:20px}.modal-card{width:min(620px,100%);background:white;border-radius:16px;padding:22px;box-shadow:0 20px 60px #0005}.modal-head{display:flex;justify-content:space-between;align-items:center}.modal-head h2{color:var(--navy);margin:0 0 15px}.icon-btn{font-size:25px;background:transparent}.modal label{display:block;font-size:13px;font-weight:700;margin:12px 0}.modal input,.modal textarea{display:block;width:100%;margin-top:6px;border:1px solid var(--line);border-radius:9px;padding:11px;resize:vertical}.form-actions{display:grid;grid-template-columns:auto 1fr auto auto;gap:8px;margin-top:18px}.danger{background:#b42318;color:white}.toast{position:fixed;right:20px;bottom:20px;background:#101828;color:white;padding:12px 16px;border-radius:9px;z-index:100}
@media(max-width:900px){.topbar{align-items:flex-start;flex-direction:column}.year-grid{grid-template-columns:1fr 1fr}.calendar{gap:4px}.day{min-height:105px;padding:6px}.task-chip{font-size:10px}main{padding:15px}}
@media(max-width:600px){.year-grid{grid-template-columns:1fr}.calendar{grid-template-columns:repeat(7,minmax(42px,1fr));overflow:auto}.day{min-height:85px}.task-chip{display:none}.topbar{padding:15px}.actions{width:100%}.actions button,.file-btn{flex:1;text-align:center}th:nth-child(3),td:nth-child(3),th:nth-child(4),td:nth-child(4){display:none}}
.top-select{background:#fff;color:var(--burg);border:0;border-radius:9px;padding:10px 12px;font-weight:700}
.week-col-head{background:var(--burg)!important;color:#fff!important}
.week-block{min-height:145px;background:var(--burg);color:#fff;border-radius:12px;padding:10px;display:flex;align-items:center;justify-content:center;text-align:center;font-weight:800;cursor:pointer}
.week-block:hover{filter:brightness(1.08)}
.week-block small{display:block;font-weight:500;opacity:.78;margin-top:4px}
@media(max-width:900px){.calendar{grid-template-columns:repeat(8,minmax(74px,1fr));overflow-x:auto}.week-block{min-height:105px}}
@media(max-width:600px){.calendar{grid-template-columns:repeat(8,minmax(58px,1fr));}.week-block{min-height:85px;font-size:11px}.top-select{width:100%}}

.modal select{display:block;width:100%;margin-top:6px;border:1px solid var(--line);border-radius:9px;padding:11px;background:#fff}
.status-badge{display:inline-block;border-radius:999px;padding:4px 8px;font-size:11px;font-weight:800}
.status-started{background:#e8eef5;color:#344054}.status-progress{background:#fff3c4;color:#7a5b00}.status-postponed{background:#fde7e7;color:#b42318}.status-completed{background:#dcfce7;color:#067647}
.week-board{display:grid;grid-template-columns:repeat(7,minmax(175px,1fr));gap:10px;overflow-x:auto;padding-bottom:8px}
.week-card{background:#fff;border:1px solid var(--line);border-radius:13px;min-height:430px;overflow:hidden}
.week-card-head{background:var(--burg);color:#fff;padding:12px;text-align:center;font-weight:800;cursor:pointer}
.week-card-body{padding:9px}.week-task{border:1px solid var(--line);border-radius:9px;padding:9px;margin-bottom:8px;cursor:pointer;font-size:12px}.week-task:hover{box-shadow:0 3px 12px #0001}
.week-task b{display:block;font-size:13px;margin-bottom:5px}.week-task p{margin:5px 0;color:var(--muted);white-space:pre-wrap}.week-task .comment{font-style:italic}
.stats-row{display:flex;gap:16px;align-items:center;flex-wrap:wrap;margin:12px 0 18px}.donut{width:112px;height:112px;border-radius:50%;position:relative;flex:0 0 auto}.donut:after{content:"";position:absolute;inset:20px;border-radius:50%;background:#fff}.donut-total{position:absolute;inset:0;z-index:1;display:grid;place-items:center;font-weight:900;color:var(--burg);pointer-events:none}.legend{display:grid;grid-template-columns:1fr 1fr;gap:6px 14px;font-size:12px}.legend i{display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:6px}.lg-started{background:#98a2b3}.lg-progress{background:#f5c542}.lg-postponed{background:#d92d20}.lg-completed{background:#12b76a}
.day-modal-card{width:min(850px,94vw);max-height:82vh;overflow:auto}.day-modal-actions{display:flex;justify-content:flex-end;margin-top:14px}.day-list-item{border:1px solid var(--line);border-radius:10px;padding:12px;margin:9px 0;cursor:pointer}.day-list-item:hover{background:#fafbfc}.day-list-top{display:flex;justify-content:space-between;gap:10px}.day-list-item p{margin:7px 0;color:var(--muted);white-space:pre-wrap}
.page-nav{display:flex;gap:8px;align-items:center}.back-btn{background:white;color:var(--burg);border:1px solid var(--line);font-weight:800}
@media(max-width:900px){.week-board{grid-template-columns:repeat(7,minmax(210px,1fr))}.week-card{min-height:380px}}

.week-board{grid-template-columns:repeat(7,minmax(285px,1fr));width:max-content;min-width:100%;padding-bottom:16px}
.week-card{width:285px;min-height:520px}
.week-card-body{padding:11px}.week-task{font-size:13px;padding:11px}.week-task b{font-size:14px}
.auth-card{width:min(460px,94vw)}.admin-card{width:min(1100px,96vw);max-height:86vh;overflow:auto}
.auth-note{background:#fff7e8;border:1px solid #f2d39a;padding:10px;border-radius:9px;color:#7a5b00;font-size:12px;margin-bottom:12px}
.wide{width:100%;margin-top:12px}.auth-links{text-align:right}.link-btn{background:transparent;color:var(--burg);padding:3px;font-size:12px}
.admin-toolbar{display:flex;justify-content:flex-end;margin:12px 0}.dark-ghost{color:var(--burg);border:1px solid var(--line);background:white}
.admin-action{padding:6px 8px;background:#f2f4f7;color:var(--burg);margin:2px}.role-admin{font-weight:800;color:var(--burg)}
@media(max-width:900px){.week-board{grid-template-columns:repeat(7,260px)}.week-card{width:260px}}

/* v5 layout refinements */
main{max-width:none;width:100%;padding:22px 24px}
.week-page-head{margin-bottom:12px}
.week-board{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px;width:100%;min-width:0;overflow:visible;padding:0}
.week-card{width:auto;min-width:0;min-height:520px;border-radius:11px}
.week-card-head{padding:12px 7px;font-size:12px}
.week-card-body{padding:8px}
.week-task{padding:9px;margin-bottom:7px;overflow:hidden}
.week-task-top{display:flex;align-items:flex-start;justify-content:space-between;gap:6px}
.week-task-top b{min-width:0;flex:1;overflow-wrap:anywhere;line-height:1.25}
.week-task-top .status-badge{flex:0 0 auto;padding:3px 6px;font-size:9px;white-space:nowrap}
.week-task p{font-size:11px;line-height:1.35;margin:6px 0}
.title-with-stats{display:flex;align-items:center;gap:18px;min-width:0}
.compact-stats{display:flex;align-items:center;gap:9px;background:#fff;border:1px solid var(--line);border-radius:12px;padding:7px 10px}
.mini-donut{width:54px;height:54px;border-radius:50%;position:relative;flex:0 0 auto}
.mini-donut:after{content:"";position:absolute;inset:10px;background:#fff;border-radius:50%}
.mini-donut span{position:absolute;inset:0;z-index:2;display:grid;place-items:center;font-weight:900;color:var(--burg);font-size:12px}
.mini-legend{display:grid;grid-template-columns:repeat(2,auto);gap:3px 9px;font-size:10px;color:var(--muted)}
.mini-legend span{white-space:nowrap}.mini-legend i{display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:4px}
@media(max-width:1100px){
 main{padding:16px}
 .week-board{grid-template-columns:repeat(7,minmax(180px,1fr));overflow-x:auto}
 .week-card{min-width:180px}
}
@media(max-width:700px){
 .title-with-stats{align-items:flex-start;flex-direction:column;gap:8px}
 .compact-stats{width:max-content}
 main{padding:12px}
}

/* v6 header + responsive refinements */
.topbar{display:grid;grid-template-columns:auto minmax(260px,1fr) auto;align-items:center;padding:12px 20px;gap:18px}
.brand-lockup{width:132px;text-align:center;font-weight:900;letter-spacing:.11em;line-height:1.02}
.brand-lockup div:first-child{font-size:17px;border-bottom:1px solid #ffffff55;padding-bottom:4px}
.brand-lockup div:last-child{font-size:13px;padding-top:4px;letter-spacing:.075em}
.top-context{justify-self:start;display:flex;align-items:center;gap:14px;min-width:0}
.context-title{font-size:22px;font-weight:850;white-space:nowrap}
.top-context .compact-stats{background:#ffffff12;border-color:#ffffff35;color:#fff;padding:5px 8px}
.top-context .mini-donut:after{background:var(--burg)}
.top-context .mini-donut span{color:#fff}
.top-context .mini-legend{color:#fff}
.compact-page-head{margin-bottom:12px;align-items:center}
.week-block span{display:block}.week-block small{line-height:1.3}
.week-board{gap:10px}.week-card{min-height:500px}
@media(min-width:1400px){
 main{padding-left:18px;padding-right:18px}
 .week-board{grid-template-columns:repeat(7,minmax(0,1fr));gap:10px}
}
@media(max-width:1100px){
 .topbar{grid-template-columns:auto 1fr}.actions{grid-column:1/-1}
 .top-context{justify-self:end}
 .week-board{grid-template-columns:repeat(7,minmax(220px,1fr));overflow-x:auto;scroll-snap-type:x proximity}
 .week-card{min-width:220px;scroll-snap-align:start}
}
@media(max-width:700px){
 .topbar{display:flex;flex-direction:column;align-items:stretch;padding:11px 12px;gap:9px}
 .brand-lockup{align-self:center;width:125px}
 .top-context{justify-self:auto;width:100%;justify-content:space-between;gap:8px}
 .context-title{font-size:19px}
 .top-context .compact-stats{padding:4px 6px;gap:5px}
 .top-context .mini-donut{width:44px;height:44px}
 .top-context .mini-donut:after{inset:8px}
 .top-context .mini-legend{font-size:9px;gap:2px 6px}
 .actions{display:grid;grid-template-columns:repeat(2,1fr);width:100%}
 .actions button,.actions .file-btn,.top-select{width:100%;min-width:0}
 .calendar{grid-template-columns:repeat(8,minmax(72px,1fr));overflow-x:auto}
 .day{min-height:100px}
 .week-board{grid-template-columns:repeat(7,minmax(82vw,1fr));gap:10px;overflow-x:auto;scroll-snap-type:x mandatory}
 .week-card{min-width:82vw;min-height:420px;scroll-snap-align:center}
 .week-card-head{font-size:13px}
 .compact-page-head{align-items:stretch;gap:8px}
 .compact-page-head .toolbar{width:100%;display:grid;grid-template-columns:1fr 1fr}
}

/* v7 navigation, stats interaction and mobile */
.topbar{display:grid!important;grid-template-columns:150px minmax(220px,1fr) auto!important;align-items:center!important;gap:18px!important}
.brand-lockup{grid-column:1;justify-self:start}
.top-context{grid-column:2;justify-self:start!important}
.actions{grid-column:3;justify-self:end;display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.mobile-menu-btn{display:none;background:#ffffff18;border:1px solid #ffffff55;color:#fff;border-radius:9px;padding:9px 12px;font-weight:800}
.clickable-stats{cursor:pointer;transition:transform .15s ease,box-shadow .15s ease}
.clickable-stats:hover{transform:translateY(-1px);box-shadow:0 4px 14px #0002}
.stats-modal-card{width:min(620px,94vw)}
.stats-modal-card .stats-row{justify-content:center;padding:16px 0;margin:0}
.stats-modal-card .donut{width:210px;height:210px}
.stats-modal-card .donut:after{inset:38px}
.stats-modal-card .donut-total{font-size:28px}
.stats-modal-card .legend{font-size:15px;gap:12px 24px}
.stats-modal-card .legend i{width:13px;height:13px}
.role-editor{font-weight:800;color:#7a5b00}
@media(max-width:1180px){
 .topbar{grid-template-columns:140px 1fr!important}
 .brand-lockup{grid-column:1}
 .top-context{grid-column:2;justify-self:end!important}
 .mobile-menu-btn{display:block;grid-column:2;grid-row:2;justify-self:end}
 .actions{display:none;grid-column:1/-1;grid-row:3;width:100%;justify-self:stretch}
 .actions.mobile-open{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
 .actions.mobile-open>*{width:100%;min-width:0}
}
@media(max-width:700px){
 .topbar{display:grid!important;grid-template-columns:1fr auto!important;align-items:center!important;padding:10px 12px!important}
 .brand-lockup{grid-column:1;justify-self:start;align-self:center}
 .mobile-menu-btn{grid-column:2;grid-row:1;justify-self:end;display:block}
 .top-context{grid-column:1/-1;grid-row:2;justify-self:stretch!important;width:100%;display:flex;flex-direction:column;align-items:flex-start;gap:7px;padding-top:6px}
 .top-context .compact-stats{width:100%;box-sizing:border-box;justify-content:flex-start}
 .actions{grid-column:1/-1;grid-row:3}
 .actions.mobile-open{grid-template-columns:1fr}
 .year-grid{grid-template-columns:1fr}
 .page-head{flex-direction:column;align-items:stretch}
 .title-with-stats{width:100%}
 .title-with-stats .compact-stats{width:100%;box-sizing:border-box}
 .calendar{grid-template-columns:repeat(8,minmax(76px,1fr));overflow-x:auto;-webkit-overflow-scrolling:touch}
 .week-board{display:flex;overflow-x:auto;gap:10px;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch}
 .week-card{flex:0 0 calc(100vw - 38px);min-width:calc(100vw - 38px);scroll-snap-align:start}
 .day-modal-card,.admin-card{width:94vw;max-height:88vh}
 .admin-card{overflow:auto}
 .stats-modal-card .donut{width:170px;height:170px}
 .stats-modal-card .donut:after{inset:31px}
 .stats-modal-card .legend{grid-template-columns:1fr;font-size:14px}
}

/* v8 mobile month redesign */
.mobile-calendar{display:none}
.mobile-brand-row{display:contents}
#mobileStatsSlot{display:none}

@media(max-width:700px){
 html,body{overflow-x:hidden;max-width:100%}
 main{width:100%;max-width:100%;box-sizing:border-box;padding:10px 8px}
 .topbar{width:100%;box-sizing:border-box}
 .mobile-brand-row{display:flex;grid-column:1;align-items:center;gap:8px;min-width:0}
 .brand-lockup{width:92px!important;min-width:92px}
 .brand-lockup div:first-child{font-size:13px!important;letter-spacing:.08em}
 .brand-lockup div:last-child{font-size:10px!important;letter-spacing:.045em}
 #mobileStatsSlot{display:block}
 #mobileStatsSlot .compact-stats{padding:3px 5px;background:#ffffff12;border-color:#ffffff35;gap:4px}
 #mobileStatsSlot .mini-donut{width:38px;height:38px}
 #mobileStatsSlot .mini-donut:after{inset:7px;background:var(--burg)}
 #mobileStatsSlot .mini-donut span{font-size:9px;color:#fff}
 #mobileStatsSlot .mini-legend{display:none}
 .top-context{grid-column:1/-1;grid-row:2;padding:2px 0 0}
 .top-context .compact-stats{display:none}
 .context-title{font-size:17px}
 .mobile-menu-btn{font-size:12px;padding:7px 9px}
 .compact-page-head{margin:7px 0 9px}
 .compact-page-head .sub{font-size:12px}
 .compact-page-head .toolbar{gap:6px}
 .compact-page-head .toolbar button{padding:9px 6px}
 .calendar{display:none!important}
 .mobile-calendar{display:block;width:100%;overflow:hidden}
 .mobile-dow,.mobile-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px;width:100%}
 .mobile-dow{margin-bottom:3px}
 .mobile-dow div{text-align:center;font-size:10px;font-weight:800;color:var(--muted);padding:4px 0}
 .mobile-week-row{margin-bottom:6px}
 .mobile-day{height:54px;min-width:0;border:1px solid var(--line);background:#fff;border-radius:8px;padding:5px 4px;box-sizing:border-box;position:relative;cursor:pointer;color:var(--burg)}
 .mobile-day.empty{background:transparent;border-color:transparent}
 .mobile-day b{font-size:12px}
 .mobile-day span{position:absolute;right:4px;bottom:4px;display:grid;place-items:center;width:16px;height:16px;border-radius:50%;background:var(--burg);color:#fff;font-size:8px;font-weight:800}
 .mobile-week-link{height:31px;margin-top:3px;border-radius:7px;background:var(--burg);color:#fff;display:flex;align-items:center;justify-content:center;gap:8px;cursor:pointer}
 .mobile-week-link b{font-size:10px}
 .mobile-week-link span{font-size:9px;opacity:.8}
 .week-board{width:100%;max-width:100%}
 .week-card{flex-basis:calc(100vw - 26px);min-width:calc(100vw - 26px)}
}

/* v9 mobile: vertical week + right-side drawer */
.side-menu-head{display:none}
.menu-overlay{display:none}

@media(max-width:1180px){
 body.menu-open{overflow:hidden}
 .menu-overlay:not(.hidden){display:block;position:fixed;inset:0;background:rgba(0,0,0,.38);z-index:1998}
 .actions,.actions.mobile-open{
   position:fixed!important;
   top:0;right:0;bottom:0;
   width:min(330px,86vw)!important;
   height:100dvh;
   z-index:1999;
   background:#fff;
   padding:0 14px 20px!important;
   box-sizing:border-box;
   overflow-y:auto;
   display:flex!important;
   flex-direction:column;
   align-items:stretch;
   gap:8px;
   transform:translateX(105%);
   transition:transform .22s ease;
   box-shadow:-8px 0 30px #0003;
 }
 .actions.mobile-open{transform:translateX(0)}
 .actions>*{width:100%!important;box-sizing:border-box}
 .side-menu-head{
   display:flex!important;
   width:calc(100% + 28px)!important;
   margin:0 -14px 10px;
   padding:14px;
   box-sizing:border-box;
   align-items:center;
   justify-content:space-between;
   background:var(--burg);
   color:#fff;
 }
 .side-menu-head b{font-size:14px;letter-spacing:.08em}
 .side-close{width:38px!important;height:38px;border-radius:9px;background:#ffffff18;color:#fff;border:1px solid #ffffff55;font-size:25px;line-height:1;padding:0}
 .actions button,.actions .file-btn,.actions select{color:var(--burg);background:#fff;border:1px solid var(--line)}
 .actions .primary{background:var(--burg);color:#fff}
}

@media(max-width:700px){
 html,body{overflow-x:hidden!important}
 main{overflow-x:hidden!important}
 .week-board{
   display:flex!important;
   flex-direction:column!important;
   width:100%!important;
   max-width:100%!important;
   overflow:visible!important;
   gap:8px!important;
   padding:0!important;
 }
 .week-card{
   flex:none!important;
   width:100%!important;
   min-width:0!important;
   min-height:0!important;
   height:auto!important;
   scroll-snap-align:none!important;
   box-sizing:border-box!important;
 }
 .week-card-body{min-height:0!important}
 .week-task{width:100%;box-sizing:border-box}
 .week-page-head{margin-bottom:8px}
}

/* v10 mobile navigation + month heading */
.mobile-nav-buttons{display:none}
.month-white-title{font-size:22px;font-weight:850;color:var(--burg);line-height:1.15}
.month-white-head{display:grid;grid-template-columns:auto auto 1fr;align-items:center;gap:16px}
.month-white-head .toolbar{justify-self:end}
.month-context-hidden{display:none!important}

/* Drawer visually follows the desktop controls: burgundy surface, white outlined controls. */
@media(max-width:1180px){
 .mobile-nav-buttons{display:flex;grid-column:2;grid-row:2;justify-self:end;gap:7px}
 .mobile-menu-btn,.mobile-back-btn{
   display:block;background:#ffffff18;border:1px solid #ffffff55;color:#fff;
   border-radius:9px;padding:9px 12px;font-weight:800
 }
 .mobile-menu-btn{grid-column:auto;grid-row:auto}
 .desktop-back-btn{display:none!important}
 .actions,.actions.mobile-open{
   background:var(--burg)!important;
   border-left:1px solid #ffffff33;
 }
 .side-menu-head{background:#6d2034!important;border-bottom:1px solid #ffffff33}
 .actions button,.actions .file-btn,.actions select{
   background:#ffffff10!important;color:#fff!important;border:1px solid #ffffff55!important;
 }
 .actions .primary{background:#fff!important;color:var(--burg)!important;border-color:#fff!important}
 .actions select option{color:#222;background:#fff}
}

@media(max-width:700px){
 .mobile-nav-buttons{display:flex;grid-column:2;grid-row:1;align-self:center;gap:5px}
 .mobile-nav-buttons button{font-size:11px;padding:7px 8px}
 .top-context.month-context-hidden{display:none!important}
 .month-white-head{
   display:grid!important;grid-template-columns:1fr!important;gap:7px!important;
   align-items:stretch!important;margin-top:4px
 }
 .month-white-title{font-size:20px}
 .month-white-head>.compact-stats{display:none!important}
 .month-white-head .toolbar{justify-self:stretch;width:100%}
 .mobile-brand-row{grid-column:1}
}

/* v11 fixes */
.week-white-title{font-size:22px;font-weight:850;color:var(--burg);line-height:1.15}
.week-white-head{display:flex;align-items:center;gap:16px}
.week-context-hidden{display:none!important}
.side-menu-head{justify-content:flex-start!important}
.mobile-day,.mobile-week-link{touch-action:manipulation;-webkit-tap-highlight-color:rgba(122,38,58,.12);cursor:pointer}

@media(max-width:700px){
 .top-context.week-context-hidden{display:none!important}
 .week-white-head{
   display:grid!important;
   grid-template-columns:1fr!important;
   gap:7px!important;
   align-items:stretch!important;
   margin-top:4px
 }
 .week-white-title{font-size:20px}
 .week-white-head>.compact-stats{display:none!important}
 .mobile-day{position:relative;z-index:1;pointer-events:auto!important}
 .mobile-week-link{position:relative;z-index:1;pointer-events:auto!important}
}

/* v12 drawer polish */
@media(max-width:1180px){
 .side-menu-head{justify-content:space-between!important;align-items:center!important}
 .compact-close{
   width:30px!important;height:30px!important;min-width:30px!important;
   padding:0!important;border-radius:7px!important;font-size:20px!important;
   display:grid!important;place-items:center!important;line-height:1!important
 }
 .actions,.actions.mobile-open{align-items:center!important}
 .actions>button:not(.side-close),
 .actions>.file-btn,
 .actions>select{
   width:88%!important;
   max-width:255px!important;
   min-height:38px;
   align-self:center!important;
   text-align:center!important;
   justify-content:center!important;
   margin-left:auto!important;
   margin-right:auto!important;
 }
 .actions>.file-btn{
   display:flex!important;
   align-items:center!important;
   justify-content:center!important;
 }
 .actions>.file-btn input{display:none}
 .actions select{text-align-last:center}
}
@media(max-width:700px){
 .actions>button:not(.side-close),
 .actions>.file-btn,
 .actions>select{width:86%!important;max-width:240px!important}
}

/* v13 compact side-menu redesign */
@media(max-width:1180px){
 .actions,.actions.mobile-open{
   padding:58px 14px 18px!important;
   gap:7px!important;
   align-items:stretch!important;
 }
 .side-menu-head{
   position:absolute!important;
   top:0!important;left:0!important;right:0!important;
   width:100%!important;height:52px!important;
   margin:0!important;padding:0 14px!important;
   box-sizing:border-box!important;
   display:flex!important;align-items:center!important;
   justify-content:flex-start!important;
   background:#6d2034!important;
   border-bottom:1px solid #ffffff35!important;
 }
 .side-menu-head b{font-size:14px!important;letter-spacing:.08em}
 .compact-close{
   position:absolute!important;
   top:10px!important;right:12px!important;
   width:32px!important;height:32px!important;
   min-width:32px!important;max-width:32px!important;
   padding:0!important;margin:0!important;
   border-radius:8px!important;
   display:grid!important;place-items:center!important;
   font-size:19px!important;line-height:1!important;
   background:#ffffff12!important;
   border:1px solid #ffffff55!important;
   color:#fff!important;
 }
 .actions>button:not(.side-close),
 .actions>.file-btn,
 .actions>select{
   width:100%!important;
   max-width:none!important;
   height:44px!important;
   min-height:44px!important;
   padding:0 13px!important;
   margin:0!important;
   border-radius:9px!important;
   box-sizing:border-box!important;
   display:flex!important;
   align-items:center!important;
   justify-content:center!important;
   font-size:14px!important;
   line-height:1!important;
 }
 .actions>select{display:block!important;padding:0 36px 0 13px!important}
 .actions>.file-btn input{display:none!important}
 .actions .primary{
   margin-top:4px!important;
   height:46px!important;
   min-height:46px!important;
 }
}
@media(max-width:700px){
 .actions,.actions.mobile-open{width:min(300px,84vw)!important}
 .actions>button:not(.side-close),
 .actions>.file-btn,
 .actions>select{height:42px!important;min-height:42px!important;font-size:13px!important}
}

/* v14 */
@media(max-width:1180px){
 #mainActions .desktop-back-btn{display:none!important}
}
.note-badge{display:inline-flex;align-items:center;gap:4px;background:#f3e8ff;color:#6b21a8;border:1px solid #e9d5ff;border-radius:999px;padding:3px 7px;font-size:10px;font-weight:800;white-space:nowrap}
.note-box{margin-top:7px;padding:8px 9px;border-left:3px solid #7a263a;background:#faf5f7;border-radius:6px;font-size:11px;color:#5d2635;white-space:pre-wrap}
.day-note{margin-top:7px;padding:9px;background:#faf5f7;border-left:3px solid var(--burg);border-radius:7px;color:#5d2635}

/* v15 branding + week stats */
.brand-lockup{
 width:142px!important;
 text-align:left!important;
 line-height:1!important;
 position:relative;
 padding-left:11px;
 box-sizing:border-box;
}
.brand-lockup:before{
 content:"";
 position:absolute;
 left:0;top:1px;bottom:1px;
 width:3px;
 border-radius:3px;
 background:#fff;
 opacity:.9;
}
.brand-lockup div:first-child{
 font-size:17px!important;
 font-weight:900!important;
 letter-spacing:.13em!important;
 border-bottom:0!important;
 padding:0 0 4px!important;
 white-space:nowrap;
}
.brand-lockup div:last-child{
 font-size:17px!important;
 font-weight:900!important;
 letter-spacing:.055em!important;
 padding:0!important;
 white-space:nowrap;
}
.week-white-head>.compact-stats{display:none!important}

@media(max-width:700px){
 .brand-lockup{
   width:102px!important;
   min-width:102px!important;
   padding-left:8px!important;
 }
 .brand-lockup:before{width:2px}
 .brand-lockup div:first-child{
   font-size:12px!important;
   letter-spacing:.105em!important;
   padding-bottom:3px!important;
 }
 .brand-lockup div:last-child{
   font-size:12px!important;
   letter-spacing:.035em!important;
 }
 /* Week statistics stays beside the brand, just like the other mobile contexts. */
 .top-context.week-context-hidden{display:none!important}
}

/* v16 mobile branding + centered status statistics */
.brand-lockup:before{display:none!important}
.brand-lockup{
 padding-left:0!important;
 text-align:left!important;
 width:132px!important;
}
.brand-lockup div:first-child{
 font-size:14px!important;
 font-weight:400!important;
 letter-spacing:.18em!important;
 padding:0 0 3px!important;
 border-bottom:1px solid #ffffff55!important;
}
.brand-lockup div:last-child{
 font-size:16px!important;
 font-weight:900!important;
 letter-spacing:.035em!important;
 padding-top:3px!important;
}

@media(max-width:700px){
 .topbar{
   grid-template-columns:1fr auto!important;
 }
 .mobile-brand-row{
   display:block!important;
   grid-column:1!important;
   min-width:0;
 }
 .brand-lockup{
   width:105px!important;
   min-width:105px!important;
 }
 .brand-lockup div:first-child{
   font-size:10px!important;
   font-weight:400!important;
   letter-spacing:.16em!important;
   padding-bottom:2px!important;
 }
 .brand-lockup div:last-child{
   font-size:12px!important;
   font-weight:900!important;
   letter-spacing:.025em!important;
   padding-top:2px!important;
 }

 /* Statistics becomes its own centered row in the burgundy header. */
 #mobileStatsSlot{
   display:flex!important;
   position:absolute;
   left:50%;
   top:8px;
   transform:translateX(-50%);
   justify-content:center;
   width:auto;
   z-index:2;
 }
 #mobileStatsSlot:empty{display:none!important}
 #mobileStatsSlot .compact-stats{
   display:flex!important;
   align-items:center!important;
   width:auto!important;
   padding:4px 7px!important;
   gap:6px!important;
   background:#ffffff10!important;
   border:1px solid #ffffff38!important;
   border-radius:10px!important;
 }
 #mobileStatsSlot .mini-donut{
   width:39px!important;
   height:39px!important;
 }
 #mobileStatsSlot .mini-donut:after{
   inset:7px!important;
   background:var(--burg)!important;
 }
 #mobileStatsSlot .mini-donut span{
   color:#fff!important;
   font-size:9px!important;
 }
 #mobileStatsSlot .mini-legend{
   display:grid!important;
   grid-template-columns:repeat(2,auto)!important;
   gap:2px 6px!important;
   font-size:8px!important;
   color:#fff!important;
 }
 #mobileStatsSlot .mini-legend span{
   display:flex!important;
   align-items:center!important;
   white-space:nowrap!important;
 }
 #mobileStatsSlot .mini-legend i{
   width:7px!important;
   height:7px!important;
   margin-right:3px!important;
 }
 .mobile-nav-buttons{
   position:relative;
   z-index:3;
 }
}
@media(max-width:390px){
 #mobileStatsSlot .compact-stats{padding:3px 5px!important;gap:4px!important}
 #mobileStatsSlot .mini-donut{width:34px!important;height:34px!important}
 #mobileStatsSlot .mini-legend{font-size:7px!important;gap:1px 4px!important}
 .brand-lockup{width:92px!important;min-width:92px!important}
 .brand-lockup div:first-child{font-size:9px!important}
 .brand-lockup div:last-child{font-size:11px!important}
}

/* v17 PLANNER branding */
.brand-lockup{
  width:112px!important;
  min-width:112px!important;
  text-align:left!important;
  padding:0!important;
}
.brand-lockup div:first-child,
.brand-lockup div:last-child{
  display:block!important;
  width:112px!important;
  box-sizing:border-box!important;
  white-space:nowrap!important;
  line-height:1!important;
}
.brand-lockup div:first-child{
  font-size:12px!important;
  font-weight:400!important;
  letter-spacing:.245em!important;
  border-bottom:1px solid #ffffff55!important;
  padding:0 0 4px!important;
}
.brand-lockup div:last-child{
  font-size:15px!important;
  font-weight:900!important;
  letter-spacing:.105em!important;
  padding:4px 0 0!important;
}
@media(max-width:700px){
 .brand-lockup{
   width:106px!important;
   min-width:106px!important;
 }
 .brand-lockup div:first-child,
 .brand-lockup div:last-child{width:106px!important}
 .brand-lockup div:first-child{
   font-size:10px!important;
   letter-spacing:.265em!important;
   padding-bottom:3px!important;
 }
 .brand-lockup div:last-child{
   font-size:13px!important;
   letter-spacing:.12em!important;
   padding-top:3px!important;
 }
}

/* v18 mobile month alignment + final brand lockup */
@media(max-width:700px){
 main{padding-left:7px!important;padding-right:7px!important}

 .mobile-calendar{
   width:100%!important;
   margin:0!important;
   padding:0!important;
   box-sizing:border-box!important;
 }
 .mobile-dow,.mobile-days{
   width:100%!important;
   display:grid!important;
   grid-template-columns:repeat(7,1fr)!important;
   gap:4px!important;
   box-sizing:border-box!important;
 }
 .mobile-dow div{
   font-size:9px!important;
   padding:3px 0 5px!important;
 }
 .mobile-week-row{width:100%!important;margin:0 0 6px!important}
 .mobile-day{
   width:auto!important;
   min-width:0!important;
   height:48px!important;
   padding:5px!important;
   border-radius:7px!important;
 }
 .mobile-week-link{
   width:100%!important;
   height:30px!important;
   margin:4px 0 0!important;
   box-sizing:border-box!important;
   border-radius:7px!important;
 }
 .mobile-week-link b{font-size:9px!important}
 .mobile-week-link span{font-size:8px!important}

 /* The two brand lines occupy exactly the same box width. */
 .brand-lockup{
   width:104px!important;
   min-width:104px!important;
   max-width:104px!important;
 }
 .brand-lockup div:first-child,
 .brand-lockup div:last-child{
   width:104px!important;
   max-width:104px!important;
   box-sizing:border-box!important;
 }
 .brand-lockup div:first-child{
   font-size:9px!important;
   font-weight:400!important;
   letter-spacing:.225em!important;
   padding:0 0 3px!important;
 }
 .brand-lockup div:last-child{
   font-size:13px!important;
   font-weight:900!important;
   letter-spacing:.082em!important;
   padding:3px 0 0!important;
 }

 .month-white-head{margin-left:0!important;margin-right:0!important}
 .month-white-head .toolbar{gap:5px!important}
}

/* Desktop/tablet brand: same visual line width too. */
@media(min-width:701px){
 .brand-lockup{
   width:126px!important;
   min-width:126px!important;
   max-width:126px!important;
 }
 .brand-lockup div:first-child,
 .brand-lockup div:last-child{
   width:126px!important;
   max-width:126px!important;
 }
 .brand-lockup div:first-child{
   font-size:11px!important;
   letter-spacing:.245em!important;
 }
 .brand-lockup div:last-child{
   font-size:15px!important;
   letter-spacing:.115em!important;
 }
}

/* v19: identical mobile header geometry on Month and Week */
@media(max-width:700px){
 .topbar{
   min-height:72px!important;
   height:72px!important;
   padding:8px 8px!important;
   box-sizing:border-box!important;
   display:grid!important;
   grid-template-columns:116px 1fr auto!important;
   grid-template-rows:56px!important;
   column-gap:7px!important;
   align-items:center!important;
 }
 .mobile-brand-row{
   grid-column:1!important;
   grid-row:1!important;
   width:116px!important;
   min-width:116px!important;
   display:flex!important;
   align-items:center!important;
 }
 .brand-lockup{
   width:112px!important;
   min-width:112px!important;
   max-width:112px!important;
 }
 .brand-lockup div:first-child,
 .brand-lockup div:last-child{
   width:112px!important;
   max-width:112px!important;
 }
 .brand-lockup div:first-child{
   font-size:9px!important;
   font-weight:400!important;
   letter-spacing:.31em!important;
   border-bottom:1px solid #ffffff55!important;
   padding:0 0 4px!important;
 }
 .brand-lockup div:last-child{
   font-size:13px!important;
   font-weight:900!important;
   letter-spacing:.135em!important;
   padding:4px 0 0!important;
 }

 /* Statistics gets its own true center column instead of absolute overlap. */
 #mobileStatsSlot{
   position:static!important;
   transform:none!important;
   grid-column:auto!important;
   width:auto!important;
   display:flex!important;
   align-items:center!important;
   justify-content:center!important;
   margin:0!important;
 }
 .mobile-brand-row #mobileStatsSlot{display:none!important}
 .topbar > #topContext{display:none!important}

 /* Put the mobile statistics visually in the center of the same fixed-height bar. */
 .mobile-brand-row:has(#mobileStatsSlot:not(:empty)){position:static!important}
 #mobileStatsSlot:not(:empty){
   position:absolute!important;
   left:50%!important;
   top:9px!important;
   transform:translateX(-50%)!important;
   z-index:2!important;
 }
 .mobile-nav-buttons{
   grid-column:3!important;
   grid-row:1!important;
   position:static!important;
   display:flex!important;
   align-items:center!important;
   justify-self:end!important;
   gap:5px!important;
   z-index:3!important;
 }
 .mobile-nav-buttons button{
   height:34px!important;
   padding:0 8px!important;
 }

 /* Same white-content spacing immediately below the header in both views. */
 .month-white-head,.week-white-head{
   margin-top:0!important;
   padding-top:10px!important;
 }
}

@media(max-width:700px){
 .mobile-brand-row #mobileStatsSlot:not(:empty){
   display:flex!important;
   position:fixed!important;
   left:50%!important;
   top:9px!important;
   transform:translateX(-50%)!important;
   width:auto!important;
   z-index:100!important;
 }
}

/* v20 server */
.password-wrap{display:flex;align-items:stretch}.password-wrap input{flex:1;border-radius:8px 0 0 8px!important}.eye-btn{width:46px;border:1px solid var(--line);border-left:0;background:#fff;border-radius:0 8px 8px 0;cursor:pointer}
.server-bar{display:flex;gap:8px;align-items:center;padding:7px 18px;background:#fff;border-bottom:1px solid var(--line);font-size:12px}.server-bar select{margin-left:auto}.server-bar button,.server-bar select{padding:6px 9px;border:1px solid var(--line);background:#fff;border-radius:7px}
@media(max-width:700px){.server-bar{padding:6px 8px;flex-wrap:wrap}.server-bar select{order:3;width:100%;margin:0}.server-bar button{font-size:10px;padding:5px 7px}}
