﻿/* =========================================================
   QBox Design System v1.0 – Foundation
========================================================= */

:root {
    /* SPACING SCALE (8pt) */
    --space-0: 0;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-7: 40px;
    --space-8: 56px;
    --space-9: 72px;
    --space-10: 96px;
    --space-11: 125px;
    --space-12: 150px;
    --space-13: 175px;
    --space-14: 200px;
    --space-15: 225px;
    --space-16: 250px;
    --space-17: 275px;
    --space-18: 300px;
    --space-19: 350px;
    --space-20: 400px;
    /* TYPOGRAPHY SCALE */
    --text-xs: 12px;
    --text-sm: 14px;
    --text-md: 16px;
    --text-lg: 18px;
    --text-xl: 20px;
    --text-2xl: 24px;
    --text-3xl: 32px;
    --text-4xl: 40px;
    --text-5xl: 48px;
    --text-6xl: 56px;
    /* TEXT */
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-inverse: #ffffff;
    /* RADIUS */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    /* ELEVATION */
    --shadow-1: 0 2px 8px rgba(15,23,42,.05);
    --shadow-2: 0 8px 20px rgba(15,23,42,.07);
    --shadow-3: 0 16px 36px rgba(15,23,42,.10);
    --shadow-4: 0 40px 80px rgba(15,23,42,0.12);
    --shadow-5: 0 30px 80px rgba(15,23,42,.08), 0 2px 8px rgba(15,23,42,.03);
    /* SURFACES */
    --surface-0: #ffffff;
    --surface-1: #f8fafc;
    --surface-2: #f1f5f9;
    --surface-dark-1: #0f172a;
    --surface-dark-2: #111827;
    --surface-base: var(--surface-0);
    --surface-muted: var(--surface-1);
    --surface-elevated: #ffffff;
    --surface-soft: #f8fafc;
    --surface-hover: #F8FAFF; /* subtle brand tint */
    /* BRAND */
    --brand-primary: #6366f1;
    --brand-secondary: #8b5cf6;
    --brand-soft: rgba(99,102,241,.08);
    --brand-soft-strong: rgba(99,102,241,.14);
    --gradient-brand: linear-gradient(135deg, #6366f1, #8b5cf6);
    /*Motion Tokens*/
    --motion-fast: 120ms ease;
    --motion-base: 250ms ease;
    --motion-slow: 400ms ease;
    /*Z-index scale*/
    --z-navbar: 1000;
    --z-dropdown: 1100;
    --z-modal: 2000;
    /*Border System*/
    --border-subtle: #eef2f7; /* Very light borders */
    --border-default: #e2e8f0; /* Standard borders */
    --border-muted: #d1d5db; /* Optional intermediate */
    --border-strong: #cbd5e1; /* Emphasized borders */
    --border-dark: #aaaaaa; /* High-contrast borders */
    /*Semantic Layer*/
    --color-bg-default: var(--surface-0);
    --color-bg-muted: var(--surface-1);
    --color-text-default: var(--text-primary);
    --color-text-muted: var(--text-secondary);
    --color-border-default: var(--border-default);
    /*State Tokens*/
    --color-success: #16a34a;
    --color-warning: #f59e0b;
    --color-danger: #dc2626;
    --color-info: #2563eb;
    --color-success-bg: rgba(22,163,74,0.1);
    --color-danger-bg: rgba(220,38,38,0.1);
    --color-warning-bg: rgba(245,158,11,0.1);
    --color-info-bg: rgba(59,130,246,0.1);
    /*Focus Ring*/
    --focus-ring: 0 0 0 3px rgba(99,102,241,0.35);
    /* BRAND TINTS */
    --brand-soft: rgba(99,102,241,0.06);
    --brand-soft-strong: rgba(99,102,241,0.12);
    /*Overlay*/
    --brand-overlay-light: rgba(99,102,241,0.12);
    --brand-overlay-strong: rgba(99,102,241,0.18);
    /* BORDER ENHANCEMENTS */
    --border-focus: rgba(99,102,241,.28);
    /* Layout Sizes */
    --layout-header-height: var(--space-8);
    --layout-sidebar-width: calc(var(--space-10) * 2.8);
    --layout-content-max-width: 1450px;
    --layout-header-z: var(--z-navbar);
    --layout-sidebar-z: calc(var(--z-navbar) - 1);
    /* Content */
    --layout-content-padding: var(--space-8);
    /* Shell */
    --layout-shell-min-height: 100vh;
    --layout-shell-center-height: 70vh;
    --header-height-expanded: var(--layout-header-height);
    --header-height-collapsed: calc(var(--layout-header-height) - var(--space-2));
    /* Breakpoints */
    --breakpoint-tablet: 62rem; /* 992px */
    --breakpoint-mobile: 48rem; /* 768px */
    --input-height: 40px;
    --btn-height-sm: 32px;
    --btn-height-md: 40px;
    --btn-height-lg: 48px;
    /* =========================================
       LAYOUT WIDTH SCALE (NEW)
    ========================================= */
    --container-sm: calc(var(--space-10) * 6.6); /* ~640px */
    --container-md: calc(var(--space-10) * 9.1); /* ~880px */
    --container-lg: calc(var(--space-10) * 12.5); /* ~1200px */
    --container-xl: calc(var(--space-10) * 13.5); /* ~1300px */
    --container-max: var(--layout-content-max-width);
    /* CONTENT WIDTH */
    --content-max-width: calc(var(--space-10) * 5.5); /* ~720px */
    /* GRID MIN WIDTH */
    --grid-min-item: calc(var(--space-10) * 2.2); /* ~280px */
    /* BREAKPOINTS */
    --breakpoint-tablet: 62rem; /* already ok */
    --breakpoint-mobile: 48rem;
    /* SAFE PADDING */
    --container-padding-inline: clamp(var(--space-4), 4vw, var(--space-8));
    --input-height-sm: 32px;
    --input-height-md: 40px;
    --input-height-lg: 48px;
    --column-actions-min-width: calc(var(--space-6) * 10);
    --radius-pill: 999px;
    --text-soft: #CBD5E1;
    --text-disabled: #94A3B8;
    --shadow-navbar: 0 10px 30px rgba(15,23,42,.08);
    --hero-grid-size: 56px;
    --hero-overlay-opacity: .35;
}

/* RESET */

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    margin: 0;
}

body {
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: var(--text-sm);
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--surface-0);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}


/* TYPOGRAPHY SYSTEM */

h1 {
    font-size: clamp(36px, 5vw, var(--text-6xl));
    letter-spacing: -0.02em;
    font-weight: 700;
    line-height: 1.1;
}

h2 {
    font-size: clamp(28px, 4vw, var(--text-4xl));
    letter-spacing: -0.01em;
    font-weight: 700;
    line-height: 1.2;
}

h3 {
    font-size: var(--text-2xl);
    font-weight: 600;
}

.text-body {
    font-size: var(--text-md);
    line-height: 1.7;
}

.text-muted {
    color: var(--text-secondary);
}

:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
    outline-offset: 2px;
}

[data-theme="dark"] {
    --surface-0: #0f172a;
    --surface-1: #111827;
    --surface-2: #1e293b;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --border-subtle: rgba(255,255,255,0.08);
}


