/* ==========================================================================
   UNIVERSAL MASTERBATCH - ENTERPRISE DESIGN SYSTEM & STYLESHEET
   Industrial Technology + Color Science + Enterprise SaaS
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    /* ----------------------------------------------------------------------
       1. UNIVERSAL MASTERBATCH BRAND COLOR SYSTEM (Official Design Tokens)
       ---------------------------------------------------------------------- */
    /* Primary Brand Navy & Blues */
    --color-navy-deep: #071B3A;      /* Deep Universal Navy */
    --color-navy-secondary: #0D2A52; /* Secondary Navy */
    --color-primary: #2563EB;        /* Primary Brand Blue */
    --color-primary-bright: #3B82F6; /* Bright Technical Blue */
    --color-primary-dark: #1D4ED8;
    --color-primary-light: #DBEAFE;
    --color-primary-subtle: #EAF2FF; /* Light Blue */

    /* Neutrals & Surfaces */
    --color-white: #FFFFFF;
    --color-off-white: #F7F9FC;
    --color-surface: #FFFFFF;
    --color-surface-subtle: #F1F5F9;
    --color-background: #F7F9FC;
    --color-border: #D9E2EC;
    --color-border-subtle: #E2E8F0;

    /* Text Hierarchy */
    --color-text-primary: #0B1220;   /* Dark Text */
    --color-text-secondary: #526174; /* Secondary Text */
    --color-text-muted: #64748B;
    --color-text-light: #94A3B8;
    --color-text-inverse: #FFFFFF;

    /* Status Colors */
    --color-success: #16A34A;
    --color-success-bg: #DCFCE7;
    --color-warning: #F59E0B;        /* Accent / Warning Orange */
    --color-warning-bg: #FEF3C7;
    --color-danger: #DC2626;         /* Error Red */
    --color-danger-bg: #FEE2E2;
    --color-info: #0891B2;
    --color-info-bg: #CFFAFE;

    /* Strategic Controlled Color Spectrum */
    --spectrum-blue: #2563EB;
    --spectrum-cyan: #06B6D4;
    --spectrum-green: #16A34A;
    --spectrum-yellow: #F59E0B;
    --spectrum-red: #DC2626;
    --spectrum-purple: #7C3AED;
    --spectrum-magenta: #DB2777;

    /* Legacy Aliases for backwards compatibility */
    --color-navy-950: #071B3A;
    --color-navy-900: #071B3A;
    --color-navy-800: #0D2A52;
    --color-navy-700: #172554;
    --color-orange: #F59E0B;
    --color-orange-dark: #D97706;
    --color-cyan: #06B6D4;
    --color-indigo: #4F46E5;

    /* ----------------------------------------------------------------------
       2. RADIUS SYSTEM
       ---------------------------------------------------------------------- */
    --radius-sm: 6px;    /* Inputs, small badges, table controls */
    --radius-md: 8px;    /* Buttons, form inputs, dropdowns */
    --radius-lg: 12px;   /* Cards, panels, modals */
    --radius-xl: 16px;   /* Major hero sections only */
    --radius-full: 9999px;

    /* ----------------------------------------------------------------------
       3. SHADOW SYSTEM (Subtle, Crisp Elevation)
       ---------------------------------------------------------------------- */
    --shadow-xs: 0 1px 2px 0 rgba(7, 27, 58, 0.04);
    --shadow-sm: 0 1px 3px 0 rgba(7, 27, 58, 0.08), 0 1px 2px -1px rgba(7, 27, 58, 0.04);
    --shadow-md: 0 4px 20px -2px rgba(7, 27, 58, 0.06), 0 2px 6px -1px rgba(7, 27, 58, 0.03);
    --shadow-lg: 0 12px 30px -4px rgba(7, 27, 58, 0.10), 0 4px 12px -2px rgba(7, 27, 58, 0.05);

    /* ----------------------------------------------------------------------
       4. SPACING SYSTEM (8px Scale)
       ---------------------------------------------------------------------- */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-16: 64px;
    --space-20: 80px;

    /* ----------------------------------------------------------------------
       5. TRANSITIONS & TIMING
       ---------------------------------------------------------------------- */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
}

/* Bootstrap 4 has no gap utilities. These space button rows and flex groups. */
.gap-1 { gap: 8px !important; }
.gap-2 { gap: 12px !important; }
.gap-3 { gap: 16px !important; }
.gap-4 { gap: 24px !important; }

html {
    font-size: 15px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--color-text-primary);
    background-color: var(--color-background);
    line-height: 1.5;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', sans-serif;
    color: var(--color-text-primary);
    letter-spacing: -0.02em;
    margin-top: 0;
    margin-bottom: 0.5rem;
    line-height: 1.25;
}

h1 { font-size: 2.25rem; font-weight: 700; }
h2 { font-size: 1.75rem; font-weight: 700; }
h3 { font-size: 1.35rem; font-weight: 650; }
h4 { font-size: 1.15rem; font-weight: 600; }
h5 { font-size: 1.0rem; font-weight: 600; }
h6 { font-size: 0.875rem; font-weight: 600; }

p {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--color-text-secondary);
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover,
a:focus,
a:active {
    color: var(--color-primary-dark);
    text-decoration: none;
}

code, kbd, samp, pre, .font-monospace {
    font-family: 'JetBrains Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* ==========================================================================
   BUTTON SYSTEM
   ========================================================================== */
.btn-modern {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1;
    border-radius: var(--radius-md);
    padding: 0 16px;
    height: 38px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-fast);
    white-space: nowrap;
    user-select: none;
}

.btn-modern:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.btn-modern:disabled,
.btn-modern.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* Button Sizes */
.btn-modern-sm {
    height: 32px;
    padding: 0 12px;
    font-size: 0.8125rem;
    border-radius: var(--radius-sm);
    gap: 6px;
}

.btn-modern-lg {
    height: 46px;
    padding: 0 24px;
    font-size: 1rem;
    font-weight: 650;
    border-radius: var(--radius-md);
    gap: 10px;
}

/* Solid Primary Button */
.btn-modern-primary {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: #FFFFFF !important;
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.2);
}

.btn-modern-primary:hover {
    background-color: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    color: #FFFFFF !important;
}

.btn-modern-primary:active {
    background-color: #1E40AF;
}

/* Secondary Button */
.btn-modern-secondary,
.btn-modern-outline {
    background-color: var(--color-surface);
    border-color: var(--color-border-dark);
    color: var(--color-text-primary) !important;
    box-shadow: var(--shadow-xs);
}

.btn-modern-secondary:hover,
.btn-modern-outline:hover {
    background-color: var(--color-surface-subtle);
    border-color: #94A3B8;
    color: var(--color-text-primary) !important;
}

/* Accent / Orange Action Button */
.btn-modern-accent {
    background-color: var(--color-orange);
    border-color: var(--color-orange);
    color: #FFFFFF !important;
    box-shadow: 0 1px 2px rgba(245, 158, 11, 0.25);
}

.btn-modern-accent:hover {
    background-color: var(--color-orange-dark);
    border-color: var(--color-orange-dark);
    color: #FFFFFF !important;
}

/* Danger Button */
.btn-modern-danger {
    background-color: var(--color-danger);
    border-color: var(--color-danger);
    color: #FFFFFF !important;
}

.btn-modern-danger:hover {
    background-color: #B91C1C;
    border-color: #B91C1C;
    color: #FFFFFF !important;
}

/* Ghost Button */
.btn-modern-ghost {
    background-color: transparent;
    border-color: transparent;
    color: var(--color-text-secondary) !important;
}

.btn-modern-ghost:hover {
    background-color: var(--color-surface-subtle);
    color: var(--color-text-primary) !important;
}

/* ==========================================================================
   FORM CONTROLS & INPUTS
   ========================================================================== */
.form-control,
.admin-form-control,
.form-select-modern {
    display: block;
    width: 100%;
    height: 38px;
    padding: 6px 12px;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--color-text-primary);
    background-color: var(--color-surface);
    background-clip: padding-box;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus,
.admin-form-control:focus,
.form-select-modern:focus {
    border-color: var(--color-primary);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.list-search {
    position: relative;
}

.list-search > i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94A3B8;
    font-size: 13px;
    line-height: 1;
    pointer-events: none;
    z-index: 2;
}

.list-search .admin-form-control,
.list-search .form-control {
    height: 38px;
    padding-left: 36px;
}

.page-size-field {
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-size-field .select2.select2-container {
    flex: 1 1 auto;
    min-width: 72px;
    width: auto !important;
}

.list-filter-row .btn-modern {
    height: 38px;
}

.select2.select2-container {
    width: 100% !important;
}

.select2-container--default .select2-selection--single {
    height: 38px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background-color: #FFFFFF;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 36px;
    padding-left: 12px;
    padding-right: 28px;
    color: var(--color-text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px;
    right: 4px;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.select2-dropdown {
    border-color: var(--color-border);
    border-radius: var(--radius-sm);
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    overflow: hidden;
    z-index: 1060;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--color-primary);
}

.select2-search--dropdown .select2-search__field {
    height: 34px;
    padding: 4px 8px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    outline: none;
}

.form-control-lg {
    height: 44px;
    padding: 8px 14px;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
}

.form-control-sm {
    height: 32px;
    padding: 4px 8px;
    font-size: 0.8125rem;
    border-radius: var(--radius-sm);
}

textarea.form-control,
textarea.admin-form-control {
    height: auto;
    min-height: 80px;
}

.admin-form-group {
    margin-bottom: var(--space-4);
}

.admin-form-label,
label.font-weight-600 {
    display: inline-block;
    margin-bottom: 6px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-text-primary);
}

/* ==========================================================================
   STATUS BADGES & TAGS
   ========================================================================== */
.badge-modern {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
    border-radius: var(--radius-sm);
    text-transform: none;
    letter-spacing: 0;
    white-space: nowrap;
}

.badge-active,
.badge-modern-success {
    background-color: var(--color-success-bg);
    color: #15803D;
    border: 1px solid #BBF7D0;
}

.badge-inactive,
.badge-modern-neutral {
    background-color: #F1F5F9;
    color: #64748B;
    border: 1px solid #E2E8F0;
}

.badge-warning,
.badge-modern-warning {
    background-color: var(--color-warning-bg);
    color: #B45309;
    border: 1px solid #FDE68A;
}

.badge-danger,
.badge-modern-danger {
    background-color: var(--color-danger-bg);
    color: #B91C1C;
    border: 1px solid #FECACA;
}

.badge-info,
.badge-modern-info {
    background-color: var(--color-info-bg);
    color: #0E7490;
    border: 1px solid #A5F3FC;
}

.badge-spectrum {
    background-color: #EFF6FF;
    color: var(--color-primary);
    border: 1px solid #BFDBFE;
}

.badge-tag {
    background-color: #F8FAFC;
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
    font-size: 0.75rem;
    font-weight: 500;
    padding: 2px 7px;
}

/* ==========================================================================
   COLOR SWATCH COMPONENT
   ========================================================================== */
.swatch-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 3px 8px 3px 4px;
    background-color: #FFFFFF;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-primary);
    user-select: all;
}

.swatch-box {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    box-shadow: inset 0 0 1px rgba(0,0,0,0.2);
    flex-shrink: 0;
}

/* ==========================================================================
   PUBLIC LAYOUT & NAVIGATION
   ========================================================================== */
.pub-body {
    background-color: #F8FAFC;
    color: var(--color-text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.pub-navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: #F8FAFC;
    border-bottom: 1px solid #EEF2F6;
    box-shadow: none;
    transition: box-shadow var(--transition-normal);
}

.pub-navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.pub-topbar {
    background: #0B1F3A;
    color: #CBD5E1;
    font-size: 12px;
    line-height: 1.2;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.pub-topbar-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 6px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.pub-topbar-contacts {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.pub-topbar-contacts a,
.pub-topbar-contacts span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #CBD5E1;
    white-space: nowrap;
}

.pub-topbar-contacts i {
    color: #60A5FA;
    font-size: 11px;
}

.pub-topbar-badge {
    flex-shrink: 0;
    background: rgba(37, 99, 235, 0.2);
    color: #93C5FD;
    border: 1px solid rgba(37, 99, 235, 0.35);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    white-space: nowrap;
}

.pub-header-logo {
    height: 36px;
    width: auto;
    object-fit: contain;
    display: block;
}

.pub-nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-6);
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pub-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 750;
    color: var(--color-navy-900);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.pub-brand-logo-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background-color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-size: 1.1rem;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

.pub-brand span.highlight {
    color: var(--color-primary);
}

.pub-nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.pub-nav-item {
    position: relative;
}

.pub-nav-item.dropdown::after {
    content: "";
    position: absolute;
    left: 0;
    top: 100%;
    width: 100%;
    min-width: 300px;
    height: 14px;
}

.pub-nav-item.dropdown:has(.pub-dropdown-wide)::after {
    min-width: 700px;
}

.pub-nav-link {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.pub-nav-link:hover,
.pub-nav-link.active,
.pub-nav-item.show > .pub-nav-link {
    color: var(--color-primary);
    background-color: var(--color-primary-50);
}

.pub-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 280px;
    background: #FFFFFF;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-lg);
    padding: 6px;
    display: none;
    flex-direction: column;
    gap: 2px;
    z-index: 1050;
}

.pub-dropdown-wide {
    min-width: 680px;
    padding: 20px;
}

.pub-nav-item:hover .pub-dropdown-menu,
.pub-nav-item.show .pub-dropdown-menu {
    display: flex;
}

.pub-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--color-text-primary);
    text-decoration: none;
    transition: background-color var(--transition-fast);
}

.pub-dropdown-item:hover {
    background-color: var(--color-background);
    color: var(--color-primary);
}

.pub-dropdown-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: var(--color-primary-50);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.pub-dropdown-info {
    display: flex;
    flex-direction: column;
}

.pub-dropdown-title {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--color-text-primary);
}

.pub-dropdown-desc {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.pub-dropdown-divider {
    height: 1px;
    background-color: var(--color-border);
    margin: 4px 0;
}

.pub-nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pub-mobile-toggle {
    display: none;
    background: none;
    border: 1px solid var(--color-border);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
    color: var(--color-text-primary);
    cursor: pointer;
}

/* ==========================================================================
   PUBLIC HERO & MARKETING SECTIONS
   ========================================================================== */
.pub-hero-section {
    background-color: var(--color-navy-950);
    background-image: 
        radial-gradient(at 100% 0%, rgba(37, 99, 235, 0.18) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(6, 182, 212, 0.12) 0px, transparent 50%),
        linear-gradient(to bottom, var(--color-navy-950), #0D1B3E);
    color: #FFFFFF;
    padding: 64px 0 80px;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.pub-hero-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-6);
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 48px;
    align-items: center;
}

.pub-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-cyan);
    margin-bottom: var(--space-3);
}

.pub-hero-title {
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1.18;
    color: #FFFFFF;
    margin-bottom: var(--space-4);
    letter-spacing: -0.03em;
}

.pub-hero-title span.highlight {
    color: #60A5FA;
}

.pub-hero-desc {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #94A3B8;
    margin-bottom: var(--space-6);
    max-width: 580px;
}

.pub-hero-cta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: var(--space-8);
}

.pub-hero-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding-top: var(--space-6);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.pub-metric-item h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #FFFFFF;
    margin-bottom: 2px;
    font-family: 'JetBrains Mono', monospace;
}

.pub-metric-item p {
    font-size: 0.75rem;
    font-weight: 500;
    color: #94A3B8;
    margin-bottom: 0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Hero Interactive Palette Card */
.pub-hero-visual {
    background: #0F172A;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
    padding: 24px;
}

.pub-hero-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.pub-hero-swatch-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.pub-hero-swatch {
    height: 54px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
    display: flex;
    align-items: flex-end;
    padding: 4px 6px;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.pub-hero-swatch:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.pub-hero-swatch-code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.65);
    color: #FFFFFF;
    padding: 1px 4px;
    border-radius: 3px;
}

/* ==========================================================================
   COLOR MATCHER WORKBENCH
   ========================================================================== */
.matcher-workbench {
    background: #FFFFFF;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: var(--space-6);
    margin-bottom: var(--space-8);
}

.matcher-grid {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 32px;
}

.matcher-controls-box {
    background: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-5);
}

.matcher-preview-display {
    height: 120px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: flex-end;
    padding: 12px;
    margin-bottom: 16px;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.15);
    transition: background-color var(--transition-fast);
}

.matcher-preview-values {
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    padding: 4px 10px;
    border-radius: 4px;
    color: #FFFFFF;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8125rem;
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.matcher-tab-nav {
    display: flex;
    gap: 4px;
    background: #E2E8F0;
    padding: 3px;
    border-radius: var(--radius-sm);
    margin-bottom: 14px;
}

.matcher-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    padding: 5px 0;
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.matcher-tab-btn.active {
    background: #FFFFFF;
    color: var(--color-primary);
    box-shadow: var(--shadow-xs);
}

.color-slider-group {
    margin-bottom: 12px;
}

.color-slider-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    font-size: 0.8125rem;
    font-weight: 600;
}

.color-slider-input {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.color-slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #FFFFFF;
    border: 2px solid var(--color-text-primary);
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.matcher-results-box {
    display: flex;
    flex-direction: column;
}

.matcher-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--color-border);
}

.shade-match-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

/* Shade Match Result Card */
.shade-match-card {
    background: #FFFFFF;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.shade-match-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary-light);
}

.shade-card-swatch {
    height: 80px;
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.shade-match-score {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(4px);
    color: #FFFFFF;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
}

.shade-card-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.shade-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--color-text-primary);
}

.shade-card-meta {
    font-size: 0.775rem;
    color: var(--color-text-secondary);
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 10px;
}

.shade-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 12px;
}

/* ==========================================================================
   CATALOG PAGE & TOOLBAR
   ========================================================================== */
.catalog-toolbar {
    background: #FFFFFF;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.catalog-search-box {
    position: relative;
    flex: 1;
    min-width: 260px;
}

.catalog-search-box > i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94A3B8;
    font-size: 13px;
    pointer-events: none;
}

.catalog-search-box input {
    display: block;
    width: 100%;
    height: 38px;
    padding: 6px 12px 6px 36px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    outline: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    background: #FFFFFF;
}

.catalog-search-box input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.catalog-filter-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.catalog-filter-group .select2.select2-container {
    width: 220px !important;
    max-width: 100%;
}

/* ==========================================================================
   SECTION CONTAINERS & HEADERS
   ========================================================================== */
.section-padding {
    padding: 64px 0;
}

.section-header {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 48px;
}

.section-subtitle {
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-primary);
    margin-bottom: 8px;
    display: block;
}

.section-title {
    font-size: 2.0rem;
    font-weight: 750;
    color: var(--color-navy-900);
    margin-bottom: 12px;
}

.section-desc {
    font-size: 1.0rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
    gap: 24px;
}

.feature-card {
    background: #FFFFFF;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.feature-icon-box {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background-color: var(--color-primary-50);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 16px;
}

/* App Spotlight Banner */
.app-spotlight-section {
    background-color: var(--color-navy-900);
    border-radius: var(--radius-xl);
    padding: 48px;
    color: #FFFFFF;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    align-items: center;
    margin: 32px 0 64px;
}

.app-feature-list {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
}

.app-feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

/* ==========================================================================
   PUBLIC FOOTER
   ========================================================================== */
.pub-footer {
    background-color: #1E293B;
    color: #CBD5E1;
    padding-top: 28px;
    margin-top: auto;
    border-top: 1px solid #334155;
}

.pub-footer-logo {
    display: inline-flex;
    align-items: center;
    background: #FFFFFF;
    border-radius: 8px;
    padding: 4px 8px;
    margin-bottom: 10px;
    line-height: 0;
}

.pub-footer-logo img {
    height: 34px;
    width: auto;
    display: block;
}

.pub-footer-container {
    max-width: 1280px;
    margin: 0 auto 16px;
    padding: 0 var(--space-6);
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.2fr 1.2fr;
    gap: 24px;
}

.pub-footer-brand {
    font-size: 1.2rem;
    font-weight: 750;
    color: #FFFFFF;
    margin-bottom: 12px;
}

.pub-footer-col h4 {
    font-size: 0.875rem;
    font-weight: 700;
    color: #FFFFFF;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 16px;
}

.pub-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pub-footer-links li {
    margin-bottom: 4px;
}

.pub-footer-links a {
    color: #94A3B8;
    font-size: 0.875rem;
    transition: color var(--transition-fast);
}

.pub-footer-links a:hover {
    color: #FFFFFF;
}

.pub-footer-bottom {
    max-width: 1280px;
    margin: 8px auto 0;
    padding: 8px 24px 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 12px;
    line-height: 1.4;
    color: #CBD5E1;
}

.pub-footer-credit {
    color: #E2E8F0;
    font-weight: 600;
    white-space: nowrap;
}

.pub-footer-legal {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.pub-footer-legal a {
    color: #CBD5E1;
    white-space: nowrap;
}

/* ==========================================================================
   AUTHENTICATION LAYOUT & CARDS
   ========================================================================== */
.auth-page-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #F1F5F9;
    padding: 24px;
}

.auth-split-card {
    background: #FFFFFF;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: grid;
    grid-template-columns: 360px 420px;
    overflow: hidden;
    max-width: 820px;
    width: 100%;
}

.auth-brand-side {
    background-color: var(--color-navy-900);
    color: #FFFFFF;
    padding: 40px 32px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.auth-brand-logo-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.auth-brand-title {
    font-size: 1.15rem;
    font-weight: 750;
    color: #FFFFFF;
}

.auth-brand-subtitle {
    font-size: 0.75rem;
    color: #94A3B8;
}

.auth-brand-headline {
    font-size: 1.15rem;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 8px;
}

.auth-brand-desc {
    font-size: 0.84rem;
    color: #94A3B8;
    line-height: 1.5;
    margin-bottom: 20px;
}

.auth-brand-features {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-brand-feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    color: #CBD5E1;
}

.auth-brand-chips {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 24px;
}

.auth-chip {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: inline-block;
}

.auth-chip-caption {
    font-size: 0.7rem;
    color: #64748B;
    margin-left: 6px;
}

.auth-form-side {
    padding: 40px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-form-side-header h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.auth-form-side-header p {
    font-size: 0.84rem;
    color: var(--color-text-muted);
    margin-bottom: 20px;
}

.auth-form-group {
    margin-bottom: 16px;
}

.auth-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.auth-forgot-link {
    margin-left: auto;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-primary);
    white-space: nowrap;
}

.auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-icon {
    position: absolute;
    left: 12px;
    color: var(--color-text-muted);
    font-size: 0.95rem;
    pointer-events: none;
}

.auth-input-field {
    width: 100%;
    height: 40px;
    padding: 8px 12px 8px 36px;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.auth-input-field:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.auth-captcha-block {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.auth-captcha-img-wrap {
    background: #FFFFFF;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 2px 8px;
    height: 38px;
    display: flex;
    align-items: center;
}

.auth-captcha-reload {
    height: 38px;
    width: 38px;
    background: #F1F5F9;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-text-primary);
}

.auth-submit-btn {
    width: 100%;
    height: 42px;
    background-color: var(--color-primary);
    border: 1px solid var(--color-primary);
    border-radius: var(--radius-sm);
    color: #FFFFFF;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    margin-top: 12px;
    transition: background-color var(--transition-fast);
}

.auth-submit-btn:hover {
    background-color: var(--color-primary-dark);
}

/* ==========================================================================
   ADMIN PORTAL SHELL & SIDEBAR
   ========================================================================== */
.admin-shell {
    display: flex;
    min-height: 100vh;
    background-color: var(--color-background);
}

.admin-sidebar {
    width: 268px;
    background-color: #0F2744;
    color: #CBD5E1;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    border-right: 1px solid #1E3A5F;
    z-index: 1020;
    transition: width 0.2s ease, transform 0.2s ease;
}

.admin-sidebar-brand {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-decoration: none;
    flex-shrink: 0;
}

.admin-sidebar-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    max-width: 100%;
    background: #FFFFFF;
    border-radius: 8px;
    padding: 6px 10px;
    line-height: 0;
    box-sizing: border-box;
}

.admin-sidebar-logo-full {
    display: block;
    width: auto;
    height: 46px;
    max-width: 100%;
    object-fit: contain;
    object-position: center;
}

.admin-sidebar-logo-mark {
    display: none;
    height: 32px;
    width: 32px;
    object-fit: contain;
}

.admin-sidebar-brand:hover,
.admin-sidebar-brand:focus {
    color: #F8FAFC;
    text-decoration: none;
    outline: none;
}

.admin-brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #2563EB;
    color: #FFFFFF;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
    line-height: 1;
}

.admin-brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    min-width: 0;
    line-height: 1.15;
}

.admin-brand-title {
    font-size: 1rem;
    font-weight: 700;
    color: #F8FAFC;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.admin-brand-sub {
    font-size: 0.7rem;
    font-weight: 500;
    color: #94A3B8;
    white-space: nowrap;
}

.admin-avatar-circle {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    background-color: var(--color-primary);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.admin-sidebar-menu {
    padding: 10px 12px 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-menu-group {
    display: flex;
    flex-direction: column;
}

.admin-menu-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 10px;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: #E2E8F0;
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: left;
    cursor: pointer;
}

.admin-menu-toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.admin-menu-toggle-label i {
    width: 18px;
    text-align: center;
    color: #93C5FD;
    flex-shrink: 0;
}

.admin-menu-toggle:hover,
.admin-menu-group.open > .admin-menu-toggle {
    background: rgba(255, 255, 255, 0.06);
    color: #FFFFFF;
}

.admin-menu-caret {
    font-size: 0.7rem;
    color: #94A3B8;
    transition: transform var(--transition-fast);
}

.admin-menu-group.open > .admin-menu-toggle .admin-menu-caret {
    transform: rotate(180deg);
    color: #FFFFFF;
}

.admin-submenu {
    display: none;
    flex-direction: column;
    gap: 2px;
    margin: 4px 0 6px 12px;
    padding-left: 8px;
    border-left: 1px solid rgba(148, 163, 184, 0.28);
}

.admin-menu-group.open > .admin-submenu {
    display: flex;
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 36px;
    padding: 7px 10px;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.2;
    color: #E2E8F0;
    border-radius: var(--radius-sm);
    text-decoration: none;
}

.admin-nav-item span {
    min-width: 0;
    white-space: nowrap;
}

.admin-nav-item i {
    font-size: 0.9rem;
    width: 18px;
    line-height: 1;
    text-align: center;
    color: #94A3B8;
    flex-shrink: 0;
}

.admin-nav-item:hover {
    color: #FFFFFF;
    background-color: rgba(255, 255, 255, 0.05);
}

.admin-nav-item:hover i {
    color: #94A3B8;
}

.admin-nav-item.active {
    color: #FFFFFF;
    background-color: var(--color-primary);
    font-weight: 600;
}

.admin-nav-item.active i {
    color: #FFFFFF;
}

/* Admin Main Content & Topbar */
.admin-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.admin-topbar {
    height: 64px;
    background-color: #FFFFFF;
    border-bottom: 1px solid #DBEAFE;
    padding: 0;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.admin-topbar-main {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 18px;
    background: #FFFFFF;
}

.admin-topbar-aside {
    display: flex;
    align-items: center;
    padding: 0 16px;
    background: #EFF6FF;
    border-left: 1px solid #DBEAFE;
}

.admin-sidebar-toggle {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border: 1px solid #BFDBFE;
    border-radius: 8px;
    background: #EFF6FF;
    color: #1D4ED8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.admin-sidebar-toggle:hover {
    background: #DBEAFE;
}

.admin-topbar-heading {
    min-width: 0;
}

.admin-topbar-crumb {
    font-size: 0.72rem;
    font-weight: 600;
    color: #64748B;
    line-height: 1.2;
}

.admin-topbar-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #0F2744;
    margin: 0;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-shell.sidebar-collapsed .admin-sidebar {
    width: 76px;
}

.admin-shell.sidebar-collapsed .admin-sidebar-logo {
    width: 44px;
    padding: 4px;
}

.admin-shell.sidebar-collapsed .admin-sidebar-logo-full,
.admin-shell.sidebar-collapsed .admin-menu-toggle-label span,
.admin-shell.sidebar-collapsed .admin-menu-caret,
.admin-shell.sidebar-collapsed .admin-nav-item span {
    display: none;
}

.admin-shell.sidebar-collapsed .admin-sidebar-logo-mark {
    display: block;
}

.admin-shell.sidebar-collapsed .admin-menu-toggle,
.admin-shell.sidebar-collapsed .admin-nav-item {
    justify-content: center;
    padding-left: 8px;
    padding-right: 8px;
}

.admin-shell.sidebar-collapsed .admin-submenu {
    margin-left: 0;
    padding-left: 0;
    border-left: 0;
    align-items: center;
}

.admin-sidebar-backdrop {
    display: none;
}

.admin-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 24px;
    background: #F8FAFC;
    border-top: 1px solid #EEF2F6;
    color: #94A3B8;
    font-size: 0.8125rem;
}

.admin-topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-action-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    background: #FFFFFF;
    color: var(--color-text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.admin-action-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: var(--color-primary-50);
    text-decoration: none;
}

.admin-avatar-circle-sm {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
}

.admin-profile-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 40px;
    padding: 4px 10px 4px 4px;
    border: 1px solid #E8EEF4;
    border-radius: 999px;
    background: #FFFFFF;
    color: #334155;
    cursor: pointer;
}

.admin-profile-toggle:hover,
.admin-profile-toggle:focus {
    border-color: var(--color-primary);
    outline: none;
    text-decoration: none;
}

.admin-profile-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.15;
}

.admin-profile-meta strong {
    font-size: 0.82rem;
    font-weight: 700;
}

.admin-profile-meta small,
.admin-profile-dropdown-head small {
    color: var(--color-text-secondary);
    font-size: 0.7rem;
}

.admin-profile-caret {
    font-size: 0.65rem;
    color: var(--color-text-secondary);
}

.admin-profile-dropdown {
    min-width: 220px;
    padding: 6px 0;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

.admin-profile-dropdown-head {
    display: flex;
    flex-direction: column;
    padding: 8px 16px 10px;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 6px;
}

.admin-profile-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-navy-900);
}

.admin-profile-dropdown .dropdown-item:hover,
.admin-profile-dropdown .dropdown-item:focus {
    background: var(--color-primary-50);
    color: var(--color-primary-dark);
    text-decoration: none;
}

.admin-profile-dropdown .dropdown-item.text-danger:hover,
.admin-profile-dropdown .dropdown-item.text-danger:focus {
    color: #b91c1c;
    background: #fef2f2;
}

.admin-action-btn.delete:hover {
    border-color: var(--color-danger);
    color: var(--color-danger);
    background: var(--color-danger-bg);
}

.admin-content-body {
    padding: 24px;
    flex: 1;
}

/* ==========================================================================
   ADMIN CARDS, KPI GRIDS & DATA TABLES
   ========================================================================== */
.admin-card {
    background: #FFFFFF;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xs);
    padding: 20px;
    margin-bottom: 20px;
}

.admin-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--color-border);
}

.admin-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.admin-kpi-card {
    background: #FFFFFF;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xs);
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-kpi-info h3 {
    font-size: 1.4rem;
    font-weight: 750;
    margin-bottom: 2px;
    color: var(--color-navy-900);
}

.admin-kpi-info p {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0;
}

.admin-kpi-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
}

/* Enterprise Data Table */
.admin-table-wrapper {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: #FFFFFF;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
    text-align: left;
}

.admin-table thead {
    background-color: #F8FAFC;
    border-bottom: 1px solid var(--color-border);
}

.admin-table th {
    padding: 10px 14px;
    font-weight: 600;
    color: var(--color-text-secondary);
    white-space: nowrap;
}

.admin-table th a {
    color: var(--color-text-secondary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.admin-table th a:hover {
    color: var(--color-primary);
}

.admin-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text-primary);
    vertical-align: middle;
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

.admin-table tbody tr:hover {
    background-color: #F8FAFC;
}

/* Pagination */
.pagination-modern,
.pagination {
    display: flex;
    gap: 4px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination .page-item .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: #FFFFFF;
    color: var(--color-text-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.pagination .page-item.active .page-link {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: #FFFFFF;
    font-weight: 600;
}

.pagination .page-item .page-link:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.pagination .page-item.disabled .page-link {
    opacity: 0.5;
    pointer-events: none;
}

/* ==========================================================================
   MODAL & TOAST COMPONENT
   ========================================================================== */
.modal-content {
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-lg);
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border);
    background: #F8FAFC;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--color-border);
}

/* ==========================================================================
   RESPONSIVE OPTIMIZATION
   ========================================================================== */
body {
    overflow-x: hidden;
}
@media (max-width: 1024px) {
    .pub-hero-container {
        grid-template-columns: 1fr;
        gap: 36px;
    }
    .matcher-grid {
        grid-template-columns: 1fr;
    }
    .pub-footer-container {
        grid-template-columns: 1fr 1fr;
    }
    .app-spotlight-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 991.98px) {
    .admin-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: min(268px, 86vw);
        transform: translateX(-105%);
        z-index: 1040;
    }
    .admin-shell.sidebar-open .admin-sidebar,
    .admin-shell.sidebar-collapsed .admin-sidebar {
        width: min(268px, 86vw);
    }
    .admin-shell.sidebar-open .admin-sidebar {
        transform: translateX(0);
    }
    .admin-shell.sidebar-collapsed .admin-sidebar-logo-full,
    .admin-shell.sidebar-collapsed .admin-menu-toggle-label span,
    .admin-shell.sidebar-collapsed .admin-menu-caret,
    .admin-shell.sidebar-collapsed .admin-nav-item span {
        display: inline;
    }
    .admin-shell.sidebar-collapsed .admin-sidebar-logo-full {
        display: block;
    }
    .admin-shell.sidebar-collapsed .admin-sidebar-logo-mark {
        display: none;
    }
    .admin-shell.sidebar-collapsed .admin-sidebar-logo {
        width: 100%;
        padding: 4px 8px;
    }
    .admin-shell.sidebar-collapsed .admin-menu-toggle,
    .admin-shell.sidebar-collapsed .admin-nav-item {
        justify-content: flex-start;
        padding-left: 10px;
        padding-right: 10px;
    }
    .admin-shell.sidebar-collapsed .admin-submenu {
        margin-left: 12px;
        padding-left: 8px;
        border-left: 1px solid rgba(148, 163, 184, 0.28);
        align-items: stretch;
    }
    .admin-shell.sidebar-open .admin-sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.45);
        z-index: 1030;
    }
    .admin-topbar-aside {
        padding: 0 10px;
    }
}

@media (max-width: 1199.98px) {
    .pub-nav-container {
        height: auto;
        min-height: 56px;
        padding: 8px 16px;
        position: relative;
    }
    .pub-nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #FFFFFF;
        border-bottom: 1px solid var(--color-border);
        box-shadow: var(--shadow-lg);
        flex-direction: column;
        align-items: stretch;
        padding: 8px 12px 12px;
        gap: 2px;
        z-index: 1001;
        max-height: calc(100vh - 120px);
        overflow-y: auto;
    }
    .pub-nav-links.show {
        display: flex;
    }
    .pub-nav-item.dropdown::after {
        display: none;
    }
    .pub-nav-link {
        width: 100%;
        justify-content: space-between;
    }
    .pub-nav-links .pub-dropdown-menu,
    .pub-nav-links .pub-dropdown-wide {
        position: static;
        top: auto;
        left: auto;
        min-width: 0;
        width: 100%;
        box-shadow: none;
        border: 0;
        padding: 4px 8px 8px 16px;
        display: none;
    }
    .pub-nav-item.show > .pub-dropdown-menu {
        display: flex;
    }
    .pub-dropdown-wide .col-md-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .pub-mobile-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .pub-nav-actions .d-md-inline-flex,
    .pub-nav-actions .d-lg-inline-flex {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .auth-split-card {
        grid-template-columns: 1fr;
    }
    .auth-brand-side {
        display: none;
    }
    .pub-hero-section {
        padding: 36px 0 40px;
    }
    .pub-hero-title {
        font-size: 2rem !important;
    }
    .pub-hero-metrics,
    .pub-hero-swatch-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .pub-footer-container {
        grid-template-columns: 1fr;
    }
    .pub-footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .catalog-toolbar,
    .catalog-filter-group {
        align-items: stretch;
    }
    .catalog-filter-group .select2.select2-container {
        width: 100% !important;
    }
    .admin-content-body {
        padding: 12px;
    }
    .admin-card {
        padding: 14px;
    }
    .admin-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .admin-card-header > a,
    .admin-card-header > .btn-modern {
        width: 100%;
    }
    .admin-topbar {
        height: auto;
        min-height: 56px;
    }
    .admin-topbar-main {
        padding: 8px 10px;
        gap: 8px;
    }
    .admin-topbar-crumb {
        display: none;
    }
    .admin-topbar-title {
        font-size: 0.95rem;
        white-space: normal;
    }
    .admin-table {
        min-width: 680px;
    }
    .admin-footer {
        padding: 10px 12px;
        flex-direction: column;
        align-items: flex-start;
    }
    .list-filter-row [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .list-filter-row .text-right {
        text-align: left !important;
    }
    .app-spotlight-section {
        padding: 24px 16px;
        margin: 16px 0 32px;
    }
    .modal-dialog {
        margin: 12px;
    }
    img,
    svg,
    video {
        max-width: 100%;
    }
    .pub-header-logo,
    .pub-footer-logo img,
    .admin-sidebar-logo-mark {
        max-width: none;
    }
    .admin-sidebar-logo-full {
        width: auto;
        height: 46px;
        max-width: 100%;
    }
}

@media (max-width: 575.98px) {
    .pub-topbar-inner {
        padding: 6px 12px;
    }
    .pub-topbar-badge {
        display: none;
    }
    .pub-topbar-contacts {
        gap: 10px;
    }
    .pub-hero-metrics {
        gap: 12px !important;
    }
    .pub-footer-legal {
        gap: 8px 12px;
    }
    .pub-footer-legal a,
    .pub-footer-credit {
        white-space: normal;
    }
    .admin-profile-caret {
        display: none;
    }
    .admin-topbar-aside {
        padding: 0 8px;
    }
    .auth-page-wrapper {
        padding: 12px;
    }
}

a,
a:hover,
a:focus,
a:active,
a:visited {
    text-decoration: none !important;
}

.wishlist-toggle.is-saved,
.wishlist-toggle.is-saved i {
    color: #dc2626;
}

.global-loader {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100000;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.28);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

html.app-loading .global-loader {
    display: flex;
}

html.app-loading,
html.app-loading body {
    overflow: hidden;
}

.global-loader-glass {
    width: min(320px, 100%);
    padding: 28px 28px 22px;
    text-align: center;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    background: rgba(255, 255, 255, 0.62);
    box-shadow: 0 24px 60px rgba(7, 27, 58, 0.22);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}

.global-loader-logo-wrap {
    position: relative;
    width: 92px;
    height: 92px;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.9);
}

.global-loader-logo-wrap img {
    width: 64px;
    height: auto;
    position: relative;
    z-index: 1;
}

.global-loader-ring {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 3px solid rgba(37, 99, 235, 0.15);
    border-top-color: #2563eb;
    animation: global-loader-spin 0.9s linear infinite;
}

.global-loader-track {
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}

.global-loader-track span {
    display: block;
    height: 100%;
    width: 40%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2563eb, #06b6d4);
    animation: global-loader-progress 1.15s ease-in-out infinite;
}

.global-loader-label {
    margin: 14px 0 0;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #0f2744;
}

@keyframes global-loader-spin {
    to { transform: rotate(360deg); }
}

@keyframes global-loader-progress {
    0% { transform: translateX(-120%); }
    100% { transform: translateX(280%); }
}

/* ==========================================================================
   ICON WEIGHT GUARD
   Bootstrap's .small / .font-weight-normal / .font-weight-light set font-weight:400, which switches
   Font Awesome solid icons to the Regular style. Font Awesome Free Regular only contains a small
   subset of icons, so most icons (e.g. fa-phone) rendered as an empty box.
   ========================================================================== */
.fa.small, .fas.small, .fa-solid.small,
.fa.font-weight-normal, .fas.font-weight-normal, .fa-solid.font-weight-normal,
.fa.font-weight-light, .fas.font-weight-light, .fa-solid.font-weight-light {
    font-weight: 900 !important;
}

/* ==========================================================================
   LIST AVATARS (ColorMatching.Common.Avatar)
   ========================================================================== */
.list-identity {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.list-identity-text {
    min-width: 0;
    line-height: 1.25;
}
.list-identity-text strong {
    display: block;
    overflow-wrap: anywhere;
}
.list-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}
.list-avatar i {
    font-size: 0.85rem;
}

/* Top-level sidebar link (no submenu) */
.admin-nav-top {
    padding: 10px 10px;
    font-size: 0.84rem;
    font-weight: 600;
}
.admin-nav-top i {
    color: #93C5FD;
}
.admin-menu-section {
    padding: 14px 10px 4px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748B;
}
.admin-shell.sidebar-collapsed .admin-menu-section {
    display: none;
}


/* ==========================================================================
   SWEETALERT THEME (wwwroot/js/app-alerts.js)
   ========================================================================== */
.swal2-container { z-index: 2000; }
.swal2-container.swal2-backdrop-show { background: rgba(15, 23, 42, 0.45); }
.app-swal.swal2-popup {
    width: 26rem;
    max-width: calc(100vw - 32px);
    padding: 28px 28px 22px;
    border-radius: var(--radius-lg, 12px);
    font-family: 'Inter', system-ui, -apple-system, "Segoe UI", sans-serif;
    box-shadow: 0 24px 48px -12px rgba(15, 23, 42, 0.25);
}
.app-swal .swal2-icon.app-swal-icon {
    width: 56px;
    height: 56px;
    margin: 4px auto 14px;
    border-width: 3px;
}
.app-swal .swal2-icon.app-swal-icon .swal2-icon-content { font-size: 2.2rem; }
.app-swal .swal2-icon.swal2-success [class^='swal2-success-line'] { height: .3125em; }
.app-swal .swal2-icon.swal2-success .swal2-success-ring { width: 56px; height: 56px; top: -3px; left: -3px; }
.app-swal .swal2-icon.swal2-success [class^='swal2-success-line'][class$='tip'] { top: 1.6em; left: .55em; width: 1em; }
.app-swal .swal2-icon.swal2-success [class^='swal2-success-line'][class$='long'] { top: 1.35em; right: .35em; width: 1.9em; }
.app-swal .swal2-icon.swal2-success .swal2-success-fix,
.app-swal .swal2-icon.swal2-success [class^='swal2-success-circular-line'] { display: none; }
.app-swal-title.swal2-title {
    padding: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #0F172A;
}
.app-swal-text.swal2-html-container {
    margin: 8px 0 0;
    padding: 0;
    font-size: 0.9rem;
    line-height: 1.55;
    color: #475569;
}
.app-swal-actions.swal2-actions {
    margin: 22px 0 0;
    gap: 10px;
    width: 100%;
}
.app-swal-actions .btn-modern { min-width: 110px; justify-content: center; }
.app-swal-in { animation: app-swal-in .18s ease-out; }
.app-swal-out { animation: app-swal-out .12s ease-in forwards; }
@keyframes app-swal-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes app-swal-out { to { opacity: 0; transform: scale(.98); } }

/* Toasts (success) */
.app-swal-toast.swal2-popup.swal2-toast {
    padding: 12px 14px;
    border-radius: 10px;
    border-left: 4px solid var(--color-success, #16A34A);
    font-family: 'Inter', system-ui, -apple-system, "Segoe UI", sans-serif;
    box-shadow: 0 12px 28px -8px rgba(15, 23, 42, 0.28);
    max-width: 380px;
}
.app-swal-toast-title.swal2-title {
    font-size: 0.875rem !important;
    font-weight: 600;
    color: #0F172A;
    margin: 0 4px !important;
}
.app-swal-toast .swal2-timer-progress-bar { background: rgba(22, 163, 74, 0.45); }
.app-swal-toast-close.swal2-close { font-size: 1.4rem; color: #94A3B8; }

/* Never let select2 style SweetAlert's internal input */
.swal2-container .select2-container { display: none !important; }

/* ===================================================================
   Long text wrapping (all pages)
   Long values without spaces - request paths, IDs, hashes, user agents,
   emails, comma-separated lists - wrap inside their column instead of
   overflowing into the next column or off the card.
   - Detail lists (dl/dd), alerts, card text: may break anywhere.
   - Table cells: break only when a word cannot fit, so columns are never
     squeezed to one character (the table wrapper scrolls horizontally).
   =================================================================== */
body {
    overflow-wrap: break-word;
}
dd,
.admin-card p,
.card-body,
.alert,
.text-break {
    overflow-wrap: anywhere;
    word-break: normal;
    min-width: 0;
}
td {
    overflow-wrap: break-word;
    word-break: normal;
}
dd .font-monospace,
dd.font-monospace,
dd code,
.text-break.font-monospace {
    word-break: break-all;
}
/* Grid columns may shrink below their content width so text can wrap. */
.row > [class*="col-"],
.list-identity > * {
    min-width: 0;
}
/* File names / identities in tables keep a readable minimum width. */
.admin-table .list-identity {
    min-width: 200px;
}
.admin-table .list-identity-text {
    overflow-wrap: anywhere;
}
/* Tag badges in tables and detail lists (applications, actions) may wrap; status badges stay on one line. */
.admin-table td .badge-tag,
dd .badge-tag,
dd .badge-info {
    white-space: normal;
    text-align: left;
    line-height: 1.35;
}
.text-truncate {
    overflow-wrap: normal;
    word-break: normal;
}

/* Filter bars: dropdown lists are never narrower than their options. */
.select2-container--open .select2-dropdown {
    min-width: 170px;
}
.list-filter-row .select2-selection__rendered {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
