/* Light theme legibility + shared header fixes. Additive; loaded last. */

/* ---- surfaces converted from dark by light_fix.js ---- */
html .sqx-lt-surf { background: var(--surface) !important; background-image: none !important; border: 1px solid var(--border-light) !important; box-shadow: 0 1px 2px rgba(16,19,16,.05) !important; }
html .sqx-lt-tint { background: color-mix(in srgb, var(--text) 5%, var(--bg)) !important; background-image: none !important; border-color: var(--border-light) !important; }

/* ---- fields, frames and tables must stay visible in Light ---- */
html[data-skin="white"] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
html[data-skin="white"] select,
html[data-skin="white"] textarea {
  background: #fff !important; color: var(--text) !important;
  border: 1px solid #9AA39C !important; border-radius: 6px;
  box-shadow: inset 0 1px 1px rgba(16,19,16,.04);
}
html[data-skin="white"] input::placeholder, html[data-skin="white"] textarea::placeholder { color: #6b756e !important; opacity: 1; }
html[data-skin="white"] input:focus, html[data-skin="white"] select:focus, html[data-skin="white"] textarea:focus {
  outline: 2px solid color-mix(in srgb, var(--accent) 60%, transparent) !important; outline-offset: 1px; border-color: var(--accent) !important;
}
html[data-skin="white"] table { border-collapse: collapse; }
html[data-skin="white"] th { background: var(--surface3) !important; color: var(--text) !important; border-bottom: 1px solid var(--border-light) !important; }
html[data-skin="white"] td { color: var(--text); border-bottom: 1px solid var(--border) !important; }
html[data-skin="white"] .tab-content label, html[data-skin="white"] .tab-content h1, html[data-skin="white"] .tab-content h2,
html[data-skin="white"] .tab-content h3, html[data-skin="white"] .tab-content h4 { color: var(--text); }
html[data-skin="white"] .tab-content p, html[data-skin="white"] .tab-content small { color: var(--muted2); }
html[data-skin="white"] .stat-card, html[data-skin="white"] .card, html[data-skin="white"] .panel, html[data-skin="white"] .metric-card {
  background: var(--surface) !important; border: 1px solid var(--border-light) !important;
}
html[data-skin="white"] .btn:not(.btn-primary):not(.btn-success):not(.btn-danger) { border: 1px solid #9AA39C; }

/* ---- full-width content ---- */
.tab-content { max-width: none !important; padding: 28px clamp(16px, 2.2vw, 40px) 110px !important; }

/* ---- nav dropdowns: only the hovered / clicked group may be open ---- */
.sqx-hd .sqx-dd:focus-within:not(:hover):not(.open) .sqx-menu { display: none !important; }
.sqx-hd .sqx-menu { z-index: 900; }
html[data-skin='white'] .btn.btn-success, html[data-skin='mist'] .btn.btn-success { background:#067a47 !important; color:#fff !important; border-color:#056138 !important; }
html:not([data-skin='white']):not([data-skin='mist']) .action-btn.call-btn { color:#04261a !important; }
html[data-skin='white'] span[style*='opacity: 0.8'], html[data-skin='mist'] span[style*='opacity: 0.8'] { opacity:1 !important; }
