/* Light theme overrides. Templates ship dark vars in :root by default;
   higher-specificity html[data-theme="light"] flips them. */
html[data-theme="light"] {
    --bg-primary: #dbe3ee;     /* page bg — darker so white cards stand out */
    --bg-secondary: #c8d2df;   /* sidebar/header — darker than body for separation */
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --accent-blue: #2563eb;
    --accent-green: #059669;
    --accent-orange: #d97706;
    --accent-red: #dc2626;
    --accent-purple: #7c3aed;
    --border-color: #94a3b8;   /* stronger outline on data cards */
    --shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 4px 12px rgba(15, 23, 42, 0.06);
}

/* Floating theme toggle button */
.theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
    box-shadow: var(--shadow);
    z-index: 9999;
    transition: background 0.15s ease, transform 0.15s ease;
}
.theme-toggle:hover {
    background: var(--bg-card-hover);
    transform: scale(1.05);
}
.theme-toggle:focus {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

/* Hide the icon for the inactive theme so only one shows at a time */
html[data-theme="dark"]  .theme-toggle .icon-sun  { display: none; }
html[data-theme="light"] .theme-toggle .icon-moon { display: none; }
