/* ==========================================================
   Janus Theme
   Palette: sidebar viola #312354, content #eeedf4, accent #312354
   Si applica quando <html data-theme="janus">
   ========================================================== */

[data-theme="janus"] {
    /* — Sidebar — */
    --sidebar-bg: #312354;
    --sidebar-bg-gradient: linear-gradient(180deg, #3d2b68 0%, #281d46 100%);
    --sidebar-color: #ffffff;
    --sidebar-hover: rgba(200, 180, 255, 0.10);
    --sidebar-active: rgba(200, 180, 255, 0.18);
    --sidebar-border: rgba(200, 180, 255, 0.12);
    --sidebar-group-color: rgba(200, 180, 255, 0.50);

    /* — Superfici — */
    --content-bg: #eeedf4;
    --card-bg: #ffffff;
    --card-shadow: 0 1px 3px rgba(49, 35, 84, 0.05), 0 4px 16px rgba(49, 35, 84, 0.07);
    --card-shadow-hover: 0 4px 24px rgba(49, 35, 84, 0.13);

    /* — Bordi — */
    --border-color: #dddbe8;
    --border-input: #c4c0d8;

    /* — Testo — */
    --text-primary: #1e1633;
    --text-secondary: #5e5480;
    --text-muted: #9b92b8;

    /* — Colori principali — */
    --accent: #312354;
    --accent-hover: #3d2b68;
    --accent-light: rgba(49, 35, 84, 0.08);
    --highlight: #7c6aad;
    --highlight-light: rgba(124, 106, 173, 0.12);
    --magenta: #c0257f;
    --magenta-light: rgba(192, 37, 127, 0.10);
    --gold: #e8a020;
    --gold-light: rgba(232, 160, 32, 0.12);

    /* — Colori semantici — */
    --success: #22c55e;
    --success-light: #f0fdf4;
    --warning: #e8a020;
    --warning-light: rgba(232, 160, 32, 0.12);
    --danger: #ef4444;
    --danger-light: #fef2f2;
    --info: #7c6aad;
    --info-light: rgba(124, 106, 173, 0.12);

    /* — Primary Background Subtle — */
    --primary-bg-subtle: rgba(49, 35, 84, 0.08);
}

/* ----------------------------------------------------------------
   Sidebar: colori hardcoded nel base CSS → override
   ---------------------------------------------------------------- */
[data-theme="janus"] .sidebar-menu-link {
    color: rgba(255, 255, 255, 0.65);
}

[data-theme="janus"] .sidebar-menu-link:hover {
    border-left-color: #a992d4;
    color: #ffffff;
}

[data-theme="janus"] .sidebar-menu-link.active {
    border-left-color: #a992d4;
    color: #ffffff;
}

[data-theme="janus"] .sidebar-menu-link.active i {
    color: #a992d4;
}

[data-theme="janus"] .sidebar-divider {
    background-color: rgba(200, 180, 255, 0.10);
}

[data-theme="janus"] .sidebar-footer {
    border-top-color: rgba(200, 180, 255, 0.10);
    background: rgba(0, 0, 0, 0.15);
}

[data-theme="janus"] .user-role {
    color: rgba(200, 180, 255, 0.60);
}

[data-theme="janus"] .user-avatar {
    background: linear-gradient(135deg, #7c6aad, #c0257f);
}

/* ----------------------------------------------------------------
   Topbar
   ---------------------------------------------------------------- */
[data-theme="janus"] .topbar {
    background-color: #ffffff;
    border-bottom-color: #dddbe8;
    box-shadow: 0 1px 3px rgba(49, 35, 84, 0.04);
}

/* ----------------------------------------------------------------
   Buttons
   ---------------------------------------------------------------- */
[data-theme="janus"] .btn-primary {
    background-color: #312354;
    border-color: #312354;
    color: #ffffff;
}

[data-theme="janus"] .btn-primary:hover,
[data-theme="janus"] .btn-primary:focus {
    background-color: #3d2b68;
    border-color: #3d2b68;
    color: #ffffff;
}

[data-theme="janus"] .btn-outline-primary {
    color: #312354;
    border-color: #312354;
}

[data-theme="janus"] .btn-outline-primary:hover {
    background-color: #312354;
    color: #ffffff;
}

/* ----------------------------------------------------------------
   Form inputs
   ---------------------------------------------------------------- */
[data-theme="janus"] .form-control:focus,
[data-theme="janus"] .form-select:focus {
    border-color: #7c6aad;
    box-shadow: 0 0 0 3px rgba(124, 106, 173, 0.18);
}

/* ----------------------------------------------------------------
   Tables
   ---------------------------------------------------------------- */
[data-theme="janus"] .table thead th {
    background-color: rgba(49, 35, 84, 0.04);
    border-bottom-color: #dddbe8;
    color: var(--text-secondary);
}

[data-theme="janus"] .table tbody tr:hover td {
    background-color: rgba(49, 35, 84, 0.03);
}

/* ----------------------------------------------------------------
   Badges
   ---------------------------------------------------------------- */
[data-theme="janus"] .badge.bg-primary {
    background-color: rgba(49, 35, 84, 0.12) !important;
    color: #312354 !important;
}

/* ----------------------------------------------------------------
   Card tabs active
   ---------------------------------------------------------------- */
[data-theme="janus"] .card-tabs .card-tab.active {
    color: #312354;
    border-bottom-color: #312354;
}

/* ----------------------------------------------------------------
   Sidebar toggle hover
   ---------------------------------------------------------------- */
[data-theme="janus"] .sidebar-toggle:hover,
[data-theme="janus"] .notification-icon:hover {
    background-color: rgba(49, 35, 84, 0.08);
}

/* ----------------------------------------------------------------
   Theme Toggle Button
   ---------------------------------------------------------------- */
.theme-toggle-btn {
    background: none;
    border: none;
    font-size: 1.1rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 8px;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.theme-toggle-btn:hover {
    background-color: var(--accent-light);
    color: var(--text-primary);
}
