:root {
    /* Brand Identity - SMMpro Global Design System */
    --smm-primary: #5B4BFB;
    --smm-primary-hover: #4535E8;
    --smm-primary-light: #7B68FF;
    --smm-lavender: #EEF0FF;
    --smm-soft-violet: #E8E5FF;
    
    --smm-dark-navy: #0D0D1F;
    --smm-midnight: #111128;
    --smm-rich-dark: #1A1A2E;
    
    --smm-white: #FFFFFF;
    --smm-off-white: #FAFAFA;
    --smm-grey-light: #F0F0F5;
    --smm-grey-mid: #E5E7EB;
    
    --text-heading: #1A1A2E;
    --text-body: #64748B;
    --text-muted: #94A3B8;
    --smm-muted-lavender: #B0B3C8;
    --text-white: #FFFFFF;
    
    --smm-success: #22C55E;
    --smm-warning: #F59E0B;
    --smm-danger: #EF4444;
    --smm-info: #3B82F6;

    /* Spacing & Layout */
    --container-max: 1200px;
    --container-wide: 1400px;
    --section-pad: 100px;
    --card-pad: 32px;
    --grid-gap: 24px;
    
    /* Radius */
    --radius-card: 20px;
    --radius-btn: 10px;
    --radius-input: 10px;
    --radius-pill: 100px;
    --radius-icon: 14px;
    
    /* Shadows */
    --shadow-resting: 0 4px 24px rgba(0,0,0,0.06);
    --shadow-hover: 0 20px 60px rgba(91,75,251,0.12);
    --shadow-btn: 0 8px 25px rgba(91,75,251,0.35);
    --shadow-dropdown: 0 8px 40px rgba(0,0,0,0.14);
    --shadow-modal: 0 24px 80px rgba(0,0,0,0.20);
    
    --sidebar-width: 260px;
    --header-height: 68px;
    
    --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    --smm-glow-purple: 0 0 20px rgba(91, 75, 251, 0.4);
    --smm-glass-bg: rgba(13, 13, 31, 0.7);
    --smm-glass-border: rgba(255, 255, 255, 0.08);
}

/* Typography Overrides */
body {
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text-body);
    background-color: var(--smm-off-white);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.hero-display { font-size: 64px; font-weight: 800; line-height: 1.08; letter-spacing: -0.025em; }
.section-headline { font-size: 48px; font-weight: 700; line-height: 1.15; }
.h1 { font-size: 40px; }
.h2 { font-size: 32px; }
.h3 { font-size: 24px; font-weight: 600; }
.h4 { font-size: 20px; font-weight: 600; }
.body-large { font-size: 18px; line-height: 1.7; }
.body-small { font-size: 14px; line-height: 1.5; }
.section-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--smm-primary); }
.mono { font-family: 'JetBrains Mono', monospace; }

/* Global Navigation */
.public-navbar {
    height: var(--header-height);
    background: var(--smm-glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--smm-glass-border);
    position: sticky; top: 0; z-index: 1000;
    display: flex; align-items: center;
    transition: var(--transition-base);
}
.public-navbar.scrolled {
    background: rgba(13, 13, 31, 0.95);
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    border-bottom-color: var(--smm-primary);
}

.nav-link-smm {
    font-size: 14px; font-weight: 500; color: var(--smm-rich-dark);
    padding: 8px 16px; border-radius: var(--radius-pill);
    transition: var(--transition-base);
}
.nav-link-smm:hover, .nav-link-smm.active {
    background: var(--smm-lavender); color: var(--smm-primary);
}

/* Sidebar Dashboard Navigation - Light Theme */
.app-sidebar {
    width: var(--sidebar-width);
    background: var(--smm-white);
    height: 100vh; position: fixed; left: 0; top: 0;
    display: flex; flex-direction: column; z-index: 1000;
    border-right: 1px solid var(--smm-grey-light);
    box-shadow: 4px 0 24px rgba(0,0,0,0.02);
}
.sidebar-header { 
    padding: 24px; 
    border-bottom: 1px solid var(--smm-grey-light); 
}
.nav-group-title {
    font-size: 9px; font-weight: 800; text-transform: uppercase;
    letter-spacing: 0.15em; color: var(--text-muted);
    margin: 32px 24px 12px;
}
.nav-item-smm {
    display: flex; align-items: center; gap: 14px;
    padding: 11px 24px; margin: 2px 12px;
    font-size: 14px; font-weight: 600;
    color: var(--text-body);
    transition: var(--transition-base);
    position: relative;
    border-radius: 12px;
}
.nav-item-smm i { font-size: 18px; color: var(--text-muted); transition: var(--transition-base); }
.nav-item-smm:hover { 
    color: var(--smm-primary); 
    background: var(--smm-lavender); 
}
.nav-item-smm:hover i { color: var(--smm-primary); transform: scale(1.1); }

.nav-item-smm.active {
    color: var(--smm-primary);
    background: var(--smm-lavender);
    font-weight: 700;
}
.nav-item-smm.active i { color: var(--smm-primary); }
.nav-item-smm.active::before {
    content: ''; position: absolute; left: -12px; top: 20%; height: 60%; width: 4px;
    background: var(--smm-primary); border-radius: 0 4px 4px 0;
    box-shadow: var(--smm-glow-purple);
}

/* Layout Components */
.container-smm { max-width: var(--container-max); margin: 0 auto; padding: 0 24px; }
.container-wide { max-width: var(--container-wide); margin: 0 auto; padding: 0 24px; }
.section-smm { padding: var(--section-pad) 0; }

/* Background Patterns */
.bg-dark-navy { background-color: var(--smm-dark-navy); color: var(--smm-white); }
.bg-midnight { background-color: var(--smm-midnight); color: var(--smm-white); }
.bg-lavender { background-color: var(--smm-lavender); color: var(--text-heading); }
.bg-white-clean { background-color: var(--smm-white); color: var(--text-heading); }
.bg-purple-strip { background-color: var(--smm-primary); color: var(--smm-white); }

/* Glow & Decorations */
.purple-glow {
    position: absolute;
    width: 60%; height: 50%;
    background: radial-gradient(circle, rgba(91,75,251,0.18) 0%, transparent 70%);
    z-index: 0; pointer-events: none;
}
.decorative-star {
    font-size: 80px; color: var(--smm-primary-light); opacity: 0.3;
    animation: rotateStar 8s linear infinite;
    position: absolute; pointer-events: none;
}
@keyframes rotateStar { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* Cards */
.card-smm {
    background: var(--smm-white);
    border-radius: var(--radius-card);
    padding: var(--card-pad);
    border: 1px solid var(--smm-grey-light);
    box-shadow: var(--shadow-resting);
    transition: var(--transition-base);
}
.card-smm:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}

/* Buttons */
.btn-smm {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 12px 28px; font-weight: 700; font-size: 14px;
    border-radius: 14px; gap: 10px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer; border: none;
    letter-spacing: 0.01em;
    position: relative; overflow: hidden;
    user-select: none;
}
.btn-smm-primary { 
    background: var(--smm-primary); 
    color: var(--smm-white) !important; 
    box-shadow: 0 10px 20px -10px rgba(91, 75, 251, 0.5);
}
.btn-smm-primary:hover { 
    background: var(--smm-primary-hover); 
    transform: translateY(-2px); 
    box-shadow: 0 15px 30px -12px rgba(91, 75, 251, 0.6);
}
.btn-smm-primary:active { transform: translateY(0); }

.btn-smm-secondary { 
    background: var(--smm-white); 
    border: 1px solid var(--smm-grey-mid); 
    color: var(--smm-dark-navy) !important; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.btn-smm-secondary:hover { 
    border-color: var(--smm-primary);
    background: var(--smm-lavender);
    color: var(--smm-primary) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(91, 75, 251, 0.1);
}

.btn-smm-ghost { 
    background: transparent; 
    border: 1px solid transparent; 
    color: var(--text-body) !important; 
}
.btn-smm-ghost:hover { 
    background: var(--smm-lavender); 
    color: var(--smm-primary) !important;
}

.btn-smm-danger { 
    background: #FFF1F1; 
    color: var(--smm-danger) !important; 
}
.btn-smm-danger:hover { background: var(--smm-danger); color: #fff !important; }

.btn-smm-lg { padding: 16px 36px; font-size: 16px; }
.btn-smm-xl { padding: 20px 48px; font-size: 18px; }
.btn-smm-sm { padding: 8px 18px; font-size: 12px; border-radius: 8px; }

/* Badges */
.badge-smm {
    display: inline-flex; align-items: center; padding: 4px 12px;
    border-radius: var(--radius-pill); font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.04em;
}
.badge-smm-purple { background: var(--smm-lavender); color: var(--smm-primary); }
.badge-smm-green { background: #DCFCE7; color: #16A34A; }
.badge-smm-amber { background: #FEF3C7; color: #D97706; }
.badge-smm-red { background: #FEE2E2; color: #DC2626; }
.badge-smm-dark { background: var(--smm-rich-dark); color: var(--smm-white); }

/* Forms */
.form-input-smm, .form-control-smm {
    width: 100%; 
    padding: 12px 18px; 
    border-radius: 12px;
    border: 1px solid transparent; 
    background: var(--smm-lavender);
    font-size: 14px; 
    font-weight: 600;
    color: var(--smm-dark-navy);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.form-input-smm:focus, .form-control-smm:focus {
    outline: none; 
    background: #fff;
    border-color: var(--smm-primary);
    box-shadow: 0 10px 30px -10px rgba(91, 75, 251, 0.15);
    transform: translateY(-1px);
}
.form-control-smm::placeholder {
    color: #A0AEC0;
}

.form-select-smm {
    display: block;
    width: 100%;
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 600;
    color: var(--smm-dark-navy);
    background-color: var(--smm-lavender);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23475569' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1.25rem center;
    background-size: 16px 12px;
    border: 1px solid transparent;
    border-radius: 12px;
    appearance: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.form-select-smm:focus {
    background-color: #fff;
    border-color: var(--smm-primary);
    outline: 0;
    box-shadow: 0 10px 30px -10px rgba(91, 75, 251, 0.15);
    transform: translateY(-1px);
}

/* Animations Utility */
.animate-on-scroll { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.animate-on-scroll.visible { opacity: 1; transform: translateY(0); }

/* ========================================
   RESPONSIVE BREAKPOINT SYSTEM
   Mobile-First Approach (360px → 1440px+)
   ======================================== */

/* Extra Small Devices (360px - 575px) */
@media (max-width: 575px) {
    :root {
        --section-pad: 32px;
        --card-pad: 16px;
        --grid-gap: 12px;
        --container-max: 100%;
    }
    
    body { font-size: 14px; }
    .hero-display { font-size: 28px; line-height: 1.2; }
    .section-headline { font-size: 20px; }
    .h1 { font-size: 24px; }
    .h2 { font-size: 20px; }
    .h3 { font-size: 18px; }
    .h4 { font-size: 16px; }
    
    .app-sidebar { display: none !important; }
    .app-main { margin-left: 0 !important; }
    
    .container-smm, .container-wide { padding: 0 12px; }
    .card-smm { padding: 16px; }
    
    /* Responsive Grid */
    .row { margin-left: -8px; margin-right: -8px; }
    .col, [class*="col-"] { padding-left: 8px; padding-right: 8px; }
    
    /* Buttons */
    .btn-smm { padding: 10px 16px; font-size: 14px; }
    .btn-smm-lg { padding: 12px 20px; }
    
    /* Navigation */
    .public-navbar { height: auto; padding: 12px 16px; }
    .nav-link-smm { font-size: 12px; padding: 6px 12px; }
    
    /* Tables */
    table { font-size: 12px; }
    th, td { padding: 8px 4px !important; }
    
    /* Forms */
    .form-input-smm { padding: 10px 12px; font-size: 14px; }
    
    /* Utilities for Mobile */
    .hide-mobile { display: none !important; }
    .show-mobile { display: block !important; }

    /* --- Elite Motion System --- */
    @keyframes fadeUp {
        from { opacity: 0; transform: translateY(20px); }
        to { opacity: 1; transform: translateY(0); }
    }

    @keyframes slideInRight {
        from { opacity: 0; transform: translateX(30px); }
        to { opacity: 1; transform: translateX(0); }
    }

    @keyframes zoomIn {
        from { opacity: 0; transform: scale(0.95); }
        to { opacity: 1; transform: scale(1); }
    }

    .animate-fade-up { animation: fadeUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
    .animate-slide-right { animation: slideInRight 0.5s ease-out forwards; }
    .animate-zoom { animation: zoomIn 0.4s ease-out forwards; }

    .stagger-1 { animation-delay: 0.1s; }
    .stagger-2 { animation-delay: 0.2s; }
    .stagger-3 { animation-delay: 0.3s; }
    .stagger-4 { animation-delay: 0.4s; }

    /* Apply to Dashboard */
    .card-smm { animation: fadeUp 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
    .row > div:nth-child(1) .card-smm { animation-delay: 0.05s; }
    .row > div:nth-child(2) .card-smm { animation-delay: 0.1s; }
    .row > div:nth-child(3) .card-smm { animation-delay: 0.15s; }
    .row > div:nth-child(4) .card-smm { animation-delay: 0.2s; }

    .status-dot-pulse {
        width: 8px; height: 8px; border-radius: 50%;
        position: relative;
    }
    .status-dot-pulse::after {
        content: ''; position: absolute; inset: -4px;
        border-radius: 50%; border: 2px solid currentColor;
        animation: pulse 2s infinite;
    }
    @keyframes pulse {
        0% { transform: scale(0.5); opacity: 0.8; }
        100% { transform: scale(2.5); opacity: 0; }
    }
}

/* Small Devices (576px - 767px) */
@media (min-width: 576px) and (max-width: 767px) {
    :root {
        --section-pad: 48px;
        --card-pad: 20px;
    }
    
    body { font-size: 15px; }
    .hero-display { font-size: 32px; }
    .section-headline { font-size: 24px; }
    .h2 { font-size: 22px; }
    .h3 { font-size: 20px; }
    
    .app-sidebar { display: none !important; }
    .app-main { margin-left: 0 !important; }
    
    .container-smm { padding: 0 16px; }
    .card-smm { padding: 20px; }
    
    .hide-tablet { display: none !important; }
    .show-mobile { display: block !important; }
}

/* Tablet Devices (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    :root {
        --section-pad: 64px;
        --card-pad: 24px;
        --sidebar-width: 220px;
    }
    
    .hero-display { font-size: 40px; }
    .section-headline { font-size: 32px; }
    
    .app-sidebar { width: var(--sidebar-width); }
    .app-main { margin-left: var(--sidebar-width); }
    
    .container-smm { max-width: 100%; padding: 0 20px; }
    .nav-group-title { font-size: 8px; letter-spacing: 0.12em; }
    .nav-item-smm { padding: 10px 16px; font-size: 13px; gap: 10px; }
    
    .hide-tablet { display: none !important; }
    .show-desktop { display: none !important; }
}

/* Medium Devices (992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    :root {
        --section-pad: 80px;
        --sidebar-width: 260px;
    }
    
    .container-smm { max-width: 100%; padding: 0 24px; }
    .hide-desktop { display: none !important; }
}

/* Large Devices (1200px - 1439px) */
@media (min-width: 1200px) and (max-width: 1439px) {
    :root { --section-pad: 100px; }
    .container-smm { max-width: 1140px; }
}

/* Extra Large Devices (1440px+) */
@media (min-width: 1440px) {
    :root { --section-pad: 120px; }
    .container-smm { max-width: 1320px; }
    .container-wide { max-width: 1400px; }
}

/* ========================================
   UTILITY CLASSES
   Inline style replacements and helpers
   ======================================== */

/* Flexbox Utilities */
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-start { display: flex; align-items: center; justify-content: flex-start; }
.flex-col { display: flex; flex-direction: column; }
.flex-col-center { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.flex-wrap { flex-wrap: wrap; }
.flex-gap-8 { gap: 8px; }
.flex-gap-12 { gap: 12px; }
.flex-gap-16 { gap: 16px; }
.flex-gap-24 { gap: 24px; }

/* Margin & Padding Utilities */
.mt-0 { margin-top: 0; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.ml-auto { margin-left: auto; }
.mr-auto { margin-right: auto; }
.mx-auto { margin-left: auto; margin-right: auto; }

.pt-8 { padding-top: 8px; }
.pb-8 { padding-bottom: 8px; }
.px-12 { padding-left: 12px; padding-right: 12px; }
.py-12 { padding-top: 12px; padding-bottom: 12px; }
.px-16 { padding-left: 16px; padding-right: 16px; }
.py-16 { padding-top: 16px; padding-bottom: 16px; }

/* Width & Height Utilities */
.w-full { width: 100%; }
.w-auto { width: auto; }
.h-auto { height: auto; }
.max-w-xs { max-width: 320px; }
.max-w-sm { max-width: 420px; }
.max-w-md { max-width: 600px; }
.max-w-lg { max-width: 900px; }
.max-w-full { max-width: 100%; }

/* Size Utilities for Avatars & Icons */
.size-xs { width: 24px; height: 24px; }
.size-sm { width: 32px; height: 32px; }
.size-md { width: 40px; height: 40px; }
.size-lg { width: 48px; height: 48px; }
.size-xl { width: 56px; height: 56px; }

/* Component Utilities */
.avatar-xs { width: 24px; height: 24px; border-radius: 6px; }
.avatar-sm { width: 32px; height: 32px; border-radius: 8px; }
.avatar-md { width: 40px; height: 40px; border-radius: 10px; }
.avatar-lg { width: 48px; height: 48px; border-radius: 12px; }
.avatar-circle { width: 40px; height: 40px; border-radius: 50%; }
.avatar-circle.sm { width: 32px; height: 32px; }
.avatar-circle.lg { width: 48px; height: 48px; }

.brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--smm-primary);
    border-radius: var(--radius-btn);
    font-weight: 700;
    color: white;
}
.brand-logo.xs { width: 24px; height: 24px; font-size: 11px; }
.brand-logo.sm { width: 32px; height: 32px; font-size: 13px; }
.brand-logo.md { width: 40px; height: 40px; font-size: 16px; }

.status-indicator {
    display: inline-block;
    border-radius: 50%;
    position: relative;
}
.status-indicator.xs { width: 8px; height: 8px; }
.status-indicator.sm { width: 10px; height: 10px; }
.status-indicator.md { width: 12px; height: 12px; }

/* Progress Bar Utilities */
.progress-sm { height: 4px; background: rgba(255, 255, 255, 0.05); }
.progress-md { height: 6px; background: rgba(255, 255, 255, 0.05); }
.progress-lg { height: 8px; background: rgba(255, 255, 255, 0.05); }
.progress-bar-xs { height: 2px; }
.progress-bar-sm { height: 4px; }
.progress-bar-lg { height: 8px; }

/* Responsive Gap Utilities */
.gap-xs { gap: 4px; }
.gap-sm { gap: 8px; }
.gap-md { gap: 12px; }
.gap-lg { gap: 16px; }
.gap-xl { gap: 24px; }

/* Text Utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
/* --- Data Visualization --- */
.chart-area { height: 300px; position: relative; }
.chart-placeholder-icon { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; opacity: 0.1; }

.donut-ring {
    width: 160px; height: 160px; border-radius: 50%;
    background: radial-gradient(circle at center, transparent 69%, var(--smm-primary) 70%, var(--smm-primary) 100%);
    position: relative; margin: 0 auto;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 40px rgba(91, 75, 251, 0.1);
}
.donut-center { text-align: center; }
.donut-value { display: block; font-size: 28px; font-weight: 800; color: var(--smm-navy); line-height: 1; }
.donut-label { display: block; font-size: 9px; font-weight: 700; color: var(--smm-muted); letter-spacing: 0.1em; margin-top: 4px; }

.inline-progress { width: 100%; height: 6px; background: rgba(0,0,0,0.05); border-radius: 10px; overflow: hidden; }
.inline-progress-bar { height: 100%; background: linear-gradient(90deg, var(--smm-primary), var(--smm-accent)); border-radius: 10px; }

/* --- Elite Layout Additions --- */
.ls-tight { letter-spacing: -0.025em; }
.ls-wide { letter-spacing: 0.05em; }

.glass-panel {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.07);
}

.icon-circle {
    width: 48px; height: 48px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--smm-lavender); color: var(--smm-primary);
    transition: all 0.3s ease;
}
.icon-circle:hover { transform: scale(1.1) rotate(5deg); background: var(--smm-primary); color: #fff; }

.text-navy { color: #0D0D1F !important; }
.text-slate { color: #475569 !important; }
.text-muted-smm { color: #B0B3C8 !important; }
.text-muted { color: var(--text-muted) !important; }
.text-body { color: var(--text-body) !important; }
.text-heading { color: var(--text-heading) !important; }
.text-white { color: var(--text-white) !important; }
.text-primary { color: var(--smm-primary) !important; }
.text-success { color: var(--smm-success) !important; }
.text-warning { color: var(--smm-warning) !important; }
.text-danger { color: var(--smm-danger) !important; }
.text-info { color: var(--smm-info) !important; }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.text-uppercase { text-transform: uppercase; }
.text-capitalize { text-capitalize: capitalize; }

/* Border Utilities */
.border-top { border-top: 1px solid var(--smm-grey-mid); }
.border-bottom { border-bottom: 1px solid var(--smm-grey-mid); }
.border-left { border-left: 1px solid var(--smm-grey-mid); }
.border-right { border-right: 1px solid var(--smm-grey-mid); }
.border-all { border: 1px solid var(--smm-grey-mid); }
.border-none { border: none; }

/* Background Utilities */
.bg-hover:hover { background-color: var(--smm-grey-light); }
.bg-transparent { background-color: transparent; }
.bg-primary-subtle { background-color: var(--smm-lavender); }
.bg-success-subtle { background-color: #DCFCE7; }
.bg-warning-subtle { background-color: #FEF3C7; }
.bg-danger-subtle { background-color: #FEE2E2; }

/* Layout Utilities */
.full-height { min-height: 100vh; }
.content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Modern Utilities for Elite UI */
.w-2 { width: 0.5rem; } .h-2 { height: 0.5rem; }
.w-4 { width: 1rem; } .h-4 { height: 1rem; }
.w-6 { width: 1.5rem; } .h-6 { height: 1.5rem; }
.w-8 { width: 2rem; } .h-8 { height: 2rem; }
.w-10 { width: 2.5rem; } .h-10 { height: 2.5rem; }
.w-12 { width: 3rem; } .h-12 { height: 3rem; }
.w-16 { width: 4rem; } .h-16 { height: 4rem; }

.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }

.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-10 { gap: 2.5rem; }
.gap-12 { gap: 3rem; }

.w-8 { width: 2rem; }
.w-10 { width: 2.5rem; }
.w-12 { width: 3rem; }
.w-14 { width: 3.5rem; }
.w-16 { width: 4rem; }
.w-20 { width: 5rem; }
.w-24 { width: 6rem; }
.w-32 { width: 8rem; }

.h-8 { height: 2rem; }
.h-10 { height: 2.5rem; }
.h-12 { height: 3rem; }
.h-14 { height: 3.5rem; }
.h-16 { height: 4rem; }
.h-20 { height: 5rem; }
.h-24 { height: 6rem; }
.h-32 { height: 8rem; }
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }
.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }
.ls-wide { letter-spacing: 0.05em; }
.ls-1 { letter-spacing: 0.025em; }

/* Responsive Borders */
@media (min-width: 992px) {
    .border-lg-start { border-left: 1px solid var(--smm-grey-mid) !important; }
}
@media (max-width: 991px) {
    .border-lg-start { border-top: 1px solid var(--smm-grey-mid) !important; padding-top: 20px; margin-top: 10px; }
}

.main-content {
    flex: 1;
    background: var(--smm-off-white);
}

.sidebar-wrapper {
    margin-left: var(--sidebar-width);
}

@media (max-width: 767px) {
    .sidebar-wrapper { margin-left: 0; }
}

/* ========================================
   STATE COMPONENTS
   Loading, Empty, Error, Success states
   ======================================== */

/* Loading State */
.state-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 64px 24px;
    text-align: center;
    min-height: 300px;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--smm-primary);
    animation: spin 0.8s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.state-loading p { color: var(--text-muted); margin-bottom: 0; }

/* Empty State */
.state-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 64px 24px;
    text-align: center;
    min-height: 400px;
    background: var(--smm-white);
    border-radius: var(--radius-card);
    border: 1px dashed var(--smm-grey-mid);
}

.state-empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.state-empty h3 {
    font-size: 20px;
    margin-bottom: 8px;
    color: var(--text-heading);
}

.state-empty p {
    color: var(--text-muted);
    margin-bottom: 24px;
    max-width: 400px;
}

/* Error State */
.state-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
    background: #FEE2E2;
    border: 1px solid #FCA5A5;
    border-radius: var(--radius-card);
    margin-bottom: 24px;
}

.state-error-icon {
    font-size: 48px;
    color: var(--smm-danger);
    margin-bottom: 16px;
}

.state-error h3 {
    color: var(--smm-danger);
    margin-bottom: 8px;
}

.state-error p {
    color: #7F1D1D;
    margin-bottom: 0;
}

/* Success State */
.state-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
    background: #DCFCE7;
    border: 1px solid #86EFAC;
    border-radius: var(--radius-card);
    margin-bottom: 24px;
}

.state-success-icon {
    font-size: 48px;
    color: var(--smm-success);
    margin-bottom: 16px;
}

.state-success h3 {
    color: var(--smm-success);
    margin-bottom: 8px;
}

.state-success p {
    color: #15803D;
    margin-bottom: 0;
}

/* ========================================
   RESPONSIVE TABLE IMPROVEMENTS
   ======================================== */

.table-responsive-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-card);
}

.table {
    margin-bottom: 0;
    border-collapse: collapse;
}

.table thead {
    background: var(--smm-grey-light);
}

.table th {
    padding: 12px 16px;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border: none;
}

.table td {
    padding: 12px 16px;
    vertical-align: middle;
    border-bottom: 1px solid var(--smm-grey-mid);
}

.table tbody tr:hover {
    background-color: var(--smm-off-white);
}

@media (max-width: 767px) {
    .table { font-size: 12px; }
    .table th, .table td { padding: 8px 8px; }
    .table-hide-mobile { display: none; }
}

/* ========================================
   RESPONSIVE FORM IMPROVEMENTS
   ======================================== */

.form-group-wrapper {
    margin-bottom: 16px;
}

.form-group-wrapper label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-heading);
}

.form-input-smm,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-input);
    border: 1px solid var(--smm-grey-mid);
    background: var(--smm-white);
    font-size: 16px;
    transition: var(--transition-base);
    font-family: inherit;
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-input-smm:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--smm-primary);
    box-shadow: 0 0 0 4px var(--smm-soft-violet);
}

@media (max-width: 767px) {
    .form-input-smm,
    .form-select,
    .form-textarea { font-size: 16px; padding: 10px 12px; }
}

/* ========================================
   RESPONSIVE NAVIGATION
   ======================================== */

.navbar-responsive {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: auto;
    padding: 12px 16px;
}

.navbar-brand {
    font-weight: 700;
    font-size: 18px;
    color: var(--text-heading);
}

.navbar-menu {
    display: flex;
    gap: 16px;
    list-style: none;
    margin: 0;
    padding: 0;
}

@media (max-width: 767px) {
    .navbar-responsive { flex-wrap: wrap; }
    .navbar-menu { gap: 8px; width: 100%; margin-top: 12px; }
    .navbar-menu-item { flex: 1 1 auto; }
}

/* ========================================
   RESPONSIVE GRID SYSTEM
   ======================================== */

.grid {
    display: grid;
    gap: var(--grid-gap);
}

.grid-cols-1 { grid-template-columns: 1fr; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 767px) {
    .grid-cols-2, .grid-cols-3, .grid-cols-4 { grid-template-columns: 1fr; }
}

@media (min-width: 768px) and (max-width: 991px) {
    .grid-cols-3, .grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 992px) {
    .grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
}

/* ========================================
   PRINT STYLES & ACCESSIBILITY
   ======================================== */

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--smm-primary);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

@media print {
    .no-print { display: none !important; }
    body { background: white; color: black; }
}

/* ========================================
   ACCESSIBILITY ENHANCEMENTS
   ======================================== */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

:focus-visible {
    outline: 2px solid var(--smm-primary);
    outline-offset: 2px;
}

/* ========================================
   ADDITIONAL RESPONSIVE TWEAKS
   ======================================== */

.hide-mobile { display: none; }
.show-mobile { display: block; }

@media (min-width: 768px) {
    .hide-mobile { display: block; }
    .show-mobile { display: none; }
    .hide-tablet { display: block; }
    .show-tablet { display: none; }
}

@media (min-width: 1200px) {
    .hide-desktop { display: block; }
    .show-desktop { display: block; }
}

/* Preview Stage — Elite Console UI */
.preview-shell {
    background: var(--smm-dark-navy);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.preview-topbar {
    background: rgba(13, 13, 31, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    height: 64px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 100;
}

.preview-controls {
    display: flex;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px;
    border-radius: 10px;
}

.preview-device-btn {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px; color: rgba(255, 255, 255, 0.4);
    border: none; background: transparent;
    transition: var(--transition-base);
}

.preview-device-btn.active {
    background: var(--smm-primary); color: #fff;
    box-shadow: var(--smm-glow-purple);
}

.preview-content-area {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 60px 20px;
    overflow-y: auto;
    background: #111128; /* Darker background for preview area */
}

.preview-iframe-container {
    background: #fff;
    box-shadow: 0 40px 100px rgba(0,0,0,0.5);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 4px;
    overflow: hidden;
}

.preview-iframe-container.mobile { 
    width: 375px; height: 667px; 
    border-radius: 30px; 
    border: 12px solid #1A1A2E; 
    flex-shrink: 0;
}
.preview-iframe-container.desktop { 
    width: 900px; 
    min-height: 800px;
    height: fit-content;
}

/* Ensure iframe takes up space */
#previewFrame {
    width: 100%;
    min-height: 800px;
    border: none;
    display: block;
}
