@charset "UTF-8";
@import url('https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

/* =====================================================
   ADMIN CSS — DTStreetVoice
   Palette: Blue-Steel / Civic Data
   Modes: light (default) · dark [data-theme="dark"]
   Rule: Every color is a var() — zero inline hex
   ===================================================== */


/* ── 1. TOKENS — LIGHT (default) ── */
:root {
    /* Surfaces */
    --bg-base: #F4F7FA;
    --bg-surface: #FFFFFF;
    --bg-elevated: #FFFFFF;
    --bg-surface-alt: #F4F7FA;
    --bg-sidebar: #FFFFFF;
    --bg-header: #FFFFFF;
    --bg-nav-active: #EBF4FB;
    --bg-table-head: #1B2F40;
    --bg-input: #F4F7FA;

    /* Borders */
    --border-default: #D6E4EF;
    --border-strong: #AECDE4;
    --border-focus: #3E97D4;

    /* Text */
    --text-primary: #14253A;
    --text-secondary: #5B7A90;
    --text-muted: #8AAEC8;
    --text-on-dark: #D8EAF6;
    --text-table-head: #D8EAF6;

    /* Accent */
    --accent: #3E97D4;
    --accent-dark: #1B2F40;
    --accent-hover: #2E7CB8;
    --accent-subtle: #EBF4FB;
    --accent-light: #6bbfe8;
    --accent-deep:  #1762ae;

    /* Nav */
    --nav-active-bg: #1B2F40;
    --nav-active-color: #D8EAF6;
    --nav-active-border: transparent;
    --nav-active-icon: #D8EAF6;
    --nav-item-color: #5B7A90;
    --nav-group-color: #8AAEC8;

    /* Status */
    --status-green: #45AB51;
    --status-green-bg: #E8F7E9;
    --status-red: #E24B4A;
    --status-red-bg: #FDEAEA;
    --status-amber: #FDB14D;
    --status-amber-bg: #FEF5E7;
    --status-blue: #1A7EC8;
    --status-blue-bg: #D6EEFA;

    /* Shadows */
    --shadow-card: 0 1px 3px rgba(20, 37, 58, 0.07), 0 4px 16px rgba(20, 37, 58, 0.04);
    --shadow-dropdown: 0 8px 24px rgba(20, 37, 58, 0.12);
    --shadow-header: 0 1px 0 var(--border-default);

    /* Layout */
    --font: 'Rubik', sans-serif;
    --sidebar-width: 268px;
    --sidebar-collapsed: 72px;
    --header-height: 64px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;

    /* ── Legacy aliases — every existing rule keeps working ── */
    --white-color: #FFFFFF;
    --black-color: #000000;
    --black-50: rgba(0, 0, 0, 0.5);
    --body-color: var(--text-primary);
    --primary-color: var(--accent-dark);
    --assest-color: var(--bg-surface-alt);
    --green-color: var(--status-green);
    --red-color: var(--status-red);

    /* RGB channels — for rgba() shadow usage */
    --accent-rgb: 62, 151, 212;
    --status-red-rgb: 226, 75, 74;

    /* Gradient depth tokens */
    --status-red-deep: #BE2929;

    /* Story card — glass-overlay tokens (always on dark image gradient, no dark-mode flip needed) */
    --sc-glass-bg:     rgba(255, 255, 255, 0.18);
    --sc-glass-border: rgba(255, 255, 255, 0.25);
    --sc-glass-hover:  rgba(255, 255, 255, 0.32);
    --sc-play-border:  rgba(255, 255, 255, 0.55);
    --sc-play-hover:   rgba(255, 255, 255, 0.38);
    --sc-text-img:     #ffffff;
    --sc-desc-img:     rgba(255, 255, 255, 0.78);
    --sc-date-img:     rgba(255, 255, 255, 0.55);
    --sc-img-gradient: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.08) 0%,
        rgba(0, 0, 0, 0.10) 35%,
        rgba(0, 0, 0, 0.65) 65%,
        rgba(0, 0, 0, 0.92) 100%
    );
}


/* ── 2. TOKENS — DARK [data-theme="dark"] ── */
[data-theme="dark"] {
    --bg-base: #0E1825;
    --bg-surface: #111B26;
    --bg-elevated: #18293A;
    --bg-surface-alt: #18293A;
    --bg-sidebar: #111B26;
    --bg-header: #111B26;
    --bg-nav-active: #1F3347;
    --bg-table-head: #2E4D65;
    --bg-input: #111B26;

    --border-default: #2A4255;
    --border-strong: #3E6080;
    --border-focus: #3E97D4;

    --text-primary: #D8EAF6;
    --text-secondary: #8AAEC8;
    --text-muted: #5B7A90;
    --text-on-dark: #D8EAF6;
    --text-table-head: #D8EAF6;

    --accent: #3E97D4;
    --accent-dark: #1F3347;
    --accent-hover: #5AAEE0;
    --accent-subtle: #1A3450;

    --nav-active-bg: #3E97D4;
    --nav-active-color: #FFFFFF;
    --nav-active-border: transparent;
    --nav-active-icon: #FFFFFF;
    --nav-item-color: #8AAEC8;
    --nav-group-color: #5B7A90;

    --status-green: #45AB51;
    --status-green-bg: rgba(69, 171, 81, 0.15);
    --status-red: #E24B4A;
    --status-red-bg: rgba(226, 75, 74, 0.15);
    --status-amber: #FDB14D;
    --status-amber-bg: rgba(253, 177, 77, 0.15);
    --status-blue: #5AAEE0;
    --status-blue-bg: rgba(62, 151, 212, 0.20);

    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.2);
    --shadow-dropdown: 0 8px 24px rgba(0, 0, 0, 0.45);
    --shadow-header: 0 1px 0 var(--border-default);

    --white-color: #FFFFFF;
    --black-color: #000000;
    --black-50: rgba(0, 0, 0, 0.5);
    --body-color: var(--text-primary);
    --primary-color: var(--accent);
    --assest-color: var(--bg-surface-alt);
    --green-color: var(--status-green);
    --red-color: var(--status-red);

    --accent-rgb: 62, 151, 212;
    --status-red-rgb: 226, 75, 74;
    --status-red-deep: #991B1B;
}


/* ── 3. BASE ── */
html,
body {
    height: 100%;
    overflow: auto;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font);
    color: var(--text-primary);
    background-color: var(--bg-base);
    font-size: 14px;
    overflow-x: hidden;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.h1,
.h2,
.h3,
.h4,
.h5,
.h6,
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font);
    color: var(--text-primary);
}

.defaultfont {
    font-family: var(--font);
}

a {
    text-decoration: none !important;
}


/* ── 4. UTILITIES ── */
.primary-color {
    color: var(--primary-color);
}

.primary-bg {
    background-color: var(--primary-color) !important;
}

.text-gray {
    color: var(--text-secondary);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: var(--radius-xl);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.status-badge--green {
    background: var(--status-green-bg);
    color: var(--status-green);
}

.status-badge--red {
    background: var(--status-red-bg);
    color: var(--status-red);
}

.status-badge--amber {
    background: var(--status-amber-bg);
    color: var(--status-amber);
}

.status-badge--blue {
    background: var(--status-blue-bg);
    color: var(--status-blue);
}

.status-badge--purple {
    background: var(--status-purple-bg);
    color: var(--status-purple);
}

.status-badge--gray {
    background: var(--bg-surface-alt);
    color: var(--text-secondary);
    border: 1px solid var(--border-default);
}


/* ── 5. BUTTONS ── */
.btn:focus { outline: none; box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.2); }

.btn-link {
    color: var(--accent) !important;
    font-weight: 600;
    border-bottom: 1px solid var(--accent);
    display: inline-block;
    padding: 0;
    border-radius: 0;
    font-size: 14px;
}

.btn-default {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    color: var(--white-color);
    border: none;
    padding: 10px 28px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    box-shadow: 0 4px 14px rgba(var(--accent-rgb), 0.32);
    transition: transform 150ms ease, box-shadow 200ms ease, background 200ms ease;
    position: relative;
    overflow: hidden;
}
.btn-default::after {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(110deg, transparent 20%, rgba(255,255,255,0.18) 50%, transparent 80%);
    transition: left 480ms ease;
    pointer-events: none;
}
.btn-default:hover::after { left: 150%; }
.btn-default:hover {
    color: var(--white-color);
    background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(var(--accent-rgb), 0.42);
    border-color: transparent;
}
.btn-default:active {
    transform: scale(0.97);
    box-shadow: 0 2px 8px rgba(var(--accent-rgb), 0.28);
}
.btn-default:focus,
.btn-default:focus-visible {
    outline: none !important;
    box-shadow: 0 4px 14px rgba(var(--accent-rgb), 0.32) !important;
    color: var(--white-color) !important;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%) !important;
}
[data-theme="dark"] .btn-default {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    box-shadow: 0 4px 14px rgba(var(--accent-rgb), 0.20);
}
[data-theme="dark"] .btn-default:hover {
    background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent) 100%);
    box-shadow: 0 6px 18px rgba(var(--accent-rgb), 0.24);
    color: var(--white-color);
}

.mw-120 {
    min-width: 120px;
}

.mw-150 {
    min-width: 150px;
}

.btn-icon {
    padding: 6px 10px;
    border-radius: var(--radius-md);
    background: var(--accent-subtle);
    color: var(--accent);
    border: none;
    transition: background 0.15s;
}

.btn-icon:hover {
    background: var(--accent);
    color: var(--white-color);
}

.btn-cancel {
    background: linear-gradient(135deg, var(--status-red) 0%, var(--status-red-deep) 100%);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    color: var(--white-color);
    border: none;
    padding: 10px 28px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    box-shadow: 0 4px 14px rgba(var(--status-red-rgb), 0.30);
    transition: transform 150ms ease, box-shadow 200ms ease, background 200ms ease;
    position: relative;
    overflow: hidden;
    text-decoration: none;
}
.btn-cancel::after {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(110deg, transparent 20%, rgba(255,255,255,0.18) 50%, transparent 80%);
    transition: left 480ms ease;
    pointer-events: none;
}
.btn-cancel:hover::after { left: 150%; }
.btn-cancel:hover {
    color: var(--white-color);
    background: linear-gradient(135deg, var(--status-red-deep) 0%, var(--status-red) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(var(--status-red-rgb), 0.40);
    border-color: transparent;
}
.btn-cancel:active {
    transform: scale(0.97);
    box-shadow: 0 2px 8px rgba(var(--status-red-rgb), 0.25);
}
.btn-cancel:focus,
.btn-cancel:focus-visible {
    outline: none !important;
    box-shadow: 0 4px 14px rgba(var(--status-red-rgb), 0.30) !important;
    color: var(--white-color) !important;
    background: linear-gradient(135deg, var(--status-red) 0%, var(--status-red-deep) 100%) !important;
}
[data-theme="dark"] .btn-cancel {
    background: linear-gradient(135deg, var(--status-red) 0%, var(--status-red-deep) 100%);
    box-shadow: 0 4px 14px rgba(var(--status-red-rgb), 0.35);
}
[data-theme="dark"] .btn-cancel:hover {
    background: linear-gradient(135deg, var(--status-red-deep) 0%, var(--status-red) 100%);
    box-shadow: 0 8px 22px rgba(var(--status-red-rgb), 0.45);
    color: var(--white-color);
}

/* Edit / Delete — outlined square style */
.edit-delete-btn {
    border: 1px solid var(--border-default);
    cursor: pointer;
    background: var(--bg-surface);
    color: var(--accent);
    padding: 0;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}
.edit-delete-btn:hover {
    background: var(--accent);
    color: var(--white-color);
    border-color: var(--accent);
}
.edit-delete-btn:focus {
    outline: none;
    box-shadow: none;
}

/* Show / Hide / Info */
.show-btn,
.hide-btn,
.info-btn {
    font-weight: 600;
    border: 1.5px solid transparent;
    color: var(--white-color);
    padding: 5px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    transition: all 0.15s;
}

.show-btn {
    background: var(--status-green);
}

.show-btn:hover {
    background: var(--status-green-bg);
    border-color: var(--status-green);
    color: var(--status-green);
}

.hide-btn {
    background: var(--status-red);
}

.hide-btn:hover {
    background: var(--status-red-bg);
    border-color: var(--status-red);
    color: var(--status-red);
}

.info-btn {
    background: var(--primary-color) !important;
}

.info-btn:hover {
    background: var(--accent-subtle) !important;
    border-color: var(--primary-color) !important;
    color: var(--primary-color) !important;
}

.show-btn:focus,
.hide-btn:focus,
.info-btn:focus {
    outline: none;
    box-shadow: none;
}

/* ── TABLE ACTION PILL BUTTONS ──
   Text-label buttons for table rows. Base: .btn-table-pill
   Variants: .pill-primary (blue/default), .pill-warning (amber),
             .pill-success (green), .pill-danger (red)
   Example: <a class="btn-table-pill pill-warning">Transfer</a>          */
.btn-table-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font);
    letter-spacing: 0.02em;
    border-radius: 20px;
    border: 1.5px solid;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.4;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    vertical-align: middle;
}

.btn-table-pill:focus {
    outline: none;
    box-shadow: none;
}

.btn-table-pill:hover {
    text-decoration: none;
}

/* Primary — accent blue (default when no variant class is added) */
.btn-table-pill:not([class*="pill-"]),
.btn-table-pill.pill-primary {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-subtle);
}

.btn-table-pill:not([class*="pill-"]):hover,
.btn-table-pill.pill-primary:hover {
    background: var(--accent);
    color: var(--white-color);
    border-color: var(--accent);
}

/* Warning — amber (transfer, reassign, move) */
.btn-table-pill.pill-warning {
    color: var(--status-amber);
    border-color: var(--status-amber);
    background: var(--status-amber-bg);
}

.btn-table-pill.pill-warning:hover {
    background: var(--status-amber);
    color: var(--white-color);
    border-color: var(--status-amber);
}

/* Success — green */
.btn-table-pill.pill-success {
    color: var(--status-green);
    border-color: var(--status-green);
    background: var(--status-green-bg);
}

.btn-table-pill.pill-success:hover {
    background: var(--status-green);
    color: var(--white-color);
    border-color: var(--status-green);
}

/* Danger — red */
.btn-table-pill.pill-danger {
    color: var(--status-red);
    border-color: var(--status-red);
    background: var(--status-red-bg);
}

.btn-table-pill.pill-danger:hover {
    background: var(--status-red);
    color: var(--white-color);
    border-color: var(--status-red);
}

/* Demo Mode */
.demo-mode-box {
    background: var(--status-amber-bg);
    border: 1px solid var(--status-amber);
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 600;
    color: var(--status-amber);
    padding: 5px 14px;
    transition: all 0.18s;
}

.demo-mode-box:hover {
    background: var(--status-amber);
    color: var(--white-color);
}


/* ── 6. DROPDOWN ── */
.dropright .dot-icon {
    height: 18px;
}

.dropright .dropdown-menu {
    top: 100% !important;
    right: 0;
    transform: none !important;
    left: auto !important;
}

.dropdown-menu {
    box-shadow: var(--shadow-dropdown);
    padding: 6px;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    background: var(--bg-surface);
    min-width: 170px;
}

.dropdown-menu .dropdown-item {
    font-weight: 500;
    font-size: 13px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border-default);
    transition: background 0.12s;
}

.dropdown-menu .dropdown-item:last-child {
    border-bottom: 0;
}

.dropdown-menu .dropdown-item:hover {
    background: var(--bg-nav-active);
    color: var(--accent);
}

.dropdown-menu .dropdown-item.primary-color {
    color: var(--primary-color);
}

.dropdown-menu,
.card {
    background-color: var(--bg-surface);
    border: none;
}


/* ── 7. SIDEBAR ── */
.sidebar {
    background-color: var(--bg-sidebar);
    background-image: none;
    /* texture applied in dark mode below */
    border-right: 1px solid var(--border-default);
    padding: 20px 10px 28px;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    height: 100%;
    width: var(--sidebar-width);
    max-width: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    transform: translateX(0);
    transition: width 0.25s ease, transform 0.25s ease, background-color 0.2s;
    z-index: 100;
}

/* Blueprint dot-grid — civic engineering texture, dark mode only */
[data-theme="dark"] .sidebar {
    background-image: radial-gradient(circle, rgba(62, 151, 212, 0.09) 1px, transparent 1px);
    background-size: 22px 22px;
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
    background-color: var(--border-strong);
    border-radius: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

@media (min-width: 1680px) {
    .sidebar {
        width: 288px;
    }
}

/* Collapsed state */
.sidebar.hide-sidebar {
    width: var(--sidebar-collapsed);
    padding: 20px 10px;
}

@media (min-width: 1024px) {
    .sidebar.hide-sidebar .side-menu .partition {
        display: none;
    }

    .sidebar.hide-sidebar .side-head {
        justify-content: center;
        margin: 4px 0 6px;
        width: 46px;
    }

    .sidebar.hide-sidebar .side-logo,
    .sidebar.hide-sidebar .partition,
    .sidebar.hide-sidebar .side-menu a>span {
        display: none;
    }

    .sidebar.hide-sidebar .side-menu .active a:after {
        content: none;
    }

    .sidebar.hide-sidebar .side-menu a {
        margin: 4px auto;
        display: flex;
        padding: 11px 8px;
        height: 44px;
        width: 44px;
        align-items: center;
        justify-content: center;
        border-left: 2px solid transparent !important;
    }

    .sidebar.hide-sidebar .side-menu a .menu-icon {
        margin-right: 0;
    }

    .sidebar.hide-sidebar .side-menu a.dropdown-toggle::after {
        content: none;
    }

    .sidebar.hide-sidebar .side-menu .dropdown-menu {
        margin-left: 0;
        min-width: unset;
        padding: 0;
    }

    .sidebar.hide-sidebar .side-menu .dropdown-menu a {
        padding: 0;
    }

    .sidebar.hide-sidebar .side-menu .dropdown-menu .active {
        padding: 0;
        margin: 0;
    }

    .sidebar.hide-sidebar .side-menu .dropdown-menu a svg {
        margin-right: 0;
    }
}

@media (min-width: 1680px) {
    .sidebar.hide-sidebar .side-head {
        margin: 0px 0 6px -2px;
    }
}

/* Side head — logo area */
.sidebar .side-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 4px 18px;
    border-bottom: 1px solid var(--border-default);
    margin-bottom: 8px;
}

.sidebar .side-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none !important;
}

.sidebar .side-logo h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent-dark);
    margin: 0;
    letter-spacing: -0.02em;
    line-height: 1;
}

[data-theme="dark"] .sidebar .side-logo h3 {
    color: var(--accent);
}

.sidebar .side-logo img {
    width: 130px;
}

/* Hamburger toggle */
.side-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background: transparent;
    padding: 4px;
    border: none;
    gap: 4px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: background 0.12s;
}

.side-toggle:hover {
    background: var(--accent-subtle);
}

.side-toggle:focus,
.side-toggle:focus-visible,
.side-toggle:active { outline: none; box-shadow: none; }

.side-toggle span {
    background: var(--text-secondary);
    width: 18px;
    height: 2px;
    border-radius: 2px;
    transition: all 0.2s;
}

.side-toggle span:nth-child(2) {
    width: 22px;
}

/* Nav group label — replaces old dashed partition */
.sidebar .side-menu {
    padding: 0;
    list-style: none;
    margin: 6px 0 0 !important; /* !important overrides Bootstrap mt-4 if still present */
}

.partition {
    padding: 16px 8px 5px;
    margin: 0;
    border: none;
    line-height: 1;
}

.partition span {
    background: transparent;
    padding: 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--nav-group-color);
    display: block;
}

/* Nav items */
.sidebar .side-menu a {
    color: var(--nav-item-color);
    display: flex;
    align-items: center;
    padding: 9px 10px;
    position: relative;
    margin: 2px 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-md);
    text-decoration: none !important;
    transition: background 0.14s, color 0.14s;
    gap: 0;
}

.sidebar .side-menu a:hover {
    background: var(--accent-subtle);
    color: var(--accent);
}

.sidebar .side-menu a .menu-icon {
    margin-right: 10px;
    width: 20px;
    min-width: 20px;
    text-align: center;
    flex-shrink: 0;
    color: inherit;
    transition: color 0.14s;
    font-size: 15px;
    line-height: 1;
}

/* Active nav item — solid fill, matches reference */
.sidebar .side-menu .side_line.active a,
.sidebar .side-menu .active a {
    background: var(--nav-active-bg);
    color: var(--nav-active-color);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(62,151,212,0.18);
}
.sidebar .side-menu .side_line.active a:hover,
.sidebar .side-menu .active a:hover {
    background: var(--nav-active-bg);
    color: var(--nav-active-color);
    opacity: 0.92;
}

.sidebar .side-menu .side_line.active a .menu-icon,
.sidebar .side-menu .active a .menu-icon {
    color: var(--nav-active-icon);
    filter: none;
}

/* Remove old right-side white bar */
.sidebar .side-menu .side_line.active a:after,
.sidebar.hide-sidebar .side-menu .side_line.active a:after {
    content: none;
}

/* Submenu */
.sidebar .side-menu .dropdown-toggle::after {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.sidebar .side-menu .dropdown-menu {
    position: relative !important;
    transform: none !important;
    box-shadow: none;
    float: none;
    background: transparent;
    border: none;
    margin-left: 14px;
    padding: 0;
}

.sidebar .side-menu .dropdown-menu .dropdown-item {
    padding: 6px 10px;
    background: transparent !important;
    color: var(--nav-item-color);
    font-size: 13px;
    font-weight: 500;
    border: none;
    border-radius: var(--radius-sm);
    transition: color 0.12s, background 0.12s;
}

.sidebar .side-menu .dropdown-menu .dropdown-item:hover {
    background: var(--accent-subtle) !important;
    color: var(--accent);
}

/* Side submenu */
.sidebar .side-menu .side-submenu a {
    color: var(--nav-item-color);
    display: flex;
    align-items: center;
    padding: 8px 10px;
    margin: 2px 0;
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: background 0.14s, color 0.14s;
}

.sidebar .side-menu .side-submenu .active {
    background: var(--nav-active-bg);
    border-radius: var(--radius-md);
    padding: 1px 0;
}

.sidebar .side-menu .side-submenu .active a {
    color: var(--nav-active-color);
    border-left-color: var(--nav-active-border);
}

.sidebar .side-menu .side-submenu a:hover {
    color: var(--accent);
    background: var(--accent-subtle);
}

.sidebar .side-menu .side-submenu .active a:hover {
    color: var(--nav-active-color);
}

.sidebar .side-menu .active .dropdown-menu .active .submenu-icon {
    filter: none;
    color: var(--nav-active-icon);
}


/* ── 8. RIGHT CONTENT ── */
.right-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    background: var(--bg-base);
    transition: margin-left 0.25s ease, background-color 0.2s;
}

@media (min-width: 1680px) {
    .right-content {
        margin-left: 288px;
    }
}

.right-content.right-content-0 {
    margin-left: var(--sidebar-collapsed);
}

.right-content.right-content-0 .header .title-control .side-toggle {
    display: none;
}


/* ── 9. HEADER ── */
.header {
    position: sticky;
    top: 0;
    background: var(--bg-header);
    border-bottom: 1px solid var(--border-default);
    box-shadow: var(--shadow-header);
    z-index: 22;
    padding: 0 24px;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color 0.2s, border-color 0.2s;
}

@media (min-width: 1680px) {
    .header {
        padding: 0 32px;
    }
}

.header .title-control {
    display: flex;
    align-items: center;
    gap: 14px;
}

.header .title-control .side-toggle {
    display: none;
}

.header .page-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

/* Logo shown on mobile when sidebar hidden */
.header .side-logo {
    display: none;
}

.header .side-logo h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent-dark);
    margin: 0;
}

[data-theme="dark"] .header .side-logo h3 {
    color: var(--accent);
}

/* Header search */
.header .input-group {
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    width: 480px;
    max-width: 100%;
    background: var(--bg-input);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.header .input-group:focus-within {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(62, 151, 212, 0.12);
}

.header .input-group .input-group-text,
.header .input-group .form-control {
    background: transparent;
    border: 0;
    box-shadow: none;
    color: var(--text-primary);
}

.header .input-group .input-group-text img,
.header .input-group .form-control img {
    width: 18px;
    margin: 0 4px;
}

.header .input-group .form-control {
    font-size: 13px;
    padding: 10px 6px;
}

.header .input-group .form-control::placeholder {
    color: var(--text-muted);
}

/* Header action buttons */
.header .head-control {
    display: flex;
    align-items: center;
    gap: 6px;
}

.header .head-control .head-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    width: 38px;
    padding: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-surface-alt);
    border: 1px solid var(--border-default);
    color: var(--text-secondary);
    transition: background 0.14s, color 0.14s, border-color 0.14s;
}

.header .head-control .head-btn:hover {
    background: var(--accent-subtle);
    color: var(--accent);
    border-color: var(--accent);
}

.header .head-control .head-btn:focus,
.header .head-control .head-btn:focus-visible,
.header .head-control .head-btn:active { outline: none; box-shadow: none; }

/* ── Header dropdowns — override Popper.js inline transform ──
   Popper.js applies transform:translate3d(x,y) via inline style which
   mispositons menus when header has position:sticky + animation transform.
   !important wins over both Popper's inline style and the animation fill.
   Scoped tightly to .head-control so sidebar/other dropdowns are unaffected. */
.header .head-control .dropdown {
    position: relative;
}

.header .head-control .dropdown .dropdown-menu {
    position: absolute !important;
    top: calc(100% + 8px) !important;
    right: 0 !important;
    left: auto !important;
    margin-top: 0 !important;
    transform: none !important;
}

/* Theme toggle button */
.theme-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    width: 38px;
    border-radius: var(--radius-md);
    background: var(--bg-surface-alt);
    border: 1px solid var(--border-default);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
    transition: background 0.14s, color 0.14s, border-color 0.14s;
}

.theme-toggle-btn:hover {
    background: var(--accent-subtle);
    color: var(--accent);
    border-color: var(--accent);
}

.theme-toggle-btn:focus,
.theme-toggle-btn:focus-visible,
.theme-toggle-btn:active { outline: none; box-shadow: none; }

.theme-toggle-btn .icon-dark {
    display: inline;
}

.theme-toggle-btn .icon-light {
    display: none;
}

[data-theme="dark"] .theme-toggle-btn .icon-dark {
    display: none;
}

[data-theme="dark"] .theme-toggle-btn .icon-light {
    display: inline;
}

.avatar-img {
    height: 100%;
    width: 100%;
    object-fit: cover;
}


/* ── 10. BODY CONTENT & PAGE HEADER ── */
.body-content {
    padding: 24px;
}

/* Breadcrumb border helper */
.border-bottom {
    border-color: var(--border-default) !important;
}


.box-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border-default);
    padding-bottom: 12px;
    margin-top: 20px;
    gap: 8px;
}

.box-title .title {
    font-size: 18px;
    font-weight: 700;
    margin: 4px 0;
    color: var(--text-primary);
}

.page-title-sm {
    display: none;
}


/* ── 11. FILTER BAR & EXPORT TOOLBAR ── */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 10px 16px;
    margin-bottom: 14px;
    flex-wrap: wrap;
    box-shadow: var(--shadow-card);
    min-height: 52px;
}

/* Search section — fills remaining space; cap with style="max-width:Xpx" if needed */
.filter-bar .filter-search {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
    gap: 10px;
}

.filter-bar .filter-search .fa-magnifying-glass {
    color: var(--text-muted);
    font-size: 14px;
    flex-shrink: 0;
    transition: color 0.15s;
}

.filter-bar .filter-search:focus-within .fa-magnifying-glass {
    color: var(--accent);
}

.filter-bar .filter-search input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    color: var(--text-primary);
    font-family: var(--font);
    flex: 1 1 auto;
    min-width: 0;
    padding: 7px 0;
}

.filter-bar .filter-search input::placeholder {
    color: var(--text-muted);
}

/* Filter-sort chips — pill with tinted bg; set style="width:Xpx" on the chip
   container to control width; the select fills it automatically */
.filter-sort {
    display: flex;
    align-items: center;
    gap: 0;
    flex: 0 0 auto;
    background: var(--bg-surface-alt);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color 0.15s, background 0.15s;
    white-space: nowrap;
}

.filter-sort:focus-within {
    border-color: var(--accent);
    background: var(--accent-subtle);
}

.filter-sort > span {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 0 10px 0 12px;
    white-space: nowrap;
    flex-shrink: 0;
    transition: color 0.15s;
    border-right: 1px solid var(--border-default);
    align-self: stretch;
    display: flex;
    align-items: center;
}

.filter-sort:focus-within > span {
    color: var(--accent);
    border-right-color: var(--accent);
}

.filter-sort select {
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font);
    padding: 8px 10px 8px 10px;
    outline: none;
    cursor: pointer;
    width: 100%;
    min-width: 90px;
    appearance: auto;
}

/* Dark mode: native select popup renders with OS default (white) when
   background is transparent — set explicit surface color so options are readable */
[data-theme="dark"] .filter-sort select {
    background-color: var(--bg-elevated);
}

[data-theme="dark"] .filter-sort select option {
    background-color: var(--bg-elevated);
    color: var(--text-primary);
}

/* Date inputs inside filter-sort — same chrome as native select */
.filter-sort input[type="date"] {
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font);
    padding: 8px 10px;
    outline: none;
    cursor: pointer;
    min-width: 110px;
    width: 100%;
}
[data-theme="dark"] .filter-sort input[type="date"] {
    color-scheme: dark;
}

/* Select2 inside filter-sort: strip its own chrome so the bar container styles apply */
.filter-sort .select2-container {
    flex: 1;
    min-width: 90px;
    width: auto !important;    /* override Select2's inline width="" attribute */
    align-self: stretch;
}

.filter-sort .select2-container .select2-selection--single {
    border: none !important;
    background: transparent !important;
    border-radius: 0 !important;
    height: 100% !important;
    box-shadow: none !important;
    display: flex !important;
    align-items: center !important;
}

.filter-sort .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--text-primary) !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    font-family: var(--font) !important;
    padding: 0 28px 0 10px !important;
    line-height: normal !important;
    flex: 1;
}

.filter-sort .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100% !important;
    top: 0 !important;
    right: 6px !important;
    position: absolute !important;
}

[data-theme="dark"] select.form-control option,
[data-theme="dark"] .custom-select option,
[data-theme="dark"] .page-search .sorting .form-control option,
[data-theme="dark"] div.dataTables_wrapper select option {
    background-color: var(--bg-elevated);
    color: var(--text-primary);
}

.export-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius-lg);
    padding: 10px 16px;
    margin-bottom: 14px;
    box-shadow: var(--shadow-card);
    flex-wrap: wrap;
}

.export-toolbar .export-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    flex: 1;
    min-width: 160px;
}

.export-toolbar .export-label .fa-circle-info {
    color: var(--accent);
    font-size: 15px;
}

.export-toolbar .export-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.export-toolbar .export-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 20px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    border: 1.5px solid var(--border-default);
    background: var(--bg-surface-alt);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
    font-family: var(--font);
}

.export-btn:hover {
    background: var(--accent-subtle);
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(var(--accent-rgb), 0.14);
}

.export-btn:focus,
.export-btn:focus-visible,
.export-btn:active { outline: none; box-shadow: none; }

/* Legacy .page-search — used across all modules */
.page-search {
    display: flex;
    align-items: center;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 8px 12px;
    gap: 10px;
    box-shadow: var(--shadow-card);
}

.page-search .input-group {
    border: none;
    background: transparent;
    border-radius: 0;
}

.page-search .input-group-text,
.page-search .form-control {
    border: 0;
    background: transparent;
    box-shadow: none;
    font-size: 13px;
    color: var(--text-primary);
}

.page-search .input-group-text img,
.page-search .form-control img {
    width: 18px;
}

.page-search .form-control::placeholder {
    color: var(--text-muted);
}

.page-search .sorting {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-surface-alt);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-default);
}

.page-search .sorting label {
    min-width: 50px;
    margin: 0;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.page-search .sorting .form-control {
    padding: 2px 6px;
    border: none;
    background: transparent;
    font-size: 12px;
    font-family: var(--font);
    color: var(--text-primary);
    height: auto !important;
}


/* ── 12. TABLE ── */
.table-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.table-striped tbody tr:nth-of-type(odd),
.table-striped tbody tr:nth-of-type(even) {
    background-color: transparent;
}

.table {
    border-color: var(--border-default);
    color: var(--text-primary);
    min-width: 650px;
    margin: 0;
    background: var(--bg-surface);
}

.table thead th {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-top: 0;
    border-bottom: 1px solid var(--border-default);
    background-color: var(--bg-table-head);
    color: var(--text-table-head);
    padding: 12px 12px;
    white-space: nowrap;
}

.table td {
    font-size: 13.5px;
    border-bottom: 1px solid var(--border-default);
    border-top: 0;
    vertical-align: middle;
    padding: 11px 12px;
    color: var(--text-primary);
    background: transparent;
}

.table .avatar-img {
    margin-right: 8px;
}

.table .clamp-text {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.table .btn {
    padding: 0;
    background: var(--bg-surface);
    margin: 0 2px;
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-default);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 13px;
    transition: background 0.14s, color 0.14s, border-color 0.14s;
    box-shadow: none;
    vertical-align: middle;
}
.table .btn:hover {
    background: var(--accent);
    color: var(--white-color);
    border-color: var(--accent);
}
.table .btn i,
.table .btn svg { color: inherit; font-size: 13px; }
.table .btn img { width: 14px; filter: none; }

.table tfoot {
    background-color: var(--bg-surface-alt);
}

.table tbody tr:hover td {
    background-color: var(--accent-subtle);
}

/* DataTables overrides */
div.dataTables_wrapper div.dataTables_length label,
div.dataTables_wrapper div.dataTables_filter label {
    display: inline-flex;
    align-items: center;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 7px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

div.dataTables_wrapper div.dataTables_length label .form-control,
div.dataTables_wrapper div.dataTables_filter label .form-control {
    padding: 5px 12px;
    text-align: center;
    margin: 0 10px;
    background: var(--bg-surface-alt);
    border: 1px solid var(--border-default);
    color: var(--text-primary);
    font-size: 14px;
}

div.dataTables_wrapper div.dataTables_filter label input.form-control {
    text-align: left;
    margin-right: 0;
}

div.table-responsive>div.dataTables_wrapper>div.row>div[class^=col-]:first-child,
div.table-responsive>div.dataTables_wrapper>div.row>div[class^=col-]:last-child {
    overflow: auto;
}

table.dataTable>thead .sorting:before,
table.dataTable>thead .sorting_asc:before,
table.dataTable>thead .sorting_desc:before,
table.dataTable>thead .sorting_asc_disabled:before,
table.dataTable>thead .sorting_desc_disabled:before {
    content: "↑";
}

table.dataTable>thead .sorting:after,
table.dataTable>thead .sorting_asc:after,
table.dataTable>thead .sorting_desc:after,
table.dataTable>thead .sorting_asc_disabled:after,
table.dataTable>thead .sorting_desc_disabled:after {
    content: "↓";
}


/* ── 13. FORMS ── */
.form-group label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 12px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin-bottom: 7px;
    display: block;
}

.form-control,
.custom-select {
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    font-size: 14px;
    height: auto !important;
    background-color: var(--bg-input);
    color: var(--text-primary);
    font-family: var(--font);
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.form-control:focus,
.custom-select:focus {
    box-shadow: 0 0 0 3px rgba(62, 151, 212, 0.15);
    border-color: var(--border-focus);
    background-color: var(--bg-surface);
    color: var(--text-primary);
    outline: none;
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-control {
    background-color: var(--bg-input);
    color: var(--text-primary);
}

.form-control[readonly] {
    background-color: var(--bg-input) !important;
    color: var(--text-primary) !important;
    opacity: 0.65;
    cursor: not-allowed;
}

/* Custom radio */
.custom-control .custom-control-label::before {
    background: transparent;
    border: 2px solid var(--border-strong);
    border-radius: 4px;
}

.custom-control .custom-control-input:checked~.custom-control-label::after {
    border-radius: 3px;
    background-color: var(--accent);
}

.custom-control.custom-radio .custom-control-label::before,
.custom-control.custom-radio .custom-control-label:after {
    border-radius: 50% !important;
}

/* Radio group pills */
.radio-group {
    display: flex;
    margin-bottom: 20px;
    gap: 10px;
    flex-wrap: wrap;
}

.radio-group .custom-control {
    padding-left: 0;
    margin-right: 0;
}

.radio-group .custom-control-label {
    margin-bottom: 0;
    background: var(--bg-surface-alt);
    padding: 7px 22px 7px 32px;
    border-radius: var(--radius-xl);
    font-size: 14px;
    border: 1px solid var(--border-default);
    cursor: pointer;
    transition: background 0.14s, border-color 0.14s;
    color: var(--text-primary);
}

.radio-group .custom-control-label::before,
.radio-group .custom-control-label:after {
    border-radius: 50%;
    top: 10px;
    left: 10px;
}

.radio-group .custom-control-label:after {
    display: none;
}

.radio-group .custom-control-label::before {
    background: transparent;
    border: 2px solid var(--border-strong);
}

.radio-group .custom-control-input:checked~.custom-control-label {
    background: var(--accent);
    color: var(--white-color);
    border-color: var(--accent);
}

.radio-group .custom-control-input:checked~.custom-control-label::before {
    background: var(--accent);
    border-color: var(--white-color);
}

/* Color picker */
.colorpicker-component {
    display: flex;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.colorpicker {
    border: none;
    width: 40px;
    height: 40px;
    cursor: pointer;
    padding: 0;
    margin: 0;
}

.hexcolor {
    border: none;
    padding: 10px;
    width: 100px;
    outline: none;
    background: var(--bg-input);
    color: var(--text-primary);
}


/* ── 14. CARDS ── */
.custom-border-card {
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-default);
    padding: 20px 24px;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    background: var(--bg-surface);
}

.custom-border-card .card-header {
    font-size: 15px;
    font-weight: 600;
    background: var(--accent-subtle);
    border-bottom: 1px solid var(--border-default);
    border-left: 3px solid var(--accent);
    border-radius: calc(var(--radius-lg) - 1px) calc(var(--radius-lg) - 1px) 0 0;
    color: var(--text-primary);
    padding: 13px 24px;
    margin: -20px -24px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.custom-border-card .card-header i,
.custom-border-card .card-header svg {
    color: var(--accent);
    flex-shrink: 0;
    font-size: 0.9em;
}

.custom-border-card .card-body {
    padding: 18px 0 10px;
}

.custom-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    transition: border-color 0.18s, box-shadow 0.18s;
}

.custom-card:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 20px rgba(62, 151, 212, 0.12);
}

.custom-card .card-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px;
    gap: 12px;
}

.custom-card .card-body h3 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.custom-card .card-body span {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.card-icon-primary {
    padding: 14px;
    border-radius: 50%;
    color: var(--white-color);
    display: inline-flex;
    justify-content: center;
    align-items: center;
    background-color: var(--primary-color) !important;
    flex-shrink: 0;
}

.card-color-primary:hover {
    border-color: var(--accent) !important;
}

.card-color-primary .card-body {
    color: var(--accent);
}


/* ── 15. PAGINATION ── */
.pagination {
    padding: 5px;
    border: 1px solid var(--border-default);
    display: inline-flex;
    border-radius: var(--radius-md);
    margin: 28px auto 0;
    background: var(--bg-surface);
}

.pagination .page-link {
    border: 0;
    height: 36px;
    width: 36px;
    background: var(--bg-surface-alt) !important;
    margin: 0 3px;
    border-radius: var(--radius-sm) !important;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.14s, color 0.14s;
}

.pagination .page-link:hover {
    background: var(--accent-subtle) !important;
    color: var(--accent);
}

.pagination .page-link .right-arrow {
    transform: rotate(180deg);
}

.pagination .page-link .dots {
    font-weight: 700;
    margin-top: -3px;
}

.pagination .arrow-icon {
    height: 20px;
    width: 20px;
    background-image: url("../../assets/imgs/left-arrow.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 7px;
}

.pagination .active .page-link {
    background: var(--accent) !important;
    color: var(--white-color) !important;
}


/* ── 16. TABS ── */
.custom-tabs {
    display: flex;
    align-items: center;
    gap: 2px;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    padding: 4px;
    box-shadow: var(--shadow-card);
    flex-wrap: wrap;
    margin: 0;
}

.custom-tabs li.nav-item {
    flex: 1;
    text-align: center;
    list-style: none;
}

.custom-tabs .nav-link {
    display: block;
    border-radius: var(--radius-xl);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 8px 16px;
    white-space: nowrap;
    text-decoration: none;
    transition: background 0.18s cubic-bezier(0.22, 1, 0.36, 1),
                color      0.18s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.18s ease;
}

.custom-tabs .nav-link:hover:not(.active) {
    background: var(--accent-subtle);
    color: var(--accent);
    text-decoration: none;
}

.custom-tabs .nav-link.active {
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(var(--accent-rgb), 0.30);
}

/* Inline variant — content-width tabs, horizontal scroll on small screens */
.inline-tabs {
    display: inline-flex;
    flex-wrap: nowrap;
    position: relative;
    z-index: 2;
}

.inline-tabs li.nav-item {
    flex: none;
    list-style: none;
}

.inline-tabs .nav-link {
    padding: 8px 22px;
    white-space: nowrap;
}

/* Active on inline-tabs must reinforce white text (higher-specificity cascade fix) */
.inline-tabs .nav-link.active {
    color: #fff;
}


/* ── 17. MODAL ── */

/* Slide-up + slight scale entrance */
.modal.fade .modal-dialog {
    transform: translateY(-16px) scale(0.98);
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.2s ease;
}

.modal.show .modal-dialog {
    transform: translateY(0) scale(1);
}

/* Shell */
.modal-content {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-dropdown);
    overflow: hidden;
}

/* Header — same accent-strip treatment as card-header */
.modal-header {
    background: var(--accent-subtle);
    border-bottom: 1px solid var(--border-default);
    padding: 13px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    flex: 1;
}

/* Body */
.modal-body {
    background: var(--bg-surface);
    padding: 20px;
    color: var(--text-primary);
}

/* Footer */
.modal-footer {
    background: var(--bg-surface-alt);
    border-top: 1px solid var(--border-default);
    border-radius: 0;
    padding: 12px 20px;
    gap: 8px;
    justify-content: flex-end;
}

/* Close button — compact circular icon button */
.modal .close {
    width: 28px;
    min-width: 28px;
    height: 28px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: var(--text-secondary) !important;
    font-size: 26px;
    font-weight: 400;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    margin-left: auto;
    flex-shrink: 0;
    opacity: 1;
    outline: none;
    position: static;
    text-shadow: none;
    transition: background 0.15s ease, color 0.15s ease;
    margin-right: 0px;
}

.modal .close:hover {
    background: rgba(var(--accent-rgb), 0.12);
    color: var(--text-primary) !important;
}

.modal .close:focus-visible {
    outline: 2px solid var(--border-focus);
    outline-offset: 2px;
}


/* ── 18. AVATAR / PROFILE ── */
.avatar-control {
    overflow: hidden;
    display: flex;
    align-items: center;
}

.avatar-control .avatar-img {
    height: 44px;
    width: 44px;
    border-radius: var(--radius-md);
    object-fit: cover;
}

.avatar-img {
    height: 100%;
    width: 100%;
    object-fit: cover;
}

.profile-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-default);
    box-shadow: var(--shadow-card);
}

.profile-header {
    height: 80px;
    background: linear-gradient(135deg, var(--accent-dark), var(--accent));
}

.profile-picture {
    width: 150px;
    height: 150px;
    border-radius: 12%;
    border: 4px solid var(--bg-surface);
    object-fit: cover;
    margin-top: -60px;
}

.profile-details p {
    font-size: 15px;
    color: var(--text-primary);
}

/* Avatar upload */
.avatar-upload {
    position: relative;
    max-width: 205px;
}

.avatar-edit {
    position: absolute;
    right: 12px;
    z-index: 1;
}

.avatar-edit input {
    display: none;
}

.avatar-edit input+label {
    display: inline-block;
    width: 34px;
    height: 34px;
    margin-bottom: 0;
    margin-right: 30px;
    margin-top: 125px;
    border-radius: 50%;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    box-shadow: 0 2px 6px var(--shadow-card);
    cursor: pointer;
    transition: all .18s;
}

.avatar-edit input+label:hover {
    background: var(--accent-subtle);
    border-color: var(--accent);
}

.avatar-edit input+label::after {
    content: "\f0ee";
    font-family: 'FontAwesome';
    color: var(--text-primary);
    position: absolute;
    top: 130px;
    left: 0;
    right: 30px;
    text-align: center;
    margin: auto;
}

.avatar-upload .avatar-preview {
    width: 150px;
    height: 150px;
    position: relative;
    border-radius: 10%;
}

.avatar-upload .avatar-preview>img {
    width: 100%;
    height: 100%;
    background-size: cover;
    border-radius: 10%;
    object-fit: cover;
}

.avatar-upload-landscape {
    position: relative;
    max-width: 265px;
}

.avatar-edit-landscape {
    position: absolute;
    right: 0;
    bottom: -20px;
    z-index: 1;
}

.avatar-edit-landscape input {
    display: none;
}

.avatar-edit-landscape input+label {
    display: inline-block;
    width: 34px;
    height: 34px;
    margin-bottom: 0;
    margin-right: 30px;
    margin-top: 125px;
    border-radius: 50%;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    box-shadow: 0 2px 6px rgba(20, 37, 58, 0.1);
    cursor: pointer;
    transition: all .18s;
}

.avatar-edit-landscape input+label:hover {
    background: var(--accent-subtle);
    border-color: var(--accent);
}

.avatar-edit-landscape input+label::after {
    content: "\f0ee";
    font-family: 'FontAwesome';
    color: var(--text-primary);
    position: absolute;
    top: 130px;
    left: 0;
    right: 30px;
    text-align: center;
    margin: auto;
}

.avatar-upload-landscape .avatar-preview-landscape {
    width: 220px;
    height: 120px;
    position: relative;
    border-radius: 10%;
}

.avatar-upload-landscape .avatar-preview-landscape>img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10%;
}

/* Image previews */
.thumbnail-img {
    position: relative;
    border: 1px solid var(--border-default);
    display: inline-block;
    height: 100px;
    width: 130px;
    border-radius: var(--radius-md);
    padding: 4px;
    background: var(--bg-surface);
}

.thumbnail-img img {
    border-radius: var(--radius-sm);
    height: 100%;
    width: 100%;
    object-fit: cover;
}

.thumbnail-img .close {
    position: absolute;
    top: 5px;
    right: 8px;
    color: var(--white-color);
    opacity: 1;
    font-weight: 300;
}

.img-label {
    font-size: 13px;
    color: var(--text-primary);
    margin-bottom: 5px;
    display: block;
}

.img-preview {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.file-control {
    padding: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    border-radius: var(--radius-lg);
    cursor: pointer;
    border: 2px dashed var(--border-default);
    background: var(--bg-surface-alt);
    transition: border-color 0.14s, background 0.14s;
}

.file-control:hover {
    border-color: var(--accent);
    background: var(--accent-subtle);
}

.file-control span {
    opacity: 0.6;
    display: inline-block;
    margin-top: 10px;
    font-size: 13px;
    color: var(--text-secondary);
}


/* ── 19a. IMAGE UPLOAD — drag-and-drop component ── */
.image-upload-wrapper {
    position: relative;
    width: 220px;
}

.image-upload-wrapper input[type="file"] {
    display: none;
}

.drop-area {
    position: relative;
    border: 2px dashed var(--border-default);
    border-radius: var(--radius-lg);
    background: var(--bg-surface-alt);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 85%;
    min-height: 170px;
    overflow: hidden;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.drop-area:hover {
    border-color: var(--accent);
    background: var(--accent-subtle);
}

.drop-area.dragover {
    border-color: var(--accent);
    background: var(--accent-subtle);
    box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.12);
}

.drop-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 24px 16px;
    text-align: center;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1;
}

.drop-icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--accent-subtle);
    border: 1.5px solid var(--border-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 22px;
    margin-bottom: 2px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.drop-area:hover .drop-icon,
.drop-area.dragover .drop-icon {
    background: rgba(var(--accent-rgb), 0.18);
    transform: scale(1.08) translateY(-2px);
}

.drop-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.drop-hint {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0;
}

.drop-meta {
    font-size: 11px;
    color: var(--text-muted);
    margin: 0;
    padding: 3px 10px;
    background: var(--bg-elevated);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-default);
    letter-spacing: 0.03em;
}

/* Preview image sits behind placeholder; shown when wrapper has .has-preview */
.image-upload-wrapper img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: calc(var(--radius-lg) - 2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.image-upload-wrapper.has-preview img {
    opacity: 1;
}

.image-upload-wrapper.has-preview .drop-placeholder {
    opacity: 0;
}

/* "Change photo" bar fades in on hover when preview is set */
.image-upload-wrapper.has-preview .drop-area::before {
    content: '\f030\00a0 ' attr(data-change-label);
    font-family: 'Font Awesome 6 Free', var(--font);
    font-weight: 900;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 12px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 2;
    border-radius: 0 0 calc(var(--radius-lg) - 2px) calc(var(--radius-lg) - 2px);
}

.image-upload-wrapper.has-preview .drop-area:hover::before {
    opacity: 1;
}


/* ── 19. CARDS: SUMMARY / EARNING / LANDSCAPE ── */
.summary-table-card .border-card {
    padding: 12px;
    border: 1.5px solid var(--border-default);
    border-radius: var(--radius-lg);
    margin-bottom: 14px;
    font-size: 13px;
    background: var(--bg-surface);
    transition: border-color 0.15s;
}

.summary-table-card .border-card:hover {
    border-color: var(--accent);
}

.summary-table-card .border-card>.row {
    margin: 0;
}

.summary-table-card .border-card>.row .col,
.summary-table-card .border-card>.row .col-1,
.summary-table-card .border-card>.row .col-2,
.summary-table-card .border-card>.row .col-12 {
    padding: 0;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.summary-table-card .avatar-control {
    min-width: 120px;
    font-weight: 600;
}

.summary-table-card .avatar-control img {
    margin-right: 8px;
}

.summary-table-card .price {
    color: var(--status-red);
    font-weight: 700;
}

.card-earning {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 14px 18px;
    width: 100%;
}

.card-align {
    display: flex;
    justify-content: space-between;
}

.earning-title {
    font-weight: 700;
    font-size: 14px;
    text-align: center;
    color: var(--text-secondary);
}

.earning-amount {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    color: var(--accent);
}

.earning-divider {
    width: 1px;
    height: 56px;
    background-color: var(--border-default);
    margin: 0 14px;
}

.landscape-card {
    background-color: var(--bg-surface) !important;
    padding: 10px;
    margin: 10px 0;
    border: 1.5px solid var(--border-default);
    border-radius: var(--radius-lg);
    transition: border-color 0.15s;
}

.landscape-card:hover {
    border-color: var(--accent);
}

.wallet-image {
    height: 180px;
    width: 180px;
    border-radius: var(--radius-md);
    object-fit: cover;
}

.landscape-card-title {
    font-size: 15px;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text-primary);
}

.landscape-card-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text-secondary);
}

.landscape-card-border {
    border-top: 1.5px dashed var(--accent) !important;
    margin: 10px 0;
}

.landscape-card .ribbon-top-left {
    top: -3px;
    left: -3px;
}


/* ── 20. VIDEO / CONTENT CARDS ── */
.app-right-btn {
    text-align: right;
    margin-top: -56px;
    margin-bottom: 28px;
}

.video-box {
    padding: 24px;
    background: var(--bg-surface-alt);
    border-radius: var(--radius-lg);
}

.video-box .f600 {
    font-weight: 600;
}

.video-box .box-border-0 {
    border: 0;
    padding-bottom: 0;
}

.add-video-btn {
    height: calc(100% - 28px);
    background: var(--bg-surface-alt);
    border: 2px dashed var(--border-default);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    margin: 14px 0;
    width: 100%;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    padding: 24px;
    color: var(--text-primary) !important;
    transition: border-color 0.14s, background 0.14s;
}

.add-video-btn:hover {
    border-color: var(--accent);
    background: var(--accent-subtle);
}

.add-video-btn .icon {
    margin-bottom: 14px;
}

.video-card {
    padding: 6px;
    border: 1px solid var(--border-default) !important;
    border-radius: var(--radius-lg);
    margin: 14px 0;
    transition: box-shadow 0.2s, border-color 0.2s;
    background: var(--bg-surface);
}

.video-card:hover {
    box-shadow: 0 8px 28px rgba(62, 151, 212, 0.12);
    border-color: var(--accent) !important;
}

.video-card:hover .play-btn,
.video-card:hover .overlap-control,
.video-card:hover .play-btn-top {
    display: block;
}

.video-card .card-img-top {
    border-radius: var(--radius-md);
    height: 160px;
    object-fit: cover;
}

.video-card .play-btn {
    background: transparent;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
}

.video-card .card-body {
    padding: 14px 10px;
    position: relative;
    background: var(--bg-surface);
}

.video-card .card-body .dropdown {
    position: absolute;
    right: 10px;
    top: 10px;
}

.video-card .card-body .dropdown .dropdown-menu {
    top: auto !important;
    bottom: 100%;
}

.video-card .card-body .dropdown .head-btn {
    padding: 4px;
    transform: rotate(90deg);
}

.video-card .card-body .dropdown .dropdown-item {
    font-weight: 500;
}

.video-card .card-body .dropdown .dropdown-item img {
    height: 16px;
    width: 16px;
    object-fit: contain;
    margin-right: 8px;
}

.video-card .card-body .card-title {
    padding-right: 10px;
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text-primary);
}

.video-card .card-body .card-details {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.video-card .card-body .card-details p {
    margin: 0;
    font-weight: 500;
    color: var(--text-muted);
}

.video-card .card-body .card-details p.tag {
    color: var(--text-secondary);
}

.video-card .play-btn-top {
    position: absolute;
    right: 0;
    top: 0;
    background: transparent;
    padding: 0;
    display: none;
}

.video-card .play-btn-top img {
    width: 42px;
}

.video-card .overlap-control {
    position: absolute;
    right: 10px;
    bottom: -4px;
    display: none;
}

.video-card .overlap-control .btn {
    padding: 2px 5px;
}

.video-card .overlap-control .btn .dot-icon {
    height: 15px;
    width: 15px;
    object-fit: contain;
    color: var(--accent) !important;
}


/* ── 21. DOT ── */
.dot {
    height: 8px;
    width: 8px;
    background: var(--status-red);
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
}


/* ── 21b. DEPARTMENT CARD ── */
.dept-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    margin-bottom: 24px;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.dept-card:hover {
    box-shadow: 0 8px 28px rgba(var(--accent-rgb), 0.13);
    border-color: var(--accent);
}

.dept-card-color-bar {
    display: block;
    height: 4px;
    width: 100%;
    flex-shrink: 0;
}

.dept-card-image {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.dept-card-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--dept-color, var(--accent));
    opacity: 0.1;
}

.dept-card-image img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 50%;
    position: relative;
    z-index: 1;
    background: var(--bg-surface);
    padding: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.dept-card-body {
    padding: 14px 16px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.dept-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dept-card-desc {
    font-size: 12.5px;
    color: var(--text-muted);
    margin: 0 0 12px;
    flex: 1;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.55;
}

.dept-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid var(--border-default);
    margin-bottom: 10px;
}

.dept-card-date {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.dept-card-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dept-card-actions .edit-delete-btn {
    flex: 1;
}

/* ── 21c. STORY CARD ── */
.sc {
    position: relative;
    aspect-ratio: 3 / 4;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 24px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.25s, box-shadow 0.25s;
}
.sc:hover {
    border-color: var(--accent);
    box-shadow: 0 12px 36px rgba(var(--accent-rgb), 0.22);
}

.sc-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}
.sc:hover .sc-bg {
    transform: scale(1.06);
}

.sc-gradient {
    position: absolute;
    inset: 0;
    background: var(--sc-img-gradient);
}

.sc-top {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 2;
}

.sc-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    background: var(--sc-glass-bg);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: var(--sc-text-img);
    border: 1px solid var(--sc-glass-border);
}

.sc-actions {
    display: flex;
    gap: 6px;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.2s, transform 0.2s;
}
.sc:hover .sc-actions {
    opacity: 1;
    transform: translateY(0);
}

.sc-action-btn {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    background: var(--sc-glass-bg);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid var(--sc-glass-border);
    color: var(--sc-text-img) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: background 0.18s, border-color 0.18s;
}
.sc-action-btn:hover {
    background: var(--sc-glass-hover);
}
.sc-action-danger:hover {
    background: rgba(var(--status-red-rgb), 0.70);
    border-color: rgba(var(--status-red-rgb), 0.90);
}

.sc-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--sc-glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 2px solid var(--sc-play-border);
    color: var(--sc-text-img);
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    transition: background 0.2s, transform 0.2s;
}
.sc-play:hover {
    background: var(--sc-play-hover);
    transform: translate(-50%, -50%) scale(1.08);
}

.sc-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 14px;
    z-index: 2;
}

.sc-info-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 5px;
}

.sc-author {
    font-size: 14px;
    font-weight: 700;
    color: var(--sc-text-img);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sc-desc {
    font-size: 12px;
    color: var(--sc-desc-img);
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
    line-height: 1.5;
}

.sc-date {
    font-size: 11px;
    color: var(--sc-date-img);
    display: flex;
    align-items: center;
    gap: 5px;
}

.sc .show-btn,
.sc .hide-btn {
    font-size: 11px;
    padding: 2px 9px;
    flex-shrink: 0;
}


/* ── 22. RIBBON ── */
.ribbon {
    width: 125px;
    height: 125px;
    overflow: hidden;
    position: absolute;
}

.ribbon span {
    position: absolute;
    display: block;
    width: 200px;
    padding: 5px 0;
    background-color: var(--primary-color);
    color: var(--white-color);
    font: 700 16px/1 'Rubik', sans-serif;
    text-transform: uppercase;
    text-align: center;
}

.ribbon-top-left {
    top: -10px;
    left: -10px;
}

.ribbon-top-left::before {
    top: 0;
    right: 0;
}

.ribbon-top-left::after {
    bottom: 0;
    left: 0;
}

.ribbon-top-left span {
    right: -25px;
    top: 30px;
    transform: rotate(-45deg);
}


/* ── 23. LOADER ── */
#dvloader {
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    position: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0.85;
    background-color: var(--bg-surface);
    z-index: 9999;
}

#dvloader img {
    max-width: 240px;
    max-height: 240px;
    z-index: 100;
}


/* ── 24. LOGIN / INSTALL ── */
.login-bg {
    background: var(--bg-base);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: auto;
    padding-bottom: 20px;
}

@media (max-height: 600px) {
    .login-bg {
        justify-content: flex-start;
    }
}

.app-logo img {
    width: 160px;
    margin: 14px 0 18px;
}

.app-login-box {
    max-width: 400px;
    margin: 0 auto;
    width: 90%;
    padding: 32px;
    background: var(--bg-surface);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-default);
    box-shadow: var(--shadow-card);
}

.app-login-box .form-control {
    background: var(--bg-surface-alt);
}

.app-login-box .form-control:focus {
    background: var(--bg-surface);
}

.left-caption {
    height: 100%;
    position: relative;
}

.left-caption .bg-img {
    height: 100%;
    width: 100%;
    object-fit: fill;
}

.left-caption .caption {
    height: 100%;
    width: 100%;
    position: absolute;
    left: 0;
    top: 0;
    background: var(--black-50);
    color: var(--white-color);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px;
}

.left-caption .caption .text {
    margin-top: 18px;
    font-size: 14px;
    line-height: 24px;
}

.install-bg-img {
    text-align: center;
}

.install-bg-img img {
    max-width: 100%;
    height: auto;
}

.install-title {
    font-size: 40px;
    font-weight: 700;
    color: var(--text-primary);
}

.install_sub_title {
    font-size: 22px;
    color: var(--text-secondary);
}

.install_text {
    font-size: 18px;
    margin: 28px 0;
    color: var(--text-primary);
}

.install-list li {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.install-list li:hover {
    background-color: var(--bg-surface);
    color: var(--accent);
}

.install-card {
    margin-left: 80px;
    margin-right: 80px;
}

@media (max-width: 1024px) {
    .install-bg-img {
        display: none !important;
    }
}

.install-footer {
    padding: 18px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    color: var(--white-color);
    background-color: var(--primary-color);
}

.install-footer a {
    color: var(--white-color);
    margin: 0 14px;
    font-size: 16px;
}

.install-footer a:hover {
    color: var(--text-on-dark);
}

.install-social-icons {
    margin-top: 10px;
}

.install-social-icons a {
    color: var(--white-color);
    font-size: 18px;
}

.install-social-icons a:hover {
    color: var(--text-on-dark);
}

.install-footer .content {
    position: relative;
    z-index: 1;
}

.btn-install {
    background: var(--primary-color);
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 600;
    color: var(--white-color);
    border: 1.5px solid transparent;
    transition: all 0.18s;
    padding: 10px 40px;
}

.btn-install:hover {
    background: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-install-cancel {
    background: var(--text-primary);
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 600;
    color: var(--white-color);
    border: 1.5px solid transparent;
    transition: all 0.18s;
    padding: 10px 40px;
}

.btn-install-cancel:hover {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--text-primary);
}

.list-group-item {
    padding-top: 16px !important;
    padding-bottom: 16px !important;
    background-color: transparent;
    color: var(--text-primary);
}


/* ── 25. DASHBOARD SPECIFIC ── */
.category-box {
    padding: 22px;
    background: var(--bg-surface-alt);
    border-radius: var(--radius-lg);
}

.category-box .f600 {
    font-weight: 600;
}

.category-box .box-border-0 {
    border: 0;
    padding-bottom: 0;
}

.centered {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 18px;
    font-weight: 800;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    width: 100%;
    color: var(--white-color);
    padding-left: 24px;
}

.category-image {
    max-height: 105px;
    height: 105px;
    width: 100%;
    border-radius: var(--radius-sm);
    filter: blur(1.2px);
}

.hashtag-card {
    padding: 10px 0;
    border-left: 4px solid var(--accent);
    border-radius: 0;
    font-size: 16px;
    font-weight: 600;
    background-color: var(--bg-surface);
}

.hashtag-card>.row {
    margin: 0;
}

.hashtag-card>.row .col,
.hashtag-card>.row .col-2,
.hashtag-card>.row .col-10 {
    padding: 0;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.artist-row {
    margin: 0 -8px;
}

.artist-row .col-6 {
    padding: 0 8px;
}

.artist-name {
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    color: var(--text-primary);
}

.artist-image {
    height: 100px;
    width: 100%;
    border-radius: var(--radius-md);
    object-fit: cover;
}

@media (max-width: 1440px) {
    .artist-image {
        height: 70px;
    }

    .wallet-image {
        height: 110px;
        border-radius: var(--radius-md);
    }
}

@media (max-width: 1260px) {
    .wallet-image {
        height: 70px;
    }
}

@media (max-width: 991px) {
    .wallet-image {
        height: 140px;
    }
}


/* ── 26. MAP ── */
#map {
    height: 500px;
    width: 100%;
}

.gm-ui-hover-effect {
    display: none !important;
}

.gm-style-iw-d {
    overflow: hidden !important;
}

.gm-style-iw-c {
    padding: 0 !important;
}

.gm-style-iw-ch {
    padding: 0 !important;
}

#map-legend {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-dropdown);
    font-size: 13px;
    z-index: 999;
    max-height: 200px;
    overflow-y: auto;
}

#map-legend .legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
}

#map-legend .legend-color {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    margin-right: 8px;
}

.infowindow-card {
    font-family: var(--font);
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    width: 250px;
    height: 240px;
    box-shadow: var(--shadow-dropdown);
    overflow: hidden;
}

.infowindow-header {
    background: var(--primary-color);
    color: var(--white-color);
    padding: 10px;
    font-size: 13px;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    display: flex;
    align-items: center;
}

.infowindow-header strong {
    font-size: 15px;
    margin-left: 4px;
}

.infowindow-header span {
    font-size: 15px;
    margin-left: 6px;
}

.infowindow-body {
    padding: 10px;
    font-size: 13px;
    color: var(--text-primary);
}


/* ── 27. NOTES & MISC ── */
.note-item {
    background: var(--bg-surface-alt);
    border-left: 4px solid var(--accent) !important;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.note-text {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-primary);
}

.listitemClass {
    background-color: var(--bg-surface-alt);
    border: 1px solid var(--border-default);
    cursor: s-resize;
    font-size: 13px;
    padding: 4px;
    color: var(--text-primary);
}

.rotate {
    transform: rotate(360deg);
    transition: all 0.5s ease;
}

.notification_checkbox,
.email_checkbox {
    height: 20px;
    width: 20px;
}

.cart-bg {
    background-color: var(--bg-surface-alt);
}

.import-file {
    background-color: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    /* Match .form-control padding exactly so height is identical */
    padding: 10px 14px;
    font-size: 14px;
    font-family: var(--font);
    transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
}
.import-file:focus,
.import-file:focus-within {
    border-color: var(--border-focus);
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.14);
}
.import-file::file-selector-button {
    background-color: var(--accent);
    color: #ffffff;
    border: none;
    border-right: 1px solid rgba(255, 255, 255, 0.20);
    border-radius: 0;
    /* Negative margins cancel the container padding so the button
       fills top/bottom and aligns flush with the left edge */
    margin: -10px 12px -10px -14px;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font);
    transition: background-color 0.15s;
}
.import-file::file-selector-button:hover {
    background-color: var(--accent-hover);
}

/* Dark mode — all vars already adapt; only border-right tint shifts */
[data-theme="dark"] .import-file::file-selector-button {
    border-right-color: rgba(255, 255, 255, 0.12);
}

/* Select2 overrides (supplement inline styles in page-app.blade.php) */
.select2-container .select2-selection--single,
.select2-container .select2-selection--multiple {
    border: 1px solid var(--border-default) !important;
    background: var(--bg-input) !important;
    border-radius: var(--radius-md) !important;
    color: var(--text-primary) !important;
    height: 38px !important;
}

.select2-container .select2-selection--multiple {
    height: auto !important;
    min-height: 38px !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__rendered {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
    padding: 4px 8px !important;
    align-items: center !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background: var(--accent-subtle) !important;
    border: 1px solid var(--border-default) !important;
    border-radius: var(--radius-sm) !important;
    color: var(--text-primary) !important;
    padding: 2px 6px !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__display {
    color: var(--text-primary) !important;
    font-size: 13px !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: var(--text-muted) !important;
    background: none !important;
    border: none !important;
    font-size: 14px !important;
    line-height: 1 !important;
    padding: 0 !important;
    margin: 0 !important;
    order: -1 !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: var(--text-primary) !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px !important;
}

.select2-dropdown {
    background: var(--bg-surface) !important;
    border-color: var(--border-default) !important;
    box-shadow: var(--shadow-dropdown) !important;
}

.select2-results__option {
    color: var(--text-primary) !important;
    background-color: var(--bg-surface) !important;
}

.select2-container--default .select2-results__option[aria-selected="true"] {
    background-color: var(--bg-surface-alt) !important;
    color: var(--text-muted) !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--nav-active-bg) !important;
    color: var(--nav-active-color) !important;
}

.select2-search--dropdown .select2-search__field {
    background: var(--bg-input) !important;
    border-color: var(--border-default) !important;
    color: var(--text-primary) !important;
    border-radius: var(--radius-sm) !important;
    outline: none !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--text-primary) !important;
    line-height: 36px !important;
}

/* Filter-sort Select2 re-declared after global block to guarantee cascade win */
.filter-sort .select2-container {
    width: auto !important;
    align-self: stretch;
    padding: 8px 10px 8px 10px;
}

.filter-sort .select2-container .select2-selection--single,
.filter-sort .select2-container .select2-selection--multiple {
    border: none !important;
    background: transparent !important;
    border-radius: 0 !important;
    height: 100% !important;
    box-shadow: none !important;
    display: flex !important;
    align-items: center !important;
}

.filter-sort .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: normal !important;
    padding: 0 28px 0 10px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
}

.filter-sort .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100% !important;
    top: 0 !important;
    right: 6px !important;
}


/* ── 28. THEME TRANSITION ── */
.sidebar,
.header,
.right-content,
body,
.custom-card,
.custom-border-card,
.table,
.form-control,
.dropdown-menu,
.sc {
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

@media (prefers-reduced-motion: reduce) {

    .sidebar,
    .header,
    .right-content,
    body,
    .custom-card,
    .custom-border-card,
    .table,
    .form-control,
    .dropdown-menu,
    .sidebar .side-menu a,
    .btn-default,
    .btn-cancel {
        transition: none !important;
    }

    .modal.fade .modal-dialog {
        transform: none !important;
        transition: none !important;
    }

    /* Belt-and-suspenders: silence all page-load animations for reduce-motion users */
    .sidebar,
    .sidebar .side-head,
    .sidebar .side-menu > *,
    .header,
    .header .page-title,
    .dropdown-menu,
    .filter-bar,
    .export-toolbar,
    .page-search,
    .table-responsive,
    .custom-border-card,
    .sa-row-animate,
    .breadcrumb,
    .breadcrumb-item,
    .dept-card,
    .sc {
        animation: none !important;
    }

}


/* ── 29. LARGE SCREENS ── */
@media (min-width: 1600px) {

    .table thead th,
    .table td {
        font-size: 14px;
    }

    .custom-tabs .nav-link,
    .summary-table-card .border-card {
        font-size: 14px;
        padding: 8px 12px;
    }

    .video-card .card-img-top {
        height: 240px;
    }

    .video-card .card-body .card-title {
        font-size: 16px;
    }

    .form-group label {
        font-size: 12px;
    }

    .custom-border-card .card-header {
        font-size: 16px;
    }
}

@media (max-width: 1280px) {
    .header .input-group {
        width: 280px;
    }
}


/* ── 30. RESPONSIVE — TABLET ── */
@media (max-width: 991px) {
    .sidebar {
        left: calc(-1 * var(--sidebar-width));
    }

    .sidebar.hide-sidebar {
        transform: translateX(0);
        left: 0;
        z-index: 120;
        width: var(--sidebar-width);
        padding: 20px 10px;
    }

    .sidebar.hide-sidebar .side-toggle span:first-child {
        transform: rotate(45deg);
        margin-bottom: -6px;
    }

    .sidebar.hide-sidebar .side-toggle span:nth-child(2) {
        display: none;
    }

    .sidebar.hide-sidebar .side-toggle span:last-child {
        transform: rotate(-45deg);
    }

    .right-content {
        margin-left: 0 !important;
    }

    .right-content .page-title {
        display: none;
    }

    .header {
        padding: 0 16px;
    }

    .header .title-control .side-toggle {
        display: flex !important;
    }

    .header .side-logo {
        display: flex;
        align-items: center;
    }

    .header .mobile-close-search {
        display: none;
    }

    .counter-row .col-md {
        padding-right: 5px;
        padding-left: 5px;
    }

    .page-title-sm {
        font-size: 22px;
        font-weight: 700;
        margin: -8px 0 18px;
        display: block;
        border-bottom: 1px solid var(--border-default);
        padding-bottom: 8px;
        color: var(--text-primary);
    }

    .app-logo img {
        margin: 18px 0 10px;
    }
}

@media (max-width: 767px) {
    .btn-default {
        font-size: 13px;
        padding: 7px 18px;
    }

    .header .input-group {
        height: 40px;
        width: 40px;
        border-radius: var(--radius-sm);
    }

    .header .input-group .input-group-text {
        padding: 6px;
    }

    .header .input-group .form-control {
        display: none;
    }

    .box-title {
        padding-bottom: 8px;
    }

    .box-title .title {
        font-size: 17px;
    }

    .avatar-control .avatar-img {
        height: 32px;
        width: 32px;
    }

    .table th,
    .table td {
        padding: 8px 6px;
    }

    .summary-table-card .border-card {
        padding: 8px 2px;
    }

    .summary-table-card .border-card .row .col {
        text-align: left;
    }

    .summary-table-card .border-card .row .col-12 {
        justify-content: flex-start;
    }

    .summary-table-card .avatar-control {
        margin: 0 12px 10px;
    }

    .pagination {
        margin-top: 18px;
    }

    .inline-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        margin-top: 0;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .inline-tabs::-webkit-scrollbar {
        display: none;
    }

    .inline-tabs .nav-link {
        padding: 8px 14px;
        font-size: 12px;
    }

    .app-right-btn {
        margin: 0 0 14px;
    }

    .form-group label {
        font-size: 11px;
    }

    .custom-border-card {
        padding: 14px 16px;
    }

    .custom-border-card .card-header {
        font-size: 14px;
        padding: 11px 16px;
        margin: -14px -16px 16px;
    }

    .file-control {
        padding: 16px;
    }
}

@media (max-width: 567px) {
    .page-search {
        flex-direction: column;
        margin-bottom: 12px;
        align-items: stretch;
    }

    .page-search .sorting {
        margin-top: 8px;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .export-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    div.dataTables_wrapper div.dataTables_length label,
    div.dataTables_wrapper div.dataTables_filter label {
        display: flex;
        justify-content: center;
    }

    div.table-responsive>div.dataTables_wrapper>div.row>div[class^=col-]:first-child,
    div.table-responsive>div.dataTables_wrapper>div.row>div[class^=col-]:last-child {
        padding: 0;
        overflow: auto;
    }

    div.dataTables_wrapper div.dataTables_paginate ul.pagination {
        margin-top: 14px;
    }
}

@media (max-width: 340px) {
    .header .side-logo img {
        width: 110px;
    }
}

@keyframes saBcWrapIn {
    from { opacity: 0; transform: translateY(-14px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)     scale(1);    }
}
@keyframes saBcItemIn {
    from { opacity: 0; transform: translateX(-10px); }
    to   { opacity: 1; transform: translateX(0); }
}
.breadcrumb {
    background-color: var(--bg-surface) !important;
    border-radius: 10px;
    padding: 10px 16px !important;
    margin-bottom: 20px;
    border: 1px solid var(--border-default);
    box-shadow: 0 1px 8px rgba(0,0,0,0.04);
    display: inline-flex !important;
    align-items: center;
    flex-wrap: wrap;
    font-size: 13px;
    font-weight: 500;
    gap: 2px;
    transition: background 180ms ease, color 180ms ease,
                transform  180ms cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 180ms ease;
    animation: saBcWrapIn 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.breadcrumb-item {
    padding: 0 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    animation: saBcItemIn 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.breadcrumb-item:nth-child(1) { animation-delay: 0.10s; }
.breadcrumb-item:nth-child(2) { animation-delay: 0.18s; }
.breadcrumb-item:nth-child(3) { animation-delay: 0.26s; }
.breadcrumb-item:nth-child(4) { animation-delay: 0.34s; }
.breadcrumb-item:nth-child(n+5) { animation-delay: 0.40s; }
.breadcrumb-item + .breadcrumb-item::before {
    content: "\f105" !important;   /* fa-angle-right */
    font-family: 'FontAwesome';
    font-weight: 900;
    font-style: normal;
    display: inline-flex;
    align-items: center;
    align-self: center;
    color: var(--text-primary);
    opacity: 0.35;
    font-size: 12px;
    padding: 0 5px;
    float: none;
}
.breadcrumb-item a {
    color: var(--accent);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: opacity 150ms ease;
}
.breadcrumb-item a:hover       { opacity: 0.72; text-decoration: none; }
.breadcrumb-item.active        { color: var(--text-primary) !important; opacity: 0.55; font-weight: 500; }

[data-theme="dark"] .breadcrumb {
    background-color: var(--bg-surface) !important;
    border-color: var(--border-default);
    box-shadow: 0 1px 8px rgba(0,0,0,0.22);
}
[data-theme="dark"] .breadcrumb-item + .breadcrumb-item::before { color: var(--text-muted); opacity: 0.6; }
[data-theme="dark"] .breadcrumb-item a                          { color: var(--accent); }
[data-theme="dark"] .breadcrumb-item.active                     { color: var(--text-primary) !important; }


/* ── 31. PAGE-LOAD ENTRANCE ANIMATIONS ─────────────────────────────────
   Keyframes mirror the reference admin.css pattern exactly.
   All animation rules are guarded with prefers-reduced-motion: no-preference
   so users who enable "Reduce Motion" in their OS never see these.
   ─────────────────────────────────────────────────────────────────────── */

/* Keyframe definitions (outside any media query — they're just declarations) */
@keyframes saSidebarEnter {
    from { opacity: 0; transform: translateX(-32px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes saSideItemIn {
    from { opacity: 0; transform: translateX(-16px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes saHdrEnter {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes saDropIn {
    from { opacity: 0; transform: translateY(-6px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0)   scale(1); }
}
@keyframes sacCardIn {
    from { opacity: 0; transform: translateY(22px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
}
@keyframes saRowIn {
    from { opacity: 0; transform: translateX(-14px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ── Sidebar — desktop only (mobile uses CSS class toggle, not page-load) */
@media (min-width: 992px) and (prefers-reduced-motion: no-preference) {
    .sidebar {
        animation: saSidebarEnter 0.44s cubic-bezier(0.22, 1, 0.36, 1) both;
    }
    .sidebar .side-head {
        animation: saSideItemIn 0.38s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
    }
    .sidebar .side-menu > *:nth-child(1)    { animation: saSideItemIn 0.30s ease 0.12s both; }
    .sidebar .side-menu > *:nth-child(2)    { animation: saSideItemIn 0.30s ease 0.17s both; }
    .sidebar .side-menu > *:nth-child(3)    { animation: saSideItemIn 0.30s ease 0.22s both; }
    .sidebar .side-menu > *:nth-child(4)    { animation: saSideItemIn 0.30s ease 0.27s both; }
    .sidebar .side-menu > *:nth-child(5)    { animation: saSideItemIn 0.30s ease 0.32s both; }
    .sidebar .side-menu > *:nth-child(6)    { animation: saSideItemIn 0.30s ease 0.37s both; }
    .sidebar .side-menu > *:nth-child(7)    { animation: saSideItemIn 0.30s ease 0.42s both; }
    .sidebar .side-menu > *:nth-child(8)    { animation: saSideItemIn 0.30s ease 0.47s both; }
    .sidebar .side-menu > *:nth-child(9)    { animation: saSideItemIn 0.30s ease 0.52s both; }
    .sidebar .side-menu > *:nth-child(10)   { animation: saSideItemIn 0.30s ease 0.57s both; }
    .sidebar .side-menu > *:nth-child(11)   { animation: saSideItemIn 0.30s ease 0.62s both; }
    .sidebar .side-menu > *:nth-child(12)   { animation: saSideItemIn 0.30s ease 0.67s both; }
    .sidebar .side-menu > *:nth-child(n+13) { animation: saSideItemIn 0.30s ease 0.70s both; }
}

/* ── Header, content blocks, table rows ── */
@media (prefers-reduced-motion: no-preference) {

    /* Header slides down on page load */
    .header {
        animation: saHdrEnter 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
    }

    /* Page title fades in from left (matches header .page-title pattern) */
    .header .page-title {
        animation: saSideItemIn 0.40s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both;
    }

    /* Dropdown menus pop in when opened */
    .dropdown-menu {
        animation: saDropIn 0.18s cubic-bezier(0.22, 1, 0.36, 1) both;
    }

    /* Content blocks — works across ALL admin modules automatically */
    .filter-bar,
    .page-search {
        animation: sacCardIn 0.52s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
    }

    .export-toolbar {
        animation: sacCardIn 0.52s cubic-bezier(0.22, 1, 0.36, 1) 0.06s both;
    }

    .table-responsive {
        animation: sacCardIn 0.52s cubic-bezier(0.22, 1, 0.36, 1) 0.22s both;
    }

    .custom-border-card {
        animation: sacCardIn 0.52s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
    }

    /* Table row — class added via DataTables drawCallback */
    .sa-row-animate {
        animation: saRowIn 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
    }

    /* ── Department cards — staggered wave on page load ──
       Cards aren't direct siblings (each lives inside a .col-* wrapper),
       so we stagger by targeting the parent column via nth-child.
       Pattern: each row starts 0.05s later; within each row each card
       is 0.06s behind the previous — creates a left-to-right wave.
       16 entries = 4 rows × 4 columns (matches paginate(16) in controller). */
    .row > div .dept-card {
        animation: sacCardIn 0.48s cubic-bezier(0.22, 1, 0.36, 1) both;
    }

    /* Row 1 */
    .row > div:nth-child(1)  .dept-card { animation-delay: 0.20s; }
    .row > div:nth-child(2)  .dept-card { animation-delay: 0.26s; }
    .row > div:nth-child(3)  .dept-card { animation-delay: 0.32s; }
    .row > div:nth-child(4)  .dept-card { animation-delay: 0.38s; }
    /* Row 2 */
    .row > div:nth-child(5)  .dept-card { animation-delay: 0.25s; }
    .row > div:nth-child(6)  .dept-card { animation-delay: 0.31s; }
    .row > div:nth-child(7)  .dept-card { animation-delay: 0.37s; }
    .row > div:nth-child(8)  .dept-card { animation-delay: 0.43s; }
    /* Row 3 */
    .row > div:nth-child(9)  .dept-card { animation-delay: 0.30s; }
    .row > div:nth-child(10) .dept-card { animation-delay: 0.36s; }
    .row > div:nth-child(11) .dept-card { animation-delay: 0.42s; }
    .row > div:nth-child(12) .dept-card { animation-delay: 0.48s; }
    /* Row 4 */
    .row > div:nth-child(13) .dept-card { animation-delay: 0.35s; }
    .row > div:nth-child(14) .dept-card { animation-delay: 0.41s; }
    .row > div:nth-child(15) .dept-card { animation-delay: 0.47s; }
    .row > div:nth-child(n+16) .dept-card { animation-delay: 0.50s; }

    /* ── Story module — grid cards stagger in ── */
    .row > div .sc {
        animation: sacCardIn 0.46s cubic-bezier(0.22, 1, 0.36, 1) both;
    }
    .row > div:nth-child(1) .sc  { animation-delay: 0.06s; }
    .row > div:nth-child(2) .sc  { animation-delay: 0.10s; }
    .row > div:nth-child(3) .sc  { animation-delay: 0.14s; }
    .row > div:nth-child(4) .sc  { animation-delay: 0.18s; }
    .row > div:nth-child(5) .sc  { animation-delay: 0.22s; }
    .row > div:nth-child(6) .sc  { animation-delay: 0.26s; }
    .row > div:nth-child(7) .sc  { animation-delay: 0.30s; }
    .row > div:nth-child(8) .sc  { animation-delay: 0.34s; }
    .row > div:nth-child(n+9) .sc { animation-delay: 0.38s; }


/* ── App-Settings dynamic drop-area size variants ── */
.drop-area.as-dyn-drop  { min-height: 150px; width: 100%; }
.drop-area.as-icon-drop { min-height: 100px; width: 100%; border-radius: var(--radius-md); }
}

/* ── Settings Layout ── */
.settings-nav-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: 12px;
    padding: 10px 0;
    position: sticky;
    top: 16px;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.settings-tab-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    color: var(--text-secondary);
    border-radius: 0;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    white-space: nowrap;
}

.settings-tab-nav .nav-link i {
    width: 16px;
    text-align: center;
    font-size: 13px;
    flex-shrink: 0;
}

.settings-tab-nav .nav-link span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.settings-tab-nav .nav-link:hover {
    background: var(--accent-subtle);
    color: var(--accent);
    border-left-color: var(--accent);
}

.settings-tab-nav .nav-link.active {
    background: var(--accent-subtle);
    color: var(--accent);
    border-left-color: var(--accent);
    font-weight: 600;
}

@media (max-width: 991px) {
    .settings-tab-nav {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .settings-tab-nav .nav-link {
        border-left: none;
        border-bottom: 3px solid transparent;
        padding: 10px 16px;
    }

    .settings-tab-nav .nav-link.active,
    .settings-tab-nav .nav-link:hover {
        border-left: none;
        border-bottom-color: var(--accent);
    }
}

/* ── Section card ── */
.stg-section {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: 12px;
    margin-bottom: 18px;
    overflow: hidden;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.stg-section-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 22px;
    border-bottom: 1px solid var(--border-default);
    background: var(--bg-surface-alt);
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.stg-section-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--accent-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 14px;
    flex-shrink: 0;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.stg-section-title {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 2px;
}

.stg-section-sub {
    font-size: 11.5px;
    color: var(--text-muted);
    margin: 0;
}

.stg-section-body {
    padding: 22px;
}

.stg-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 16px;
    border-top: 1px solid var(--border-default);
    margin-top: 16px;
}

.stg-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.stg-label i {
    color: var(--accent);
    font-size: 10px;
}

.stg-hint-text {
    font-size: 11.5px;
    color: var(--text-muted);
}

/* ── Logos column ── */
.stg-logos-col {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding-left: 20px;
    border-left: 1px solid var(--border-default);
    height: 100%;
}

/* ── API / Token rows ── */
.stg-api-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stg-api-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.stg-api-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    background: var(--accent);
    color: var(--white-color);
    text-transform: uppercase;
}

.stg-api-badge-alt {
    background: var(--text-secondary);
}

.stg-api-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.stg-token-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.stg-mono-input {
    font-family: 'Courier New', monospace !important;
    font-size: 12.5px !important;
    background: var(--bg-surface-alt) !important;
    color: var(--text-secondary) !important;
    border-color: var(--border-default) !important;
}

.stg-copy-btn {
    border: 1px solid var(--border-default);
    background: var(--bg-surface-alt);
    color: var(--text-secondary);
    border-radius: 8px;
    padding: 6px 12px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.stg-copy-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-subtle);
}

/* ── Onboarding items ── */
.ob-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ob-item {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    padding: 18px;
    background: var(--bg-surface-alt);
    border: 1px solid var(--border-default);
    border-radius: 10px;
    position: relative;
    transition: box-shadow 0.2s;
}

.ob-item:hover {
    box-shadow: var(--shadow-card);
}

.ob-item-new {
    border-style: dashed;
    border-color: var(--border-strong);
}

.ob-num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--white-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 2px;
}

.ob-new-badge {
    position: absolute;
    top: -1px;
    left: 18px;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: var(--accent);
    color: var(--white-color);
    padding: 2px 8px;
    border-radius: 0 0 6px 6px;
}

.ob-item-upload {
    flex-shrink: 0;
}

.ob-item-upload .image-upload-wrapper {
    width: 140px !important;
}

.ob-item-upload .drop-area {
    width: 100% !important;
    min-height: 140px !important;
}

.ob-item-fields {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ob-remove-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    outline: none;
    background: var(--bg-surface);
    color: var(--status-red);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
    padding: 0;
}

.ob-remove-btn:hover {
    background: var(--status-red);
    color: var(--white-color);
    transform: scale(1.12);
}

.ob-remove-btn:focus,
.ob-remove-btn:focus-visible {
    outline: none;
    box-shadow: none;
}

.ob-remove-btn:active {
    transform: scale(0.95);
}

/* ── Social link items ── */
.sl-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sl-item {
    padding: 18px 20px;
    background: var(--bg-surface-alt);
    border: 1px solid var(--border-default);
    border-radius: 10px;
    position: relative;
    transition: box-shadow 0.2s;
}

.sl-item:hover {
    box-shadow: var(--shadow-card);
}

.sl-item-new {
    border-style: dashed;
    border-color: var(--border-strong);
}

/* ── Add button ── */
.stg-add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    border: 2px dashed var(--border-default);
    border-radius: 10px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.stg-add-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-subtle);
}

.stg-add-btn i {
    font-size: 13px;
}

/* ── Settings: ob-item / sl-item — theme-transition ── */
.ob-item {
    transition: box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.sl-item {
    transition: box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

/* ── Settings: tab-pane entrance — fade + slide-up (mirrors modal animation) ── */
.settings-layout .tab-pane.show {
    animation: stgFadeSlide 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes stgFadeSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ═══════════════════════════════════════════════════
   SYSTEM SETTINGS — Action Cards
   ═══════════════════════════════════════════════════ */

/* Page intro banner */
.sys-intro-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--accent-subtle);
    border: 1px solid var(--border-default);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius-lg);
    padding: 16px 22px;
}

.sys-intro-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.sys-intro-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 2px;
}

.sys-intro-sub {
    font-size: 12.5px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* Cards grid */
.sys-action-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

/* Individual action card */
.sys-action-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.sys-action-card:hover {
    border-color: var(--border-strong);
    box-shadow: 0 6px 24px rgba(20, 37, 58, 0.10);
    transform: translateY(-2px);
}

.sys-action-card.card-danger:hover {
    border-color: var(--status-red);
    box-shadow: 0 6px 24px rgba(var(--status-red-rgb), 0.16);
}

/* Card header zone */
.sys-action-card-head {
    padding: 18px 20px 16px;
    border-bottom: 1px solid var(--border-default);
    background: var(--bg-surface-alt);
    display: flex;
    align-items: flex-start;
    gap: 14px;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

/* Icon box */
.sys-action-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    flex-shrink: 0;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.sys-action-icon.icon-blue {
    background: var(--accent-subtle);
    color: var(--accent);
}

.sys-action-icon.icon-green {
    background: var(--status-green-bg);
    color: var(--status-green);
}

.sys-action-icon.icon-red {
    background: var(--status-red-bg);
    color: var(--status-red);
}

.sys-action-card-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 6px;
    line-height: 1.3;
}

/* Status badges */
.sys-action-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10.5px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 20px;
    letter-spacing: 0.02em;
}

.sys-action-badge.badge-safe {
    background: var(--status-green-bg);
    color: var(--status-green);
}

.sys-action-badge.badge-danger {
    background: var(--status-red-bg);
    color: var(--status-red);
}

/* Card body */
.sys-action-card-body {
    padding: 18px 20px;
    flex: 1;
}

.sys-action-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.65;
    margin: 0;
}

.sys-action-warning {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin-top: 12px;
    padding: 10px 13px;
    background: var(--status-red-bg);
    border: 1px solid rgba(var(--status-red-rgb), 0.22);
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--status-red);
    font-weight: 500;
    line-height: 1.5;
}

.sys-action-warning i {
    font-size: 13px;
    flex-shrink: 0;
    margin-top: 1px;
}

/* Card footer */
.sys-action-card-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--border-default);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    background: var(--bg-surface);
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

/* Danger action button */
.btn-danger-action {
    background: linear-gradient(135deg, var(--status-red) 0%, var(--status-red-deep) 100%);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    border: none;
    padding: 9px 22px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    box-shadow: 0 4px 14px rgba(var(--status-red-rgb), 0.28);
    transition: transform 150ms ease, box-shadow 200ms ease, background 200ms ease;
    cursor: pointer;
    min-width: 120px;
    justify-content: center;
}

.btn-danger-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(var(--status-red-rgb), 0.40);
    color: #fff;
    background: linear-gradient(135deg, var(--status-red-deep) 0%, var(--status-red) 100%);
}

.btn-danger-action:active {
    transform: scale(0.97);
}

/* Download / success action button */
.btn-success-action {
    background: linear-gradient(135deg, var(--status-green) 0%, #2d8f38 100%);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    border: none;
    padding: 9px 22px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    box-shadow: 0 4px 14px rgba(69, 171, 81, 0.28);
    transition: transform 150ms ease, box-shadow 200ms ease, background 200ms ease;
    cursor: pointer;
    text-decoration: none;
    min-width: 120px;
    justify-content: center;
}

.btn-success-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(69, 171, 81, 0.40);
    color: #fff;
    text-decoration: none;
    background: linear-gradient(135deg, #2d8f38 0%, var(--status-green) 100%);
}

.btn-success-action:active {
    transform: scale(0.97);
    color: #fff;
    text-decoration: none;
}

/* Responsive: 2-col on tablet, 1-col on mobile */
@media (max-width: 991px) {
    .sys-action-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    .sys-action-grid {
        grid-template-columns: 1fr;
    }

    .sys-intro-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}


/* ═══════════════════════════════════════════════════
   SYSTEM SETTINGS — Page-load entrance animations
   Mirrors the established pattern from section 31:
     • Keyframes defined outside any media query
     • Rules wrapped in prefers-reduced-motion guard
     • staggered nth-child delays for the card wave
   ═══════════════════════════════════════════════════ */

/* ── New keyframes (additive — do not duplicate existing ones) ── */
@keyframes saIconPopIn {
    from { opacity: 0; transform: scale(0.45) rotate(-15deg); }
    to   { opacity: 1; transform: scale(1)    rotate(0deg);   }
}

@keyframes saBadgeIn {
    from { opacity: 0; transform: scale(0.55) translateY(4px); }
    to   { opacity: 1; transform: scale(1)    translateY(0);   }
}

@keyframes sySysIntroIn {
    from { opacity: 0; transform: translateY(-12px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0)      scale(1);   }
}

@keyframes saWarnSlide {
    from { opacity: 0; transform: translateX(-14px); }
    to   { opacity: 1; transform: translateX(0);     }
}

/* ── Animation rules — respects OS "Reduce Motion" setting ── */
@media (prefers-reduced-motion: no-preference) {

    /* Intro banner — slides down like the header */
    .sys-intro-banner {
        animation: sySysIntroIn 0.40s cubic-bezier(0.22, 1, 0.36, 1) 0.10s both;
    }

    /* ── Action cards — staggered left-to-right wave ──
       Each card rises up (sacCardIn) with a 0.12s stagger between them.
       Total page weight: banner resolves by ~0.48s, first card by ~0.74s,
       last card by ~0.98s — feels fast and snappy. */
    .sys-action-grid .sys-action-card:nth-child(1) {
        animation: sacCardIn 0.52s cubic-bezier(0.22, 1, 0.36, 1) 0.22s both;
    }
    .sys-action-grid .sys-action-card:nth-child(2) {
        animation: sacCardIn 0.52s cubic-bezier(0.22, 1, 0.36, 1) 0.34s both;
    }
    .sys-action-grid .sys-action-card:nth-child(3) {
        animation: sacCardIn 0.52s cubic-bezier(0.22, 1, 0.36, 1) 0.46s both;
    }

    /* ── Icon pop — fires after the parent card has fully entered ──
       delay = card-delay + card-duration(0.52s) - 0.12s overlap
       Card 1 enters at 0.22s → icon pops at 0.62s
       Card 2 enters at 0.34s → icon pops at 0.74s
       Card 3 enters at 0.46s → icon pops at 0.86s
       Spring easing (1.56 overshoot) gives a lively bounce. */
    .sys-action-grid .sys-action-card:nth-child(1) .sys-action-icon {
        animation: saIconPopIn 0.38s cubic-bezier(0.34, 1.56, 0.64, 1) 0.62s both;
    }
    .sys-action-grid .sys-action-card:nth-child(2) .sys-action-icon {
        animation: saIconPopIn 0.38s cubic-bezier(0.34, 1.56, 0.64, 1) 0.74s both;
    }
    .sys-action-grid .sys-action-card:nth-child(3) .sys-action-icon {
        animation: saIconPopIn 0.38s cubic-bezier(0.34, 1.56, 0.64, 1) 0.86s both;
    }

    /* ── Badge pop — 0.10s after its icon ── */
    .sys-action-grid .sys-action-card:nth-child(1) .sys-action-badge {
        animation: saBadgeIn 0.30s cubic-bezier(0.34, 1.56, 0.64, 1) 0.72s both;
    }
    .sys-action-grid .sys-action-card:nth-child(2) .sys-action-badge {
        animation: saBadgeIn 0.30s cubic-bezier(0.34, 1.56, 0.64, 1) 0.84s both;
    }
    .sys-action-grid .sys-action-card:nth-child(3) .sys-action-badge {
        animation: saBadgeIn 0.30s cubic-bezier(0.34, 1.56, 0.64, 1) 0.96s both;
    }

    /* ── Danger warning box — slides in from left after card 3 settles ── */
    .sys-action-warning {
        animation: saWarnSlide 0.36s cubic-bezier(0.22, 1, 0.36, 1) 1.08s both;
    }

    /* ── Card titles — gentle slide-in from left within each card ── */
    .sys-action-grid .sys-action-card:nth-child(1) .sys-action-card-title {
        animation: saSideItemIn 0.32s cubic-bezier(0.22, 1, 0.36, 1) 0.68s both;
    }
    .sys-action-grid .sys-action-card:nth-child(2) .sys-action-card-title {
        animation: saSideItemIn 0.32s cubic-bezier(0.22, 1, 0.36, 1) 0.80s both;
    }
    .sys-action-grid .sys-action-card:nth-child(3) .sys-action-card-title {
        animation: saSideItemIn 0.32s cubic-bezier(0.22, 1, 0.36, 1) 0.92s both;
    }

    /* ── Description text — fades in slightly after title ── */
    .sys-action-grid .sys-action-card:nth-child(1) .sys-action-desc {
        animation: saSideItemIn 0.34s cubic-bezier(0.22, 1, 0.36, 1) 0.76s both;
    }
    .sys-action-grid .sys-action-card:nth-child(2) .sys-action-desc {
        animation: saSideItemIn 0.34s cubic-bezier(0.22, 1, 0.36, 1) 0.88s both;
    }
    .sys-action-grid .sys-action-card:nth-child(3) .sys-action-desc {
        animation: saSideItemIn 0.34s cubic-bezier(0.22, 1, 0.36, 1) 1.00s both;
    }

    /* ── Footer buttons — last to appear, rising up ── */
    .sys-action-grid .sys-action-card:nth-child(1) .sys-action-card-footer {
        animation: sacCardIn 0.34s cubic-bezier(0.22, 1, 0.36, 1) 0.82s both;
    }
    .sys-action-grid .sys-action-card:nth-child(2) .sys-action-card-footer {
        animation: sacCardIn 0.34s cubic-bezier(0.22, 1, 0.36, 1) 0.94s both;
    }
    .sys-action-grid .sys-action-card:nth-child(3) .sys-action-card-footer {
        animation: sacCardIn 0.34s cubic-bezier(0.22, 1, 0.36, 1) 1.06s both;
    }
}


/* ═══════════════════════════════════════════════════
   PANEL SETTINGS — Login Background Upload
   ═══════════════════════════════════════════════════ */

/* Make the wrapper full-width for the landscape bg upload */
.panel-bg-upload {
    width: 100%;
}

/* Tall landscape drop zone suited for a login bg image */
.panel-bg-drop {
    min-height: 280px;
    width: 100% !important;
    border-radius: var(--radius-lg);
}

/* Info card alongside the upload zone */
.panel-bg-info {
    background: var(--accent-subtle);
    border: 1px solid var(--border-default);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    width: 100%;
}

.panel-bg-info-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    margin-bottom: 12px;
}

.panel-bg-info-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 6px;
}

.panel-bg-info-text {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* ── Panel Settings entrance animations ── */
@media (prefers-reduced-motion: no-preference) {
    .panel-bg-upload {
        animation: sacCardIn 0.52s cubic-bezier(0.22, 1, 0.36, 1) 0.20s both;
    }

    .panel-bg-info {
        animation: saSideItemIn 0.42s cubic-bezier(0.22, 1, 0.36, 1) 0.32s both;
    }
}


/* ═══════════════════════════════════════════════════
   COMPLAINT — Department Cards Grid
   ═══════════════════════════════════════════════════ */

/* Purple token for Reopen status */
:root {
    --status-purple:    #7C3AED;
    --status-purple-bg: #EDE9FE;
}
[data-theme="dark"] {
    --status-purple:    #A78BFA;
    --status-purple-bg: rgba(124, 58, 237, 0.15);
}

/* 3-column responsive grid */
.dept-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}
@media (max-width: 991px) { .dept-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575px) { .dept-grid { grid-template-columns: 1fr; } }

/* Card — anchor element (complaint dept grid only) */
.dept-grid .dept-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-left: 4px solid var(--dept-color, var(--accent));
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.dept-grid .dept-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-dropdown);
    text-decoration: none;
    color: inherit;
}

/* Card header: icon + name */
.dept-card-head {
    display: flex;
    align-items: center;
    gap: 14px;
}
.dept-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    border: 2px solid var(--dept-color, var(--border-default));
    background: var(--bg-surface-alt);
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dept-icon-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.dept-card-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--dept-color, var(--text-primary));
    line-height: 1.3;
    margin: 0;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 5-stat flex row */
.dept-stats-grid {
    display: flex;
    gap: 6px;
}
.dept-stat {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 8px 4px;
    border-radius: var(--radius-sm);
    background: var(--bg-surface-alt);
}
.dept-stat-count {
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
    display: block;
}
.dept-stat-label {
    font-size: 10px;
    font-weight: 500;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    text-align: center;
    display: block;
}

/* Stat color variants */
.dept-stat.stat-open      { background: var(--status-blue-bg);   color: var(--status-blue); }
.dept-stat.stat-progress  { background: var(--status-amber-bg);  color: var(--status-amber); }
.dept-stat.stat-archived  { background: var(--status-red-bg);    color: var(--status-red); }
.dept-stat.stat-completed { background: var(--status-green-bg);  color: var(--status-green); }
.dept-stat.stat-reopen    { background: var(--status-purple-bg); color: var(--status-purple); }

/* "View complaints →" footer */
.dept-card-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--dept-color, var(--accent));
    padding-top: 12px;
    border-top: 1px solid var(--border-default);
    margin-top: auto;
    transition: gap 0.2s ease;
}
.dept-grid .dept-card:hover .dept-card-footer { gap: 10px; }

/* Empty state */
.dept-empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-muted);
    gap: 12px;
}
.dept-empty i { font-size: 48px; }
.dept-empty p { font-size: 14px; margin: 0; }

/* ── Dept card entrance animations ── */
@keyframes deptCardIn {
    from { opacity: 0; transform: translateY(18px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
}
@media (prefers-reduced-motion: no-preference) {
    .dept-grid .dept-card:nth-child(1)  { animation: deptCardIn 0.48s cubic-bezier(0.22,1,0.36,1) 0.10s both; }
    .dept-grid .dept-card:nth-child(2)  { animation: deptCardIn 0.48s cubic-bezier(0.22,1,0.36,1) 0.18s both; }
    .dept-grid .dept-card:nth-child(3)  { animation: deptCardIn 0.48s cubic-bezier(0.22,1,0.36,1) 0.26s both; }
    .dept-grid .dept-card:nth-child(4)  { animation: deptCardIn 0.48s cubic-bezier(0.22,1,0.36,1) 0.34s both; }
    .dept-grid .dept-card:nth-child(5)  { animation: deptCardIn 0.48s cubic-bezier(0.22,1,0.36,1) 0.42s both; }
    .dept-grid .dept-card:nth-child(6)  { animation: deptCardIn 0.48s cubic-bezier(0.22,1,0.36,1) 0.50s both; }
    .dept-grid .dept-card:nth-child(7)  { animation: deptCardIn 0.48s cubic-bezier(0.22,1,0.36,1) 0.58s both; }
    .dept-grid .dept-card:nth-child(8)  { animation: deptCardIn 0.48s cubic-bezier(0.22,1,0.36,1) 0.66s both; }
    .dept-grid .dept-card:nth-child(9)  { animation: deptCardIn 0.48s cubic-bezier(0.22,1,0.36,1) 0.74s both; }
    .dept-grid .dept-card:nth-child(10) { animation: deptCardIn 0.48s cubic-bezier(0.22,1,0.36,1) 0.82s both; }
    .dept-grid .dept-card:nth-child(11) { animation: deptCardIn 0.48s cubic-bezier(0.22,1,0.36,1) 0.90s both; }
    .dept-grid .dept-card:nth-child(12) { animation: deptCardIn 0.48s cubic-bezier(0.22,1,0.36,1) 0.98s both; }
    .dept-grid .dept-card:nth-child(13) { animation: deptCardIn 0.48s cubic-bezier(0.22,1,0.36,1) 1.06s both; }
    .dept-grid .dept-card:nth-child(14) { animation: deptCardIn 0.48s cubic-bezier(0.22,1,0.36,1) 1.14s both; }
    .dept-grid .dept-card:nth-child(15) { animation: deptCardIn 0.48s cubic-bezier(0.22,1,0.36,1) 1.22s both; }
}


/* ═══════════════════════════════════════════════════
   COMPLAINT DETAILS PAGE  (cd-*)
   ═══════════════════════════════════════════════════ */

/* ── Two-column layout ── */
.cd-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 20px;
    align-items: start;
    margin-bottom: 0;
}
@media (max-width: 991px) { .cd-layout { grid-template-columns: 1fr; } }

/* ── Info grid inside complaint details card ── */
.cd-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}
@media (max-width: 575px) { .cd-info-grid { grid-template-columns: 1fr; } }

.cd-info-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 8px;
    border-bottom: 1px solid var(--border-default);
}
.cd-info-row:nth-child(odd):not(.cd-info-row--full) {
    border-right: 1px solid var(--border-default);
}
.cd-info-row--full { grid-column: 1 / -1; }

.cd-info-label {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.cd-info-value {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.55;
    margin: 0;
}

.cd-info-value--accent {
    font-size: 20px;
    font-weight: 800;
    color: var(--accent);
}

/* ── Management form inside side card ── */
.cd-form-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cd-field-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.cd-field-static {
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 500;
    margin: 0;
    padding: 8px 12px;
    background: var(--bg-surface-alt);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-default);
    min-height: 38px;
    display: flex;
    align-items: center;
}

/* ── Media sections (before / after / reopen) ── */
.cd-media-sections {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.cd-media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    padding-top: 4px;
}

.cd-media-card {
    position: relative;
    /* aspect-ratio: 1; */
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-surface-alt);
    border: 1px solid var(--border-default);
    cursor: pointer;
}

.cd-media-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.22s ease;
}

.cd-media-card:hover img { transform: scale(1.05); }

.cd-play-btn {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    border: none;
    color: #fff;
    font-size: 38px;
    cursor: pointer;
    transition: background 0.2s;
    padding: 0;
}
.cd-play-btn:hover { background: rgba(0, 0, 0, 0.55); }

/* ── Internal notes ── */
.cd-note-composer textarea { resize: vertical; }

.cd-notes-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-default);
}

.cd-note-item {
    background: var(--bg-surface-alt);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 12px 16px;
}

.cd-note-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.cd-note-time {
    font-size: 11px;
    color: var(--text-muted);
}

.cd-note-text {
    font-size: 13px;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.6;
}

/* ── Activity timeline ── */
.cd-timeline {
    display: flex;
    flex-direction: column;
}

.cd-timeline-item {
    display: flex;
    gap: 14px;
    position: relative;
    padding-bottom: 22px;
}

.cd-timeline-item:last-child { padding-bottom: 0; }

.cd-timeline-item::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 16px;
    bottom: 0;
    width: 2px;
    background: var(--border-default);
}
.cd-timeline-item:last-child::before { display: none; }

.cd-tl-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid var(--bg-surface);
    box-shadow: 0 0 0 2px var(--accent);
    flex-shrink: 0;
    margin-top: 2px;
    position: relative;
    z-index: 1;
}

.cd-tl-body { flex: 1; min-width: 0; }

.cd-tl-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

.cd-tl-remark {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
}

.cd-tl-time {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.cd-tl-detail {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 5px;
    font-size: 12px;
    color: var(--text-secondary);
}

.cd-tl-key {
    font-weight: 700;
    color: var(--text-secondary);
}

.cd-tl-arrow {
    font-size: 9px;
    color: var(--text-muted);
}

/* ── Shared empty state ── */
.cd-empty-msg {
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    padding: 24px 0 8px;
    margin: 0;
}

/* ── stg-section-icon color variants ── */
.stg-section-icon--amber  { background: var(--status-amber-bg);  color: var(--status-amber); }
.stg-section-icon--green  { background: var(--status-green-bg);  color: var(--status-green); }
.stg-section-icon--purple { background: var(--status-purple-bg); color: var(--status-purple); }
/* ── Prevent Bootstrap modal from shifting layout on open ── */
body.modal-open { padding-right: 0 !important; overflow: hidden; }


/* ═══════════════════════════════════════════════════════════
   DEPARTMENT ANALYTICS PAGE  (da-*)
   ═══════════════════════════════════════════════════════════ */

/* ── Hero header ── */
.da-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 28px;
}
.da-hero-left { flex: 1; min-width: 0; }
.da-hero-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.da-hero-title-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: var(--accent-subtle);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}
.da-hero-sub {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

/* ── KPI stat row ── */
.da-kpi-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
@media (max-width: 1199px) { .da-kpi-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 479px)  { .da-kpi-row { grid-template-columns: 1fr; } }

.da-kpi-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-card);
    transition: box-shadow 0.2s, transform 0.18s;
}
.da-kpi-card:hover {
    box-shadow: var(--shadow-dropdown);
    transform: translateY(-2px);
}
.da-kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.da-kpi-icon--blue   { background: var(--status-blue-bg);   color: var(--status-blue);   }
.da-kpi-icon--amber  { background: var(--status-amber-bg);  color: var(--status-amber);  }
.da-kpi-icon--green  { background: var(--status-green-bg);  color: var(--status-green);  }
.da-kpi-icon--purple { background: var(--status-purple-bg); color: var(--status-purple); }
.da-kpi-value {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    margin: 0 0 5px;
}
.da-kpi-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin: 0;
}

/* ── Chart card ── */
.da-chart-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 20px 20px 10px;
    box-shadow: var(--shadow-card);
    margin-bottom: 20px;
}
.da-chart-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 14px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--border-default);
}
.da-chart-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}
.da-chart-icon--blue   { background: var(--status-blue-bg);   color: var(--status-blue);   }
.da-chart-icon--amber  { background: var(--status-amber-bg);  color: var(--status-amber);  }
.da-chart-icon--green  { background: var(--status-green-bg);  color: var(--status-green);  }
.da-chart-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 2px;
}
.da-chart-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
}

/* ── Two-column chart row ── */
.da-charts-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
@media (max-width: 991px) { .da-charts-2col { grid-template-columns: 1fr; } }

/* ── KPI entrance animation ── */
@media (prefers-reduced-motion: no-preference) {
    @keyframes daKpiIn {
        from { opacity: 0; transform: translateY(14px); }
        to   { opacity: 1; transform: translateY(0); }
    }
    .da-kpi-card:nth-child(1) { animation: daKpiIn 0.4s cubic-bezier(0.22,1,0.36,1) 0.05s both; }
    .da-kpi-card:nth-child(2) { animation: daKpiIn 0.4s cubic-bezier(0.22,1,0.36,1) 0.12s both; }
    .da-kpi-card:nth-child(3) { animation: daKpiIn 0.4s cubic-bezier(0.22,1,0.36,1) 0.19s both; }
    .da-kpi-card:nth-child(4) { animation: daKpiIn 0.4s cubic-bezier(0.22,1,0.36,1) 0.26s both; }
}

/* ═══════════════════════════════════════════════════════════
   ANALYTICS REPORT PAGE  (ar-*)
   ═══════════════════════════════════════════════════════════ */
.ar-filter-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}
.ar-filter-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
}
.ar-select {
    appearance: none;
    -webkit-appearance: none;
    background: var(--bg-surface-alt) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%238b9ab0' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 12px center;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    padding: 7px 34px 7px 12px;
    min-width: 180px;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.ar-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.15);
}
.ar-toggle-bar {
    display: flex;
    gap: 4px;
    background: var(--bg-surface-alt);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 3px;
}
.ar-toggle-btn {
    background: transparent;
    border: none;
    border-radius: calc(var(--radius-md) - 2px);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 14px;
    transition: background 0.15s, color 0.15s;
}
.ar-toggle-btn.active,
.ar-toggle-btn:hover {
    background: var(--bg-surface);
    color: var(--text-primary);
    box-shadow: var(--shadow-card);
}


/* ═══════════════════════════════════════════════════════════
   DASHBOARD — Modern SaaS Layout
   ═══════════════════════════════════════════════════════════ */

/* ── KPI Stat Grid ── */
.dash-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.dash-stat-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 20px 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.dash-stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px; height: 100%;
    border-radius: 4px 0 0 4px;
}

.dash-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(20, 37, 58, 0.10);
}

[data-theme="dark"] .dash-stat-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}

.dash-stat-card--blue::before  { background: var(--accent); }
.dash-stat-card--purple::before { background: #7C3AED; }
.dash-stat-card--teal::before   { background: #0D9488; }
.dash-stat-card--orange::before { background: #EA580C; }

.dash-stat-icon {
    width: 52px; height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dash-stat-icon--blue   { background: rgba(62, 151, 212, 0.12); color: var(--accent); }
.dash-stat-icon--purple { background: rgba(124, 58, 237, 0.12); color: #7C3AED; }
.dash-stat-icon--teal   { background: rgba(13, 148, 136, 0.12); color: #0D9488; }
.dash-stat-icon--orange { background: rgba(234, 88, 12, 0.12);  color: #EA580C; }

.dash-stat-body { flex: 1; min-width: 0; }

.dash-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
    letter-spacing: -0.01em;
}

.dash-stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 4px;
}

/* ── Complaint Status Grid ── */
.dash-complaint-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.dash-complaint-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dash-complaint-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(20, 37, 58, 0.10);
}

[data-theme="dark"] .dash-complaint-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.dash-complaint-top { margin-bottom: 4px; }

.dash-complaint-badge {
    width: 36px; height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

.dash-complaint-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

.dash-complaint-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Complaint card color variants */
.dash-complaint-card--amber .dash-complaint-badge { background: var(--status-amber-bg); color: var(--status-amber); }
.dash-complaint-card--amber .dash-complaint-value { color: var(--status-amber); }
.dash-complaint-card--amber { border-top: 3px solid var(--status-amber); }

.dash-complaint-card--blue .dash-complaint-badge { background: var(--status-blue-bg); color: var(--status-blue); }
.dash-complaint-card--blue .dash-complaint-value { color: var(--status-blue); }
.dash-complaint-card--blue { border-top: 3px solid var(--status-blue); }

.dash-complaint-card--gray .dash-complaint-badge { background: var(--bg-surface-alt); color: var(--text-secondary); }
.dash-complaint-card--gray { border-top: 3px solid var(--text-muted); }

.dash-complaint-card--green .dash-complaint-badge { background: var(--status-green-bg); color: var(--status-green); }
.dash-complaint-card--green .dash-complaint-value { color: var(--status-green); }
.dash-complaint-card--green { border-top: 3px solid var(--status-green); }

.dash-complaint-card--red .dash-complaint-badge { background: var(--status-red-bg); color: var(--status-red); }
.dash-complaint-card--red .dash-complaint-value { color: var(--status-red); }
.dash-complaint-card--red { border-top: 3px solid var(--status-red); }

/* ── Chart Cards ── */
.dash-charts-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.mb-dash { margin-bottom: 20px; }

.dash-chart-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.dash-chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 0;
    flex-wrap: wrap;
    gap: 10px;
}

.dash-chart-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.dash-chart-title i { color: var(--accent); }

.dash-chart-body { padding: 12px 12px 4px; }

/* ── Toggle pill group ── */
.dash-toggle-group {
    display: flex;
    background: var(--bg-surface-alt);
    border: 1px solid var(--border-default);
    border-radius: 8px;
    padding: 3px;
    gap: 2px;
}

.dash-toggle-btn {
    background: transparent;
    border: none;
    padding: 5px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    font-family: var(--font);
    white-space: nowrap;
}

.dash-toggle-btn.active {
    background: var(--accent);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(62, 151, 212, 0.35);
}

.dash-toggle-btn:not(.active):hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.dash-toggle-btn:focus,
.dash-toggle-btn:focus-visible,
.dash-toggle-btn:active { outline: none; box-shadow: none; }

/* ── Responsive breakpoints ── */
@media (max-width: 1400px) {
    .dash-complaint-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1200px) {
    .dash-stats-grid    { grid-template-columns: repeat(2, 1fr); }
    .dash-charts-row    { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .dash-complaint-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .dash-stats-grid     { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .dash-complaint-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .dash-charts-row     { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .dash-stats-grid     { grid-template-columns: 1fr; }
    .dash-complaint-grid { grid-template-columns: 1fr; }
    .dash-stat-value     { font-size: 1.6rem; }
}

/* ── Dashboard entrance animations ── */
@keyframes dash-fade-up {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes dash-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* KPI stat cards — staggered slide-up */
.dash-stat-card {
    animation: dash-fade-up 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.dash-stats-grid .dash-stat-card:nth-child(1) { animation-delay: 40ms; }
.dash-stats-grid .dash-stat-card:nth-child(2) { animation-delay: 100ms; }
.dash-stats-grid .dash-stat-card:nth-child(3) { animation-delay: 160ms; }
.dash-stats-grid .dash-stat-card:nth-child(4) { animation-delay: 220ms; }

/* Stat icon — subtle scale-in synced with card */
.dash-stat-icon {
    animation: dash-fade-in 0.35s ease both;
}
.dash-stats-grid .dash-stat-card:nth-child(1) .dash-stat-icon { animation-delay: 180ms; }
.dash-stats-grid .dash-stat-card:nth-child(2) .dash-stat-icon { animation-delay: 240ms; }
.dash-stats-grid .dash-stat-card:nth-child(3) .dash-stat-icon { animation-delay: 300ms; }
.dash-stats-grid .dash-stat-card:nth-child(4) .dash-stat-icon { animation-delay: 360ms; }

/* Complaint status cards — staggered, slightly after KPI row */
.dash-complaint-card {
    animation: dash-fade-up 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.dash-complaint-grid .dash-complaint-card:nth-child(1) { animation-delay: 280ms; }
.dash-complaint-grid .dash-complaint-card:nth-child(2) { animation-delay: 330ms; }
.dash-complaint-grid .dash-complaint-card:nth-child(3) { animation-delay: 380ms; }
.dash-complaint-grid .dash-complaint-card:nth-child(4) { animation-delay: 430ms; }
.dash-complaint-grid .dash-complaint-card:nth-child(5) { animation-delay: 480ms; }

/* Chart cards — first row */
.mb-dash .dash-chart-card:nth-child(1) {
    animation: dash-fade-up 0.45s cubic-bezier(0.22, 1, 0.36, 1) 540ms both;
}
.mb-dash .dash-chart-card:nth-child(2) {
    animation: dash-fade-up 0.45s cubic-bezier(0.22, 1, 0.36, 1) 600ms both;
}

/* Chart cards — second row */
.dash-charts-row:not(.mb-dash) .dash-chart-card:nth-child(1) {
    animation: dash-fade-up 0.45s cubic-bezier(0.22, 1, 0.36, 1) 660ms both;
}
.dash-charts-row:not(.mb-dash) .dash-chart-card:nth-child(2) {
    animation: dash-fade-up 0.45s cubic-bezier(0.22, 1, 0.36, 1) 720ms both;
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
    .dash-stat-card,
    .dash-stat-icon,
    .dash-complaint-card,
    .dash-chart-card { animation: none; }
}

/* ═══════════════════════════════════════════════════════════
   DASHBOARD — Extended Redesign Sections
   ═══════════════════════════════════════════════════════════ */

/* ── Welcome Banner ── */
.dash-welcome {
    background: linear-gradient(135deg, var(--accent-dark) 0%, var(--accent) 100%);
    border-radius: var(--radius-lg);
    padding: 22px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}
.dash-welcome::after {
    content: '';
    position: absolute;
    right: -40px; top: -40px;
    width: 200px; height: 200px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    pointer-events: none;
}
.dash-welcome-left { flex: 1; min-width: 0; }
.dash-welcome-greeting {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 4px;
}
.dash-welcome-date {
    font-size: 13px;
    color: rgba(255,255,255,0.72);
    margin: 0;
}
.dash-welcome-chips {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.dash-welcome-chip {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 24px;
    padding: 6px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}
.dash-welcome-chip i { font-size: 12px; opacity: 0.85; }
.dash-welcome-chip strong { font-weight: 700; }

/* ── KPI 6-column grid ── */
.dash-kpi-6 {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}
.dash-kpi-6 .dash-stat-card {
    padding: 16px 18px;
}
.dash-kpi-6 .dash-stat-value { font-size: 1.65rem; }
.dash-kpi-6 .dash-stat-icon  { width: 44px; height: 44px; font-size: 15px; }
.dash-stat-card--indigo::before { background: #6366F1; }
.dash-stat-icon--indigo { background: rgba(99,102,241,0.12); color: #6366F1; }
.dash-stat-card--rose::before { background: #F43F5E; }
.dash-stat-icon--rose { background: rgba(244,63,94,0.12); color: #F43F5E; }

/* ── Section header divider ── */
.dash-section-hdr {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 28px 0 16px;
}
.dash-section-hdr-icon {
    width: 34px; height: 34px;
    border-radius: var(--radius-sm);
    background: var(--accent-subtle);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}
.dash-section-hdr-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.2;
}
.dash-section-hdr-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin: 2px 0 0;
}
.dash-section-hdr-line {
    flex: 1;
    height: 1px;
    background: var(--border-default);
}

/* ── Content metric cards (4-up) ── */
.dash-cmetrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}
.dash-cmetric-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.dash-cmetric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(20,37,58,0.09);
}
[data-theme="dark"] .dash-cmetric-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.26);
}
.dash-cmetric-icon {
    width: 46px; height: 46px;
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    font-size: 17px;
    flex-shrink: 0;
}
.dash-cmetric-icon--blue   { background: rgba(62,151,212,0.12); color: var(--accent); }
.dash-cmetric-icon--green  { background: rgba(69,171,81,0.12);  color: var(--status-green); }
.dash-cmetric-icon--amber  { background: rgba(253,177,77,0.12); color: var(--status-amber); }
.dash-cmetric-icon--purple { background: rgba(124,58,237,0.12); color: #7C3AED; }
.dash-cmetric-icon--rose   { background: rgba(244,63,94,0.12);  color: #F43F5E; }
.dash-cmetric-body { min-width: 0; }
.dash-cmetric-value {
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
    letter-spacing: -0.01em;
}
.dash-cmetric-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 3px;
}

/* ── Rating display (stars + number) ── */
.dash-rating-display {
    display: flex;
    align-items: baseline;
    gap: 6px;
}
.dash-rating-stars {
    font-size: 12px;
    color: var(--status-amber);
    letter-spacing: 1px;
}

/* ── Recent Complaints table card ── */
.dash-recent-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    margin-bottom: 24px;
}
.dash-recent-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border-default);
    flex-wrap: wrap;
    gap: 10px;
}
.dash-recent-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}
.dash-recent-title i { color: var(--accent); }
.dash-recent-link {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.15s;
}
.dash-recent-link:hover { color: var(--accent-hover); }
.dash-recent-table {
    width: 100%;
    border-collapse: collapse;
}
.dash-recent-table th {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    padding: 10px 22px;
    text-align: left;
    border-bottom: 1px solid var(--border-default);
    background: var(--bg-surface-alt);
    white-space: nowrap;
}
.dash-recent-table td {
    padding: 13px 22px;
    font-size: 13px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-default);
    vertical-align: middle;
}
.dash-recent-table tr:last-child td { border-bottom: none; }
.dash-recent-table tr:hover td { background: var(--bg-surface-alt); }
.dash-recent-id {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
}
.dash-recent-citizen {
    display: flex;
    align-items: center;
    gap: 9px;
}
.dash-recent-avatar {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: var(--accent-subtle);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}
.dash-recent-name { font-weight: 500; }
.dash-recent-dept {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dash-recent-date {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
}
.dash-empty-row td {
    text-align: center;
    padding: 32px;
    color: var(--text-muted);
    font-size: 13px;
}

/* ── Status badges for recent table ── */
.dash-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}
.dash-badge--amber  { background: var(--status-amber-bg);  color: var(--status-amber); }
.dash-badge--blue   { background: var(--status-blue-bg);   color: var(--status-blue); }
.dash-badge--gray   { background: var(--bg-surface-alt);   color: var(--text-secondary); border: 1px solid var(--border-default); }
.dash-badge--green  { background: var(--status-green-bg);  color: var(--status-green); }
.dash-badge--red    { background: var(--status-red-bg);    color: var(--status-red); }

/* ── Responsive for new sections ── */
@media (max-width: 1400px) {
    .dash-kpi-6 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1100px) {
    .dash-kpi-6        { grid-template-columns: repeat(3, 1fr); }
    .dash-cmetrics-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .dash-welcome        { flex-direction: column; align-items: flex-start; }
    .dash-kpi-6          { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .dash-cmetrics-grid  { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .dash-recent-table th:nth-child(3),
    .dash-recent-table td:nth-child(3) { display: none; }
}
@media (max-width: 480px) {
    .dash-kpi-6          { grid-template-columns: 1fr 1fr; }
    .dash-cmetrics-grid  { grid-template-columns: 1fr 1fr; }
    .dash-welcome-chips  { gap: 6px; }
}

/* ── Complaint Status Row ── */
.dash-sc-row {
    display: flex;
    align-items: stretch;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    margin-bottom: 20px;
    overflow: hidden;
    animation: dash-fade-up 0.42s cubic-bezier(0.22, 1, 0.36, 1) 300ms both;
}

.dash-sc-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 10px;
    padding: 26px 14px;
    border-right: 1px solid var(--border-default);
    transition: background 0.18s ease;
}
.dash-sc-col:last-child { border-right: none; }
.dash-sc-col:hover { background: var(--bg-surface-alt); }

/* pill badge — same language as the complaint module tags */
.dash-sc-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}
.dash-sc-badge--amber  { background: var(--status-amber-bg); color: var(--status-amber); }
.dash-sc-badge--blue   { background: var(--status-blue-bg);  color: var(--status-blue); }
.dash-sc-badge--red    { background: var(--status-red-bg);   color: var(--status-red); }
.dash-sc-badge--green  { background: var(--status-green-bg); color: var(--status-green); }
.dash-sc-badge--purple { background: rgba(124, 58, 237, 0.12); color: #7C3AED; }

/* large count number */
.dash-sc-num {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    letter-spacing: -0.03em;
}

/* percentage of total — plain muted text */
.dash-sc-pct {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
}

/* responsive */
@media (max-width: 1100px) {
    .dash-sc-row { flex-wrap: wrap; }
    .dash-sc-col { flex: 0 0 33.333%; border-bottom: 1px solid var(--border-default); }
    .dash-sc-col:nth-child(3) { border-right: none; }
    .dash-sc-col:nth-child(4),
    .dash-sc-col:nth-child(5) { border-bottom: none; }
    .dash-sc-col:nth-child(5) { border-right: none; }
}
@media (max-width: 600px) {
    .dash-sc-col { flex: 0 0 50%; }
    .dash-sc-col:nth-child(even)   { border-right: none; }
    .dash-sc-col:nth-child(3)      { border-right: 1px solid var(--border-default); border-bottom: 1px solid var(--border-default); }
    .dash-sc-col:nth-child(4)      { border-bottom: 1px solid var(--border-default); }
    .dash-sc-col:nth-child(5)      { border-right: none; border-bottom: none; }
    .dash-sc-num { font-size: 2.4rem; }
}

/* ── Complaint Pipeline Card ── */
.dash-pipeline-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    margin-bottom: 20px;
    animation: dash-fade-up 0.42s cubic-bezier(0.22, 1, 0.36, 1) 300ms both;
}

/* header row */
.dash-pipeline-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 22px;
    border-bottom: 1px solid var(--border-default);
    background: var(--bg-surface-alt);
    gap: 12px;
    flex-wrap: wrap;
}
.dash-pipeline-hdr-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.dash-pipeline-hdr-icon {
    width: 36px; height: 36px;
    border-radius: var(--radius-sm);
    background: var(--accent-subtle);
    color: var(--accent);
    display: flex; align-items: center; justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}
.dash-pipeline-hdr-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.2;
}
.dash-pipeline-hdr-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin: 2px 0 0;
}
.dash-pipeline-total {
    display: flex;
    align-items: baseline;
    gap: 6px;
    background: var(--accent);
    border-radius: 20px;
    padding: 4px 16px;
}
.dash-pipeline-total-num {
    font-size: 16px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
}
.dash-pipeline-total-lbl {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,0.78);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* 5-column stats row */
.dash-pipeline-stats {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
}
.dash-pipeline-item {
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 5px;
    position: relative;
    border-right: 1px solid var(--border-default);
    transition: background 0.18s;
}
.dash-pipeline-item:last-child { border-right: none; }
.dash-pipeline-item:hover { background: var(--bg-surface-alt); }

/* large watermark icon behind each item */
.dash-pipeline-item::after {
    content: '';
    position: absolute;
    right: 10px; bottom: 8px;
    font-size: 54px;
    opacity: 0.04;
    pointer-events: none;
}

.dash-pipeline-item-icon {
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
    margin-bottom: 4px;
}
.dash-pipeline-item-count {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
}
.dash-pipeline-item-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}
.dash-pipeline-item-pct {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    margin-top: 2px;
}

/* colour variants */
.dash-pipeline-item--amber .dash-pipeline-item-icon  { background: var(--status-amber-bg); color: var(--status-amber); }
.dash-pipeline-item--amber .dash-pipeline-item-count { color: var(--status-amber); }
.dash-pipeline-item--amber .dash-pipeline-item-pct   { background: var(--status-amber-bg); color: var(--status-amber); }

.dash-pipeline-item--blue .dash-pipeline-item-icon   { background: var(--status-blue-bg); color: var(--status-blue); }
.dash-pipeline-item--blue .dash-pipeline-item-count  { color: var(--status-blue); }
.dash-pipeline-item--blue .dash-pipeline-item-pct    { background: var(--status-blue-bg); color: var(--status-blue); }

.dash-pipeline-item--gray .dash-pipeline-item-icon   { background: var(--bg-surface-alt); color: var(--text-secondary); border: 1px solid var(--border-default); }
.dash-pipeline-item--gray .dash-pipeline-item-count  { color: var(--text-secondary); }
.dash-pipeline-item--gray .dash-pipeline-item-pct    { background: var(--bg-surface-alt); color: var(--text-muted); border: 1px solid var(--border-default); }

.dash-pipeline-item--green .dash-pipeline-item-icon  { background: var(--status-green-bg); color: var(--status-green); }
.dash-pipeline-item--green .dash-pipeline-item-count { color: var(--status-green); }
.dash-pipeline-item--green .dash-pipeline-item-pct   { background: var(--status-green-bg); color: var(--status-green); }

.dash-pipeline-item--red .dash-pipeline-item-icon    { background: var(--status-red-bg); color: var(--status-red); }
.dash-pipeline-item--red .dash-pipeline-item-count   { color: var(--status-red); }
.dash-pipeline-item--red .dash-pipeline-item-pct     { background: var(--status-red-bg); color: var(--status-red); }

/* proportional bar */
.dash-pipeline-bar {
    display: flex;
    height: 6px;
    width: 100%;
    overflow: hidden;
}
.dash-pipeline-seg {
    height: 100%;
    transition: width 0.5s ease;
}
.dash-pipeline-seg--amber { background: var(--status-amber); }
.dash-pipeline-seg--blue  { background: var(--status-blue); }
.dash-pipeline-seg--gray  { background: var(--text-muted); }
.dash-pipeline-seg--green { background: var(--status-green); }
.dash-pipeline-seg--red   { background: var(--status-red); }

/* responsive */
@media (max-width: 900px) {
    .dash-pipeline-stats { grid-template-columns: repeat(3, 1fr); }
    .dash-pipeline-item:nth-child(3) { border-right: none; }
}
@media (max-width: 600px) {
    .dash-pipeline-stats           { grid-template-columns: repeat(2, 1fr); }
    .dash-pipeline-item            { border-right: 1px solid var(--border-default); }
    .dash-pipeline-item:nth-child(2),
    .dash-pipeline-item:nth-child(4) { border-right: none; }
    .dash-pipeline-item-count      { font-size: 1.6rem; }
}

/* ── Entrance animations for new sections ── */
.dash-welcome {
    animation: dash-fade-up 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.dash-kpi-6 .dash-stat-card:nth-child(1) { animation-delay: 60ms; }
.dash-kpi-6 .dash-stat-card:nth-child(2) { animation-delay: 100ms; }
.dash-kpi-6 .dash-stat-card:nth-child(3) { animation-delay: 140ms; }
.dash-kpi-6 .dash-stat-card:nth-child(4) { animation-delay: 180ms; }
.dash-kpi-6 .dash-stat-card:nth-child(5) { animation-delay: 220ms; }
.dash-kpi-6 .dash-stat-card:nth-child(6) { animation-delay: 260ms; }

.dash-cmetric-card {
    animation: dash-fade-up 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.dash-cmetrics-grid .dash-cmetric-card:nth-child(1) { animation-delay: 40ms; }
.dash-cmetrics-grid .dash-cmetric-card:nth-child(2) { animation-delay: 90ms; }
.dash-cmetrics-grid .dash-cmetric-card:nth-child(3) { animation-delay: 140ms; }
.dash-cmetrics-grid .dash-cmetric-card:nth-child(4) { animation-delay: 190ms; }

.dash-recent-card {
    animation: dash-fade-up 0.45s cubic-bezier(0.22, 1, 0.36, 1) 120ms both;
}

/* Password field with eye toggle */
.input-pw-wrap                { position: relative; }
.input-pw-wrap .form-control  { padding-right: 40px; }
.pw-eye-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 14px;
    padding: 0;
    line-height: 1;
}

.pw-eye-btn:focus,
.pw-eye-btn:focus-visible,
.pw-eye-btn:active { outline: none; box-shadow: none; }

/* ── Complaint Status Bubble Card ─────────────────────────────────────── */
.dash-cstatus-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin: 2px 0 0;
    padding-left: 22px;
}
.dash-cstatus-body {
    display: flex;
    align-items: center;
    padding: 12px 16px 20px;
    min-height: 200px;
    gap: 8px;
}
.dash-cstatus-bubbles {
    flex: 0 0 54%;
    position: relative;
    height: 195px;
}
.dash-cstatus-bubble {
    position: absolute;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform: translate(-50%, -50%);
    transition: transform 0.18s;
    opacity: 0.92;
    cursor: default;
    z-index: 1;
}
.dash-cstatus-bubble:hover { transform: translate(-50%, -50%) scale(1.07); opacity: 1; z-index: 5; }
.dash-cstatus-bnum { font-size: 15px; font-weight: 700; color: var(--white-color); line-height: 1.1; }
.dash-cstatus-blbl { font-size: 9px; color: rgba(255,255,255,0.88); line-height: 1.3; text-align: center; padding: 0 4px; max-width: 90%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-cstatus-bubble--amber  { background: var(--status-amber); }
.dash-cstatus-bubble--blue   { background: var(--status-blue); }
.dash-cstatus-bubble--green  { background: var(--status-green); }
.dash-cstatus-bubble--red    { background: var(--status-red); }
.dash-cstatus-bubble--purple { background: var(--status-purple); }
.dash-cstatus-legend {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 11px;
    padding-left: 8px;
}
.dash-cstatus-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}
.dash-cstatus-legend-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}
.dash-cstatus-legend-dot--amber  { background: var(--status-amber); }
.dash-cstatus-legend-dot--blue   { background: var(--status-blue); }
.dash-cstatus-legend-dot--green  { background: var(--status-green); }
.dash-cstatus-legend-dot--red    { background: var(--status-red); }
.dash-cstatus-legend-dot--purple { background: var(--status-purple); }
.dash-cstatus-legend-name {
    flex: 1;
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dash-cstatus-legend-cnt {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    flex-shrink: 0;
    min-width: 20px;
    text-align: right;
}


/* ══════════════════════════════════════════════════════════════
   SV ADMIN LOGIN v3 — Floating Card Edition
   Moved from login.blade.php — all colors use design tokens
   Panel gradient stops are login-only decoration (hardcoded)
   ══════════════════════════════════════════════════════════════ */

.sv-page {
    height: 100vh;
    overflow: hidden;
    background: var(--bg-base);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 20px 44px;
    position: relative;
    font-family: var(--font);
    transition: background .35s;
}
[data-theme="dark"] .sv-page { background: #06111E; }

#sv-net {
    position: fixed; inset: 0;
    z-index: 0; pointer-events: none;
}

.sv-page-glow {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background: radial-gradient(ellipse 70% 60% at 50% 50%, rgba(var(--accent-rgb),.04) 0%, transparent 70%);
}
[data-theme="dark"] .sv-page-glow {
    background: radial-gradient(ellipse 70% 60% at 50% 50%, rgba(var(--accent-rgb),.10) 0%, transparent 70%);
}

.sv-thm {
    position: fixed; top: 20px; right: 20px; z-index: 200;
    width: 40px; height: 40px;
    background: rgba(0,0,0,.06);
    border: 1.5px solid rgba(0,0,0,.10);
    border-radius: 10px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; color: rgba(0,0,0,.40);
    transition: all .3s;
}
[data-theme="dark"] .sv-thm {
    background: rgba(255,255,255,.07);
    border-color: rgba(255,255,255,.13);
    color: rgba(255,255,255,.55);
}
.sv-thm:hover {
    background: rgba(var(--accent-rgb),.14);
    border-color: rgba(var(--accent-rgb),.45);
    color: var(--accent);
    transform: rotate(24deg) scale(1.05);
}
.sv-thm .sv-ico-moon { display: none; }
.sv-thm .sv-ico-sun  { display: block; }
[data-theme="dark"] .sv-thm .sv-ico-moon { display: block; color: var(--accent); }
[data-theme="dark"] .sv-thm .sv-ico-sun  { display: none; }
.sv-thm:focus,
.sv-thm:focus-visible { outline: none; box-shadow: none !important; }

.sv-card {
    position: relative; z-index: 1;
    width: 100%; max-width: 920px;
    max-height: calc(100vh - 56px);
    display: flex;
    border-radius: 22px; overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(var(--accent-rgb),.14),
        0 24px 60px rgba(0,0,0,.12),
        0 0 120px rgba(var(--accent-rgb),.03);
    animation: sv-card-rise .85s cubic-bezier(.22,1,.36,1) both;
    transition: box-shadow .35s;
}
[data-theme="dark"] .sv-card {
    box-shadow:
        0 0 0 1px rgba(var(--accent-rgb),.14),
        0 32px 80px rgba(0,0,0,.60),
        0 0 140px rgba(var(--accent-rgb),.04);
}

@keyframes sv-card-rise {
    from { opacity: 0; transform: translateY(30px) scale(.985); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Left brand panel — gradient stops are login-only decoration */
.sv-cl {
    flex: 0 0 42%;
    background: linear-gradient(158deg, #1B3554 0%, #1F3E62 50%, #172E4A 100%);
    padding: 44px 40px;
    display: flex; flex-direction: column;
    position: relative; overflow: hidden;
    border-right: 1px solid rgba(var(--accent-rgb),.15);
    transition: background .35s;
}
[data-theme="dark"] .sv-cl {
    background: linear-gradient(158deg, #091726 0%, #0D1F38 50%, #091524 100%);
    border-right-color: rgba(var(--accent-rgb),.13);
}

.sv-cl::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background-image: radial-gradient(circle, rgba(255,255,255,.16) 1px, transparent 1px);
    background-size: 28px 28px; opacity: .40;
}

.sv-cl-g1, .sv-cl-g2 { position: absolute; border-radius: 50%; pointer-events: none; }
.sv-cl-g1 {
    width: 280px; height: 280px; top: -90px; right: -90px;
    background: radial-gradient(circle, rgba(var(--accent-rgb),.22) 0%, transparent 65%);
}
.sv-cl-g2 {
    width: 220px; height: 220px; bottom: -60px; left: -50px;
    background: radial-gradient(circle, rgba(var(--accent-rgb),.13) 0%, transparent 65%);
    animation: sv-orb-drift 11s ease-in-out infinite alternate;
}
@keyframes sv-orb-drift {
    from { transform: translate(0,0); }
    to   { transform: translate(14px,-18px); }
}

.sv-cl-inner {
    position: relative; z-index: 1;
    display: flex; flex-direction: column; height: 100%;
}

.sv-brand-row {
    display: flex; align-items: flex-start;
    justify-content: space-between; margin-bottom: 16px;
}

.sv-brand-ico {
    width: 60px; height: 60px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
    border-radius: 15px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    animation: sv-ico-pulse 3.5s ease-in-out infinite;
}
.sv-brand-ico i { font-size: 26px; color: var(--white-color); }

.sv-ver-badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 5px 10px;
    background: rgba(var(--accent-rgb),.15);
    border: 1px solid rgba(var(--accent-rgb),.30);
    border-radius: 20px;
    font-size: 10px; font-weight: 700;
    color: var(--accent-light);
    letter-spacing: .6px; text-transform: uppercase;
    animation: sv-up .9s .05s cubic-bezier(.22,1,.36,1) both;
}
.sv-ver-badge i { font-size: 9px; }

@keyframes sv-ico-pulse {
    0%,100% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb),.5), 0 6px 22px rgba(var(--accent-rgb),.25); }
    50%      { box-shadow: 0 0 0 12px rgba(var(--accent-rgb),0), 0 6px 34px rgba(var(--accent-rgb),.45); }
}

.sv-brand-name {
    font-size: 24px; font-weight: 700; color: var(--white-color);
    letter-spacing: -.4px; line-height: 1.2; margin-bottom: 8px;
    animation: sv-up .9s cubic-bezier(.22,1,.36,1) both;
}

.sv-brand-desc {
    font-size: 12.5px; color: rgba(216,234,246,.52);
    line-height: 1.56;
    margin-bottom: 20px;
    display: -webkit-box; -webkit-line-clamp: 5; line-clamp: 5; -webkit-box-orient: vertical;
    overflow: hidden;
    animation: sv-up .9s .1s cubic-bezier(.22,1,.36,1) both;
}

.sv-mstats {
    display: grid; grid-template-columns: repeat(3,1fr); gap: 9px;
    margin-bottom: 18px;
    animation: sv-up .9s .2s cubic-bezier(.22,1,.36,1) both;
}

.sv-mstat {
    padding: 10px 8px; border-radius: 11px; text-align: center; cursor: default;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.10);
    backdrop-filter: blur(6px);
    transition: transform .3s, background .3s, border-color .3s;
}
.sv-mstat:hover { transform: translateY(-3px); background: rgba(var(--accent-rgb),.12); border-color: rgba(var(--accent-rgb),.30); }
.sv-mstat-n { display: block; font-size: 17px; font-weight: 700; color: var(--accent-light); margin-bottom: 3px; }
.sv-mstat-l { font-size: 9px; color: rgba(255,255,255,.40); text-transform: uppercase; letter-spacing: .8px; }

.sv-feats {
    display: flex; flex-direction: column; gap: 8px; flex: 1;
    animation: sv-up .9s .3s cubic-bezier(.22,1,.36,1) both;
}

.sv-feat {
    display: flex; align-items: center; gap: 11px;
    padding: 10px 14px;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 10px; transition: all .28s;
}
.sv-feat:hover { background: rgba(var(--accent-rgb),.10); border-color: rgba(var(--accent-rgb),.24); transform: translateX(5px); }
.sv-feat i { font-size: 12px; color: var(--accent-light); width: 14px; text-align: center; flex-shrink: 0; }
.sv-feat span { font-size: 12px; color: rgba(255,255,255,.80); font-weight: 500; }

.sv-status {
    display: inline-flex; align-items: center; gap: 7px;
    margin-top: 16px; padding: 7px 13px; align-self: flex-start;
    background: rgba(69,171,81,.12);
    border: 1px solid rgba(69,171,81,.24);
    border-radius: 20px;
    font-size: 11.5px; color: rgba(255,255,255,.58); letter-spacing: .2px;
    animation: sv-up .9s .4s cubic-bezier(.22,1,.36,1) both;
}
.sv-sdot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--status-green);
    animation: sv-blink 2s ease-in-out infinite;
}

.sv-cr {
    flex: 1;
    background: var(--bg-surface);
    padding: 48px 50px;
    display: flex; flex-direction: column;
    justify-content: center;
    position: relative; overflow: hidden;
    transition: background .35s;
}

.sv-cr::before {
    content: ''; position: absolute;
    top: -60px; right: -60px;
    width: 200px; height: 200px; border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--accent-rgb),.05) 0%, transparent 70%);
    pointer-events: none;
}

.sv-logo-block {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 24px; padding-bottom: 22px;
    border-bottom: 1px solid var(--border-default);
    animation: sv-card-rise .85s cubic-bezier(.22,1,.36,1) both;
}

.sv-logo-img {
    width: 42px; height: 42px; border-radius: 10px; flex-shrink: 0;
    object-fit: contain; padding: 5px;
    background: var(--bg-surface);
    border: 1.5px solid var(--border-default);
}
.sv-logo-ico-fb {
    width: 42px; height: 42px; border-radius: 10px; flex-shrink: 0;
    background: linear-gradient(135deg, var(--accent), var(--accent-deep));
    display: flex; align-items: center; justify-content: center;
}
.sv-logo-ico-fb i { font-size: 18px; color: var(--white-color); }

.sv-logo-nm { font-size: 15px; font-weight: 700; color: var(--text-primary); letter-spacing: -.15px; display: block; line-height: 1.2; }
.sv-logo-tg {
    font-size: 10px; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: .7px;
    display: flex; align-items: center; gap: 5px; margin-top: 3px;
}
.sv-logo-tg::before {
    content: ''; width: 5px; height: 5px; border-radius: 50%;
    background: var(--accent); display: inline-block; flex-shrink: 0;
    animation: sv-blink 1.6s ease-in-out infinite;
}

.sv-ftitle { font-size: 22px; font-weight: 700; color: var(--text-primary); letter-spacing: -.3px; margin-bottom: 5px; }
.sv-fsub   { font-size: 13.5px; color: var(--text-secondary); line-height: 1.50; margin-bottom: 22px; }

.sv-field { position: relative; margin-bottom: 13px; }
.sv-field-last { margin-bottom: 18px; }

.sv-input {
    width: 100%; height: 50px;
    padding: 14px 46px 0 44px;
    border: 1.5px solid var(--border-default);
    border-radius: 11px;
    background: var(--bg-surface);
    color: var(--text-primary);
    font-size: 14px; font-family: var(--font);
    outline: none; display: block;
    transition: border-color .25s, box-shadow .25s, background .25s;
}
.sv-input::placeholder { color: transparent; }
.sv-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb),.13); }

/* Autofill — vars resolve correctly for both themes */
.sv-input:-webkit-autofill,
.sv-input:-webkit-autofill:hover,
.sv-input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text-primary);
    -webkit-box-shadow: 0 0 0px 1000px var(--bg-surface) inset !important;
    box-shadow: 0 0 0px 1000px var(--bg-surface) inset !important;
    border-color: var(--border-default);
    transition: background-color 5000s ease-in-out 0s;
    caret-color: var(--text-primary);
}

.sv-flabel {
    position: absolute; left: 44px; top: 50%;
    transform: translateY(-50%);
    font-size: 14px; font-family: var(--font);
    color: var(--text-muted); pointer-events: none;
    transition: all .22s cubic-bezier(.22,1,.36,1);
    background: transparent; padding: 0 3px; z-index: 3;
}
.sv-input:focus ~ .sv-flabel,
.sv-input:not(:placeholder-shown) ~ .sv-flabel,
.sv-input:-webkit-autofill ~ .sv-flabel {
    top: 8px; transform: translateY(0);
    font-size: 10.5px; font-weight: 600;
    color: var(--accent); letter-spacing: .3px;
    background: var(--bg-surface);
}

.sv-fico {
    position: absolute; left: 14px; top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted); font-size: 13px;
    pointer-events: none; transition: color .25s; z-index: 2;
}
.sv-field:has(.sv-input:focus) .sv-fico,
.sv-field:has(.sv-input:not(:placeholder-shown)) .sv-fico,
.sv-field:has(.sv-input:-webkit-autofill) .sv-fico { color: var(--accent); }

.sv-eye {
    position: absolute; right: 12px; top: 50%;
    transform: translateY(-50%);
    cursor: pointer; z-index: 4;
    color: var(--text-muted); font-size: 13px;
    padding: 7px; border-radius: 7px; transition: all .2s; line-height: 1;
}
.sv-eye:hover { color: var(--accent); background: var(--accent-subtle); }

.sv-btn {
    width: 100%; height: 50px;
    border: none; border-radius: 11px;
    background: linear-gradient(130deg, var(--accent) 0%, var(--accent-deep) 100%);
    color: var(--white-color); font-size: 14.5px; font-weight: 600; font-family: var(--font);
    cursor: pointer; letter-spacing: .25px;
    display: flex; align-items: center; justify-content: center; gap: 9px;
    position: relative; overflow: hidden;
    transition: transform .25s, box-shadow .25s;
}
.sv-btn::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent);
    transform: translateX(-100%);
}
.sv-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(var(--accent-rgb),.40); }
.sv-btn:hover::after { transform: translateX(100%); transition: transform .55s; }
.sv-btn:focus,
.sv-btn:focus-visible { outline: none; box-shadow: none; }
.sv-btn:active { transform: translateY(0); }
.sv-btn:disabled { opacity: .75; cursor: default; transform: none; box-shadow: none; }

.sv-trust {
    display: flex; gap: 16px; margin-top: 16px;
    padding-top: 16px; border-top: 1px solid var(--border-default);
}
.sv-trust-item {
    display: flex; align-items: center; gap: 5px;
    font-size: 11px; color: var(--text-muted);
}
.sv-trust-item i { font-size: 11px; color: var(--accent); }

.sv-demo {
    margin-top: 12px; padding: 10px 14px;
    background: rgba(253,177,77,.09);
    border: 1px solid rgba(253,177,77,.28);
    border-radius: 10px; font-size: 13px; color: var(--text-secondary);
    display: flex; align-items: flex-start; gap: 9px; line-height: 1.45;
}
.sv-demo i { color: var(--status-amber); flex-shrink: 0; margin-top: 1px; }
.sv-demo a { color: var(--accent); font-weight: 600; text-decoration: none; }

.sv-copy {
    position: fixed; 
    bottom: 25px; 
    left: 50%;
    transform: translateX(-50%);
    z-index: 5; 
    white-space: nowrap;
    font-size: 12.5px; 
    letter-spacing: .3px;
    text-align: center; 
    font-family: var(--font);
    color: rgba(0,0,0,.58);
    transition: color .35s, opacity .35s;
}
.sv-copy-brand {
    font-weight: 700;
    color: var(--accent);
    letter-spacing: .4px;
    transition: opacity .2s;
}
.sv-copy:hover { opacity: 1; }
.sv-copy:hover .sv-copy-brand { opacity: 1; }
[data-theme="dark"] .sv-copy { color: rgba(255,255,255,.30); }
[data-theme="dark"] .sv-copy-brand { color: var(--accent); }

@keyframes sv-up    { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:translateY(0); } }
@keyframes sv-blink { 0%,100% { opacity:1; } 50% { opacity:.28; } }

@media (max-width: 820px) {
    .sv-cl   { display: none; }
    .sv-card { border-radius: 18px; max-height: calc(100vh - 56px); }
    .sv-cr   { border-radius: 18px; padding: 40px 32px; justify-content: flex-start; overflow-y: auto; }
    .sv-page { justify-content: flex-start; padding-top: 48px; }
}
@media (max-width: 480px) {
    .sv-cr { padding: 32px 22px; }
    .sv-ftitle { font-size: 21px; }
    .sv-trust { flex-wrap: wrap; gap: 10px; }
}
