/* ========================================
   MAIN THEME - COLOR SYSTEM
   Light & Dark Theme Support
   Lemonade-Inspired Hot Pink + Neutral Palette
   ======================================== */

/* Light Theme (Default) — Lemonade Pink */
:root,
[data-theme="light"] {
    /* Background Colors — Clean whites, warm neutrals */
    --bg-primary: #ffffff;
    --bg-secondary: #f7f7f7;
    --bg-tertiary: #f3f3f3;
    --surface: #ffffff;
    --surface-warm: #FFF7FB;
    --surface-elevated: #ffffff;
    --surface-inset: #f7f7f7;

    /* Border Colors — Soft greys */
    --border-primary: #ececec;
    --border-secondary: #d8d8d8;

    /* Text Colors — Lemonade neutral scale */
    --text-primary: #262626;
    --text-secondary: #4a4a4a;
    --text-tertiary: #525252;
    --text-body: #4a4a4a;
    --text-muted: #9b9b9b;
    --text-disabled: #b7b7b7;

    /* Accent Colors — Hot Pink */
    --accent-primary: #ff0083;
    --accent-secondary: #dc0073;
    --accent-tertiary: #b40060;
    --accent-light: rgba(255, 0, 131, 0.08);
    --accent-dim: rgba(255, 0, 131, 0.04);

    /* On-Accent */
    --on-accent: #ffffff;

    /* Signal Color */
    --signal: #FFB01C;

    /* Status Colors — Lemonade palette */
    --success: #2AD5BD;
    --success-light: rgba(42, 213, 189, 0.08);
    --error: #F7274A;
    --error-light: rgba(247, 39, 74, 0.08);
    --warning: #FFB01C;
    --warning-light: rgba(255, 176, 28, 0.08);
    --info: #2A76E4;
    --info-light: rgba(42, 118, 228, 0.08);

    /* Shadow Colors */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.12);
    --shadow-accent-sm: 0 2px 8px rgba(255, 0, 131, 0.15);
    --shadow-accent-md: 0 4px 16px rgba(255, 0, 131, 0.20);

    /* Overlay Colors */
    --overlay-light: rgba(255, 255, 255, 0.92);
    --overlay-dark: rgba(0, 0, 0, 0.32);
    --overlay-backdrop: rgba(0, 0, 0, 0.32);

    /* Interactive States */
    --hover-bg: rgba(0, 0, 0, 0.03);
    --active-bg: rgba(0, 0, 0, 0.06);
    --focus-ring: rgba(255, 0, 131, 0.2);

    /* Glow Effects */
    --glow-subtle: rgba(255, 0, 131, 0.03);

    color-scheme: light;
}

/* Dark Theme — Lemonade Dark */
[data-theme="dark"] {
    /* Background Colors — Layered black with clear separation */
    --bg-primary: #0e0e0e;
    --bg-secondary: #141414;
    --bg-tertiary: #1e1e1e;
    --surface: #1a1a1a;
    --surface-warm: #1a1218;
    --surface-elevated: #242424;
    --surface-inset: #111111;

    /* Border Colors — Visible but subtle */
    --border-primary: #2a2a2a;
    --border-secondary: #3d3d3d;

    /* Text Colors — Higher contrast for readability */
    --text-primary: #f5f5f5;
    --text-secondary: #e0e0e0;
    --text-tertiary: #b0b0b0;
    --text-body: #e0e0e0;
    --text-muted: #8a8a8a;
    --text-disabled: #555555;

    /* Accent Colors — Vibrant pink stays bold in dark mode */
    --accent-primary: #ff0083;
    --accent-secondary: #ff4da6;
    --accent-tertiary: #dc0073;
    --accent-light: rgba(255, 0, 131, 0.14);
    --accent-dim: rgba(255, 0, 131, 0.07);

    /* On-Accent */
    --on-accent: #ffffff;

    /* Signal Color */
    --signal: #FFB01C;

    /* Status Colors — Brighter for dark backgrounds */
    --success: #2AD5BD;
    --success-light: rgba(42, 213, 189, 0.15);
    --error: #F83157;
    --error-light: rgba(248, 49, 87, 0.15);
    --warning: #FFE071;
    --warning-light: rgba(255, 224, 113, 0.15);
    --info: #4a90e2;
    --info-light: rgba(74, 144, 226, 0.15);

    /* Shadow Colors — Dark elevation with pink edge glow */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.03);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.04);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.7);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.8);
    --shadow-accent-sm: 0 2px 8px rgba(255, 0, 131, 0.25);
    --shadow-accent-md: 0 4px 16px rgba(255, 0, 131, 0.3);

    /* Overlay Colors */
    --overlay-light: rgba(14, 14, 14, 0.88);
    --overlay-dark: rgba(0, 0, 0, 0.7);
    --overlay-backdrop: rgba(0, 0, 0, 0.6);

    /* Interactive States */
    --hover-bg: rgba(255, 255, 255, 0.06);
    --active-bg: rgba(255, 255, 255, 0.10);
    --focus-ring: rgba(255, 0, 131, 0.3);

    /* Glow Effects */
    --glow-subtle: rgba(255, 0, 131, 0.04);

    color-scheme: dark;
}

/* ========================================
   TYPOGRAPHY SYSTEM
   ======================================== */

:root {
    /* Font Families — Lato primary, Inter/Manrope fallback */
    --font-serif: 'Inter', sans-serif;
    --font-sans: 'Lato', 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'Lato', 'Segoe UI', 'Helvetica Neue', sans-serif;
    --font-numeric: 'Lato', 'Segoe UI', 'Helvetica Neue', sans-serif;

    /* Font Sizes */
    --text-xs: 0.65rem;      /* 10.4px */
    --text-sm: 0.75rem;      /* 12px */
    --text-base: 0.875rem;   /* 14px */
    --text-lg: 1rem;         /* 16px */
    --text-xl: 1.125rem;     /* 18px */
    --text-2xl: 1.5rem;      /* 24px */
    --text-3xl: 2rem;        /* 32px */
    --text-4xl: 2.5rem;      /* 40px */
    --text-5xl: 3rem;        /* 48px */

    /* Font Weights - Bolder for Better Readability */
    --font-light: 400;
    --font-regular: 500;
    --font-medium: 600;
    --font-semibold: 600;
    --font-bold: 700;
    --font-extrabold: 800;

    /* Line Heights */
    --leading-none: 1;
    --leading-tight: 1.1;
    --leading-snug: 1.3;
    --leading-normal: 1.5;
    --leading-relaxed: 1.7;
    --leading-loose: 1.85;

    /* Letter Spacing */
    --tracking-tight: -0.02em;
    --tracking-normal: 0;
    --tracking-wide: 0.02em;
    --tracking-wider: 0.08em;
    --tracking-widest: 0.15em;
}

/* ========================================
   SPACING SYSTEM - Compact
   ======================================== */

:root {
    --space-xs: 0.25rem;     /* 4px */
    --space-sm: 0.5rem;      /* 8px */
    --space-md: 0.75rem;     /* 12px */
    --space-lg: 1rem;        /* 16px */
    --space-xl: 1.5rem;      /* 24px */
    --space-2xl: 2rem;       /* 32px */
    --space-3xl: 3rem;       /* 48px */
    --space-4xl: 4rem;       /* 64px */
}

/* ========================================
   BORDER RADIUS SYSTEM
   ======================================== */

:root {
    --radius-none: 0;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 28px;
    --radius-2xl: 32px;
    --radius-full: 9999px;
}

/* ========================================
   Z-INDEX SYSTEM
   ======================================== */

:root {
    --z-base: 1;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 9998;
    --z-modal: 9999;
    --z-toast: 10000;
    --z-tooltip: 10001;
}

/* ========================================
   TRANSITION SYSTEM
   ======================================== */

:root {
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slower: 500ms cubic-bezier(0.4, 0, 0.2, 1);

    --ease-in: cubic-bezier(0.4, 0, 1, 1);
    --ease-out: cubic-bezier(0, 0, 0.2, 1);
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   THEME SWAP ANIMATION
   ======================================== */

html.theme-transition,
html.theme-transition *,
html.theme-transition *::before,
html.theme-transition *::after {
    transition: background .35s, color .35s, border-color .35s, box-shadow .3s, fill .3s, stroke .3s !important;
}

/* ========================================
   GLOBAL RESET & BASE STYLES
   ======================================== */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-body);
    font-weight: var(--font-regular);
    line-height: var(--leading-relaxed);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Clean M3 surface — no noise overlay */

/* Selection Styles */
::selection {
    background: var(--accent-light);
    color: var(--text-primary);
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-secondary);
    border-radius: var(--radius-md);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Links */
a {
    color: inherit;
    text-decoration: none;
}

/* Focus Visible */
:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* Disabled Elements */
[disabled],
.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ========================================
   BREADCRUMB NAVIGATION — Dark header strip
   Extends from the main header visually
   ======================================== */

.breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 8px 24px;
    margin: 0;
    background: #1a1a1a;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0;
    font-size: 12px;
    font-weight: 500;
    box-shadow: none;
    position: static;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #7b7b7b;
}

.breadcrumb-item a {
    color: #7b7b7b;
    transition: color 0.15s ease;
}

.breadcrumb-item a:hover {
    color: #ff0083;
}

.breadcrumb-item.active {
    color: #d8d8d8;
    font-weight: 600;
}

.breadcrumb-item i {
    font-size: 11px;
    color: #ff0083;
}

.breadcrumb-separator {
    color: #3d3d3d;
    font-size: 9px;
}

.breadcrumb-separator i {
    color: #3d3d3d;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

/* Text Utilities */
.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }
.text-2xl { font-size: var(--text-2xl); }
.text-3xl { font-size: var(--text-3xl); }

.font-light { font-weight: var(--font-light); }
.font-regular { font-weight: var(--font-regular); }
.font-medium { font-weight: var(--font-medium); }
.font-semibold { font-weight: var(--font-semibold); }
.font-bold { font-weight: var(--font-bold); }

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-disabled { color: var(--text-disabled); }

.uppercase { text-transform: uppercase; }
.lowercase { text-transform: lowercase; }
.capitalize { text-transform: capitalize; }

/* Display Utilities */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.inline-grid { display: inline-grid; }
.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }

/* Flex Utilities */
.flex-row { flex-direction: row; }
.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; }
.flex-1 { flex: 1; }
.flex-wrap { flex-wrap: wrap; }

/* Gap Utilities */
.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); }

/* Shadow Utilities */
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }
.shadow-none { box-shadow: none; }

/* Border Utilities */
.border { border: 1px solid var(--border-primary); }
.border-t { border-top: 1px solid var(--border-primary); }
.border-b { border-bottom: 1px solid var(--border-primary); }
.border-l { border-left: 1px solid var(--border-primary); }
.border-r { border-right: 1px solid var(--border-primary); }

/* Rounded Utilities */
.rounded-none { border-radius: var(--radius-none); }
.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: var(--radius-full); }

/* Transitions */
.transition { transition: all var(--transition-base); }
.transition-fast { transition: all var(--transition-fast); }
.transition-slow { transition: all var(--transition-slow); }

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.animate-fadeIn { animation: fadeIn var(--transition-base) ease-out; }
.animate-slideUp { animation: slideUp var(--transition-slow) ease-out; }
.animate-slideDown { animation: slideDown var(--transition-slow) ease-out; }
.animate-spin { animation: spin 1s linear infinite; }
.animate-pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }

/* ========================================
   GLOBAL: Center all Syncfusion Dialogs
   ======================================== */
.e-dialog.e-dlg-modal {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
}

.e-dlg-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
}
