:root {
    --cp-bg: #09080f;
    --cp-surface: #15121f;
    --cp-border: #2a2338;
    --cp-yellow: #ffd43b;
    --cp-pink: #ff3d9a;
    --cp-text: #f8f7fb;
    --cp-muted: #9d96ac;
}

body {
    min-height: 100vh;
    background: var(--cp-bg);
    color: var(--cp-text);
}

.site-navbar {
    background: rgba(9, 8, 15, 0.94);
    border-bottom: 1px solid var(--cp-border);
}

.hero-panel,
.surface,
.auth-panel {
    background: var(--cp-surface);
    border: 1px solid var(--cp-border);
    border-radius: 8px;
}

.auth-panel {
    max-width: 420px;
}

.btn-neon {
    background: linear-gradient(135deg, var(--cp-yellow), var(--cp-pink));
    border: 0;
    color: #120a12;
    font-weight: 700;
}

.form-control {
    background: #0f0d16;
    border-color: var(--cp-border);
    color: var(--cp-text);
}

.form-control:focus {
    background: #0f0d16;
    border-color: var(--cp-pink);
    box-shadow: 0 0 0 0.2rem rgba(255, 61, 154, 0.2);
    color: var(--cp-text);
}

.text-secondary {
    color: var(--cp-muted) !important;
}

.draw-stage {
    min-height: 360px;
    display: grid;
    place-items: center;
}

.countdown-display {
    min-height: 72px;
    font-size: clamp(2.4rem, 7vw, 5rem);
    font-weight: 800;
    color: var(--cp-yellow);
}

.roulette-name {
    min-height: 86px;
    font-size: clamp(2rem, 6vw, 4.5rem);
    font-weight: 800;
    color: var(--cp-text);
    overflow-wrap: anywhere;
}

.winner-list {
    display: grid;
    gap: 0.75rem;
}

.winner-item {
    border: 1px solid var(--cp-border);
    border-radius: 8px;
    padding: 1rem;
    background: #100e17;
}

.confetti-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.food-card {
    background: var(--cp-surface);
    border: 1px solid var(--cp-border);
    border-radius: 8px;
    overflow: hidden;
}

.food-card-media {
    aspect-ratio: 16 / 9;
    background: #100e17;
    display: grid;
    place-items: center;
}

.food-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.food-card-placeholder {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--cp-yellow);
    color: #120a12;
    font-size: 2rem;
    font-weight: 800;
}

.cart-panel {
    top: 1rem;
}

.cart-line,
.admin-order-item,
.order-history-item {
    border: 1px solid var(--cp-border);
    border-radius: 8px;
    background: #100e17;
}

.cart-line {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: 0.85rem;
    margin-bottom: 0.75rem;
}

.admin-order-list,
.order-history-item + .order-history-item {
    margin-top: 0.75rem;
}

.admin-order-item,
.order-history-item {
    padding: 1rem;
}

.form-select {
    background-color: #0f0d16;
    border-color: var(--cp-border);
    color: var(--cp-text);
}

.admin-thumb {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--cp-border);
}

.admin-thumb-empty {
    display: grid;
    place-items: center;
    background: #100e17;
    color: var(--cp-yellow);
    font-weight: 800;
}

.status-badge {
    text-transform: capitalize;
}

.status-active {
    background: #198754;
}

.status-inactive {
    background: #6c757d;
}

.status-out_of_stock {
    background: #dc3545;
}

.bulk-status-select {
    width: 170px;
}

.availability-toggle {
    width: 46px;
    height: 24px;
    border-radius: 999px;
    border: 1px solid var(--cp-border);
    background: #35303f;
    position: relative;
}

.availability-toggle::after {
    content: "";
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    position: absolute;
    top: 2px;
    left: 3px;
    transition: transform 0.18s ease;
}

.availability-toggle.is-on {
    background: var(--cp-pink);
}

.availability-toggle.is-on::after {
    transform: translateX(20px);
}

.drop-zone {
    min-height: 150px;
    border: 1px dashed var(--cp-border);
    border-radius: 8px;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: #100e17;
    cursor: pointer;
    text-align: center;
}

.drop-zone.is-dragging {
    border-color: var(--cp-pink);
    box-shadow: 0 0 0 0.2rem rgba(255, 61, 154, 0.2);
}

.image-preview {
    max-width: 100%;
    max-height: 180px;
    border-radius: 8px;
    object-fit: cover;
}

.gallery-preview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.gallery-preview img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--cp-border);
}

.coupon-template-options {
    display: grid;
    gap: 0.75rem;
}

.coupon-template-option {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    border: 1px solid var(--cp-border);
    border-radius: 8px;
    padding: 0.9rem;
    cursor: pointer;
    background: #100e17;
}

.coupon-template-option small {
    display: block;
    color: var(--cp-muted);
}

.coupon-template-option input {
    width: 18px;
    height: 18px;
}

.coupon-blue {
    border-left: 5px solid #0d6efd;
}

.coupon-yellow {
    border-left: 5px solid #ffd43b;
}

.coupon-pink {
    border-left: 5px solid #ff3d9a;
}

.coupon-color-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 0.45rem;
}

.coupon-dot-blue {
    background: #0d6efd;
}

.coupon-dot-yellow {
    background: #ffd43b;
}

.coupon-dot-pink {
    background: #ff3d9a;
}

.template-list {
    display: grid;
    gap: 0.6rem;
}

.template-list-item {
    display: block;
    padding: 0.8rem;
    border: 1px solid var(--cp-border);
    border-radius: 8px;
    background: #100e17;
    color: var(--cp-text);
    text-decoration: none;
}

.template-list-item small {
    display: block;
    color: var(--cp-muted);
    margin-top: 0.25rem;
    text-transform: capitalize;
}

.template-list-item.is-active,
.template-list-item:hover {
    border-color: var(--cp-pink);
    color: var(--cp-text);
}

.builder-tabs .nav-link {
    color: var(--cp-muted);
    border-color: var(--cp-border);
}

.builder-tabs .nav-link.active {
    background: #100e17;
    border-color: var(--cp-pink);
    color: var(--cp-text);
}

.coupon-builder-stage {
    position: relative;
    width: 100%;
    overflow: auto;
    border: 1px solid var(--cp-border);
    border-radius: 8px;
    background:
        linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px),
        #0d0b13;
    background-size: 20px 20px;
    padding: 2rem;
    min-height: 680px;
}

.coupon-live-preview {
    --preview-w: 940;
    --preview-h: 540;
    position: relative;
    width: calc(var(--preview-w) * 1px);
    height: calc(var(--preview-h) * 1px);
    margin: 0 auto;
    overflow: hidden;
    border-style: solid;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.36);
    transform: scale(var(--preview-zoom, 1));
    transform-origin: top center;
}

.coupon-preview-element {
    position: absolute;
    display: block;
    padding: 0.25rem;
    border-style: solid;
    cursor: move;
    color: inherit;
    white-space: pre-line;
    overflow: hidden;
    line-height: 1.15;
    user-select: none;
}

.coupon-preview-element.is-selected {
    outline: 2px dashed var(--cp-yellow);
    outline-offset: 3px;
}

.coupon-preview-element.is-hidden {
    opacity: 0.24 !important;
}

.coupon-preview-element.type-logo {
    display: grid;
    place-items: center;
}

.coupon-preview-element.type-image img,
.coupon-preview-element.type-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.builder-ruler {
    position: sticky;
    z-index: 3;
    pointer-events: none;
    opacity: 0.5;
}

.builder-ruler-x {
    top: 0;
    left: 0;
    height: 18px;
    background: repeating-linear-gradient(90deg, var(--cp-yellow) 0 1px, transparent 1px 10px);
}

.builder-ruler-y {
    top: 0;
    left: 0;
    float: left;
    width: 18px;
    height: 620px;
    background: repeating-linear-gradient(0deg, var(--cp-yellow) 0 1px, transparent 1px 10px);
}

.analytics-card-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.85rem;
}

.analytics-stat-card {
    border: 1px solid var(--cp-border);
    border-radius: 8px;
    background: #100e17;
    padding: 1rem;
    min-height: 96px;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.22);
}

.analytics-stat-card span {
    display: block;
    color: var(--cp-muted);
    font-size: 0.82rem;
}

.analytics-stat-card strong {
    display: block;
    margin-top: 0.45rem;
    font-size: clamp(1.35rem, 2vw, 2rem);
    color: var(--cp-yellow);
}

.chart-panel {
    min-height: 320px;
}

.chart-panel canvas {
    width: 100% !important;
    height: 250px !important;
}

.reward-history-list {
    display: grid;
    gap: 0.75rem;
}

.reward-history-item {
    border: 1px solid var(--cp-border);
    border-radius: 8px;
    background: #100e17;
    padding: 0.85rem;
}

@media (max-width: 1199.98px) {
    .analytics-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .analytics-card-grid {
        grid-template-columns: 1fr;
    }
}

.logo-mark {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    font-weight: 900;
}

.fake-qr,
.fake-barcode {
    display: block;
    width: 100%;
    height: 100%;
    background-color: #fff;
}

.fake-qr {
    background-image:
        linear-gradient(90deg, #111 10px, transparent 10px),
        linear-gradient(#111 10px, transparent 10px);
    background-size: 24px 24px;
}

.fake-barcode {
    background:
        repeating-linear-gradient(90deg, #111 0 3px, #fff 3px 7px, #111 7px 9px, #fff 9px 14px);
}
