:root {
    --primary: #FF9900;
    /* Orange FAB */
    --accent: #00FF88;
    /* Neon Green */
    --bg-dark: #050505;
    /* Deep Black */
    --bg-card: #111111;
    --card-border: #004422;
    /* Dark Green Border */
    --text-main: #ffffff;
    --text-muted: #888888;
    --danger: #FF0066;
    /* Hot Pink */
    --font-stack: 'Outfit', sans-serif;
    --safe-area-top: env(safe-area-inset-top);
    --safe-area-bottom: env(safe-area-inset-bottom);
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

body {
    background-color: var(--bg-dark);
    /* Restore Gradient Background */
    background: radial-gradient(circle at top center, #1a0d00 0%, #000000 60%);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: var(--font-stack);
    margin: 0;
    padding: 0;
    padding-top: calc(var(--safe-area-top) + 60px);
    padding-bottom: calc(var(--safe-area-bottom) + 90px);
    font-size: 14px;
}

a {
    text-decoration: none;
    color: var(--accent);
}

.admin-countdown {
    text-align: center;
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    /* Orange as requested */
    text-shadow: 0 0 15px rgba(255, 153, 0, 0.4);
    margin-bottom: 20px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 2px;
}

.admin-countdown small {
    font-size: 10px;
    color: #888;
    display: block;
    letter-spacing: 5px;
    text-transform: uppercase;
}

a {
    text-decoration: none;
    color: var(--accent);
}

.container {
    padding: 0 16px;
    width: 100%;
}

/* ================= HEADER ================= */
.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding-top: var(--safe-area-top);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* ADD BOX - CENTERED FLOATING */
/* ADD BOX - CENTERED FLOATING */
.add-box {
    width: 100%;
    max-width: 420px;
    background: #111;
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 24px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 1);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    box-sizing: border-box;
    transform: scale(0.9);
    opacity: 0;
}

.add-box.show {
    opacity: 1;
    transform: scale(1);
}

/* Modal Headers */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
    color: white;
    letter-spacing: 0.5px;
}

.modal-close {
    cursor: pointer;
    font-size: 28px;
    color: #555;
    transition: color 0.2s;
    line-height: 1;
}

.modal-close:hover {
    color: var(--danger);
}

/* Image Preview */
.img-preview-container {
    display: none;
    width: 100%;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    z-index: 20;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.img-preview-container img {
    max-width: 100%;
    height: auto;
    max-height: 120px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

/* Search Area */
.search-section {
    position: relative;
    width: 100%;
}

.link-input-group {
    display: flex;
    gap: 8px;
    align-items: center;
    width: 100%;
}

.input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    background: #222;
    border: 1px solid #333;
    border-radius: 14px;
    min-width: 0;
    /* Important for flex shrink */
}

.input-wrapper:focus-within {
    border-color: var(--accent);
}

.input-wrapper input {
    width: 100%;
    background: transparent;
    border: none;
    color: white;
    padding: 12px 14px;
    font-size: 14px;
    outline: none;
}

.btn-clear-inside {
    position: absolute;
    right: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    cursor: pointer;
}

.btn-paste-large {
    background: var(--accent);
    border: none;
    color: black;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    flex-shrink: 0;
}

/* Field Groups */
.field-label {
    display: block;
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
    font-weight: 700;
}

.input-field {
    width: 100%;
    padding: 12px;
    background: #222;
    border: 1px solid #333;
    color: white;
    border-radius: 12px;
    font-size: 14px;
    outline: none;
}

.input-field:focus {
    border-color: var(--accent);
}

/* Price & Qty Row */
.row-fields {
    display: flex;
    gap: 12px;
    width: 100%;
}

.row-fields>div:first-child {
    flex: 1;
}

.price-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.currency-symbol {
    position: absolute;
    left: 12px;
    color: #666;
    font-weight: bold;
}

.price-input-wrapper input {
    padding-left: 24px;
}

/* Quantity Stepper Fixed Row */
.qty-stepper {
    display: flex;
    flex-direction: row !important;
    /* Force row */
    align-items: center;
    background: #222;
    border: 1px solid #333;
    border-radius: 12px;
    overflow: hidden;
    width: 110px;
    height: 48px;
}

.qty-btn {
    flex: 1;
    background: #333;
    border: none;
    color: white;
    height: 100%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-input {
    width: 40px;
    text-align: center;
    background: transparent;
    border: none;
    color: white;
    font-weight: 800;
    font-size: 16px;
}

/* Main Modal Action */
.btn-submit-modal {
    width: 100%;
    padding: 16px;
    font-size: 15px;
    background: var(--primary);
    color: white;
    border: none;
    margin-top: 5px;
    font-weight: 800;
    text-transform: uppercase;
    border-radius: 14px;
    box-shadow: 0 4px 15px rgba(255, 153, 0, 0.3);
    cursor: pointer;
}

.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    /* CENTERED TITLE */
    padding: 12px 15px;
    gap: 10px;
    position: relative;
    height: 50px;
}

.header-left {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
}

.header-right {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
}

.app-title {
    font-weight: 800;
    font-size: 16px;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(255, 153, 0, 0.3);
    /* Subtle neon glow */
}

/* FILTERS (Pills) */
.filter-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 5px 15px 15px;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start;
    /* items start from left */
}

/* Hide scrollbar */
.filter-scroll::-webkit-scrollbar {
    display: none;
}

.pill {
    background: #222;
    color: #888;
    padding: 6px 16px;
    border-radius: 20px;
    /* Fully rounded pills */
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    border: 1px solid #333;
    transition: all 0.2s;
}

.pill.active {
    background: #331a00;
    color: #FF9900;
    border-color: #FF9900;
    box-shadow: 0 0 8px rgba(255, 153, 0, 0.4);
}

.pill:active {
    transform: scale(0.95);
    box-shadow: 0 0 15px rgba(255, 153, 0, 0.6);
    border-color: var(--primary);
}

/* ================= CARDS (Unified) ================= */
/* Generic .card matches .temu-card styles for Admin consistency */
.card,
.temu-card {
    background: rgba(20, 20, 20, 0.6);
    /* Glassmorphism hint from feedback */
    border-radius: 16px;
    padding: 15px;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    /* More subtle border */
    position: relative;
    transition: transform 0.1s, box-shadow 0.1s, border-color 0.1s;
    backdrop-filter: blur(5px);
}

/* Standard effect only for cards that act as links (like in dashboard) */
.temu-card[onclick]:active {
    transform: scale(0.97);
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.1);
}

/* Specific inner structures */
summary {
    outline: none;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.card-name {
    font-size: 16px;
    font-weight: 800;
    color: white;
}

.card-mid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 13px;
    color: #999;
}

.card-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #FF9900;
    font-weight: 600;
    margin-bottom: 15px;
}

.price-tag {
    color: var(--accent);
    font-weight: 700;
    font-size: 16px;
    text-shadow: 0 0 8px rgba(0, 255, 136, 0.3);
}

/* ================= BUTTONS (Unified) ================= */
.btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    transition: transform 0.1s;
}

.btn:active {
    transform: scale(0.95);
    opacity: 0.9;
}

/* Dashboard Specific Buttons */
.card-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
}

/* Common style for shared/delete to ensure alignment */
.btn-share,
.btn-delete,
.btn-manage {
    height: 40px;
    border-radius: 8px;
    font-size: 13px;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.1s;
}

.btn-share {
    flex: 1;
    /* Manage button for Admin */
    background: var(--accent);
    color: black;
    font-weight: 800;
    gap: 5px;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.2);
}

.btn-share:active {
    transform: scale(0.95);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.6);
}

.btn-delete {
    width: 40px;
    /* Square */
    background: var(--danger);
    color: white;
    box-shadow: 0 0 5px rgba(255, 0, 102, 0.3);
}

.btn-delete:active {
    transform: scale(0.95);
    background: #ff3385;
    box-shadow: 0 0 15px rgba(255, 0, 102, 0.6);
}

/* Manage button for Admin */
.btn-manage {
    flex: 1;
    background: #ff9900;
    /* FORCE ORANGE */
    color: white;
    font-weight: 700;
    border: none;
    box-shadow: 0 0 5px rgba(255, 153, 0, 0.4);
}

.btn-manage:active {
    transform: scale(0.95);
    background: #e68a00;
}


/* Unified Button Overrides */
.btn-block {
    width: 100%;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #ccc;
}

.btn-success {
    background: var(--accent);
    color: black;
}

.btn-danger {
    background: var(--danger);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-icon {
    background: transparent;
    padding: 5px;
    font-size: 20px;
    color: white;
    display: flex;
    align-items: center;
}

/* ================= SUMMARY BOX ================= */
.summary-container {
    background: rgba(6, 24, 12, 0.8);
    border: 1px solid #004422;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: inset 0 0 20px rgba(0, 255, 136, 0.05);
}

.summary-header {
    color: var(--accent);
    font-weight: 800;
    font-size: 16px;
    margin-bottom: 10px;
    text-shadow: 0 0 5px rgba(0, 255, 136, 0.5);
}

.summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.sum-box {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #004422;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
}

.sum-box.full {
    grid-column: span 2;
    background: rgba(0, 255, 136, 0.05);
}

.sum-label {
    font-size: 10px;
    color: #888;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.sum-value {
    font-size: 16px;
    font-weight: 800;
    color: white;
}

.sum-value.green {
    color: var(--accent);
    font-size: 20px;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.4);
}

/* ================= UTILS & BADGES ================= */
.status-pill {
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    box-shadow: 0 0 5px rgba(0, 255, 136, 0.2);
}

/* Re-add badge generic for admin */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.8rem;
}

.status-open {
    background: var(--accent);
    color: black;
}

.status-locked {
    background: #333;
    color: #888;
}

.status-success {
    background: var(--success);
    color: white;
}

/* FAB */
.fab {
    position: fixed;
    bottom: 30px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
    box-shadow: 0 5px 20px rgba(255, 153, 0, 0.5);
    z-index: 2000;
    transition: transform 0.2s;
}

.fab:active {
    transform: scale(0.9);
    box-shadow: 0 0 25px rgba(255, 153, 0, 0.8);
}

/* MODAL & INPUTS */
.modal-overlay {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-box {
    background: #111;
    border: 1px solid #333;
    padding: 25px;
    border-radius: 20px;
    /* More rounded */
    width: 100%;
    max-width: 350px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
    animation: slideUpFade 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

input,
select {
    width: 100%;
    background: #1a1a1a;
    /* Lighter than bg */
    border: 1px solid #333;
    padding: 16px;
    /* Bigger touch target */
    color: white;
    border-radius: 12px;
    outline: none;
    font-family: inherit;
    font-size: 16px;
    /* Prevent Zoom */
    margin-bottom: 12px;
    transition: border-color 0.2s;
}

input:focus {
    border-color: var(--primary);
    background: #222;
}

/* Neon Animations */
@keyframes neonPulse {
    0% {
        box-shadow: 0 0 5px rgba(0, 255, 136, 0.2);
    }

    50% {
        box-shadow: 0 0 20px rgba(0, 255, 136, 0.6);
    }

    100% {
        box-shadow: 0 0 5px rgba(0, 255, 136, 0.2);
    }
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================= STEP PROGRESS ================= */
.step-container {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin: 20px 0;
    padding: 0 10px;
}

.step-container::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 10px;
    width: calc(100% - 20px);
    height: 2px;
    background: #333;
    z-index: 0;
}

.progress-bar {
    position: absolute;
    top: 12px;
    left: 10px;
    height: 2px;
    background: var(--accent);
    z-index: 0;
    transition: width 0.3s;
}

.step {
    position: relative;
    z-index: 1;
    text-align: center;
    width: 30px;
}

.step-circle {
    width: 26px;
    height: 26px;
    background: #111;
    border: 2px solid #555;
    border-radius: 50%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #888;
    transition: all 0.2s;
}

/* Different Colors for Step Activation (re-adding colors) */
.step.active .step-circle {
    border-color: var(--accent);
    background: #002211;
    color: var(--accent);
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.4);
}

.step.current .step-circle {
    background: var(--accent);
    color: black;
    transform: scale(1.2);
}

.step-label {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 9px;
    text-transform: uppercase;
    color: #888;
    white-space: nowrap;
}

.step.active .step-label {
    color: var(--accent);
}

/* ================= PRODUCT ROW (Admin) ================= */
.product-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.p-img {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    background: #222;
    object-fit: cover;
}

.p-info {
    flex: 1;
    overflow: hidden;
}

.p-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px;
    font-weight: 600;
}

.p-price {
    font-weight: 700;
    color: white;
    font-size: 12px;
}

.p-copy {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--accent);
    width: 24px;
    height: 24px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.p-copy:active {
    background: var(--accent);
    color: black;
}

/* ================= TOGGLES ================= */
.toggle-group {
    display: flex;
    justify-content: space-around;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 10px;
    margin-top: 10px;
}

.toggle-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    position: relative;
    gap: 5px;
}

.toggle-item small {
    font-size: 10px;
    color: #666;
    font-weight: 700;
    text-transform: uppercase;
}

.toggle-switch {
    width: 40px;
    height: 20px;
    background: #333;
    border-radius: 10px;
    position: relative;
    transition: background 0.3s;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    left: 2px;
    top: 2px;
    width: 16px;
    height: 16px;
    background: #888;
    border-radius: 50%;
    transition: transform 0.3s, background 0.3s;
}

/* Checked State */
.toggle-item input {
    display: none;
}

.toggle-item input:checked+.toggle-switch {
    background: rgba(0, 255, 136, 0.2);
}

.toggle-item input:checked+.toggle-switch::after {
    transform: translateX(20px);
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}

/* Color Variants */
.toggle-item.t-paid input:checked+.toggle-switch::after {
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary);
}

.toggle-item.t-paid input:checked+.toggle-switch {
    background: rgba(255, 153, 0, 0.2);
}

/* ================= FLASHY COUNTDOWN ================= */
.admin-countdown {
    text-align: center;
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    /* Orange */
    text-shadow: 0 0 15px rgba(255, 153, 0, 0.4);
    margin-bottom: 15px;
    /* Less margin */
    font-variant-numeric: tabular-nums;
    letter-spacing: 2px;
}

.admin-countdown small {
    font-size: 10px;
    color: #888;
    display: block;
    letter-spacing: 5px;
    text-transform: uppercase;
}