/* ═══════════════════════════════════════════
   MyPan Design System – Light Mode Warm
   ═══════════════════════════════════════════ */

:root {
    /* Primary - Warm Orange (Panificio) */
    --primary: #E8590C;
    --primary-light: #FB923C;
    --primary-lighter: #FED7AA;
    --primary-lightest: #FFF7ED;
    --primary-dark: #C2410C;
    --primary-darker: #9A3412;

    /* Secondary - Warm Brown */
    --secondary: #78350F;
    --secondary-light: #92400E;
    --secondary-lighter: #D6C4A8;

    /* Accent - Golden Yellow */
    --accent: #F59E0B;
    --accent-light: #FCD34D;
    --accent-lighter: #FEF3C7;

    /* Neutrals - Warm tones */
    --bg-page: #FFFBF5;
    --bg-surface: #FFFFFF;
    --bg-elevated: #FFFFFF;
    --bg-muted: #FDF6EE;
    --bg-hover: #FEF1E1;
    --border: #F0E4D4;
    --border-strong: #D6C4A8;
    --text-primary: #1C1917;
    --text-secondary: #78716C;
    --text-tertiary: #A8A29E;
    --text-inverse: #FFFFFF;

    /* Semantic */
    --success: #059669;
    --success-light: #D1FAE5;
    --success-dark: #047857;
    --warning: #D97706;
    --warning-light: #FEF3C7;
    --warning-dark: #B45309;
    --danger: #DC2626;
    --danger-light: #FEE2E2;
    --danger-dark: #B91C1C;
    --info: #0284C7;
    --info-light: #E0F2FE;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(120, 53, 15, 0.05);
    --shadow-md: 0 4px 12px rgba(120, 53, 15, 0.08);
    --shadow-lg: 0 8px 24px rgba(120, 53, 15, 0.12);
    --shadow-xl: 0 16px 48px rgba(120, 53, 15, 0.16);
    --shadow-glow: 0 0 20px rgba(232, 89, 12, 0.15);

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --text-xs: 0.75rem;
    --text-sm: 0.8125rem;
    --text-base: 0.9375rem;
    --text-lg: 1.125rem;
    --text-xl: 1.3125rem;
    --text-2xl: 1.625rem;
    --text-3xl: 2rem;
    --text-4xl: 2.5rem;

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

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;

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

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    color: var(--text-primary);
    background: var(--bg-page);
    line-height: 1.6;
    overflow-x: hidden;
}

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

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

/* ── Utilities ── */
.hidden { display: none !important; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: var(--sp-1); }
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); }
.gap-6 { gap: var(--sp-6); }
.gap-8 { gap: var(--sp-8); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-sm { font-size: var(--text-sm); }
.text-xs { font-size: var(--text-xs); }
.text-lg { font-size: var(--text-lg); }
.text-secondary { color: var(--text-secondary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-mono { font-family: var(--font-mono); }
.w-full { width: 100%; }
.mt-2 { margin-top: var(--sp-2); }
.mt-4 { margin-top: var(--sp-4); }
.mt-6 { margin-top: var(--sp-6); }
.mb-2 { margin-bottom: var(--sp-2); }
.mb-4 { margin-bottom: var(--sp-4); }
.mb-6 { margin-bottom: var(--sp-6); }
.p-4 { padding: var(--sp-4); }
.p-6 { padding: var(--sp-6); }
.ml-2 { margin-left: var(--sp-2); }
.mb-1 { margin-bottom: var(--sp-1); }
.mb-3 { margin-bottom: var(--sp-3); }
.mb-8 { margin-bottom: var(--sp-8); }
.flex-wrap { flex-wrap: wrap; }
.justify-end { justify-content: flex-end; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-6); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-6); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Animations ── */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
@keyframes countUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
@keyframes toastSlideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes toastSlideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

.animate-fade-in { animation: fadeIn var(--transition-base) ease-out; }
.animate-fade-in-up { animation: fadeInUp var(--transition-slow) ease-out; }
.animate-scale-in { animation: scaleIn var(--transition-base) ease-out; }

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, var(--bg-muted) 25%, var(--border) 50%, var(--bg-muted) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--text-tertiary); }
