:root {
    --bg: #f4f7fb;
    --card: #ffffff;
    --text: #11223b;
    --muted: #7083a0;
    --accent: #2563eb;
    --accent-2: #38bdf8;
    --warning: #f59e0b;
    --danger: #dc2626;
}

body[data-theme="dark"] {
    --bg: #0f172a;
    --card: #111c32;
    --text: #f8fafc;
    --muted: #94a3b8;
    --accent: #60a5fa;
    --accent-2: #38bdf8;
    --warning: #fbbf24;
    --danger: #f87171;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    transition: background 0.3s ease, color 0.3s ease;
}

.app-shell {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.topbar h1 {
    margin: 0;
}

.topbar p {
    margin: 4px 0 0;
    color: var(--muted);
}

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

.nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: white;
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.18);
    border: 1px solid transparent;
}

.nav-btn.active {
    background: linear-gradient(135deg, #0f766e, #2563eb);
}

.nav-btn:hover {
    text-decoration: none;
    opacity: 0.95;
}

.theme-toggle,
.add-btn,
.checkout-btn,
.remove-btn,
.primary-btn,
.mini-btn,
.delete-btn {
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.theme-toggle:hover,
.add-btn:hover,
.checkout-btn:hover,
.remove-btn:hover,
.primary-btn:hover,
.mini-btn:hover,
.delete-btn:hover {
    transform: translateY(-1px);
}

.theme-toggle {
    padding: 10px 14px;
    background: var(--card);
    color: var(--text);
}

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

.panel {
    background: var(--card);
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.pill {
    background: rgba(37, 99, 235, 0.12);
    color: var(--accent);
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.85rem;
}

.warning-box {
    background: rgba(245, 158, 11, 0.16);
    border: 1px solid rgba(245, 158, 11, 0.3);
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 16px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.product-card {
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 12px;
    background: rgba(255,255,255,0.03);
}

.price {
    font-size: 1.2rem;
    font-weight: bold;
    margin: 6px 0;
}

.stock {
    color: var(--muted);
    margin-bottom: 10px;
}

.add-btn,
.checkout-btn,
.primary-btn {
    background: var(--accent);
    color: white;
    padding: 10px 12px;
    width: 100%;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cart-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(148, 163, 184, 0.12);
}

.remove-btn {
    background: var(--danger);
    color: white;
    padding: 6px 8px;
}

.totals {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(148, 163, 184, 0.3);
}

.total-row {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
}

.payment-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.payment-form input,
.payment-form select {
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
}

.change-box {
    display: flex;
    justify-content: space-between;
    background: rgba(37, 99, 235, 0.12);
    padding: 10px;
    border-radius: 8px;
}

.inventory-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.inventory-form input,
.inventory-form select,
.search-input {
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
}

.search-input {
    width: 100%;
    margin-bottom: 10px;
}

.inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 4px;
}

.inline-form input {
    padding: 8px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
}

.mini-btn {
    padding: 8px 10px;
    background: var(--accent);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
}

.delete-btn {
    padding: 8px 10px;
    background: var(--danger);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
}

.table-list {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.table-list th,
.table-list td {
    text-align: left;
    padding: 10px 8px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.24);
    vertical-align: top;
}

.summary-row {
    background: rgba(37, 99, 235, 0.08);
    font-weight: 700;
}

.alert {
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 14px;
}

.alert.success {
    background: rgba(34, 197, 94, 0.16);
    color: #15803d;
}

.alert.error {
    background: rgba(220, 38, 38, 0.14);
    color: var(--danger);
}

.empty {
    color: var(--muted);
    margin: 0;
}

@media (max-width: 900px) {
    .content-grid {
        grid-template-columns: 1fr;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .app-shell {
        padding: 16px;
    }

    .table-list,
    .table-list thead,
    .table-list tbody,
    .table-list th,
    .table-list td,
    .table-list tr {
        display: block;
    }

    .table-list thead {
        display: none;
    }

    .table-list tr {
        margin-bottom: 12px;
        padding: 12px;
        border: 1px solid rgba(148, 163, 184, 0.24);
        border-radius: 10px;
        background: rgba(255,255,255,0.04);
    }

    .table-list td {
        padding: 6px 0;
        border-bottom: none;
    }

    .table-list td::before {
        content: attr(data-label);
        font-weight: 700;
        display: inline-block;
        width: 110px;
        color: var(--muted);
    }

    .summary-row {
        background: rgba(37, 99, 235, 0.08);
    }
}


/* Holiday & Special Events Dynamic Pricing Styles */
.promo-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(37, 99, 235, 0.12));
    border: 1px solid rgba(16, 185, 129, 0.4);
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 20px;
    color: var(--text);
}

.promo-link {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--card);
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.promo-link:hover {
    background: var(--accent);
    color: white;
}

.product-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.product-title-row h3 {
    margin: 0;
}

.promo-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.badge-discount {
    background: rgba(16, 185, 129, 0.18);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.badge-surcharge {
    background: rgba(245, 158, 11, 0.18);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.35);
}

.old-price {
    text-decoration: line-through;
    color: var(--muted);
    font-size: 0.95rem;
    margin-right: 6px;
    font-weight: normal;
}

.promo-price {
    color: #10b981;
    font-weight: 700;
}

.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-top: 4px;
}

.badge-active {
    background: #10b981;
    color: white;
}

.badge-upcoming {
    background: #2563eb;
    color: white;
}

.badge-expired {
    background: rgba(148, 163, 184, 0.2);
    color: var(--muted);
}

.badge-inactive {
    background: #ef4444;
    color: white;
}

.active-toggle {
    background: #10b981;
    color: white;
}

.inactive-toggle {
    background: #64748b;
    color: white;
}
