/* ============================================================
   DiskWeb CRM — Main Stylesheet
   Design: Premium dark-accent, mobile-first
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
    --bg-primary:      #0a0a0f;
    --bg-secondary:    #12121a;
    --bg-card:         #1a1a27;
    --bg-card-hover:   #20203a;
    --bg-input:        #1e1e2e;

    --accent:          #6c63ff;
    --accent-light:    #8b85ff;
    --accent-dark:     #4f46e5;
    --accent-glow:     rgba(108, 99, 255, 0.25);

    --success:         #22c55e;
    --warning:         #f59e0b;
    --danger:          #ef4444;
    --info:            #3b82f6;

    --text-primary:    #f0f0f8;
    --text-secondary:  #9090b0;
    --text-muted:      #5a5a78;

    --border:          rgba(255,255,255,0.07);
    --border-accent:   rgba(108, 99, 255, 0.35);

    --sidebar-width:   260px;
    --sidebar-collapsed: 72px;
    --topbar-height:   64px;
    --bottom-nav-height: 64px;

    --radius-sm:   6px;
    --radius-md:   12px;
    --radius-lg:   20px;
    --radius-xl:   28px;
    --radius-full: 9999px;

    --shadow-sm:  0 1px 3px rgba(0,0,0,0.4);
    --shadow-md:  0 4px 16px rgba(0,0,0,0.5);
    --shadow-lg:  0 8px 32px rgba(0,0,0,0.6);
    --shadow-accent: 0 4px 24px rgba(108,99,255,0.3);

    --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-light); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { font-family: var(--font); cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: var(--font); }

/* ── App Wrapper ───────────────────────────────────────────── */
#app-wrapper { display: flex; min-height: 100vh; }

/* ══════════════════════════════════════════════════════════════
   SIDEBAR
══════════════════════════════════════════════════════════════ */
.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 200;
    transition: width var(--transition);
    overflow: hidden;
}

.sidebar.collapsed { width: var(--sidebar-collapsed); }

/* Logo area — always black background */
.sidebar-header {
    background: #000000;
    padding: 0 18px;
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    flex-shrink: 0;
}

.sidebar-logo {
    width: 38px;
    height: 38px;
    background: #000000;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.sidebar-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sidebar-toggle {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition);
}
.sidebar-toggle:hover { background: var(--bg-card); color: var(--text-primary); }

/* User info */
.sidebar-user {
    padding: 20px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.user-avatar {
    position: relative;
    flex-shrink: 0;
}

.user-avatar img,
.avatar-initials {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    object-fit: cover;
}

.avatar-initials {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: #fff;
}

.user-status {
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 10px;
    height: 10px;
    border-radius: var(--radius-full);
    border: 2px solid var(--bg-secondary);
}
.user-status.online  { background: var(--success); }
.user-status.offline { background: var(--text-muted); }
.user-status.busy    { background: var(--danger); }

.user-info { overflow: hidden; }
.user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role-badge {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}
.badge-admin    { background: rgba(108,99,255,0.2); color: var(--accent-light); }
.badge-employee { background: rgba(34,197,94,0.15); color: var(--success); }

/* Nav */
.sidebar-nav { flex: 1; padding: 12px 10px; overflow-y: auto; overflow-x: hidden; }
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.sidebar-nav ul { display: flex; flex-direction: column; gap: 2px; }

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition);
    white-space: nowrap;
    overflow: hidden;
}

.nav-link i {
    width: 20px;
    text-align: center;
    font-size: 16px;
    flex-shrink: 0;
    transition: color var(--transition);
}

.nav-link:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.nav-link.active {
    background: var(--accent-glow);
    color: var(--accent-light);
    box-shadow: inset 3px 0 0 var(--accent);
}
.nav-link.active i { color: var(--accent); }

.nav-label { transition: opacity var(--transition); }

.sidebar.collapsed .nav-label,
.sidebar.collapsed .user-info,
.sidebar.collapsed .sidebar-toggle { opacity: 0; pointer-events: none; }
.sidebar.collapsed .nav-link { justify-content: center; padding: 11px; }
.sidebar.collapsed .sidebar-user { justify-content: center; padding: 20px 0; }
.sidebar.collapsed .sidebar-logo { margin: 0 auto; }

.sidebar-footer {
    padding: 12px 10px;
    border-top: 1px solid var(--border);
}

.nav-logout { color: var(--danger) !important; }
.nav-logout:hover { background: rgba(239,68,68,0.1) !important; }

/* ══════════════════════════════════════════════════════════════
   MAIN LAYOUT
══════════════════════════════════════════════════════════════ */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left var(--transition);
}

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

/* ── Top Bar ────────────────────────────────────────────────── */
.topbar {
    height: var(--topbar-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
}

.topbar-left { display: flex; align-items: center; gap: 16px; }
.topbar-right { display: flex; align-items: center; gap: 12px; }

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

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
}
.breadcrumb span { color: var(--text-secondary); }
.breadcrumb i { font-size: 10px; }

/* Notification Bell */
.notif-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    background: var(--bg-card);
    transition: all var(--transition);
}
.notif-btn:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.notif-btn i { font-size: 16px; }

.notif-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: var(--radius-full);
    border: 2px solid var(--bg-secondary);
}

.notif-count {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 18px;
    height: 18px;
    background: var(--danger);
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--bg-secondary);
}

/* Topbar logo (mobile) */
.topbar-logo {
    display: none;
    background: #000000;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.topbar-logo img { width: 100%; height: 100%; object-fit: contain; }

/* ── Page Content ───────────────────────────────────────────── */
.page-content {
    flex: 1;
    padding: 28px 24px;
    padding-bottom: calc(28px + var(--bottom-nav-height));
}

/* ══════════════════════════════════════════════════════════════
   CARDS
══════════════════════════════════════════════════════════════ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all var(--transition);
}

.card:hover {
    border-color: var(--border-accent);
    box-shadow: var(--shadow-accent);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

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

.card-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 18px;
    transition: all var(--transition);
    cursor: default;
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-accent);
    box-shadow: var(--shadow-accent);
}

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

.stat-icon.purple  { background: rgba(108,99,255,0.15); color: var(--accent); }
.stat-icon.green   { background: rgba(34,197,94,0.12);  color: var(--success); }
.stat-icon.amber   { background: rgba(245,158,11,0.12); color: var(--warning); }
.stat-icon.red     { background: rgba(239,68,68,0.12);  color: var(--danger); }
.stat-icon.blue    { background: rgba(59,130,246,0.12); color: var(--info); }

.stat-info { flex: 1; min-width: 0; }
.stat-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
}
.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}
.stat-change {
    font-size: 12px;
    font-weight: 600;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.stat-change.up   { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* ══════════════════════════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    border: 1px solid transparent;
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 14px rgba(108,99,255,0.4);
}
.btn-primary:hover {
    background: var(--accent-light);
    box-shadow: 0 6px 20px rgba(108,99,255,0.5);
    transform: translateY(-1px);
    color: #fff;
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-secondary);
    border-color: var(--border);
}
.btn-secondary:hover { background: var(--bg-card-hover); color: var(--text-primary); border-color: var(--border-accent); }

.btn-danger  { background: var(--danger);  color: #fff; }
.btn-success { background: var(--success); color: #fff; }

.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-icon { padding: 10px; width: 40px; height: 40px; }
.btn-icon.btn-sm { padding: 7px; width: 32px; height: 32px; }

.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ══════════════════════════════════════════════════════════════
   FORMS
══════════════════════════════════════════════════════════════ */
.form-group { margin-bottom: 20px; }

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    letter-spacing: 0.02em;
}

.form-control {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 14px;
    transition: all var(--transition);
    appearance: none;
}
.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background: var(--bg-card);
}
.form-control::placeholder { color: var(--text-muted); }

.form-control.is-invalid { border-color: var(--danger); }
.form-error { font-size: 12px; color: var(--danger); margin-top: 5px; }

.input-group { position: relative; }
.input-group .form-control { padding-left: 44px; }
.input-group .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 15px;
    pointer-events: none;
}
.input-group .input-icon-right {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 15px;
    cursor: pointer;
    transition: color var(--transition);
}
.input-group .input-icon-right:hover { color: var(--text-primary); }
.input-group.has-right .form-control { padding-right: 44px; }

/* ══════════════════════════════════════════════════════════════
   TABLES
══════════════════════════════════════════════════════════════ */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.table th {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 14px 18px;
    text-align: left;
    white-space: nowrap;
}

.table td {
    padding: 14px 18px;
    color: var(--text-primary);
    border-top: 1px solid var(--border);
    vertical-align: middle;
}

.table tbody tr { transition: background var(--transition); }
.table tbody tr:hover { background: var(--bg-card-hover); }

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.badge-success { background: rgba(34,197,94,0.15);  color: var(--success); }
.badge-danger  { background: rgba(239,68,68,0.15);  color: var(--danger); }
.badge-warning { background: rgba(245,158,11,0.15); color: var(--warning); }
.badge-info    { background: rgba(59,130,246,0.15); color: var(--info); }
.badge-purple  { background: rgba(108,99,255,0.15); color: var(--accent-light); }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ══════════════════════════════════════════════════════════════
   AUTH PAGES (Login / Signup)
══════════════════════════════════════════════════════════════ */
.auth-page {
    min-height: 100vh;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

/* Decorative background glow */
.auth-page::before {
    content: '';
    position: absolute;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(108,99,255,0.12) 0%, transparent 70%);
    pointer-events: none;
}
.auth-page::after {
    content: '';
    position: absolute;
    bottom: -200px;
    right: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(108,99,255,0.07) 0%, transparent 70%);
    pointer-events: none;
}

.auth-box {
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.5s ease both;
}

.auth-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 32px;
}

.auth-logo-inner {
    background: #000000;
    width: 72px;
    height: 72px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.08), var(--shadow-lg);
}

.auth-logo-inner img {
    width: 56px;
    height: 56px;
    object-fit: contain;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 36px;
    box-shadow: var(--shadow-lg);
}

.auth-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 6px;
}

.auth-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 28px;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
}
.auth-divider::before,
.auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.auth-divider span { font-size: 12px; color: var(--text-muted); }

.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-muted);
}
.auth-footer a { color: var(--accent-light); font-weight: 600; }
.auth-footer a:hover { color: var(--accent); }

/* Alert messages */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 14px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.alert-danger  { background: rgba(239,68,68,0.12);  border: 1px solid rgba(239,68,68,0.25);  color: #ff9999; }
.alert-success { background: rgba(34,197,94,0.12);  border: 1px solid rgba(34,197,94,0.25);  color: #86efac; }
.alert-info    { background: rgba(59,130,246,0.12); border: 1px solid rgba(59,130,246,0.25); color: #93c5fd; }

/* ══════════════════════════════════════════════════════════════
   MOBILE BOTTOM NAV
══════════════════════════════════════════════════════════════ */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    height: var(--bottom-nav-height);
    backdrop-filter: blur(16px);
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 8px 4px;
    transition: all var(--transition);
    position: relative;
}

.bottom-nav-item i { font-size: 18px; transition: all var(--transition); }

.bottom-nav-item.active {
    color: var(--accent-light);
}

.bottom-nav-item.active i {
    color: var(--accent);
    filter: drop-shadow(0 0 6px var(--accent));
}

.bottom-nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: var(--accent);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

/* ══════════════════════════════════════════════════════════════
   PWA INSTALL BANNER
══════════════════════════════════════════════════════════════ */
.pwa-install-banner {
    position: fixed;
    bottom: calc(var(--bottom-nav-height) + 12px);
    left: 12px;
    right: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    z-index: 300;
    box-shadow: var(--shadow-lg);
    animation: slideInUp 0.4s ease both;
}

.pwa-install-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pwa-install-logo {
    background: #000000;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}
.pwa-install-logo img { width: 32px; height: 32px; object-fit: contain; }

.pwa-install-text { flex: 1; min-width: 0; }
.pwa-install-text strong { display: block; font-size: 14px; color: var(--text-primary); }
.pwa-install-text span { font-size: 12px; color: var(--text-muted); }

.btn-pwa-install {
    background: var(--accent);
    color: #fff;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
    transition: all var(--transition);
}
.btn-pwa-install:hover { background: var(--accent-light); }

.btn-pwa-dismiss {
    color: var(--text-muted);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    flex-shrink: 0;
}
.btn-pwa-dismiss:hover { background: var(--bg-card-hover); color: var(--text-primary); }

/* ══════════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
══════════════════════════════════════════════════════════════ */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
    pointer-events: all;
    animation: slideInRight 0.35s ease both;
    font-size: 14px;
}
.toast.toast-success { border-left: 3px solid var(--success); }
.toast.toast-danger  { border-left: 3px solid var(--danger); }
.toast.toast-info    { border-left: 3px solid var(--info); }
.toast.toast-warning { border-left: 3px solid var(--warning); }
.toast-icon { font-size: 18px; flex-shrink: 0; }
.toast-success .toast-icon { color: var(--success); }
.toast-danger  .toast-icon { color: var(--danger); }
.toast-info    .toast-icon { color: var(--info); }
.toast-warning .toast-icon { color: var(--warning); }
.toast-message { flex: 1; color: var(--text-primary); }
.toast-close { color: var(--text-muted); cursor: pointer; transition: color var(--transition); }
.toast-close:hover { color: var(--text-primary); }

/* ══════════════════════════════════════════════════════════════
   DASHBOARD SKELETON
══════════════════════════════════════════════════════════════ */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.dashboard-grid .span-full { grid-column: 1 / -1; }

/* Quick actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 14px;
    margin-bottom: 28px;
}

.quick-action-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 16px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    color: var(--text-secondary);
}

.quick-action-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-accent);
    color: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-accent);
}

.quick-action-btn i {
    font-size: 28px;
    margin-bottom: 10px;
    display: block;
    color: var(--accent);
}

.quick-action-btn span {
    font-size: 13px;
    font-weight: 600;
}

/* Activity list */
.activity-list { display: flex; flex-direction: column; }

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}
.activity-item:last-child { border-bottom: none; }

.activity-dot {
    width: 10px;
    height: 10px;
    border-radius: var(--radius-full);
    margin-top: 5px;
    flex-shrink: 0;
}

.activity-text { flex: 1; }
.activity-text p { font-size: 14px; color: var(--text-primary); }
.activity-text span { font-size: 12px; color: var(--text-muted); }

/* ══════════════════════════════════════════════════════════════
   UTILITY
══════════════════════════════════════════════════════════════ */
.hidden { display: none !important; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 13px; }
.font-bold { font-weight: 700; }
.w-full { width: 100%; }

/* Divider */
.divider {
    height: 1px;
    background: var(--border);
    margin: 20px 0;
}

/* Loading spinner */
.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

/* Skeleton loader */
.skeleton {
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
    border-radius: var(--radius-md);
}

/* ══════════════════════════════════════════════════════════════
   TOGGLE SWITCH
══════════════════════════════════════════════════════════════ */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    cursor: pointer;
    flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 26px;
    transition: all var(--transition);
}
.toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    bottom: 3px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: all var(--transition);
}
.toggle-switch input:checked + .toggle-slider { background: var(--accent); border-color: var(--accent); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(22px); background: #fff; }

/* ── Topbar avatar ────────────────────────────────────────── */
.topbar-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    flex-shrink: 0;
}

/* ── btn-warning ──────────────────────────────────────────── */
.btn-warning { background: var(--warning); color: #000; font-weight: 700; }
.btn-warning:hover { background: #fbbf24; color: #000; }

/* ══════════════════════════════════════════════════════════════
   LAYOUT WRAPPER (Sidebar + Content)
══════════════════════════════════════════════════════════════ */
.layout-with-sidebar {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* ══════════════════════════════════════════════════════════════
   ANIMATIONS
══════════════════════════════════════════════════════════════ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(40px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
@keyframes shimmer {
    to { background-position: -200% 0; }
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
