/* VetPro - Professional Veterinary Management System */
/* Aesthetic: Clean medical with warm accents, Figtree + DM Sans typography */

@import url('https://fonts.googleapis.com/css2?family=Figtree:wght@300;400;500;600;700;800&family=DM+Sans:wght@300;400;500;600&display=swap');

/* =============================================
   CSS CUSTOM PROPERTIES
   ============================================= */
:root {
    --primary: #16a34a;
    --primary-dark: #15803d;
    --primary-light: #bbf7d0;
    --primary-subtle: #f0fdf4;
    --accent: #0ea5e9;
    --accent-dark: #0284c7;
    --danger: #ef4444;
    --danger-subtle: #fef2f2;
    --warning: #f59e0b;
    --warning-subtle: #fffbeb;
    --success: #10b981;
    --purple: #8b5cf6;

    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    --sidebar-w: 260px;
    --topbar-h: 64px;
    --radius: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
    --shadow: 0 4px 16px rgba(0,0,0,.08);
    --shadow-lg: 0 10px 40px rgba(0,0,0,.12);
    --transition: 150ms cubic-bezier(.4,0,.2,1);
    --font-body: 'DM Sans', sans-serif;
    --font-display: 'Figtree', sans-serif;
}

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    color: var(--gray-700);
    background: var(--gray-50);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
input:focus, select:focus, textarea:focus, button:focus { outline: none; }

/* =============================================
   LAYOUT
   ============================================= */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* =============================================
   SIDEBAR
   ============================================= */
.sidebar {
    width: var(--sidebar-w);
    background: #fff;
    border-right: 1px solid var(--gray-100);
    position: fixed;
    top: 0; left: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
    overflow-y: auto;
    transition: transform var(--transition);
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--gray-200); border-radius: 4px; }

.sidebar-logo {
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    gap: 10px;
}
.sidebar-logo .logo-icon {
    width: 38px; height: 38px;
    background: linear-gradient(135deg, var(--primary), #22c55e);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 18px;
    flex-shrink: 0;
}
.sidebar-logo .logo-text {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--gray-900);
    letter-spacing: -0.03em;
}
.sidebar-logo .logo-sub {
    font-size: 0.65rem;
    color: var(--gray-400);
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-top: -2px;
}

.sidebar-tenant {
    padding: 12px 16px;
    margin: 12px 12px 0;
    background: var(--primary-subtle);
    border-radius: var(--radius);
    border: 1px solid var(--primary-light);
}
.sidebar-tenant .tenant-name {
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--primary-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-tenant .tenant-plan {
    font-size: 0.68rem;
    color: var(--primary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.sidebar-nav { padding: 8px 0; flex: 1; }
.nav-section-label {
    font-size: 0.67rem;
    font-weight: 700;
    color: var(--gray-400);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 16px 20px 6px;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    margin: 1px 8px;
    border-radius: var(--radius);
    color: var(--gray-600);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition);
    cursor: pointer;
    white-space: nowrap;
}
.nav-item:hover {
    background: var(--gray-50);
    color: var(--gray-900);
}
.nav-item.active {
    background: var(--primary-subtle);
    color: var(--primary-dark);
    font-weight: 600;
}
.nav-item .nav-icon {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px;
    font-size: 15px;
    flex-shrink: 0;
    background: transparent;
    transition: background var(--transition);
}
.nav-item.active .nav-icon { background: var(--primary-light); }
.nav-item .nav-badge {
    margin-left: auto;
    background: var(--primary);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 20px;
    min-width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid var(--gray-100);
}
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 8px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background var(--transition);
}
.sidebar-user:hover { background: var(--gray-50); }
.sidebar-user .avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #22c55e);
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 0.8rem;
    flex-shrink: 0;
}
.sidebar-user .user-info .user-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--gray-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}
.sidebar-user .user-info .user-role {
    font-size: 0.7rem;
    color: var(--gray-400);
}

/* =============================================
   MAIN CONTENT
   ============================================= */
.main-content {
    margin-left: var(--sidebar-w);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* =============================================
   TOPBAR
   ============================================= */
.topbar {
    height: var(--topbar-h);
    background: #fff;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    padding: 0 28px;
    gap: 16px;
    position: sticky;
    top: 0; z-index: 50;
}
.topbar-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-900);
    letter-spacing: -0.02em;
}
.topbar-subtitle {
    font-size: 0.8rem;
    color: var(--gray-400);
    margin-top: 1px;
}
.topbar-spacer { flex: 1; }
.topbar-search {
    position: relative;
}
.topbar-search input {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 8px 12px 8px 36px;
    font-size: 0.85rem;
    width: 240px;
    transition: all var(--transition);
    color: var(--gray-700);
}
.topbar-search input:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(22,163,74,.1);
}
.topbar-search .search-icon {
    position: absolute; left: 10px; top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400); font-size: 14px;
}
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.topbar-btn {
    width: 36px; height: 36px;
    border-radius: 8px;
    border: 1px solid var(--gray-200);
    background: #fff;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    color: var(--gray-500);
    font-size: 16px;
    transition: all var(--transition);
    position: relative;
}
.topbar-btn:hover { background: var(--gray-50); color: var(--gray-700); border-color: var(--gray-300); }
.topbar-btn .notif-dot {
    position: absolute; top: 6px; right: 6px;
    width: 7px; height: 7px;
    background: var(--danger); border-radius: 50%;
    border: 1.5px solid #fff;
}

/* =============================================
   PAGE CONTENT
   ============================================= */
.page-content { padding: 24px 28px; flex: 1; }

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 16px;
}
.page-header-left .page-title {
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--gray-900);
    letter-spacing: -0.03em;
}
.page-header-left .page-desc {
    font-size: 0.85rem;
    color: var(--gray-400);
    margin-top: 2px;
}
.page-header-right { display: flex; gap: 10px; align-items: center; }

/* =============================================
   BUTTONS
   ============================================= */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all var(--transition);
    white-space: nowrap;
    line-height: 1;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn-lg { padding: 12px 24px; font-size: 1rem; }
.btn-icon { padding: 8px; }
.btn-icon.btn-sm { padding: 6px; }

.btn-primary {
    background: var(--primary);
    color: #fff;
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(22,163,74,.3); }

.btn-secondary {
    background: #fff;
    color: var(--gray-700);
    border: 1px solid var(--gray-200);
}
.btn-secondary:hover { background: var(--gray-50); border-color: var(--gray-300); }

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

.btn-ghost {
    background: transparent;
    color: var(--gray-600);
    border: 1px solid transparent;
}
.btn-ghost:hover { background: var(--gray-100); }

.btn-accent {
    background: var(--accent);
    color: #fff;
}
.btn-accent:hover { background: var(--accent-dark); }

/* =============================================
   CARDS
   ============================================= */
.card {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-100);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.card-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.card-title {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--gray-800);
    letter-spacing: -0.02em;
}
.card-body { padding: 20px; }
.card-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--gray-100);
    background: var(--gray-50);
}

/* =============================================
   STATS GRID
   ============================================= */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-100);
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.stat-icon {
    width: 46px; height: 46px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.stat-icon.green { background: #dcfce7; }
.stat-icon.blue  { background: #dbeafe; }
.stat-icon.orange{ background: #ffedd5; }
.stat-icon.purple{ background: #ede9fe; }
.stat-icon.red   { background: #fee2e2; }
.stat-icon.teal  { background: #ccfbf1; }
.stat-info .stat-label {
    font-size: 0.78rem;
    color: var(--gray-400);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.stat-info .stat-value {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--gray-900);
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin-top: 2px;
}
.stat-info .stat-change {
    font-size: 0.72rem;
    font-weight: 600;
    margin-top: 4px;
}
.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* =============================================
   TABLES
   ============================================= */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-100);
    background: #fff;
    box-shadow: var(--shadow-sm);
}
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
thead tr {
    border-bottom: 1px solid var(--gray-100);
    background: var(--gray-50);
}
thead th {
    padding: 11px 16px;
    text-align: left;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    white-space: nowrap;
}
tbody tr {
    border-bottom: 1px solid var(--gray-50);
    transition: background var(--transition);
}
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--gray-50); }
tbody td { padding: 13px 16px; color: var(--gray-700); vertical-align: middle; }
.td-strong { font-weight: 600; color: var(--gray-800); }
.td-muted { font-size: 0.78rem; color: var(--gray-400); }

/* =============================================
   BADGES
   ============================================= */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}
.badge-green  { background: #dcfce7; color: #166534; }
.badge-blue   { background: #dbeafe; color: #1e40af; }
.badge-orange { background: #ffedd5; color: #9a3412; }
.badge-red    { background: #fee2e2; color: #991b1b; }
.badge-gray   { background: var(--gray-100); color: var(--gray-600); }
.badge-purple { background: #ede9fe; color: #5b21b6; }
.badge-teal   { background: #ccfbf1; color: #065f46; }

/* =============================================
   FORMS
   ============================================= */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}
.form-grid-2 { grid-template-columns: 1fr 1fr; }
.form-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.col-span-2 { grid-column: span 2; }
.form-group.col-span-3 { grid-column: span 3; }
.form-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-700);
}
.form-label .required { color: var(--danger); margin-left: 2px; }
.form-control {
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 9px 12px;
    font-size: 0.875rem;
    color: var(--gray-800);
    background: #fff;
    transition: all var(--transition);
    width: 100%;
}
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(22,163,74,.1);
}
.form-control.error { border-color: var(--danger); }
select.form-control { appearance: none; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center; background-size: 16px;
    padding-right: 36px;
}
textarea.form-control { resize: vertical; min-height: 80px; }
.form-hint { font-size: 0.75rem; color: var(--gray-400); }
.form-error { font-size: 0.75rem; color: var(--danger); }

/* =============================================
   MODAL
   ============================================= */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.45);
    backdrop-filter: blur(3px);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
}
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal {
    background: #fff;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 580px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(.95) translateY(10px);
    transition: transform 200ms cubic-bezier(.4,0,.2,1);
}
.modal-overlay.active .modal { transform: scale(1) translateY(0); }
.modal-lg { max-width: 780px; }
.modal-xl { max-width: 1000px; }
.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-100);
    display: flex; align-items: center; justify-content: space-between;
}
.modal-title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--gray-900);
    letter-spacing: -0.02em;
}
.modal-close {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: var(--gray-100);
    border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: var(--gray-500);
    font-size: 18px;
    transition: all var(--transition);
}
.modal-close:hover { background: var(--gray-200); color: var(--gray-700); }
.modal-body { padding: 24px; }
.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--gray-100);
    display: flex; justify-content: flex-end; gap: 10px;
    background: var(--gray-50);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

/* =============================================
   ALERTS / FLASH
   ============================================= */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
    border-left: 4px solid;
}
.alert-success { background: #f0fdf4; border-color: var(--primary); color: #166534; }
.alert-error   { background: var(--danger-subtle); border-color: var(--danger); color: #991b1b; }
.alert-warning { background: var(--warning-subtle); border-color: var(--warning); color: #92400e; }
.alert-info    { background: #eff6ff; border-color: var(--accent); color: #1e40af; }

/* =============================================
   TABS
   ============================================= */
.tabs {
    display: flex;
    gap: 4px;
    background: var(--gray-100);
    padding: 4px;
    border-radius: var(--radius);
    width: fit-content;
    margin-bottom: 20px;
}
.tab {
    padding: 8px 16px;
    border-radius: 7px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-500);
    cursor: pointer;
    transition: all var(--transition);
    border: none; background: none;
    white-space: nowrap;
}
.tab.active {
    background: #fff;
    color: var(--primary-dark);
    box-shadow: var(--shadow-sm);
}
.tab:hover:not(.active) { color: var(--gray-700); }

/* =============================================
   AVATAR / PET CARD
   ============================================= */
.pet-avatar {
    width: 40px; height: 40px;
    background: var(--gray-100);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.client-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 0.8rem;
    flex-shrink: 0;
}

/* =============================================
   AGENDA / CALENDAR
   ============================================= */
.agenda-grid {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 0;
}
.time-slot { padding: 12px 16px 12px 0; text-align: right; font-size: 0.78rem; color: var(--gray-400); font-weight: 600; }
.appointment-slot {
    border-left: 2px solid var(--gray-100);
    padding: 4px 0 4px 12px;
    min-height: 50px;
}
.appt-card {
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 4px;
    cursor: pointer;
    transition: all var(--transition);
    border-left: 3px solid;
}
.appt-card:hover { filter: brightness(.95); transform: translateX(2px); }
.appt-consultation { background: #dbeafe; border-color: #3b82f6; color: #1e40af; }
.appt-vaccine      { background: #dcfce7; border-color: #22c55e; color: #166534; }
.appt-surgery      { background: #fee2e2; border-color: #ef4444; color: #991b1b; }
.appt-exam         { background: #fef9c3; border-color: #eab308; color: #854d0e; }
.appt-grooming     { background: #ede9fe; border-color: #8b5cf6; color: #5b21b6; }
.appt-other        { background: #f3f4f6; border-color: #6b7280; color: #374151; }

/* =============================================
   HOSPITALIZATION BOXES
   ============================================= */
.boxes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}
.box-card {
    border-radius: var(--radius-lg);
    border: 1.5px solid var(--gray-200);
    padding: 16px;
    transition: all var(--transition);
    cursor: pointer;
}
.box-card.occupied { border-color: var(--warning); background: var(--warning-subtle); }
.box-card.critical { border-color: var(--danger); background: var(--danger-subtle); }
.box-card.free { background: #f0fdf4; border-color: var(--primary-light); }
.box-number { font-family: var(--font-display); font-size: 1.2rem; font-weight: 800; }

/* =============================================
   LOADING SKELETON
   ============================================= */
.skeleton {
    background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-50) 50%, var(--gray-100) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 6px;
}
@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* =============================================
   UTILITIES
   ============================================= */
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--gray-400); font-size: 0.85rem; }
.text-sm { font-size: 0.8rem; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.text-primary { color: var(--primary); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.w-full { width: 100%; }

/* =============================================
   PAGINATION
   ============================================= */
.pagination {
    display: flex; align-items: center; gap: 6px;
    margin-top: 20px; justify-content: center;
}
.page-btn {
    width: 34px; height: 34px;
    border-radius: 8px;
    border: 1px solid var(--gray-200);
    background: #fff;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-600);
    transition: all var(--transition);
}
.page-btn:hover { background: var(--gray-50); border-color: var(--gray-300); }
.page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }

/* =============================================
   EMPTY STATE
   ============================================= */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--gray-400);
}
.empty-state .empty-icon { font-size: 48px; margin-bottom: 16px; opacity: .6; }
.empty-state .empty-title { font-size: 1rem; font-weight: 600; color: var(--gray-600); margin-bottom: 8px; }
.empty-state .empty-desc { font-size: 0.85rem; }

/* =============================================
   LOGIN PAGE
   ============================================= */
.login-page {
    min-height: 100vh;
    display: flex;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 50%, #f0f9ff 100%);
}
.login-left {
    flex: 1;
    background: linear-gradient(160deg, var(--primary-dark) 0%, #15803d 40%, #0f766e 100%);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 48px;
    position: relative; overflow: hidden;
}
.login-left::before {
    content: '';
    position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.login-left-content { position: relative; z-index: 1; color: #fff; text-align: center; max-width: 380px; }
.login-brand-icon {
    width: 72px; height: 72px;
    background: rgba(255,255,255,.15);
    border-radius: 20px;
    display: flex; align-items: center; justify-content: center;
    font-size: 36px;
    margin: 0 auto 24px;
    border: 1px solid rgba(255,255,255,.2);
}
.login-brand-name {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: -0.04em;
    margin-bottom: 8px;
}
.login-brand-tagline { font-size: 1rem; opacity: .75; line-height: 1.5; margin-bottom: 40px; }
.login-feature {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 14px; text-align: left;
}
.login-feature-icon {
    width: 36px; height: 36px;
    background: rgba(255,255,255,.12);
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; flex-shrink: 0;
}
.login-feature-text { font-size: 0.9rem; opacity: .85; }

.login-right {
    display: flex; align-items: center; justify-content: center;
    padding: 48px;
    min-width: 460px;
}
.login-box {
    width: 100%; max-width: 420px;
}
.login-box-header { margin-bottom: 32px; }
.login-box-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--gray-900);
    letter-spacing: -0.04em;
    margin-bottom: 8px;
}
.login-box-subtitle { font-size: 0.9rem; color: var(--gray-500); }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 900px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .login-left { display: none; }
    .login-right { min-width: 100%; }
    .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
    .form-group.col-span-2, .form-group.col-span-3 { grid-column: span 1; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .page-header { flex-direction: column; }
    .topbar-search { display: none; }
}

/* =============================================
   SCROLLBAR
   ============================================= */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-200); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-300); }

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeInUp .35s ease forwards; }
.fade-in-delay-1 { animation-delay: .05s; opacity: 0; }
.fade-in-delay-2 { animation-delay: .10s; opacity: 0; }
.fade-in-delay-3 { animation-delay: .15s; opacity: 0; }
.fade-in-delay-4 { animation-delay: .20s; opacity: 0; }
