/* ── LIGHT THEME ───────────────────────────────────────────
   Bright surface palette. Variable overrides only; structural
   CSS stays in index.html.  Activated by body.light class.
──────────────────────────────────────────────────────────── */

body.light {
  --bg:         #f4f6f9;
  --surface:    #ffffff;
  --border:     #e2e5ea;
  --border2:    #cdd2da;
  --text:       #0d1117;
  --muted:      #555f6e;
  --tile-model: #3d4e5e;
  --tile-user:  #5a6f82;
}

/* Tiles & panels */
body.light .shelf-tile    { box-shadow: 0 1px 3px rgba(0,0,0,.08); }
body.light .shelf-tile:hover { border-color: var(--amber-d); background: rgba(0,0,0,.03); box-shadow: 0 4px 16px rgba(0,0,0,.12); }
body.light #modal-overlay { background: rgba(180,190,200,.6); }
body.light #log-panel     { background: rgba(180,190,200,.5); }

/* Save bar */
body.light #save-bar-btn {
  border: 1px solid var(--amber); color: var(--amber);
  background: rgba(245,158,11,.08);
}
body.light #save-bar-btn:hover { background: rgba(245,158,11,.18); }

/* ── Status badges — higher contrast for white backgrounds ───── */
body.light .badge-empty       { background: rgba(100,116,139,.12); color: #475569; }
body.light .badge-available   { background: rgba(22,163,74,.10); color: #15803d; }
body.light .badge-in_progress { background: rgba(202,138,4,.10);  color: #a16207; }
body.light .badge-staging     { background: rgba(37,99,235,.10);  color: #1d4ed8; }
body.light .badge-outgoing    { background: rgba(147,51,234,.10); color: #7e22ce; }
body.light .badge-incoming    { background: rgba(13,148,136,.10); color: #0f766e; }
body.light .badge-ecycle      { background: rgba(220,38,38,.10);  color: #b91c1c; }
body.light .badge-unknown     { background: rgba(100,116,139,.10); color: #475569; }
body.light .shelf-tile.in_progress .tile-status  { color: #a16207; }
body.light .shelf-tile.in_progress::before       { background: #ca8a04; }
body.light .shelf-tile.staging .tile-status       { color: #1d4ed8; }
body.light .shelf-tile.staging::before            { background: #2563eb; }

/* ── Panel slot input — amber too faint on white ────────────── */
body.light .panel-slot-input { color: #a16207; }

/* ── Integ badges — yellow on white fails AA ─────────────── */
body.light .integ-badge.patches { color: #92400e; }
body.light .integ-badge.warn    { color: #92400e; }

/* ── Global help title — amber too faint on white ────────────── */
body.light .global-help-title { color: #92400e; }

/* ── Global help tags — ensure AA contrast on white ─────────── */
body.light .global-help-tag.inventoried { background: rgba(22,163,74,.12); color: #15803d; }
body.light .global-help-tag.monitored   { background: rgba(202,138,4,.12);  color: #a16207; }
body.light .global-help-tag.cw_only     { background: rgba(37,99,235,.12);  color: #1d4ed8; }
body.light .global-help-tag.cw_inactive { background: rgba(220,38,38,.12);  color: #b91c1c; }

/* ── Group header type colors — darker for AA on white bg ── */
body.light .group-header.grp-cold_storage { border-bottom-color: rgba(29,78,216,.25); }
body.light .group-header.grp-cold_storage .group-header-name { color: #1d4ed8; }
body.light .group-header.grp-storage { border-bottom-color: rgba(22,163,74,.25); }
body.light .group-header.grp-storage .group-header-name { color: #15803d; }
body.light .group-header.grp-staging { border-bottom-color: rgba(180,83,9,.25); }
body.light .group-header.grp-staging .group-header-name { color: #b45309; }
body.light .group-header.grp-incoming { border-bottom-color: rgba(15,118,110,.25); }
body.light .group-header.grp-incoming .group-header-name { color: #0f766e; }
body.light .group-header.grp-outgoing { border-bottom-color: rgba(126,34,206,.25); }
body.light .group-header.grp-outgoing .group-header-name { color: #7e22ce; }
body.light .group-header.grp-ecycle { border-bottom-color: rgba(185,28,28,.25); }
body.light .group-header.grp-ecycle .group-header-name { color: #b91c1c; }

/* ── Cold storage divider — blue too faint on white ──────── */
body.light .cold-storage-divider-label { color: #1d4ed8; }
body.light .cold-storage-divider-line  { background: rgba(29,78,216,.3); }

/* Edit mode — stronger borders on light backgrounds */
body.light .group-reorder-btn {
  border-color: var(--border2); color: var(--text);
}
body.light .group-reorder-btn:hover:not(:disabled) { border-color: var(--amber-d); }
body.light .group-display-toggle {
  border-color: var(--border2); color: var(--text);
}
body.light .group-display-toggle:hover { border-color: var(--amber-d); }
body.light .group-bulk-add button { border-color: var(--border2); color: var(--text); }
body.light .group-bulk-add button:hover { border-color: var(--amber-d); }
body.light .group-bulk-add input[type=number] { border-color: var(--border2); }
body.light .group-new-btn { border-color: var(--border2); color: var(--muted); }
body.light .group-new-btn:hover { border-color: var(--amber-d); color: var(--amber); }
body.light .group-delete-btn { opacity: 1; }
body.light .group-move-tab-btn { opacity: 1; }
body.light .move-tab-menu {
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
}

/* List-view hover tints */
body.light .outgoing-item:hover   { background: rgba(168,85,247,.06); }
body.light .ecycle-item:hover     { background: rgba(239,68,68,.06); }
body.light .group-list-item:hover { border-color: var(--amber-d); background: rgba(0,0,0,.03); }
body.light .incoming-item:hover   { background: rgba(20,184,166,.06); }

/* ── Global panel — amber too faint on white ─────────────── */
body.light .global-panel-section h4 { color: #92400e; }
body.light .gp-notes-input, body.light .gp-tenant-input {
  border-color: var(--border);
}
body.light .gp-notes-input:focus, body.light .gp-tenant-input:focus {
  border-color: #92400e;
}
body.light .global-device-row.selected { border-color: #92400e; background: rgba(245,158,11,.1); }
body.light .gp-save-btn { color: #92400e; border-color: #92400e; }
body.light .gp-save-btn:hover { background: rgba(245,158,11,.12); }
body.light .gp-links a:hover { color: #92400e; border-color: #92400e; }

/* ── Needs-RMM badge & compliance notice — darker red for white bg */
body.light .global-tag-needs-rmm { background: rgba(220,38,38,.12); color: #dc2626; border-color: rgba(220,38,38,.4); }
body.light .gp-compliance-notice { background: rgba(220,38,38,.08); border-color: rgba(220,38,38,.3); color: #dc2626; }
body.light .global-tag-spare { background: rgba(79,70,229,.1); color: #4f46e5; border-color: rgba(79,70,229,.35); }
body.light .global-tag-server { background: rgba(147,51,234,.1); color: #7c3aed; border-color: rgba(147,51,234,.35); }
body.light .gp-cw-status-notice { background: rgba(217,119,6,.08); border-color: rgba(217,119,6,.3); color: #b45309; }

/* ── Bench view — amber too faint on white ────────────────── */
body.light .bench-log-action { color: #92400e; }
body.light #bench-oldmachine-card h3 { color: #7e22ce; }
body.light .bench-oldmachine-device:hover { background: rgba(59,130,246,.08); }
body.light #bench-ai-analysis-card h3 { color: #7e22ce; }
body.light .bench-ai-ticket-label { color: #6b7280; }
body.light .bench-deploy-group-header { color: #6b7280; }

/* ── Focus rings ─────────────────────────────────────────── */
body.light :focus-visible {
  outline-color: #1a73e8;
}

/* ── Tab badge — darker amber for AA on white tab bar ────── */
body.light .tab-badge {
  background: #92400e; color: #ffffff;
}

/* ── Context menu — soft white surface, subtle shadow ────── */
body.light .context-menu {
  background: #ffffff;
  border-color: var(--border);
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
}
body.light .context-menu-item:hover:not(:disabled) {
  background: rgba(245,158,11,.10); color: #92400e;
}
body.light .context-menu-item.danger { color: #b91c1c; }
body.light .context-menu-item.danger:hover:not(:disabled) {
  background: rgba(220,38,38,.08); color: #b91c1c;
}

/* ── Bench tray — light surface, soft borders ────────────── */
body.light .bench-tray-group {
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
body.light .bench-tray-group.is-self {
  border-color: #92400e;
}
body.light .bench-tray-group-header {
  background: #f7f9fc;
}
body.light .bench-tray-group-header:hover { background: #eef2f7; }
body.light .bench-tray-avatar { color: var(--text); }
body.light .bench-tray-group.is-self .bench-tray-avatar {
  background: #92400e; color: #ffffff;
}
body.light .bench-tray-pin:hover { background: rgba(29,78,216,.05); }
body.light .bench-tray-pin-tenant { color: #0f766e; }
body.light .bench-tray-stale-count { color: #92400e; }
body.light .bench-tray-pin-stale {
  background: rgba(245,158,11,.14); color: #92400e;
}

/* ── Pin Note card — pale amber tint to distinguish from shared notes ── */
body.light .bench-pin-note-card {
  background: linear-gradient(180deg, rgba(245,158,11,.06), #fffaf0);
  border-color: rgba(245,158,11,.35);
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
body.light .bench-pin-note-card h3 {
  color: #92400e;
  background: rgba(245,158,11,.04);
  border-bottom-color: rgba(245,158,11,.25);
}
body.light .bench-pin-note-hint { color: #6b7280; }
body.light #bench-pin-note-text {
  background: #ffffff;
  border-color: var(--border2);
  color: var(--text);
}
body.light #bench-pin-note-text:focus {
  border-color: #92400e;
  outline: 2px solid rgba(245,158,11,.25);
  outline-offset: 0;
}
body.light .bench-pin-note-status { color: #6b7280; }
body.light .bench-pin-note-status.saved { color: #15803d; }
body.light .bench-pin-note-status.error { color: #b91c1c; }

/* ── Disposition (Phase 3) — softer fills, darker text for AA on white ── */
body.light .disposition-chip.disposition-deploy,
body.light .disposition-badge.disposition-deploy,
body.light .disposition-picker-btn.disposition-deploy,
body.light .disposition-option-pill.disposition-deploy {
  background: rgba(37,99,235,.10); color: #1d4ed8; border-color: rgba(37,99,235,.35);
}
body.light .disposition-chip.disposition-spare,
body.light .disposition-badge.disposition-spare,
body.light .disposition-picker-btn.disposition-spare,
body.light .disposition-option-pill.disposition-spare {
  background: rgba(100,116,139,.12); color: #475569; border-color: rgba(100,116,139,.35);
}
body.light .disposition-chip.disposition-decom,
body.light .disposition-badge.disposition-decom,
body.light .disposition-picker-btn.disposition-decom,
body.light .disposition-option-pill.disposition-decom {
  background: rgba(220,38,38,.10); color: #b91c1c; border-color: rgba(220,38,38,.35);
}
body.light .disposition-chip.disposition-rma,
body.light .disposition-badge.disposition-rma,
body.light .disposition-picker-btn.disposition-rma,
body.light .disposition-option-pill.disposition-rma {
  background: rgba(245,158,11,.12); color: #92400e; border-color: rgba(245,158,11,.4);
}
body.light .disposition-chip.disposition-diagnostic,
body.light .disposition-badge.disposition-diagnostic,
body.light .disposition-picker-btn.disposition-diagnostic,
body.light .disposition-option-pill.disposition-diagnostic {
  background: rgba(126,34,206,.10); color: #7e22ce; border-color: rgba(126,34,206,.35);
}

/* Picker modal — soft white panels and AA-safe accents */
body.light .modal .disposition-fieldset { border-color: var(--border); background: #fafbfd; }
body.light .modal .disposition-fieldset legend { color: #6b7280; }
body.light .modal .disposition-option:hover { background: rgba(146,64,14,.06); }
body.light .modal .disposition-option input[type="radio"] { accent-color: #92400e; }
body.light .modal .modal-required { color: #92400e; }

/* Inline disposition row + change link — darker amber/blue for AA */
body.light .bench-disposition-row { border-right-color: var(--border); }
body.light .bench-disposition-label { color: #6b7280; }
body.light .bench-disposition-ticket { color: #6b7280; }
body.light .btn-link, body.light .bench-disposition-change-btn { color: #1d4ed8; }
body.light .btn-link:hover, body.light .bench-disposition-change-btn:hover { color: #0f172a; }
body.light .bench-disposition-picker-wrap { border-top-color: var(--border); }
body.light .disposition-picker-btn { background: #ffffff; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
body.light .disposition-picker-btn.active { box-shadow: 0 0 0 2px #92400e; }

/* Resolve panel + discard escape hatch */
body.light .bench-resolve-panel label { color: #6b7280; }
body.light .bench-resolve-panel input[type="text"] {
  background: #ffffff;
  border-color: var(--border2);
  color: var(--text);
}
body.light .bench-resolve-panel input[type="text"]:focus { border-color: #92400e; }
body.light .bench-resolve-discard { border-top-color: var(--border); }
body.light .bench-discard-link { color: #b91c1c; }
body.light .bench-discard-link:hover { color: #7f1d1d; }
body.light .bench-discard-hint { color: #6b7280; }
