/* ============================================================
   NASHRA - Global Stylesheet
   Complete design system for the entire application
   ============================================================ */

/* ============================================================
   CSS RESET & BASE
   ============================================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--color-primary-dark);
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input, textarea, select {
    font-family: inherit;
}

/* ============================================================
   CSS VARIABLES - LIGHT THEME (Default)
   ============================================================ */
:root,
[data-theme="light"] {
    /* Brand Colors - Inspired by Nasarawa State (green heritage) */
    --color-primary: #0a6e4e;
    --color-primary-dark: #085a40;
    --color-primary-light: #0e8a63;
    --color-primary-pale: #e6f4ef;

    --color-secondary: #c9a227;
    --color-secondary-dark: #a48520;
    --color-secondary-light: #dfb84a;
    --color-secondary-pale: #fdf6e0;

    --color-accent: #1e40af;
    --color-accent-dark: #1e3a8a;
    --color-accent-pale: #dbeafe;

    /* Semantic Colors */
    --color-success: #16a34a;
    --color-success-pale: #dcfce7;
    --color-warning: #ea580c;
    --color-warning-pale: #ffedd5;
    --color-danger: #dc2626;
    --color-danger-pale: #fee2e2;
    --color-info: #0284c7;
    --color-info-pale: #e0f2fe;

    /* Neutral Palette */
    --color-bg: #f8fafc;
    --color-bg-alt: #ffffff;
    --color-bg-elevated: #ffffff;
    --color-surface: #ffffff;
    --color-surface-hover: #f1f5f9;

    --color-text: #0f172a;
    --color-text-muted: #64748b;
    --color-text-light: #94a3b8;
    --color-text-inverse: #ffffff;

    --color-border: #e2e8f0;
    --color-border-strong: #cbd5e1;
    --color-divider: #f1f5f9;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.10), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 24px;
    --radius-full: 9999px;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;

    /* Typography */
    --font-heading: 'Poppins', 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;

    /* Z-Index Scale */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
    --z-popover: 600;
    --z-tooltip: 700;
    --z-toast: 800;
}

/* ============================================================
   CSS VARIABLES - DARK THEME
   ============================================================ */
[data-theme="dark"] {
    --color-primary: #10a578;
    --color-primary-dark: #0d8563;
    --color-primary-light: #34c896;
    --color-primary-pale: #0d2a22;

    --color-secondary: #e0b944;
    --color-secondary-dark: #b89430;
    --color-secondary-light: #f0cf68;
    --color-secondary-pale: #2a2213;

    --color-accent: #3b82f6;
    --color-accent-dark: #2563eb;
    --color-accent-pale: #1e2a4a;

    --color-success: #22c55e;
    --color-success-pale: #14311e;
    --color-warning: #f97316;
    --color-warning-pale: #331d0e;
    --color-danger: #ef4444;
    --color-danger-pale: #2d1414;
    --color-info: #38bdf8;
    --color-info-pale: #0e2a3a;

    --color-bg: #0a0f1c;
    --color-bg-alt: #0f1729;
    --color-bg-elevated: #1a2438;
    --color-surface: #131c30;
    --color-surface-hover: #1e2942;

    --color-text: #e6edf7;
    --color-text-muted: #94a3b8;
    --color-text-light: #64748b;
    --color-text-inverse: #0f172a;

    --color-border: #253048;
    --color-border-strong: #364560;
    --color-divider: #1e2942;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
}

/* ============================================================
   IMPORT GOOGLE FONTS
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Poppins:wght@500;600;700;800&family=JetBrains+Mono:wght@400;600&display=swap');

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-text);
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.875rem); }
h4 { font-size: clamp(1.125rem, 2vw, 1.5rem); }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p { margin-bottom: var(--space-md); }

.text-primary { color: var(--color-primary); }
.text-secondary { color: var(--color-secondary); }
.text-success { color: var(--color-success); }
.text-danger { color: var(--color-danger); }
.text-warning { color: var(--color-warning); }
.text-muted { color: var(--color-text-muted); }

.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.container-narrow {
    max-width: 900px;
}

.container-wide {
    max-width: 1440px;
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }

.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

.hidden { display: none !important; }
.block { display: block; }
.inline-block { display: inline-block; }

.w-full { width: 100%; }
.h-full { height: 100%; }

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    border: 2px solid transparent;
    text-decoration: none;
    white-space: nowrap;
    user-select: none;
    position: relative;
    overflow: hidden;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn:focus-visible {
    outline: 3px solid var(--color-primary-light);
    outline-offset: 2px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(10, 110, 78, 0.25);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(10, 110, 78, 0.35);
    color: white;
}

.btn-secondary {
    background: var(--color-surface);
    color: var(--color-text);
    border-color: var(--color-border-strong);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--color-surface-hover);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.btn-accent {
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-secondary-dark) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(201, 162, 39, 0.25);
}

.btn-accent:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(201, 162, 39, 0.35);
    color: white;
}

.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-outline:hover:not(:disabled) {
    background: var(--color-primary);
    color: white;
}

.btn-danger {
    background: var(--color-danger);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: #b91c1c;
    color: white;
}

.btn-ghost {
    background: transparent;
    color: var(--color-text);
}

.btn-ghost:hover:not(:disabled) {
    background: var(--color-surface-hover);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.0625rem;
}

.btn-xl {
    padding: 1.25rem 2.5rem;
    font-size: 1.125rem;
    border-radius: var(--radius-lg);
}

.btn-block {
    width: 100%;
}

.btn-icon-only {
    padding: 0.625rem;
    aspect-ratio: 1;
}

/* ============================================================
   FORMS
   ============================================================ */
.form-group {
    margin-bottom: var(--space-md);
}

.form-label {
    display: block;
    margin-bottom: var(--space-xs);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
}

.form-label .required {
    color: var(--color-danger);
    margin-left: 2px;
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--color-text);
    background: var(--color-bg-alt);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px var(--color-primary-pale);
}

.form-control:disabled {
    background: var(--color-surface-hover);
    cursor: not-allowed;
    opacity: 0.7;
}

.form-control.is-invalid {
    border-color: var(--color-danger);
}

.form-control.is-invalid:focus {
    box-shadow: 0 0 0 4px var(--color-danger-pale);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

select.form-control {
    cursor: pointer;
    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' fill='none'%3E%3Cpath d='M2.5 4.5L6 8L9.5 4.5' stroke='%2364748b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.form-hint {
    margin-top: var(--space-xs);
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

.form-error {
    margin-top: var(--space-xs);
    font-size: 0.8125rem;
    color: var(--color-danger);
    font-weight: 500;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

.form-check {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--color-primary);
}

.form-check label {
    cursor: pointer;
    user-select: none;
    font-size: 0.9375rem;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-base);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    padding: var(--space-lg);
    border-bottom: 1px solid var(--color-divider);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
}

.card-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0;
    color: var(--color-text);
}

.card-body {
    padding: var(--space-lg);
}

.card-footer {
    padding: var(--space-md) var(--space-lg);
    border-top: 1px solid var(--color-divider);
    background: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-sm);
}

/* ============================================================
   BADGES
   ============================================================ */
.nashra-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    line-height: 1.4;
    white-space: nowrap;
}

.badge-gray { background: #e2e8f0; color: #475569; }
.badge-blue { background: #dbeafe; color: #1e40af; }
.badge-green { background: #dcfce7; color: #166534; }
.badge-red { background: #fee2e2; color: #991b1b; }
.badge-yellow { background: #fef3c7; color: #92400e; }
.badge-orange { background: #ffedd5; color: #9a3412; }
.badge-purple { background: #f3e8ff; color: #6b21a8; }
.badge-teal { background: #ccfbf1; color: #115e59; }

[data-theme="dark"] .badge-gray { background: #334155; color: #cbd5e1; }
[data-theme="dark"] .badge-blue { background: #1e3a5f; color: #93c5fd; }
[data-theme="dark"] .badge-green { background: #14532d; color: #86efac; }
[data-theme="dark"] .badge-red { background: #7f1d1d; color: #fca5a5; }
[data-theme="dark"] .badge-yellow { background: #713f12; color: #fde68a; }
[data-theme="dark"] .badge-orange { background: #7c2d12; color: #fed7aa; }
[data-theme="dark"] .badge-purple { background: #581c87; color: #d8b4fe; }
[data-theme="dark"] .badge-teal { background: #134e4a; color: #99f6e4; }

/* ============================================================
   TABLES
   ============================================================ */
.table-wrapper {
    overflow-x: auto;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.table thead {
    background: var(--color-bg);
    border-bottom: 2px solid var(--color-border);
}

.table th {
    padding: 0.875rem 1rem;
    text-align: left;
    font-weight: 700;
    color: var(--color-text-muted);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.table td {
    padding: 0.875rem 1rem;
    border-top: 1px solid var(--color-divider);
    color: var(--color-text);
    vertical-align: middle;
}

.table tbody tr {
    transition: background var(--transition-fast);
}

.table tbody tr:hover {
    background: var(--color-surface-hover);
}

.table-actions {
    display: flex;
    gap: var(--space-xs);
    justify-content: flex-end;
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
.nashra-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: var(--z-toast);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 1rem 1.25rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    max-width: 400px;
    min-width: 300px;
    transform: translateX(120%);
    transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid var(--color-info);
}

.nashra-toast-show {
    transform: translateX(0);
}

.nashra-toast-success { border-left-color: var(--color-success); }
.nashra-toast-error { border-left-color: var(--color-danger); }
.nashra-toast-warning { border-left-color: var(--color-warning); }
.nashra-toast-info { border-left-color: var(--color-info); }

.toast-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    font-size: 0.9375rem;
    color: var(--color-text);
    font-weight: 500;
}

.toast-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-muted);
    font-size: 1rem;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.toast-close:hover {
    background: var(--color-surface-hover);
    color: var(--color-text);
}

/* ============================================================
   LOADING SPINNER
   ============================================================ */
.nashra-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl);
    gap: var(--space-md);
}

.nashra-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: nashra-spin 0.8s linear infinite;
}

.nashra-spinner-sm {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

@keyframes nashra-spin {
    to { transform: rotate(360deg); }
}

.nashra-loading p {
    color: var(--color-text-muted);
    font-size: 0.9375rem;
    margin: 0;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.nashra-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl);
    gap: var(--space-md);
    text-align: center;
}

.empty-icon {
    font-size: 4rem;
    opacity: 0.4;
}

.nashra-empty p {
    color: var(--color-text-muted);
    font-size: 1rem;
    margin: 0;
}

/* ============================================================
   MODAL
   ============================================================ */
.nashra-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: var(--z-modal-backdrop);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
    animation: fadeIn 200ms ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.nashra-modal-confirm {
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    max-width: 450px;
    width: 100%;
    box-shadow: var(--shadow-xl);
    animation: slideUp 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.nashra-modal-confirm h3 {
    margin-bottom: var(--space-sm);
    color: var(--color-text);
}

.nashra-modal-confirm p {
    color: var(--color-text-muted);
    margin-bottom: var(--space-lg);
}

.nashra-modal-actions {
    display: flex;
    gap: var(--space-sm);
    justify-content: flex-end;
}

.nashra-modal {
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: slideUp 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.nashra-modal-header {
    padding: var(--space-lg);
    border-bottom: 1px solid var(--color-divider);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nashra-modal-body {
    padding: var(--space-lg);
}

.nashra-modal-footer {
    padding: var(--space-md) var(--space-lg);
    border-top: 1px solid var(--color-divider);
    background: var(--color-bg);
    display: flex;
    justify-content: flex-end;
    gap: var(--space-sm);
}

.modal-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-muted);
    font-size: 1.5rem;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.modal-close-btn:hover {
    background: var(--color-surface-hover);
    color: var(--color-text);
}

/* ============================================================
   STAT CARDS (for dashboards)
   ============================================================ */
.stat-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    border: 1px solid var(--color-border);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-base);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: var(--space-md);
    background: var(--color-primary-pale);
    color: var(--color-primary);
}

.stat-card-label {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.stat-card-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-text);
    line-height: 1.1;
    font-family: var(--font-heading);
}

.stat-card-change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: var(--space-sm);
    font-size: 0.8125rem;
    font-weight: 600;
}

.stat-card-change.positive { color: var(--color-success); }
.stat-card-change.negative { color: var(--color-danger); }

/* ============================================================
   ALERTS / MESSAGE BOXES
   ============================================================ */
.alert {
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    border-left: 4px solid;
    margin-bottom: var(--space-md);
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    font-size: 0.9375rem;
}

.alert-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 700;
    margin-bottom: 4px;
}

.alert-info {
    background: var(--color-info-pale);
    border-color: var(--color-info);
    color: var(--color-info);
}

.alert-success {
    background: var(--color-success-pale);
    border-color: var(--color-success);
    color: var(--color-success);
}

.alert-warning {
    background: var(--color-warning-pale);
    border-color: var(--color-warning);
    color: var(--color-warning);
}

.alert-danger {
    background: var(--color-danger-pale);
    border-color: var(--color-danger);
    color: var(--color-danger);
}

[data-theme="dark"] .alert { color: var(--color-text); }

/* ============================================================
   THEME TOGGLE BUTTON
   ============================================================ */
.theme-toggle {
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    width: 42px;
    height: 42px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
    font-size: 1.125rem;
}

.theme-toggle:hover {
    border-color: var(--color-primary);
    transform: rotate(15deg) scale(1.05);
}

/* ============================================================
   SCROLLBAR STYLING
   ============================================================ */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--color-border-strong);
    border-radius: var(--radius-full);
    border: 2px solid var(--color-bg);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-light);
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.pulse { animation: pulse 2s ease-in-out infinite; }

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.shimmer {
    background: linear-gradient(
        90deg,
        var(--color-surface-hover) 0%,
        var(--color-surface) 50%,
        var(--color-surface-hover) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s linear infinite;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-up {
    animation: fadeInUp 600ms ease-out;
}

/* ============================================================
   TOOLTIPS
   ============================================================ */
[data-tooltip] {
    position: relative;
}

[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-text);
    color: var(--color-bg);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    z-index: var(--z-tooltip);
    pointer-events: none;
    animation: fadeIn 200ms ease;
}

/* ============================================================
   IMAGE HOLDERS (for landing page slots)
   ============================================================ */
.image-holder {
    background: linear-gradient(135deg, var(--color-primary-pale) 0%, var(--color-surface-hover) 100%);
    border: 2px dashed var(--color-border-strong);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
    color: var(--color-text-muted);
    min-height: 300px;
    position: relative;
    overflow: hidden;
}

.image-holder-icon {
    font-size: 3rem;
    opacity: 0.4;
    margin-bottom: var(--space-sm);
}

.image-holder-label {
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
}

.image-holder img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ============================================================
   DIVIDER
   ============================================================ */
.divider {
    height: 1px;
    background: var(--color-divider);
    margin: var(--space-lg) 0;
    border: none;
}

/* ============================================================
   SKIP LINK (accessibility)
   ============================================================ */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--color-primary);
    color: white;
    padding: var(--space-sm) var(--space-md);
    z-index: 9999;
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: 0;
    color: white;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: 1fr;
    }

    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }

    .card-body,
    .card-header {
        padding: var(--space-md);
    }

    .nashra-toast {
        left: 20px;
        right: 20px;
        max-width: none;
        min-width: 0;
    }

    .container {
        padding: 0 var(--space-md);
    }

    .table th,
    .table td {
        padding: 0.625rem 0.75rem;
        font-size: 0.8125rem;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
}

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
    .no-print { display: none !important; }
    body { background: white; color: black; }
    .card { border: 1px solid #ccc; box-shadow: none; }
}