/* ============================================
   ePlan - Premium Design System v2.0
   School Budget Management System
   ============================================ */

/* === Google Fonts Import === */
@import url('https://fonts.googleapis.com/css2?family=Sarabun:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&family=Inter:wght@300;400;500;600;700;800&display=swap');

/* === Design Tokens === */
:root {
    /* Color Palette */
    --primary:        #667EEA;
    --primary-dark:   #5A6FD6;
    --secondary:      #764BA2;
    --accent:         #06D6A0;
    --accent-blue:    #00B4D8;
    --warning:        #FCD34D;
    --danger:         #F87171;
    --success:        #34D399;

    /* Gradients */
    --primary-gradient:  linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
    --accent-gradient:   linear-gradient(135deg, #06D6A0 0%, #00B4D8 100%);
    --warm-gradient:     linear-gradient(135deg, #F093FB 0%, #F5576C 100%);
    --gold-gradient:     linear-gradient(135deg, #F7971E 0%, #FFD200 100%);

    /* Backgrounds */
    --bg-deep:        #080E1A;
    --bg-dark:        #0F172A;
    --bg-medium:      #1A2744;
    --bg-card:        rgba(22, 36, 71, 0.6);
    --bg-card-hover:  rgba(30, 50, 90, 0.75);
    --bg-input:       rgba(8, 14, 26, 0.7);
    --bg-sidebar:     rgba(8, 14, 26, 0.97);

    /* Text */
    --text-primary:   #F0F4FF;
    --text-secondary: #8FA3C8;
    --text-muted:     #4A6080;

    /* Borders */
    --border-glass:   rgba(255, 255, 255, 0.07);
    --border-active:  rgba(102, 126, 234, 0.4);
    --border-subtle:  rgba(255, 255, 255, 0.04);

    /* Shadows */
    --shadow-xs:      0 2px 8px rgba(0, 0, 0, 0.25);
    --shadow-sm:      0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-md:      0 8px 32px rgba(0, 0, 0, 0.35);
    --shadow-glow:    0 0 30px rgba(102, 126, 234, 0.18);
    --shadow-glow-lg: 0 0 60px rgba(102, 126, 234, 0.22);

    /* Spacing & Radius */
    --radius-sm:  8px;
    --radius-md:  12px;
    --radius-lg:  16px;
    --radius-xl:  20px;
    --radius-2xl: 28px;

    /* Transitions */
    --transition-fast:   all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base:   all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow:   all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 15px;
}

body {
    font-family: 'Sarabun', 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* === Scrollbar === */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary), var(--secondary));
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* === Typography === */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

/* === Gradient Text === */
.gradient-text {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text-accent {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text-gold {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   GLASSMORPHISM CARDS
   ============================================ */

.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.04) 0%, transparent 60%);
    pointer-events: none;
    border-radius: inherit;
}

.glass-card:hover:not(.no-hover) {
    background: var(--bg-card-hover);
    border-color: var(--border-active);
    box-shadow: var(--shadow-glow), var(--shadow-md);
    transform: translateY(-3px);
}

.glass-card.no-hover { cursor: default; }

/* Glow border on hover */
.glow-border {
    position: relative;
}
.glow-border::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: calc(var(--radius-lg) + 1px);
    background: var(--primary-gradient);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
}
.glow-border:hover::after { opacity: 0.5; }

/* ============================================
   BUTTONS
   ============================================ */

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 22px;
    background: var(--primary-gradient);
    color: white;
    font-family: 'Sarabun', sans-serif;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition-base);
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3), inset 0 1px 0 rgba(255,255,255,0.15);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 60%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(102, 126, 234, 0.45), inset 0 1px 0 rgba(255,255,255,0.2);
}
.btn-primary:hover::before { left: 160%; }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 22px;
    background: rgba(255,255,255,0.04);
    color: var(--text-primary);
    font-family: 'Sarabun', sans-serif;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
    cursor: pointer;
    transition: var(--transition-base);
    text-decoration: none;
    backdrop-filter: blur(12px);
    white-space: nowrap;
}

.btn-secondary:hover {
    border-color: var(--border-active);
    background: rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-accent {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 22px;
    background: var(--accent-gradient);
    color: #0F172A;
    font-family: 'Sarabun', sans-serif;
    font-weight: 700;
    font-size: 0.875rem;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition-base);
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(6, 214, 160, 0.3);
}
.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(6, 214, 160, 0.4);
}

.btn-danger {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 22px;
    background: rgba(248, 113, 113, 0.12);
    color: #F87171;
    font-family: 'Sarabun', sans-serif;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(248, 113, 113, 0.25);
    cursor: pointer;
    transition: var(--transition-base);
    text-decoration: none;
}
.btn-danger:hover {
    background: rgba(248, 113, 113, 0.2);
    border-color: rgba(248, 113, 113, 0.5);
    transform: translateY(-1px);
}

/* Button sizes */
.btn-sm { padding: 6px 14px; font-size: 0.8rem; border-radius: var(--radius-sm); }
.btn-lg { padding: 13px 30px; font-size: 1rem; border-radius: var(--radius-lg); }
.btn-xl { padding: 15px 40px; font-size: 1.05rem; border-radius: var(--radius-lg); }

/* ============================================
   FORM ELEMENTS
   ============================================ */

.form-group { margin-bottom: 1.1rem; }

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    letter-spacing: 0.02em;
}

.form-input,
input[type="text"].form-input,
input[type="number"].form-input,
input[type="email"].form-input,
input[type="password"].form-input,
select.form-input,
textarea.form-input {
    width: 100%;
    padding: 9px 13px;
    background: var(--bg-input);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: 'Sarabun', sans-serif;
    font-size: 0.875rem;
    transition: var(--transition-fast);
    outline: none;
}

.form-input:focus {
    border-color: rgba(102, 126, 234, 0.6);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.12);
    background: rgba(8, 14, 26, 0.9);
}

.form-input::placeholder { color: var(--text-muted); }

select.form-input option {
    background: var(--bg-medium);
    color: var(--text-primary);
}

/* Input with icon */
.input-group {
    position: relative;
}
.input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}
.input-group .form-input { padding-left: 38px; }

/* ============================================
   BADGE & CHIPS
   ============================================ */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 13px;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 600;
    background: rgba(6, 214, 160, 0.1);
    color: var(--accent);
    border: 1px solid rgba(6, 214, 160, 0.2);
    letter-spacing: 0.02em;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 600;
    border: 1px solid;
}

.chip-primary { color: var(--primary); background: rgba(102,126,234,0.1); border-color: rgba(102,126,234,0.25); }
.chip-success { color: var(--success); background: rgba(52,211,153,0.1); border-color: rgba(52,211,153,0.25); }
.chip-warning { color: var(--warning); background: rgba(252,211,77,0.1); border-color: rgba(252,211,77,0.25); }
.chip-danger  { color: var(--danger);  background: rgba(248,113,113,0.1); border-color: rgba(248,113,113,0.25); }
.chip-muted   { color: var(--text-muted); background: rgba(74,96,128,0.1); border-color: rgba(74,96,128,0.2); }

/* ============================================
   NAVBAR (Landing)
   ============================================ */

.navbar {
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    background: rgba(8, 14, 26, 0.75);
    border-bottom: 1px solid var(--border-subtle);
    transition: var(--transition-base);
}

.navbar.scrolled {
    background: rgba(8, 14, 26, 0.95);
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.4), 0 1px 0 rgba(102,126,234,0.15);
}

.nav-link {
    position: relative;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    font-size: 0.875rem;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.05);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 1px; left: 50%;
    width: 0; height: 2px;
    background: var(--primary-gradient);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}
.nav-link:hover::after { width: 55%; }

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(8, 14, 26, 0.98);
    backdrop-filter: blur(30px);
    z-index: 100;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}
.mobile-menu.open { display: flex; }
.mobile-menu .nav-link { font-size: 1.2rem; padding: 12px 24px; }

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 101;
}
.hamburger span {
    width: 22px; height: 2px;
    background: var(--text-primary);
    transition: var(--transition-base);
    border-radius: 2px;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ============================================
   HERO SECTION
   ============================================ */

.hero-bg {
    position: relative;
    background: var(--bg-dark);
    overflow: hidden;
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background:
        radial-gradient(ellipse at 25% 15%, rgba(102, 126, 234, 0.18) 0%, transparent 45%),
        radial-gradient(ellipse at 75% 65%, rgba(118, 75, 162, 0.14) 0%, transparent 45%),
        radial-gradient(ellipse at 50% 95%, rgba(6, 214, 160, 0.06) 0%, transparent 45%);
    animation: heroGlow 18s ease-in-out infinite alternate;
    z-index: 0;
}

@keyframes heroGlow {
    0%   { transform: translate(0, 0) scale(1); }
    33%  { transform: translate(-3%, 4%) scale(1.04); }
    66%  { transform: translate(4%, -2%) scale(1.02); }
    100% { transform: translate(-1%, 2%) scale(1.05); }
}

/* Floating Orbs */
.floating-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.35;
    animation: floatOrb 22s ease-in-out infinite;
    pointer-events: none;
}

.orb-1 {
    width: 450px; height: 450px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.5), transparent 70%);
    top: 5%; right: -8%;
    animation-delay: 0s;
}

.orb-2 {
    width: 350px; height: 350px;
    background: radial-gradient(circle, rgba(118, 75, 162, 0.4), transparent 70%);
    bottom: 15%; left: -6%;
    animation-delay: -7s;
}

.orb-3 {
    width: 250px; height: 250px;
    background: radial-gradient(circle, rgba(6, 214, 160, 0.3), transparent 70%);
    top: 45%; left: 38%;
    animation-delay: -13s;
}

@keyframes floatOrb {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25%  { transform: translate(35px, -50px) rotate(6deg); }
    50%  { transform: translate(-25px, 35px) rotate(-4deg); }
    75%  { transform: translate(45px, 25px) rotate(4deg); }
}

/* Grid Background */
.grid-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 56px 56px;
    z-index: 0;
    mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */

.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.75s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.75s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal.active { opacity: 1; transform: translateY(0); }

.reveal-left {
    opacity: 0;
    transform: translateX(-32px);
    transition: opacity 0.75s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.75s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal-left.active { opacity: 1; transform: translateX(0); }

.reveal-right {
    opacity: 0;
    transform: translateX(32px);
    transition: opacity 0.75s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.75s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal-right.active { opacity: 1; transform: translateX(0); }

.reveal-scale {
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 0.75s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.75s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal-scale.active { opacity: 1; transform: scale(1); }

/* Stagger delays */
.delay-50  { transition-delay: 0.05s; }
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }
.delay-500 { transition-delay: 0.5s; }
.delay-600 { transition-delay: 0.6s; }
.delay-700 { transition-delay: 0.7s; }

/* ============================================
   FEATURE SECTION
   ============================================ */

.feature-icon {
    width: 52px; height: 52px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.12), rgba(118, 75, 162, 0.08));
    border: 1px solid rgba(102, 126, 234, 0.15);
    font-size: 1.4rem;
    transition: var(--transition-base);
    flex-shrink: 0;
}

.glass-card:hover .feature-icon {
    background: var(--primary-gradient);
    box-shadow: 0 6px 24px rgba(102, 126, 234, 0.35);
    transform: scale(1.1) rotate(5deg);
    border-color: transparent;
}

/* ============================================
   STEP NUMBER
   ============================================ */

.step-number {
    width: 42px; height: 42px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-md);
    background: var(--primary-gradient);
    font-size: 1rem; font-weight: 800;
    color: white;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
    flex-shrink: 0;
    position: relative;
}

/* ============================================
   STATISTICS
   ============================================ */

.stat-value {
    font-size: 2.75rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

/* ============================================
   SECTION DECORATORS
   ============================================ */

.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.25), transparent);
    margin: 0 auto;
    max-width: 700px;
}

/* ============================================
   LOGO SHIMMER
   ============================================ */

.logo-shimmer::after {
    content: '';
    position: absolute;
    top: 0; left: -120%;
    width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
    animation: shimmer 3.5s ease-in-out infinite;
}

@keyframes shimmer {
    0%   { left: -120%; }
    100% { left: 220%; }
}

/* Typing Cursor */
.typing-cursor {
    display: inline-block;
    width: 2px; height: 1em;
    background: var(--accent);
    margin-left: 3px;
    animation: blink 1s step-end infinite;
    vertical-align: middle;
    border-radius: 2px;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Particle Canvas */
#particles-canvas {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/* ============================================
   SIDEBAR (Dashboard Layout)
   ============================================ */

.sidebar {
    width: 250px;
    position: fixed;
    top: 0;
    bottom: 0;
    height: 100%;
    overflow-y: auto;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-subtle);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.main-content {
    margin-left: 250px;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 100vh;
    background: var(--bg-dark);
}

/* Sidebar Menu Link */
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 500;
    position: relative;
    white-space: nowrap;
    overflow: hidden;
    min-width: 0;
}

/* Sidebar link label text — ellipsis for long labels */
.sidebar-link > span:not(.icon) {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-link::before {
    content: '';
    position: absolute;
    left: 0; top: 50%;
    transform: translateY(-50%);
    width: 0; height: 65%;
    background: var(--primary-gradient);
    border-radius: 0 3px 3px 0;
    transition: width 0.2s ease;
}

.sidebar-link:hover {
    background: rgba(102, 126, 234, 0.07);
    color: var(--text-primary);
}

.sidebar-link.active {
    background: rgba(102, 126, 234, 0.1);
    color: white;
    border: 1px solid rgba(102, 126, 234, 0.18);
    font-weight: 600;
}

.sidebar-link.active::before {
    width: 3px;
}

.sidebar-link.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.sidebar-link .icon {
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    flex-shrink: 0;
    transition: var(--transition-fast);
}

.sidebar-link.active .icon {
    background: var(--primary-gradient);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.35);
}

.sidebar-link:hover:not(.active) .icon {
    background: rgba(102, 126, 234, 0.12);
}

/* Top Bar */
.top-bar {
    height: 52px;
    backdrop-filter: blur(24px);
    background: rgba(8, 14, 26, 0.88);
    border-bottom: 1px solid var(--border-subtle);
    position: sticky;
    top: 0;
    z-index: 40;
}

/* Mobile Sidebar */
@media (max-width: 1023px) {
    .sidebar {
        transform: translateX(-100%);
        position: fixed;
        top: 0; left: 0;
        z-index: 50;
        height: 100%;
    }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.6);
        backdrop-filter: blur(4px);
        z-index: 40;
    }
    .sidebar-overlay.open { display: block; }
    .hamburger { display: flex; }
    /* Show mobile hamburger toggle button */
    .sidebar-toggle {
        display: flex !important;
    }
}

/* Desktop: always hide hamburger toggle */
@media (min-width: 1024px) {
    .sidebar-toggle {
        display: none !important;
    }
}

/* ============================================
   DASHBOARD COMPONENTS
   ============================================ */

/* Stat Card */
.stat-card {
    padding: 1.1rem 1.25rem;
}

.stat-card .stat-icon {
    width: 40px; height: 40px;
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.stat-card .stat-num {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.stat-card .stat-label {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-top: 2px;
    font-weight: 500;
}

.stat-card .stat-sub {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Trend indicator */
.stat-trend {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 50px;
}
.stat-trend.up   { color: var(--success); background: rgba(52,211,153,0.1); }
.stat-trend.down { color: var(--danger);  background: rgba(248,113,113,0.1); }

/* Section Heading */
.section-heading {
    font-size: 0.92rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    letter-spacing: 0.01em;
}

.section-heading::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-glass);
}

/* Info Row */
.info-row {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 11px;
    border-radius: var(--radius-sm);
    background: rgba(8, 14, 26, 0.35);
    border: 1px solid transparent;
    transition: var(--transition-fast);
}

.info-row:hover {
    background: rgba(102, 126, 234, 0.05);
    border-color: rgba(102, 126, 234, 0.1);
}

.info-row .info-icon {
    width: 34px; height: 34px;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem; font-weight: 700;
    flex-shrink: 0;
}

.info-row .info-title {
    font-size: 0.83rem;
    font-weight: 600;
    color: var(--text-primary);
}

.info-row .info-desc {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 1px;
}

/* Step Progress Card */
.step-progress {
    text-align: center;
    padding: 11px 8px;
    border-radius: var(--radius-sm);
    border: 1px solid;
    transition: var(--transition-fast);
    cursor: default;
}

.step-progress:hover { transform: translateY(-2px); }

.step-progress .step-emoji {
    font-size: 1.3rem;
    margin-bottom: 4px;
    display: block;
}

.step-progress .step-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    opacity: 0.75;
}

.step-progress .step-sublabel {
    font-size: 0.72rem;
    font-weight: 600;
    margin-top: 2px;
}

.step-progress .step-status {
    font-size: 0.65rem;
    margin-top: 5px;
    opacity: 0.7;
}

/* ============================================
   TABLES
   ============================================ */

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.data-table thead th {
    padding: 10px 12px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-glass);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
}

.data-table thead th:first-child { padding-left: 16px; }

.data-table tbody tr {
    border-bottom: 1px solid var(--border-subtle);
    transition: var(--transition-fast);
}

.data-table tbody tr:hover {
    background: rgba(102, 126, 234, 0.04);
}

.data-table tbody td {
    padding: 9px 12px;
    color: var(--text-primary);
    vertical-align: middle;
}

.data-table tbody td:first-child { padding-left: 16px; }

.data-table tfoot td {
    padding: 11px 12px;
    font-weight: 700;
    border-top: 1px solid var(--border-glass);
    color: var(--text-primary);
}

/* Form Table (number inputs) */
.form-table { width: 100%; font-size: 0.85rem; }

.form-table th {
    padding: 10px 10px;
    text-align: center;
    font-weight: 700;
    font-size: 0.75rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-glass);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-table th:first-child { text-align: left; }

.form-table td {
    padding: 6px 6px;
    border-bottom: 1px solid var(--border-subtle);
}

.form-table tbody tr:hover { background: rgba(255,255,255,0.015); }

.form-table tfoot td {
    padding: 10px 6px;
    font-weight: 700;
    border-top: 2px solid var(--border-glass);
    color: var(--text-primary);
}

.form-table input[type="number"] {
    width: 100%;
    text-align: center;
    padding: 6px 7px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-glass);
    background: var(--bg-input);
    color: var(--text-primary);
    font-family: 'Sarabun', sans-serif;
    font-size: 0.85rem;
    transition: var(--transition-fast);
    outline: none;
}

.form-table input[type="number"]:focus {
    border-color: rgba(102,126,234,0.55);
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}

.form-table .total-cell {
    text-align: center;
    padding: 6px 7px;
    border-radius: var(--radius-sm);
    background: rgba(102,126,234,0.06);
    color: #A5B4FC;
    font-weight: 700;
    font-size: 0.85rem;
}

/* ============================================
   GROUP HEADER
   ============================================ */

.group-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.group-header .group-icon {
    width: 34px; height: 34px;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
}

.group-header .group-title {
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

/* ============================================
   SUMMARY CARDS
   ============================================ */

.summary-card {
    text-align: center;
    padding: 15px 10px;
}

.summary-card .summary-num {
    font-size: 1.65rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.summary-card .summary-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 4px;
    font-weight: 500;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */

.toast {
    position: fixed;
    bottom: 24px; right: 24px;
    z-index: 9999;
    padding: 14px 20px;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    max-width: 360px;
    backdrop-filter: blur(24px);
    animation: toastIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-md);
}

.toast-success {
    background: rgba(6, 214, 160, 0.12);
    border: 1px solid rgba(6, 214, 160, 0.3);
    color: #6EE7B7;
}

.toast-error {
    background: rgba(248, 113, 113, 0.12);
    border: 1px solid rgba(248, 113, 113, 0.3);
    color: #FCA5A5;
}

.toast-warning {
    background: rgba(252, 211, 77, 0.12);
    border: 1px solid rgba(252, 211, 77, 0.3);
    color: #FDE68A;
}

@keyframes toastIn {
    from { transform: translateX(120%) scale(0.85); opacity: 0; }
    to   { transform: translateX(0) scale(1); opacity: 1; }
}

/* ============================================
   PROGRESS BAR
   ============================================ */

.progress-bar {
    height: 6px;
    background: var(--border-glass);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 3px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0; left: -50%;
    width: 40%; height: 100%;
    background: rgba(255,255,255,0.25);
    animation: shimmerProg 2s ease-in-out infinite;
}

@keyframes shimmerProg {
    0%   { left: -50%; }
    100% { left: 150%; }
}

/* ============================================
   AVATAR
   ============================================ */

.avatar {
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    font-weight: 700;
    background: var(--primary-gradient);
    color: white;
    flex-shrink: 0;
}

.avatar-sm  { width: 28px; height: 28px; font-size: 0.7rem; }
.avatar-md  { width: 36px; height: 36px; font-size: 0.85rem; }
.avatar-lg  { width: 48px; height: 48px; font-size: 1rem; }

/* ============================================
   DIVIDER
   ============================================ */

.divider {
    height: 1px;
    background: var(--border-glass);
    margin: 1rem 0;
}

.divider-vertical {
    width: 1px;
    align-self: stretch;
    background: var(--border-glass);
}

/* ============================================
   ANIMATIONS
   ============================================ */

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

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.4); }
    50%       { box-shadow: 0 0 0 10px rgba(102, 126, 234, 0); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-8px); }
}

.animate-spin   { animation: spin 1s linear infinite; }
.animate-pulse  { animation: pulse-glow 2s ease-in-out infinite; }
.animate-float  { animation: float 3s ease-in-out infinite; }

/* ============================================
   TIMELINE
   ============================================ */

.timeline-dot {
    position: absolute;
    left: 50%;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: var(--primary-gradient);
    transform: translateX(-50%);
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
    z-index: 2;
}

.timeline-dot::after {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 2px solid rgba(102, 126, 234, 0.3);
    animation: pulseRing 2.5s ease-in-out infinite;
}

@keyframes pulseRing {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%       { transform: scale(1.6); opacity: 0; }
}

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

@media (max-width: 768px) {
    .hamburger { display: flex; }

    .stat-value { font-size: 2rem; }

    .step-number {
        width: 36px; height: 36px;
        font-size: 0.9rem;
        border-radius: var(--radius-sm);
    }

    .feature-icon { width: 44px; height: 44px; font-size: 1.25rem; }
}

@media (max-width: 480px) {
    .stat-card .stat-num { font-size: 1.5rem; }
    .btn-xl { padding: 12px 28px; font-size: 0.95rem; }
}
