.theme-switch {
  display: inline-flex; align-items: stretch; flex-shrink: 0; gap: 2px;
  padding: 3px; border-radius: 10px; border: 1px solid #40536b; background: #111e32;
}
.theme-switch button {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  min-height: 29px; padding: 4px 8px; border: 0; border-radius: 6px;
  background: transparent; color: #a5bed4; font-size: 11px; font-weight: 750; white-space: nowrap;
}
.theme-switch button:hover { color: #ffffff; background: #21374f; }
.theme-switch button[aria-pressed="true"] { color: #ecfbff; background: #2a4562; }
.theme-switch button:focus-visible { outline: 2px solid #58bed9; outline-offset: 2px; }
.auth-appearance { display: flex; justify-content: flex-end; }
.hub-downtime-layout { display: block; min-width: 0; container-type: inline-size; }

:root[data-theme="day"] {
  color-scheme: light; background: #f3f6fa; color: #17283d;
  --ink: #17283d; --muted: #495f76; --line: #c8d5e4; --sidebar: #f8fafd; --surface: #ffffff;
}
[data-theme="day"] { scrollbar-color: #a5b7cb #edf2f8; }
[data-theme="day"] body { background: #f3f6fa; color: #17283d; }
[data-theme="day"] .workspace { background: radial-gradient(ellipse 680px 400px at 97% 1%, #d9e7f666, transparent 78%), #f3f6fa; }
[data-theme="day"] .sidebar { color: #364e65; background: linear-gradient(165deg, #ffffff, #edf3f9); border-color: #cdd9e6; }
[data-theme="day"] .proton-wordmark strong { color: #10243b; }
[data-theme="day"] .proton-wordmark small { color: #405972 !important; }
[data-theme="day"] .nav-label, [data-theme="day"] .sidebar-footer { color: #4e657d; }
[data-theme="day"] .sidebar-footer { border-color: #cdd9e6; }
[data-theme="day"] .sidebar-footer svg { color: #146c82; }
[data-theme="day"] .nav-item { color: #37516c; }
[data-theme="day"] .nav-item:hover { background: #e5edf7; border-color: #cfdbea; }
[data-theme="day"] .nav-item.active { color: #263a55; background: linear-gradient(100deg, #fceef2, #eaf2fb); border-color: #d9bdcb; box-shadow: none; }
[data-theme="day"] .topbar, [data-theme="day"] .popover { background: #fbfdff; border-color: #cbd9e7; box-shadow: 0 6px 25px #24426412; }
[data-theme="day"] .breadcrumb, [data-theme="day"] .today, [data-theme="day"] .user-caption small { color: #4e6278; }
[data-theme="day"] .breadcrumb strong, [data-theme="day"] .user-chip, [data-theme="day"] .account-popover button { color: #17283d; }
[data-theme="day"] .icon-button, [data-theme="day"] .secondary {
  color: #243c57; background: #edf3f9; border-color: #b9cadd;
}
[data-theme="day"] .icon-button:hover, [data-theme="day"] .secondary:hover, [data-theme="day"] .account-popover button:hover { background: #dfeafa; border-color: #94adc8; color: #153d6d; }
[data-theme="day"] .avatar { background: #f8e7ee; border-color: #d9afbe; color: #762943; }
[data-theme="day"] .theme-switch { background: #edf2f8; border-color: #c2d1e1; }
[data-theme="day"] .theme-switch button { color: #465e77; }
[data-theme="day"] .theme-switch button:hover { background: #e0eaf6; color: #173c65; }
[data-theme="day"] .theme-switch button[aria-pressed="true"] { color: #17508c; background: #ffffff; box-shadow: 0 1px 3px #233e661f; }
[data-theme="day"] .welcome { background: linear-gradient(111deg, #ffffff, #e2edf9 65%, #dceaf8); border-color: #b9cce1; border-left-color: #d73e55; box-shadow: 0 12px 30px #1b385213; }
[data-theme="day"] .welcome-label { color: #165e80; }
[data-theme="day"] .welcome h1 { color: #17283d; }
[data-theme="day"] .welcome p { color: #435b74; }
[data-theme="day"] .welcome-button { color: #1c476d; background: #ffffffc9; border-color: #a8bfd8; }
[data-theme="day"] .welcome-button:hover { background: #fff; }
[data-theme="day"] .stat, [data-theme="day"] .panel {
  background: #ffffff; border-color: #c9d7e5; box-shadow: 0 8px 24px #2442640d;
}
[data-theme="day"] .stat strong, [data-theme="day"] .panel-heading h2,
[data-theme="day"] .alert-copy strong, [data-theme="day"] .date-chip strong, [data-theme="day"] .table-name strong,
[data-theme="day"] .table-link, [data-theme="day"] .detail dd, [data-theme="day"] .linked-part, [data-theme="day"] .movement { color: #172c44; }
[data-theme="day"] .stat>span:last-child, [data-theme="day"] .panel-heading p, [data-theme="day"] .module-heading p,
[data-theme="day"] .alert-copy small, [data-theme="day"] .table-name small, [data-theme="day"] .tabular small,
[data-theme="day"] .table-footer, [data-theme="day"] .empty p, [data-theme="day"] .detail-block p,
[data-theme="day"] .detail dl dt, [data-theme="day"] .auth-footer { color: #4c6279; }
[data-theme="day"] .panel-heading, [data-theme="day"] .popover-title, [data-theme="day"] .detail-block,
[data-theme="day"] .alert-row + .alert-row, [data-theme="day"] .schedule-row + .schedule-row,
[data-theme="day"] .linked-part + .linked-part, [data-theme="day"] .movement + .movement { border-color: #d7e2ed; }
[data-theme="day"] .alert-row:hover, [data-theme="day"] .schedule-row:hover, [data-theme="day"] .linked-part:hover { background: #ecf3fa; }
[data-theme="day"] .count, [data-theme="day"] .date-chip, [data-theme="day"] .empty-icon { background: #e5eef8; border-color: #c1d3e6; color: #1e5e96; }
[data-theme="day"] .cyan, [data-theme="day"] .info { background: #def0fa; color: #155f87; }
[data-theme="day"] .amber, [data-theme="day"] .warning { background: #fbefd8; color: #724500; }
[data-theme="day"] .mint, [data-theme="day"] .success { background: #def3ec; color: #145e4a; }
[data-theme="day"] .rose, [data-theme="day"] .danger { background: #fae7ec; color: #902e4a; }
[data-theme="day"] .neutral { background: #e9eff6; color: #40576e; }
[data-theme="day"] .text-button, [data-theme="day"] .table-link:hover { color: #155d96; }
[data-theme="day"] .primary { background: linear-gradient(125deg, #ad2542, #c23048); border-color: #a82b42; color: #fff; }
[data-theme="day"] .primary:hover { background: #a4223a; }
[data-theme="day"] .search, [data-theme="day"] :is(input:not([type="checkbox"]), select, textarea) {
  background: #ffffff; border-color: #b4c6da; color: #17283d;
}
[data-theme="day"] .search input:not([type="checkbox"]), [data-theme="day"] .assembly-search input[type="search"] { background: transparent; }
[data-theme="day"] :is(input, textarea)::placeholder { color: #566e87; }
[data-theme="day"] :is(input, select, textarea):focus { border-color: #367ab5; }
[data-theme="day"] .table-tools select, [data-theme="day"] td { color: #29445f; }
[data-theme="day"] th { background: #e9f0f8; color: #2c4969; border-color: #c4d3e2; }
[data-theme="day"] td { border-color: #d9e4ed; }
[data-theme="day"] tr:hover td, [data-theme="day"] tr.highlight td { background: #e8f1fb; }
[data-theme="day"] dialog { background: #ffffff; color: #17283d; border-color: #c4d4e3; box-shadow: 0 18px 52px #25364f42; }
[data-theme="day"] dialog::backdrop { background: #172b3e70; }
[data-theme="day"] .form-grid label, [data-theme="day"] .auth-form label, [data-theme="day"] .record-form p,
[data-theme="day"] .upload-field, [data-theme="day"] .part-fieldset { color: #324b65; }
[data-theme="day"] .part-fieldset, [data-theme="day"] .auth-footer { border-color: #cbd9e6; }
[data-theme="day"] .error, [data-theme="day"] .dt-error { background: #fff0f2; color: #8f2540; border-color: #d5a3b2; }
[data-theme="day"] .notice, [data-theme="day"] .dt-success, [data-theme="day"] .toast { background: #e7f5ef; color: #145844; border-color: #b0d4c5; }
[data-theme="day"] .toast svg { color: #1d7a63; }
[data-theme="day"] .dt-warn { background: #fff4e0; color: #704b16; border-color: #d0b480; }
[data-theme="day"] .auth-shell { background: radial-gradient(ellipse 850px 500px at 55% -10%, #c9def6, transparent 75%), #f3f6fa; }
[data-theme="day"] .auth-card { background: #ffffff; border-color: #c7d7e6; box-shadow: 0 16px 54px #24426425; }
[data-theme="day"] .auth-card h1 { color: #17283d; }
[data-theme="day"] .auth-card p, [data-theme="day"] .auth-card .brand small { color: #465f79; }
[data-theme="day"] .auth-card .error, [data-theme="day"] .record-form p.error { color: #8f2540; }
[data-theme="day"] .proton-auth-brand img { mix-blend-mode: normal; border-radius: 10px; }
[data-theme="day"] .assembly-flow { --assembly-bright: #17283d; --assembly-muted: #496480; --assembly-accent: #12658a; --assembly-border: #c2d2e3; }
[data-theme="day"] .assembly-hero { background: linear-gradient(123deg,#fff,#dae9f8); }
[data-theme="day"] .assembly-hero-mark, [data-theme="day"] .assembly-total { background: #ddebf7; border-color: #b3ccdf; }
[data-theme="day"] .assembly-toolbar { background: #ffffff; }
[data-theme="day"] .assembly-toolbar select, [data-theme="day"] .assembly-search { background: #f4f8fc; border-color: #becfe0; }
[data-theme="day"] .assembly-node, [data-theme="day"] .assembly-components li { background: #f1f6fc; border-color: #c2d3e3; }
[data-theme="day"] .assembly-node:hover, [data-theme="day"] .assembly-node[aria-current] { background: #e5f0fb; border-color: #8bbacf; box-shadow: inset 3px 0 #247b99; }
[data-theme="day"] .assembly-recorded { background: #dcefe7; color: #145e4a; }
[data-theme="day"] .assembly-connector, [data-theme="day"] .assembly-form small { color: #496480; }
[data-theme="day"] .assembly-failure, [data-theme="day"] .assembly-remove { color: #8f2540; }
[data-theme="day"] .dt-modal-mask { background: #14263b70; }
[data-theme="day"] .dt-upload-modal { background: #fcfdff; border-color: #b9cce2; box-shadow: 0 12px 52px #21385145; color: #17283d; }
[data-theme="day"] .dt-upload-modal h2, [data-theme="day"] .dt-preview-stats b { color: #17283d; }
[data-theme="day"] .dt-upload-modal :is(.dt-muted, .dt-eyebrow, small, .dt-preview-rows time) { color: #4a627c; }
[data-theme="day"] .dt-preview-stats span, [data-theme="day"] .dt-detail-grid>div { background: #eaf2fa; border-color: #c0d2e6; }
[data-theme="day"] .dt-preview-rows, [data-theme="day"] .dt-preview-rows>div { border-color: #d0ddeb; }
[data-theme="day"] .dt-modal-mark, [data-theme="day"] .dt-dismiss { background: #ebf4fc; border-color: #bccee2; color: #1a6593; }
[data-theme="day"] .dt-preview-rows strong, [data-theme="day"] .dt-progress { color: #12658a; }
@media (max-width: 620px) {
  .topbar .theme-switch button { min-width: 28px; padding-inline: 5px; }
  .topbar .theme-switch button span { display: none; }
  .breadcrumb strong { max-width: 31vw; overflow: hidden; text-overflow: ellipsis; }
}
