:root {
    --navy: #09264a;
    --navy-2: #123a63;
    --yellow: #ffc928;
    --ink: #1f2937;
    --muted: #6b7280;
    --line: #e5e7eb;
    --soft: #f7f9fc;
}

* {
    letter-spacing: 0;
}

body {
    font-family: 'Prompt', sans-serif;
    font-size: 14px;
    color: var(--ink);
    background: var(--soft);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

html {
    min-height: 100%;
}

body > main {
    flex: 1 0 auto;
    display: block;
    min-height: calc(100vh - 170px);
}

body > footer {
    flex-shrink: 0;
}

a {
    text-decoration: none;
}

.navbar-app {
    background: var(--navy);
    box-shadow: 0 10px 30px rgba(9, 38, 74, .16);
}

.navbar-brand-main {
    color: var(--yellow);
    font-weight: 700;
    line-height: 1.25;
}

.navbar-brand-sub {
    color: rgba(255, 255, 255, .72);
    font-size: 12px;
}

.navbar-app .nav-link {
    color: rgba(255, 255, 255, .82);
    border-radius: 8px;
}

.navbar-app .nav-link.active,
.navbar-app .nav-link:hover {
    color: var(--navy);
    background: var(--yellow);
}

.btn-yellow {
    background: var(--yellow);
    color: var(--navy);
    border-color: var(--yellow);
    font-weight: 600;
}

.btn-yellow:hover {
    background: #f2bb13;
    border-color: #f2bb13;
    color: var(--navy);
}

.btn-navy {
    background: var(--navy);
    color: #fff;
    border-color: var(--navy);
}

.btn-navy:hover {
    background: var(--navy-2);
    color: #fff;
}

.section-pad {
    padding: 28px 0;
}

.clean-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 12px 26px rgba(15, 23, 42, .06);
}

.card-header-navy {
    background: var(--navy);
    color: var(--yellow);
    border-bottom: 0;
    border-radius: 8px 8px 0 0 !important;
    font-weight: 700;
    font-size: 1.5rem;
}

.info-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.info-row:last-child {
    border-bottom: 0;
}

.map-frame {
    min-height: 260px;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    background: #f8fafc;
}

.map-frame iframe {
    width: 100%;
    height: 100%;
    min-height: 260px;
    border: 0;
}

.hero-banner {
    width: 100%;
    height: clamp(220px, 34vw, 430px);
    object-fit: cover;
    border-radius: 0;
    background: linear-gradient(135deg, var(--navy), var(--navy-2));
}

.banner-fallback {
    min-height: clamp(220px, 34vw, 430px);
    background:
        linear-gradient(rgba(9, 38, 74, .72), rgba(9, 38, 74, .72)),
        linear-gradient(135deg, #0b2e56, #f0bd18);
    color: #fff;
    display: flex;
    align-items: center;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    display: inline-block;
}

.floor-wrap {
    overflow-x: auto;
    padding-bottom: 10px;
}

.floor-grid {
    display: grid;
    gap: 8px;
    min-width: 720px;
}

.user-floor-grid {
    grid-template-columns: repeat(var(--floor-cols), minmax(110px, 1fr));
}

.floor-cell {
    min-height: 78px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    position: relative;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: transform .15s ease, box-shadow .15s ease;
    width: 100%;
}

.floor-cell.table-cell {
    cursor: pointer;
}

.floor-cell.table-cell:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(15, 23, 42, .12);
}

.floor-cell.drag-over {
    outline: 3px solid var(--yellow);
    outline-offset: 2px;
}

.floor-cell.user-hidden {
    border-color: transparent;
    background: transparent;
}

.user-floor-grid .user-round-table-cell {
    min-height: 124px;
    border-color: transparent !important;
    background: transparent;
    box-shadow: none;
    padding: 4px;
}

.user-floor-grid .user-round-table-cell:hover {
    background: rgba(255, 255, 255, .62);
    border-color: rgba(9, 38, 74, .12) !important;
}

.table-map-item {
    width: 100%;
}

.round-table {
    --table-size: 52px;
    width: var(--table-size);
    height: var(--table-size);
    margin: 0 auto 8px;
    position: relative;
    display: grid;
    place-items: center;
}

.round-table.has-seat-ring {
    --table-size: 88px;
}

.round-table-core {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at 35% 30%, #ffffff 0 6%, var(--navy) 7% 100%);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    box-shadow: inset 0 0 0 3px rgba(255, 201, 40, .32);
    z-index: 2;
}

.round-seat {
    --seat-size: 13px;
    position: absolute;
    left: 50%;
    top: 50%;
    width: var(--seat-size);
    height: var(--seat-size);
    border-radius: 50%;
    background: #fff;
    border: 2px solid #cbd5e1;
    transform: translate(-50%, -50%) rotate(var(--seat-angle)) translateY(-40px) rotate(calc(-1 * var(--seat-angle)));
    box-shadow: 0 3px 8px rgba(15, 23, 42, .14);
}

.round-seat.seat-booked,
.seat-pick-dot.seat-booked {
    border-color: transparent;
}

.round-seat.seat-warning,
.seat-pick-dot.seat-warning {
    background: #ffc107;
}

.round-seat.seat-info,
.seat-pick-dot.seat-info {
    background: #0dcaf0;
}

.round-seat.seat-success,
.seat-pick-dot.seat-success {
    background: #198754;
}

.seat-pick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
    gap: 10px;
}

.seat-pick {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 9px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    background: #fff;
}

.seat-pick:has(input:checked) {
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(9, 38, 74, .12);
}

.seat-pick.is-disabled {
    cursor: not-allowed;
    opacity: .72;
}

.seat-pick-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    border: 2px solid #cbd5e1;
    font-size: 12px;
    font-weight: 700;
}

.door-cell {
    background: #ecfeff;
    border-color: #06b6d4;
    color: #075985;
}

.door-arrow {
    width: 34px;
    height: 34px;
    margin: 0 auto 4px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #06b6d4;
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
}

.chart-box {
    height: 230px;
}

.chart-box.chart-sm {
    height: 200px;
}

.contact-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.contact-item-card {
    border-left: 6px solid var(--contact-color, var(--navy));
    overflow: hidden;
    position: relative;
}

.contact-item-card::after {
    content: "";
    position: absolute;
    right: -42px;
    top: -42px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--contact-color, var(--navy)) 12%, transparent);
}

.contact-card-inner {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.contact-card-polished {
    border-color: rgba(15, 23, 42, .08);
    box-shadow: 0 12px 24px rgba(15, 23, 42, .08);
    border-left: 5px solid var(--contact-color, var(--navy));
    position: relative;
    overflow: hidden;
}

.contact-card-polished::before {
    content: "";
    position: absolute;
    inset: 0 0 auto auto;
    width: 120px;
    height: 120px;
    background: color-mix(in srgb, var(--contact-color, var(--navy)) 12%, transparent);
    border-radius: 0 0 0 120px;
    pointer-events: none;
}

.contact-icon-wrap {
    --contact-color: var(--navy);
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: color-mix(in srgb, var(--contact-color) 14%, #fff);
    flex: 0 0 auto;
}

.contact-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    color: #fff;
    flex: 0 0 auto;
    font-size: 20px;
    background: var(--contact-color, var(--navy));
}

.contact-value {
    font-size: 1rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.contact-type-badge {
    color: inherit;
    border: 1px solid rgba(255, 255, 255, .7);
    box-shadow: 0 6px 14px rgba(15, 23, 42, .16);
}

.contact-master-card .card-body {
    background: linear-gradient(180deg, #fff, #f8fafc);
}

.contact-mini-card {
    border: 4px solid var(--contact-color, var(--navy)) !important;
    border-radius: 8px;
    background: #fff;
    padding: 18px;
    box-shadow: 0 12px 24px rgba(15, 23, 42, .07);
    position: relative;
    overflow: hidden;
}

.contact-mini-card::after {
    content: "";
    position: absolute;
    right: -32px;
    top: -32px;
    width: 104px;
    height: 104px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--contact-color, var(--navy)) 12%, transparent);
}

.contact-mini-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.contact-mini-card h2,
.contact-mini-card .contact-value,
.contact-mini-card .small-muted {
    position: relative;
    z-index: 1;
}

.howto-steps {
    display: grid;
    gap: 10px;
}

.howto-step {
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 12px;
    align-items: start;
}

.howto-step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--yellow);
    color: var(--navy);
    display: grid;
    place-items: center;
    font-weight: 700;
}

.howto-card .card-header {
    min-height: 58px;
    display: flex;
    align-items: center;
}

.howto-card-wide .howto-steps {
    grid-template-columns: 1fr;
    gap: 14px;
}

.howto-card-wide .howto-step {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 14px 16px;
    min-height: auto;
    box-shadow: 0 10px 22px rgba(15, 23, 42, .05);
    display: flex;
    align-items: center;
    gap: 14px;
}

.wheel-stage {
    display: grid;
    place-items: center;
    gap: 14px;
}

.name-wheel {
    width: min(72vw, 420px);
    aspect-ratio: 1;
    border-radius: 50%;
    border: 10px solid #fff;
    box-shadow: 0 18px 44px rgba(15, 23, 42, .18);
    position: relative;
    transition: transform 5s cubic-bezier(.12,.74,.22,1);
    overflow: hidden;
}

.name-wheel::after {
    content: "";
    position: absolute;
    inset: 50% auto auto 50%;
    width: 22px;
    height: 22px;
    transform: translate(-50%, -50%);
    background: var(--navy);
    border: 4px solid #fff;
    border-radius: 50%;
}

.wheel-pointer {
    width: 0;
    height: 0;
    border-left: 16px solid transparent;
    border-right: 16px solid transparent;
    border-top: 30px solid var(--navy);
    margin-bottom: -20px;
    z-index: 2;
}

.name-wheel.is-spinning {
    box-shadow: 0 18px 44px rgba(15, 23, 42, .18), 0 0 0 8px rgba(255, 201, 40, .18);
}

.wheel-label {
    position: absolute;
    inset: 50% auto auto 50%;
    width: 50%;
    height: 22px;
    transform-origin: 0 50%;
    transform: rotate(var(--label-angle));
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 18px;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .42);
    z-index: 1;
}

.wheel-label span {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wheel-empty,
.wheel-current {
    font-weight: 700;
    color: var(--navy);
}

.wheel-empty {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
}

.wheel-current {
    min-height: 32px;
    padding: 6px 14px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 8px 18px rgba(15, 23, 42, .08);
}

.wheel-name-list {
    max-height: 330px;
    overflow-y: auto;
}

.wheel-name-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
}

.wheel-name-row:last-child {
    border-bottom: 0;
}

.wheel-color-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    margin-top: 3px;
    flex: 0 0 auto;
}

.random-draw-layout {
    min-height: calc(100vh - 150px);
}

.draw-name-list {
    max-height: calc(100vh - 235px);
    overflow-y: auto;
}

.draw-name-row {
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
}

.draw-name-row:last-child {
    border-bottom: 0;
}

.draw-stage {
    min-height: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.draw-name-display {
    width: 100%;
    min-height: 300px;
    border: 2px solid var(--navy);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 16px 34px rgba(15, 23, 42, .12);
    display: grid;
    place-items: center;
    text-align: center;
    padding: 22px;
    font-size: 200px;
    font-weight: 800;
    color: var(--navy);
    overflow-wrap: anywhere;
    line-height: .95;
}

#drawCurrent {
    font-size: 200px !important;
}

.draw-name-display.is-rolling {
    border-color: var(--yellow);
    animation: drawPulse .18s linear infinite alternate;
}

.winner-list strong {
    color: var(--navy);
}

.draw-winner-modal {
    font-size: 42px;
    font-weight: 800;
    color: var(--navy);
    line-height: 1.25;
}

@keyframes drawPulse {
    from {
        transform: scale(1);
        box-shadow: 0 16px 34px rgba(15, 23, 42, .12);
    }
    to {
        transform: scale(1.015);
        box-shadow: 0 20px 42px rgba(255, 201, 40, .28);
    }
}

.table-code {
    font-size: 16px;
    font-weight: 700;
}

.small-muted {
    color: var(--muted);
    font-size: 12px;
}

.admin-layout {
    flex: 1 0 auto;
    min-height: 100vh;
    display: flex;
}

.admin-sidebar {
    width: 270px;
    background: var(--navy);
    color: #fff;
    position: fixed;
    inset: 0 auto 0 0;
    overflow-y: auto;
    z-index: 1030;
    transition: transform .2s ease;
}

.admin-sidebar .nav-link {
    color: rgba(255, 255, 255, .78);
    border-radius: 8px;
    padding: 10px 12px;
}

.admin-sidebar .nav-link.active,
.admin-sidebar .nav-link:hover {
    color: var(--navy);
    background: var(--yellow);
}

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

.admin-topbar {
    background: #fff;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 1020;
}

.thumb-box {
    width: 112px;
    height: 72px;
    object-fit: cover;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f3f4f6;
}

.empty-thumb {
    width: 112px;
    height: 72px;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
}

.datatable-wrapper {
    width: 100%;
}

table.dataTable {
    width: 100% !important;
}

.cell-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: #dc3545;
    color: #fff;
    z-index: 3;
    cursor: pointer;
}

.table-tooltip .tooltip-inner {
    max-width: 340px;
    padding: 0;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 16px 34px rgba(15, 23, 42, .18);
    text-align: left;
}

.table-tooltip .tooltip-arrow::before {
    border-top-color: #fff;
    border-bottom-color: #fff;
}

.tooltip-card {
    padding: 12px;
}

.tooltip-booking {
    padding: 10px 0;
    border-top: 1px solid var(--line);
}

.qr-ticket {
    width: min(100%, 520px);
    margin: 0 auto;
    background: #fff;
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

.qr-ticket-header {
    background: var(--navy);
    color: var(--yellow);
    padding: 14px 16px;
    font-weight: 700;
}

.qr-ticket-body {
    padding: 16px;
}

.status-select {
    min-width: 150px;
    color: #111827;
    font-weight: 600;
}

.status-select.pending_payment {
    background-color: #fff3cd;
    border-color: #ffda6a;
}

.status-select.pending_review {
    background-color: #cff4fc;
    border-color: #6edff6;
}

.status-select.confirmed {
    background-color: #d1e7dd;
    border-color: #75b798;
}

.status-select.rejected {
    background-color: #f8d7da;
    border-color: #ea868f;
}

#goTopBtn {
    position: fixed;
    right: 18px;
    bottom: 18px;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1090;
    box-shadow: 0 12px 24px rgba(15, 23, 42, .18);
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
}

#goTopBtn.show {
    display: inline-flex;
}

.preview-img {
    max-height: 220px;
    border-radius: 8px;
    border: 1px solid var(--line);
}

@media (max-width: 991.98px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }

    .admin-sidebar.show {
        transform: translateX(0);
    }

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

    .howto-card-wide .howto-steps {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .navbar-brand {
        max-width: calc(100vw - 92px);
        white-space: normal;
    }

    .navbar-brand-main,
    .navbar-brand-sub {
        overflow-wrap: anywhere;
    }

    .floor-grid {
        gap: 4px;
    }

    .user-floor-grid {
        min-width: 100%;
        grid-template-columns: repeat(var(--floor-cols), minmax(38px, 1fr));
    }

    .floor-cell {
        min-height: 42px;
        padding: 3px;
        border-radius: 6px;
    }

    .user-floor-grid .user-round-table-cell {
        min-height: 58px;
        padding: 1px;
    }

    .table-code {
        font-size: 10px;
    }

    .floor-cell .badge,
    .floor-cell .small-muted {
        font-size: 8px;
        line-height: 1.15;
    }

    .floor-cell .badge {
        padding: 2px 4px;
    }

    .round-table,
    .round-table.has-seat-ring {
        --table-size: 36px;
        margin-bottom: 3px;
    }

    .round-table-core {
        width: 28px;
        height: 28px;
        font-size: 8px;
        box-shadow: inset 0 0 0 2px rgba(255, 201, 40, .32);
    }

    .round-seat {
        --seat-size: 7px;
        border-width: 1px;
        transform: translate(-50%, -50%) rotate(var(--seat-angle)) translateY(-16px) rotate(calc(-1 * var(--seat-angle)));
    }

    .door-arrow {
        width: 22px;
        height: 22px;
        font-size: 14px;
    }
}
