:root {
    --bg: #f4f7fb;
    --card: #fff;
    --dark: #0f172a;
    --muted: #64748b;
    --border: #e5e7eb;
    --primary: #2563eb;
    --success: #16a34a;
    --warning: #f59e0b;
    --danger: #dc2626;
    --radius: 20px
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    background: var(--bg);
    color: #111827;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif
}

a {
    text-decoration: none
}

.muted {
    color: var(--muted)
}

.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top left, rgba(37, 99, 235, .25), transparent 32%), linear-gradient(135deg, #0f172a, #1e293b);
    padding: 24px
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: white;
    border-radius: 28px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .28);
    padding: 34px
}

.brand-badge {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    background: linear-gradient(135deg, #60a5fa, #2563eb);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px
}

.app-shell {
    min-height: 100vh;
    display: flex
}

.sidebar {
    width: 280px;
    min-height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background: radial-gradient(circle at top left, rgba(59, 130, 246, .24), transparent 35%), linear-gradient(180deg, #0f172a, #111827 58%, #020617);
    color: white;
    padding: 22px 16px;
    z-index: 1000;
    transition: .25s ease
}

.brand {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 8px 10px 22px
}

.brand-icon {
    /* width: 44px;
    height: 44px; */
    border-radius: 16px;
    background: linear-gradient(135deg, #60a5fa, #2563eb);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center
}

.brand-title {
    font-size: 18px;
    font-weight: 900
}

.brand-sub {
    font-size: 12px;
    color: #cbd5e1
}

.nav-label {
    color: #94a3b8;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .12em;
    margin: 18px 12px 8px
}

.sidebar a,
.logout-link {
    color: #dbeafe;
    display: flex;
    gap: 11px;
    align-items: center;
    width: 100%;
    padding: 12px 14px;
    border-radius: 15px;
    margin: 4px 0;
    font-weight: 700;
    font-size: 14px;
    background: transparent;
    border: 0;
    text-align: left;
    transition: .18s
}

.sidebar a i,
.logout-link i {
    width: 18px;
    text-align: center;
    color: #93c5fd
}

.sidebar a:hover,
.sidebar a.active,
.logout-link:hover {
    background: rgba(255, 255, 255, .12);
    color: white;
    transform: translateX(3px)
}

.main {
    margin-left: 280px;
    width: calc(100% - 280px);
    min-height: 100vh
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 900;
    backdrop-filter: blur(16px);
    background: rgba(244, 247, 251, .86);
    border-bottom: 1px solid rgba(226, 232, 240, .8);
    padding: 18px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px
}

.page-title h1 {
    font-size: 28px;
    font-weight: 900;
    margin: 0
}

.page-title p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 14px
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 12px
}

.search-box {
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 10px 14px;
    min-width: 280px;
    display: flex;
    gap: 10px;
    align-items: center;
    box-shadow: 0 10px 25px rgba(15, 23, 42, .04)
}

.search-box input {
    border: 0;
    outline: 0;
    width: 100%;
    font-size: 14px
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 15px;
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1e40af;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900
}

.page {
    padding: 28px 30px 45px
}

.cardx {
    background: var(--card);
    border: 1px solid rgba(226, 232, 240, .86);
    border-radius: var(--radius);
    box-shadow: 0 18px 50px rgba(15, 23, 42, .07)
}

.cardx-header {
    padding: 20px 22px;
    border-bottom: 1px solid #eef2f7;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px
}

.cardx-body {
    padding: 22px
}

.kpi {
    padding: 22px;
    position: relative;
    overflow: hidden
}

.kpi:after {
    content: "";
    position: absolute;
    right: -25px;
    top: -25px;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: rgba(37, 99, 235, .08)
}

.kpi-icon {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    background: #eff6ff;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px
}

.kpi small {
    color: var(--muted);
    font-size: 11px;
    letter-spacing: .06em;
    text-transform: uppercase;
    font-weight: 800
}

.kpi h2 {
    font-size: 30px;
    font-weight: 900;
    margin: 8px 0 4px
}

.kpi span {
    font-size: 13px;
    color: var(--muted)
}

.form-control,
.form-select {
    border-radius: 14px;
    border: 1px solid var(--border);
    padding: 11px 13px;
    font-size: 14px
}

.btn {
    border-radius: 14px;
    font-weight: 800;
    padding: 10px 16px
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border: 0;
    box-shadow: 0 12px 22px rgba(37, 99, 235, .22)
}

.btn-success {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border: 0
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border: 0
}

.btn-light {
    background: white;
    border: 1px solid var(--border)
}

.table {
    vertical-align: middle;
    font-size: 14px
}

.table thead th {
    color: #64748b;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .06em;
    border-bottom: 1px solid #e5e7eb !important
}

.table tbody td {
    padding: 15px 10px;
    border-color: #eef2f7
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    text-transform: capitalize
}

.status:before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor
}

.status-paid,
.status-ticketed,
.status-active,
.status-issued,
.status-success {
    background: #ecfdf5;
    color: var(--success)
}

.status-pending,
.status-draft,
.status-pending_payment,
.status-warning {
    background: #fffbeb;
    color: var(--warning)
}

.status-failed,
.status-ticket_failed,
.status-cancelled,
.status-inactive,
.status-danger,
.status-refunded {
    background: #fef2f2;
    color: var(--danger)
}

.status-reserved,
.status-ticketing_in_progress,
.status-info {
    background: #eff6ff;
    color: var(--primary)
}

.status-secondary {
    background: #f1f5f9;
    color: #475569
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 10px
}

.route {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 900
}

.route-code {
    padding: 6px 9px;
    border-radius: 12px;
    background: #f1f5f9
}

.money {
    font-weight: 900
}

.filter-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr auto;
    gap: 12px
}

.detail-hero {
    background: linear-gradient(135deg, rgba(37, 99, 235, .96), rgba(14, 165, 233, .88));
    border-radius: 28px;
    padding: 26px;
    color: white;
    box-shadow: 0 22px 50px rgba(37, 99, 235, .23)
}

.detail-hero h2 {
    font-weight: 900;
    margin: 0
}

.detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px
}

.timeline-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px dashed #e5e7eb
}

.timeline-dot {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #eff6ff;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto
}

.ticket-box {
    border: 1px dashed #bfdbfe;
    background: #eff6ff;
    border-radius: 18px;
    padding: 14px
}

.sidebar-backdrop {
    display: none
}

.mobile-menu-btn {
    display: none
}

pre {
    background: #0f172a;
    color: #dbeafe;
    border-radius: 18px;
    padding: 18px;
    max-height: 520px;
    overflow: auto
}

.modal-content {
    border: 0;
    border-radius: 24px;
    box-shadow: 0 30px 80px rgba(15, 23, 42, .2)
}

@media(max-width:992px) {
    .mobile-menu-btn {
        display: inline-flex
    }

    .sidebar {
        left: -290px;
        height: 100vh;
        overflow-y: auto
    }

    .sidebar.show {
        left: 0
    }

    .sidebar-backdrop.show {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, .55);
        z-index: 999
    }

    .main {
        margin-left: 0;
        width: 100%
    }

    .topbar {
        padding: 14px 16px;
        align-items: flex-start
    }

    .page {
        padding: 20px 16px
    }

    .page-title h1 {
        font-size: 22px
    }

    .top-actions {
        width: 100%;
        justify-content: flex-end
    }

    .search-box {
        display: none
    }

    .filter-grid {
        grid-template-columns: 1fr
    }

    .detail-grid {
        grid-template-columns: 1fr
    }
}

@media(max-width:576px) {
    .kpi h2 {
        font-size: 24px
    }

    .cardx-body {
        padding: 16px
    }

    .cardx-header {
        padding: 16px
    }
}