/* =============================================
   SAFEPLAY DASHBOARD — DESIGN SYSTEM
   ============================================= */

/* === CSS RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; line-height: 1.5; }
body { min-height: 100vh; }
img, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
table { border-collapse: collapse; width: 100%; }

/* === DESIGN TOKENS === */
:root {
    /* Primary */
    --teal-50:  #E6F7FB;
    --teal-100: #CCF0F7;
    --teal-200: #99E0EF;
    --teal-300: #66D1E7;
    --teal-400: #33C1DF;
    --teal-500: #00A8D6;
    --teal-600: #0090B8;
    --teal-700: #00789A;
    --teal-800: #00607C;
    --teal-900: #00485E;

    /* Secondary */
    --coral-50:  #FFF0F0;
    --coral-100: #FFE0E0;
    --coral-500: #FF6B6B;
    --coral-600: #E85555;

    /* Slate / Neutrals */
    --slate-50:  #F8FAFC;
    --slate-100: #F1F5F9;
    --slate-200: #E2E8F0;
    --slate-300: #CBD5E1;
    --slate-400: #94A3B8;
    --slate-500: #64748B;
    --slate-600: #475569;
    --slate-700: #374151;
    --slate-800: #1E293B;
    --slate-900: #1A1A2E;

    /* Status */
    --green-50:  #F0FDF4;
    --green-100: #DCFCE7;
    --green-500: #22C55E;
    --green-600: #16A34A;
    --green-700: #15803D;

    --amber-50:  #FFFBEB;
    --amber-100: #FEF3C7;
    --amber-500: #F59E0B;
    --amber-600: #D97706;
    --amber-700: #B45309;

    --red-50:  #FEF2F2;
    --red-100: #FEE2E2;
    --red-500: #EF4444;
    --red-600: #DC2626;
    --red-700: #B91C1C;

    --blue-50:  #EFF6FF;
    --blue-100: #DBEAFE;
    --blue-500: #3B82F6;
    --blue-600: #2563EB;

    /* Semantic */
    --color-primary: var(--teal-500);
    --color-primary-hover: var(--teal-600);
    --color-primary-active: var(--teal-700);
    --color-primary-light: var(--teal-50);
    --color-secondary: var(--coral-500);
    --color-secondary-hover: var(--coral-600);

    --color-success: var(--green-500);
    --color-warning: var(--amber-500);
    --color-danger: var(--red-500);
    --color-info: var(--blue-500);

    --color-text: var(--slate-900);
    --color-text-secondary: var(--slate-700);
    --color-text-muted: var(--slate-500);
    --color-border: var(--slate-200);
    --color-bg: var(--slate-50);
    --color-bg-card: #FFFFFF;
    --color-bg-sidebar: #FFFFFF;
    --color-bg-header: #FFFFFF;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;

    /* Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
    --radius-2xl: 1rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);

    /* Sidebar */
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 64px;
    --header-height: 64px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;
}

/* === TYPOGRAPHY === */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.875rem;
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', 'Inter', sans-serif;
    font-weight: 600;
    line-height: 1.3;
    color: var(--color-text);
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }

.text-sm { font-size: 0.8125rem; }
.text-xs { font-size: 0.75rem; }
.text-muted { color: var(--color-text-muted); }
.text-secondary { color: var(--color-text-secondary); }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

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

.dashboard-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    margin-left: var(--sidebar-width);
    transition: margin-left var(--transition-slow);
}

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

.dashboard-content {
    flex: 1;
    padding: var(--space-6);
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

/* === SIDEBAR === */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--color-bg-sidebar);
    border-right: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    z-index: 40;
    transition: width var(--transition-slow);
    overflow-x: hidden;
}

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

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-4);
    height: var(--header-height);
    border-bottom: 1px solid var(--color-border);
}

.sidebar-logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    background: var(--color-primary);
    border-radius: var(--radius-lg);
    color: white;
    flex-shrink: 0;
}

.sidebar-logo-icon svg {
    width: 1rem;
    height: 1rem;
}

.sidebar-logo-text {
    font-family: 'Poppins', sans-serif;
    font-size: 1.125rem;
    font-weight: 700;
    white-space: nowrap;
}

.sidebar-logo-text span {
    color: var(--color-primary);
}

.sidebar-collapsed .sidebar-logo-text,
.sidebar-collapsed .sidebar-group-label,
.sidebar-collapsed .sidebar-nav-text,
.sidebar-collapsed .sidebar-footer-text {
    display: none;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-3) var(--space-2);
}

.sidebar-group {
    margin-bottom: var(--space-4);
}

.sidebar-group-label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    padding: var(--space-2) var(--space-3);
    white-space: nowrap;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
    color: var(--color-text-secondary);
    font-size: 0.875rem;
    font-weight: 400;
    transition: all var(--transition-fast);
    white-space: nowrap;
    cursor: pointer;
}

.sidebar-link:hover {
    background: var(--slate-100);
    color: var(--color-text);
}

.sidebar-link.active {
    background: var(--teal-50);
    color: var(--color-primary);
    font-weight: 500;
}

.sidebar-link svg {
    width: 1.125rem;
    height: 1.125rem;
    flex-shrink: 0;
}

.sidebar-collapsed .sidebar-link {
    justify-content: center;
    padding: var(--space-2);
}

.sidebar-footer {
    border-top: 1px solid var(--color-border);
    padding: var(--space-3) var(--space-2);
}

.sidebar-footer .sidebar-link {
    color: var(--color-text-muted);
}

.sidebar-footer .sidebar-link:hover {
    color: var(--color-danger);
    background: var(--red-50);
}

/* === HEADER === */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    padding: 0 var(--space-6);
    background: var(--color-bg-header);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 30;
}

.header-left {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.header-right {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.sidebar-toggle:hover {
    background: var(--slate-100);
    color: var(--color-text);
}

.header-search {
    position: relative;
    width: 280px;
}

.header-search input {
    width: 100%;
    height: 2.25rem;
    padding: 0 var(--space-4) 0 2.25rem;
    background: var(--slate-100);
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    color: var(--color-text);
    transition: all var(--transition-fast);
}

.header-search input:focus {
    outline: none;
    background: white;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--teal-50);
}

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

.header-search svg {
    position: absolute;
    left: var(--space-3);
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    color: var(--color-text-muted);
}

.header-icon-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border: none;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.header-icon-btn:hover {
    background: var(--slate-100);
    color: var(--color-text);
}

.header-icon-btn svg {
    width: 1.125rem;
    height: 1.125rem;
}

.notification-dot {
    position: absolute;
    top: 0.375rem;
    right: 0.375rem;
    width: 0.5rem;
    height: 0.5rem;
    background: var(--color-danger);
    border-radius: var(--radius-full);
    border: 2px solid var(--color-bg-header);
}

/* User avatar dropdown */
.user-menu {
    position: relative;
}

.user-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-full);
    background: var(--color-primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: opacity var(--transition-fast);
}

.user-avatar:hover {
    opacity: 0.9;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + var(--space-2));
    right: 0;
    width: 200px;
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 50;
    display: none;
    overflow: hidden;
}

.user-dropdown.open {
    display: block;
}

.user-dropdown-header {
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--color-border);
}

.user-dropdown-name {
    font-weight: 600;
    font-size: 0.875rem;
}

.user-dropdown-email {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
    transition: background var(--transition-fast);
    cursor: pointer;
}

.user-dropdown-item:hover {
    background: var(--slate-100);
}

.user-dropdown-item svg {
    width: 1rem;
    height: 1rem;
}

.user-dropdown-divider {
    border-top: 1px solid var(--color-border);
    margin: var(--space-1) 0;
}

.user-dropdown-item.danger {
    color: var(--color-danger);
}

.user-dropdown-item.danger:hover {
    background: var(--red-50);
}

/* === FOOTER === */
.dashboard-footer {
    padding: var(--space-4) var(--space-6);
    border-top: 1px solid var(--color-border);
    text-align: center;
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.dashboard-footer a {
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
}

.dashboard-footer a:hover {
    color: var(--color-primary);
}

/* === BREADCRUMBS === */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

.breadcrumbs a {
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
}

.breadcrumbs a:hover {
    color: var(--color-primary);
}

.breadcrumbs .separator {
    color: var(--slate-300);
}

.breadcrumbs .current {
    color: var(--color-text);
    font-weight: 500;
}

/* === PAGE HEADER === */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-6);
    flex-wrap: wrap;
    gap: var(--space-4);
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.page-subtitle {
    color: var(--color-text-muted);
    font-size: 0.875rem;
    margin-top: var(--space-1);
}

/* === CARDS === */
.card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-4);
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
}

.card-description {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

/* Stat Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.stat-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-5);
    box-shadow: var(--shadow-sm);
}

.stat-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-2);
}

.stat-card-label {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    font-weight: 500;
}

.stat-card-icon {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
}

.stat-card-icon svg {
    width: 1.125rem;
    height: 1.125rem;
}

.stat-card-icon.primary { background: var(--teal-50); color: var(--color-primary); }
.stat-card-icon.success { background: var(--green-50); color: var(--color-success); }
.stat-card-icon.warning { background: var(--amber-50); color: var(--color-warning); }
.stat-card-icon.danger  { background: var(--red-50); color: var(--color-danger); }
.stat-card-icon.info    { background: var(--blue-50); color: var(--color-info); }

.stat-card-value {
    font-size: 1.75rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    line-height: 1.2;
}

.stat-card-trend {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: var(--space-1);
}

.stat-card-trend.up { color: var(--color-success); }
.stat-card-trend.down { color: var(--color-danger); }

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    line-height: 1.5;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn svg {
    width: 1rem;
    height: 1rem;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}
.btn-primary:hover { background: var(--color-primary-hover); border-color: var(--color-primary-hover); }
.btn-primary:active { background: var(--color-primary-active); }

.btn-secondary {
    background: var(--color-secondary);
    color: white;
    border-color: var(--color-secondary);
}
.btn-secondary:hover { background: var(--color-secondary-hover); }

.btn-outline {
    background: transparent;
    color: var(--color-text-secondary);
    border-color: var(--color-border);
}
.btn-outline:hover { background: var(--slate-100); }

.btn-ghost {
    background: transparent;
    color: var(--color-text-secondary);
    border: none;
}
.btn-ghost:hover { background: var(--slate-100); }

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

.btn-success {
    background: var(--color-success);
    color: white;
}
.btn-success:hover { background: var(--green-600); }

.btn-sm { padding: 0.25rem 0.75rem; font-size: 0.8125rem; }
.btn-lg { padding: 0.75rem 1.5rem; font-size: 1rem; }
.btn-full { width: 100%; }

/* Quick action buttons */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-3);
    margin-bottom: var(--space-6);
}

.btn-quick {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.btn-quick:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: var(--teal-50);
}

.btn-quick svg {
    width: 1rem;
    height: 1rem;
}

/* === BADGES === */
.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: 0.125rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.badge-success, .badge-complete, .badge-current, .badge-minor {
    background: var(--green-50);
    color: var(--green-700);
}

.badge-warning, .badge-due-soon, .badge-expiring, .badge-moderate, .badge-follow-up {
    background: var(--amber-50);
    color: var(--amber-700);
}

.badge-danger, .badge-overdue, .badge-expired, .badge-serious {
    background: var(--red-50);
    color: var(--red-700);
}

.badge-info, .badge-open {
    background: var(--blue-50);
    color: var(--blue-600);
}

.badge-default, .badge-closed, .badge-not-started {
    background: var(--slate-100);
    color: var(--slate-600);
}

.badge-primary {
    background: var(--teal-50);
    color: var(--teal-700);
}

.badge-urgent {
    background: var(--red-100);
    color: var(--red-700);
    font-weight: 600;
}

/* Badge with dot */
.badge-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: var(--radius-full);
}

.badge-dot.success { background: var(--color-success); }
.badge-dot.warning { background: var(--color-warning); }
.badge-dot.danger  { background: var(--color-danger); }
.badge-dot.info    { background: var(--color-info); }

/* === FORMS === */
.form-group {
    margin-bottom: var(--space-4);
}

.form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: var(--space-1);
}

.form-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-1);
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: var(--color-text);
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--teal-50);
}

.form-input::placeholder, .form-textarea::placeholder {
    color: var(--color-text-muted);
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

.form-checkbox-group {
    display: flex;
    align-items: center;
}

.form-checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 0.8125rem;
    cursor: pointer;
}

.form-checkbox {
    width: 1rem;
    height: 1rem;
    accent-color: var(--color-primary);
}

.form-link {
    font-size: 0.8125rem;
    color: var(--color-primary);
    font-weight: 500;
    transition: color var(--transition-fast);
}

.form-link:hover {
    color: var(--color-primary-hover);
    text-decoration: underline;
}

.form-divider {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: var(--space-4) 0;
}

.form-help {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: var(--space-1);
}

.form-error {
    font-size: 0.75rem;
    color: var(--color-danger);
    margin-top: var(--space-1);
}

/* Switch/toggle */
.switch {
    position: relative;
    display: inline-block;
    width: 2.5rem;
    height: 1.375rem;
}

.switch input { opacity: 0; width: 0; height: 0; }

.switch-slider {
    position: absolute;
    inset: 0;
    background: var(--slate-300);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.switch-slider::before {
    content: '';
    position: absolute;
    height: 1rem;
    width: 1rem;
    left: 0.1875rem;
    bottom: 0.1875rem;
    background: white;
    border-radius: var(--radius-full);
    transition: transform var(--transition-fast);
}

.switch input:checked + .switch-slider {
    background: var(--color-primary);
}

.switch input:checked + .switch-slider::before {
    transform: translateX(1.125rem);
}

/* === TABLES === */
.table-container {
    overflow-x: auto;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    background: var(--color-bg-card);
}

table {
    width: 100%;
}

th {
    text-align: left;
    padding: var(--space-3) var(--space-4);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    background: var(--slate-50);
    border-bottom: 1px solid var(--color-border);
    white-space: nowrap;
}

td {
    padding: var(--space-3) var(--space-4);
    font-size: 0.875rem;
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: var(--slate-50);
}

/* === ALERTS / FLASH MESSAGES === */
.alert {
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: var(--space-4);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.alert-success {
    background: var(--green-50);
    color: var(--green-700);
    border: 1px solid var(--green-100);
}

.alert-error {
    background: var(--red-50);
    color: var(--red-700);
    border: 1px solid var(--red-100);
}

.alert-warning {
    background: var(--amber-50);
    color: var(--amber-700);
    border: 1px solid var(--amber-100);
}

.alert-info {
    background: var(--blue-50);
    color: var(--blue-600);
    border: 1px solid var(--blue-100);
}

/* Toast flash message */
.flash-toast {
    position: fixed;
    top: var(--space-4);
    right: var(--space-4);
    z-index: 100;
    min-width: 300px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

.flash-toast.hiding {
    animation: slideOut 0.3s ease forwards;
}

/* === PAGINATION === */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-1);
    margin-top: var(--space-6);
}

.pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 var(--space-2);
    font-size: 0.8125rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: white;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.pagination-btn:hover {
    background: var(--slate-100);
}

.pagination-btn.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* === PROGRESS BAR === */
.progress-bar {
    width: 100%;
    height: 0.5rem;
    background: var(--slate-200);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width var(--transition-slow);
    background: var(--color-primary);
}

.progress-bar-fill.success { background: var(--color-success); }
.progress-bar-fill.warning { background: var(--color-warning); }
.progress-bar-fill.danger  { background: var(--color-danger); }

/* === TABS === */
.tabs {
    border-bottom: 1px solid var(--color-border);
    display: flex;
    gap: 0;
    margin-bottom: var(--space-6);
    overflow-x: auto;
}

.tab {
    padding: var(--space-3) var(--space-4);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-muted);
    border-bottom: 2px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition-fast);
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
}

.tab:hover {
    color: var(--color-text);
}

.tab.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* === AVATAR === */
.avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    font-weight: 600;
    flex-shrink: 0;
}

.avatar-sm { width: 2rem; height: 2rem; font-size: 0.75rem; }
.avatar-md { width: 2.5rem; height: 2.5rem; font-size: 0.875rem; }
.avatar-lg { width: 3rem; height: 3rem; font-size: 1rem; }
.avatar-xl { width: 4rem; height: 4rem; font-size: 1.25rem; }

.avatar-primary { background: var(--teal-50); color: var(--teal-700); }
.avatar-coral   { background: var(--coral-50); color: var(--coral-500); }
.avatar-blue    { background: var(--blue-50); color: var(--blue-600); }
.avatar-green   { background: var(--green-50); color: var(--green-700); }

/* === WELCOME BANNER === */
.welcome-banner {
    background: linear-gradient(135deg, var(--teal-500), var(--teal-700));
    border-radius: var(--radius-xl);
    padding: var(--space-6) var(--space-8);
    color: white;
    margin-bottom: var(--space-6);
    position: relative;
    overflow: hidden;
}

.welcome-banner h2 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: var(--space-2);
}

.welcome-banner p {
    opacity: 0.9;
    font-size: 0.875rem;
}

.welcome-banner-close {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: var(--radius-md);
    padding: var(--space-1);
    cursor: pointer;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.welcome-banner-close:hover {
    background: rgba(255,255,255,0.3);
}

/* === COMPLIANCE GAUGE (SVG) === */
.gauge-container {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.gauge-text {
    position: absolute;
    text-align: center;
}

.gauge-value {
    font-size: 2rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    color: var(--color-text);
}

.gauge-label {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

/* === ACTIVITY FEED === */
.activity-feed {
    display: flex;
    flex-direction: column;
}

.activity-item {
    display: flex;
    gap: var(--space-3);
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--color-border);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-icon svg {
    width: 0.875rem;
    height: 0.875rem;
}

.activity-icon.document   { background: var(--blue-50); color: var(--blue-500); }
.activity-icon.inspection { background: var(--green-50); color: var(--green-500); }
.activity-icon.team       { background: var(--teal-50); color: var(--teal-500); }
.activity-icon.alert      { background: var(--amber-50); color: var(--amber-500); }
.activity-icon.incident   { background: var(--red-50); color: var(--red-500); }
.activity-icon.settings   { background: var(--slate-100); color: var(--slate-500); }
.activity-icon.system     { background: var(--slate-100); color: var(--slate-500); }

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

.activity-text {
    font-size: 0.8125rem;
    color: var(--color-text);
}

.activity-text strong {
    font-weight: 600;
}

.activity-time {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: var(--space-1);
}

.activity-badge {
    display: inline-flex;
    padding: 0.0625rem 0.375rem;
    font-size: 0.6875rem;
    font-weight: 500;
    border-radius: var(--radius-full);
    margin-left: var(--space-2);
}

/* === CHECKLIST === */
.checklist-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--color-border);
}

.checklist-item:last-child {
    border-bottom: none;
}

.checklist-item.checked .checklist-text {
    text-decoration: line-through;
    color: var(--color-text-muted);
}

.checklist-checkbox {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: var(--color-primary);
    cursor: pointer;
}

.checklist-text {
    flex: 1;
    font-size: 0.875rem;
}

/* === CALENDAR === */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: var(--color-bg-card);
}

.calendar-header-cell {
    padding: var(--space-3);
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-muted);
    background: var(--slate-50);
    border-bottom: 1px solid var(--color-border);
}

.calendar-cell {
    min-height: 5rem;
    padding: var(--space-2);
    border-bottom: 1px solid var(--color-border);
    border-right: 1px solid var(--color-border);
    font-size: 0.8125rem;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.calendar-cell:nth-child(7n) {
    border-right: none;
}

.calendar-cell:hover {
    background: var(--slate-50);
}

.calendar-cell.today {
    background: var(--teal-50);
}

.calendar-cell.other-month {
    color: var(--color-text-muted);
    background: var(--slate-50);
}

.calendar-day-number {
    font-weight: 600;
    margin-bottom: var(--space-1);
}

.calendar-event-dot {
    display: inline-block;
    width: 0.375rem;
    height: 0.375rem;
    border-radius: var(--radius-full);
    margin-right: 0.125rem;
}

.calendar-event-dot.inspection { background: var(--color-info); }
.calendar-event-dot.expiry     { background: var(--color-danger); }
.calendar-event-dot.training   { background: var(--color-success); }
.calendar-event-dot.deadline   { background: var(--color-warning); }

/* Calendar legend */
.calendar-legend {
    display: flex;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
}

.calendar-legend-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

/* === CHART CONTAINERS === */
.chart-container {
    position: relative;
    height: 300px;
    padding: var(--space-4);
}

/* === FILE UPLOAD === */
.file-upload-area {
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.file-upload-area:hover {
    border-color: var(--color-primary);
    background: var(--teal-50);
}

.file-upload-area.dragover {
    border-color: var(--color-primary);
    background: var(--teal-50);
}

.file-upload-icon {
    margin: 0 auto var(--space-3);
    color: var(--color-text-muted);
}

.file-upload-text {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.file-upload-text strong {
    color: var(--color-primary);
    font-weight: 600;
}

/* === ACCORDION / FAQ === */
.accordion-item {
    border-bottom: 1px solid var(--color-border);
}

.accordion-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4);
    background: none;
    border: none;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text);
    cursor: pointer;
    text-align: left;
}

.accordion-trigger:hover {
    background: var(--slate-50);
}

.accordion-trigger svg {
    width: 1rem;
    height: 1rem;
    color: var(--color-text-muted);
    transition: transform var(--transition-fast);
}

.accordion-item.open .accordion-trigger svg {
    transform: rotate(180deg);
}

.accordion-content {
    padding: 0 var(--space-4) var(--space-4);
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
    display: none;
}

.accordion-item.open .accordion-content {
    display: block;
}

/* === NOTIFICATION LIST === */
.notification-item {
    display: flex;
    gap: var(--space-3);
    padding: var(--space-4);
    border-bottom: 1px solid var(--color-border);
    transition: background var(--transition-fast);
}

.notification-item.unread {
    background: var(--teal-50);
}

.notification-item:hover {
    background: var(--slate-50);
}

.notification-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-icon svg {
    width: 1rem;
    height: 1rem;
}

.notification-icon.warning { background: var(--amber-50); color: var(--amber-500); }
.notification-icon.success { background: var(--green-50); color: var(--green-500); }
.notification-icon.info    { background: var(--blue-50); color: var(--blue-500); }
.notification-icon.urgent  { background: var(--red-50); color: var(--red-500); }

.notification-body {
    flex: 1;
}

.notification-title {
    font-size: 0.875rem;
    font-weight: 500;
}

.notification-desc {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    margin-top: var(--space-1);
}

.notification-time {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: var(--space-1);
}

.notification-dismiss {
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: var(--space-1);
}

.notification-dismiss:hover {
    color: var(--color-text);
}

/* === AUTH LAYOUT === */
.auth-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--color-bg);
}

.auth-container {
    width: 100%;
    max-width: 440px;
    padding: var(--space-6);
}

.auth-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    box-shadow: var(--shadow-md);
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    margin-bottom: var(--space-6);
}

.auth-logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background: var(--color-primary);
    border-radius: var(--radius-lg);
    color: white;
}

.auth-logo-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

.auth-logo-text {
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
}

.auth-title {
    text-align: center;
    font-size: 1.25rem;
    margin-bottom: var(--space-2);
}

.auth-subtitle {
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.875rem;
    margin-bottom: var(--space-6);
}

.auth-form {
    margin-bottom: var(--space-4);
}

.auth-switch {
    text-align: center;
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

.auth-footer-text {
    text-align: center;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: var(--space-4);
}

/* === SIGNUP SPLIT LAYOUT === */
.signup-split {
    display: flex;
    min-height: 100vh;
}

.signup-form-side {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-6) var(--space-12);
}

.signup-form-inner {
    width: 100%;
    max-width: 440px;
}

.signup-trust-side {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--teal-500), var(--teal-700));
    color: white;
    padding: var(--space-12);
}

.signup-trust-inner {
    max-width: 440px;
}

@media (max-width: 1024px) {
    .signup-trust-side {
        display: none;
    }
    .signup-form-side {
        padding: var(--space-6);
    }
}

/* === TWO-COLUMN GRID === */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
}

/* === SEARCH BAR === */
.search-bar {
    position: relative;
    margin-bottom: var(--space-4);
}

.search-bar input {
    width: 100%;
    padding: var(--space-3) var(--space-4) var(--space-3) 2.5rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    background: var(--color-bg-card);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--teal-50);
}

.search-bar svg {
    position: absolute;
    left: var(--space-3);
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    color: var(--color-text-muted);
}

/* === FOLDER CARDS === */
.folder-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.folder-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.folder-card:hover {
    border-color: var(--color-primary);
    background: var(--teal-50);
}

.folder-card-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-3);
    background: var(--teal-50);
    color: var(--color-primary);
}

.folder-card-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

.folder-card-name {
    font-size: 0.8125rem;
    font-weight: 500;
    margin-bottom: var(--space-1);
}

.folder-card-count {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

/* === EMPTY STATE === */
.empty-state {
    text-align: center;
    padding: var(--space-12) var(--space-6);
    color: var(--color-text-muted);
}

.empty-state svg {
    width: 3rem;
    height: 3rem;
    margin: 0 auto var(--space-4);
    color: var(--slate-300);
}

.empty-state h3 {
    color: var(--color-text);
    margin-bottom: var(--space-2);
}

.empty-state p {
    font-size: 0.875rem;
    max-width: 400px;
    margin: 0 auto;
}

/* === TEAM MEMBER CARDS === */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-4);
}

.team-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-5);
}

.team-card-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.team-card-info h4 {
    font-size: 0.9375rem;
}

.team-card-info p {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

.team-card-badges {
    display: flex;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
    flex-wrap: wrap;
}

.team-card-progress {
    margin-top: var(--space-3);
}

.team-card-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-1);
}

/* === VENUE CARDS === */
.venue-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-5);
    position: relative;
}

.venue-card.current {
    border-color: var(--color-primary);
}

.venue-card-badge {
    position: absolute;
    top: var(--space-3);
    right: var(--space-3);
}

/* === RISK SCORE === */
.risk-score {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.risk-score-bar {
    flex: 1;
    height: 0.5rem;
    background: var(--slate-200);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.risk-score-fill {
    height: 100%;
    border-radius: var(--radius-full);
}

.risk-score-fill.low    { background: var(--color-success); }
.risk-score-fill.medium { background: var(--color-warning); }
.risk-score-fill.high   { background: var(--color-danger); }

/* === PROFILE HEADER === */
.profile-header {
    display: flex;
    align-items: center;
    gap: var(--space-6);
    padding: var(--space-6);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    margin-bottom: var(--space-6);
}

.profile-header-info h2 {
    margin-bottom: var(--space-1);
}

.profile-header-meta {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

/* === BILLING CARDS === */
.billing-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
    margin-bottom: var(--space-6);
}

.plan-card {
    background: var(--color-bg-card);
    border: 2px solid var(--color-primary);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
}

.plan-price {
    font-size: 2rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    color: var(--color-text);
}

.plan-price span {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--color-text-muted);
}

.plan-features {
    margin-top: var(--space-4);
}

.plan-features li {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) 0;
    font-size: 0.875rem;
}

.plan-features li svg {
    width: 1rem;
    height: 1rem;
    color: var(--color-success);
}

/* === DARK MODE === */
body.dark-mode {
    --color-text: #E2E8F0;
    --color-text-secondary: #CBD5E1;
    --color-text-muted: #94A3B8;
    --color-border: #334155;
    --color-bg: #0F172A;
    --color-bg-card: #1E293B;
    --color-bg-sidebar: #1E293B;
    --color-bg-header: #1E293B;
}

body.dark-mode .form-input,
body.dark-mode .form-select,
body.dark-mode .form-textarea {
    background: #0F172A;
    border-color: #334155;
    color: #E2E8F0;
}

body.dark-mode .form-input:focus,
body.dark-mode .form-select:focus,
body.dark-mode .form-textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 168, 214, 0.15);
}

body.dark-mode th {
    background: #0F172A;
}

body.dark-mode tr:hover td {
    background: #0F172A;
}

body.dark-mode .auth-card {
    background: var(--color-bg-card);
    border-color: var(--color-border);
}

body.dark-mode .header-search input {
    background: #0F172A;
    color: #E2E8F0;
}

body.dark-mode .welcome-banner {
    background: linear-gradient(135deg, var(--teal-700), var(--teal-900));
}

body.dark-mode .folder-card:hover,
body.dark-mode .btn-quick:hover {
    background: rgba(0, 168, 214, 0.1);
}

/* === RESPONSIVE === */
@media (max-width: 1280px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .quick-actions { grid-template-columns: repeat(2, 1fr); }
    .folder-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1024px) {
    /* Sidebar collapses to icons */
    .sidebar {
        width: var(--sidebar-collapsed-width);
    }
    .dashboard-main {
        margin-left: var(--sidebar-collapsed-width);
    }
    .sidebar-logo-text,
    .sidebar-group-label,
    .sidebar-nav-text,
    .sidebar-footer-text {
        display: none;
    }
    .sidebar-link {
        justify-content: center;
        padding: var(--space-2);
    }
    .grid-2 { grid-template-columns: 1fr; }
    .billing-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    /* Sidebar becomes overlay */
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width);
        box-shadow: var(--shadow-lg);
        z-index: 50;
    }
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    .sidebar-logo-text,
    .sidebar-group-label,
    .sidebar-nav-text,
    .sidebar-footer-text {
        display: block;
    }
    .sidebar-link {
        justify-content: flex-start;
        padding: var(--space-2) var(--space-3);
    }
    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 45;
    }
    .sidebar-overlay.active {
        display: block;
    }
    .dashboard-main {
        margin-left: 0;
    }
    .dashboard-content {
        padding: var(--space-4);
    }
    .header {
        padding: 0 var(--space-4);
    }
    .header-search {
        display: none;
    }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .quick-actions { grid-template-columns: 1fr 1fr; }
    .folder-grid { grid-template-columns: 1fr 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .grid-3 { grid-template-columns: 1fr; }
    .page-title { font-size: 1.25rem; }
    .profile-header { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .quick-actions { grid-template-columns: 1fr; }
    .folder-grid { grid-template-columns: 1fr; }
    .team-grid { grid-template-columns: 1fr; }

    /* Tables to cards on very small screens */
    .table-container { border: none; border-radius: 0; }
    .table-card-mobile thead { display: none; }
    .table-card-mobile tr {
        display: block;
        border: 1px solid var(--color-border);
        border-radius: var(--radius-lg);
        margin-bottom: var(--space-3);
        padding: var(--space-3);
    }
    .table-card-mobile td {
        display: flex;
        justify-content: space-between;
        padding: var(--space-2) 0;
        border-bottom: 1px solid var(--color-border);
    }
    .table-card-mobile td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 0.75rem;
        color: var(--color-text-muted);
    }
    .table-card-mobile td:last-child {
        border-bottom: none;
    }
}

/* === UTILITIES === */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.ml-auto { margin-left: auto; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.w-full { width: 100%; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.hidden { display: none !important; }
