/* ══════════════════════════════════════════════════════════
   DentalCare Pro — Design System
   ══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── Theme Variables ─────────────────────────────────────── */
:root {
    --primary: #4f6ef7;
    --primary-light: #7b93fa;
    --primary-dark: #3a56d4;
    --secondary: #6c5ce7;
    --accent: #00cec9;
    --success: #00b894;
    --warning: #fdcb6e;
    --danger: #e17055;
    --info: #74b9ff;
    --gradient-1: linear-gradient(135deg, #4f6ef7 0%, #6c5ce7 100%);
    --gradient-2: linear-gradient(135deg, #00cec9 0%, #00b894 100%);
    --gradient-3: linear-gradient(135deg, #e17055 0%, #d63031 100%);
    --gradient-4: linear-gradient(135deg, #fdcb6e 0%, #f39c12 100%);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --sidebar-width: 260px;
    --header-height: 64px;
}

/* Light Theme */
[data-theme="light"] {
    --bg-body: #f0f2f7;
    --bg-sidebar: #ffffff;
    --bg-card: #ffffff;
    --bg-input: #f5f6fa;
    --bg-hover: #f0f2f7;
    --bg-modal: rgba(0, 0, 0, 0.4);
    --text-primary: #1a1d2e;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --border: #e5e7eb;
    --border-light: #f0f2f7;
    --table-stripe: #f9fafb;
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-body: #0f1120;
    --bg-sidebar: #161832;
    --bg-card: #1a1d3a;
    --bg-input: #232650;
    --bg-hover: #232650;
    --bg-modal: rgba(0, 0, 0, 0.65);
    --text-primary: #e8eaf6;
    --text-secondary: #9da4c0;
    --text-muted: #6b73a0;
    --border: #2a2d52;
    --border-light: #232650;
    --table-stripe: #1e2140;
}

/* ── Reset & Base ────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    transition: var(--transition);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-light);
}

img {
    max-width: 100%;
}

/* ── Layout ──────────────────────────────────────────────── */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: var(--transition);
    overflow-y: auto;
}

.sidebar-brand {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border);
}

.sidebar-brand .brand-icon {
    width: 42px;
    height: 42px;
    background: var(--gradient-1);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
    flex-shrink: 0;
}

.sidebar-brand h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.sidebar-brand small {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 400;
}

.sidebar-nav {
    padding: 16px 12px;
    flex: 1;
}

.nav-section {
    margin-bottom: 8px;
}

.nav-section-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    padding: 8px 12px 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    margin-bottom: 2px;
}

.nav-link:hover {
    background: var(--bg-hover);
    color: var(--primary);
    transform: translateX(4px);
}

.nav-link.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 15px rgba(79, 110, 247, 0.3);
}

.nav-link .icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

/* Removed sidebar-footer and sidebar-user - moved to top-bar */

/* Avatar styles (shared) */
.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Top Bar */
.top-bar {
    height: var(--header-height);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(12px);
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.top-bar-left h1 {
    font-size: 20px;
    font-weight: 700;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--text-muted);
}

.breadcrumb a:hover {
    color: var(--primary);
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-mobile-menu {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-primary);
    cursor: pointer;
}

/* Theme Toggle */
.theme-toggle {
    width: 52px;
    height: 28px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 20px;
    position: relative;
    cursor: pointer;
    transition: var(--transition);
}

.theme-toggle::after {
    content: '';
    width: 22px;
    height: 22px;
    background: var(--primary);
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: var(--transition);
    box-shadow: 0 2px 6px rgba(79, 110, 247, 0.3);
}

[data-theme="dark"] .theme-toggle::after {
    left: 26px;
    background: var(--accent);
    box-shadow: 0 2px 6px rgba(0, 206, 201, 0.3);
}

.theme-toggle .toggle-icons {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5px;
    height: 100%;
    font-size: 14px;
}

/* User Dropdown */
.user-dropdown {
    position: relative;
    margin-left: 8px;
}

.user-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

.user-dropdown-toggle:hover {
    background: var(--bg-hover);
    border-color: var(--border);
}

.user-dropdown-toggle .user-info {
    text-align: left;
    display: block;
}

.user-dropdown-toggle .name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1;
}

.user-dropdown-toggle .role {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: capitalize;
}

.user-dropdown-toggle i.fa-chevron-down {
    font-size: 10px;
    color: var(--text-muted);
    transition: var(--transition);
}

.user-dropdown.active .user-dropdown-toggle i.fa-chevron-down {
    transform: rotate(180deg);
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 240px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 1000;
    overflow: hidden;
}

.user-dropdown.active .user-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 16px;
    background: var(--bg-hover);
}

.service-until {
    display: flex;
    flex-direction: column;
}

.service-until small {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 2px;
}

.service-until .expiry-date {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
}

.dropdown-divider {
    height: 1px;
    background: var(--border);
}

.dropdown-footer {
    padding: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dropdown-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    background: none;
}

.dropdown-btn:hover {
    background: var(--bg-hover);
    color: var(--primary);
}

.dropdown-btn i {
    font-size: 16px;
}

.dropdown-btn.logout {
    color: var(--danger);
    background: rgba(225, 112, 85, 0.05);
}

.dropdown-btn.logout:hover {
    background: rgba(225, 112, 85, 0.1);
    color: var(--danger);
}

@media (max-width: 480px) {
    .user-dropdown-toggle .user-info {
        display: none;
    }
}

.branch-selector select {
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
}

/* Page Content */
.page-content {
    padding: 28px;
    flex: 1;
}

/* ── Cards ───────────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.card-header h3 {
    font-size: 16px;
    font-weight: 700;
}

.card-body {
    padding: 24px;
}

.card-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
}

/* Stat 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: 24px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    border-radius: 4px 0 0 4px;
}

.stat-card.blue::before {
    background: var(--gradient-1);
}

.stat-card.green::before {
    background: var(--gradient-2);
}

.stat-card.orange::before {
    background: var(--gradient-4);
}

.stat-card.red::before {
    background: var(--gradient-3);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-info h4 {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.stat-info .stat-number {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-info .stat-sub {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.stat-icon.blue {
    background: rgba(79, 110, 247, 0.12);
    color: var(--primary);
}

.stat-icon.green {
    background: rgba(0, 184, 148, 0.12);
    color: var(--success);
}

.stat-icon.orange {
    background: rgba(253, 203, 110, 0.15);
    color: #f39c12;
}

.stat-icon.red {
    background: rgba(225, 112, 85, 0.12);
    color: var(--danger);
}

/* ── Tables ──────────────────────────────────────────────── */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table thead th {
    padding: 14px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

table tbody tr {
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition);
}

table tbody tr:hover {
    background: var(--bg-hover);
}

table tbody td {
    padding: 12px 16px;
    font-size: 14px;
    color: var(--text-primary);
    vertical-align: middle;
}

table tbody tr:nth-child(even) {
    background: var(--table-stripe);
}

table tbody tr:nth-child(even):hover {
    background: var(--bg-hover);
}

/* ── Forms ────────────────────────────────────────────────── */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 110, 247, 0.15);
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

select.form-control {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.form-inline {
    display: flex;
    gap: 12px;
    align-items: end;
    flex-wrap: wrap;
}

.form-inline .form-group {
    margin-bottom: 0;
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--gradient-1);
    color: #fff;
}

.btn-primary:hover {
    box-shadow: 0 4px 20px rgba(79, 110, 247, 0.35);
    color: #fff;
}

.btn-success {
    background: var(--gradient-2);
    color: #fff;
}

.btn-success:hover {
    box-shadow: 0 4px 20px rgba(0, 206, 201, 0.35);
    color: #fff;
}

.btn-danger {
    background: var(--gradient-3);
    color: #fff;
}

.btn-danger:hover {
    box-shadow: 0 4px 20px rgba(225, 112, 85, 0.35);
    color: #fff;
}

.btn-warning {
    background: var(--gradient-4);
    color: #1a1d2e;
}

.btn-secondary {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: var(--radius-sm);
    font-size: 16px;
}

.btn-group {
    display: flex;
    gap: 6px;
}

/* ── Badges ──────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 20px;
    text-transform: capitalize;
}

.badge-scheduled {
    background: rgba(116, 185, 255, 0.15);
    color: var(--info);
}

.badge-confirmed {
    background: rgba(108, 92, 231, 0.15);
    color: var(--secondary);
}

.badge-in-progress {
    background: rgba(253, 203, 110, 0.2);
    color: #e67e22;
}

.badge-completed {
    background: rgba(0, 184, 148, 0.15);
    color: var(--success);
}

.badge-cancelled {
    background: rgba(225, 112, 85, 0.15);
    color: var(--danger);
}

.badge-no-show {
    background: rgba(156, 163, 175, 0.2);
    color: var(--text-muted);
}

.badge-admin {
    background: rgba(225, 112, 85, 0.15);
    color: var(--danger);
}

.badge-dentist {
    background: rgba(79, 110, 247, 0.15);
    color: var(--primary);
}

.badge-assistant {
    background: rgba(0, 206, 201, 0.15);
    color: var(--accent);
}

.badge-active {
    background: rgba(0, 184, 148, 0.15);
    color: var(--success);
}

.badge-inactive {
    background: rgba(156, 163, 175, 0.2);
    color: var(--text-muted);
}

/* ── Alerts ──────────────────────────────────────────────── */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideDown 0.3s ease;
}

.alert-success {
    background: rgba(0, 184, 148, 0.12);
    color: var(--success);
    border: 1px solid rgba(0, 184, 148, 0.25);
}

.alert-error {
    background: rgba(225, 112, 85, 0.12);
    color: var(--danger);
    border: 1px solid rgba(225, 112, 85, 0.25);
}

.alert-warning {
    background: rgba(253, 203, 110, 0.15);
    color: #e67e22;
    border: 1px solid rgba(253, 203, 110, 0.3);
}

.alert-info {
    background: rgba(116, 185, 255, 0.12);
    color: var(--info);
    border: 1px solid rgba(116, 185, 255, 0.25);
}

/* ── Modal ───────────────────────────────────────────────── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--bg-modal);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: modalSlide 0.3s ease;
}

.modal-lg {
    max-width: 800px;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-hover);
    border-radius: var(--radius-sm);
    font-size: 18px;
    cursor: pointer;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--danger);
    color: #fff;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ── Queue List ──────────────────────────────────────────── */
.queue-list {
    list-style: none;
}

.queue-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
    gap: 16px;
    flex-wrap: wrap;
}

.queue-item:last-child {
    border-bottom: none;
}

.queue-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 200px;
}

.queue-number {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

.queue-number.pending {
    background: rgba(116, 185, 255, 0.15);
    color: var(--info);
}

.queue-number.active {
    background: rgba(0, 184, 148, 0.15);
    color: var(--success);
}

.queue-patient .name {
    font-weight: 600;
    font-size: 14px;
}

.queue-patient .treatment {
    font-size: 12px;
    color: var(--text-muted);
}

.queue-time {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
}

/* ── Empty State ─────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}

.empty-state .icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.empty-state h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-secondary);
}

.empty-state p {
    font-size: 13px;
}

/* ── Search & Filters ────────────────────────────────────── */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 360px;
}

.search-box input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 110, 247, 0.15);
}

.search-box .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
}

/* ── Login Page ──────────────────────────────────────────── */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-body);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: rgba(79, 110, 247, 0.06);
    top: -150px;
    right: -100px;
    pointer-events: none;
}

.login-page::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(0, 206, 201, 0.05);
    bottom: -100px;
    left: -100px;
    pointer-events: none;
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
}

.login-brand {
    text-align: center;
    margin-bottom: 32px;
}

.login-brand .icon {
    width: 64px;
    height: 64px;
    background: var(--gradient-1);
    border-radius: var(--radius-lg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #fff;
    margin-bottom: 16px;
}

.login-brand h1 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 4px;
}

.login-brand p {
    color: var(--text-muted);
    font-size: 14px;
}

.login-card .form-group {
    margin-bottom: 20px;
}

.login-card .btn {
    width: 100%;
    padding: 12px;
    font-size: 15px;
    margin-top: 8px;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 12px;
    color: var(--text-muted);
}

/* ── Animations ──────────────────────────────────────────── */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes pulseGlow {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(79, 110, 247, 0.4);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(79, 110, 247, 0);
    }
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .btn-mobile-menu {
        display: block;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }

    .page-content {
        padding: 16px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        max-width: 100%;
    }
}