/*
 * MAHASARAKHAM CITY HALF MARATHON 2026
 * Professional Government / Royal Thai Blue Design System
 * Full UI Overhaul — September 2026
 */

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
    /* Royal Blue Palette */
    --primary:        #1a3c7a;
    --primary-dark:   #0f2456;
    --primary-light:  #2952a3;
    --primary-xlight: #e8eefc;
    --primary-mid:    #3b5ea6;

    /* Thai Gold Accent */
    --accent:        #b8943a;
    --accent-light:  #d4aa4f;
    --accent-xlight: #fdf3dc;
    --accent-dark:   #9a7a2e;

    /* Semantic Colors */
    --success:       #166534;
    --success-bg:    #dcfce7;
    --warning:       #92400e;
    --warning-bg:    #fef3c7;
    --danger:        #991b1b;
    --danger-bg:     #fee2e2;
    --info:          #075985;
    --info-bg:       #e0f2fe;

    /* Neutrals */
    --bg-page:       #f0f4f9;
    --bg-card:       #ffffff;
    --bg-sidebar:    #0f2456;
    --border:        #d1dce8;
    --border-light:  #e8edf4;

    /* Text */
    --text-primary:  #1a2a45;
    --text-secondary:#3d5170;
    --text-muted:    #6b7e9a;
    --text-light:    #9aafc8;

    /* Fonts */
    --font-thai:     'Sarabun', 'Prompt', sans-serif;
    --font-heading:  'Outfit', 'Sarabun', sans-serif;
    --font-mono:     'JetBrains Mono', monospace;

    /* Shadows */
    --shadow-sm:     0 1px 3px rgba(15,36,86,.08), 0 1px 2px rgba(15,36,86,.04);
    --shadow-md:     0 4px 12px rgba(15,36,86,.10), 0 2px 4px rgba(15,36,86,.06);
    --shadow-lg:     0 10px 30px rgba(15,36,86,.13), 0 4px 10px rgba(15,36,86,.08);
    --shadow-xl:     0 20px 50px rgba(15,36,86,.18);

    /* Radius */
    --radius-sm:  6px;
    --radius-md:  10px;
    --radius-lg:  16px;
    --radius-xl:  24px;
    --radius-pill: 999px;

    /* Transitions */
    --transition: all 0.22s cubic-bezier(0.4,0,0.2,1);
}

/* ============================================================
   BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-thai);
    font-size: 15px;
    line-height: 1.65;
    color: var(--text-primary);
    background-color: var(--bg-page);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1,h2,h3,h4,h5,h6,.font-heading {
    font-family: var(--font-heading), var(--font-thai);
    color: var(--text-primary);
    line-height: 1.3;
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.text-primary-gov  { color: var(--primary) !important; }
.text-accent       { color: var(--accent) !important; }
.text-gold         { color: var(--accent) !important; }
.bg-primary-gov    { background-color: var(--primary) !important; }
.bg-accent         { background-color: var(--accent) !important; }
.bg-gold           { background-color: var(--accent) !important; }
.bg-dark-navy      { background-color: var(--primary-dark) !important; }
.bg-page           { background-color: var(--bg-page) !important; }

.fs-7 { font-size: 0.85rem !important; }
.fs-8 { font-size: 0.75rem !important; }

.fw-black  { font-weight: 900 !important; }

.tracking-tight  { letter-spacing: -0.02em; }
.tracking-wider  { letter-spacing: 0.08em; }
.tracking-widest { letter-spacing: 0.15em; }

.leading-relaxed { line-height: 1.75; }

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Hover text white utility */
a.hover-white:hover { color: #fff !important; }

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c5d0e0; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-mid); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    font-family: var(--font-thai);
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: var(--transition);
    letter-spacing: 0.01em;
}

.btn-primary-gov {
    background: var(--primary);
    color: #fff;
    border: none;
    box-shadow: 0 2px 8px rgba(26,60,122,.25);
}
.btn-primary-gov:hover {
    background: var(--primary-light);
    color: #fff;
    box-shadow: 0 4px 16px rgba(26,60,122,.35);
    transform: translateY(-1px);
}

.btn-accent {
    background: var(--accent);
    color: #fff;
    border: none;
    box-shadow: 0 2px 8px rgba(184,148,58,.3);
}
.btn-accent:hover {
    background: var(--accent-light);
    color: #fff;
    box-shadow: 0 4px 16px rgba(184,148,58,.4);
    transform: translateY(-1px);
}

.btn-outline-primary-gov {
    border: 2px solid var(--primary);
    color: var(--primary);
    background: transparent;
}
.btn-outline-primary-gov:hover {
    background: var(--primary);
    color: #fff;
}

.btn-gold {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    color: #fff;
    border: none;
    font-weight: 700;
    box-shadow: 0 3px 12px rgba(184,148,58,.35);
}
.btn-gold:hover {
    color: #fff;
    box-shadow: 0 6px 20px rgba(184,148,58,.5);
    transform: translateY(-2px);
}

.btn-glow {
    position: relative;
    overflow: hidden;
}
.btn-glow::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.15);
    opacity: 0;
    transition: opacity 0.2s;
}
.btn-glow:hover::after { opacity: 1; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    background: var(--bg-card);
}

.card-gov {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    background: #fff;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}
.card-gov:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

/* Top-border accent cards */
.card-accent-top {
    border-top: 4px solid var(--accent);
}
.card-primary-top {
    border-top: 4px solid var(--primary);
}
.card-success-top {
    border-top: 4px solid var(--success);
}
.card-danger-top {
    border-top: 4px solid var(--danger);
}
.card-warning-top {
    border-top: 4px solid #d97706;
}

/* ============================================================
   PUBLIC NAVIGATION (main layout)
   ============================================================ */
.public-topbar {
    background: linear-gradient(90deg, var(--primary-dark) 0%, var(--primary) 60%, var(--accent-dark) 100%);
    color: #f0e8d0;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    padding: 6px 0;
    border-bottom: 2px solid var(--accent);
}

.public-navbar {
    background: var(--primary);
    box-shadow: 0 2px 16px rgba(15,36,86,.18);
}

.public-navbar .navbar-brand-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.public-navbar .brand-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
    box-shadow: 0 2px 8px rgba(184,148,58,.4);
    flex-shrink: 0;
}

.public-navbar .brand-name {
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1rem;
    line-height: 1.1;
    letter-spacing: -0.01em;
}
.public-navbar .brand-sub {
    color: var(--accent-light);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.public-navbar .nav-link {
    color: rgba(255,255,255,0.85) !important;
    font-weight: 500;
    padding: 8px 14px !important;
    border-radius: var(--radius-md);
    transition: var(--transition);
    font-size: 0.9rem;
}
.public-navbar .nav-link:hover {
    color: #fff !important;
    background: rgba(255,255,255,0.12);
}
.public-navbar .nav-link.active {
    color: var(--accent-light) !important;
    background: rgba(255,255,255,0.1);
    font-weight: 700;
}

.staff-login-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 8px 16px;
    border: 1px solid rgba(255,255,255,.72);
    border-radius: var(--radius-pill);
    color: #fff;
    background: rgba(255,255,255,.08);
    font-size: .86rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    transition: var(--transition);
}
.staff-login-link:hover,
.staff-login-link:focus-visible {
    color: var(--primary-dark);
    background: #fff;
    border-color: #fff;
    box-shadow: 0 3px 12px rgba(0,0,0,.16);
}
.staff-login-link-mobile {
    min-height: 38px;
    padding: 7px 12px;
    border-color: rgba(255,255,255,.82);
    font-size: .8rem;
}

/* ============================================================
   PUBLIC FOOTER
   ============================================================ */
.public-footer {
    background: linear-gradient(180deg, var(--primary-dark) 0%, #070f2e 100%);
    color: rgba(255,255,255,0.75);
    border-top: 3px solid var(--accent);
}
.public-footer .footer-heading {
    color: var(--accent-light);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(184,148,58,.3);
}
.public-footer a {
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    font-size: 0.88rem;
    transition: color 0.2s;
}
.public-footer a:hover { color: var(--accent-light); }
.public-footer .footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.88rem;
    margin-bottom: 8px;
}
.public-footer .footer-contact-item i {
    color: var(--accent-light);
    margin-top: 3px;
    flex-shrink: 0;
    width: 16px;
}
.public-footer .footer-divider {
    border-color: rgba(255,255,255,0.1);
    margin: 28px 0 20px;
}
.public-footer .footer-bottom {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.4);
}
.public-footer .social-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.85rem;
}
.public-footer .social-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero-section {
    background:
        linear-gradient(135deg, rgba(10,18,50,0.96) 0%, rgba(26,60,122,0.88) 60%, rgba(15,36,86,0.94) 100%),
        url('../images/hero_bg.jpg') center/cover no-repeat;
    min-height: 580px;
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 70% 50%, rgba(184,148,58,0.12) 0%, transparent 60%);
    pointer-events: none;
}
.hero-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-dark) 0%, var(--accent) 50%, var(--primary-dark) 100%);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(184,148,58,0.18);
    border: 1px solid rgba(184,148,58,0.5);
    color: var(--accent-light);
    padding: 6px 16px;
    border-radius: var(--radius-pill);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    backdrop-filter: blur(8px);
    margin-bottom: 16px;
}

.hero-title {
    font-family: var(--font-heading);
    font-weight: 900;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: #fff;
}

.hero-quick-info {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    backdrop-filter: blur(10px);
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
}
.hero-info-item {
    display: flex;
    align-items: center;
    gap: 10px;
}
.hero-info-icon {
    width: 38px;
    height: 38px;
    background: rgba(184,148,58,0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-light);
    font-size: 0.95rem;
    flex-shrink: 0;
}
.hero-info-label { font-size: 0.72rem; color: rgba(255,255,255,0.5); }
.hero-info-value { font-size: 0.9rem; font-weight: 700; color: #fff; }

/* ============================================================
   COUNTDOWN CLOCK
   ============================================================ */
.countdown-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius-xl);
    padding: 28px 24px;
    backdrop-filter: blur(16px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
}
.countdown-grid {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 10px;
}
.countdown-box {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-md);
    padding: 14px 8px;
    text-align: center;
}
.countdown-num {
    font-family: var(--font-heading);
    font-size: 2.4rem;
    font-weight: 900;
    color: var(--accent-light);
    line-height: 1;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.countdown-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.5);
    margin-top: 4px;
    font-weight: 600;
}

/* ============================================================
   CATEGORY CARDS
   ============================================================ */
.category-card {
    border-radius: var(--radius-xl);
    border: 2px solid var(--border-light);
    background: #fff;
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}
.category-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: transparent;
}
.category-card-header {
    padding: 20px 22px 16px;
    position: relative;
}
.category-distance-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 0.8rem;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    color: #fff;
    letter-spacing: 0.05em;
}
.category-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #fff;
    margin-bottom: 12px;
}
.category-card-body { padding: 0 22px 22px; }
.category-price {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--primary);
}

/* ============================================================
   SECTION HEADINGS
   ============================================================ */
.section-heading {
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
    margin-bottom: 8px;
}
.section-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 48px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
}
.section-heading.centered::after {
    left: 50%;
    transform: translateX(-50%);
}

.section-eyebrow {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.section-eyebrow::before, .section-eyebrow::after {
    content: '';
    flex: 1;
    max-width: 30px;
    height: 1px;
    background: var(--accent);
    opacity: 0.5;
}

/* ============================================================
   SPONSOR SECTION
   ============================================================ */
.sponsor-logo-box {
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-md);
    background: #fff;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    text-decoration: none;
}
.sponsor-logo-box:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.sponsor-logo-box img {
    max-height: 60px;
    max-width: 140px;
    object-fit: contain;
    filter: grayscale(20%);
    transition: filter 0.2s;
}
.sponsor-logo-box:hover img { filter: grayscale(0); }

/* ============================================================
   FORMS (Public Registration)
   ============================================================ */
.form-section-card {
    background: #fff;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    margin-bottom: 20px;
}
.form-section-header {
    background: var(--primary);
    color: #fff;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 0.95rem;
}
.form-section-header .section-icon {
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.15);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.form-section-body { padding: 24px; }

.form-label {
    font-weight: 600;
    font-size: 0.87rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.form-control, .form-select {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font-family: var(--font-thai);
    font-size: 0.9rem;
    color: var(--text-primary);
    padding: 9px 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: #fdfdff;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,60,122,0.1);
    background-color: #fff;
}
.form-control::placeholder { color: var(--text-light); }

/* Select2 Override */
.select2-container--bootstrap-5 .select2-selection {
    border: 1.5px solid var(--border) !important;
    border-radius: var(--radius-md) !important;
    font-family: var(--font-thai) !important;
    min-height: 42px !important;
}
.select2-container--bootstrap-5 .select2-selection:focus,
.select2-container--bootstrap-5.select2-container--focus .select2-selection {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(26,60,122,0.1) !important;
}
.select2-container--bootstrap-5 .select2-dropdown {
    border: 1.5px solid var(--border) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-lg) !important;
}
.select2-container--bootstrap-5 .select2-results__option--highlighted {
    background-color: var(--primary) !important;
}

/* Category radio cards */
.category-radio-card {
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 16px;
    cursor: pointer;
    transition: var(--transition);
    background: #fff;
    position: relative;
}
.category-radio-card:hover { border-color: var(--primary-mid); }
.category-radio-card.selected {
    border-color: var(--primary);
    background: var(--primary-xlight);
    box-shadow: 0 0 0 3px rgba(26,60,122,.1);
}
.category-radio-card input[type="radio"] { display: none; }

/* ============================================================
   PAYMENT PAGE
   ============================================================ */
.qr-wrapper {
    background: #fff;
    border: 3px solid var(--primary);
    border-radius: var(--radius-xl);
    padding: 24px;
    display: inline-block;
    box-shadow: var(--shadow-lg);
    text-align: center;
}
.qr-bank-banner {
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 6px 14px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    display: inline-block;
}
.qr-container {
    background: #fff;
    padding: 1rem;
    border-radius: 8px;
    display: inline-block;
}
.qr-header-banner {
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    text-transform: uppercase;
}

.amount-highlight {
    background: linear-gradient(135deg, var(--primary-xlight) 0%, #e8f0ff 100%);
    border: 2px solid var(--primary);
    border-radius: var(--radius-lg);
    padding: 18px 24px;
    text-align: center;
}
.amount-number {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--primary);
    line-height: 1;
}

/* ============================================================
   TRACKING
   ============================================================ */
.tracking-search-card {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: var(--shadow-xl);
}

/* ============================================================
   STATUS BADGES
   ============================================================ */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: var(--radius-pill);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.status-pending  { background: var(--warning-bg); color: var(--warning); }
.status-paid     { background: var(--success-bg); color: var(--success); }
.status-rejected { background: var(--danger-bg); color: var(--danger); }
.status-info     { background: var(--info-bg); color: var(--info); }

/* ============================================================
   ADMIN PORTAL — LAYOUT
   ============================================================ */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ============================================================
   ADMIN SIDEBAR - MODERN LUXURY REDESIGN 2026
   ============================================================ */
.admin-sidebar {
    width: 270px;
    background: linear-gradient(180deg, #091122 0%, #0d172e 45%, #070d1a 100%);
    min-height: 100vh;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    z-index: 1040;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    border-right: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 6px 0 25px rgba(0, 0, 0, 0.3);
}

.sidebar-brand-area {
    padding: 22px 18px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    gap: 12px;
}
.sidebar-brand-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.15rem;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
}
.sidebar-brand-text { overflow: hidden; }
.sidebar-brand-title {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1rem;
    color: #ffffff;
    line-height: 1.15;
    letter-spacing: -0.01em;
    white-space: nowrap;
}
.sidebar-brand-sub {
    font-size: 0.65rem;
    color: #38bdf8;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    white-space: nowrap;
    margin-top: 2px;
}

/* User Card */
.sidebar-user-card {
    margin: 14px 12px 6px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    backdrop-filter: blur(8px);
    transition: background 0.2s ease;
}
.sidebar-user-card:hover {
    background: rgba(255, 255, 255, 0.055);
    border-color: rgba(255, 255, 255, 0.12);
}
.sidebar-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}
.sidebar-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.user-status-dot {
    position: absolute;
    bottom: 0px;
    right: 0px;
    width: 10px;
    height: 10px;
    background: #10b981;
    border: 2px solid #0d172e;
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.8);
}
.sidebar-user-info {
    overflow: hidden;
    flex: 1;
}
.sidebar-user-name {
    font-size: 0.83rem;
    font-weight: 600;
    color: #f8fafc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
}
.sidebar-user-badge {
    font-size: 0.65rem;
    font-weight: 600;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 100px;
    padding: 1px 8px;
    display: inline-block;
    margin-top: 3px;
    letter-spacing: 0.04em;
}

/* Sidebar Navigation */
.sidebar-nav-area {
    flex: 1;
    overflow-y: auto;
    padding: 10px 10px 16px;
}
.sidebar-nav-area::-webkit-scrollbar {
    width: 4px;
}
.sidebar-nav-area::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 4px;
}
.sidebar-section-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #64748b;
    padding: 14px 10px 6px;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.sidebar-section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.05);
}

.nav-link-admin {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 12px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.86rem;
    font-weight: 500;
    border-radius: 10px;
    margin-bottom: 3px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    overflow: hidden;
    position: relative;
}
.nav-link-admin .nav-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    color: #94a3b8;
    font-size: 0.88rem;
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.nav-link-admin .nav-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nav-link-admin:hover {
    background: rgba(255, 255, 255, 0.065);
    color: #ffffff;
    transform: translateX(3px);
}
.nav-link-admin:hover .nav-icon {
    background: rgba(255, 255, 255, 0.12);
    color: #38bdf8;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
}

/* Modern Active Nav State */
.nav-link-admin.active {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(96, 165, 250, 0.25);
}
.nav-link-admin.active .nav-icon {
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.nav-link-admin.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 18%;
    bottom: 18%;
    width: 3.5px;
    border-radius: 0 4px 4px 0;
    background: #60a5fa;
    box-shadow: 0 0 8px #60a5fa;
}

.nav-link-admin .badge-pill-counter {
    margin-left: auto;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    font-size: 0.68rem;
    padding: 2px 8px;
    border-radius: 100px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
    letter-spacing: 0.02em;
}

/* External Link */
.sidebar-link-ext {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.nav-link-admin.nav-link-external {
    opacity: 0.75;
}
.nav-link-admin.nav-link-external:hover {
    opacity: 1;
    color: #38bdf8;
}

/* Sidebar Footer & Logout */
.sidebar-footer-area {
    padding: 14px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.15);
}
.sidebar-footer-area .btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.22);
    border-radius: 10px;
    color: #fca5a5;
    font-size: 0.86rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.sidebar-footer-area .btn-logout:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    border-color: #ef4444;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35);
    transform: translateY(-1px);
}

/* Admin main content */
.admin-content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow: hidden;
    background: var(--bg-page);
}

/* Admin Topbar */
.admin-topbar {
    background: #fff;
    border-bottom: 1px solid var(--border-light);
    padding: 10px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1030;
    box-shadow: var(--shadow-sm);
    min-height: 58px;
}
.admin-topbar-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}
.admin-topbar-breadcrumb {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 1px;
}

/* Admin Page Content */
.admin-page-body {
    padding: 24px;
    flex: 1;
}

/* Page header block */
.admin-page-header {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-light);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.admin-page-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
}
.admin-page-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ============================================================
   ADMIN KPI CARDS
   ============================================================ */
.kpi-card {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    padding: 20px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}
.kpi-card.kpi-primary::before { background: var(--primary); }
.kpi-card.kpi-success::before { background: #16a34a; }
.kpi-card.kpi-warning::before { background: #d97706; }
.kpi-card.kpi-danger::before  { background: #dc2626; }
.kpi-card.kpi-info::before    { background: #0284c7; }
.kpi-card.kpi-accent::before  { background: var(--accent); }

.kpi-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.kpi-card-content { flex: 1; min-width: 0; }
.kpi-card-value {
    font-family: var(--font-heading);
    font-size: 1.9rem;
    font-weight: 900;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 4px;
}
.kpi-card-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}
.kpi-card-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 6px;
}
.kpi-icon-box {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}
.kpi-icon-box.bg-primary-soft { background: rgba(26,60,122,.1); color: var(--primary); }
.kpi-icon-box.bg-success-soft { background: rgba(22,163,74,.1);  color: #16a34a; }
.kpi-icon-box.bg-warning-soft { background: rgba(217,119,6,.1);  color: #d97706; }
.kpi-icon-box.bg-danger-soft  { background: rgba(220,38,38,.1);  color: #dc2626; }
.kpi-icon-box.bg-info-soft    { background: rgba(2,132,199,.1);  color: #0284c7; }
.kpi-icon-box.bg-accent-soft  { background: rgba(184,148,58,.1); color: var(--accent); }

/* ============================================================
   ADMIN TABLES
   ============================================================ */
.table-gov {
    font-size: 0.875rem;
    border-collapse: collapse;
    width: 100%;
}
.table-gov thead th {
    background: #f8fafc;
    color: #334155;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-top: none;
    border-bottom: 2px solid #e2e8f0;
    padding: 13px 16px;
    white-space: nowrap;
    vertical-align: middle;
}
.table-gov thead th:first-child { border-radius: 0; }
.table-gov thead th:last-child  { border-radius: 0; }
.table-gov tbody tr {
    transition: background 0.15s ease;
    border-bottom: 1px solid #f1f5f9;
}
.table-gov tbody tr:hover { background: #f8faff; }
.table-gov tbody td {
    padding: 14px 16px;
    vertical-align: middle;
    color: #1e293b;
    border: none;
}

/* DataTables overrides */
.dataTables_wrapper {
    padding: 18px 20px 20px;
    font-family: var(--font-thai);
}
.dataTables_wrapper .dataTables_length {
    margin-bottom: 16px;
    font-size: 0.88rem;
    color: #64748b;
}
.dataTables_wrapper .dataTables_length select {
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    padding: 6px 30px 6px 12px;
    font-size: 0.88rem;
    color: #334155;
    background-color: #fff;
    margin: 0 6px;
    outline: none;
    transition: all 0.2s;
}
.dataTables_wrapper .dataTables_length select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,60,122,.12);
}
.dataTables_wrapper .dataTables_filter {
    margin-bottom: 16px;
    font-size: 0.88rem;
    color: #64748b;
}
.dataTables_wrapper .dataTables_filter input {
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    padding: 7px 14px;
    font-family: var(--font-thai);
    font-size: 0.88rem;
    background: #f8fafc;
    margin-left: 8px;
    min-width: 220px;
    transition: all 0.2s ease;
}
.dataTables_wrapper .dataTables_filter input:focus {
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,60,122,.12);
    outline: none;
}
.dataTables_wrapper .dataTables_info {
    font-size: 0.85rem;
    color: #64748b;
    padding-top: 16px;
}
.dataTables_wrapper .dataTables_paginate {
    padding-top: 14px;
}
.dataTables_wrapper .paginate_button {
    border-radius: 8px !important;
    padding: 6px 14px !important;
    font-size: 0.84rem !important;
    font-weight: 600 !important;
    border: 1px solid #e2e8f0 !important;
    background: #fff !important;
    color: #475569 !important;
    margin: 0 2px !important;
    transition: all 0.2s ease;
}
.dataTables_wrapper .paginate_button.current,
.dataTables_wrapper .paginate_button.current:hover {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(26,60,122,0.2) !important;
}
.dataTables_wrapper .paginate_button:hover:not(.disabled) {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    color: var(--primary) !important;
}
.dataTables_wrapper .paginate_button.disabled,
.dataTables_wrapper .paginate_button.disabled:hover {
    opacity: 0.5;
    cursor: not-allowed !important;
    background: #f8fafc !important;
    border-color: #f1f5f9 !important;
    color: #94a3b8 !important;
}

/* ============================================================
   ADMIN LOGIN PAGE
   ============================================================ */
.admin-login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-mid) 100%);
    display: flex;
    align-items: stretch;
}
.login-left-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 50px;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.login-left-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 50%, rgba(184,148,58,0.15) 0%, transparent 70%);
}
.login-right-panel {
    width: 440px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px 44px;
    box-shadow: -8px 0 40px rgba(0,0,0,0.15);
}
.login-form-wrapper { width: 100%; }
.login-logo-mark {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 20px;
    box-shadow: var(--shadow-md);
}

/* ============================================================
   ALERT / NOTICE BOXES
   ============================================================ */
.notice-box {
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    border-left: 4px solid;
    font-size: 0.88rem;
}
.notice-box.notice-info {
    background: var(--info-bg);
    border-left-color: #0284c7;
    color: var(--info);
}
.notice-box.notice-success {
    background: var(--success-bg);
    border-left-color: #16a34a;
    color: var(--success);
}
.notice-box.notice-warning {
    background: var(--warning-bg);
    border-left-color: #d97706;
    color: var(--warning);
}
.notice-box.notice-danger {
    background: var(--danger-bg);
    border-left-color: #dc2626;
    color: var(--danger);
}
.notice-box-icon {
    font-size: 1.1rem;
    margin-top: 1px;
    flex-shrink: 0;
}

/* ============================================================
   BIB NUMBER DISPLAY
   ============================================================ */
.bib-tag {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1rem;
    padding: 4px 12px;
    border-radius: var(--radius-md);
    background: var(--primary);
    color: #fff;
    display: inline-block;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 6px rgba(26,60,122,.3);
}

/* ============================================================
   CHART WRAPPER
   ============================================================ */
.chart-card {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    padding: 20px;
}
.chart-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.chart-title i { color: var(--primary); }

/* ============================================================
   NEW PAGE COMPONENTS (Added: September 2026 Full UI Overhaul)
   ============================================================ */

/* Section Eyebrow */
.section-eyebrow {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.section-eyebrow span {
    font-family: var(--font-heading);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--accent);
    padding: 4px 12px;
    border-radius: 30px;
    background: var(--accent-xlight);
    border: 1px solid rgba(184,148,58,.2);
}
.section-heading {
    position: relative;
    padding-bottom: 10px;
    margin-bottom: 6px;
}
.section-heading::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 40px; height: 3px;
    background: var(--accent);
    border-radius: 3px;
}
.section-heading.centered::after {
    left: 50%; transform: translateX(-50%);
}

/* Notice Box */
.notice-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    border: 1.5px solid;
    font-size: .88rem;
}
.notice-box-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }
.notice-box.notice-warning {
    background: rgba(217,119,6,.08);
    border-color: rgba(217,119,6,.3);
    color: #92400e;
}
.notice-box.notice-danger {
    background: rgba(220,38,38,.06);
    border-color: rgba(220,38,38,.25);
    color: #991b1b;
}
.notice-box.notice-info {
    background: rgba(2,132,199,.07);
    border-color: rgba(2,132,199,.25);
    color: #075985;
}
.notice-box.notice-success {
    background: rgba(22,163,74,.07);
    border-color: rgba(22,163,74,.25);
    color: #166534;
}

/* BIB Tag */
.bib-tag {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: .95rem;
    letter-spacing: .05em;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    padding: 4px 14px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(26,60,122,.25);
}

/* Sponsor Logo Box */
.sponsor-logo-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}
.sponsor-logo-box:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* Tracking Search Card */
.tracking-search-card {
    background: linear-gradient(155deg, var(--primary-dark) 0%, var(--primary) 60%, var(--primary-light) 100%);
    border-radius: 0;
    border-bottom: 3px solid var(--accent);
    box-shadow: none;
}

.tracking-help-card {
    padding: 22px;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.tracking-help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-bottom: 14px;
    border-radius: 12px;
    background: var(--primary-xlight);
    color: var(--primary);
}

.tracking-help-card h2 {
    margin-bottom: 6px;
    color: var(--text-primary);
    font-size: .95rem;
    font-weight: 700;
}

.tracking-help-card p {
    margin-bottom: 0;
    color: var(--text-muted);
    font-size: .82rem;
    line-height: 1.65;
}

.tracking-page-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding: 7px 14px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    color: var(--accent-light);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .1em;
}

.tracking-page-description {
    color: rgba(255,255,255,.72);
    font-size: .95rem;
}

.tracking-search-label {
    color: rgba(255,255,255,.82);
    font-size: .82rem;
    font-weight: 600;
}

.tracking-search-controls {
    display: flex;
    gap: 10px;
}

.tracking-search-field {
    position: relative;
    flex: 1;
}

.tracking-search-field > i {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    color: rgba(255,255,255,.58);
}

.tracking-search-input {
    min-height: 54px;
    padding-left: 44px;
    border: 1px solid rgba(255,255,255,.24);
    border-radius: 12px;
    background: rgba(255,255,255,.1);
    color: #fff;
}

.tracking-search-input::placeholder {
    color: rgba(255,255,255,.58);
}

.tracking-search-input:focus {
    border-color: var(--accent-light);
    background: rgba(255,255,255,.14);
    color: #fff;
    box-shadow: 0 0 0 .2rem rgba(212,170,79,.18);
}

.tracking-search-submit {
    min-width: 124px;
    border-radius: 12px;
}

.tracking-search-hint {
    margin-top: 14px;
    color: rgba(255,255,255,.6);
    font-size: .78rem;
    text-align: center;
}

.tracking-search-hint i {
    margin-right: 5px;
    color: var(--accent-light);
}

.tracking-content {
    padding-top: 32px;
    padding-bottom: 56px;
}

.tracking-match {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    color: var(--text-primary);
    text-decoration: none;
}

.tracking-match:hover {
    background: var(--bg-page);
    color: var(--primary);
}

.tracking-match-icon,
.tracking-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--primary-xlight);
    color: var(--primary);
}

.tracking-match-details {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.tracking-match-details strong {
    font-size: .9rem;
}

.tracking-match-details > span {
    color: var(--text-muted);
    font-size: .8rem;
}

.tracking-match-arrow {
    color: var(--text-muted);
    font-size: .75rem;
}

.tracking-empty-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    border-radius: 20px;
    font-size: 1.35rem;
}

@media (max-width: 575.98px) {
    .tracking-search-controls {
        flex-direction: column;
    }

    .tracking-search-submit {
        min-height: 50px;
    }

    .tracking-match {
        gap: 10px;
        padding: 14px;
    }

    .tracking-match .status-badge {
        padding: 5px 8px;
        font-size: .68rem;
    }
}

/* Hero Components */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--accent-light);
    background: rgba(184,148,58,.12);
    border: 1px solid rgba(184,148,58,.25);
    padding: 6px 14px;
    border-radius: 30px;
    margin-bottom: 16px;
}
.hero-title {
    font-family: var(--font-heading);
    font-weight: 900;
    letter-spacing: -0.02em;
    color: #fff;
    margin-bottom: 8px;
    line-height: 1.15;
}
.hero-quick-info {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}
.hero-info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,.8);
    font-size: .88rem;
}
.hero-info-icon {
    width: 36px; height: 36px;
    border-radius: 8px;
    background: rgba(255,255,255,.1);
    display: flex; align-items: center; justify-content: center;
    color: var(--accent-light);
    flex-shrink: 0;
    font-size: .9rem;
}
.hero-info-label { font-size: .7rem; color: rgba(255,255,255,.5); margin-bottom: 1px; }
.hero-info-value { font-weight: 700; line-height: 1.2; }

/* Countdown Card */
.countdown-card {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: var(--radius-xl);
    padding: 28px 24px;
    backdrop-filter: blur(12px);
}
.countdown-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 12px 0;
}
.countdown-box {
    text-align: center;
    padding: 14px 8px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 12px;
}
.countdown-num {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 2rem;
    color: #fff;
    line-height: 1;
}
.countdown-label {
    font-size: .65rem;
    color: rgba(255,255,255,.5);
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-top: 4px;
}

/* Category Cards */
.category-card {
    background: #fff;
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
}
.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}
.category-card-header {
    padding: 20px;
    background: var(--bg-page);
    border-bottom: 1px solid var(--border-light);
    position: relative;
}
.category-card-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.category-distance-badge {
    position: absolute;
    top: 16px; right: 16px;
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: .85rem;
    color: #fff;
    padding: 4px 12px;
    border-radius: 30px;
    letter-spacing: .06em;
}
.category-icon {
    width: 44px; height: 44px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 10px;
    opacity: .85;
}
.category-price {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.5rem;
    color: var(--primary);
    line-height: 1;
}

/* KPI Card Icon Boxes */
.kpi-icon-box {
    width: 54px; height: 54px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}
.bg-primary-soft { background: rgba(26,60,122,.1); color: var(--primary); }
.bg-success-soft { background: rgba(22,163,74,.1); color: #16a34a; }
.bg-danger-soft  { background: rgba(220,38,38,.1); color: #dc2626; }
.bg-info-soft    { background: rgba(2,132,199,.1); color: #0284c7; }

/* ============================================================
   PRINT STYLES
   ============================================================ */

@media print {
    .no-print, header, footer, .btn, .admin-sidebar,
    .admin-topbar, nav, .sidebar-footer-area, .dataTables_wrapper .row:first-child {
        display: none !important;
    }
    body { background: #fff !important; color: #000 !important; }
    .print-sheet { page-break-after: always; padding: 0; margin: 0; }
    .card, .card-gov { box-shadow: none !important; border: 1px solid #ddd !important; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 991.98px) {
    .admin-sidebar {
        position: fixed;
        left: 0; top: 0; bottom: 0;
        transform: translateX(-100%);
    }
    .admin-sidebar.sidebar-open {
        transform: translateX(0);
    }
    .admin-page-body { padding: 16px; }
    .login-left-panel { display: none; }
    .login-right-panel { width: 100%; }
}

@media (max-width: 767.98px) {
    .hero-section { min-height: 420px; }
    .countdown-grid { grid-template-columns: repeat(2,1fr); }
    .hero-quick-info { gap: 16px; }
    .kpi-card-value { font-size: 1.5rem; }
    .admin-page-header { flex-direction: column; }
}

@media (max-width: 767.98px) {
    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }

    .container,
    .container-fluid {
        --bs-gutter-x: 1.25rem;
    }

    .row {
        min-width: 0;
    }

    img,
    video,
    canvas,
    iframe {
        max-width: 100%;
    }

    .table-responsive {
        -webkit-overflow-scrolling: touch;
    }

    .table-responsive > table {
        min-width: 600px;
    }

    .form-control,
    .form-select,
    .form-control-sm,
    .form-select-sm {
        min-height: 42px;
        font-size: 16px;
    }

    .btn,
    .btn-sm {
        min-height: 42px;
        touch-action: manipulation;
    }

    .input-group > .btn,
    .input-group > .form-control,
    .input-group > .form-select {
        min-height: 48px;
    }

    .modal-dialog {
        margin: 0.75rem;
    }

    .registration-stepper {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 374.98px) {
    .container,
    .container-fluid {
        --bs-gutter-x: 1rem;
    }

    .admin-page-body {
        padding-right: 10px;
        padding-left: 10px;
    }

    .input-group.input-group-lg > .form-control {
        min-width: 0;
        padding-right: 0.5rem;
        padding-left: 0.5rem;
        font-size: 0.95rem;
    }
}

/* ============================================================
   MULTI-STEP REGISTRATION WIZARD STYLES
   ============================================================ */
.registration-stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    padding: 16px 24px;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(15,36,86,.06);
    border: 1px solid var(--border-light);
    margin-bottom: 24px;
}
.stepper-item {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}
.stepper-item .step-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #f1f5f9;
    color: var(--text-muted);
    border: 2px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    font-weight: 700;
    transition: all 0.3s ease;
    flex-shrink: 0;
}
.stepper-item .step-label {
    display: flex;
    flex-direction: column;
}
.stepper-item .step-num {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}
.stepper-item .step-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}
.stepper-item.active .step-circle {
    background: linear-gradient(135deg, var(--primary) 0%, #2952a3 100%);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 4px 14px rgba(26,60,122,0.35);
}
.stepper-item.active .step-num {
    color: var(--accent);
}
.stepper-item.active .step-title {
    color: var(--primary-dark);
}
.stepper-item.completed .step-circle {
    background: #10b981;
    color: #ffffff;
    border-color: #10b981;
}
.stepper-item.completed .step-title {
    color: #059669;
}
.stepper-line {
    flex: 1;
    height: 3px;
    background: #e2e8f0;
    margin: 0 16px;
    border-radius: 4px;
    transition: background 0.3s ease;
}
.stepper-line.completed {
    background: #10b981;
}

/* Category Choice Cards (Compact) */
.category-choice-card {
    transition: all 0.2s ease;
    background: #ffffff;
    border: 1.5px solid var(--border-light) !important;
}
.category-choice-card:hover {
    border-color: var(--primary-light) !important;
    background: rgba(26,60,122,0.02);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15,36,86,.08);
}
.category-choice-card.selected {
    border-color: var(--primary) !important;
    background: rgba(26,60,122,0.05);
    box-shadow: 0 4px 14px rgba(26,60,122,0.15);
}

/* Step Panes */
.step-pane {
    display: none;
    animation: fadeInStep 0.3s ease-in-out;
}
.step-pane.active {
    display: block;
}
@keyframes fadeInStep {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Review Card in Step 3 */
.review-summary-card {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 14px;
    padding: 20px;
}
.review-item-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed var(--border-light);
    font-size: 0.88rem;
}
.review-item-row:last-child {
    border-bottom: none;
}
.review-item-label {
    color: var(--text-muted);
    font-weight: 500;
}
.review-item-val {
    color: var(--text-primary);
    font-weight: 600;
    text-align: right;
}

@media (max-width: 767.98px) {
    .registration-stepper {
        padding: 12px 14px;
    }
    .stepper-item .step-label {
        display: none;
    }
    .stepper-item .step-circle {
        width: 36px;
        height: 36px;
        font-size: 0.95rem;
    }
    .stepper-line {
        margin: 0 8px;
    }
}
