/* Base Styles */
:root {
    --scx-primary: #4a5568;
    --scx-primary-dark: #2d3748;
    --scx-accent: #e53e3e;
    --scx-accent-light: #fc8181;
    --scx-gold: #d69e2e;
    --scx-teal: #319795;
    --scx-purple: #805ad5;
    --scx-blue: #4299e1;
    --scx-gradient: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
}

html, body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    scroll-behavior: smooth;
}

/* Typography */
.display-hero {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.lead-xl {
    font-size: 1.35rem;
    font-weight: 400;
    line-height: 1.6;
    opacity: 0.9;
}

/* Buttons */
a, .btn-link {
    color: var(--scx-blue);
}

.btn-primary {
    background: var(--scx-accent);
    border-color: var(--scx-accent);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: #c53030;
    border-color: #c53030;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(229, 62, 62, 0.4);
}

.btn-outline-light {
    border-width: 2px;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.btn-outline-light:hover {
    transform: translateY(-2px);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--scx-blue);
}

/* Hero Section */
.hero-section {
    background: var(--scx-gradient);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
}

/* Feature Cards */
.feature-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    height: 100%;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: transparent;
}

.feature-icon {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}

.feature-icon.red { background: linear-gradient(135deg, #e53e3e, #c53030); color: white; }
.feature-icon.gold { background: linear-gradient(135deg, #d69e2e, #b7791f); color: white; }
.feature-icon.teal { background: linear-gradient(135deg, #319795, #2c7a7b); color: white; }
.feature-icon.purple { background: linear-gradient(135deg, #805ad5, #6b46c1); color: white; }
.feature-icon.blue { background: linear-gradient(135deg, #4299e1, #3182ce); color: white; }
.feature-icon.gray { background: linear-gradient(135deg, #4a5568, #2d3748); color: white; }
.feature-icon.green { background: linear-gradient(135deg, #48bb78, #38a169); color: white; }

/* Step Cards */
.step-card {
    text-align: center;
    padding: 2rem 1.5rem;
}

.step-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--scx-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    margin: 0 auto 1.5rem;
}

/* Protocol Badge */
.protocol-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0.25rem;
}

.protocol-badge.rest { background: #ebf8ff; color: #2b6cb0; }
.protocol-badge.cxml { background: #faf5ff; color: #6b46c1; }
.protocol-badge.oci { background: #f0fff4; color: #276749; }

/* Code Block */
.code-block {
    background: #1a202c;
    border-radius: 12px;
    padding: 1.5rem;
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
    font-size: 0.9rem;
    overflow-x: auto;
    border: 1px solid #2d3748;
}

.code-block code {
    color: #e2e8f0;
}

.code-block .comment { color: #718096; }
.code-block .string { color: #68d391; }
.code-block .keyword { color: #fc8181; }
.code-block .number { color: #f6ad55; }

/* Stats Section */
.stat-item {
    text-align: center;
    padding: 1.5rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--scx-accent), var(--scx-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 1rem;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.5rem;
}

/* Section Styles */
.section-dark {
    background: var(--scx-gradient);
    color: white;
}

.section-light {
    background: #f7fafc;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: #718096;
    max-width: 600px;
    margin: 0 auto;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

/* Navbar Updates */
.navbar-public {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.navbar-public .nav-link {
    font-weight: 500;
    color: #4a5568;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.navbar-public .nav-link:hover {
    color: var(--scx-accent);
    background: #f7fafc;
}

/* Footer Updates */
.footer-dark {
    background: #1a202c;
}

.footer-dark a {
    color: #a0aec0;
    transition: color 0.2s ease;
}

.footer-dark a:hover {
    color: white;
}

/* Validation Styles */
.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Logo Animation */
.logo-spin {
    animation: subtle-pulse 3s ease-in-out infinite;
}

@keyframes subtle-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, var(--scx-accent), var(--scx-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glass Effect */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
}

/* =============================================================================
   SCX PORTAL & ADMIN DESIGN SYSTEM
   Clean, minimal aesthetic inspired by Linear/Stripe/Vercel
   ============================================================================= */

/* -----------------------------------------------------------------------------
   Design Tokens
   ----------------------------------------------------------------------------- */
:root {
    /* Neutral Scale (cool grays) */
    --scx-gray-50: #fafafa;
    --scx-gray-100: #f4f4f5;
    --scx-gray-200: #e4e4e7;
    --scx-gray-300: #d4d4d8;
    --scx-gray-400: #a1a1aa;
    --scx-gray-500: #71717a;
    --scx-gray-600: #52525b;
    --scx-gray-700: #3f3f46;
    --scx-gray-800: #27272a;
    --scx-gray-900: #18181b;
    --scx-gray-950: #09090b;

    /* Primary (modern blue) */
    --scx-primary-50: #eff6ff;
    --scx-primary-100: #dbeafe;
    --scx-primary-200: #bfdbfe;
    --scx-primary-500: #4680ff;
    --scx-primary-600: #3b6bdf;
    --scx-primary-700: #2e52b2;

    /* Semantic Colors */
    --scx-success: #2ca87f;
    --scx-success-light: #e9f7f2;
    --scx-warning: #e58a00;
    --scx-warning-light: #fff5e6;
    --scx-danger: #dc2626;
    --scx-danger-light: #fef2f2;
    --scx-info: #3ec9d6;
    --scx-info-light: #ecfeff;

    /* Sidebar Colors (Dark Theme) */
    --scx-sidebar-bg: #1c2536;
    --scx-sidebar-text: #9fadbc;
    --scx-sidebar-text-active: #ffffff;
    --scx-sidebar-hover: rgba(255, 255, 255, 0.05);
    --scx-sidebar-active: rgba(70, 128, 255, 0.2);

    /* Typography */
    --scx-font-sans: 'Inter', 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --scx-font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

    --scx-text-xs: 0.75rem;
    --scx-text-sm: 0.8125rem;
    --scx-text-base: 0.875rem;
    --scx-text-md: 1rem;
    --scx-text-lg: 1.125rem;
    --scx-text-xl: 1.25rem;
    --scx-text-2xl: 1.5rem;
    --scx-text-3xl: 2rem;

    /* Spacing */
    --scx-space-1: 0.25rem;
    --scx-space-2: 0.5rem;
    --scx-space-3: 0.75rem;
    --scx-space-4: 1rem;
    --scx-space-5: 1.25rem;
    --scx-space-6: 1.5rem;
    --scx-space-8: 2rem;
    --scx-space-10: 2.5rem;
    --scx-space-12: 3rem;

    /* Border Radius */
    --scx-radius-sm: 4px;
    --scx-radius-md: 8px;
    --scx-radius-lg: 10px;
    --scx-radius-xl: 12px;
    --scx-radius-2xl: 16px;
    --scx-radius-full: 9999px;

    /* Borders */
    --scx-border-color: #e6ebf1;
    --scx-border-hover: #d1d9e6;

    /* Shadows - Softer, more modern */
    --scx-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.03);
    --scx-shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.04);
    --scx-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --scx-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08);
    --scx-shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.12);
    --scx-shadow-card: 0 2px 6px 0 rgba(0, 0, 0, 0.04);

    /* Transitions */
    --scx-transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --scx-transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --scx-transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Layout */
    --scx-sidebar-width: 260px;
    --scx-header-height: 70px;
}

/* -----------------------------------------------------------------------------
   Sidebar - Dark Theme (AblePro Style)
   ----------------------------------------------------------------------------- */
.scx-sidebar {
    width: var(--scx-sidebar-width);
    min-height: 100vh;
    background: var(--scx-sidebar-bg);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
}

.scx-sidebar-header {
    padding: var(--scx-space-5) var(--scx-space-6);
    display: flex;
    align-items: center;
    gap: var(--scx-space-3);
    min-height: var(--scx-header-height);
}

.scx-sidebar-logo {
    width: 32px;
    height: 32px;
    border-radius: var(--scx-radius-md);
}

.scx-sidebar-title {
    font-size: var(--scx-text-lg);
    font-weight: 700;
    color: var(--scx-sidebar-text-active);
    margin: 0;
    letter-spacing: -0.02em;
}

.scx-sidebar-nav {
    flex: 1;
    padding: var(--scx-space-4) var(--scx-space-4);
    overflow-y: auto;
}

.scx-nav-section {
    margin-bottom: var(--scx-space-6);
}

.scx-nav-section-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--scx-sidebar-text);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: var(--scx-space-2) var(--scx-space-4);
    margin-bottom: var(--scx-space-2);
    opacity: 0.6;
}

.scx-nav-item {
    display: flex;
    align-items: center;
    gap: var(--scx-space-3);
    padding: var(--scx-space-3) var(--scx-space-4);
    border-radius: var(--scx-radius-lg);
    color: var(--scx-sidebar-text);
    font-size: var(--scx-text-sm);
    font-weight: 500;
    text-decoration: none;
    transition: all var(--scx-transition-fast);
    margin-bottom: 4px;
}

.scx-nav-item:hover {
    background: var(--scx-sidebar-hover);
    color: var(--scx-sidebar-text-active);
    text-decoration: none;
}

.scx-nav-item.active {
    background: var(--scx-sidebar-active);
    color: var(--scx-sidebar-text-active);
}

.scx-nav-item i {
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
    opacity: 0.8;
}

.scx-nav-item:hover i,
.scx-nav-item.active i {
    opacity: 1;
}

.scx-nav-item--highlight {
    background: linear-gradient(135deg, var(--scx-primary), #6366f1);
    color: white !important;
    font-weight: 600;
}

.scx-nav-item--highlight:hover {
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    color: white !important;
}

.scx-nav-item--highlight i {
    opacity: 1;
}

.scx-sidebar-footer {
    padding: var(--scx-space-4);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Admin Badge */
.scx-admin-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--scx-space-1);
    padding: 4px 10px;
    background: rgba(229, 138, 0, 0.2);
    color: #ffb84d;
    font-size: 11px;
    font-weight: 600;
    border-radius: var(--scx-radius-full);
}

/* -----------------------------------------------------------------------------
   Main Content Area
   ----------------------------------------------------------------------------- */
.scx-main {
    margin-left: var(--scx-sidebar-width);
    width: calc(100% - var(--scx-sidebar-width));
    min-height: 100vh;
    background: var(--scx-gray-50);
    display: flex;
    flex-direction: column;
}

/* Hide Blazor error UI by default */
#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0.75rem 1.25rem;
    background: #dc3545;
    color: white;
    text-align: center;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    margin-left: 1rem;
}

.scx-header {
    height: var(--scx-header-height);
    padding: 0 var(--scx-space-8);
    border-bottom: 1px solid var(--scx-border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--scx-space-4);
    background: white;
    position: sticky;
    top: 0;
    z-index: 50;
    flex-shrink: 0;
}

.scx-header-left {
    display: flex;
    align-items: center;
    gap: var(--scx-space-4);
}

.scx-header-right {
    display: flex;
    align-items: center;
    gap: var(--scx-space-4);
}

.scx-header-user {
    display: flex;
    align-items: center;
    gap: var(--scx-space-3);
    font-size: var(--scx-text-sm);
    color: var(--scx-gray-600);
    padding: var(--scx-space-2) var(--scx-space-3);
    border-radius: var(--scx-radius-lg);
    transition: all var(--scx-transition-fast);
}

.scx-header-user:hover {
    background: var(--scx-gray-50);
}

.scx-header-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--scx-radius-lg);
    color: var(--scx-gray-500);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all var(--scx-transition-fast);
}

.scx-header-icon-btn:hover {
    background: var(--scx-gray-100);
    color: var(--scx-gray-700);
}

.scx-header-icon-btn i {
    font-size: 1.25rem;
}

.scx-content {
    flex: 1;
    padding: var(--scx-space-8);
    background: var(--scx-gray-50);
}

/* -----------------------------------------------------------------------------
   Page Header
   ----------------------------------------------------------------------------- */
.scx-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--scx-space-6);
}

.scx-page-title {
    font-size: var(--scx-text-2xl);
    font-weight: 700;
    color: var(--scx-gray-900);
    margin: 0;
}

.scx-page-description {
    font-size: var(--scx-text-sm);
    color: var(--scx-gray-500);
    margin-top: var(--scx-space-1);
}

/* -----------------------------------------------------------------------------
   Cards
   ----------------------------------------------------------------------------- */
.scx-card {
    background: white;
    border: 1px solid var(--scx-border-color);
    border-radius: var(--scx-radius-xl);
    box-shadow: var(--scx-shadow-sm);
    overflow: hidden;
}

.scx-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--scx-space-4) var(--scx-space-6);
    border-bottom: 1px solid var(--scx-border-color);
    background: white;
}

.scx-card-title {
    font-size: var(--scx-text-base);
    font-weight: 600;
    color: var(--scx-gray-900);
    margin: 0;
}

.scx-card-body {
    padding: var(--scx-space-6);
}

.scx-card-body--flush {
    padding: 0;
}

.scx-card-footer {
    padding: var(--scx-space-4) var(--scx-space-6);
    border-top: 1px solid var(--scx-border-color);
    background: var(--scx-gray-50);
}

/* Stat Cards - AblePro Style with Gradients */
.scx-stat-card {
    background: white;
    border-radius: var(--scx-radius-xl);
    padding: var(--scx-space-5);
    box-shadow: var(--scx-shadow-card);
    transition: all var(--scx-transition-base);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    border: none;
    position: relative;
    overflow: hidden;
}

.scx-stat-card:hover {
    box-shadow: var(--scx-shadow-lg);
    transform: translateY(-2px);
}

.scx-stat-content {
    flex: 1;
}

.scx-stat-label {
    font-size: var(--scx-text-sm);
    font-weight: 500;
    color: var(--scx-gray-600);
    margin-bottom: var(--scx-space-2);
}

.scx-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--scx-gray-900);
    line-height: 1.2;
    margin-bottom: var(--scx-space-1);
}

.scx-stat-change {
    font-size: var(--scx-text-xs);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: var(--scx-space-1);
}

.scx-stat-change--up {
    color: var(--scx-success);
}

.scx-stat-change--down {
    color: var(--scx-danger);
}

.scx-stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--scx-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.scx-stat-icon i {
    font-size: 1.5rem;
    line-height: 1;
    color: white;
}

/* Gradient Icon Backgrounds - AblePro Style */
.scx-stat-icon--blue {
    background: linear-gradient(135deg, #4680ff 0%, #6ca0ff 100%);
    box-shadow: 0 4px 12px rgba(70, 128, 255, 0.35);
}

.scx-stat-icon--green {
    background: linear-gradient(135deg, #2ca87f 0%, #5ed5a8 100%);
    box-shadow: 0 4px 12px rgba(44, 168, 127, 0.35);
}

.scx-stat-icon--amber {
    background: linear-gradient(135deg, #e58a00 0%, #ffb84d 100%);
    box-shadow: 0 4px 12px rgba(229, 138, 0, 0.35);
}

.scx-stat-icon--cyan {
    background: linear-gradient(135deg, #3ec9d6 0%, #6dd8e3 100%);
    box-shadow: 0 4px 12px rgba(62, 201, 214, 0.35);
}

.scx-stat-icon--purple {
    background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.35);
}

.scx-stat-icon--red {
    background: linear-gradient(135deg, #dc2626 0%, #f87171 100%);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35);
}

.scx-stat-icon--gray {
    background: linear-gradient(135deg, #6b7280 0%, #9ca3af 100%);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.35);
}

/* Colorful Stat Card Variants - Full background gradient */
.scx-stat-card--blue {
    background: linear-gradient(135deg, #4680ff 0%, #6ca0ff 100%);
    color: white;
}

.scx-stat-card--blue .scx-stat-label { color: rgba(255, 255, 255, 0.85); }
.scx-stat-card--blue .scx-stat-value { color: white; }
.scx-stat-card--blue .scx-stat-icon { background: rgba(255, 255, 255, 0.2); box-shadow: none; }

.scx-stat-card--green {
    background: linear-gradient(135deg, #2ca87f 0%, #5ed5a8 100%);
    color: white;
}

.scx-stat-card--green .scx-stat-label { color: rgba(255, 255, 255, 0.85); }
.scx-stat-card--green .scx-stat-value { color: white; }
.scx-stat-card--green .scx-stat-icon { background: rgba(255, 255, 255, 0.2); box-shadow: none; }

.scx-stat-card--amber {
    background: linear-gradient(135deg, #e58a00 0%, #ffb84d 100%);
    color: white;
}

.scx-stat-card--amber .scx-stat-label { color: rgba(255, 255, 255, 0.85); }
.scx-stat-card--amber .scx-stat-value { color: white; }
.scx-stat-card--amber .scx-stat-icon { background: rgba(255, 255, 255, 0.2); box-shadow: none; }

.scx-stat-card--cyan {
    background: linear-gradient(135deg, #3ec9d6 0%, #6dd8e3 100%);
    color: white;
}

.scx-stat-card--cyan .scx-stat-label { color: rgba(255, 255, 255, 0.85); }
.scx-stat-card--cyan .scx-stat-value { color: white; }
.scx-stat-card--cyan .scx-stat-icon { background: rgba(255, 255, 255, 0.2); box-shadow: none; }

.scx-stat-card--purple {
    background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
    color: white;
}

.scx-stat-card--purple .scx-stat-label { color: rgba(255, 255, 255, 0.85); }
.scx-stat-card--purple .scx-stat-value { color: white; }
.scx-stat-card--purple .scx-stat-icon { background: rgba(255, 255, 255, 0.2); box-shadow: none; }

/* -----------------------------------------------------------------------------
   Tables
   ----------------------------------------------------------------------------- */
.scx-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--scx-text-sm);
}

.scx-table thead {
    background: var(--scx-gray-50);
    border-bottom: 1px solid var(--scx-border-color);
}

.scx-table th {
    padding: var(--scx-space-3) var(--scx-space-4);
    text-align: left;
    font-size: var(--scx-text-xs);
    font-weight: 600;
    color: var(--scx-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.scx-table td {
    padding: var(--scx-space-4);
    color: var(--scx-gray-700);
    border-bottom: 1px solid var(--scx-gray-100);
    vertical-align: middle;
}

.scx-table tbody tr {
    transition: background var(--scx-transition-fast);
}

.scx-table tbody tr:hover {
    background: var(--scx-gray-50);
}

.scx-table tbody tr:last-child td {
    border-bottom: none;
}

.scx-table-cell--primary {
    color: var(--scx-gray-900);
    font-weight: 500;
}

.scx-table-cell--mono {
    font-family: var(--scx-font-mono);
    font-size: var(--scx-text-xs);
    color: var(--scx-gray-600);
}

/* Table Empty State */
.scx-table-empty {
    padding: var(--scx-space-10) var(--scx-space-4);
    text-align: center;
    color: var(--scx-gray-400);
}

.scx-table-empty-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto var(--scx-space-3);
    color: var(--scx-gray-300);
}

/* Pagination */
.scx-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--scx-space-3) var(--scx-space-4);
    border-top: 1px solid var(--scx-border-color);
    background: var(--scx-gray-50);
    font-size: var(--scx-text-sm);
    color: var(--scx-gray-500);
}

/* -----------------------------------------------------------------------------
   Buttons
   ----------------------------------------------------------------------------- */
.scx-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--scx-space-2);
    padding: var(--scx-space-2) var(--scx-space-4);
    font-size: var(--scx-text-sm);
    font-weight: 500;
    font-family: var(--scx-font-sans);
    line-height: 1.5;
    border-radius: var(--scx-radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--scx-transition-fast);
    text-decoration: none;
}

.scx-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px white, 0 0 0 4px var(--scx-primary-500);
}

.scx-btn--primary {
    background: var(--scx-primary-500);
    color: white;
    border-color: var(--scx-primary-500);
}

.scx-btn--primary:hover {
    background: var(--scx-primary-600);
    border-color: var(--scx-primary-600);
    color: white;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(70, 128, 255, 0.35);
}

.scx-btn--secondary {
    background: white;
    color: var(--scx-gray-700);
    border-color: var(--scx-border-color);
}

.scx-btn--secondary:hover {
    background: var(--scx-gray-50);
    border-color: var(--scx-border-hover);
    color: var(--scx-gray-900);
    text-decoration: none;
}

.scx-btn--ghost {
    background: transparent;
    color: var(--scx-gray-600);
    border-color: transparent;
}

.scx-btn--ghost:hover {
    background: var(--scx-gray-100);
    color: var(--scx-gray-900);
    text-decoration: none;
}

.scx-btn--danger {
    background: var(--scx-danger);
    color: white;
    border-color: var(--scx-danger);
}

.scx-btn--danger:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: white;
}

.scx-btn--success {
    background: var(--scx-success);
    color: white;
    border-color: var(--scx-success);
}

.scx-btn--success:hover {
    background: #16a34a;
    border-color: #16a34a;
    color: white;
}

.scx-btn--sm {
    padding: var(--scx-space-1) var(--scx-space-3);
    font-size: var(--scx-text-xs);
}

.scx-btn--lg {
    padding: var(--scx-space-3) var(--scx-space-6);
    font-size: var(--scx-text-base);
}

.scx-btn--icon {
    padding: var(--scx-space-2);
    width: 36px;
    height: 36px;
}

/* -----------------------------------------------------------------------------
   Badges
   ----------------------------------------------------------------------------- */
.scx-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--scx-space-1);
    padding: 3px var(--scx-space-2);
    font-size: var(--scx-text-xs);
    font-weight: 500;
    border-radius: var(--scx-radius-full);
    line-height: 1.4;
}

.scx-badge--gray {
    background: var(--scx-gray-100);
    color: var(--scx-gray-600);
}

.scx-badge--success {
    background: var(--scx-success-light);
    color: #15803d;
}

.scx-badge--warning {
    background: var(--scx-warning-light);
    color: #b45309;
}

.scx-badge--danger {
    background: var(--scx-danger-light);
    color: #b91c1c;
}

.scx-badge--info {
    background: var(--scx-info-light);
    color: #0e7490;
}

.scx-badge--primary {
    background: var(--scx-primary-100);
    color: var(--scx-primary-700);
}

.scx-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: var(--scx-radius-full);
    background: currentColor;
}

/* -----------------------------------------------------------------------------
   Forms
   ----------------------------------------------------------------------------- */
.scx-form-group {
    margin-bottom: var(--scx-space-4);
}

.scx-label {
    display: block;
    font-size: var(--scx-text-sm);
    font-weight: 500;
    color: var(--scx-gray-700);
    margin-bottom: var(--scx-space-2);
}

.scx-input,
.scx-select,
.scx-textarea {
    width: 100%;
    padding: var(--scx-space-2) var(--scx-space-3);
    font-size: var(--scx-text-sm);
    font-family: var(--scx-font-sans);
    color: var(--scx-gray-900);
    background: white;
    border: 1px solid var(--scx-border-color);
    border-radius: var(--scx-radius-md);
    transition: all var(--scx-transition-fast);
}

.scx-input:hover,
.scx-select:hover,
.scx-textarea:hover {
    border-color: var(--scx-border-hover);
}

.scx-input:focus,
.scx-select:focus,
.scx-textarea:focus {
    outline: none;
    border-color: var(--scx-primary-500);
    box-shadow: 0 0 0 3px var(--scx-primary-100);
}

.scx-input::placeholder {
    color: var(--scx-gray-400);
}

.scx-help-text {
    font-size: var(--scx-text-xs);
    color: var(--scx-gray-500);
    margin-top: var(--scx-space-1);
}

.scx-checkbox {
    display: flex;
    align-items: center;
    gap: var(--scx-space-2);
    cursor: pointer;
    font-size: var(--scx-text-sm);
    color: var(--scx-gray-700);
}

.scx-checkbox input {
    width: 16px;
    height: 16px;
    accent-color: var(--scx-primary-500);
}

/* -----------------------------------------------------------------------------
   Modals
   ----------------------------------------------------------------------------- */
.scx-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--scx-space-4);
    animation: scx-fade-in 150ms ease;
}

.scx-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1001;
    background: white;
    border-radius: var(--scx-radius-xl);
    box-shadow: var(--scx-shadow-xl);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: scx-slide-up 200ms ease;
}

.scx-modal--lg {
    max-width: 640px;
}

.scx-modal--xl {
    max-width: 800px;
}

.scx-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--scx-space-4) var(--scx-space-5);
    border-bottom: 1px solid var(--scx-border-color);
}

.scx-modal-title {
    font-size: var(--scx-text-md);
    font-weight: 600;
    color: var(--scx-gray-900);
    margin: 0;
}

.scx-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--scx-gray-400);
    border-radius: var(--scx-radius-md);
    cursor: pointer;
    transition: all var(--scx-transition-fast);
}

.scx-modal-close:hover {
    background: var(--scx-gray-100);
    color: var(--scx-gray-600);
}

.scx-modal-body {
    padding: var(--scx-space-5);
    overflow-y: auto;
    flex: 1;
}

.scx-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--scx-space-3);
    padding: var(--scx-space-4) var(--scx-space-5);
    border-top: 1px solid var(--scx-border-color);
    background: var(--scx-gray-50);
}

/* -----------------------------------------------------------------------------
   Loading & Feedback
   ----------------------------------------------------------------------------- */
.scx-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--scx-space-10);
}

.scx-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--scx-gray-200);
    border-top-color: var(--scx-primary-500);
    border-radius: 50%;
    animation: scx-spin 600ms linear infinite;
}

.scx-spinner--sm {
    width: 16px;
    height: 16px;
}

.scx-spinner--lg {
    width: 32px;
    height: 32px;
    border-width: 3px;
}

/* Toast Notifications */
.scx-toast-container {
    position: fixed;
    bottom: var(--scx-space-6);
    right: var(--scx-space-6);
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: var(--scx-space-3);
}

.scx-toast {
    display: flex;
    align-items: flex-start;
    gap: var(--scx-space-3);
    padding: var(--scx-space-4);
    background: white;
    border: 1px solid var(--scx-border-color);
    border-radius: var(--scx-radius-lg);
    box-shadow: var(--scx-shadow-lg);
    min-width: 320px;
    max-width: 420px;
    animation: scx-toast-in 200ms ease;
}

.scx-toast-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.scx-toast--success .scx-toast-icon { color: var(--scx-success); }
.scx-toast--error .scx-toast-icon { color: var(--scx-danger); }
.scx-toast--warning .scx-toast-icon { color: var(--scx-warning); }

.scx-toast-content {
    flex: 1;
    min-width: 0;
}

.scx-toast-title {
    font-size: var(--scx-text-sm);
    font-weight: 600;
    color: var(--scx-gray-900);
    margin-bottom: var(--scx-space-1);
}

.scx-toast-message {
    font-size: var(--scx-text-sm);
    color: var(--scx-gray-600);
}

.scx-toast-close {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--scx-gray-400);
    border-radius: var(--scx-radius-sm);
    cursor: pointer;
}

.scx-toast-close:hover {
    background: var(--scx-gray-100);
    color: var(--scx-gray-600);
}

/* -----------------------------------------------------------------------------
   Utilities
   ----------------------------------------------------------------------------- */

/* Breadcrumbs */
.scx-breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--scx-space-2);
    font-size: var(--scx-text-sm);
    margin-bottom: var(--scx-space-4);
}

.scx-breadcrumb-item {
    color: var(--scx-gray-500);
    text-decoration: none;
}

.scx-breadcrumb-item:hover {
    color: var(--scx-gray-700);
}

.scx-breadcrumb-separator {
    color: var(--scx-gray-300);
}

.scx-breadcrumb-current {
    color: var(--scx-gray-900);
    font-weight: 500;
}

/* Code */
.scx-code {
    font-family: var(--scx-font-mono);
    font-size: var(--scx-text-xs);
    padding: 2px var(--scx-space-2);
    background: var(--scx-gray-100);
    color: var(--scx-gray-700);
    border-radius: var(--scx-radius-sm);
}

.scx-code-block {
    font-family: var(--scx-font-mono);
    font-size: var(--scx-text-xs);
    padding: var(--scx-space-4);
    background: var(--scx-gray-900);
    color: var(--scx-gray-100);
    border-radius: var(--scx-radius-lg);
    overflow-x: auto;
    line-height: 1.6;
}

/* Definition Lists */
.scx-dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--scx-space-2) var(--scx-space-4);
    font-size: var(--scx-text-sm);
}

.scx-dt {
    font-weight: 500;
    color: var(--scx-gray-500);
}

.scx-dd {
    color: var(--scx-gray-900);
    margin: 0;
}

/* Empty States */
.scx-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--scx-space-12);
    text-align: center;
}

.scx-empty-icon {
    width: 48px;
    height: 48px;
    color: var(--scx-gray-300);
    margin-bottom: var(--scx-space-4);
}

.scx-empty-title {
    font-size: var(--scx-text-base);
    font-weight: 500;
    color: var(--scx-gray-900);
    margin-bottom: var(--scx-space-1);
}

.scx-empty-description {
    font-size: var(--scx-text-sm);
    color: var(--scx-gray-500);
    max-width: 320px;
}

/* Alerts */
.scx-alert {
    display: flex;
    align-items: flex-start;
    gap: var(--scx-space-3);
    padding: var(--scx-space-4);
    border-radius: var(--scx-radius-lg);
    font-size: var(--scx-text-sm);
}

.scx-alert--info {
    background: var(--scx-info-light);
    color: #0e7490;
}

.scx-alert--warning {
    background: var(--scx-warning-light);
    color: #b45309;
}

.scx-alert--success {
    background: var(--scx-success-light);
    color: #15803d;
}

.scx-alert--danger {
    background: var(--scx-danger-light);
    color: #b91c1c;
}

/* Divider */
.scx-divider {
    height: 1px;
    background: var(--scx-border-color);
    margin: var(--scx-space-4) 0;
}

/* Grid helpers */
.scx-grid {
    display: grid;
    gap: var(--scx-space-6);
}

.scx-grid-2 { grid-template-columns: repeat(2, 1fr); }
.scx-grid-3 { grid-template-columns: repeat(3, 1fr); }
.scx-grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 768px) {
    .scx-grid-2,
    .scx-grid-3,
    .scx-grid-4 {
        grid-template-columns: 1fr;
    }
}

/* List items */
.scx-list {
    display: flex;
    flex-direction: column;
}

.scx-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--scx-space-3) var(--scx-space-4);
    border-bottom: 1px solid var(--scx-gray-100);
    color: var(--scx-gray-700);
    text-decoration: none;
    transition: background var(--scx-transition-fast);
}

.scx-list-item:hover {
    background: var(--scx-gray-50);
    color: var(--scx-gray-900);
    text-decoration: none;
}

.scx-list-item:last-child {
    border-bottom: none;
}

/* Button icon spacing (only when followed by text) */
.scx-btn i:not(:only-child) {
    margin-right: var(--scx-space-2);
}

.scx-btn--sm i:not(:only-child) {
    margin-right: var(--scx-space-1);
}

/* Utility classes */
.scx-text-muted { color: var(--scx-gray-500) !important; }
.scx-text-danger { color: var(--scx-danger) !important; }
.scx-text-success { color: var(--scx-success) !important; }

/* Avatar */
.scx-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--scx-primary-500) 0%, #6ca0ff 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: var(--scx-text-sm);
    flex-shrink: 0;
}

.scx-avatar--sm {
    width: 32px;
    height: 32px;
    font-size: var(--scx-text-xs);
}

.scx-avatar--lg {
    width: 48px;
    height: 48px;
    font-size: var(--scx-text-base);
}

/* Button Group */
.scx-btn-group {
    display: inline-flex;
    border-radius: var(--scx-radius-md);
    overflow: hidden;
}

.scx-btn-group .scx-btn {
    border-radius: 0;
    margin-left: -1px;
}

.scx-btn-group .scx-btn:first-child {
    border-radius: var(--scx-radius-md) 0 0 var(--scx-radius-md);
    margin-left: 0;
}

.scx-btn-group .scx-btn:last-child {
    border-radius: 0 var(--scx-radius-md) var(--scx-radius-md) 0;
}

/* Progress Bar */
.scx-progress {
    height: 8px;
    background: var(--scx-gray-100);
    border-radius: var(--scx-radius-full);
    overflow: hidden;
}

.scx-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--scx-primary-500) 0%, #6ca0ff 100%);
    border-radius: var(--scx-radius-full);
    transition: width var(--scx-transition-slow);
}

.scx-progress-bar--success {
    background: linear-gradient(90deg, var(--scx-success) 0%, #5ed5a8 100%);
}

.scx-progress-bar--warning {
    background: linear-gradient(90deg, var(--scx-warning) 0%, #ffb84d 100%);
}

/* Table empty state enhancement */
.scx-table-empty i {
    font-size: 2rem;
    display: block;
    margin-bottom: var(--scx-space-2);
    color: var(--scx-gray-300);
}

/* Responsive sidebar */
@media (max-width: 1024px) {
    .scx-sidebar {
        transform: translateX(-100%);
        transition: transform var(--scx-transition-base);
    }

    .scx-sidebar.open {
        transform: translateX(0);
    }

    .scx-main {
        margin-left: 0;
        width: 100%;
    }
}

/* Scrollbar styling */
.scx-sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.scx-sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.scx-sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.scx-sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Card hover enhancements */
.scx-card {
    transition: box-shadow var(--scx-transition-base);
}

.scx-card:hover {
    box-shadow: var(--scx-shadow-md);
}

/* Quick actions button styles */
.d-grid .scx-btn {
    justify-content: flex-start;
    text-align: left;
}

/* -----------------------------------------------------------------------------
   Animations
   ----------------------------------------------------------------------------- */
@keyframes scx-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scx-slide-up {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes scx-spin {
    to { transform: rotate(360deg); }
}

@keyframes scx-toast-in {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* -----------------------------------------------------------------------------
   Tabs
   ----------------------------------------------------------------------------- */
.scx-tabs {
    display: flex;
    gap: var(--scx-space-1);
    background: white;
    padding: var(--scx-space-2);
    border-radius: var(--scx-radius-xl);
    border: 1px solid var(--scx-border-color);
    box-shadow: var(--scx-shadow-sm);
}

.scx-tab {
    display: inline-flex;
    align-items: center;
    gap: var(--scx-space-2);
    padding: var(--scx-space-2) var(--scx-space-4);
    font-size: var(--scx-text-sm);
    font-weight: 500;
    font-family: var(--scx-font-sans);
    color: var(--scx-gray-500);
    background: transparent;
    border: none;
    border-radius: var(--scx-radius-lg);
    cursor: pointer;
    transition: all var(--scx-transition-fast);
    white-space: nowrap;
}

.scx-tab:hover {
    color: var(--scx-gray-700);
    background: var(--scx-gray-50);
}

.scx-tab--active {
    color: var(--scx-primary-600);
    background: var(--scx-primary-50);
}

.scx-tab--active:hover {
    color: var(--scx-primary-600);
    background: var(--scx-primary-100);
}

.scx-tab i {
    font-size: 1rem;
    opacity: 0.8;
}

.scx-tab--active i {
    opacity: 1;
}

.scx-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    font-size: var(--scx-text-xs);
    font-weight: 600;
    background: var(--scx-gray-200);
    color: var(--scx-gray-600);
    border-radius: var(--scx-radius-full);
}

.scx-tab--active .scx-tab-badge {
    background: var(--scx-primary-200);
    color: var(--scx-primary-700);
}

/* Small button variant */
.scx-btn--xs {
    padding: 2px 6px;
    font-size: 11px;
}

/* Input size variants */
.scx-input--sm {
    padding: var(--scx-space-1) var(--scx-space-2);
    font-size: var(--scx-text-xs);
}

/* Link button variant */
.scx-btn--link {
    background: transparent;
    border: none;
    color: var(--scx-primary-500);
    padding: 0;
    text-decoration: underline;
}

.scx-btn--link:hover {
    color: var(--scx-primary-600);
    text-decoration: underline;
}

/* -----------------------------------------------------------------------------
   Public Site Header & Navigation
   ----------------------------------------------------------------------------- */
.scx-public-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.scx-public-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    gap: 2rem;
}

.scx-public-logo {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    text-decoration: none;
    flex-shrink: 0;
}

.scx-public-logo img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
}

.scx-public-logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--scx-gray-900);
    letter-spacing: -0.02em;
}

.scx-public-nav-center {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.scx-public-nav-link {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--scx-gray-600);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.15s ease;
}

.scx-public-nav-link:hover {
    color: var(--scx-gray-900);
    background: var(--scx-gray-50);
    text-decoration: none;
}

.scx-public-nav-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.scx-public-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.125rem;
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.15s ease;
    border: 1px solid transparent;
}

.scx-public-btn--primary {
    background: var(--scx-gray-900);
    color: white;
}

.scx-public-btn--primary:hover {
    background: var(--scx-gray-800);
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.scx-public-btn--outline {
    background: transparent;
    color: var(--scx-gray-700);
    border-color: var(--scx-gray-200);
}

.scx-public-btn--outline:hover {
    background: var(--scx-gray-50);
    border-color: var(--scx-gray-300);
    color: var(--scx-gray-900);
    text-decoration: none;
}

.scx-public-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
}

.scx-public-menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--scx-gray-700);
    border-radius: 2px;
    transition: all 0.2s ease;
}

.scx-public-mobile-nav {
    padding: 1rem 0 1.5rem;
    border-top: 1px solid var(--scx-gray-100);
}

.scx-public-mobile-link {
    display: block;
    padding: 0.75rem 0;
    font-size: 1rem;
    font-weight: 500;
    color: var(--scx-gray-700);
    text-decoration: none;
}

.scx-public-mobile-link:hover {
    color: var(--scx-gray-900);
    text-decoration: none;
}

@media (max-width: 991px) {
    .scx-public-nav-center,
    .scx-public-nav-right {
        display: none;
    }

    .scx-public-menu-toggle {
        display: flex;
    }
}

/* Public Page Sections */
.scx-public-section {
    padding: 5rem 0;
}

.scx-public-section--gray {
    background: var(--scx-gray-50);
}

.scx-public-section--dark {
    background: var(--scx-gray-900);
    color: white;
}

.scx-public-section-title {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.scx-public-section-subtitle {
    font-size: 1.125rem;
    color: var(--scx-gray-500);
    max-width: 600px;
}

/* -----------------------------------------------------------------------------
   Analytics Charts
   ----------------------------------------------------------------------------- */
.scx-chart-container {
    display: flex;
    align-items: flex-end;
    gap: var(--scx-space-2);
    height: 200px;
    padding: var(--scx-space-4) 0;
}

.scx-chart-bar-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.scx-chart-bar {
    width: 100%;
    max-width: 40px;
    background: linear-gradient(to top, var(--scx-primary-500), var(--scx-primary-400));
    border-radius: var(--scx-radius-sm) var(--scx-radius-sm) 0 0;
    min-height: 4px;
    position: relative;
    transition: all var(--scx-transition-fast);
    margin-top: auto;
}

.scx-chart-bar:hover {
    background: linear-gradient(to top, var(--scx-primary-600), var(--scx-primary-500));
}

.scx-chart-bar-value {
    position: absolute;
    top: -22px;
    left: 50%;
    transform: translateX(-50%);
    font-size: var(--scx-text-xs);
    font-weight: 600;
    color: var(--scx-gray-700);
    opacity: 0;
    transition: opacity var(--scx-transition-fast);
}

.scx-chart-bar:hover .scx-chart-bar-value {
    opacity: 1;
}

.scx-chart-bar-label {
    font-size: 10px;
    color: var(--scx-gray-500);
    margin-top: var(--scx-space-2);
    text-align: center;
}

/* -----------------------------------------------------------------------------
   List Items
   ----------------------------------------------------------------------------- */
.scx-list {
    display: flex;
    flex-direction: column;
}

.scx-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--scx-space-3) var(--scx-space-4);
    border-bottom: 1px solid var(--scx-gray-100);
}

.scx-list-item:last-child {
    border-bottom: none;
}

.scx-list-item-content {
    flex: 1;
    min-width: 0;
}

.scx-list-item-title {
    font-weight: 500;
    color: var(--scx-gray-900);
    font-size: var(--scx-text-sm);
}

.scx-list-item-meta {
    font-size: var(--scx-text-xs);
    color: var(--scx-gray-500);
    margin-top: 2px;
}

.scx-list-item-badge {
    flex-shrink: 0;
    margin-left: var(--scx-space-3);
}

/* -----------------------------------------------------------------------------
   Small Empty State
   ----------------------------------------------------------------------------- */
.scx-empty-state--small {
    padding: var(--scx-space-6) var(--scx-space-4);
    text-align: center;
    color: var(--scx-gray-400);
}

.scx-empty-state--small i {
    font-size: 2rem;
    margin-bottom: var(--scx-space-2);
    opacity: 0.5;
}

.scx-empty-state--small p {
    font-size: var(--scx-text-sm);
    margin: 0;
}

/* -----------------------------------------------------------------------------
   Branding Editor
   ----------------------------------------------------------------------------- */
.scx-color-input-group {
    display: flex;
    gap: var(--scx-space-2);
}

.scx-color-picker {
    width: 44px;
    height: 38px;
    padding: 2px;
    border: 1px solid var(--scx-border-color);
    border-radius: var(--scx-radius-md);
    cursor: pointer;
    background: white;
}

.scx-color-picker::-webkit-color-swatch-wrapper {
    padding: 0;
}

.scx-color-picker::-webkit-color-swatch {
    border: none;
    border-radius: var(--scx-radius-sm);
}

.scx-code-input {
    font-family: var(--scx-font-mono);
    font-size: var(--scx-text-xs);
}

.scx-card--sticky {
    position: sticky;
    top: var(--scx-space-4);
}

/* Switch Toggle */
.scx-switch {
    display: flex;
    align-items: center;
    gap: var(--scx-space-3);
    cursor: pointer;
    user-select: none;
}

.scx-switch input {
    display: none;
}

.scx-switch-slider {
    width: 44px;
    height: 24px;
    background: var(--scx-gray-300);
    border-radius: var(--scx-radius-full);
    position: relative;
    transition: background var(--scx-transition-fast);
}

.scx-switch-slider::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: transform var(--scx-transition-fast);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.scx-switch input:checked + .scx-switch-slider {
    background: var(--scx-primary-500);
}

.scx-switch input:checked + .scx-switch-slider::after {
    transform: translateX(20px);
}

.scx-switch-label {
    font-size: var(--scx-text-sm);
    color: var(--scx-gray-700);
}

/* Branding Preview */
.scx-branding-preview {
    background: var(--scx-gray-50);
    border: 1px solid var(--scx-border-color);
    border-radius: var(--scx-radius-lg);
    overflow: hidden;
    font-size: 12px;
}

.scx-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--scx-space-3) var(--scx-space-4);
    background: var(--preview-primary, #3B82F6);
    color: white;
}

.scx-preview-logo {
    max-height: 28px;
    max-width: 100px;
    object-fit: contain;
}

.scx-preview-logo-placeholder {
    display: flex;
    align-items: center;
    gap: var(--scx-space-2);
    font-size: 11px;
    opacity: 0.8;
}

.scx-preview-nav {
    display: flex;
    gap: var(--scx-space-2);
}

.scx-preview-nav-item {
    padding: 4px 8px;
    border-radius: var(--scx-radius-sm);
    font-size: 10px;
    opacity: 0.8;
}

.scx-preview-nav-item.active {
    background: rgba(255, 255, 255, 0.2);
    opacity: 1;
}

.scx-preview-welcome {
    padding: var(--scx-space-3) var(--scx-space-4);
    background: white;
    border-bottom: 1px solid var(--scx-gray-200);
    font-size: 11px;
    color: var(--scx-gray-600);
}

.scx-preview-content {
    padding: var(--scx-space-3);
    background: white;
    display: flex;
    flex-direction: column;
    gap: var(--scx-space-2);
    min-height: 120px;
}

.scx-preview-product {
    display: flex;
    align-items: center;
    gap: var(--scx-space-2);
    padding: var(--scx-space-2);
    background: var(--scx-gray-50);
    border-radius: var(--scx-radius-sm);
}

.scx-preview-product-img {
    width: 32px;
    height: 32px;
    background: var(--scx-gray-200);
    border-radius: var(--scx-radius-sm);
}

.scx-preview-product-info {
    flex: 1;
}

.scx-preview-product-name {
    font-weight: 500;
    color: var(--scx-gray-900);
    font-size: 10px;
}

.scx-preview-product-price {
    color: var(--preview-primary, #3B82F6);
    font-size: 10px;
    font-weight: 600;
}

.scx-preview-btn {
    padding: 4px 8px;
    background: var(--preview-primary, #3B82F6);
    color: white;
    border: none;
    border-radius: var(--scx-radius-sm);
    font-size: 9px;
    cursor: default;
}

.scx-preview-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--scx-space-2) var(--scx-space-4);
    background: var(--scx-gray-100);
    font-size: 10px;
    color: var(--scx-gray-500);
}

.scx-preview-powered {
    font-size: 9px;
    opacity: 0.7;
}
