/* Kopano OS v1.24.28 — signed-in ERP appearance themes.
 * Intentionally scoped to the workspace: the public marketing site, login,
 * customer authentication and all printable financial documents stay light.
 */
@media screen {
html[data-kopano-theme="dark"]:has(.app-shell) { color-scheme: dark; }
html[data-kopano-theme="dark"] body:has(.app-shell) {
  background: #0b1220 !important; color: #e5edf9 !important;
}
html[data-kopano-theme="dark"] .app-shell {
  --ink:#e5edf9; --muted:#9db0ca; --line:#303f57; --soft:#172439;
  --card:#19263b; --brand:#7eb9ff; --brand-2:#4895ff;
  --surface:#162238; --surface-soft:#1b2b43; --surface-muted:#233550;
  --shadow:0 18px 45px rgba(0,0,0,.27);
  --shadow-sm:0 10px 25px rgba(0,0,0,.21);
  background:#0b1220 !important;color:var(--ink);
}
html[data-kopano-theme="dark"] .app-shell .main {background:#0d1626 !important;color:#e5edf9;}
html[data-kopano-theme="dark"] .app-shell .sidebar {background:#091322 !important;border-right:1px solid #253751;}
html[data-kopano-theme="dark"] .app-shell .org-switch {background:#142238 !important;border-color:#293b54 !important;}
html[data-kopano-theme="dark"] .app-shell .app-title :is(h1,p) {color:#e6edf8 !important;}
html[data-kopano-theme="dark"] .app-shell :is(.muted,.small.muted,.form-hint,.record-result-meta,.record-pagination,.help-text,.subtle,.text-muted) {color:#a6b7d0 !important;}
html[data-kopano-theme="dark"] .app-shell :is(.eyebrow,.chip) {background:#203858 !important;color:#aed0ff !important;border-color:#354d70 !important;}
html[data-kopano-theme="dark"] .app-shell :is(.btn-soft,.btn-ghost,.btn-secondary) {background:#263a55 !important;border-color:#3a5474 !important;color:#dcecff !important;}
html[data-kopano-theme="dark"] .app-shell :is(.btn-soft,.btn-ghost,.btn-secondary):hover {background:#304764 !important;}

/* Structural surfaces — core modules and premium industry workspaces. */
html[data-kopano-theme="dark"] .app-shell :is(
  .panel-card,.stat-card,.module-card,.feature-card,.guide-card,.pricing-card,
  .workspace-suite,.workspace-panel,.workspace-panel-content,.workspace-card,.workspace-section,
  .record-workspace,.data-workspace,.record-card,.record-card-item,.record-row,.record-table-view,
  .module-action-bar,.module-kpi-card,.module-kpi-strip,.mini-card,.activity-item,.flow-card,
  .app-card,.content-card,.detail-card,.info-card,.metrics-card,.summary-card,.report-card,
  .report-kpi-card,.report-command-panel,.form-card,.mini-form-card,.finance-record-panel,
  .finance-kpi-card,.finance-summary-card,.accounting-card,.accounting-kpi-card,
  .banking-card,.budget-card,.planning-card,.hr-card,.hr-overview-card,.hr-summary-card,
  .hr-panel,.payroll-card,.payroll-panel,.people-hero,.hr-hero,
  .law-panel,.law-hero,.law-detail-hero,.law-retainer-box,.law-finance-kpis>div,
  .law-billing-table-wrap,.law-matter-tab-panels>.law-panel,
  .project-card,.project-profile-shell,.project-summary-card,.project-task-card,
  .fm-shell,.fm-card,.fm-sidebar,.fm-panel,.fm-item,.fm-tile,.fm-file-card,
  .notes-shell,.notes-panel,.notes-list,.notes-editor,.notes-sidebar,
  .calendar-shell,.calendar-panel,.calendar-card,.calendar-month,.calendar-day,
  .portal-adm-workspace,.portal-ops-hero,.portal-admin-metrics article,
  .report-grid>article,.form-section,.settings-card,.setting-card,.profile-card
) {
 background:#182539 !important;color:#e7edf7 !important;border-color:#31435e !important;
 box-shadow:0 10px 30px rgba(0,0,0,.12) !important;
}
html[data-kopano-theme="dark"] .app-shell :is(
  .record-toolbar,.workspace-tabs,.workspace-tab-list,.record-view,
  .record-card-grid,.table-shell,.table-wrap,.table-responsive,
  .module-toolbar,.form-split,.filter-bar,.searchbar,.auto-save-bar,
  .finance-workspace,.accounting-workspace,.report-card-body,
  .fm-toolbar,.fm-sidebar-main,.fm-activity-scroll,.notes-toolbar,
  .law-matter-tabs,.law-conflict-box,.portal-premium-admin .portal-adm-workspace>.workspace-tabs
) {background-color:#182539 !important;border-color:#31435e !important;color:#dde8f7 !important;}
html[data-kopano-theme="dark"] .app-shell :is(.report-command-panel,.people-hero,.hr-hero,.portal-ops-hero,.law-hero,.law-detail-hero) {background-image:linear-gradient(125deg,#203553,#152136) !important;}
html[data-kopano-theme="dark"] .app-shell :is(.law-panel,.record-card,.panel-card,.workspace-panel) :is(h1,h2,h3,h4,h5,strong) {color:#eaf1fb !important;}
html[data-kopano-theme="dark"] .app-shell .portal-premium-admin :is(h1,h2,h3,h4,th,strong) {color:#eaf1fb !important;}
html[data-kopano-theme="dark"] .app-shell :is(.law-panel-heading p,.law-detail-hero p,.portal-ops-hero-copy p,.portal-panel-top p,.record-card small) {color:#a3b7d2 !important;}
html[data-kopano-theme="dark"] .app-shell .law-matter-tabs :is(a,.law-tab-count) {color:#bfd0e9 !important;background:#1b2c45 !important;border-color:#31445f !important;}
html[data-kopano-theme="dark"] .app-shell .law-matter-tabs a.is-active {background:#28507b !important;color:#fff !important;border-color:#4f85bf !important;}

/* Tables, records and activity trails. */
html[data-kopano-theme="dark"] .app-shell :is(table,.premium-record-table,.law-billing-table,.calendar-agenda-table,.fm-activity-table,.portal-data-table) {
 background:#182539 !important;color:#dfeaf9 !important;border-color:#31435e !important;
}
html[data-kopano-theme="dark"] .app-shell :is(thead,tr,th,td) {border-color:#34435b !important;}
html[data-kopano-theme="dark"] .app-shell table thead,html[data-kopano-theme="dark"] .app-shell table th {
 background:#233551 !important;color:#bdcfe6 !important;
}
html[data-kopano-theme="dark"] .app-shell table td {background:#182539 !important;color:#dce8f8 !important;}
html[data-kopano-theme="dark"] .app-shell table tbody tr:hover td {background:#253751 !important;}
html[data-kopano-theme="dark"] .app-shell :is(.record-table-view,.record-table-body,.table-like,.record-card-grid) {color:#e6edf8 !important;}
html[data-kopano-theme="dark"] .app-shell :is(.record-card,.activity-item,.record-row,.fm-existing-person,.fm-colleague,.notes-list-item,.calendar-agenda-item,.timeline-item,.detail-list>div) {
 background:#1b2c43 !important;border-color:#344962 !important;color:#e5edf9 !important;
}
html[data-kopano-theme="dark"] .app-shell :is(.record-card,.activity-item,.record-row,.fm-existing-person,.notes-list-item) :is(strong,small,span) {color:inherit;}
html[data-kopano-theme="dark"] .app-shell :is(.record-pagination button,.view-switch button,.workspace-tab,.record-tab,.filter-pill,.segment-btn,.tab-button) {
 background:#20314a !important;color:#c6d7ed !important;border-color:#354966 !important;
}
html[data-kopano-theme="dark"] .app-shell :is(.view-switch button.active,.workspace-tab.active,.workspace-tab[aria-selected="true"],.record-tab.active,.filter-pill.active,.segment-btn.active) {
 background:#275484 !important;color:#fff !important;border-color:#568bd2 !important;
}

/* Inputs, dialogs and search. */
html[data-kopano-theme="dark"] :is(.app-shell,.kopano-modal,.law-dialog,.calendar-modal,.portal-dialog) :is(
  input:not([type="checkbox"]):not([type="radio"]),select,textarea,.input,.searchbar input,.searchable-select-trigger,
  .record-search-field,.record-search-field input,.search-field,.searchable-select .select-trigger
) {
 background:#111f32 !important;border-color:#3b4f6d !important;color:#edf4ff !important;
 caret-color:#91c0ff;
}
html[data-kopano-theme="dark"] :is(.app-shell,.kopano-modal,.law-dialog,.calendar-modal,.portal-dialog) :is(input,textarea)::placeholder {color:#8da3c1 !important;opacity:1;}
html[data-kopano-theme="dark"] :is(.app-shell,.kopano-modal,.law-dialog,.calendar-modal) :is(input,select,textarea):focus-visible {
 border-color:#79adf5 !important;outline:2px solid #467cbe;outline-offset:1px;
}
html[data-kopano-theme="dark"] :is(.app-shell,.kopano-modal,.law-dialog,.calendar-modal,.portal-dialog) select option {background:#17263b;color:#e8f1ff;}
html[data-kopano-theme="dark"] :is(.app-shell,.kopano-modal,.law-dialog,.calendar-modal,.portal-dialog) label {color:#cad9ed !important;}
html[data-kopano-theme="dark"] :is(.kopano-modal .modal-panel,.kopano-modal .modal-header,.law-dialog,.calendar-modal,.portal-dialog-panel,
  .calendar-preview,.fm-modal,.fm-activity-modal,dialog.fm-dialog,dialog.law-dialog) {
 background:#17253a !important;color:#e8f0fc !important;border-color:#354860 !important;
}
html[data-kopano-theme="dark"] :is(.kopano-modal,.law-dialog,.calendar-modal,.calendar-preview,.fm-modal,.portal-dialog) :is(h2,h3,h4,strong,small,p) {color:#e5edf9 !important;}
html[data-kopano-theme="dark"] :is(.kopano-modal,.law-dialog,.calendar-modal,.calendar-preview,.fm-modal,.portal-dialog) :is(.form-split,.modal-header,.modal-actions,.calendar-modal-header,.calendar-modal-actions,.calendar-preview-detail,.fm-modal-top,.fm-activity-scroll) {
 background:#1b2b43 !important;color:#c8d9ee !important;border-color:#354963 !important;
}
html[data-kopano-theme="dark"] :is(.kopano-modal,.law-dialog,.calendar-modal,.calendar-preview,.fm-modal,.portal-dialog) :is(button:not(.btn-primary):not(.btn-danger),.modal-close,.calendar-icon-close) {
 background:#273951 !important;color:#d4e4f9 !important;border-color:#3d5674 !important;
}
html[data-kopano-theme="dark"] .calendar-modal form .form-row {color:#cadaed !important;}
html[data-kopano-theme="dark"] .calendar-modal form .form-row :is(input,select,textarea) {background:#101d30 !important;color:#e9f2ff !important;border-color:#39516f !important;}
html[data-kopano-theme="dark"] .calendar-preview-detail {color:#c8d9ed !important;}

/* Calendar grids, Notes, Finder, menus and popovers. */
html[data-kopano-theme="dark"] .app-shell :is(.calendar-day,.calendar-grid>div,.calendar-agenda-item,.calendar-weekday,.calendar-day-number,.calendar-toolbar,.calendar-agenda,.calendar-month-grid) {
 background:#1b2b43 !important;border-color:#324861 !important;color:#e4edf9 !important;
}
html[data-kopano-theme="dark"] .app-shell :is(.calendar-day:hover,.calendar-day.is-today,.calendar-day.today,.calendar-day.active) {background:#284360 !important;}
html[data-kopano-theme="dark"] .app-shell .calendar-day-add {background:#2a4667 !important;border-color:#4d6f9b !important;color:#cce1ff !important;}
html[data-kopano-theme="dark"] .app-shell :is(.notes-editor,.notes-list,.notes-sidebar,.notes-content,.notes-editor-panel,.fm-item,.fm-card,.fm-file-card,.fm-tile,.fm-preview,.fm-sidebar,.fm-toolbar,.fm-breadcrumbs) {
 background:#18283e !important;color:#e5edf9 !important;border-color:#354861 !important;
}
html[data-kopano-theme="dark"] .app-shell :is([contenteditable="true"],.notes-editor [contenteditable],.editor-content,.ql-editor) {color:#e9f2ff !important;background:#17273b !important;}
html[data-kopano-theme="dark"] :is(.app-shell,.fm-modal,.fm-dialog,.law-dialog) :is(.fm-actions-menu,.fm-context-menu,.record-action-popover,.record-actions-menu,.searchable-select-menu,.searchable-options,.dropdown-menu,.menu-popover,.popover-panel) {
 background:#192a40 !important;color:#e6eefb !important;border-color:#405676 !important;
}
html[data-kopano-theme="dark"] :is(.app-shell,.fm-modal,.fm-dialog,.law-dialog) :is(.fm-actions-menu,.fm-context-menu,.record-action-popover,.record-actions-menu,.searchable-select-menu,.dropdown-menu) :is(a,button) {color:#dce9fa !important;}
html[data-kopano-theme="dark"] .app-shell :is(.header-tool-link,.notification-bell-trigger,.account-menu-trigger.user-chip) {
 background:#1b2b43 !important;border-color:#364c6b !important;color:#e1edfc !important;
}
html[data-kopano-theme="dark"] .app-shell :is(.notification-bell-panel,.account-menu-panel,.notification-bell-heading,.account-menu-heading,.account-menu-footer) {
 background:#1b2b43 !important;color:#e5edf9 !important;border-color:#3a4f69 !important;
}
html[data-kopano-theme="dark"] .app-shell :is(.account-menu-links a,.account-menu-footer a,.account-menu-heading strong,.notification-bell-item,.notification-bell-copy strong) {color:#dce9f7 !important;}
html[data-kopano-theme="dark"] .app-shell :is(.account-menu-links a:hover,.notification-bell-item:hover) {background:#29415e !important;}
html[data-kopano-theme="dark"] .app-shell :is(.account-menu-heading span,.notification-bell-copy span,.notification-bell-copy small) {color:#a5b7cf !important;}
html[data-kopano-theme="dark"] .app-shell :is(.notification-bell-panel,.account-menu-panel) svg {stroke:#a5c7f6 !important;}
html[data-kopano-theme="dark"] .app-shell .portal-premium-admin :is(.portal-admin-metrics article,.portal-adm-workspace,.portal-ops-hero,.workspace-panel,.portal-data-table td,.portal-data-table th) {
 background:#19273b !important;border-color:#354962 !important;color:#e5edf9 !important;
}

/* Keep document PDFs, invoices, receipts and print-preview pages white/legible. */
html[data-kopano-theme="dark"] :is(.app-shell,.kopano-modal) :is(.invoice-document,.sales-document,.purchase-order-document,.payslip-document,.accounting-statement,.accounting-ledger-document,.accounting-journal-document,.planning-document,.finance-invoice-document) {
 color-scheme:light;background:#fff !important;color:#172b42 !important;
}
html[data-kopano-theme="dark"] :is(.app-shell,.kopano-modal) :is(.invoice-document,.sales-document,.purchase-order-document,.payslip-document,.accounting-statement,.accounting-ledger-document,.accounting-journal-document,.planning-document,.finance-invoice-document) :is(table,thead,tr,th,td) {
 background:#fff !important;color:#172b42 !important;border-color:#d8e0e8 !important;
}
}

/* User menu appearance control: unobtrusive and usable with keyboard/touch. */
.account-appearance-group{padding:12px 12px 14px;border-top:1px solid #edf1f6;display:grid;gap:10px}
.account-appearance-header{display:flex;align-items:center;justify-content:space-between;gap:9px;font-size:12px;font-weight:800;color:#4c6079}
.account-appearance-header svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8}
.account-appearance-choice{width:100%;border:1px solid #e1e9f3;border-radius:13px;background:#f3f6fb;color:#263c58;display:flex;align-items:center;justify-content:space-between;padding:8px 10px;cursor:pointer;font:inherit;gap:12px}
.account-appearance-choice:focus-visible{outline:3px solid #84b6ff;outline-offset:2px}
.account-appearance-option{display:inline-flex;align-items:center;justify-content:center;gap:6px;font-size:12px;font-weight:800;padding:7px 11px;border-radius:9px;flex:1;transition:background .16s,color .16s}
.account-appearance-option svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.8}
.account-appearance-option.is-selected{background:#fff;color:#115ab5;box-shadow:0 2px 8px rgba(20,49,80,.1)}
.account-appearance-caption{color:#73869d;font-size:11px;line-height:1.5}
html[data-kopano-theme="dark"] .app-shell .account-appearance-group{border-color:#3a4f69}
html[data-kopano-theme="dark"] .app-shell .account-appearance-header{color:#bfcfe5}
html[data-kopano-theme="dark"] .app-shell .account-appearance-choice{background:#111f33;border-color:#3b5272;color:#c9d9ed}
html[data-kopano-theme="dark"] .app-shell .account-appearance-option.is-selected{background:#2e527e;color:#fff}
html[data-kopano-theme="dark"] .app-shell .account-appearance-caption{color:#9cadc5}

/* Consistent contrast for primary actions and small navigational controls. */
@media screen {
html[data-kopano-theme="dark"] .app-shell .btn-primary,
html[data-kopano-theme="dark"] :is(.kopano-modal,.law-dialog,.calendar-modal) .btn-primary {
  background:linear-gradient(135deg,#2266d6,#1478ed) !important;color:#fff !important;
  border-color:#498af7 !important;
}
html[data-kopano-theme="dark"] .app-shell :is(.btn-primary,.btn-soft,.btn-ghost,.side-link,.workspace-tab):focus-visible,
html[data-kopano-theme="dark"] .app-shell :is(input,select,textarea):focus-visible,
html[data-kopano-theme="dark"] .app-shell .account-appearance-choice:focus-visible {
  outline:3px solid #8bbcff !important;outline-offset:2px;
}
html[data-kopano-theme="dark"] .app-shell :is(.account-menu-panel,.notification-bell-panel,.record-actions-menu,.searchable-select-menu) {
  box-shadow:0 24px 55px rgba(0,0,0,.36) !important;
}
html[data-kopano-theme="dark"] .app-shell .account-menu-panel .account-appearance-choice:hover {background:#233956 !important;}
}

/* v1.24.29 — dark palette repair based on real Launchpad screenshot.
   App CSS contains legacy !important colors and photo-white gradients.
   Set legacy variables as well as dark surfaces so everything keeps contrast. */
@media screen {
html[data-kopano-theme="dark"] {
  --text-primary:#eaf1fc;
  --text-secondary:#a8bad3;
  --accent-blue-soft:#223a5b;
  --ink:#eaf1fc;
  --muted:#a8bad3;
  --line:#354762;
  --surface:#19293f;
  --surface-soft:#20334d;
  --soft:#20334d;
  --card:#1a2a40;
}
html[data-kopano-theme="dark"] .app-shell{
  --text-primary:#eaf1fc;
  --text-secondary:#a8bad3;
  --accent-blue-soft:#223a5b;
  --ink:#eaf1fc;
  --muted:#a8bad3;
  --line:#354762;
  --surface:#19293f;
  --surface-soft:#20334d;
  --card:#19293f;
}
/* Sidebar: no dark-on-dark text and no white active strips. */
html[data-kopano-theme="dark"] .app-shell .sidebar{background:#0d182a!important;color:#e6eefb!important;border-color:#2a3c54!important}
html[data-kopano-theme="dark"] .app-shell .sidebar .side-logo,
html[data-kopano-theme="dark"] .app-shell .sidebar .side-logo strong,
html[data-kopano-theme="dark"] .app-shell .sidebar .org-switch strong{color:#f1f6ff!important}
html[data-kopano-theme="dark"] .app-shell .sidebar .org-switch{background:#1a2a40!important;color:#f1f6ff!important;border:1px solid #374964!important}
html[data-kopano-theme="dark"] .app-shell .sidebar .org-switch span{color:#a7bad3!important}
html[data-kopano-theme="dark"] .app-shell .sidebar .side-link{color:#bbcee6!important;background:transparent!important;border-color:transparent!important}
html[data-kopano-theme="dark"] .app-shell .sidebar .side-link .side-nav-label{color:inherit!important}
html[data-kopano-theme="dark"] .app-shell .sidebar .side-link:hover{background:#223853!important;color:#f2f7ff!important;border-color:#34587b!important}
html[data-kopano-theme="dark"] .app-shell .sidebar .side-link.active{background:#244469!important;color:#fff!important;border-color:#426b9c!important;box-shadow:inset 3px 0 0 #79affd!important}
html[data-kopano-theme="dark"] .app-shell .sidebar .side-link:not(.active) .side-nav-icon{background:#1e304a!important;border-color:#384f70!important;color:#aec5e4!important}
html[data-kopano-theme="dark"] .app-shell .sidebar .side-link:not(.active) .side-nav-icon svg{stroke:currentColor!important}
html[data-kopano-theme="dark"] .app-shell .sidebar .side-link.active .side-nav-icon{background:#1767d8!important;border-color:#3984f0!important;color:#fff!important}
html[data-kopano-theme="dark"] .app-shell .sidebar :is(.side-nav-label,.side-section-label,.side-menu-group-title){color:inherit}

/* Header: repaired paper-white strip, white titles, and dark-on-dark shortcuts. */
html[data-kopano-theme="dark"] .app-shell .app-header{background:#19293f!important;border:1px solid #334761!important;box-shadow:0 8px 27px rgba(0,0,0,.14)!important}
html[data-kopano-theme="dark"] .app-shell .app-header .app-title h1{color:#f3f7ff!important}
html[data-kopano-theme="dark"] .app-shell .app-header .app-title p{color:#a9bdd6!important}
html[data-kopano-theme="dark"] .app-shell .header-tool-link,
html[data-kopano-theme="dark"] .app-shell .notification-bell-trigger,
html[data-kopano-theme="dark"] .app-shell .account-menu-trigger.user-chip{
  background:#21344d!important;border:1px solid #3b5373!important;color:#e9f2ff!important;
}
html[data-kopano-theme="dark"] .app-shell .header-tool-link svg,
html[data-kopano-theme="dark"] .app-shell .notification-bell-trigger svg{stroke:#d8eaff!important}
html[data-kopano-theme="dark"] .app-shell .header-tool-link:hover,
html[data-kopano-theme="dark"] .app-shell .notification-bell-trigger:hover,
html[data-kopano-theme="dark"] .app-shell .account-menu-trigger.user-chip:hover{background:#2d4563!important}
html[data-kopano-theme="dark"] .app-shell .account-trigger-identity strong{color:#f1f6ff!important}
html[data-kopano-theme="dark"] .app-shell .account-trigger-identity small{color:#b2c5df!important}
html[data-kopano-theme="dark"] .app-shell :is(.account-menu-panel,.notification-bell-panel){background:#1b2c43!important;border-color:#3a5271!important}
html[data-kopano-theme="dark"] .app-shell :is(.account-menu-heading,.notification-bell-heading,.account-menu-footer){background:#1b2c43!important;border-color:#354c6b!important}
html[data-kopano-theme="dark"] .app-shell .account-menu-panel :is(a,button){color:#e5efff!important}
html[data-kopano-theme="dark"] .app-shell .account-menu-panel .account-appearance-choice{background:#111f33!important;border-color:#385273!important}
html[data-kopano-theme="dark"] .app-shell .account-menu-panel .account-appearance-option.is-selected{background:#32629a!important;color:#fff!important}

/* Launchpad: make the dashboard cards and search truly dark. */
html[data-kopano-theme="dark"] .app-shell .kopano-launchpad .launchpad-frequent-section h2,
html[data-kopano-theme="dark"] .app-shell .kopano-launchpad h2{color:#eef4ff!important}
html[data-kopano-theme="dark"] .app-shell .kopano-launchpad .launchpad-search{background:#1c2d44!important;border:1px solid #354d6d!important;box-shadow:0 5px 18px rgba(0,0,0,.13)!important}
html[data-kopano-theme="dark"] .app-shell .kopano-launchpad .launchpad-search>span{color:#91beed!important}
html[data-kopano-theme="dark"] .app-shell .kopano-launchpad .launchpad-search input{background:transparent!important;color:#f0f5ff!important;border:0!important;box-shadow:none!important}
html[data-kopano-theme="dark"] .app-shell .kopano-launchpad .launchpad-search input::placeholder{color:#adc0d9!important;opacity:1}
html[data-kopano-theme="dark"] .app-shell .kopano-launchpad .launchpad-card{background:#1b2c42!important;background-image:linear-gradient(160deg,#21364f,#192a3f)!important;border:1px solid #38516c!important;color:#ebf3ff!important;box-shadow:0 8px 24px rgba(0,0,0,.14)!important}
html[data-kopano-theme="dark"] .app-shell .kopano-launchpad .launchpad-card:hover{background-image:linear-gradient(150deg,#2a4563,#1e324c)!important;border-color:#5481b2!important;box-shadow:0 16px 32px rgba(0,0,0,.24)!important}
html[data-kopano-theme="dark"] .app-shell .kopano-launchpad .launchpad-card>strong{color:#f2f6ff!important}
html[data-kopano-theme="dark"] .app-shell .kopano-launchpad .launchpad-card .launchpad-card-desc{color:#b6c8df!important}
html[data-kopano-theme="dark"] .app-shell .kopano-launchpad .launchpad-card .launchpad-card-foot{border-top:1px solid #394e69!important;color:#9ad5bd!important}
html[data-kopano-theme="dark"] .app-shell .kopano-launchpad .launchpad-card .launchpad-card-arrow{background:#233954!important;border-color:#3d5674!important;color:#c5ddf9!important}
html[data-kopano-theme="dark"] .app-shell .kopano-launchpad .launchpad-card .launchpad-card-icon{background:#263f5a!important;color:#9cd4b5!important;box-shadow:inset 0 0 0 1px #41607e!important}
html[data-kopano-theme="dark"] .app-shell .kopano-launchpad .launchpad-card :is(.launchpad-card-icon svg,.launchpad-card-arrow svg){stroke:currentColor!important}
html[data-kopano-theme="dark"] .app-shell .kopano-launchpad :is(.launchpad-access-empty,.launchpad-no-results){background:#1c2e45!important;border-color:#3e5670!important;color:#bcd0e9!important}

/* Legacy CSS uses hardcoded white and low-contrast branding. Patch common workspaces. */
html[data-kopano-theme="dark"] .app-shell :is(.standard-workspace-header,.mini-dashboard-card,.uniform-kpi-card,.module-manager-card,.record-search-field,.finance-workspace,.accounting-workspace,.form-row,.finance-filter-card,.module-action-bar,.procurement-dash-kpis article,.procurement-dash-hero,.account-settings-panel,.account-notification-item,.calendar-preview,.calendar-modal){border-color:#354962!important}
html[data-kopano-theme="dark"] .app-shell :is(.standard-workspace-header,.mini-dashboard-card,.uniform-kpi-card,.module-manager-card,.finance-filter-card,.procurement-dash-kpis article,.procurement-dash-hero,.account-settings-panel,.account-notification-item){background:#1b2d43!important;background-image:none!important;color:#e8f0ff!important}
html[data-kopano-theme="dark"] .app-shell :is(.module-manager-card,.record-card,.uniform-kpi-card,.mini-dashboard-card,.procurement-dash-kpis article,.account-settings-panel) :is(h1,h2,h3,h4,strong){color:#edf5ff!important}
html[data-kopano-theme="dark"] .app-shell :is(.form-row label,.field-label,.record-toolbar label){color:#c8daed!important}
html[data-kopano-theme="dark"] .app-shell :is(.status-pill.status-active,.chip,.eyebrow){background:#24456a!important;border-color:#38648b!important;color:#b9dbfa!important}
}

/* v1.24.41 — Notes workspace dark-mode repair.
   The original global theme targets older .notes-sidebar/.notes-editor names;
   the live personal Notes UI uses .notes-list-panel/.notes-work-area.
   Keep these overrides inside the authenticated app shell, in dark mode and on
   screens only. No changes to light mode or to print layouts. */
@media screen {
html[data-kopano-theme="dark"] .app-shell .notes-app {
  --notes-bg:#192a40;
  --notes-side:#142339;
  --notes-line:#354961;
  --notes-ink:#edf4ff;
  --notes-muted:#afc0d7;
  --notes-accent:#8fbaff;
  background:var(--notes-bg)!important;
  color:var(--notes-ink)!important;
  border-color:var(--notes-line)!important;
  box-shadow:0 18px 56px rgba(0,0,0,.22)!important;
  color-scheme:dark;
}
html[data-kopano-theme="dark"] .app-shell .notes-app .notes-list-panel {
  background:var(--notes-side)!important;
  border-color:var(--notes-line)!important;
  color:var(--notes-ink)!important;
}
html[data-kopano-theme="dark"] .app-shell .notes-app .notes-work-area,
html[data-kopano-theme="dark"] .app-shell .notes-app .notes-editor-form {
  background:var(--notes-bg)!important;
  color:var(--notes-ink)!important;
}
html[data-kopano-theme="dark"] .app-shell .notes-app .notes-sidebar-top>strong {
  color:#f0f5ff!important;
}
html[data-kopano-theme="dark"] .app-shell .notes-app .notes-new-btn {
  background:#244b50!important;
  border:1px solid #3d7b76!important;
  color:#aef4db!important;
}
html[data-kopano-theme="dark"] .app-shell .notes-app .notes-new-btn:hover {
  background:#2c605e!important;
  border-color:#62a997!important;
}
html[data-kopano-theme="dark"] .app-shell .notes-app .notes-search-box>span {color:#9cb1ce!important;}
html[data-kopano-theme="dark"] .app-shell .notes-app .notes-search-box input {
  background:#102038!important;
  border:1px solid #38536f!important;
  color:#edf4ff!important;
  caret-color:#a6cbff;
}
html[data-kopano-theme="dark"] .app-shell .notes-app .notes-search-box input::placeholder {color:#acbed6!important;}
html[data-kopano-theme="dark"] .app-shell .notes-app .notes-search-box input:focus {
  border-color:#7baef0!important;
  box-shadow:0 0 0 3px rgba(105,157,235,.19)!important;
}
html[data-kopano-theme="dark"] .app-shell .notes-app .notes-group>h3 {
  background:var(--notes-side)!important;
  color:#9fb5cf!important;
}
html[data-kopano-theme="dark"] .app-shell .notes-app .notes-list-item {
  background:transparent!important;
  border-color:transparent!important;
  color:var(--notes-ink)!important;
}
html[data-kopano-theme="dark"] .app-shell .notes-app .notes-list-item:hover {
  background:#233a56!important;
  border-color:#38536e!important;
}
html[data-kopano-theme="dark"] .app-shell .notes-app .notes-list-item.is-active,
html[data-kopano-theme="dark"] .app-shell .notes-app .notes-list-item.is-active:hover {
  background:#264667!important;
  border-color:#527aa3!important;
  box-shadow:inset 3px 0 0 #8dbbfb;
}
html[data-kopano-theme="dark"] .app-shell .notes-app .notes-list-title,
html[data-kopano-theme="dark"] .app-shell .notes-app .notes-list-item .notes-list-title {
  color:#f0f6ff!important;
}
html[data-kopano-theme="dark"] .app-shell .notes-app .notes-list-excerpt {color:#c4d2e5!important;}
html[data-kopano-theme="dark"] .app-shell .notes-app .notes-list-meta {color:#9fb3cf!important;}
html[data-kopano-theme="dark"] .app-shell .notes-app .notes-list-title small {color:#f3d58c!important;}
html[data-kopano-theme="dark"] .app-shell .notes-app .notes-empty-list {color:var(--notes-muted)!important;}
html[data-kopano-theme="dark"] .app-shell .notes-app .notes-editor-top {
  background:#1b2d44!important;
  color:#a9bdd7!important;
  border-color:var(--notes-line)!important;
}
html[data-kopano-theme="dark"] .app-shell .notes-app .notes-editor-title {
  background:transparent!important;
  border:0!important;
  color:#f4f8ff!important;
  box-shadow:none!important;
  caret-color:#a9ceff;
}
html[data-kopano-theme="dark"] .app-shell .notes-app .notes-editor-title::placeholder {color:#97aac4!important;}
html[data-kopano-theme="dark"] .app-shell .notes-app .notes-toolbar {
  background:transparent!important;
  border-top:1px solid var(--notes-line)!important;
  border-bottom:1px solid var(--notes-line)!important;
  color:#c6d9f0!important;
}
html[data-kopano-theme="dark"] .app-shell .notes-app .notes-toolbar button {
  color:#d4e4f7!important;
  background:transparent!important;
  border-color:transparent!important;
}
html[data-kopano-theme="dark"] .app-shell .notes-app .notes-toolbar button:hover,
html[data-kopano-theme="dark"] .app-shell .notes-app .notes-toolbar button:focus-visible {
  background:#2b4260!important;
  border-color:#537498!important;
  color:#fff!important;
}
html[data-kopano-theme="dark"] .app-shell .notes-app .notes-toolbar-divider {border-color:#49607e!important;}
html[data-kopano-theme="dark"] .app-shell .notes-app .notes-editor-body,
html[data-kopano-theme="dark"] .app-shell .notes-app .notes-editor-body[contenteditable="true"],
html[data-kopano-theme="dark"] .app-shell .notes-app .notes-editor-body[contenteditable="false"] {
  background:transparent!important;
  color:#e4edf9!important;
  caret-color:#a8ceff;
}
html[data-kopano-theme="dark"] .app-shell .notes-app .notes-editor-body:empty::before {color:#9cb0c9!important;}
html[data-kopano-theme="dark"] .app-shell .notes-app .notes-editor-body a {color:#98c6ff!important;}
html[data-kopano-theme="dark"] .app-shell .notes-app .notes-editor-body a.notes-link-blocked {color:#ffaaa9!important;}
html[data-kopano-theme="dark"] .app-shell .notes-app .notes-editor-body blockquote {
  border-color:#537d9d!important;
  color:#c4d4e8!important;
}
html[data-kopano-theme="dark"] .app-shell .notes-app .notes-editor-body ul[data-notes-checklist="1"]>li::before {
  background:#101e31!important;
  border-color:#8eabc9!important;
}
html[data-kopano-theme="dark"] .app-shell .notes-app .notes-editor-body ul[data-notes-checklist="1"]>li[data-checked="1"] {
  color:#9aafc9!important;
}
html[data-kopano-theme="dark"] .app-shell .notes-app .notes-editor-body ul[data-notes-checklist="1"]>li[data-checked="1"]::before {
  background:#287b67!important;
  border-color:#61bba4!important;
  color:#fff!important;
}
html[data-kopano-theme="dark"] .app-shell .notes-app .notes-bottom-bar {
  border-color:var(--notes-line)!important;
  color:#acc1d7!important;
}
html[data-kopano-theme="dark"] .app-shell .notes-app .notes-bottom-bar [data-kind="pending"] {color:#f1cb7d!important;}
html[data-kopano-theme="dark"] .app-shell .notes-app .notes-bottom-bar [data-kind="error"] {color:#ffafad!important;}
html[data-kopano-theme="dark"] .app-shell .notes-app .notes-action-menu summary {
  color:#d1e2f6!important;
  border-color:#3a536f!important;
  background:#20354f!important;
}
html[data-kopano-theme="dark"] .app-shell .notes-app .notes-action-menu summary:hover,
html[data-kopano-theme="dark"] .app-shell .notes-app .notes-action-menu[open] summary {
  background:#2a4665!important;
  border-color:#6587ae!important;
}
html[data-kopano-theme="dark"] .app-shell .notes-app .notes-action-panel {
  background:#1c2d44!important;
  border-color:#465d7b!important;
  color:#eaf2ff!important;
  box-shadow:0 20px 45px rgba(0,0,0,.4)!important;
}
html[data-kopano-theme="dark"] .app-shell .notes-app .notes-action-panel :is(a,button) {
  background:transparent!important;
  color:#e2edfa!important;
}
html[data-kopano-theme="dark"] .app-shell .notes-app .notes-action-panel :is(a,button):hover {background:#2b4261!important;}
html[data-kopano-theme="dark"] .app-shell .notes-app .notes-action-panel .notes-danger {color:#ffb4ae!important;}
html[data-kopano-theme="dark"] .app-shell .notes-app .notes-action-panel .notes-danger:hover {background:#573337!important;}
html[data-kopano-theme="dark"] .app-shell .notes-app .notes-back {color:#9bc8ff!important;}
html[data-kopano-theme="dark"] .app-shell .notes-app .notes-shared-banner {
  background:#213c59!important;
  color:#c2e2ff!important;
}
html[data-kopano-theme="dark"] .app-shell .notes-app .notes-empty-editor {color:#b0c3d9!important;}
html[data-kopano-theme="dark"] .app-shell .notes-app .notes-empty-editor h2 {color:#eff6ff!important;}
html[data-kopano-theme="dark"] .app-shell .notes-app .notes-empty-symbol {
  background:#264c51!important;
  color:#a8edcf!important;
}
html[data-kopano-theme="dark"] .app-shell .notes-app .notes-share-panel {
  background:#1d324c!important;
  border-color:var(--notes-line)!important;
  color:#e9f1fc!important;
}
html[data-kopano-theme="dark"] .app-shell .notes-app .notes-share-heading :is(h3,p),
html[data-kopano-theme="dark"] .app-shell .notes-app .notes-shared-list :is(span,small) {color:#c4d6ed!important;}
html[data-kopano-theme="dark"] .app-shell .notes-app .notes-share-panel>a {color:#9acaff!important;}
html[data-kopano-theme="dark"] .app-shell .notes-app .notes-link-dialog {
  background:#1b2d43!important;
  color:#e9f2ff!important;
  border-color:#445f7e!important;
}
html[data-kopano-theme="dark"] .app-shell .notes-app .notes-link-dialog h3 {color:#f3f7ff!important;}
html[data-kopano-theme="dark"] .app-shell .notes-app .notes-link-dialog [data-link-result] {color:#f1cf93!important;}
html[data-kopano-theme="dark"] .app-shell .notes-app .notes-list-scroll {
  scrollbar-color:#47627f transparent;
}
}
