/* Watakat CRM V7.4 – visual comfort only; no API, schema, or project state changes. */
:root[data-theme="soft"]{--theme-bg:#20262b;--theme-surface:#293139;--theme-surface2:#303a43;--theme-tile:#333e47;--theme-input:#252e36;--theme-border:#45515b;--theme-text:#e0e7eb;--theme-muted:#b6c3cb;--theme-accent:#a8c7e3;--theme-active:#3c4b57;--theme-primary:#485e71;--theme-shadow:rgba(0,0,0,.09);color-scheme:dark}
:root[data-theme="office"]{--theme-bg:#ecefeb;--theme-surface:#fafbf8;--theme-surface2:#f1f4ef;--theme-tile:#e9eee7;--theme-input:#fff;--theme-border:#ccd5cd;--theme-text:#293b39;--theme-muted:#5d716e;--theme-accent:#3b777c;--theme-active:#dbe9e5;--theme-primary:#497b80;--theme-shadow:rgba(19,44,38,.05);color-scheme:light}
/* Fix readability across ALL themes; retain existing layout and data behavior. */
.dashboard{font-size:14px;line-height:1.5}
.page-header h1{font-weight:700;letter-spacing:-.025em}
.table-wrap td,.table-wrap th{font-size:13px;line-height:1.5}
.table-wrap .project-name,.table-wrap .w-name{font-size:13px;font-weight:650}
.table-wrap .inline-date{font-size:12px;min-width:125px}
.table-wrap .inline-status{font-size:11px;font-weight:700;letter-spacing:.015em}
.sidebar .legend-item strong,.sidebar .mini-item strong{font-size:12px;line-height:1.45}
.sidebar .legend-item span,.sidebar .mini-item span{font-size:12px;line-height:1.5}
.table-meta,.w-quickbar,.month-info small{font-size:12px}
/* The muted palette is applied only to dark comfort surfaces; semantic status hues remain legible. */
:root[data-theme="soft"] .metric-card,:root[data-theme="soft"] .panel,:root[data-theme="soft"] .auth-card,:root[data-theme="soft"] .modal-card,
:root[data-theme="office"] .metric-card,:root[data-theme="office"] .panel,:root[data-theme="office"] .auth-card,:root[data-theme="office"] .modal-card{box-shadow:0 3px 12px var(--theme-shadow)!important}
:root[data-theme="soft"] .inline-status{color:color-mix(in srgb,var(--status-color) 72%,#e0e7eb)!important;background-color:color-mix(in srgb,var(--status-color) 14%,#2d3940)!important;border-color:color-mix(in srgb,var(--status-color) 27%,#35434a)!important}
:root[data-theme="office"] .inline-status{background-color:color-mix(in srgb,var(--status-color) 15%,white)!important;color:color-mix(in srgb,var(--status-color) 72%,black)!important;border-color:color-mix(in srgb,var(--status-color) 32%,transparent)!important}
:root[data-theme="soft"] .status-pill,:root[data-theme="soft"] .badge{filter:saturate(.82)}
:root[data-theme="soft"] .metric-value.green{color:#78d3ae}:root[data-theme="soft"] .metric-value.purple{color:#b6a7d7}
:root[data-theme="office"] .w-drawer-backdrop{background:rgba(24,43,39,.38)}
:root[data-theme="soft"] .table-wrap thead th,:root[data-theme="office"] .table-wrap thead th{background:var(--theme-surface2)!important}
:root[data-theme="soft"] .table-wrap tr:hover td,:root[data-theme="office"] .table-wrap tr:hover td{background:color-mix(in srgb,var(--theme-accent) 7%,transparent)!important}
:root[data-theme="soft"] .w-name,:root[data-theme="soft"] .project-name-link,:root[data-theme="office"] .w-name,:root[data-theme="office"] .project-name-link{color:var(--theme-text)!important}
:root[data-theme="soft"] .inline-date,:root[data-theme="office"] .inline-date{color:var(--theme-text)!important;background:var(--theme-input)!important;border-color:var(--theme-border)!important}
:root[data-theme="soft"] .inline-date::-webkit-calendar-picker-indicator{filter:invert(.75)}
:root[data-theme="office"] .inline-date::-webkit-calendar-picker-indicator{filter:none}
:root[data-theme="soft"] .w-quickbar input,:root[data-theme="office"] .w-quickbar input{accent-color:var(--theme-accent)}
:root[data-theme="soft"] .table-wrap,:root[data-theme="office"] .table-wrap{scrollbar-color:var(--theme-border) var(--theme-surface)}
/* Override fixed dark colors still present in original styles for both new presets. */
:root[data-theme="soft"] .w-nav,:root[data-theme="office"] .w-nav,
:root[data-theme="soft"] .tab-btn,:root[data-theme="office"] .tab-btn{color:var(--theme-muted)}
:root[data-theme="soft"] .w-nav.active,:root[data-theme="office"] .w-nav.active{color:var(--theme-text)!important}
:root[data-theme="soft"] .w-drawer-content,:root[data-theme="office"] .w-drawer-content{color:var(--theme-text)}
:root[data-theme="soft"] .w-form label,:root[data-theme="office"] .w-form label{color:var(--theme-muted)}
:root[data-theme="office"] .metric-value{color:var(--theme-text)}
:root[data-theme="office"] .metric-value.green{color:#197850}:root[data-theme="office"] .metric-value.purple{color:#7959a9}:root[data-theme="office"] .metric-value.coral{color:#966fb1}
/* Independent density preference; active theme does not change row count. */
:root[data-density="compact"] .table-wrap td,:root[data-density="compact"] .table-wrap th{padding:9px 10px}
:root[data-density="compact"] .table-wrap .inline-date{padding:5px 2px}
:root[data-density="compact"] .table-wrap .inline-status{padding-top:6px;padding-bottom:6px}
:root[data-density="comfort"] .table-wrap td,:root[data-density="comfort"] .table-wrap th{padding:17px 14px}
:root[data-density="comfort"] .table-wrap .inline-date{padding-top:10px;padding-bottom:10px}
:root[data-density="comfort"] .table-wrap .inline-status{padding-top:9px;padding-bottom:9px}
:root[data-density="comfort"] .table-wrap .project-name,:root[data-density="comfort"] .table-wrap .w-name{font-size:14px}
:root[data-density="comfort"] .table-wrap td{line-height:1.6}
/* Right sidebar can be hidden without affecting the table state. */
.main-grid.sidebar-collapsed{grid-template-columns:minmax(0,1fr)!important}
.main-grid.sidebar-collapsed #crmSidebar{display:none!important}
#sidebarToggle{white-space:nowrap}
/* Density selector near the existing theme menu. */
.density-select-wrap{position:relative}
.density-menu{position:absolute;right:0;top:calc(100% + 10px);min-width:180px;padding:7px;background:var(--theme-surface);border:1px solid var(--theme-border);border-radius:12px;box-shadow:0 14px 35px var(--theme-shadow);z-index:131;display:grid;gap:3px}
.density-menu button{display:flex;align-items:center;gap:8px;justify-content:space-between;padding:10px;border:0;border-radius:8px;background:transparent;color:var(--theme-text);font:inherit;font-size:12px;cursor:pointer}
.density-menu button:hover,.density-menu button.selected{background:var(--theme-active)}
.density-menu button span{visibility:hidden;color:var(--theme-accent)}.density-menu button.selected span{visibility:visible}
@media(max-width:720px){.header-right{flex-wrap:wrap;justify-content:flex-end}.density-select-wrap .btn{padding:9px}.table-wrap{max-height:none}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition-duration:.01ms!important;animation-duration:.01ms!important}}

/* Watakat V7.5: compact KPI cards and streamlined table actions */
.metrics-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:11px;margin-bottom:13px}
.metric-card{min-height:79px!important;padding:12px 16px!important;display:flex;flex-direction:column;justify-content:center;gap:7px;cursor:pointer}
.metric-card:hover{filter:brightness(1.035)}
.metric-label{font-size:11px!important;letter-spacing:.018em;line-height:1.2}
.metric-value{font-size:28px!important;line-height:1.05}
.w-row-icon{border-radius:7px;padding:6px 8px;border:1px solid var(--theme-border,#334963);background:var(--theme-surface2,#21334a);color:var(--theme-text,#dde8fa);cursor:pointer;font-size:14px;font-weight:700;min-width:33px}
.w-row-icon:hover{filter:brightness(1.14)}
.w-budget-icon{color:#5fdbad}
.row-actions{display:flex;align-items:center;gap:5px;white-space:nowrap}
.w-export-menu{display:flex;flex-wrap:wrap;gap:8px;padding:10px;margin:0 0 9px;border:1px solid var(--theme-border,#334963);background:var(--theme-surface,#192638);border-radius:10px}
.w-export-menu.hidden{display:none}
.w-export-menu button{padding:9px 12px;border:1px solid var(--theme-border,#334963);border-radius:8px;background:var(--theme-surface2,#25354a);color:var(--theme-text,#eef4fd);cursor:pointer}
.w-cal-header{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px}
.w-cal-controls{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.w-cal-controls select{padding:8px;border:1px solid var(--theme-border,#34465c);color:var(--theme-text,#eaf1ff);background:var(--theme-surface2,#17283d);border-radius:8px}
.w-cal-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px;margin:16px 0}
.w-cal-weekday{text-align:center;font-size:12px;color:var(--theme-muted,#99a9c0);padding:7px}
.w-cal-day{display:flex;flex-direction:column;align-items:flex-start;gap:9px;min-height:68px;min-width:0;border:1px solid var(--theme-border,#30405a);border-radius:9px;padding:9px;background:var(--theme-surface2,#172438);color:var(--theme-text,#eef4ff);cursor:pointer}
.w-cal-day:not(.empty):hover,.w-cal-day.selected{border-color:#87acd9;filter:brightness(1.08)}
.w-cal-day.empty{visibility:hidden;pointer-events:none}
.w-cal-count{font-size:10px;font-weight:600;color:#efbd64;line-height:1.25}
@media(max-width:1100px){.metrics-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:660px){.metrics-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.metric-card{min-height:72px!important}.w-cal-day{padding:4px;min-height:51px}.w-cal-count{font-size:9px}.w-cal-controls{gap:5px}}

/* V7.7 — polished, consistent profile management / trash views */
.manager-modal-card{width:min(820px,calc(100vw - 32px));max-height:min(88vh,820px);overflow:auto;border-radius:22px;padding:26px}
.manager-modal-card .modal-header{padding-bottom:10px;border-bottom:1px solid var(--stroke)}
.manager-description{font-size:13px;line-height:1.65;max-width:650px;margin:14px 0 20px}
.manager-create-row{display:flex;gap:10px;align-items:end;padding:16px;border:1px solid var(--stroke);background:var(--panel-2);border-radius:15px}
.manager-create-row label{flex:1;min-width:0}
.manager-create-row input{height:42px;padding:10px 13px}
.manager-create-row .btn{min-height:42px;white-space:nowrap}
.profile-toolbar{background:transparent;padding:14px 0 8px;display:grid;grid-template-columns:minmax(0,1fr) 180px;gap:12px}
.manager-list{display:grid;gap:9px;margin-top:8px}
.manager-list-item{border:1px solid var(--stroke)!important;background:var(--panel-2);border-radius:13px;padding:13px 14px;gap:18px;min-height:72px}
.manager-list-item:last-child{border-bottom:1px solid var(--stroke)!important}
.manager-list-item .profile-info{min-width:0;display:flex;flex-direction:column;gap:5px}
.manager-list-item .profile-info strong{font-size:14px;overflow-wrap:anywhere}
.manager-list-item .profile-info small{font-size:12px;white-space:normal;line-height:1.4}
.profile-actions{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}
.profile-actions .btn{font-size:12px;padding:8px 12px;border-radius:9px}
.profile-actions .profile-delete{color:var(--danger)}
.profile-actions button:disabled{opacity:.33;cursor:not-allowed}
.profile-footnote{margin-top:16px;line-height:1.5;color:var(--muted);font-size:12px}
.w-extra .w-listrow{padding:14px 16px;margin:0 0 8px;background:var(--panel-2);border:1px solid var(--stroke);border-radius:12px;gap:16px}
.w-extra .w-listrow:last-child{border:1px solid var(--stroke)}
.w-extra .w-listrow strong{font-size:14px;font-weight:650}
.w-extra .w-listrow small{line-height:1.5;font-size:12px}
.w-extra .w-action{padding:9px 14px;border-radius:10px;white-space:nowrap}
.w-extra h2{font-size:22px;letter-spacing:-.03em;margin:0 0 8px}
.w-extra .w-section{background:transparent;border:0;padding:0;margin-top:20px}
.w-nav,.tab-btn{transition:background .16s ease,color .16s ease,border-color .16s ease}
.w-extra .trash-header{display:flex;align-items:center;gap:12px;margin-bottom:10px}
.w-extra .trash-icon{display:grid;place-items:center;height:42px;width:42px;border-radius:12px;background:var(--panel-2);color:var(--muted);font-size:20px}
@media(max-width:650px){.manager-modal-card{padding:16px}.manager-create-row{flex-direction:column;align-items:stretch}.profile-toolbar{grid-template-columns:1fr}.manager-list-item{align-items:stretch}.profile-actions{justify-content:flex-start}.w-extra .w-listrow{align-items:flex-start;flex-direction:column}}

.w-change-row{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:8px 0;border-bottom:1px solid var(--stroke);overflow-wrap:anywhere}
.w-change-row span{min-width:0;flex:1;color:var(--muted)}
.w-revert{cursor:pointer;border:1px solid var(--stroke);color:var(--text);background:var(--panel-2);border-radius:8px;padding:6px 10px;font-size:11px;white-space:nowrap}
.w-revert:hover{border-color:var(--blue)}.w-revert:disabled{opacity:.5}


/* V7.8 Night Shift: warm low-glare work theme, no browser blue-light claims. */
:root[data-theme="night"]{
 --theme-bg:#24251f;--theme-surface:#2c2d27;--theme-surface2:#32342c;
 --theme-tile:#363930;--theme-input:#282b25;--theme-border:#4a4e42;
 --theme-text:#d9d7c6;--theme-muted:#adaf9c;--theme-accent:#c2ad83;
 --theme-active:#44473a;--theme-primary:#615e48;--theme-shadow:rgba(0,0,0,.11);
 color-scheme:dark;
}
:root[data-theme="night"] .inline-status{
 background-color:color-mix(in srgb,var(--status-color) 11%,#303329)!important;
 color:color-mix(in srgb,var(--status-color) 58%,#ded9c5)!important;
 border-color:color-mix(in srgb,var(--status-color) 25%,#4b4a3b)!important;
}
:root[data-theme="night"] .metric-value.green{color:#9fc4a8!important}
:root[data-theme="night"] .metric-value.purple{color:#bbb0c7!important}
:root[data-theme="night"] .metric-value.coral{color:#c6aaba!important}
:root[data-theme="night"] .inline-date::-webkit-calendar-picker-indicator{filter:invert(.65) sepia(.24)}


/* V7.8: analytics theme isolation - remove the legacy dark backgrounds. */
.w-extra .w-grid .w-section,
.w-extra .w-section {background:transparent!important;border:0!important;color:var(--theme-text)!important;}
.w-extra .w-listrow,
.w-extra .w-section .w-listrow,
.w-extra .w-grid .w-listrow {
 background:var(--theme-tile)!important;
 border:1px solid var(--theme-border)!important;
 color:var(--theme-text)!important;
 box-shadow:none!important;
}
.w-extra .w-listrow b,.w-extra .w-listrow strong,.w-extra .w-listrow small,
.w-extra .w-section h3,.w-extra .w-card h3,.w-extra .w-card b,
.w-extra .w-listrow {color:var(--theme-text)!important;}
.w-extra .w-grid .w-card {background:var(--theme-tile)!important;border:1px solid var(--theme-border)!important;color:var(--theme-text)!important;}
.w-extra .w-card h3{color:var(--theme-muted)!important;}
.w-extra .w-muted {color:var(--theme-muted)!important;}
/* Move Trash to the far right on desktop, keep scrolling navigation on mobile. */
.w-mainnav .w-nav-trash {margin-left:auto;display:inline-flex;align-items:center;justify-content:center;gap:5px;}
@media (max-width:650px) {.w-mainnav .w-nav-trash {margin-left:12px;}}

/* V7.9 company history: theme-aware, responsive, isolated from operational records */
.w-h-header{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:16px}.w-h-header h2{margin:0}.w-h-count{font-size:12px;color:var(--theme-muted)}
.w-h-controls{display:grid;gap:10px}.w-h-years,.w-h-months{display:flex;gap:5px;flex-wrap:wrap}.w-h-months .w-action{flex:0 0 auto;min-width:42px;text-align:center}
.w-h-selected{background:var(--theme-active)!important;color:var(--theme-accent)!important;border-color:var(--theme-accent)!important}
.w-h-tools{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;margin:18px 0}.w-h-search{display:flex;align-items:center;gap:8px;flex:1;max-width:600px}.w-h-search input{flex:1;min-width:160px;border:1px solid var(--theme-border);border-radius:9px;background:var(--theme-input);color:var(--theme-text);padding:10px}
.w-h-tablewrap{overflow:auto;border:1px solid var(--theme-border);border-radius:12px;background:var(--theme-surface)}
.w-h-table{border-collapse:collapse;width:100%;min-width:930px;font-size:12px}.w-h-table th{text-align:left;font-weight:650;padding:11px 13px;background:var(--theme-surface2);color:var(--theme-muted)}.w-h-table td{padding:12px 13px;border-top:1px solid var(--theme-border);color:var(--theme-text);vertical-align:middle}
.w-history-name{border:0;background:transparent;color:var(--theme-text);font:inherit;font-weight:650;cursor:pointer;text-align:left}.w-history-name:hover{color:var(--theme-accent)}.w-h-reason{max-width:190px;display:inline-block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;vertical-align:middle}
.w-h-paging{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:15px 0;color:var(--theme-muted);font-size:12px}.w-h-paging div{display:flex;gap:8px}.w-h-error{border:1px solid #aa6a53;border-radius:9px;padding:12px;margin:12px 0;color:var(--theme-text)}
.w-h-overlay{position:fixed;inset:0;background:rgba(0,0,0,.48);z-index:150;display:flex;justify-content:flex-end}.w-h-detail{position:relative;width:min(540px,95vw);height:100%;overflow:auto;padding:34px;background:var(--theme-surface);border-left:1px solid var(--theme-border);color:var(--theme-text);box-shadow:0 10px 40px var(--theme-shadow)}.w-h-close{position:absolute;right:18px;top:18px}.w-h-detail h2{margin-top:12px}.w-h-detail dl{display:grid;grid-template-columns:145px 1fr;gap:18px 12px;margin-top:28px}.w-h-detail dt{color:var(--theme-muted);font-size:12px}.w-h-detail dd{margin:0;overflow-wrap:anywhere}
.w-history-comparison{display:flex;gap:12px;flex-wrap:wrap}.w-history-comparison>div{padding:12px 16px;background:var(--theme-tile);border:1px solid var(--theme-border);border-radius:10px;color:var(--theme-text)}
.prev-summary{display:none!important}
@media(max-width:760px){.w-h-header{align-items:flex-start}.w-h-months{flex-wrap:nowrap;overflow:auto;padding-bottom:5px}.w-h-tools{align-items:stretch}.w-h-search{width:100%;max-width:none}.w-h-detail{padding:22px}.w-h-detail dl{grid-template-columns:1fr;gap:5px}.w-h-detail dd{margin-bottom:12px}}

/* Watakat CRM V8 — daily workflow */
.w-mainnav .w-nav-archive{margin-left:auto}
.w-mainnav .w-nav-trash{margin-left:0}
.w-month-right{display:flex;align-items:center;justify-content:flex-end;gap:16px;flex-wrap:wrap}
.w-new-project{white-space:nowrap;font-weight:750}
.w-launch-alert{margin:0 0 12px}
.w-launch-jump{width:100%;display:flex;gap:13px;align-items:center;text-align:left;padding:12px 16px;cursor:pointer;border:1px solid var(--theme-border);background:var(--theme-surface2);border-radius:12px;color:var(--theme-text);font:inherit}
.w-launch-jump:hover{filter:brightness(1.08)}
.w-launch-jump strong{display:block;font-size:14px}
.w-launch-jump small{display:block;font-size:12px;opacity:.78;margin-top:3px}
.w-launch-rocket{font-size:20px}
.w-launch-chevron{margin-left:auto;font-size:12px;opacity:.84}
@media(max-width:720px){.w-mainnav .w-nav-archive{margin-left:0}.w-month-right{width:100%;justify-content:space-between}.w-new-project{width:auto}}

.w-field-hint{display:block;grid-column:1/-1;color:var(--theme-muted);font-size:12px;margin:-5px 0 5px}.table-message{overflow-wrap:anywhere}

/* Watakat 8.1: shared theme tokens for ALL dialogs and file cards */
.manager-create-row,.manager-list-item,.w-material-folder,.w-section,.w-card,.w-drawer-panel,.w-reminder-panel,.w-reminder-toast {
  background:var(--theme-surface2,var(--panel-2))!important;
  color:var(--theme-text,var(--text))!important;
  border-color:var(--theme-border,var(--stroke))!important;
}
.manager-create-row input,.manager-create-row select,.w-form input,.w-form select,.w-form textarea{
  background:var(--theme-input,var(--input))!important;
  color:var(--theme-text,var(--text))!important;
  border-color:var(--theme-border,var(--stroke))!important;
}
.manager-list-item strong,.manager-list-item .profile-info strong,.w-section h3,.w-listrow strong,.w-drawer-head h2,.w-material-folder h4{
  color:var(--theme-text,var(--text))!important;
}
.manager-list-item small,.w-listrow small,.w-section p,.w-form label,.w-drawer-head small{
  color:var(--theme-muted,var(--muted))!important;
}
.manager-list-item button,.w-section button.w-action{
  background:var(--theme-tile,var(--panel-2))!important;
  color:var(--theme-text,var(--text))!important;
  border-color:var(--theme-border,var(--stroke))!important;
}
.manager-modal-card,.modal-card{max-height:min(90dvh,900px)!important;overflow-y:auto!important;overscroll-behavior:contain;}
.manager-modal-card .modal-header,.modal-card .modal-header{position:sticky;top:0;z-index:10;background:var(--theme-surface,var(--panel));padding-block:10px;border-bottom:1px solid var(--theme-border,var(--stroke));}
.w-advanced-fields>.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;}
.w-advanced-toggle{margin:2px 0 4px;}
.w-material-folder{padding:12px;border-radius:12px;margin:10px 0;border:1px solid var(--theme-border,var(--stroke));}
.w-material-folder h4{margin:0 0 8px;}
.w-material-actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end;}
.w-material-actions button{font-size:11px;padding:7px 8px;}
.w-reminder-panel{position:fixed;right:20px;top:75px;width:min(430px,calc(100vw - 36px));max-height:75dvh;overflow:auto;z-index:170;border:1px solid var(--theme-border,var(--stroke));border-radius:14px;padding:16px;box-shadow:0 15px 40px #0005;}
.w-reminder-panel h3{margin:0 0 12px;}
.w-reminder-panel label{display:flex;gap:7px;align-items:center;margin:12px 0;}
.w-reminder-toast{position:fixed;right:20px;bottom:20px;z-index:180;max-width:365px;padding:14px;border:1px solid var(--theme-border,var(--stroke));border-radius:12px;box-shadow:0 12px 30px #0005;}
.w-reminder-toast p{margin:9px 0;color:var(--theme-text,var(--text));}
.w-reminder-toast button{margin-right:6px;}
@media(max-width:650px){.w-advanced-fields>.form-grid{grid-template-columns:1fr}.w-material-actions{justify-content:flex-start}.w-material-folder .w-listrow{flex-direction:column;align-items:flex-start}}
/* Analytics dashboards — theme-aware and responsive */
.w-analytics-head{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin:0 0 20px}
.w-analytics-head h2{margin:0}.w-analytics-head .w-muted{margin:5px 0}
.w-analytics-tabs{display:flex;gap:4px;padding:4px;border:1px solid var(--theme-border);background:var(--theme-surface);border-radius:12px}
.w-analytics-tabs button{border:0;border-radius:9px;padding:10px 17px;background:transparent;color:var(--theme-text);font-weight:650;cursor:pointer}
.w-analytics-tabs button.active{background:var(--theme-primary);color:#fff}
.w-analytics-statgrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px;margin:14px 0 24px}
.w-analytics-stat,.w-analytics-panel{background:var(--theme-surface);border:1px solid var(--theme-border);border-radius:14px;padding:18px;color:var(--theme-text)}
.w-analytics-stat{min-height:106px}.w-analytics-stat span,.w-analytics-stat small{display:block;color:var(--theme-muted);font-size:12px;line-height:1.5}.w-analytics-stat b{display:block;margin:5px 0;font-size:26px;letter-spacing:-.03em}
.w-analytics-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:14px 0}
.w-analytics-panel{overflow:hidden;margin:14px 0}.w-analytics-panel h3{margin:0 0 14px;font-size:15px}
.w-analytics-bars{display:flex;align-items:end;gap:5px;min-height:195px;padding:6px 0 0;overflow-x:auto}
.w-analytics-barcol{display:flex;align-items:center;flex-direction:column;gap:6px;flex:1 0 24px;min-width:24px;max-width:100px;height:190px;font-size:10px;color:var(--theme-muted)}
.w-analytics-barcol>span{font-variant-numeric:tabular-nums}.w-analytics-barcol small{font-size:10px;white-space:nowrap}
.w-analytics-bartrack{height:147px;width:100%;display:flex;align-items:flex-end;border-radius:6px;overflow:hidden}
.w-analytics-bar{width:100%;background:var(--theme-primary);opacity:.74;border-radius:5px 5px 0 0;min-height:0}
.w-analytics-line{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--theme-border);padding:10px 0;gap:12px}
.w-analytics-help{font-size:12px;color:var(--theme-muted);line-height:1.55;margin:14px 0 0}
.w-analytics-year select{margin-left:8px;padding:8px 12px;border:1px solid var(--theme-border);border-radius:9px;color:var(--theme-text);background:var(--theme-surface)}
.w-analytics-tablewrap{overflow-x:auto}.w-analytics-table{width:100%;border-collapse:collapse;min-width:760px;font-size:12px}.w-analytics-table th,.w-analytics-table td{padding:10px 9px;text-align:left;border-bottom:1px solid var(--theme-border);color:var(--theme-text)}.w-analytics-table th{color:var(--theme-muted)}
@media(max-width:760px){.w-analytics-grid{grid-template-columns:1fr}.w-analytics-head{align-items:stretch}.w-analytics-tabs{width:100%}.w-analytics-tabs button{flex:1}}


/* Watakat V8.2: creative gallery */
.w-material-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:16px}
.w-material-toolbar h3{margin:0}
.w-material-view-toggle{display:flex;gap:3px;padding:3px;border:1px solid var(--theme-border,var(--stroke));border-radius:10px}
.w-material-view-toggle button{border:0;background:transparent;color:var(--theme-text,var(--text));border-radius:7px;padding:7px 10px;cursor:pointer;font:inherit;font-size:12px}
.w-material-view-toggle button.active{background:var(--theme-tile,var(--panel-2));box-shadow:inset 0 0 0 1px var(--theme-border,var(--stroke));font-weight:700}
.w-material-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(155px,1fr));gap:12px}
.w-material-tile{min-width:0;border:1px solid var(--theme-border,var(--stroke));border-radius:12px;overflow:hidden;background:var(--theme-surface2,var(--panel-2));color:var(--theme-text,var(--text))}
.w-material-thumb{display:flex;align-items:center;justify-content:center;position:relative;width:100%;height:176px;padding:0;border:0;background:var(--theme-tile,var(--panel-2));overflow:hidden;cursor:zoom-in}
.w-material-thumb img,.w-material-thumb video{width:100%;height:100%;object-fit:contain;position:absolute;inset:0;background:transparent}
.w-material-placeholder{font-size:33px;opacity:.45;color:var(--theme-text,var(--text))}
.w-video-label{position:absolute;bottom:9px;left:9px;padding:4px 7px;border-radius:6px;background:rgba(0,0,0,.7);color:white;font-size:11px;font-weight:650;pointer-events:none}
.w-material-tile-details{padding:9px 10px;min-width:0}
.w-material-tile-details strong{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;font-size:12px;color:var(--theme-text,var(--text))}
.w-material-tile-details small{display:block;margin-top:5px;color:var(--theme-muted,var(--muted));font-size:11px}
.w-material-tile-actions{display:flex;justify-content:flex-end;gap:5px;margin-top:9px}
.w-material-tile-actions button{background:var(--theme-tile,var(--panel-2));color:var(--theme-text,var(--text));border:1px solid var(--theme-border,var(--stroke));border-radius:7px;cursor:pointer;padding:5px 10px;font-size:16px}
.w-material-tile-actions button:hover,.w-material-view-toggle button:hover{filter:brightness(1.08)}
.w-material-viewer{position:fixed;inset:0;z-index:500;background:rgba(4,7,13,.96);color:#f5f7fb;display:flex;flex-direction:column}
.w-material-viewer-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 22px;border-bottom:1px solid #3b4251}
.w-material-viewer-head strong{display:block;font-size:15px;overflow-wrap:anywhere}
.w-material-viewer-head small{display:block;color:#9da9bc;margin-top:3px}
.w-material-viewer-head>div:last-child{display:flex;gap:10px;flex-shrink:0}
.w-material-viewer button{background:#1b2637;color:white;border:1px solid #455268;border-radius:8px;padding:9px 12px;cursor:pointer}
.w-material-viewer button:disabled{opacity:.2;cursor:default}
.w-material-viewer-main{display:flex;align-items:center;justify-content:space-between;flex:1;min-height:0;gap:8px;padding:10px}
.w-material-viewer-main>button{font-size:30px}
.w-material-viewer-stage{display:flex;align-items:center;justify-content:center;flex:1;height:100%;min-width:0;min-height:0;text-align:center}
.w-material-viewer-stage img,.w-material-viewer-stage video{max-width:100%;max-height:100%;object-fit:contain}
@media(max-width:650px){.w-material-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.w-material-thumb{height:145px}.w-material-viewer-head{padding:10px}.w-material-viewer-main{gap:3px;padding:4px}.w-material-viewer-main>button{padding:5px}}

/* V8.3: high-visibility reminder modal */
.w-reminder-overlay{position:fixed;inset:0;z-index:99999;display:flex;align-items:center;justify-content:center;padding:20px;background:rgba(8,13,24,.68);-webkit-backdrop-filter:blur(9px);backdrop-filter:blur(9px)}
.w-reminder-overlay.hidden{display:none!important}
.w-reminder-dialog{width:min(520px,100%);max-height:calc(100dvh - 40px);overflow-y:auto;padding:32px 28px;text-align:center;border-radius:20px;background:var(--theme-surface,var(--panel,#fff));color:var(--theme-text,var(--text,#17202c));border:1px solid var(--theme-border,var(--stroke,#ddd));box-shadow:0 32px 90px rgba(0,0,0,.45)}
.w-reminder-symbol{font-size:38px;margin-bottom:8px}
.w-reminder-dialog h2{margin:0 0 18px;font-size:25px;color:inherit}
.w-reminder-task{font-size:21px;font-weight:750;overflow-wrap:anywhere;line-height:1.4;margin:12px 0}
.w-reminder-dialog .w-muted{color:var(--theme-muted,var(--muted,#64748b));font-size:13px}
.w-reminder-dialog-actions{display:flex;justify-content:center;gap:10px;flex-wrap:wrap;margin-top:25px}
.w-reminder-dialog-actions .btn{padding:13px 17px;font-size:14px}
#wReminderAudioNote{margin:16px 0 0}
#wSoundStatus{font-size:12px;margin-left:8px}
@media(max-width:520px){.w-reminder-dialog{padding:22px 16px}.w-reminder-dialog-actions .btn{width:100%}}

/* V8.4: sound preferences in reminder menu */
.w-sound-settings{border-top:1px solid var(--theme-border,var(--stroke));margin-top:16px;padding-top:14px;display:flex;flex-direction:column;gap:9px}
.w-sound-settings h4{margin:0 0 2px;font-size:15px;color:var(--theme-text,var(--text))}
.w-sound-settings .w-sound-enabled{margin:0 0 5px}
.w-sound-settings label{margin:0;font-size:13px;color:var(--theme-text,var(--text))}
.w-sound-settings select{width:100%;min-height:39px;padding:8px;border-radius:9px;background:var(--theme-surface,var(--panel));color:var(--theme-text,var(--text));border:1px solid var(--theme-border,var(--stroke))}
.w-sound-volume-head{display:flex;justify-content:space-between;align-items:center;margin-top:5px}
.w-sound-volume-head output{font-variant-numeric:tabular-nums;color:var(--theme-text,var(--text));font-size:13px;font-weight:650}
#wSoundVolume{width:100%;accent-color:var(--theme-accent,#478b8d);cursor:pointer}
.w-sound-controls{display:flex;gap:9px;align-items:center;flex-wrap:wrap}
#wSoundStatus{margin-left:0;line-height:1.4}
.w-sound-settings .w-sound-help{font-size:11px;margin:2px 0 0;line-height:1.45}

/* V8.5: readable notes and clear controls in all themes */
.w-note-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px;flex-wrap:wrap}
.w-note-actions{display:flex;gap:6px;flex-wrap:wrap}
.w-note-body{white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px;line-height:1.6}
.w-note-editor{box-sizing:border-box;width:100%;padding:12px;border-radius:9px;border:1px solid var(--border,#889);background:var(--input-bg,var(--surface,#fff));color:var(--text,#24383a);font:inherit}
.w-note-row{padding:14px 0}

/* V8.5: organized navigation and material storage */
.w-nav-more{position:relative;display:inline-flex}
.w-nav-more-menu{position:absolute;top:calc(100% + 7px);left:0;z-index:240;min-width:230px;padding:9px;display:flex;flex-direction:column;gap:3px;background:var(--theme-surface,var(--panel));border:1px solid var(--theme-border,var(--stroke));border-radius:14px;box-shadow:0 17px 40px rgba(0,0,0,.18)}
.w-nav-more-menu.hidden,#wSoundMenu.hidden{display:none!important}
.w-nav-more-menu .w-nav{width:100%;text-align:left;justify-content:flex-start}
.w-nav-group-title{padding:10px 11px 5px;font-size:11px;font-weight:750;text-transform:uppercase;letter-spacing:.07em;color:var(--theme-muted,var(--muted))}
.w-storage-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:16px 0}
.w-storage-summary>div{padding:20px;border-radius:14px;background:var(--theme-tile,var(--panel-2));border:1px solid var(--theme-border,var(--stroke));display:flex;flex-direction:column;gap:9px}
.w-storage-summary span{font-size:13px;color:var(--theme-muted,var(--muted))}.w-storage-summary b{font-size:26px}
.w-storage-summary select{padding:8px;border-radius:8px;background:var(--theme-surface,var(--panel));color:var(--theme-text,var(--text));border:1px solid var(--theme-border,var(--stroke))}
.w-storage-bar{height:12px;border-radius:20px;background:var(--theme-tile,var(--panel-2));overflow:hidden}.w-storage-bar>div{height:100%;background:var(--theme-accent,#478b8d)}
.w-storage-disclaimer{font-size:12px;margin:10px 0 20px}.w-storage-projects .w-listrow{margin:7px 0}
.w-reminder-panel-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.w-reminder-panel-head h3{margin:0}
.w-quick-dialog{text-align:left}.w-quick-dialog .w-form{display:flex;flex-direction:column;gap:12px}.w-quick-dialog .w-form label{display:flex;flex-direction:column;gap:7px}.w-quick-dialog .w-form textarea,.w-quick-dialog .w-form input,.w-quick-dialog .w-form select{width:100%;box-sizing:border-box;background:var(--theme-surface,var(--panel));color:var(--theme-text,var(--text));border:1px solid var(--theme-border,var(--stroke));padding:12px;border-radius:9px}
.w-quick-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}.w-quick-head h2{margin:0}
@media(max-width:650px){.w-storage-summary{grid-template-columns:1fr}.w-nav-more-menu{left:auto;right:0}.w-mainnav{flex-wrap:wrap}}

/* V8.6 — compact, accessible quick reminder time selection */
.w-reminder-time-picker{display:flex;flex-direction:column;gap:10px}
.w-quick-label{font-size:14px;font-weight:650}
.w-remind-tabs,.w-time-unit{display:flex;gap:4px;padding:4px;background:var(--theme-tile,var(--panel-2));border:1px solid var(--theme-border,var(--stroke));border-radius:11px}
.w-remind-tabs button,.w-time-unit button{flex:1;border:0;background:transparent;color:var(--theme-muted,var(--muted));padding:10px;border-radius:8px;font:inherit;font-size:13px;cursor:pointer}
.w-remind-tabs button.active,.w-time-unit button.active{background:var(--theme-surface,var(--panel));color:var(--theme-text,var(--text));box-shadow:0 1px 5px rgba(0,0,0,.10);font-weight:700}
.w-time-relative{padding:14px;background:var(--theme-tile,var(--panel-2));border-radius:12px;display:grid;gap:12px}
.w-time-big{text-align:center;font-size:23px;font-weight:750;line-height:1.3}
#wTimeRange{width:100%;accent-color:var(--theme-accent,#478b8d);cursor:pointer}
.w-time-range-scale{display:flex;justify-content:space-between;font-size:11px;color:var(--theme-muted,var(--muted))}
.w-time-presets{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:5px}
.w-time-presets button{padding:9px 3px;border:1px solid var(--theme-border,var(--stroke));border-radius:8px;background:var(--theme-surface,var(--panel));color:var(--theme-text,var(--text));font:inherit;font-size:12px;cursor:pointer}
.w-time-presets button.active{border-color:var(--theme-accent,#478b8d);background:var(--theme-accent,#478b8d);color:white}
.w-time-absolute{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.w-time-absolute.hidden,.w-time-relative.hidden{display:none!important}
.w-time-result{margin:0;padding:10px;border-radius:9px;background:var(--theme-tile,var(--panel-2));font-size:13px;font-weight:600;color:var(--theme-text,var(--text))}
.w-account-wrap{position:relative}
.w-account-menu{position:absolute;right:0;top:calc(100% + 8px);width:250px;max-width:calc(100vw - 20px);z-index:500;border-radius:13px;padding:12px;background:var(--theme-surface,var(--panel));color:var(--theme-text,var(--text));border:1px solid var(--theme-border,var(--stroke));box-shadow:0 14px 36px rgba(0,0,0,.20)}
.w-account-menu.hidden{display:none!important}
.w-account-label{font-size:11px;color:var(--theme-muted,var(--muted));margin-bottom:6px}
#wAccountEmail{display:block;font-size:12px;overflow-wrap:anywhere}
.w-account-divider{height:1px;background:var(--theme-border,var(--stroke));margin:12px 0 8px}
.w-account-menu button{display:block;width:100%;text-align:left;border:0;background:none;color:inherit;padding:10px;font:inherit;font-size:13px;border-radius:8px;cursor:pointer}
.w-account-menu button:hover{background:var(--theme-tile,var(--panel-2))}
@media(max-width:520px){.w-time-presets{grid-template-columns:repeat(3,1fr)}.w-time-absolute{grid-template-columns:1fr}}

/* V11.9: compact, secondary storage indication in materials hub */
.w-materials-top{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 0 18px;flex-wrap:wrap}
.w-materials-top h2{margin:0}
.w-materials-usage{display:inline-flex;align-items:center;gap:7px;font-size:12px;color:var(--theme-muted,var(--muted));border:1px solid var(--theme-border,var(--stroke));border-radius:999px;padding:6px 10px;background:var(--theme-tile,var(--panel-2));white-space:nowrap}
.w-materials-usage strong{font-size:13px;color:var(--theme-text,var(--text));font-weight:650}
.w-materials-info{opacity:.65;cursor:help}
@media(max-width:650px){.w-materials-top{align-items:flex-start}.w-materials-usage{font-size:11px}}
