
:root {
    --bg: #eef5ff;
    --surface: #fff;
    --navy: #06275a;
    --blue: #2563eb;
    --green: #10b981;
    --orange: #f97316;
    --purple: #7c3aed;
    --danger: #ef4444;
    --text: #0f1f3a;
    --muted: #64748b;
    --line: #d8e2f0;
    --shadow: 0 18px 50px rgba(15,31,58,.14);
    --radius: 18px
}

* {
    box-sizing: border-box
}

html, body {
    margin: 0;
    min-height: 100%;
    font-family: Segoe UI,Arial,sans-serif;
    background: var(--bg);
    color: var(--text)
}

a {
    text-decoration: none;
    color: inherit
}

.container {
    width: min(1160px,calc(100% - 32px));
    margin: auto
}

.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 24px rgba(15,31,58,.06)
}

.nav-inner {
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    font-size: 18px;
    font-weight: 900;
    color: var(--navy)
}

.logo {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg,#3b82f6,#1d4ed8);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 900
}

.menu {
    display: flex;
    align-items: center;
    gap: 4px
}

    .menu a {
        padding: 10px 13px;
        border-radius: 12px;
        color: #334155;
        font-weight: 800;
        font-size: 14px
    }

        .menu a:hover {
            background: #eef5ff;
            color: #1d4ed8
        }

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px
}

.header-user {
    background: #eef5ff;
    color: #1d4ed8;
    padding: 10px 13px;
    border-radius: 999px;
    font-weight: 900
}

.login-only {
    display: none
}

.btn {
    border: 1px solid var(--line);
    background: #fff;
    color: var(--text);
    border-radius: 14px;
    padding: 11px 17px;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 900;
    box-shadow: 0 6px 16px rgba(15,31,58,.05)
}

.btn-primary {
    background: linear-gradient(135deg,#2f6df3,#1749b9);
    border: 0;
    color: #fff
}

.btn-green {
    background: linear-gradient(135deg,#10b981,#047857);
    border: 0;
    color: #fff
}

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

.btn-warning {
    background: linear-gradient(135deg,#f97316,#c2410c);
    border: 0;
    color: #fff
}

.btn-purple {
    background: linear-gradient(135deg,#8b5cf6,#6d28d9);
    border: 0;
    color: #fff
}

.btn-block {
    width: 100%
}

.section {
    padding: 28px 0
}

.grid {
    display: grid;
    gap: 16px
}

.grid-2 {
    grid-template-columns: repeat(2,1fr)
}

.grid-3 {
    grid-template-columns: repeat(3,1fr)
}

.grid-4 {
    grid-template-columns: repeat(4,1fr)
}

.grid-5 {
    grid-template-columns: repeat(5,1fr)
}

.card {
    background: #fff;
    border: 1px solid #e2eaf5;
    border-radius: var(--radius);
    box-shadow: 0 14px 32px rgba(15,31,58,.07);
    overflow: hidden
}

.card-pad {
    padding: 20px
}

.field, select, textarea {
    width: 100%;
    min-height: 44px;
    padding: 11px 14px;
    border-radius: 13px;
    border: 1px solid #cfdbea;
    background: #f8fbff;
    color: #0f1f3a;
    outline: none;
    font-size: 15px
}

textarea {
    min-height: 96px;
    resize: vertical
}

.form-group {
    margin-bottom: 13px
}

    .form-group label {
        display: block;
        margin-bottom: 7px;
        font-size: 13px;
        font-weight: 900
    }

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px
}

.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: #e8f7ef;
    color: #08734e;
    font-weight: 900;
    font-size: 13px
}

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

.mt-20 {
    margin-top: 20px
}

.center {
    text-align: center
}

.message {
    display: block;
    visibility: hidden;
    min-height: 48px;
    height: 48px;
    overflow: auto;
    padding: 11px 14px;
    border-radius: 14px;
    margin: 12px 0 14px;
    font-weight: 850;
    background: #f8fbff;
    border: 1px solid var(--line)
}

.message-error, .message-success, .message-warning, .message-info {
    visibility: visible !important
}

.message-error {
    color: #991b1b;
    background: #fef2f2;
    border-color: #fecaca
}

.message-success {
    color: #065f46;
    background: #ecfdf5;
    border-color: #a7f3d0
}

.message-warning {
    color: #92400e;
    background: #fffbeb;
    border-color: #fde68a
}

.message-info {
    color: #1e40af;
    background: #eff6ff;
    border-color: #bfdbfe
}

.login-page {
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
    padding: 10px 0;
    background: radial-gradient(circle at left top,rgba(96,165,250,.34),transparent 38%),linear-gradient(135deg,#e6f2ff,#f8fbff)
}

.login-wrap {
    width: min(940px,calc(100% - 28px));
    margin: auto;
    display: grid;
    grid-template-columns: 1.08fr .92fr;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: #fff
}

.login-left {
    background: linear-gradient(145deg,#071e45,#0b3a83);
    color: #fff;
    padding: 34px;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center
}

.coin {
    width: 118px;
    height: 118px;
    border-radius: 50%;
    background: linear-gradient(135deg,#60a5fa,#2563eb);
    display: grid;
    place-items: center;
    font-size: 54px
}

.login-right {
    padding: 34px;
    display: flex;
    flex-direction: column;
    justify-content: center
}

.captcha-row {
    display: grid;
    grid-template-columns: 1fr 124px 48px;
    gap: 10px;
    align-items: center
}

.captcha-box {
    height: 44px;
    border-radius: 13px;
    border: 1px solid #b7c7ff;
    background: #eef2ff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1d4ed8;
    font-size: 21px;
    font-weight: 950;
    letter-spacing: 5px;
    user-select: none;
    text-decoration: line-through
}

.refresh-icon {
    height: 44px;
    width: 48px;
    padding: 0;
    font-size: 22px
}

.layout {
    display: grid;
    grid-template-columns: 292px 1fr;
    min-height: 100vh
}

.sidebar {
    width: 292px;
    background: linear-gradient(180deg,#061a3a,#082b5e);
    color: #fff;
    padding: 22px 18px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: auto
}

    .sidebar .brand {
        color: #fff;
        border-bottom: 1px solid rgba(255,255,255,.14);
        padding-bottom: 16px
    }

.main {
    padding: 24px;
    min-width: 0
}

.admin-mobile-bar {
    display: none
}

.admin-accordion {
    margin-top: 20px
}

.accordion-group {
    margin-bottom: 12px
}

.accordion-header {
    width: 100%;
    min-height: 52px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.08);
    color: #fff;
    border-radius: 16px;
    padding: 13px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 950;
    letter-spacing: .04em
}

.arrow {
    font-size: 22px;
    transition: .2s
}

.accordion-group.open .arrow {
    transform: rotate(90deg)
}

.accordion-body {
    display: none;
    padding: 10px 0 0 16px
}

.accordion-group.open .accordion-body {
    display: grid;
    gap: 8px
}

.accordion-body a {
    min-height: 42px;
    display: flex;
    align-items: center;
    padding: 10px 13px;
    border-radius: 14px;
    color: #dbeafe;
    font-weight: 800
}

    .accordion-body a:hover, .accordion-body a.active {
        background: rgba(255,255,255,.12);
        color: #fff
    }

.accordion-logout {
    margin-top: 18px
}

    .accordion-logout a {
        min-height: 50px;
        display: flex;
        align-items: left;
        justify-content: left;
        border-radius: 16px;
        background: rgba(239,68,68,.18);
        color: #fecaca;
        font-weight: 950;
        padding-left:20px
    }

.topbar, .section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px
}

    .topbar h1, .section-head h2 {
        margin: 0;
        font-size: 28px;
        color: #17233d
    }

.stat {
    padding: 18px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid #e2eaf5;
    box-shadow: 0 14px 32px rgba(15,31,58,.07)
}

    .stat b {
        display: block;
        color: #fff;
        font-size: 12px;
        text-transform: uppercase;
        margin-bottom: 8px
    }

    .stat strong {
        font-size: 28px;
        color: #fff
    }

    .stat span {
        color: rgba(255,255,255,.85)
    }

.stat-blue {
    background: linear-gradient(135deg,#2563eb,#1e40af)
}

.stat-green {
    background: linear-gradient(135deg,#10b981,#047857)
}

.stat-orange {
    background: linear-gradient(135deg,#f97316,#c2410c)
}

.stat-purple {
    background: linear-gradient(135deg,#8b5cf6,#6d28d9)
}

.stat-red {
    background: linear-gradient(135deg,#ef4444,#b91c1c)
}

.table-wrap {
    overflow: auto;
    border: 1px solid #e2eaf5;
    border-radius: 18px
}

.table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    background: #fff
}

    .table th, .table td {
        padding: 14px;
        border-bottom: 1px solid #e2eaf5;
        text-align: left;
        vertical-align: middle
    }

    .table th {
        background: #f8fbff;
        color: #17233d;
        font-size: 13px;
        text-transform: uppercase
    }

.status {
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900
}

.paid {
    background: #dcfce7;
    color: #166534
}

.pending {
    background: #fef3c7;
    color: #92400e
}

.cancel {
    background: #fee2e2;
    color: #991b1b
}

.search-box {
    background: #fff;
    border: 1px solid #e2eaf5;
    border-radius: 18px;
    padding: 16px;
    display: grid;
    grid-template-columns: 1.2fr .8fr .8fr auto;
    gap: 12px
}

.event-img {
    height: 220px;
    width: 100%;
    overflow: hidden;
    background: #dbeafe;
    display: grid;
    place-items: center;
    position: relative
}

    .event-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block
    }

.event-emoji {
    font-size: 62px
}

.tag {
    position: absolute;
    top: 12px;
    left: 12px;
    border-radius: 999px;
    background: #fff;
    color: #2563eb;
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 900
}

.event-title {
    font-size: 18px;
    font-weight: 950;
    margin: 0 0 8px
}

.price {
    color: #1d4ed8;
    font-weight: 950
}

.event-detail-hero {
    position: relative;
    min-height: 430px;
    overflow: hidden;
    background: #121212;
    color: #fff
}

.event-detail-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: .58
}

    .event-detail-bg:after {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(90deg,#111 0%,rgba(17,17,17,.88) 24%,rgba(17,17,17,.55) 56%,rgba(17,17,17,.20) 100%)
    }

.event-detail-content {
    position: relative;
    z-index: 2;
    min-height: 430px;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
    align-items: center;
    width: min(1160px,calc(100% - 32px));
    margin: auto;
    padding: 34px 0
}

.event-poster {
    width: 100%;
    max-width: 280px;
    height: 390px;
    border-radius: 16px;
    overflow: hidden;
    background: #1e293b
}

    .event-poster img {
        width: 100%;
        height: 100%;
        object-fit: cover
    }

.event-title-xl {
    font-size: 34px;
    color: #fff
}

.event-desc {
    max-width: 720px;
    color: #e5e7eb;
    line-height: 1.65
}

.book-red {
    min-width: 220px;
    background: #e8344f !important;
    border: 0 !important;
    color: #fff !important
}

.seat-map {
    display: grid;
    grid-template-columns: repeat(10,1fr);
    gap: 8px
}

.seat {
    aspect-ratio: 1;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #eef5ff;
    border: 1px solid #cbdaf0;
    font-size: 11px;
    font-weight: 900;
    cursor: pointer
}

    .seat.selected {
        background: #2563eb;
        color: #fff
    }

    .seat.booked {
        background: #64748b;
        color: #e2e8f0;
        cursor: not-allowed
    }

    .seat.blocked {
        background: #ef4444;
        color: #fff;
        cursor: not-allowed
    }

.layout-canvas {
    background: #f8fbff;
    border: 1px solid #e2eaf5;
    border-radius: 18px;
    padding: 16px;
    overflow: auto
}

.stage {
    height: 38px;
    border-radius: 12px;
    background: #0f172a;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    font-weight: 900
}

.designer-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap
}

.designer-seat {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: #eef5ff;
    border: 1px solid #cbdaf0;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer
}

    .designer-seat.blocked {
        background: #fee2e2;
        border-color: #ef4444;
        color: #991b1b
    }

    .designer-seat.vip {
        background: #f3e8ff;
        border-color: #8b5cf6
    }

    .designer-seat.gold {
        background: #fffbeb;
        border-color: #f59e0b
    }

    .designer-seat.silver {
        background: #f8fafc;
        border-color: #94a3b8
    }

.customer-profile {
    display: grid;
    grid-template-columns: 84px 1fr auto;
    gap: 18px;
    align-items: center
}

.avatar {
    width: 84px;
    height: 84px;
    border-radius: 26px;
    display: grid;
    place-items: center;
    font-size: 38px;
    background: linear-gradient(135deg,#2563eb,#1d4ed8);
    color: #fff
}

.upload-preview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px
}

.qr-box {
    width: 190px;
    height: 190px;
    background: #fff;
    margin: auto;
    border-radius: 18px;
    display: grid;
    place-items: center
}

.qr-fake {
    width: 150px;
    height: 150px;
    background: repeating-linear-gradient(45deg,#111 0 8px,#fff 8px 16px);
    border: 8px solid #111
}

.footer {
    padding: 30px 0;
    color: #64748b;
    text-align: center
}

.mobile-toggle {
    display: none
}

@media(max-width:980px) {
    .login-wrap {
        grid-template-columns: 1fr
    }

    .login-left {
        display: none
    }

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

    .sidebar {
        position: fixed;
        left: -310px;
        top: 0;
        z-index: 99;
        transition: .2s
    }

        .sidebar.show {
            left: 0
        }

    .admin-mobile-bar {
        display: flex;
        justify-content: space-between;
        margin-bottom: 16px
    }

    .grid-5, .grid-4, .grid-3, .grid-2 {
        grid-template-columns: 1fr
    }

    .search-box {
        grid-template-columns: 1fr
    }

    .menu {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch
    }

        .menu.show {
            display: flex
        }

    .mobile-toggle {
        display: inline-flex
    }

    .nav-inner {
        flex-wrap: wrap;
        padding: 10px 0
    }

    .seat-map {
        grid-template-columns: repeat(6,1fr)
    }
}

@media(max-width:640px) {
    .form-grid, .event-detail-content, .customer-profile {
        grid-template-columns: 1fr
    }

    .seat-map {
        grid-template-columns: repeat(4,1fr)
    }
}
