/* CivSpoons - JD Wetherspoons App Inspired Theme */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --wsp-blue: #003580;
    --wsp-blue-dark: #002a66;
    --wsp-blue-light: #0050b3;
    --wsp-blue-accent: #1a73e8;
    --wsp-green: #00703c;
    --wsp-green-light: #00a854;
    --wsp-red: #d4351c;
    --wsp-gold: #f0b400;
    --wsp-orange: #f47738;
    --bg-primary: #f0f2f5;
    --bg-card: #FFFFFF;
    --bg-dark: #1d2d3d;
    --text-primary: #1a1a1a;
    --text-secondary: #6c757d;
    --text-muted: #9ca3af;
    --text-light: #FFFFFF;
    --border-color: #e8e8e8;
    --border-light: #f0f0f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 2px 8px rgba(0,0,0,0.12);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.15);
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    padding-bottom: 70px; /* space for bottom nav */
    -webkit-font-smoothing: antialiased;
}

/* ==================== TOP HEADER BAR ==================== */
.navbar {
    background: var(--wsp-blue);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    height: 56px;
    gap: 16px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-light);
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: -0.3px;
}

.logo-icon { font-size: 1.4rem; }

.nav-links {
    display: flex;
    gap: 2px;
    flex: 1;
    justify-content: center;
}

.nav-link {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.15s;
    white-space: nowrap;
    letter-spacing: 0.2px;
}

.nav-link:hover { color: #fff; background: rgba(255,255,255,0.12); }
.nav-link.active { color: #fff; background: rgba(255,255,255,0.18); }

.nav-auth { margin-left: auto; }

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    border: 2px solid rgba(255,255,255,0.3);
    image-rendering: pixelated;
}

.user-name {
    color: var(--text-light);
    font-size: 0.85rem;
    font-weight: 600;
}

.btn-logout {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.78rem;
    padding: 4px 10px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 4px;
    transition: all 0.15s;
}
.btn-logout:hover { background: rgba(255,255,255,0.1); color: #fff; }

.btn-discord-login {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #5865F2;
    color: #fff;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.15s;
    white-space: nowrap;
}
.btn-discord-login:hover { background: #4752C4; }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 1px;
}

/* ==================== BOTTOM TAB BAR ==================== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid var(--border-color);
    z-index: 90;
    display: flex;
    justify-content: center;
    padding: 0;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.06);
}

.bottom-nav-inner {
    display: flex;
    max-width: 600px;
    width: 100%;
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 8px 4px 10px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.68rem;
    font-weight: 600;
    transition: color 0.15s;
    position: relative;
    letter-spacing: 0.2px;
}
.bottom-nav-item svg,
.bottom-nav-item .bottom-nav-icon {
    width: 22px;
    height: 22px;
    fill: currentColor;
    font-size: 1.25rem;
    line-height: 1;
}
.bottom-nav-item:hover { color: var(--wsp-blue); }
.bottom-nav-item.active { color: var(--wsp-blue); }
.bottom-nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20%;
    right: 20%;
    height: 3px;
    background: var(--wsp-blue);
    border-radius: 0 0 3px 3px;
}

/* ==================== MAIN CONTENT ==================== */
.main-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0;
    min-height: calc(100vh - 126px);
}

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    white-space: nowrap;
    letter-spacing: 0.2px;
}

.btn-primary { background: var(--wsp-blue); color: #fff; }
.btn-primary:hover { background: var(--wsp-blue-light); }
.btn-secondary { background: #e8e8e8; color: var(--text-primary); }
.btn-secondary:hover { background: #d5d5d5; }
.btn-success { background: var(--wsp-green); color: #fff; }
.btn-success:hover { background: #005a30; }
.btn-danger { background: var(--wsp-red); color: #fff; }
.btn-danger:hover { background: #b5170c; }
.btn-gold { background: var(--wsp-gold); color: #1a1a1a; font-weight: 700; }
.btn-gold:hover { background: #d4a000; }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-xs { padding: 4px 10px; font-size: 0.75rem; }
.btn-block { width: 100%; }
.btn-outline {
    background: transparent;
    border: 2px solid var(--wsp-blue);
    color: var(--wsp-blue);
}
.btn-outline:hover { background: var(--wsp-blue); color: #fff; }
.btn-outline-white {
    background: transparent;
    border: 2px solid rgba(255,255,255,0.5);
    color: #fff;
}
.btn-outline-white:hover { background: rgba(255,255,255,0.15); }

/* ==================== CARDS ==================== */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-header {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 700;
}

.card-body { padding: 16px 20px; }

/* ==================== PAGE HEADER ==================== */
.page-header {
    text-align: center;
    padding: 24px 16px 16px;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ==================== PUB SELECTION ==================== */
.pub-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0 0 16px;
}

.pub-card {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: background 0.15s;
    display: flex;
    align-items: stretch;
    overflow: hidden;
}
.pub-card:first-child { border-top: 1px solid var(--border-light); }
.pub-card:hover { background: #f8f9fa; }
.pub-card.pub-closed { opacity: 0.5; }

.pub-card-image {
    width: 100px;
    min-height: 90px;
    background: linear-gradient(135deg, var(--wsp-blue), var(--wsp-blue-light));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
    position: relative;
}

.pub-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pub-card-body {
    padding: 14px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.pub-card-body h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 2px;
    color: var(--text-primary);
}

.pub-card-body .pub-location {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-bottom: 3px;
}

.pub-card-body .pub-description {
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pub-status {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.pub-status.open { background: var(--wsp-green); color: #fff; }
.pub-status.closed { background: var(--wsp-red); color: #fff; }

.pub-card-arrow {
    display: flex;
    align-items: center;
    padding: 0 16px;
    color: var(--text-muted);
    font-size: 1.2rem;
}

/* ==================== SELECTED PUB BAR ==================== */
.selected-pub-bar {
    background: #fff;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 56px;
    z-index: 20;
}
.selected-pub-bar h2 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
}
.selected-pub-bar .pub-loc {
    font-size: 0.78rem;
    color: var(--text-secondary);
}
.change-pub-link {
    color: var(--wsp-blue);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    background: none;
    border: none;
    text-decoration: none;
}
.change-pub-link:hover { text-decoration: underline; }

/* ==================== SEARCH BAR ==================== */
.menu-search-bar {
    padding: 12px 16px;
    background: #fff;
    border-bottom: 1px solid var(--border-light);
}

.menu-search-input {
    width: 100%;
    padding: 10px 14px 10px 38px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.85rem;
    font-family: inherit;
    background: var(--bg-primary);
    transition: border-color 0.15s;
}
.menu-search-input:focus {
    outline: none;
    border-color: var(--wsp-blue);
}

.menu-search-wrap {
    position: relative;
}
.menu-search-wrap::before {
    content: '🔍';
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.85rem;
}

/* ==================== CATEGORY TABS (List Style) ==================== */
.category-tabs {
    display: flex;
    gap: 0;
    overflow-x: auto;
    padding: 0;
    background: #fff;
    border-bottom: 2px solid var(--border-color);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.category-tabs::-webkit-scrollbar { display: none; }

.category-tab {
    padding: 12px 18px;
    font-size: 0.82rem;
    font-weight: 600;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
    color: var(--text-secondary);
    margin-bottom: -2px;
}
.category-tab:hover { color: var(--wsp-blue); }
.category-tab.active {
    color: var(--wsp-blue);
    border-bottom-color: var(--wsp-blue);
}

/* Category list (alternative vertical layout) */
.category-list {
    background: #fff;
}

.category-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: background 0.1s;
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text-primary);
}
.category-list-item:hover { background: #f8f9fa; }
.category-list-item .cat-icon { margin-right: 12px; font-size: 1.1rem; }
.category-list-item .cat-arrow { color: var(--text-muted); font-size: 0.9rem; }

/* ==================== MENU ITEMS ==================== */
.menu-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.menu-item-card {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: stretch;
    transition: background 0.1s;
    cursor: pointer;
}
.menu-item-card:hover { background: #fafafa; }

.menu-item-image {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, #e8edf2, #dce3eb);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
}

.menu-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.menu-item-body {
    padding: 12px 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.menu-item-name {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 2px;
    color: var(--text-primary);
}

.menu-item-desc {
    color: var(--text-secondary);
    font-size: 0.78rem;
    line-height: 1.3;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.menu-item-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.menu-item-price {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 3px;
}

.currency-icon {
    width: 16px;
    height: 16px;
    vertical-align: middle;
}

.btn-add-item {
    background: var(--wsp-blue);
    color: #fff;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    flex-shrink: 0;
}
.btn-add-item:hover { background: var(--wsp-blue-light); }

.menu-item-action {
    display: flex;
    align-items: center;
    padding: 0 14px;
}

/* ==================== BASKET SIDEBAR ==================== */
.basket-sidebar {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    max-width: 92vw;
    height: 100vh;
    background: var(--bg-card);
    box-shadow: var(--shadow-lg);
    z-index: 200;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}
.basket-sidebar.open { right: 0; }

.basket-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
}
.basket-header h2 {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-primary);
}
.basket-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}
.basket-clear-link {
    color: var(--wsp-blue);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    background: none;
    border: none;
}
.basket-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

.basket-pub-bar {
    padding: 10px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.82rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.basket-items {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.basket-section-header {
    padding: 10px 16px 6px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #f8f9fa;
    border-bottom: 1px solid var(--border-light);
}

.basket-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
}

.basket-item-info { flex: 1; min-width: 0; }
.basket-item-name {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text-primary);
    margin-bottom: 2px;
}
.basket-item-price {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
}

.basket-item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.basket-item-total {
    font-weight: 800;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.basket-item-qty {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1.5px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: #fff;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--wsp-blue);
    transition: background 0.1s;
}
.qty-btn:hover { background: #f0f2f5; }

.qty-val {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 700;
    border-left: 1.5px solid var(--border-color);
    border-right: 1.5px solid var(--border-color);
}

.basket-item-remove {
    color: var(--wsp-red);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.75rem;
    padding: 2px;
    font-weight: 600;
}

.basket-footer {
    padding: 12px 16px 16px;
    border-top: 1px solid var(--border-color);
    background: #fff;
}

.basket-total {
    display: flex;
    justify-content: space-between;
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 12px;
    padding: 8px 0;
}

.basket-empty {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-muted);
}
.basket-empty-icon { font-size: 2.5rem; margin-bottom: 12px; }
.basket-empty p { font-size: 0.9rem; }

.basket-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.45);
    z-index: 199;
    display: none;
    transition: opacity 0.3s;
}
.basket-overlay.open { display: block; }

.basket-fab {
    position: fixed;
    bottom: 80px;
    right: 20px;
    background: var(--wsp-green);
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,112,60,0.35);
    z-index: 50;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.2px;
}
.basket-fab:hover { background: #005a30; transform: translateY(-1px); }
.basket-fab-badge {
    background: #fff;
    color: var(--wsp-green);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
}

/* ==================== CHECKOUT ==================== */
.checkout-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 16px 24px;
}

.checkout-section {
    margin-bottom: 12px;
}

.checkout-section h3 {
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 12px;
    padding-bottom: 8px;
    color: var(--text-primary);
}

.checkout-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.88rem;
}

.checkout-item-name { color: var(--text-secondary); }
.checkout-item-total { font-weight: 700; }

.checkout-summary {
    background: #f8f9fa;
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-top: 12px;
}

.checkout-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 0.88rem;
}
.checkout-row.total {
    font-size: 1.1rem;
    font-weight: 800;
    border-top: 2px solid var(--border-color);
    padding-top: 10px;
    margin-top: 10px;
    margin-bottom: 0;
}

.discount-badge {
    background: var(--wsp-green);
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
}

/* ==================== FORMS ==================== */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.88rem;
    font-family: inherit;
    transition: border-color 0.15s;
    background: #fff;
}
.form-control:focus {
    outline: none;
    border-color: var(--wsp-blue);
    box-shadow: 0 0 0 3px rgba(0,53,128,0.08);
}

select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 70px; }

/* ==================== ORDER CONFIRMATION ==================== */
.confirmation-container {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
    padding: 24px 16px;
}

.confirmation-icon {
    font-size: 3.5rem;
    margin-bottom: 12px;
}

.confirmation-number {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--wsp-blue);
    margin: 10px 0;
    letter-spacing: 2px;
}

/* ==================== TABS ==================== */
.tab-nav {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 20px;
    overflow-x: auto;
    background: #fff;
    scrollbar-width: none;
}
.tab-nav::-webkit-scrollbar { display: none; }

.tab-btn {
    padding: 12px 18px;
    background: none;
    border: none;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-secondary);
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.15s;
    white-space: nowrap;
}
.tab-btn:hover { color: var(--wsp-blue); }
.tab-btn.active { color: var(--wsp-blue); border-bottom-color: var(--wsp-blue); }

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ==================== DASHBOARD PANELS ==================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
    padding: 0 16px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 16px 20px;
    box-shadow: var(--shadow-sm);
}
.stat-card h4 {
    font-size: 0.72rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 6px;
    font-weight: 700;
}
.stat-card .stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary);
}

/* ==================== TABLE ==================== */
.table-container { overflow-x: auto; }

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}
.data-table th {
    text-align: left;
    padding: 10px 14px;
    background: #f8f9fa;
    font-weight: 700;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.data-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}
.data-table tr:hover { background: #f8f9fa; }

/* ==================== STATUS BADGES ==================== */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-confirmed { background: #dbeafe; color: #1e40af; }
.badge-ready { background: #d1fae5; color: #065f46; }
.badge-collected { background: #e5e7eb; color: #374151; }
.badge-cancelled { background: #fee2e2; color: #991b1b; }
.badge-admin { background: var(--wsp-blue); color: #fff; }
.badge-franchise { background: var(--wsp-gold); color: #1a1a1a; }
.badge-shareholder { background: #1a73e8; color: #fff; }
.badge-user { background: #e8e8e8; color: var(--text-secondary); }

/* ==================== MODAL ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.45);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-overlay.hidden { display: none; }

.modal {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-header h3 { font-size: 1rem; font-weight: 800; }
.modal-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 4px;
}

.modal-body { padding: 20px; }

.modal-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* ==================== SHAREHOLDER/HERO ==================== */
.hero-banner {
    background: linear-gradient(135deg, var(--wsp-blue-dark), var(--wsp-blue));
    padding: 32px 24px;
    color: #fff;
    text-align: center;
    margin-bottom: 20px;
}
.hero-banner h1 { font-size: 1.6rem; margin-bottom: 6px; font-weight: 800; }
.hero-banner p { opacity: 0.85; font-size: 0.95rem; }

.perks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.perk-card {
    background: rgba(255,255,255,0.1);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
}
.perk-card .perk-icon { font-size: 1.8rem; margin-bottom: 6px; }
.perk-card h3 { font-size: 0.9rem; margin-bottom: 3px; }
.perk-card p { font-size: 0.8rem; opacity: 0.8; }

/* ==================== LOGIN PROMPT ==================== */
.login-prompt {
    text-align: center;
    padding: 60px 20px;
}
.login-prompt-icon { font-size: 3.5rem; margin-bottom: 16px; }
.login-prompt h2 { margin-bottom: 8px; font-weight: 800; }
.login-prompt p { color: var(--text-secondary); margin-bottom: 20px; }

/* ==================== TOGGLE SWITCH ==================== */
.toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #ccc;
    border-radius: 24px;
    transition: 0.2s;
}
.toggle-slider:before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: 0.2s;
}
.toggle input:checked + .toggle-slider { background: var(--wsp-green); }
.toggle input:checked + .toggle-slider:before { transform: translateX(20px); }

/* ==================== TOAST NOTIFICATIONS ==================== */
.toast-container {
    position: fixed;
    top: 70px;
    right: 16px;
    z-index: 400;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: #1a1a1a;
    color: #fff;
    padding: 12px 18px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 340px;
}
.toast.success { border-left: 4px solid var(--wsp-green); }
.toast.error { border-left: 4px solid var(--wsp-red); }
.toast.info { border-left: 4px solid var(--wsp-blue); }

@keyframes toastIn {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ==================== BACK BUTTON ==================== */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    background: none;
    border: none;
    padding: 12px 16px;
}
.back-btn:hover { color: var(--wsp-blue); }

/* ==================== ORDER STEPS ==================== */
.steps-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px 16px;
    background: #fff;
    border-bottom: 1px solid var(--border-light);
}

.step {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
}
.step.active { color: var(--wsp-blue); }
.step.completed { color: var(--wsp-green); }
.step-number {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    border: 2px solid var(--border-color);
    font-weight: 800;
}
.step.active .step-number { border-color: var(--wsp-blue); background: var(--wsp-blue); color: #fff; }
.step.completed .step-number { border-color: var(--wsp-green); background: var(--wsp-green); color: #fff; }
.step-divider { width: 24px; height: 2px; background: var(--border-color); }

/* ==================== EMPTY STATE ==================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}
.empty-state-icon { font-size: 2.5rem; margin-bottom: 12px; }
.empty-state h3 { color: var(--text-primary); margin-bottom: 6px; font-weight: 700; }

/* ==================== LOADING ==================== */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}
.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-color);
    border-top-color: var(--wsp-blue);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin: 0 auto 10px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ==================== ACTION BAR ==================== */
.action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 16px;
}

/* ==================== PAYMENT OPTION ==================== */
.payment-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    cursor: pointer;
    margin-bottom: 8px;
    transition: border-color 0.15s;
}
.payment-option:hover { border-color: var(--wsp-blue); }
.payment-option.selected { border-color: var(--wsp-blue); background: rgba(0,53,128,0.03); }
.payment-option input[type="radio"] { accent-color: var(--wsp-blue); }
.payment-option-info { flex: 1; }
.payment-option-info strong { font-size: 0.9rem; display: block; margin-bottom: 2px; }
.payment-option-info span { font-size: 0.8rem; color: var(--text-secondary); }

.payment-info-box {
    margin-top: 12px;
    padding: 14px 16px;
    border-radius: var(--radius);
    font-size: 0.85rem;
    line-height: 1.6;
}
.payment-info-box.monument { background: #f0f4ff; border-left: 4px solid var(--wsp-blue); }
.payment-info-box.setup { background: #f0fdf4; border-left: 4px solid var(--wsp-green); }

/* ==================== PROMO INPUT ==================== */
.promo-row {
    display: flex;
    gap: 8px;
}
.promo-row .form-control { text-transform: uppercase; flex: 1; }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    body { padding-bottom: 64px; }

    .nav-links, .nav-auth { display: none; }
    .nav-links.open, .nav-auth.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 56px;
        left: 0;
        right: 0;
        background: var(--wsp-blue-dark);
        padding: 12px;
        gap: 4px;
        z-index: 101;
    }
    .nav-auth.open { top: auto; border-top: 1px solid rgba(255,255,255,0.1); }
    .nav-toggle { display: flex; }

    .main-content { padding: 0; }
    .dashboard-grid { grid-template-columns: 1fr 1fr; }
    .perks-grid { grid-template-columns: 1fr 1fr; }

    .basket-fab { bottom: 72px; right: 16px; }
}

@media (max-width: 480px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .steps-bar { gap: 4px; }
    .step { font-size: 0.72rem; }
    .step-divider { width: 16px; }
}

/* ==================== CURRENCY SELECT ==================== */
.currency-select-wrap {
    padding: 8px 16px;
    background: #fff;
    border-bottom: 1px solid var(--border-light);
}
.currency-select-wrap select {
    padding: 6px 10px;
    border: 1.5px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.82rem;
    font-weight: 600;
    background: #fff;
    cursor: pointer;
}

/* ==================== MISC HELPERS ==================== */
.px-16 { padding-left: 16px; padding-right: 16px; }
.py-16 { padding-top: 16px; padding-bottom: 16px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.text-center { text-align: center; }
.text-sm { font-size: 0.82rem; }
.text-xs { font-size: 0.75rem; }
.text-muted { color: var(--text-secondary); }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }
