/* ═══════════════════════════════════════════════════════════════════
   HEOMI DESIGN SYSTEM — LIGHT THEME & COMMON COMPONENT STYLES
   ═══════════════════════════════════════════════════════════════════ */

/* ─── BASE THEME TOGGLE BUTTON (DARK & LIGHT) ─── */
.theme-toggle-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #f0f0f0;
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  font-family: inherit;
  white-space: nowrap;
  flex-shrink: 0;
  user-select: none;
}

.theme-toggle-btn:hover {
  background: rgba(255, 193, 7, 0.2);
  border-color: #ffc107;
  color: #ffc107;
}

/* ─── BUTTON SHEEN / SHINY LIGHT EFFECT ─── */
.nav-cta,
.btn-main,
.btn-primary,
.btn-sm-primary,
.btn-login,
.btn-wat-pill,
.btn-kid-pill,
.btn-stop-alarm,
.hl-btn-primary,
.hero-badge {
  position: relative;
  overflow: hidden;
}

.nav-cta::after,
.btn-main::after,
.btn-primary::after,
.btn-sm-primary::after,
.btn-login::after,
.btn-wat-pill::after,
.btn-kid-pill::after,
.btn-stop-alarm::after,
.hl-btn-primary::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 40%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: rotate(25deg);
  pointer-events: none;
  animation: btnSheen 4.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes btnSheen {

  0%,
  65% {
    left: -60%;
  }

  100% {
    left: 150%;
  }
}

/* ─── LIGHT THEME VARIABLES OVERRIDE (MATCHING LANDING.HTML) ─── */
html[data-theme="light"] {
  /* Common Core Colors */
  --bg: #dfe4ec;
  --bg-2: #d3d9e3;
  --bg-3: #c4cdd9;
  --panel: #ffffff;
  --panel-hover: #ffffff;
  --line: rgba(234, 179, 8, 0.28);
  --line-subtle: rgba(15, 23, 42, 0.1);
  --amber: #ca8a04;
  --gold: #eab308;
  --gold-dark: #ca8a04;
  --yellow: #eab308;
  --yellow-alt: #facc15;
  --safe: #16a34a;
  --cyan: #0284c7;
  --pink: #db2777;
  --orange: #f59e0b;
  --text-1: #0f172a;
  --text-2: #334155;
  --text-3: #64748b;
  --text-muted: #64748b;
  --heo-color: #64748b;
  --mi-color: #eab308;
  --grad-gold: linear-gradient(135deg, #facc15 0%, #eab308 55%, #ca8a04 100%);
  --grad-wat: linear-gradient(135deg, #fde047 0%, #facc15 45%, #eab308 100%);
  --grad-kid: linear-gradient(135deg, #3b82f6, #0284c7);
  --radius: 20px;
  --card-shadow: 0 10px 25px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.05);
  --box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.05);
  --nav-bg: rgba(223, 228, 236, 0.92);
  --footer-bg: #d3d9e3;
  --grid-opacity: 0.5;
  --badge-bg: #ffffff;
  --hero-glow: radial-gradient(circle, rgba(234, 179, 8, .24) 0%, rgba(59, 130, 246, 0.08) 45%, transparent 70%);
  --ticker-bg: linear-gradient(90deg, rgba(234, 179, 8, .14), rgba(250, 204, 21, .25), rgba(234, 179, 8, .14));
  --ticker-border: rgba(234, 179, 8, .35);
  --btn-text: #181204;
  --on-yellow: #181204;

  /* App, Management & Legacy variables */
  --bg-dark: #e6e6e6;
  --dark: #e6e6e6;
  --dark-mid: #ffffff;
  --surface: #d3d9e3;
  --panel-bg: #ffffff;
  --card-bg: #ffffff;
  --card-even-bg: #f8fafc;
  --input-bg: #ffffff;
  --primary: #eab308;
  --primary-hover: #ca8a04;
  --text: #0f172a;
  --border: rgba(15, 23, 42, 0.1);
  --border-color: rgba(15, 23, 42, 0.1);
  --tagline-color: rgba(202, 138, 4, 0.9);

  /* Status Colors */
  --success: #16a34a;
  --success-dim: rgba(22, 163, 74, 0.12);
  --danger: #dc2626;
  --danger-dim: rgba(220, 38, 38, 0.12);
  --warn: #ea580c;
  --alert: #dc2626;
  --green: #16a34a;
  --blue: #2563eb;

  /* Management Extended Palette */
  --log-bg: #0f172a;
  --chart-cpu: #2563eb;
  --chart-ram: #7c3aed;
  --cron-purple: #7c3aed;
  --cron-dim: rgba(124, 58, 237, 0.12);
  --interval-blue: #2563eb;
  --interval-dim: rgba(37, 99, 235, 0.12);
  --tg-blue: #0284c7;
  --tg-dim: rgba(2, 132, 199, 0.12);
  --info: #0284c7;
  --info-dim: rgba(2, 132, 199, 0.12);
  --purple: #7c3aed;
  --purple-dim: rgba(124, 58, 237, 0.12);
  --orange: #ea580c;
  --orange-dim: rgba(234, 88, 12, 0.12);
  --teal: #0d9488;
  --teal-dim: rgba(13, 148, 136, 0.12);
}

/* ─── LIGHT THEME OVERRIDES FOR NAVIGATION ─── */
html[data-theme="light"] nav,
html[data-theme="light"] .app-header {
  background: var(--bg-dark) !important;
  border-bottom: 1px solid var(--line) !important;
  box-shadow: 0 1px 12px rgba(15, 23, 42, 0.06);
}

html[data-theme="light"] .nav-links a {
  color: var(--text-2);
}

html[data-theme="light"] .nav-links a:hover,
html[data-theme="light"] .nav-links a.active {
  color: var(--gold) !important;
}

html[data-theme="light"] .theme-toggle-btn {
  background: #ffffff;
  border: 1px solid var(--line-subtle);
  color: var(--text-1);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.05);
}

html[data-theme="light"] .theme-toggle-btn:hover {
  background: rgba(234, 179, 8, 0.15);
  border-color: rgba(234, 179, 8, 0.4);
  color: var(--gold);
}

/* ─── LIGHT THEME OVERRIDES FOR BACKGROUND GRID & NOISE ─── */
html[data-theme="light"] body::before {
  opacity: var(--grid-opacity, 0.5) !important;
  background-image:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E"),
    linear-gradient(rgba(234, 179, 8, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(234, 179, 8, 0.035) 1px, transparent 1px) !important;
}

html[data-theme="light"] body::after {
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px) !important;
}

/* ─── LIGHT THEME OVERRIDES FOR CARDS, PANELS & CONTAINERS ─── */
html[data-theme="light"] .panel,
html[data-theme="light"] .card,
html[data-theme="light"] .stat-card,
html[data-theme="light"] .cron-card,
html[data-theme="light"] .log-card,
html[data-theme="light"] .config-card,
html[data-theme="light"] .task-card,
html[data-theme="light"] .ai-card,
html[data-theme="light"] .modal-box,
html[data-theme="light"] .modal-content,
html[data-theme="light"] .user-card,
html[data-theme="light"] .detail-card,
html[data-theme="light"] .history-card,
html[data-theme="light"] .login-card,
html[data-theme="light"] .setting-card,
html[data-theme="light"] .query-card,
html[data-theme="light"] .chat-card,
html[data-theme="light"] .device-details-wrap .inner-page-container {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
  box-shadow: var(--card-shadow) !important;
}

html[data-theme="light"] .panel-header,
html[data-theme="light"] .card-head,
html[data-theme="light"] .card-header,
html[data-theme="light"] .stat-head,
html[data-theme="light"] .log-head,
html[data-theme="light"] .modal-head,
html[data-theme="light"] .modal-header,
html[data-theme="light"] .cron-head,
html[data-theme="light"] .device-header,
html[data-theme="light"] .login-header {
  border-bottom-color: rgba(15, 23, 42, 0.08) !important;
}

/* ─── LIGHT THEME OVERRIDES FOR LIST ITEMS & CHIPS ─── */
html[data-theme="light"] .follower-item,
html[data-theme="light"] .task-item,
html[data-theme="light"] .cron-item,
html[data-theme="light"] .history-item,
html[data-theme="light"] .list-item,
html[data-theme="light"] .log-cmd,
html[data-theme="light"] .endpoint-row,
html[data-theme="light"] .config-row,
html[data-theme="light"] .setting-item {
  background: #f8fafc !important;
  border-color: rgba(15, 23, 42, 0.08) !important;
}

/* ─── LIGHT THEME OVERRIDES FOR INPUTS & FORMS ─── */
html[data-theme="light"] input[type="text"],
html[data-theme="light"] input[type="password"],
html[data-theme="light"] input[type="search"],
html[data-theme="light"] input[type="number"],
html[data-theme="light"] input[type="tel"],
html[data-theme="light"] select,
html[data-theme="light"] textarea,
html[data-theme="light"] .user-picker-input,
html[data-theme="light"] .search-input,
html[data-theme="light"] .settings-select,
html[data-theme="light"] .form-input,
html[data-theme="light"] .input-group input {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}

html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder {
  color: #94a3b8 !important;
}

html[data-theme="light"] input:focus,
html[data-theme="light"] textarea:focus,
html[data-theme="light"] select:focus {
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.18) !important;
}

html[data-theme="light"] input[type="range"] {
  background: rgb(0 0 0 / 10%) !important;
}

/* ─── LIGHT THEME OVERRIDES FOR BUTTONS ─── */
html[data-theme="light"] .btn-ghost,
html[data-theme="light"] .btn-sm-ghost,
html[data-theme="light"] .btn-outline,
html[data-theme="light"] .btn-logout,
html[data-theme="light"] .btn-logout-header {
  background: #ffffff !important;
  color: var(--text-2) !important;
  border-color: #cbd5e1 !important;
}

html[data-theme="light"] .btn-ghost:hover,
html[data-theme="light"] .btn-sm-ghost:hover,
html[data-theme="light"] .btn-outline:hover,
html[data-theme="light"] .btn-logout:hover,
html[data-theme="light"] .btn-logout-header:hover {
  background: rgba(234, 179, 8, 0.1) !important;
  border-color: var(--gold) !important;
  color: var(--amber) !important;
}

html[data-theme="light"] .btn-primary,
html[data-theme="light"] .btn-sm-primary,
html[data-theme="light"] .btn-login,
html[data-theme="light"] .btn-main,
html[data-theme="light"] .nav-cta,
html[data-theme="light"] .hl-btn-primary {
  background: var(--grad-gold) !important;
  color: var(--btn-text) !important;
  box-shadow: 0 4px 14px rgba(234, 179, 8, 0.35) !important;
}

html[data-theme="light"] .btn-primary:hover:not(:disabled),
html[data-theme="light"] .btn-sm-primary:hover:not(:disabled),
html[data-theme="light"] .btn-login:hover:not(:disabled),
html[data-theme="light"] .btn-main:hover,
html[data-theme="light"] .nav-cta:hover,
html[data-theme="light"] .hl-btn-primary:hover {
  box-shadow: 0 8px 24px rgba(234, 179, 8, 0.5) !important;
  transform: translateY(-2px);
}

html[data-theme="light"] .btn-danger,
html[data-theme="light"] .btn-sm-danger {
  background: rgba(239, 83, 80, 0.1) !important;
  color: #dc2626 !important;
  border-color: rgba(239, 83, 80, 0.3) !important;
}

/* ─── LIGHT THEME OVERRIDES FOR TABLES ─── */
html[data-theme="light"] table {
  border-color: rgba(15, 23, 42, 0.08) !important;
}

html[data-theme="light"] th {
  background: #f8fafc !important;
  color: #334155 !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

html[data-theme="light"] td {
  border-bottom: 1px solid #f1f5f9 !important;
  color: #0f172a !important;
}

html[data-theme="light"] tr:hover td {
  background: #f8fafc !important;
}

/* ─── LIGHT THEME OVERRIDES FOR CODE, JSON & TERMINAL ─── */
html[data-theme="light"] .json-viewer,
html[data-theme="light"] pre:not(.log-body),
html[data-theme="light"] code:not(.inline-code) {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  color: #0f172a !important;
}

/* ─── LIGHT THEME OVERRIDES FOR MODALS & OVERLAYS ─── */
html[data-theme="light"] .modal-overlay,
html[data-theme="light"] .modal-backdrop,
html[data-theme="light"] .install-guide-overlay {
  background: rgba(15, 23, 42, 0.45) !important;
  backdrop-filter: blur(6px) !important;
}

html[data-theme="light"] .install-guide-card {
  background: #ffffff !important;
  border-color: rgba(234, 179, 8, 0.35) !important;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.15), 0 0 24px rgba(234, 179, 8, 0.12) !important;
}

html[data-theme="light"] .install-guide-header {
  border-bottom-color: rgba(15, 23, 42, 0.08) !important;
}

html[data-theme="light"] .install-guide-title {
  color: #0f172a !important;
}

html[data-theme="light"] .install-guide-title i {
  color: #ca8a04 !important;
}

html[data-theme="light"] .install-guide-btn-x {
  color: #64748b !important;
}

html[data-theme="light"] .install-guide-btn-x:hover {
  background: rgba(15, 23, 42, 0.06) !important;
  color: #0f172a !important;
}

html[data-theme="light"] .install-guide-step {
  background: #f8fafc !important;
  border-color: rgba(15, 23, 42, 0.08) !important;
}

html[data-theme="light"] .install-guide-step:hover {
  border-color: rgba(202, 138, 4, 0.4) !important;
}

html[data-theme="light"] .ig-num {
  background: rgba(234, 179, 8, 0.15) !important;
  border-color: rgba(202, 138, 4, 0.45) !important;
  color: #ca8a04 !important;
}

html[data-theme="light"] .ig-step-tag {
  color: #ca8a04 !important;
}

html[data-theme="light"] .ig-step-desc {
  color: #334155 !important;
}

html[data-theme="light"] .ig-step-desc b {
  color: #0f172a !important;
}

html[data-theme="light"] .ig-icon-highlight {
  color: #ca8a04 !important;
}

html[data-theme="light"] .ig-step-media {
  border-color: rgba(15, 23, 42, 0.1) !important;
  background: #f1f5f9 !important;
}

html[data-theme="light"] .install-guide-close {
  background: var(--grad-gold) !important;
  color: var(--btn-text) !important;
  box-shadow: 0 4px 14px rgba(234, 179, 8, 0.35) !important;
}

/* ─── LIGHT THEME OVERRIDES FOR TRACKER & DEVICE CARDS ─── */
html[data-theme="light"] .owned-device-item {
  background: #ffffff !important;
  border: 2px solid #eab308 !important;
  box-shadow: 0 0 16px rgba(234, 179, 8, 0.25), 0 10px 30px rgba(15, 23, 42, 0.06) !important;
}

html[data-theme="light"] .device-card {
  background: #f8fafc !important;
  border: 1px solid #ffedba !important;
  box-shadow: 0 0 16px rgba(234, 179, 8, 0.25), 0 10px 30px rgba(15, 23, 42, 0.06) !important;
}

html[data-theme="light"] .owned-device-item:hover {
  border-color: #ca8a04 !important;
  box-shadow: 0 0 26px rgba(234, 179, 8, 0.4), 0 14px 36px rgba(15, 23, 42, 0.1) !important;
  transform: translateY(-2px);
}

html[data-theme="light"] .owned-device-item.--even {
  background: #f8fafc !important;
}

html[data-theme="light"] .dev-action-btn.yellow {
  color: #ca8a04;
  border-color: rgba(202, 138, 4, 0.3);
  background: rgba(234, 179, 8, 0.1);
}

html[data-theme="light"] .dev-action-btn.yellow:hover:not(:disabled) {
  background: rgba(234, 179, 8, 0.2);
}

html[data-theme="light"] .chat-input {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.15) !important;
  color: var(--text-1) !important;
}

html[data-theme="light"] .chat-input::placeholder {
  color: var(--text-muted) !important;
  opacity: 0.85;
}

html[data-theme="light"] .btn-media-action {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.12);
  color: var(--text-2);
}

html[data-theme="light"] .settings-select option {
  background: #ffffff;
  color: var(--text-1);
}

html[data-theme="light"] .dev-req-accr-body {
  border-top: 1px solid rgb(105 105 105 / 10%) !important;
}

html[data-theme="light"] .c-check input[type="checkbox"],
html[data-theme="light"] .c-radio input[type="radio"],
[data-theme="light"] .c-check input[type="checkbox"],
[data-theme="light"] .c-radio input[type="radio"] {
  border: 2px solid rgb(234 179 8);
}