/* Light counterpart of the approved Prisma layout. Load after suite.css.
   All selectors are theme-scoped; dark layout, sizing and imagery stay intact. */
html[data-theme="light"] {
  color-scheme: light;
  --page: #f8f6fb;
  --panel: #e5dced;
  --surface: #d8cce5;
  --field: #fffaff;
  --hover: #f5edf9;
  --ink: #2b1d38;
  --muted: #45324f;
  --soft: #51405f;
  --accent: #19dfa6;
  --accent-b: #15c9c7;
  --accent-ink: #042923;
  --accent-text: #06634f;
  --focus: #7838ce;
  --danger: #a51e43;
  --blue: #245fa8;
  --purple: #7838ce;
  --separator: #5a3c7817;
  --row-hover: #ffffff45;
  --glass: #f0e8f5de;
  --glass-dialog: #eee5f5f2;
  --glass-control: #ffffff73;
  --glass-selected: #d8cce5bf;
  --glass-shadow: #39234a12;
  --action-surface: #c8b6dd;
  --action-hover: #bba3d3;
  --control-off: #746480;
  scrollbar-color: #ad9bbb transparent;
}

html[data-theme="light"][data-role="agent"] {
  --panel: #e1e9f5;
  --surface: #cddbf0;
  --field: #f8fbff;
  --hover: #edf3fc;
  --ink: #142d4d;
  --muted: #304966;
  --soft: #3b5274;
  --accent: #b99afa;
  --accent-b: #9470eb;
  --accent-ink: #21113f;
  --accent-text: #6432b4;
  --focus: #6432b4;
  --separator: #2d4e7b19;
  --glass: #eaf1fbde;
  --glass-dialog: #e8f0fcf2;
  --glass-selected: #cddbf0bf;
  --glass-shadow: #1a3c6512;
  --action-surface: #b8cce8;
  --action-hover: #a6bfe2;
  --control-off: #5c718e;
}

html[data-theme="light"][data-role="manager"] {
  --panel: #dcebed;
  --surface: #c7dfe2;
  --field: #f6fdff;
  --hover: #eaf5f7;
  --ink: #173a40;
  --muted: #294a52;
  --soft: #35545d;
  --accent: #65c6ff;
  --accent-b: #4188f6;
  --accent-ink: #071c34;
  --accent-text: #155db3;
  --focus: #155db3;
  --separator: #285b661b;
  --glass: #e7f3f4de;
  --glass-dialog: #e4f1f3f2;
  --glass-selected: #c7dfe2bf;
  --glass-shadow: #1d485012;
  --action-surface: #b0d0d6;
  --action-hover: #9ac3cc;
  --control-off: #58757e;
}

/* Keep the bright approved CTA colors while giving text/icons a darker tone. */
html[data-theme="light"] :is(
  .role-marker, .subtle-link, .nav-item.active .icon, .option .icon,
  .row-symbol, .quick-link > .icon, .profile-symbol, .method-card > .icon,
  .hub-icon, .status-panel .status-symbol, .notice > .icon,
  .task-link > .icon:first-child
) { color: var(--accent-text); }
html[data-theme="light"] .guide-steps li::marker { color: var(--accent-text); }
html[data-theme="light"] :is(.timeline-item::before, .notification-dot::after) {
  background: var(--accent-text);
}
html[data-theme="light"] .ring {
  background: conic-gradient(var(--accent-text) 0 50%, var(--surface) 50%);
}
html[data-theme="light"] .button-secondary { background: var(--action-surface); }
html[data-theme="light"] .button-secondary:hover { background: var(--action-hover); }
html[data-theme="light"] :is(input[type="checkbox"], input[type="radio"]) {
  accent-color: var(--accent-text);
}
html[data-theme="light"] .nav-item.active { font-weight: 600; }
html[data-theme="light"] td .row-link:hover { color: var(--accent-text); }
html[data-theme="light"] :is(.bottom-nav a.active, .bottom-nav button.active) {
  color: var(--accent-text);
  background: color-mix(in srgb, var(--accent-text) 9%, transparent);
}
html[data-theme="light"] :is(.option:has(input:checked), .method-card.selected) {
  background: color-mix(in srgb, var(--accent) 19%, var(--surface));
}
html[data-theme="light"] :is(.primary, .button-primary):hover {
  filter: brightness(.97);
}
html[data-theme="light"] :is(input, textarea)::placeholder {
  color: var(--soft);
  opacity: 1;
}
html[data-theme="light"] :is(input, select, textarea) { caret-color: var(--ink); }
html[data-theme="light"] .input[readonly] {
  background: var(--surface);
  color: var(--muted);
}
html[data-theme="light"] .switch { background: var(--control-off); }
html[data-theme="light"] .switch:before { background: #ffffff; }
html[data-theme="light"] .switch:checked { background: var(--accent-text); }
html[data-theme="light"] .switch:checked:before { background: #ffffff; }

/* Status colors convey the same meaning across the three workspaces. */
html[data-theme="light"] .notice {
  background: color-mix(in srgb, var(--accent) 10%, var(--panel));
  color: var(--muted);
}
html[data-theme="light"] .notice.warning { background: #f1e3c7; color: #714d17; }
html[data-theme="light"] .notice.warning > .icon { color: #815610; }
html[data-theme="light"] .notice.danger { background: #f3dce4; color: #912641; }
html[data-theme="light"] .notice.danger > .icon { color: #912641; }
html[data-theme="light"] .tag { background: #5542670e; color: var(--muted); }
html[data-theme="light"] .tag.good { background: #cce9dc; color: #145b43; }
html[data-theme="light"] .tag.wait { background: #f0e2c8; color: #744c12; }
html[data-theme="light"] .tag.bad { background: #efd5df; color: #922741; }
html[data-theme="light"] .tag.blue { background: #d4e5f6; color: #205784; }
html[data-theme="light"] .button-danger { background: #a51e4311; color: #a51e43; }
html[data-theme="light"] .decision-chip.deny.active { background: #96344f; color: #fff5f8; }

/* Recolor existing separators and overlays without adding decorative borders. */
html[data-theme="light"] th { background: color-mix(in srgb, var(--surface) 43%, var(--panel)); }
html[data-theme="light"] tbody tr + tr td,
html[data-theme="light"] .device-row + .device-row,
html[data-theme="light"] .task-row + .task-row,
html[data-theme="light"] .faq-list details + details { border-top-color: var(--separator); }
html[data-theme="light"] tbody tr:hover { background: var(--row-hover); }
html[data-theme="light"] .stage { --stage: #087a63; }
html[data-theme="light"] .stage:nth-child(2) { --stage: #2a61f7; }
html[data-theme="light"] .stage:nth-child(3) { --stage: #7838ce; }
html[data-theme="light"] .stage-track { background: #ded5e6; }
html[data-theme="light"] .stage.active .stage-track {
  background: color-mix(in srgb, var(--stage) 20%, var(--page));
}
html[data-theme="light"] .sample-qr { background: #ffffff; color: #241c30; }
html[data-theme="light"] .toast {
  background: #2b1d38;
  color: #fffaff;
  box-shadow: 0 12px 45px #39234a25;
}
html[data-theme="light"] dialog { box-shadow: 0 25px 100px #39234a24; }
html[data-theme="light"] dialog::backdrop { background: #30213d33; }
html[data-theme="light"] .bottom-nav {
  background: color-mix(in srgb, var(--panel) 95%, transparent);
  box-shadow: 0 12px 40px var(--glass-shadow);
}
html[data-theme="light"][data-phone="true"] :is(.workspace, .auth-wrap) {
  box-shadow: 0 25px 100px #39234a16;
}

/* Official provider assets keep their original colors and proportions. */
html[data-theme="light"] .provider.google {
  background: #ffffff;
  color: #1f1f1f;
  border-color: #747775;
  font-family: 'Google Sans', Arial, sans-serif;
}
html[data-theme="light"] .provider.apple { background: #ffffff; color: #000000; }

/* Apple material remains confined to navigation/toolbars/controls. */
html[data-theme="light"][data-glass="true"] :is(
  .workspace-header, .bottom-nav, .nav-drawer, .glass-toolbar
) {
  background: var(--glass);
  box-shadow: inset 0 1px 0 #ffffffb3, 0 8px 32px var(--glass-shadow);
}
html[data-theme="light"][data-glass="true"] :is(.icon-button, .context-button) {
  background: var(--glass-control);
  box-shadow: inset 0 1px 0 #ffffffa8;
}
html[data-theme="light"][data-glass="true"] .nav-item.active {
  background: var(--glass-selected);
}
html[data-theme="light"][data-glass="true"] dialog:not(.nav-drawer) {
  background: var(--glass-dialog);
  box-shadow: inset 0 1px 0 #ffffffb3, 0 30px 100px #39234a24;
}
html[data-theme="light"][data-glass="true"] .primary {
  box-shadow: inset 0 1px 0 #ffffff70, 0 4px 14px var(--glass-shadow);
}
@media (prefers-reduced-transparency: reduce) {
  html[data-theme="light"][data-glass="true"] :is(
    .workspace-header, .bottom-nav, .nav-drawer, .glass-toolbar, dialog
  ) {
    background: var(--panel);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
@media (forced-colors: active) {
  html[data-theme="light"] :is(.primary, .button-primary, .provider, .input, .option) {
    forced-color-adjust: auto;
  }
}
