/* ============================================
   Facand Dashboard — Theme & Base Reset
   ============================================ */

:root {
    /* Primary palette */
    --primary: #4F46E5;
    --primary-light: #818CF8;
    --primary-dark: #3730A3;
    --primary-50: rgba(79, 70, 229, 0.05);
    --primary-100: rgba(79, 70, 229, 0.1);

    /* Backgrounds */
    --bg: #F9FAFB;
    --bg-card: #FFFFFF;
    --bg-hover: #F3F4F6;

    /* Text */
    --text: #111827;
    --text-soft: #6B7280;
    --text-muted: #9CA3AF;

    /* Borders */
    --border: #E5E7EB;
    --border-focus: var(--primary-light);

    /* Status colors */
    --success: #10B981;
    --success-light: #D1FAE5;
    --success-dark: #065F46;
    --warning: #F59E0B;
    --warning-light: #FEF3C7;
    --warning-dark: #92400E;
    --danger: #EF4444;
    --danger-light: #FEE2E2;
    --danger-dark: #991B1B;
    --info: #3B82F6;
    --info-light: #DBEAFE;
    --info-dark: #1E40AF;

    /* Sidebar */
    --sidebar-bg: #1E1B4B;
    --sidebar-text: #C7D2FE;
    --sidebar-hover: rgba(255, 255, 255, 0.08);
    --sidebar-active: rgba(255, 255, 255, 0.12);
    --sidebar-width: 260px;

    /* Topbar */
    --topbar-height: 64px;

    /* Shapes */
    --radius: 8px;
    --radius-sm: 6px;
    --radius-lg: 12px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --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);

    /* Font */
    --font: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Transitions */
    --transition: 0.15s ease;
    --transition-slow: 0.3s ease;
}

/* ============================================
   Reset
   ============================================ */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: var(--font);
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, svg {
    display: block;
    max-width: 100%;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}

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

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text);
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.375rem; }
h3 { font-size: 1.125rem; }
h4 { font-size: 1rem; }

p {
    margin: 0;
}

code {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
    font-size: 0.8125rem;
}

/* ============================================
   Utility classes
   ============================================ */

.text-soft { color: var(--text-soft); }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-info { color: var(--info); }
.text-primary { color: var(--primary); }
.text-center { text-align: center; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.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;
}

/* ============================================
   Scrollbar
   ============================================ */

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ============================================
   Selection
   ============================================ */

::selection {
    background: var(--primary-100);
    color: var(--primary-dark);
}
