/* Custom Styling System for Meloneros Fast Food App */

:root {
    --font-primary: 'Outfit', sans-serif;

    /* Light Theme Palette with #f65f68 as Main Color */
    --color-bg: #f8f9fa;
    --color-sidebar: #ffffff;
    --color-card: #ffffff;
    --color-input: #ffffff;
    --color-border: #e9ecef;

    --color-primary: #f65f68;
    /* Main Red/Pink */
    --color-primary-hover: #e04a52;
    --color-danger: #e03131;
    /* Tomato Red */
    --color-success: #2b8a3e;
    /* Lettuce Green */
    --color-info: #1971c2;
    /* Soda Blue */
    --color-warning: #e67700;
    /* Crispy Orange */

    --color-text-main: #212529;
    --color-text-muted: #6c757d;
    --color-text-inverse: #ffffff;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.08);

    --radius-sm: 0;
    --radius-md: 0;
    --radius-lg: 0;

    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-bg);
    color: var(--color-text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Layout System */
body.with-sidebar {
    display: flex;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: linear-gradient(160deg, #0f172a 0%, #1a2742 100%);
    border-right: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    z-index: 10;
    transition: width var(--transition-fast);
}

.main-wrapper {
    flex: 1;
    margin-left: 280px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 24px;
    transition: margin-left var(--transition-fast);
}

/* Collapsed sidebar state (toggled via JS, persisted in localStorage; desktop only) */
@media (min-width: 769px) {
    body.sidebar-collapsed .sidebar {
        width: 84px;
    }

    body.sidebar-collapsed .main-wrapper {
        margin-left: 84px;
    }

    body.sidebar-collapsed .sidebar-brand .brand-text,
    body.sidebar-collapsed .nav-section-label,
    body.sidebar-collapsed .user-info,
    body.sidebar-collapsed .restaurant-switch {
        display: none;
    }

    body.sidebar-collapsed .sidebar-brand {
        justify-content: center;
        padding: 24px 8px;
    }

    body.sidebar-collapsed .brand-logo {
        height: 52px;
        width: 52px;
        border-radius: 50%;
        object-fit: cover;
    }

    body.sidebar-collapsed .user-badge {
        width: 44px;
        height: 44px;
        margin: 0 auto 24px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
        background: transparent;
        border: none;
    }

    body.sidebar-collapsed .sidebar-item {
        justify-content: center;
        font-size: 0;
        gap: 0;
    }

    body.sidebar-collapsed .sidebar-item .item-icon {
        font-size: 1rem;
    }

    body.sidebar-collapsed .sidebar-item.active {
        border-left: none;
        padding-left: 16px;
    }
}

/* Collapse/expand toggle — sits above the logout button at the bottom of the sidebar */
.sidebar-collapse-toggle {
    margin-top: auto;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
}

.sidebar-collapse-toggle .item-icon svg {
    transition: transform var(--transition-fast);
}

body.sidebar-collapsed .sidebar-collapse-toggle .item-icon svg {
    transform: rotate(180deg);
}

/* If guest (no sidebar) */
body:not(.with-sidebar) .main-wrapper {
    margin-left: 0;
    max-width: 100%;
}

.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    flex: 1;
}

/* Sidebar Components */
.sidebar-brand {
    padding: 30px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    height: 52px;
    width: auto;
    object-fit: contain;
}

.brand-text {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--color-text-main);
    letter-spacing: -0.5px;
}

.sidebar-brand .brand-text {
    color: #ffffff;
}

.user-badge {
    margin: 0 16px 24px;
    padding: 16px;
    background-color: rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 44px;
    height: 44px;
    background-color: var(--color-primary);
    color: var(--color-text-inverse);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #ffffff;
}

.user-role {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.55);
}

.restaurant-switch {
    margin-top: 6px;
    width: 100%;
}

.restaurant-switch .switch-label {
    font-size: 0.62rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
}

.restaurant-switch .switch-hint {
    font-size: 0.52rem;
    color: rgba(255, 255, 255, 0.35);
    margin-top: 3px;
    line-height: 1.1;
}

.restaurant-switch .select-with-icon {
    position: relative;
    width: 100%;
}

.restaurant-switch .select-icon {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.85rem;
    pointer-events: none;
    z-index: 1;
}

.restaurant-switch select {
    font-size: 0.78rem;
    font-weight: 500;
    width: 100%;
    padding: 5px 8px 5px 28px;
    border: 1px solid #cbd5e1;
    border-radius: 0;
    background: #f8fafc;
    color: #1e293b;
    cursor: pointer;
    appearance: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    transition: border-color 0.1s, box-shadow 0.1s;
}

.restaurant-switch select:hover {
    border-color: #94a3b8;
}

.restaurant-switch select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    background: #fff;
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 16px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.sidebar-item:hover,
.sidebar-item.active {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.08);
}

.sidebar-item.active {
    border-left: 4px solid var(--color-primary);
    padding-left: 12px;
}

.sidebar-item.logout-link {
    margin-bottom: 24px;
    color: #ff8787;
}

.sidebar-item.logout-link:hover {
    background-color: rgba(224, 49, 49, 0.15);
    color: #ffa8a8;
}

.nav-section-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    padding: 12px 16px 2px;
    margin-top: 4px;
}

/* Header Navbar */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--color-border);
}

.page-title {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.mobile-nav-toggle {
    display: none; /* shown on mobile via media query */
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 0;
    cursor: pointer;
    color: var(--color-text-main);
    transition: all 0.2s ease;
    flex-shrink: 0;
    line-height: 1;
    font-size: 1.25rem;
    font-weight: 700;
    width: 32px;
    height: 32px;
}

.mobile-nav-toggle:hover {
    background-color: #f1f3f5;
    border-color: #dee2e6;
}

.mobile-nav-toggle svg {
    display: block;
}

.mobile-top-bar {
    display: none; /* only shown on mobile via media query */
}

.mobile-page-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--color-text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    padding-right: 8px;
}

/* Buttons */
.btn {
    font-family: var(--font-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
    text-decoration: none;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-text-inverse);
}

.btn-primary:hover {
    background-color: var(--color-primary-hover);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secondary {
    background-color: rgba(0, 0, 0, 0.06);
    color: var(--color-text-main);
}

.btn-secondary:hover {
    background-color: rgba(0, 0, 0, 0.09);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text-main);
}

.btn-outline:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

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

.btn-danger:hover {
    background-color: #c02828;
}

.btn-full {
    width: 100%;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

/* Cards */
.card {
    background-color: var(--color-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    padding: 24px;
    box-shadow: var(--shadow-md);
}

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

/* Forms */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.form-control {
    background-color: var(--color-input);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    color: var(--color-text-main);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition-fast);
}

.form-control:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(246, 95, 104, 0.15);
}

textarea.form-control {
    resize: vertical;
}

/* Authentication Forms */
/* Login page background — light on top, new dark gradient on the bottom half */
.auth-page-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
    background: linear-gradient(160deg, #0f172a 0%, #1a2742 100%);
    position: relative;
    overflow: hidden;
}

.auth-page-wrap::before {
    content: '';
    position: absolute;
    top: -140px;
    right: -140px;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: rgba(246, 95, 104, 0.16);
    pointer-events: none;
}

.auth-page-wrap::after {
    content: '';
    position: absolute;
    bottom: -160px;
    left: -160px;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.12);
    pointer-events: none;
}

.auth-page-wrap .auth-card {
    position: relative;
    z-index: 1;
}

.auth-container {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    width: 100%;
    max-width: 680px;
    background-color: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 48px 40px;
    box-shadow: var(--shadow-lg);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo {
    display: block;
    height: 80px;
    width: auto;
    object-fit: contain;
    margin: 0 auto 15px;
}

.auth-header h2 {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.auth-header p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    margin-top: 6px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.auth-footer {
    margin-top: 25px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.auth-footer a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Alert Boxes */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.alert-danger {
    background-color: rgba(224, 49, 49, 0.12);
    color: #c92a2a;
    border: 1px solid rgba(224, 49, 49, 0.25);
}

.alert-success {
    background-color: rgba(43, 138, 62, 0.12);
    color: #2b8a3e;
    border: 1px solid rgba(43, 138, 62, 0.25);
}

/* Customer Menu Portal */
.menu-dashboard {
    display: flex;
    gap: 30px;
}

.menu-main {
    flex: 2.5;
}

.menu-sidebar {
    flex: 1.2;
}

.menu-header-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    background-color: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 24px;
}

.control-box {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.control-box label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-muted);
}

.category-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.cat-btn {
    background-color: rgba(0, 0, 0, 0.04);
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    padding: 8px 16px;
    border-radius: 0;
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-fast);
    white-space: nowrap;
}

.cat-btn:hover,
.cat-btn.active {
    background-color: var(--color-primary);
    color: var(--color-text-inverse);
    border-color: var(--color-primary);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.product-card {
    background-color: var(--color-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    overflow: hidden;
    transition: var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(246, 95, 104, 0.25);
}

.product-image {
    height: 160px;
    background-color: rgba(0, 0, 0, 0.02);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    border-bottom: 1px solid var(--color-border);
}

.product-body {
    padding: 20px;
}

.product-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.product-desc {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    height: 60px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    margin-bottom: 15px;
}

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

.product-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--color-primary);
}

/* Shopping Cart */
.cart-card {
    background-color: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 20px;
    position: sticky;
    top: 24px;
    box-shadow: var(--shadow-md);
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--color-border);
}

.cart-badge {
    background-color: var(--color-primary);
    color: var(--color-text-inverse);
    padding: 2px 8px;
    border-radius: 0;
    font-weight: 700;
    font-size: 0.8rem;
}

.cart-items {
    min-height: 120px;
    max-height: 320px;
    overflow-y: auto;
    padding: 15px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cart-empty-message {
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-top: 30px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.item-details {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.item-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.item-price {
    font-size: 0.85rem;
    color: var(--color-primary);
    font-weight: 700;
}

.item-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qty-btn {
    width: 24px;
    height: 24px;
    background-color: rgba(0, 0, 0, 0.05);
    border: none;
    border-radius: 50%;
    color: var(--color-text-main);
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    background-color: var(--color-primary);
    color: var(--color-text-inverse);
}

.qty-num {
    font-weight: 600;
    font-size: 0.9rem;
    min-width: 15px;
    text-align: center;
}

.cart-totals {
    border-top: 1px solid var(--color-border);
    padding-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.totals-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.totals-row.grand-total {
    font-size: 1.15rem;
    color: var(--color-text-main);
    font-weight: 800;
    border-top: 1px dashed var(--color-border);
    padding-top: 8px;
    margin-top: 4px;
}

.totals-row.grand-total #cart-total {
    color: var(--color-primary);
}

/* Orders List (Customer tracking) */
.order-history-card {
    background-color: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.order-card-header {
    background-color: rgba(0, 0, 0, 0.02);
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-number {
    font-size: 1.1rem;
    font-weight: 700;
}

.order-date {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-left: 12px;
}

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

.order-meta-info {
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.order-items-summary {
    background-color: rgba(0, 0, 0, 0.04);
    padding: 12px 18px;
    border-radius: var(--radius-sm);
}

.order-items-summary ul {
    list-style: none;
    margin-top: 5px;
}

.order-items-summary li {
    font-size: 0.9rem;
    padding: 4px 0;
    display: flex;
    justify-content: space-between;
}

.item-summary-price {
    color: var(--color-text-muted);
}

.order-notes-summary {
    margin-top: 15px;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.order-card-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.payment-method-badge {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    background-color: rgba(0, 0, 0, 0.04);
    padding: 4px 10px;
    border-radius: 0;
}

.order-grand-total {
    display: flex;
    align-items: center;
    gap: 8px;
}

.order-grand-total span {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.order-grand-total strong {
    font-size: 1.3rem;
    color: var(--color-primary);
}

/* Status Badges */
.status-badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-block;
}

.status-pending {
    background-color: rgba(230, 119, 0, 0.12);
    color: #d9480f;
}

.status-preparing {
    background-color: rgba(247, 103, 7, 0.12);
    color: #e8590c;
}

.status-ready {
    background-color: rgba(25, 113, 194, 0.12);
    color: #1864ab;
}

.status-delivering {
    background-color: rgba(59, 91, 219, 0.12);
    color: #3b5bdb;
}

.status-delivered {
    background-color: rgba(43, 138, 62, 0.12);
    color: #2b8a3e;
}

.status-cancelled {
    background-color: rgba(224, 49, 49, 0.12);
    color: #c92a2a;
}

/* Admin Dashboard CSS */
.dashboard-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-icon {
    font-size: 2.2rem;
}

.stat-content h4 {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    font-weight: 500;
}

.stat-content h3 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-top: 4px;
}

/* Tables CSS */
.table-responsive {
    overflow-x: auto;
    width: 100%;
}

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.table th,
.table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--color-border);
}
#orders-table tbody tr:hover {
    background: rgba(0, 0, 0, 0.025);
}

.table th {
    font-weight: 600;
    color: var(--color-text-muted);
    font-size: 0.85rem;
}
.table th .sort-ind {
    font-size: 0.65em;
    opacity: 0.65;
    margin-left: 3px;
    display: inline-block;
    min-width: 0.8em;
    vertical-align: middle;
}

.table tr:last-child td {
    border-bottom: none;
}

.text-center {
    text-align: center;
}

.product-name-cell {
    display: flex;
    flex-direction: column;
}

.product-name-cell small {
    color: var(--color-text-muted);
    font-size: 0.8rem;
    margin-top: 2px;
}

/* Modals Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: var(--transition-fast);
}

.modal-content {
    background-color: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 30px;
    width: 90%;
    max-width: 450px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.modal-content--wide {
    max-width: 600px;
    text-align: left;
}

.modal-emoji {
    font-size: 3rem;
    margin-bottom: 10px;
}

.modal-content h2 {
    font-weight: 800;
    margin-bottom: 8px;
}

.modal-content p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.modal-footer-row {
    display: flex;
    gap: 12px;
}

.modal-overlay--hidden {
    opacity: 0;
    pointer-events: none;
}

/* Dispatch Admin screen styles */
.order-dispatch-card {
    border-left: 5px solid var(--color-primary);
}

.order-dispatch-card.status-delivered {
    border-left-color: var(--color-success);
}

.order-dispatch-card.status-cancelled {
    border-left-color: var(--color-danger);
}

.dispatch-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dashed var(--color-border);
    padding-bottom: 12px;
}

.dispatch-header .order-id {
    font-size: 1.25rem;
    font-weight: 800;
}

.dispatch-header .order-time {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-left: 10px;
}

.dispatch-body h4 {
    font-size: 0.95rem;
    font-weight: 700;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 6px;
    margin-bottom: 10px;
}

.dispatch-body p {
    font-size: 0.9rem;
    margin-bottom: 6px;
}

.dispatch-body ul {
    list-style: none;
}

.dispatch-body li {
    font-size: 0.9rem;
    margin-bottom: 4px;
}

/* Kanban Board Styles for Orders */
.kanban-page {
    padding-bottom: 30px;
}

/* Mobile stage nav — hidden on desktop, shown on mobile */
.kanban-mobile-nav { display: none; }

/* WA header button — hidden on desktop, shown on mobile */
.orders-hdr-wa-btn {
    display: none;
    position: relative;
    padding: 0 8px;
    background: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
    color: #fff !important;
}
.orders-hdr-wa-btn:hover,
.orders-hdr-wa-btn:active {
    background: var(--color-primary-hover) !important;
    border-color: var(--color-primary-hover) !important;
}

/* Mobile-only stages configure link — hidden on desktop */
.stages-configure-mobile-link { display: none; }
.orders-hdr-wa-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: var(--color-primary);
    border: 1.5px solid var(--color-primary);
    font-size: 9px;
    font-weight: 800;
    border-radius: 0;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    line-height: 1;
}

.kanban-header-row {
    margin-bottom: 20px;
}

.kanban-header-row h2 {
    font-size: 1.6rem;
    margin-bottom: 4px;
}

.kanban-subtitle {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.kanban-board {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 20px;
    -webkit-overflow-scrolling: touch;
}

.kanban-column {
    min-width: 288px;
    max-width: 300px;
    background-color: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    flex: 0 0 auto;
}

.kanban-column-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    background-color: rgba(0, 0, 0, 0.02);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.kanban-stage-name {
    font-size: 0.95rem;
}

.kanban-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
}

.terminal-label {
    font-size: 0.65rem;
    color: var(--color-text-muted);
    background: rgba(0, 0, 0, 0.05);
    padding: 1px 6px;
    border-radius: 0;
}

.kanban-cards {
    flex: 1;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 180px;
    transition: background-color 0.1s;
}

.kanban-empty {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    text-align: center;
    padding: 30px 10px;
    font-style: italic;
}

.kanban-card {
    background-color: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 9px 10px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.1s, border-color 0.1s;
    user-select: none;
}

.kanban-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.kanban-card:active {
    cursor: grabbing;
}

/* Orders page - header + tabs */
.orders-header {
    background: var(--color-card);
}

/* Chrome-style tabs */
.page-tabs {
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 16px;
}

.page-tabs-link {
    margin-left: auto;
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    text-decoration: none;
    padding: 0 4px 3px;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.page-tabs-link:hover {
    color: var(--color-primary);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.875rem;
    color: var(--color-text-muted);
    text-decoration: none;
    margin-bottom: 12px;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--color-primary);
}

.page-tabs .tab {
    padding: 10px 20px;
    cursor: pointer;
    font-weight: 500;
    color: var(--color-text-muted);
    position: relative;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
}

.page-tabs .tab:hover {
    color: var(--color-text-main);
}

.page-tabs .tab.active {
    color: var(--color-text-main);
    font-weight: 600;
    border-bottom-color: var(--color-primary);
}

/* View panes for tabs */
.view-pane {
    display: none;
}

.view-pane.active {
    display: block;
}

/* Compact stats for Orders Overview - centered: icon + title on one row, number below */
/* Enlarged for bigger icons/text/numbers + more vertical padding to approach half-square cards */
.orders-stats-compact .stat-card {
    padding: 22px 10px 20px;
    gap: 4px;
    min-height: 110px;
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: center;
}
.orders-stats-compact .stat-icon {
    font-size: 1.8rem;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}
.orders-stats-compact .stat-icon svg {
    width: 32px;
    height: 32px;
}
.orders-stats-compact .stat-card h4 {
    font-size: 0.95rem;
    margin: 0;
    font-weight: 600;
    line-height: 1.1;
    white-space: nowrap;
}
.orders-stats-compact .stat-card h3 {
    margin: 4px 0 0;
    font-weight: 800;
    line-height: 1;
    color: #222;
}

/* Base grid for orders overview stats (4 columns on desktop) */
.orders-stats-compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* Kanban card inner elements (new compact layout with items, no customer/resto, link arrows) */
.kanban-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3px;
}
.kanban-time {
    font-size: 0.88rem;
    color: #555;
    white-space: nowrap;
    font-weight: 600;
}
.kanban-card-body {
    font-size: 0.82rem;
    line-height: 1.3;
}
.kanban-note {
    margin-top: 6px;
    font-size: 0.8rem;
    color: #777;
    font-style: italic;
    line-height: 1.15;
    overflow: hidden;
    text-overflow: ellipsis;
}
.small-muted {
    color: #666;
    font-size: 0.82rem;
}
.kanban-card-actions {
    min-height: auto;
    display: none; /* hidden on desktop; shown only on mobile via media query below */
}

@media (max-width: 768px) {
    .kanban-card-actions {
        display: flex;
        gap: 0;
        padding-top: 2px;
        justify-content: flex-end;
        align-items: center;
    }
}

/* Modern app-like items sections for order create & detail modals */
.modern-items-section {
    margin: 12px 0;
}
.modern-picker-header {
    font-size: 0.82rem;
    font-weight: 600;
    color: #444;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.modern-search-input {
    width: 100%;
    padding: 6px 10px;
    font-size: 0.85rem;
    border: 1px solid var(--color-border);
    border-radius: 0;
    margin-bottom: 6px;
    box-sizing: border-box;
}
.category-pills {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding-bottom: 4px;
    margin-bottom: 6px;
}
.category-pill {
    padding: 3px 10px;
    font-size: 0.72rem;
    font-weight: 600;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 999px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.1s;
}
.category-pill.active {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}
.modern-product-list {
    max-height: 132px;
    overflow-y: auto;
    border: 1px solid #e5e5e5;
    border-radius: 0;
    background: #fff;
    font-size: 0.82rem;
}
.modern-product-row {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    border-bottom: 1px solid #f5f5f5;
    gap: 8px;
    cursor: pointer;
}
.modern-product-row:last-child {
    border-bottom: none;
}
.modern-product-row:hover {
    background: #f9f9f9;
}
.modern-product-name {
    flex: 1;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.modern-product-price {
    color: #666;
    font-size: 0.78rem;
    font-weight: 500;
    min-width: 52px;
    text-align: right;
}
.modern-add-btn {
    width: 26px;
    height: 26px;
    border: 1px solid var(--color-primary);
    border-radius: 50%;
    background: #fff;
    color: var(--color-primary);
    font-size: 16px;
    font-weight: 800;
    line-height: 24px;
    text-align: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.1s;
}
.modern-add-btn:hover {
    background: var(--color-primary);
    color: #fff;
    transform: scale(1.05);
}
.modern-selected-list {
    border: 1px solid #e5e5e5;
    border-radius: 0;
    background: #fff;
    overflow: hidden;
    min-height: 42px;
    font-size: 0.88rem;
}
.modern-selected-row {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    border-bottom: 1px solid #f0f0f0;
    gap: 8px;
}
.modern-selected-row:last-child {
    border-bottom: none;
}
.modern-selected-name {
    flex: 1;
    min-width: 0;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.modern-qty-controls {
    display: flex;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
    border: 1px solid #ddd;
    border-radius: 0;
    background: #fafafa;
}
.modern-qty-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    font-size: 15px;
    font-weight: 700;
    color: #333;
    cursor: pointer;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modern-qty-btn:hover {
    background: #eee;
}
.modern-qty-btn.plus {
    color: var(--color-primary);
}
.modern-qty-value {
    min-width: 22px;
    text-align: center;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0 2px;
}
.modern-line-total {
    min-width: 52px;
    text-align: right;
    font-weight: 700;
    color: #222;
    font-size: 0.88rem;
}
.modern-remove-btn {
    width: 22px;
    height: 22px;
    border: none;
    background: transparent;
    color: #c33;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 4px;
}
.modern-remove-btn:hover {
    color: #900;
}

/* Collapsible sections for order details in modals (items first, details expand) */
.collapsible-header {
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    color: #555;
    padding: 8px 10px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    user-select: none;
    transition: background 0.1s;
}
.collapsible-header:hover {
    background: #eee;
}
.collapsible-header .toggle-arrow {
    font-size: 0.9rem;
    transition: transform 0.2s;
    display: inline-block;
}
.collapsible-header.expanded .toggle-arrow {
    transform: rotate(90deg);
}
.collapsible-content {
    margin-top: 8px;
    padding: 10px 12px;
    background: #f8f8f8;
    border: 1px solid #e8e8e8;
    border-radius: 0;
}

/* Utility classes - layout & common (to eliminate inline styles in views) */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.justify-center { justify-content: center; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-5 { gap: 20px; }
.m-0 { margin: 0; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.p-0 { padding: 0; }
.text-xs { font-size: 0.65rem; }
.text-sm { font-size: 0.8rem; }
.text-muted { color: var(--color-text-muted); }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.w-full { width: 100%; }
.text-right { text-align: right; }
.actions-col { width: 140px; text-align: right; }
.d-block { display: block; }
.d-inline { display: inline; }
.d-none { display: none; }

.empty-cell {
    color: var(--color-text-muted);
    padding: 30px;
}

.stock-badge {
    font-weight: 600;
    font-size: 0.85rem;
}

/* Stock modal specific (no inline styles) */
.stock-modal {
    background: rgba(0,0,0,0.5);
    z-index: 9999;
}

.stock-modal-content {
    background: #fff;
    padding: 24px;
    border-radius: 0;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    text-align: left;
}

.stock-modal-title {
    margin-bottom: 15px;
    font-size: 1.25rem;
}

.stock-form-group {
    margin-bottom: 12px;
}

.stock-readonly-input {
    background-color: #f1f5f9;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 0;
}

.stock-modal-footer {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Settings page classes (replacing inline styles) */
.context-admin-card {
    margin-bottom: 20px;
    border-left: 4px solid #3b82f6;
    background: linear-gradient(90deg, #f0f7ff, #fff);
}
.context-admin-title {
    margin-bottom: 8px;
    font-size: 1.1rem;
    color: #1e40af;
}
.context-admin-desc {
    margin: 0 0 12px;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}
.context-switch-form { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.context-select { max-width: 320px; flex: 1; min-width: 200px; }
.active-restaurant-badge {
    background: #dcfce7;
    color: #166534;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 600;
}
.settings-hint { color: #666; display: block; margin-top: 8px; }

.restricted-user-card {
    margin-bottom: 20px;
    border-left: 4px solid #16a34a;
    background: #f0fdf4;
}
.restricted-title {
    margin-bottom: 6px;
    font-size: 1.05rem;
    color: #166534;
}
.restricted-desc {
    margin: 0;
    color: #166534;
    font-size: 0.95rem;
}

.settings-main-card { margin-top: 20px; width: 100%; }
.settings-section-title { margin-bottom: 8px; font-size: 1.1rem; }
.settings-branch { font-weight: normal; color: #666; }
.settings-desc {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 16px;
}
.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    max-width: 900px;
}
.settings-label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
}
.settings-checkbox-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}
.settings-subfield { margin-top: 6px; }
.settings-sub-label { font-size: 0.85rem; color: #666; }
.settings-narrow-input { max-width: 160px; }
.settings-narrow-input[style*="max-width: 120px"], .settings-narrow-input[style*="max-width: 140px"] { max-width: 140px; } /* fallback */
.receipt-options {
    margin-top: 10px;
    padding-left: 20px;
    border-left: 3px solid #e5e7eb;
}
.receipt-sub-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.92rem;
    font-weight: 500;
}
.receipt-sub-label-last { margin-bottom: 2px; }
.settings-submit-row { margin-top: 20px; }

.stages-card { margin-top: 30px; }
.stages-title { margin-bottom: 8px; font-size: 1.1rem; }
.stages-desc {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 18px;
}
.stages-alert { margin-bottom: 16px; }
.stage-form-card {
    background: rgba(0,0,0,0.02);
    padding: 16px;
    border-radius: 0;
    margin-bottom: 20px;
}
.stage-form-row { align-items: flex-end; }
.stage-field-wide { flex: 2; min-width: 180px; }
.stage-field { flex: 1; min-width: 120px; }
.stage-color-input { height: 42px; padding: 4px; }
.stage-check-label {
    display: block;
    margin-bottom: 6px;
}
.stage-btns { display: flex; gap: 8px; }
.stage-drag-col { width: 40px; }
.stage-actions-col { width: 160px; }
.stage-drag {
    cursor: grab;
    text-align: center;
    font-size: 1.3rem;
    color: #999;
}
.color-swatch {
    display: inline-block;
    width: 18px;
    height: 18px;
    background: var(--swatch-color);
    border-radius: 0;
    vertical-align: middle;
}
.color-code {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}
.stage-flag {
    font-size: 0.7rem;
    padding: 2px 8px;
}
.stage-dash {
    color: var(--color-text-muted);
    font-size: 0.85rem;
}
.stages-hint {
    color: var(--color-text-muted);
    display: block;
    margin-top: 12px;
}

/* ---- Extra utility / layout helpers (no inline styles in views) ---- */

/* Orders header row (title + action buttons) */
.orders-hdr-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.orders-hdr-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
}
.orders-hdr-title-lg {
    margin: 0;
    font-size: 1.25rem;
}
.orders-hdr-actions { display: flex; gap: 6px; align-items: center; }
.orders-hdr-meta { font-size: 0.85rem; color: var(--color-text-muted); }
.orders-hdr-desc { margin: 0; font-size: 0.9rem; color: var(--color-text-muted); }
.orders-header-mb { margin-bottom: 16px; padding: 14px 16px; }
.orders-header-mb24 { margin-bottom: 24px; }

/* Stat card icon with primary color */
.stat-icon-primary { color: var(--color-primary); }

/* Kanban stat card inner row (icon + label on same line) */
.stat-card-inner-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.stat-card-inner-row h4 { margin: 0; font-size: 0.85rem; font-weight: 600; }
.stat-card-num { margin: 3px 0 0; font-size: 1.25rem; font-weight: 800; color: #222; }

/* Kanban column header stage styling (uses CSS custom property for color) */
.kanban-col-stage-border { border-left: 5px solid var(--stage-color, var(--color-primary)); }
.kanban-count-stage { background-color: var(--stage-color, var(--color-primary)); }

/* Terminal labels for First / Last stage */
.terminal-label-first { background-color: rgba(230, 119, 0, 0.12); color: #d9480f; }
.terminal-label-last  { background-color: rgba(43, 138, 62, 0.12); color: #2b8a3e; }

/* Kanban card elements */
.kanban-order-num { font-size: 1.3rem; font-weight: 800; }
.kanban-time-label { margin-left: 4px; font-size: 0.78rem; }
.kanban-card-body-mt { margin-top: 3px; }

/* Kanban items grid (name / qty / price columns) */
.kanban-items-grid {
    display: grid;
    grid-template-columns: 1fr 20px 48px;
    gap: 5px 4px;
    font-size: 0.9rem;
    line-height: 1.3;
    color: #333;
    margin-bottom: 4px;
    padding: 20px 10px 10px 10px;
}
.kanban-item-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}
.kanban-item-qty { text-align: right; font-weight: 600; color: #555; font-size: 0.9rem; }
.kanban-item-price { text-align: right; font-weight: 700; color: #222; font-size: 0.9rem; }
.kanban-no-items { font-size: 0.88rem; color: #888; margin-bottom: 3px; }
.kanban-rider-line { margin-bottom: 3px; font-size: 0.76rem; }
.kanban-note-line { font-size: 0.72rem; }

/* Kanban card total row */
.kanban-card-total {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid #f0f0f0;
    text-align: right;
    font-weight: 800;
    color: var(--color-primary);
    font-size: 1rem;
}

/* Stage-arrow buttons (mobile move prev/next) */
.stage-arrow-btn {
    background: none;
    border: none;
    padding: 3px 4px;
    margin: 0;
    cursor: pointer;
    line-height: 1;
    color: #777;
}
.stage-arrow-btn-fwd { color: var(--color-primary); }

/* Sortable table header */
.th-sortable { cursor: pointer; }
.th-sortable-num { width: 78px; cursor: pointer; }
.filter-icon {
    margin-left: 3px;
    opacity: 0.55;
    vertical-align: middle;
    display: inline-block;
}

/* Delivery tag in table (small variant) */
.delivery-tag-sm { font-size: 0.65rem; padding: 1px 5px; }
.delivery-tag-xs { font-size: 0.62rem; padding: 0 5px; }
.pickup-tag { font-size: 0.7rem; color: #888; }

/* Table cell text sizes */
.td-items { font-size: 0.85rem; line-height: 1.2; }

/* Dynamic-color status badge (uses CSS custom props) */
.status-badge-dynamic {
    background-color: var(--badge-bg, rgba(246, 95, 104, 0.13));
    color: var(--badge-color, #f65f68);
    border: 1px solid var(--badge-border, rgba(246, 95, 104, 0.27));
}

/* Order detail modal header */
.modal-order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}
.modal-order-title { margin: 0; font-size: 1.4rem; }
.modal-order-time { color: var(--color-text-muted); font-size: 0.9rem; margin-top: 2px; }
.modal-stage-badge { font-size: 0.85rem; }

/* Picker hint text */
.picker-hint { font-weight: 400; color: #888; font-size: 0.7rem; }

/* Items list with top margin */
.items-list-mt { margin-top: 8px; }

/* Order total line in modal */
.modal-total-row { text-align: right; margin-top: 4px; font-weight: 700; font-size: 0.95rem; }
.modal-total-value { color: var(--color-primary); }

/* Edit hint below items */
.modal-edit-hint { font-size: 0.75rem; color: #888; font-style: italic; margin: 2px 0 8px; }

/* Collapsible header small hint */
.collapsible-hint { font-weight: 400; color: #888; font-size: 0.65rem; }

/* Info grid inside collapsible (2-col) */
.modal-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 4px 0 12px; }
.modal-info-label { margin: 0 0 6px; font-size: 0.95rem; color: var(--color-text-muted); }
.modal-info-value { font-weight: 600; }

/* Edit options box */
.edit-options-box {
    margin: 4px 0 0;
    padding: 8px 10px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 0;
}
.edit-options-header {
    font-size: 0.78rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.edit-options-hint { font-size: 0.65rem; color: #888; font-weight: 400; }
.edit-options-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font-size: 0.82rem; }
.edit-options-grid-mt { margin-top: 6px; }
.field-label-xs { display: block; font-size: 0.68rem; color: #666; margin-bottom: 2px; }
.field-label-sm { font-size: 0.85rem; display: block; margin-bottom: 4px; }
.field-label-sm-flex { font-size: 0.85rem; display: flex; align-items: center; gap: 8px; cursor: pointer; }
.field-hint-sm { font-size: 0.75rem; color: #888; font-weight: 400; }
.field-hint-xs { color: #888; font-size: 0.72rem; margin-left: 26px; }
.field-hint-blk { color: #888; display: block; margin-left: 26px; font-size: 0.72rem; }

/* Reset modal warning box */
.reset-warning-box {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #664d03;
    padding: 10px 12px;
    border-radius: 0;
    font-size: 0.9rem;
    margin-bottom: 14px;
}
.reset-warning-list { margin: 6px 0 0 16px; padding: 0; }
.reset-disabled-text { color: #c00; }
.reset-reason-label { font-size: 0.82rem; display: block; margin-bottom: 4px; color: var(--color-text-muted); }
.reset-reason-textarea {
    width: 100%;
    min-height: 48px;
    padding: 6px 8px;
    font-size: 0.9rem;
    border: 1px solid var(--color-border);
    border-radius: 0;
    box-sizing: border-box;
    resize: vertical;
}
.reset-reason-wrap { margin: 10px 0 4px; }
.modal-footer-mb { margin-top: 16px; }
.modal-footer-spaced {
    margin-top: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-footer-left { display: flex; gap: 8px; }

/* Modal wide custom widths */
.modal-content-680 { max-width: 680px; }
.modal-content-520 { max-width: 520px; }
.modal-content-480 { max-width: 480px; }
.modal-scrollable { max-height: 90vh; overflow-y: auto; }
.modal-title-sm { margin: 0 0 12px; font-size: 1.3rem; }
.modal-subtitle { margin: 0 0 16px; color: var(--color-text-muted); font-size: 0.9rem; }
.modal-section-mb { margin-bottom: 8px; }
.modal-title-mb { margin: 0 0 8px; font-size: 1.25rem; }
.modal-p-mb { margin: 0 0 12px; font-size: 0.95rem; }

/* Rider wrapper (hidden by default, shown via JS) */
.rider-wrapper-mb { margin-bottom: 12px; }
.field-mb { margin-bottom: 12px; }
.field-span-full { grid-column: 1 / -1; }

/* Inline form row with flex wrap */
.inline-form-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: flex-end;
}
.inline-form-field-2 { flex: 2; min-width: 160px; }
.inline-form-field-3 { flex: 3; min-width: 200px; }
.inline-form-field-1-5 { flex: 1.5; min-width: 160px; }
.inline-form-field-1-3 { flex: 1.3; min-width: 160px; }
.inline-form-field-1-2 { flex: 1.2; min-width: 140px; }
.inline-form-field-1 { flex: 1; min-width: 120px; }
.inline-form-field-1-sm { flex: 1; min-width: 110px; }
.btn-h-42 { height: 42px; padding: 0 18px; }
.btn-h-42-auto { height: 42px; white-space: nowrap; }

/* Inline form container (light bg panel) */
.form-panel {
    background: #f8fafc;
    padding: 14px;
    border-radius: 0;
    margin-bottom: 16px;
    border: 1px solid #e2e8f0;
}
.form-panel-title { margin: 0 0 10px; font-size: 0.95rem; }
.form-label-block { display: block; font-size: 0.8rem; margin-bottom: 3px; }
.form-label-block-sm { display: block; font-size: 0.75rem; margin-bottom: 2px; }

/* Auto-grid form (used in users/restaurants add forms) */
.auto-grid-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    align-items: end;
}

/* Info cards with left border accent */
.info-card-blue {
    margin-bottom: 20px;
    background: #f0f7ff;
    border-left: 4px solid #3b82f6;
}
.info-card-blue p { margin: 0; color: #1e40af; }
.info-card-blue p.context-text { color: #1e40af; font-size: 0.95rem; margin: 0; }
.info-card-blue-alt {
    margin-bottom: 20px;
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
}
.info-card-blue-alt p { margin: 0; color: #1e40af; font-size: 0.95rem; }
.info-card-yellow {
    margin-bottom: 20px;
    background: #fefce8;
    border-left: 4px solid #ca8a04;
}
.info-card-yellow p { margin: 0; color: #854d0e; }
.info-card-green {
    margin-bottom: 20px;
    border-left: 4px solid #16a34a;
    background: #f0fdf4;
}
.info-card-green-title { margin-bottom: 6px; font-size: 1.05rem; color: #166534; }
.info-card-green p { margin: 0; color: #166534; font-size: 0.95rem; }

/* Role badge */
.role-badge {
    background: #dbeafe;
    color: #1e40af;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 4px;
}
/* Owner restaurant badge */
.owner-branch-badge { font-size: 0.7rem; }

/* Small muted inline text */
.text-muted-sm { font-size: 0.85rem; color: #555; }
.text-muted-xs { font-size: 0.8rem; color: var(--color-text-muted); }
.text-muted-id { color: #888; }
.text-muted-id-sm { color: #999; }
.you-label { color: #999; font-size: 0.8rem; }
.small-hint { color: #666; margin-left: 12px; }
.small-hint-block { color: #666; margin-top: 6px; display: block; }

/* Page header row */
.page-header-desc { color: var(--color-text-muted); margin-bottom: 20px; }

/* Card margin helpers */
.card-mt-10 { margin-top: 10px; }
.card-mt-30 { margin-top: 30px; }
.card-mb-30 { margin-bottom: 30px; }

/* Card section title */
.card-section-title { margin-bottom: 8px; font-size: 1.1rem; }
.card-section-title-with-link { margin-bottom: 8px; font-size: 1.1rem; display: flex; justify-content: space-between; align-items: baseline; }
.card-section-link { font-size: 0.8rem; font-weight: 400; color: var(--color-primary); text-decoration: none; }
.card-section-desc { color: var(--color-text-muted); font-size: 0.9rem; margin-bottom: 12px; }
.card-section-desc-16 { color: var(--color-text-muted); font-size: 0.9rem; margin-bottom: 16px; }
.card-section-title-sub { margin-bottom: 12px; font-size: 1.1rem; }

/* Actions column th */
.th-actions-160 { width: 160px; text-align: right; }
.th-role-80 { width: 80px; }
.td-actions { text-align: right; white-space: nowrap; }

/* Empty state big cell */
.td-empty { padding: 40px 20px; color: var(--color-text-muted); }

/* Modal grid helpers */
.modal-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal-grid-2-mt { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.modal-footer-stack { margin-top: 24px; display: flex; gap: 10px; justify-content: flex-end; }
.modal-title-mb16 { margin-bottom: 16px; }

/* Reports page */
.reports-grid-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; margin-bottom: 28px; }
.reports-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 28px; }
.reports-grid-2-last { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.reports-card { padding: 20px; }
.reports-card-mb28 { padding: 20px; margin-bottom: 28px; }
.reports-kpi-mb { margin-bottom: 28px; }
.reports-card-title { margin: 0 0 12px 0; font-size: 1rem; }
.reports-card-title-14 { margin: 0 0 14px 0; font-size: 1rem; }
.chart-area-220 { height: 220px; position: relative; }
.chart-area-210 { height: 210px; display: flex; align-items: center; justify-content: center; }
.chart-area-190 { height: 190px; position: relative; }
.chart-empty-220 { height: 220px; display: flex; align-items: center; justify-content: center; color: #6c757d; text-align: center; font-size: 0.9rem; }
.chart-empty-210 { height: 210px; display: flex; align-items: center; justify-content: center; color: #6c757d; text-align: center; font-size: 0.9rem; }
.chart-empty-190 { height: 190px; display: flex; align-items: center; justify-content: center; color: #6c757d; text-align: center; font-size: 0.9rem; }
.chart-empty-hint { opacity: 0.8; }
.chart-canvas-max { max-height: 100%; }
.th-right { text-align: right; }
.td-right { text-align: right; }
.td-revenue { text-align: right; font-weight: 600; color: #2b8a3e; }
.td-units { text-align: right; font-weight: 600; }
.td-capitalize { text-transform: capitalize; }
.td-sub-email { font-size: 0.75rem; color: #6c757d; }
.td-empty-center { text-align: center; color: #6c757d; }


.meloneros-icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ctx-badge {
    font-size: 0.6em;
    font-weight: 500;
    background: #e0e7ff;
    color: #3730a3;
    padding: 2px 8px;
    border-radius: 9999px;
    margin-left: 12px;
    vertical-align: middle;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.ctx-refresh {
    color: #6366f1;
    text-decoration: none;
    font-size: 0.9em;
}

/* Delivery tags (used in orders/kanban) */
.delivery-tag {
    background: #e0f2fe;
    color: #0369a1;
    font-weight: 700;
    border-radius: 999px;
    white-space: nowrap;
}

.inventory-desc {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    margin-top: 6px;
    margin-bottom: 20px;
}

/* Form helpers for inline labels etc */
.form-label-inline {
    display: block;
    font-size: 0.8rem;
    margin-bottom: 3px;
    font-weight: 500;
}

/* Modal form inputs compact */
.modal-input {
    width: 100%;
    padding: 4px 6px;
    border: 1px solid var(--color-border);
    border-radius: 0;
    font-size: 0.82rem;
    box-sizing: border-box;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .menu-dashboard {
        flex-direction: column;
    }

    .menu-sidebar {
        margin-top: 30px;
    }

    .cart-card {
        position: static;
    }
}

@media (max-width: 768px) {
    body.with-sidebar {
        flex-direction: column;
    }

    /* Persistent mobile header bar (holds the nav toggle + title) */
    .mobile-top-bar {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 0 12px;
        height: 52px;
        background: linear-gradient(160deg, #0f172a 0%, #1a2742 100%);
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        position: sticky;
        top: 0;
        z-index: 40;
        flex-shrink: 0;
    }

    .mobile-top-bar .mobile-page-title {
        color: #ffffff;
    }

    .mobile-top-bar .mobile-nav-toggle {
        color: #ffffff;
        border-color: rgba(255, 255, 255, 0.18);
    }

    .mobile-top-bar .mobile-nav-toggle:hover {
        background-color: rgba(255, 255, 255, 0.08);
        border-color: rgba(255, 255, 255, 0.3);
    }

    .mobile-nav-toggle {
        display: flex !important;
    }

    /* Hide the desktop top-nav + title on mobile (replaced by .mobile-top-bar) */
    .top-nav {
        display: none;
    }

    /* ============================================
       ACTUAL MOBILE NAV: Slide-in overlay drawer
       (overlays content, does not push it in flow)
       ============================================ */
    .sidebar,
    body.sidebar-collapsed .sidebar {
        position: fixed;
        top: 52px;
        left: 0;
        bottom: 0;
        width: 260px;
        max-width: 80vw;
        z-index: 200;
        background: linear-gradient(160deg, #0f172a 0%, #1a2742 100%);
        border-right: 1px solid var(--color-border);
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.18);
        transform: translateX(-100%);
        transition: transform 0.28s cubic-bezier(0.4, 0.0, 0.2, 1);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    body.mobile-nav-open .sidebar {
        transform: translateX(0);
    }

    /* Collapse toggle is a desktop-only affordance */
    .sidebar-collapse-toggle {
        display: none;
    }

    /* Backdrop that darkens the page content */
    .mobile-nav-backdrop {
        position: fixed;
        top: 52px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.45);
        z-index: 150;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s ease;
    }

    body.mobile-nav-open .mobile-nav-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .main-wrapper {
        margin-left: 0;
        padding: 16px;
    }

    .dispatch-body {
        flex-direction: column;
        gap: 20px !important;
    }

    /* Orders overview stat boxes - fit on mobile, fixed smaller content sizes */
    .orders-stats-compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
    .orders-stats-compact .stat-card {
        padding: 12px 8px 10px;
        min-height: 82px;
    }
    .orders-stats-compact .stat-icon svg {
        width: 24px;
        height: 24px;
    }
    .orders-stats-compact .stat-card h4 {
        font-size: 0.72rem;
        white-space: normal; /* allow wrapping if needed instead of busting */
    }
    .orders-stats-compact .stat-card h3 {
        font-size: 1.1rem;
    }

    /* Orders header row (title + create/reset buttons) */
    .orders-header {
        padding: 10px 8px !important;
    }

    /* ---- Settings page: single-column grid on mobile ---- */
    .settings-grid {
        grid-template-columns: 1fr;
    }

    /* ---- Products page: hide category description column on mobile ---- */
    #categories-view .table th:nth-child(2),
    #categories-view .table td:nth-child(2) {
        display: none;
    }

    /* ---- Orders stats: all 4 in one row, compact, icon + number only ---- */
    .orders-stats-compact {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 4px;
    }
    .orders-stats-compact .stat-card {
        padding: 8px 4px 6px;
        min-height: 52px;
        gap: 2px;
    }
    .orders-stats-compact .stat-card-inner-row h4 {
        display: none;
    }
    .orders-stats-compact .stat-icon svg {
        width: 16px;
        height: 16px;
    }
    .orders-stats-compact .stat-card h3.stat-card-num {
        font-size: 0.8rem !important;
        font-weight: 400 !important;
        margin-top: 2px;
    }

    /* ---- Hide "Orders Overview" title on mobile ---- */
    .orders-hdr-title {
        display: none;
    }

    /* ---- Orders buttons: push actions to right, equal height + WA icon ---- */
    .orders-hdr-row {
        justify-content: flex-end;
    }
    .orders-hdr-actions {
        align-items: stretch;
        margin-left: auto;
    }
    .orders-hdr-actions .btn {
        display: inline-flex;
        align-items: center;
    }
    .orders-hdr-wa-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* ---- Orders modals: scrollable on mobile ---- */
    .kanban-page .modal-content {
        max-height: 88vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* ---- Orders modal footer: all 3 buttons in one row ---- */
    .modal-footer-spaced {
        flex-wrap: nowrap;
        gap: 6px;
        align-items: stretch;
    }
    .modal-footer-left {
        flex: 1;
        gap: 4px;
    }
    .modal-footer-left .btn {
        flex: 1;
        white-space: nowrap;
        font-size: 0.82rem;
        padding-left: 10px;
        padding-right: 10px;
    }
    .btn-print-receipt {
        flex-shrink: 0;
        padding-left: 10px;
        padding-right: 10px;
    }
    .btn-print-label {
        display: none;
    }

    /* ---- Stages page: form wraps to single column ---- */
    .admin-stages-page .stage-form-row {
        flex-direction: column;
        gap: 8px;
    }
    .admin-stages-page .stage-field-wide,
    .admin-stages-page .stage-field {
        min-width: 0;
        width: 100%;
    }
    .admin-stages-page .stage-btns {
        width: 100%;
    }

    /* ---- Orders table: date one line, items column wider ---- */
    #orders-table td:nth-child(6) {
        white-space: nowrap;
    }
    #orders-table th:nth-child(3),
    #orders-table td:nth-child(3) {
        min-width: 180px;
    }

    /* ---- Orders tabs: pill chips, WA tab hidden, stages link moved out ---- */
    .kanban-page #tab-whatsapp {
        display: none;
    }
    .kanban-page .page-tabs-link {
        display: none;
    }
    .stages-configure-mobile-link {
        display: block;
        font-size: 0.75rem;
        color: var(--color-text-muted);
        text-decoration: none;
        text-align: right;
        margin-bottom: 8px;
    }
    .stages-configure-mobile-link:hover {
        color: var(--color-primary);
    }
    .kanban-page .page-tabs {
        flex-direction: row;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
        scrollbar-width: none;
        border-bottom: none;
        gap: 6px;
        padding: 4px 0 10px;
        margin-bottom: 2px;
    }
    .kanban-page .page-tabs::-webkit-scrollbar {
        display: none;
    }
    .kanban-page .page-tabs .tab {
        white-space: nowrap;
        flex-shrink: 0;
        padding: 5px 14px;
        border-radius: 0;
        border: 1.5px solid var(--color-border);
        font-size: 0.78rem;
        font-weight: 500;
        color: var(--color-text-muted);
        margin-bottom: 0;
        border-bottom-width: 1.5px;
    }
    .kanban-page .page-tabs .tab.active {
        background: var(--color-primary);
        color: #fff;
        border-color: var(--color-primary);
        border-bottom-color: var(--color-primary);
        font-weight: 600;
    }

    /* ---- Kanban card text — compact for mobile ---- */
    .kanban-order-num {
        font-size: 0.88rem !important;
        font-weight: 700 !important;
    }
    .kanban-time-label {
        font-size: 0.7rem !important;
    }
    .kanban-items-grid {
        font-size: 0.76rem;
        padding: 8px 8px 6px;
        gap: 3px 4px;
    }
    .kanban-item-qty,
    .kanban-item-price {
        font-size: 0.76rem !important;
    }
    .kanban-card-total {
        font-size: 0.82rem !important;
        margin-top: 4px;
        padding-top: 4px;
    }
    .kanban-note-line {
        font-size: 0.68rem !important;
    }
    .kanban-rider-line {
        font-size: 0.68rem !important;
    }

    /* ---- Users page: full-width inputs ---- */
    .admin-users-page .auto-grid-form {
        grid-template-columns: 1fr;
    }
    .admin-users-page .form-control {
        width: 100%;
    }
    .admin-users-page .field-span-full {
        width: 100%;
    }

    /* ---- Reports page: single-column cards, horizontal scroll for wide content ---- */
    .reports-grid-2-1,
    .reports-grid-2,
    .reports-grid-2-last {
        grid-template-columns: 1fr;
    }
    .reports-page .reports-card,
    .reports-page .reports-card-mb28 {
        overflow-x: auto;
    }

    /* ---- Kanban: full-width columns with scroll-snap ---- */
    .kanban-page {
        padding-bottom: 72px;
    }
    .kanban-board {
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        gap: 0;
        padding-bottom: 8px;
    }
    .kanban-board::-webkit-scrollbar {
        display: none;
    }
    .kanban-column {
        scroll-snap-align: start;
        min-width: calc(100vw - 32px);
        max-width: calc(100vw - 32px);
        flex-shrink: 0;
    }

    /* ---- Kanban bottom nav ---- */
    .kanban-mobile-nav {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 30;
        background: var(--color-card);
        border-top: 1px solid var(--color-border);
        box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.07);
    }
    .kanban-mobile-nav-inner {
        display: flex;
        overflow-x: auto;
        gap: 6px;
        padding: 8px 12px 10px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .kanban-mobile-nav-inner::-webkit-scrollbar {
        display: none;
    }
    .kanban-nav-pill {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        padding: 5px 12px;
        border-radius: 0;
        border: 1.5px solid var(--stage-color, var(--color-border));
        font-size: 0.78rem;
        font-weight: 500;
        white-space: nowrap;
        cursor: pointer;
        background: transparent;
        color: var(--color-text-muted);
        flex-shrink: 0;
        transition: background 0.18s, color 0.18s;
    }
    .kanban-nav-pill.active {
        background: var(--stage-color, var(--color-primary));
        color: #fff;
        border-color: var(--stage-color, var(--color-primary));
    }
    .kanban-nav-count {
        font-size: 0.7rem;
        font-weight: 700;
        background: rgba(0, 0, 0, 0.1);
        border-radius: 0;
        padding: 1px 5px;
        min-width: 16px;
        text-align: center;
    }
    .kanban-nav-pill.active .kanban-nav-count {
        background: rgba(255, 255, 255, 0.3);
    }
}

/* ==========================================
   Layout helpers
   ========================================== */

.main-wrapper--bare {
    padding: 0;
}

/* ==========================================
   Landing Page
   ========================================== */

.landing-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--font-primary);
}

/* Nav */
.landing-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 48px;
    background: white;
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.landing-nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--color-text-main);
}

.landing-nav-brand .brand-emoji {
    font-size: 1.8rem;
}

.landing-nav-brand .brand-text {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.landing-nav-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn-ghost {
    background: transparent;
    color: var(--color-text-main);
    border: none;
    font-weight: 600;
}

.btn-ghost:hover {
    background: rgba(0, 0, 0, 0.05);
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
    border-radius: var(--radius-md);
}

/* Hero */
.landing-hero {
    background: linear-gradient(160deg, #fff5f5 0%, #ffffff 55%);
    padding: 100px 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    gap: 28px;
    position: relative;
    overflow: hidden;
}

.landing-hero::before {
    content: '';
    position: absolute;
    top: -120px;
    right: -120px;
    width: 480px;
    height: 480px;
    border-radius: 50%;
    background: rgba(246, 95, 104, 0.07);
    pointer-events: none;
}

.landing-hero::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: rgba(246, 95, 104, 0.04);
    pointer-events: none;
}

.landing-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(246, 95, 104, 0.1);
    color: var(--color-primary);
    padding: 6px 18px;
    border-radius: 100px;
    font-size: 0.88rem;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.landing-hero h1 {
    font-size: clamp(2.6rem, 5.5vw, 4.2rem);
    font-weight: 900;
    letter-spacing: -2px;
    line-height: 1.08;
    max-width: 720px;
    position: relative;
    z-index: 1;
}

.landing-hero h1 span {
    color: var(--color-primary);
}

.landing-hero p {
    font-size: 1.15rem;
    color: var(--color-text-muted);
    max-width: 520px;
    line-height: 1.65;
    position: relative;
    z-index: 1;
}

.landing-hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
    position: relative;
    z-index: 1;
}

/* Stats strip */
.landing-stats {
    background: var(--color-primary);
    padding: 44px 48px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    text-align: center;
    gap: 24px;
}

.landing-stat-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.landing-stat-number {
    font-size: 2rem;
    font-weight: 900;
    color: white;
    letter-spacing: -1px;
}

.landing-stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
}

/* Features */
.landing-features {
    padding: 100px 48px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.landing-section-header {
    text-align: center;
    margin-bottom: 60px;
}

.landing-section-label {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-primary);
    margin-bottom: 12px;
}

.landing-section-header h2 {
    font-size: clamp(1.9rem, 3vw, 2.7rem);
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 14px;
}

.landing-section-header p {
    color: var(--color-text-muted);
    font-size: 1.05rem;
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.6;
}

.landing-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.landing-feature-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.landing-feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(246, 95, 104, 0.25);
}

.landing-feature-icon {
    width: 52px;
    height: 52px;
    background: rgba(246, 95, 104, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.landing-feature-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.landing-feature-card p {
    font-size: 0.92rem;
    color: var(--color-text-muted);
    line-height: 1.65;
}

/* How it works */
.landing-how-bg {
    background: #f8f9fa;
    width: 100%;
}

.landing-how {
    padding: 100px 48px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.landing-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    position: relative;
}

.landing-steps::before {
    content: '';
    position: absolute;
    top: 27px;
    left: calc(16.66% + 28px);
    right: calc(16.66% + 28px);
    height: 2px;
    background: var(--color-border);
    z-index: 0;
}

.landing-step {
    text-align: center;
    position: relative;
}

.landing-step-number {
    width: 56px;
    height: 56px;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 800;
    margin: 0 auto 24px;
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 12px rgba(246, 95, 104, 0.35);
}

.landing-step h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.landing-step p {
    font-size: 0.92rem;
    color: var(--color-text-muted);
    line-height: 1.65;
}

/* Audience split */
.landing-audience {
    padding: 100px 48px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.landing-audience-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

.landing-audience-card {
    background: var(--color-card);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 48px;
    display: flex;
    flex-direction: column;
}

.landing-audience-card.is-primary {
    border-color: var(--color-primary);
    background: linear-gradient(160deg, #fff5f5, #ffffff);
}

.landing-audience-card h3 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -0.3px;
}

.landing-audience-card > p {
    color: var(--color-text-muted);
    margin-bottom: 28px;
    line-height: 1.6;
    font-size: 0.97rem;
}

.landing-audience-list {
    list-style: none;
    margin-bottom: 36px;
    display: flex;
    flex-direction: column;
    gap: 13px;
    flex: 1;
}

.landing-audience-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.landing-audience-list li::before {
    content: '✓';
    color: var(--color-primary);
    font-weight: 800;
    flex-shrink: 0;
    margin-top: 1px;
}

/* CTA */
.landing-cta {
    background: linear-gradient(135deg, #f65f68, #e04a52);
    padding: 100px 48px;
    text-align: center;
    color: white;
}

.landing-cta h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    letter-spacing: -1px;
    margin-bottom: 16px;
}

.landing-cta p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 40px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.btn-white {
    background: white;
    color: var(--color-primary);
}

.btn-white:hover {
    background: #f8f9fa;
    color: var(--color-primary-hover);
}

.btn-outline-white {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.65);
    color: white;
}

.btn-outline-white:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: white;
}

/* Footer */
.landing-footer {
    background: var(--color-text-main);
    color: rgba(255, 255, 255, 0.55);
    padding: 28px 48px;
    text-align: center;
    font-size: 0.85rem;
}

.landing-footer a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
}

.landing-footer a:hover {
    color: white;
}

/* Landing responsive */
@media (max-width: 900px) {
    .landing-nav {
        padding: 16px 24px;
    }

    .landing-hero {
        padding: 70px 24px;
    }

    .landing-stats {
        grid-template-columns: 1fr;
        padding: 36px 24px;
        gap: 28px;
    }

    .landing-features {
        padding: 60px 24px;
    }

    .landing-how {
        padding: 60px 24px;
    }

    .landing-steps {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .landing-steps::before {
        display: none;
    }

    .landing-audience {
        padding: 60px 24px;
    }

    .landing-audience-grid {
        grid-template-columns: 1fr;
    }

    .landing-audience-card {
        padding: 36px;
    }

    .landing-cta {
        padding: 70px 24px;
    }

    .landing-footer {
        padding: 24px;
    }
}

/* ==========================================
   B2B Landing Page (lp-*)
   ========================================== */

/* Misc cross-page helpers */
.lp-nav-subtle {
    font-size: 0.88rem;
    color: var(--color-text-muted);
}

/* Wrapper */
.lp-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--font-primary);
}

/* Nav */
.lp-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 48px;
    background: #0f172a;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.lp-nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: white;
}

.lp-nav-brand .brand-text {
    color: white;
}

.lp-nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.lp-nav-link {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.15s;
}

.lp-nav-link:hover {
    color: white;
}

.lp-nav-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Nav Sign In button sizing */
.lp-nav-signin {
    padding: 8px 18px;
    font-size: 0.88rem;
    white-space: nowrap;
}

/* Language Selector Dropdown */
.lp-lang-selector {
    position: relative;
    display: inline-block;
}

.lp-lang-btn {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 8px 14px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.lp-lang-selector:hover .lp-lang-btn {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-color: rgba(255, 255, 255, 0.25);
}

.lp-lang-caret {
    font-size: 0.65rem;
    opacity: 0.7;
    transition: transform 0.2s ease;
}

.lp-lang-selector:hover .lp-lang-caret {
    transform: rotate(180deg);
}

.lp-lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
    min-width: 120px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 110;
    overflow: hidden;
}

.lp-lang-selector:hover .lp-lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lp-lang-option {
    display: block;
    padding: 10px 16px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.15s ease;
    text-align: left;
}

.lp-lang-option:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.lp-lang-option.active {
    color: var(--color-primary, #f65f68);
    background: rgba(246, 95, 104, 0.05);
    font-weight: 600;
}


.lp-ghost-dark {
    color: rgba(255,255,255,0.75);
}

.lp-ghost-dark:hover {
    background: rgba(255,255,255,0.08);
    color: white;
}

/* Hero */
.lp-hero {
    background: linear-gradient(160deg, #0f172a 0%, #1a2742 100%);
    padding: 80px 80px 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: flex-end;
    overflow: hidden;
}

.lp-hero-content {
    padding-bottom: 80px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.lp-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(246,95,104,0.15);
    color: #ff8f94;
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    width: fit-content;
    border: 1px solid rgba(246,95,104,0.25);
}

.lp-hero-title {
    font-size: clamp(2.4rem, 4vw, 3.5rem);
    font-weight: 900;
    letter-spacing: -2px;
    line-height: 1.08;
    color: white;
}

.lp-hero-accent {
    color: var(--color-primary);
}

.lp-hero-sub {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.6);
    line-height: 1.7;
    max-width: 480px;
}

.lp-hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: center;
}

.lp-btn-dim {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.75);
    border: 1px solid rgba(255,255,255,0.1);
}

.lp-btn-dim:hover {
    background: rgba(255,255,255,0.13);
    color: white;
}

.lp-hero-note {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.35);
    margin-top: -8px;
}

.lp-hero-visual {
    align-self: flex-end;
}

/* Dashboard preview */
.dp-shell {
    background: #1e293b;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 -4px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.06);
    font-size: 0.8rem;
}

.dp-topbar {
    background: #0f172a;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.dp-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dp-dot-r { background: #f65f68; }
.dp-dot-y { background: #e67700; }
.dp-dot-g { background: #2b8a3e; }

.dp-topbar-title {
    margin-left: 8px;
    color: rgba(255,255,255,0.35);
    font-size: 0.72rem;
    font-family: 'Courier New', monospace;
}

.dp-header {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.dp-header-title {
    color: white;
    font-weight: 700;
    font-size: 0.88rem;
}

.dp-pill {
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.68rem;
    font-weight: 700;
}

.dp-pill--green { background: rgba(43,138,62,0.25); color: #69db7c; }
.dp-pill--blue  { background: rgba(25,113,194,0.25); color: #74c0fc; }

.dp-kanban {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid rgba(255,255,255,0.06);
}

.dp-col {
    padding: 12px;
    border-right: 1px solid rgba(255,255,255,0.05);
}

.dp-col:last-child { border-right: none; }

.dp-col-title {
    font-size: 0.64rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.35);
    margin-bottom: 10px;
}

.dp-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 0;
    padding: 9px 10px;
    margin-bottom: 8px;
}

.dp-card--accent { border-color: rgba(246,95,104,0.35); background: rgba(246,95,104,0.06); }
.dp-card--done   { border-color: rgba(43,138,62,0.35);  background: rgba(43,138,62,0.06); }

.dp-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.dp-card-num  { font-weight: 800; color: white; font-size: 0.76rem; }
.dp-card-time { font-size: 0.6rem; color: rgba(255,255,255,0.28); }
.dp-card-items { color: rgba(255,255,255,0.5); font-size: 0.68rem; margin-bottom: 7px; line-height: 1.4; }

.dp-tag {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 0;
    font-size: 0.6rem;
    font-weight: 700;
}

.dp-tag--red    { background: rgba(246,95,104,0.18); color: #ff9da2; }
.dp-tag--blue   { background: rgba(25,113,194,0.2);  color: #74c0fc; }
.dp-tag--green  { background: rgba(43,138,62,0.2);   color: #69db7c; }
.dp-tag--orange { background: rgba(230,119,0,0.2);   color: #ffa94d; }

.dp-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid rgba(255,255,255,0.06);
}

.dp-stat {
    padding: 10px 12px;
    border-right: 1px solid rgba(255,255,255,0.05);
    text-align: center;
}

.dp-stat:last-child { border-right: none; }
.dp-stat-num   { font-size: 1rem; font-weight: 800; color: white; }
.dp-stat-label { font-size: 0.6rem; color: rgba(255,255,255,0.3); margin-top: 2px; }

/* Trust bar */
.lp-trust {
    background: var(--color-card);
    border-bottom: 1px solid var(--color-border);
}

.lp-trust-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 48px;
    display: flex;
    align-items: center;
    gap: 32px;
    flex-wrap: wrap;
}

.lp-trust-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-muted);
    white-space: nowrap;
}

.lp-trust-items {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.lp-trust-item {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--color-text-main);
}

.lp-trust-divider {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--color-border);
    flex-shrink: 0;
}

/* Problem */
.lp-problem {
    background: #f8f9fa;
    padding: 90px 48px;
}

.lp-problem-inner {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.lp-section-label {
    display: inline-block;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-primary);
    margin-bottom: 14px;
}

.lp-section-title {
    font-size: clamp(1.9rem, 3vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.15;
    margin-bottom: 16px;
}

.lp-section-sub {
    color: var(--color-text-muted);
    font-size: 1.05rem;
    line-height: 1.65;
    margin-bottom: 0;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.lp-problem-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 48px 0 36px;
    text-align: left;
}

.lp-problem-item {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.lp-problem-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.lp-problem-item p {
    font-size: 0.95rem;
    color: var(--color-text-main);
    line-height: 1.55;
    margin: 0;
}

.lp-problem-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--color-text-main);
}

.lp-problem-arrow {
    font-size: 1.4rem;
    color: var(--color-primary);
}

/* Features bento */
.lp-features {
    padding: 100px 48px;
    background: white;
}

.lp-features-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.lp-features-inner .lp-section-label,
.lp-features-inner .lp-section-title,
.lp-features-inner .lp-section-sub {
    text-align: center;
}

.lp-features-inner .lp-section-sub {
    margin-bottom: 56px;
}

.lp-bento {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.lp-bento-item {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.lp-bento-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.lp-bento-wide {
    grid-column: span 2;
}

.lp-bento-dark {
    background: #0f172a;
    border-color: rgba(255,255,255,0.06);
    color: white;
}

.lp-bento-dark h3 { color: white; }
.lp-bento-dark p  { color: rgba(255,255,255,0.55); }
.lp-bento-dark .lp-role-item { color: rgba(255, 255, 255, 0.75); }

.lp-bento-accent {
    background: linear-gradient(135deg, #fff5f5, #ffffff);
    border-color: rgba(246,95,104,0.2);
}

.lp-bento-icon {
    font-size: 1.8rem;
    margin-bottom: 18px;
}

.lp-bento-item h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.lp-bento-item p {
    font-size: 0.92rem;
    color: var(--color-text-muted);
    line-height: 1.65;
}

/* Mini kanban inside bento */
.lp-bento-mini-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 24px;
}

.lp-mini-col { display: flex; flex-direction: column; gap: 6px; }

.lp-mini-tag {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: rgba(255,255,255,0.3);
    margin-bottom: 2px;
}

.lp-mini-card {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 0;
    padding: 7px 10px;
    font-size: 0.72rem;
    color: rgba(255,255,255,0.6);
    font-weight: 600;
}

.lp-mini-card--active { border-color: rgba(230,119,0,0.5); color: #ffa94d; }
.lp-mini-card--done   { border-color: rgba(43,138,62,0.5); color: #69db7c; }

/* Role list inside bento */
.lp-role-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.lp-role-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--color-text-main);
}

.lp-role-badge {
    background: rgba(246,95,104,0.1);
    color: var(--color-primary);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 0;
    width: auto;
    min-width: 110px;
    text-align: center;
    flex-shrink: 0;
}

/* How it works */
.lp-how-bg {
    background: #f8f9fa;
    padding: 100px 48px;
}

.lp-how {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.lp-how .lp-section-sub {
    margin-bottom: 64px;
}

.lp-steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
}

.lp-step {
    flex: 1;
    max-width: 220px;
    text-align: center;
    padding: 0 16px;
}

.lp-step-num {
    width: 56px;
    height: 56px;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 900;
    margin: 0 auto 20px;
    box-shadow: 0 4px 14px rgba(246,95,104,0.35);
}

.lp-step h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.lp-step p {
    font-size: 0.88rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}

.lp-step-arrow {
    font-size: 1.3rem;
    color: var(--color-text-muted);
    margin-top: 20px;
    flex-shrink: 0;
    align-self: flex-start;
    padding-top: 18px;
}

/* Pricing */
.lp-pricing {
    padding: 100px 48px;
    background: white;
}

.lp-pricing-inner {
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}

.lp-pricing-inner .lp-section-sub {
    margin-bottom: 56px;
}

.lp-plans {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: start;
}

.lp-plan {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    text-align: left;
    position: relative;
}

.lp-plan--featured {
    border-color: var(--color-primary);
    border-width: 2px;
    box-shadow: 0 0 0 4px rgba(246,95,104,0.06), var(--shadow-lg);
}

.lp-plan-badge {
    position: absolute;
    top: -13px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-primary);
    color: white;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 16px;
    border-radius: 100px;
    white-space: nowrap;
}

.lp-plan-header {
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--color-border);
}

.lp-plan-name {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--color-text-muted);
    margin-bottom: 12px;
}

.lp-plan-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 10px;
}

.lp-plan-amount {
    font-size: 2.2rem;
    font-weight: 900;
    letter-spacing: -1px;
    color: var(--color-text-main);
}

.lp-plan-period {
    font-size: 0.82rem;
    color: var(--color-text-muted);
}

.lp-plan-desc {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.5;
}

.lp-plan-features {
    list-style: none;
    margin-bottom: 28px;
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.lp-plan-features li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.88rem;
    line-height: 1.4;
    color: var(--color-text-main);
}

.lp-plan-features li::before {
    content: '✓';
    color: var(--color-primary);
    font-weight: 800;
    flex-shrink: 0;
}

.lp-plan-no {
    opacity: 0.4;
}

.lp-plan-no::before {
    content: '–' !important;
    color: var(--color-text-muted) !important;
}

/* Testimonial */
.lp-testimonial {
    background: #f8f9fa;
    padding: 80px 48px;
}

.lp-testimonial-inner {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

.lp-quote {
    font-size: 1.2rem;
    line-height: 1.7;
    color: var(--color-text-main);
    font-style: italic;
    margin-bottom: 32px;
    position: relative;
}

.lp-quote::before {
    content: '"';
    font-size: 5rem;
    color: var(--color-primary);
    opacity: 0.2;
    position: absolute;
    top: -32px;
    left: -16px;
    font-style: normal;
    line-height: 1;
    pointer-events: none;
}

.lp-quote-author {
    display: flex;
    align-items: center;
    gap: 14px;
    justify-content: center;
}

.lp-quote-avatar {
    width: 44px;
    height: 44px;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.lp-quote-name {
    font-weight: 700;
    font-size: 0.95rem;
}

.lp-quote-role {
    font-size: 0.82rem;
    color: var(--color-text-muted);
}

/* Free Online Store Promo */
.lp-promo {
    padding: 64px 48px;
    background: linear-gradient(135deg, #fff5f5, #ffffff);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.lp-promo-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 32px;
}

.lp-promo-icon {
    font-size: 2.6rem;
    flex-shrink: 0;
}

.lp-promo-content {
    flex: 1;
}

.lp-promo-title {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}

.lp-promo-sub {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    max-width: 620px;
    margin: 0;
}

.lp-promo-cta {
    flex-shrink: 0;
    white-space: nowrap;
}

/* CTA */
.lp-cta {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    padding: 100px 48px;
}

.lp-cta-inner {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.lp-cta h2 {
    font-size: clamp(2rem, 3.5vw, 2.8rem);
    font-weight: 900;
    letter-spacing: -1px;
    color: white;
    line-height: 1.15;
}

.lp-cta p {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.6);
    line-height: 1.65;
    max-width: 520px;
}

.lp-cta-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 8px;
}

.lp-btn-dim-cta {
    background: rgba(255,255,255,0.07);
    color: rgba(255,255,255,0.65);
    border: 1px solid rgba(255,255,255,0.1);
}

.lp-btn-dim-cta:hover {
    background: rgba(255,255,255,0.12);
    color: white;
}

/* Footer */
.lp-footer {
    background: #070e1a;
    padding: 36px 48px;
}

.lp-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.lp-footer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lp-footer-links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.lp-footer-links a {
    color: rgba(255,255,255,0.45);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.15s;
}

.lp-footer-links a:hover {
    color: rgba(255,255,255,0.85);
}

.lp-footer-copy {
    color: rgba(255,255,255,0.25);
    font-size: 0.8rem;
    width: 100%;
    text-align: center;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.lp-cta-note {
    font-size: 0.85rem !important;
    font-weight: 700;
    color: rgba(255,255,255,0.5) !important;
    margin-top: -8px !important;
}

/* ================================================================
   Free Online Store Landing Page (/free-store)
   ================================================================ */

.fs-hero {
    background: linear-gradient(160deg, #0f172a 0%, #1a2742 100%);
    padding: 100px 48px;
    text-align: center;
}

.fs-hero-inner {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
}

.fs-hero-title {
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    font-weight: 900;
    letter-spacing: -1.5px;
    line-height: 1.15;
    color: white;
}

.fs-hero-sub {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.65);
    line-height: 1.7;
    max-width: 560px;
}

.fs-hero-note {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.4);
    margin-top: -6px;
}

/* Live store showcase */
.fs-showcase {
    padding: 90px 48px;
    background: white;
    text-align: center;
}

.fs-showcase-inner {
    max-width: 640px;
    margin: 0 auto;
}

.fs-showcase-panel {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    margin-top: 32px;
    text-align: left;
    overflow: hidden;
}

.fs-showcase-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 28px;
}

.fs-showcase-row + .fs-showcase-row {
    border-top: 1px solid var(--color-border);
}

.fs-showcase-name {
    font-size: 1.05rem;
    font-weight: 700;
}

.fs-showcase-link {
    color: var(--color-primary);
    font-weight: 700;
    font-size: 0.92rem;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.fs-showcase-link:hover {
    text-decoration: underline;
}

.fs-showcase-caption {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    font-style: italic;
    margin: 24px 0 0;
}

/* What's included checklist */
.fs-checklist-section {
    padding: 100px 48px;
    background: #f8f9fa;
}

.fs-checklist-inner {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.fs-checklist {
    list-style: none;
    margin: 40px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 32px;
    text-align: left;
}

.fs-checklist li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-main);
}

.fs-checklist li::before {
    content: '✓';
    color: var(--color-primary);
    font-weight: 800;
    flex-shrink: 0;
}

/* Why-free / About text sections */
.fs-text-section {
    padding: 90px 48px;
    background: white;
}

.fs-text-section--alt {
    background: #f8f9fa;
}

.fs-text-inner {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

.fs-text-inner p {
    font-size: 1.02rem;
    line-height: 1.75;
    color: var(--color-text-main);
    margin: 0 0 16px;
}

.fs-text-inner p:last-child {
    margin-bottom: 0;
}

/* B2B Responsive */
@media (max-width: 1024px) {
    .lp-hero {
        grid-template-columns: 1fr;
        padding: 64px 48px 0;
        gap: 40px;
    }

    .lp-hero-content { padding-bottom: 0; }

    .lp-hero-visual {
        max-width: 560px;
        width: 100%;
        margin: 0 auto;
    }

    .lp-bento-wide { grid-column: span 1; }

    .lp-bento {
        grid-template-columns: repeat(2, 1fr);
    }

    .lp-plans {
        grid-template-columns: 1fr;
        max-width: 420px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .lp-nav {
        padding: 12px 20px;
        gap: 12px;
    }

    .lp-nav-links { display: none; }

    .lp-nav-brand {
        gap: 8px;
        flex-shrink: 1;
        min-width: 0;
    }

    .lp-nav-brand .brand-logo { height: 32px; }

    .lp-nav-brand .brand-text {
        font-size: 1.25rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .lp-nav-actions {
        gap: 8px;
        flex-shrink: 0;
    }

    .lp-lang-btn {
        padding: 7px 10px;
        font-size: 0.8rem;
        gap: 4px;
    }

    .lp-nav-actions .btn-primary {
        padding: 8px 14px;
        font-size: 0.85rem;
        white-space: nowrap;
    }

    .lp-hero {
        padding: 56px 24px 0;
    }

    .lp-trust-inner {
        padding: 20px 24px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .lp-trust-label {
        white-space: normal;
    }

    .lp-problem { padding: 60px 24px; }

    .lp-problem-grid {
        grid-template-columns: 1fr;
    }

    .lp-features { padding: 60px 24px; }

    .lp-bento {
        grid-template-columns: 1fr;
    }

    .lp-bento-wide { grid-column: span 1; }

    .lp-bento-item {
        padding: 20px;
    }

    .lp-role-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .lp-role-badge {
        min-width: unset;
        width: auto;
        text-align: left;
    }

    .lp-how-bg { padding: 60px 24px; }

    .lp-steps {
        flex-direction: column;
        align-items: center;
        gap: 32px;
    }

    .lp-step-arrow {
        transform: rotate(90deg);
        margin: -16px 0;
    }

    .lp-pricing { padding: 60px 24px; }

    .lp-testimonial { padding: 56px 24px; }

    .lp-promo { padding: 40px 24px; }

    .lp-promo-inner {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .lp-promo-cta { width: 100%; }

    .lp-cta { padding: 70px 24px; }

    .fs-hero { padding: 64px 24px; }

    .fs-showcase { padding: 56px 24px; }

    .fs-showcase-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 16px 20px;
    }

    .fs-checklist-section { padding: 60px 24px; }

    .fs-checklist {
        grid-template-columns: 1fr;
    }

    .fs-text-section { padding: 60px 24px; }

    .lp-footer {
        padding: 28px 24px;
    }

    .lp-footer-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .lp-footer-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .lp-nav {
        padding: 10px 14px;
        gap: 8px;
    }

    .lp-nav-brand .brand-logo { height: 28px; }

    .lp-nav-brand .brand-text { font-size: 1.1rem; }

    .lp-nav-actions { gap: 6px; }

    /* Keep only the globe + code, drop the caret to save space */
    .lp-lang-caret { display: none; }

    .lp-lang-btn {
        padding: 6px 8px;
        font-size: 0.78rem;
    }

    .lp-nav-actions .btn-primary {
        padding: 7px 12px;
        font-size: 0.82rem;
    }
}

/* ================================================================
   WhatsApp CRM — dedicated inbox page (.wa-page)
   and orders panel (.wa-orders-panel)
   ================================================================ */

/* ---------- Tab badge ---------- */
.wa-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 0;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    margin-left: 5px;
    vertical-align: middle;
}

/* ---------- Full inbox page ---------- */
.wa-page {
    display: flex;
    height: calc(100vh - 0px);
    max-height: 100%;
    overflow: hidden;
    background: var(--color-bg);
}

.wa-sidebar {
    width: 320px;
    min-width: 260px;
    max-width: 360px;
    display: flex;
    flex-direction: column;
    background: var(--color-card);
    border-right: 1px solid var(--color-border);
    overflow: hidden;
}

.wa-sidebar-header {
    padding: 16px;
    border-bottom: 1px solid var(--color-border);
    flex-shrink: 0;
}

.wa-sidebar-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.wa-sidebar-icon { display: flex; align-items: center; }

.wa-sidebar-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    flex: 1;
}

.wa-total-badge {
    background: var(--color-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 0;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.wa-search {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-primary);
    font-size: 13px;
    background: var(--color-input);
    color: var(--color-text-main);
    margin-bottom: 10px;
    outline: none;
    transition: border-color var(--transition-fast);
}
.wa-search:focus { border-color: var(--color-primary); }

.wa-filter-tabs {
    display: flex;
    gap: 4px;
}

.wa-filter-btn {
    flex: 1;
    padding: 5px 8px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: transparent;
    font-family: var(--font-primary);
    font-size: 12px;
    cursor: pointer;
    color: var(--color-text-muted);
    transition: all var(--transition-fast);
}
.wa-filter-btn:hover { border-color: var(--color-primary); color: var(--color-primary); }
.wa-filter-btn.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
    font-weight: 600;
}

.wa-conv-list {
    flex: 1;
    overflow-y: auto;
    padding: 4px 0;
}

.wa-list-loading,
.wa-list-empty {
    padding: 24px 16px;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 13px;
}

.wa-conv-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--color-border);
    transition: background var(--transition-fast);
}
.wa-conv-item:hover { background: var(--color-bg); }
.wa-conv-item--active { background: #fff5f5; }

.wa-conv-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wa-conv-avatar--sm {
    width: 32px;
    height: 32px;
    font-size: 13px;
}

.wa-conv-body { flex: 1; min-width: 0; }

.wa-conv-name-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 4px;
}

.wa-conv-name {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wa-conv-time {
    font-size: 11px;
    color: var(--color-text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.wa-conv-preview-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    margin-top: 2px;
}

.wa-conv-preview {
    font-size: 12px;
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.wa-unread-dot {
    min-width: 18px;
    height: 18px;
    background: var(--color-primary);
    color: #fff;
    border-radius: 0;
    font-size: 10px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    flex-shrink: 0;
}

/* ---------- Thread pane ---------- */
.wa-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.wa-thread-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    gap: 12px;
}
.wa-thread-placeholder p { font-size: 14px; }

.wa-no-account {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 24px;
    gap: 12px;
}
.wa-no-account h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text-main);
}
.wa-no-account p {
    font-size: 14px;
    color: var(--color-text-muted);
    max-width: 480px;
}
.wa-no-account-hint {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-size: 13px;
    line-height: 1.7;
    margin-top: 4px;
}
.wa-no-account-hint code {
    background: #fde8e9;
    border-radius: 0;
    padding: 1px 5px;
    font-family: monospace;
    font-size: 12px;
}

.wa-thread {
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.wa-thread-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-card);
    flex-shrink: 0;
}

.wa-thread-contact {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wa-contact-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wa-thread-name {
    font-size: 14px;
    font-weight: 600;
}
.wa-thread-phone {
    font-size: 12px;
    color: var(--color-text-muted);
}

.wa-thread-actions { display: flex; gap: 8px; }

.wa-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #fff5f5;
}

.wa-msgs-loading,
.wa-no-msgs {
    text-align: center;
    color: var(--color-text-muted);
    font-size: 13px;
    padding: 24px;
}

.wa-msg { display: flex; }
.wa-msg--out { justify-content: flex-end; }
.wa-msg--in  { justify-content: flex-start; }

.wa-msg-bubble {
    max-width: 70%;
    padding: 8px 12px;
    border-radius: 0;
    font-size: 13px;
    line-height: 1.5;
    word-break: break-word;
    position: relative;
}
.wa-msg--out .wa-msg-bubble {
    background: #fde8e9;
    border-bottom-right-radius: 4px;
}
.wa-msg--in .wa-msg-bubble {
    background: #fff;
    border-bottom-left-radius: 4px;
    box-shadow: var(--shadow-sm);
}

.wa-msg-time {
    display: block;
    font-size: 10px;
    color: var(--color-text-muted);
    text-align: right;
    margin-top: 4px;
}
.wa-msg-status { margin-left: 3px; }
.wa-msg-media-label { color: var(--color-text-muted); }

.wa-msg--compact .wa-msg-bubble { padding: 5px 9px; font-size: 12px; }

.wa-reply-bar {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--color-border);
    background: var(--color-card);
    flex-shrink: 0;
}

.wa-reply-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-primary);
    font-size: 13px;
    resize: none;
    outline: none;
    background: var(--color-input);
    color: var(--color-text-main);
    line-height: 1.4;
    transition: border-color var(--transition-fast);
}
.wa-reply-input:focus { border-color: var(--color-primary); }

.wa-send-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background var(--transition-fast);
}
.wa-send-btn:hover { background: var(--color-primary-hover); }

/* ---------- Orders page WhatsApp panel ---------- */
.wa-orders-panel {
    background: var(--color-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 300px;
    max-height: 70vh;
}

.wa-orders-panel-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.wa-orders-panel-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.wa-orders-panel-title-row h3 {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
}

.wa-panel-unread-count {
    background: var(--color-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 0;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.wa-open-inbox-link {
    font-size: 12px;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
}
.wa-open-inbox-link:hover { text-decoration: underline; }

.wa-orders-conv-list {
    flex: 1;
    overflow-y: auto;
    padding: 4px 0;
}

.wa-panel-loading,
.wa-panel-empty {
    padding: 24px 16px;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 13px;
}

.wa-orders-conv-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--color-border);
    transition: background var(--transition-fast);
}
.wa-orders-conv-item:hover { background: var(--color-bg); }

.wa-orders-conv-body { flex: 1; min-width: 0; }
.wa-orders-conv-name-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}
.wa-orders-conv-preview {
    font-size: 12px;
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}

/* ---------- Quick reply in orders panel ---------- */
.wa-quick-reply {
    border-top: 1px solid var(--color-border);
    flex-direction: column;
    background: var(--color-card);
    max-height: 280px;
}

.wa-quick-reply-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    border-bottom: 1px solid var(--color-border);
    background: #fff5f5;
}

.wa-qr-contact-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-main);
}

.wa-qr-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-muted);
    font-size: 14px;
    padding: 0 4px;
}

.wa-quick-msgs {
    flex: 1;
    overflow-y: auto;
    padding: 8px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: #fff5f5;
    max-height: 140px;
}

.wa-quick-compose {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 8px 12px;
    border-top: 1px solid var(--color-border);
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .wa-page { flex-direction: column; }
    .wa-sidebar { width: 100%; max-width: 100%; max-height: 40vh; border-right: none; border-bottom: 1px solid var(--color-border); }
    .wa-main { flex: 1; }
}

/* ---------- Mini inbox (orders page tab) ---------- */
.wa-mini-inbox {
    display: flex;
    height: calc(100vh - 260px);
    min-height: 480px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--color-card);
    box-shadow: var(--shadow-md);
}

.wa-mini-sidebar {
    width: 280px;
    min-width: 220px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--color-border);
    overflow: hidden;
    background: var(--color-card);
}

.wa-mini-sidebar-hdr {
    padding: 12px 14px;
    border-bottom: 1px solid var(--color-border);
    flex-shrink: 0;
}

.wa-mini-title-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.wa-mini-title {
    font-size: 14px;
    font-weight: 700;
}

.wa-mini-conv-list {
    flex: 1;
    overflow-y: auto;
}

.wa-mini-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--color-bg);
}

.wa-mini-main .wa-thread {
    flex: 1;
    overflow: hidden;
}

.wa-mini-main .wa-thread-placeholder {
    flex: 1;
}

@media (max-width: 900px) {
    .wa-mini-inbox { flex-direction: column; height: auto; }
    .wa-mini-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--color-border); max-height: 220px; }
}

/* ---------- WhatsApp setup form ---------- */
.wa-setup-page {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 20px;
    overflow-y: auto;
    background: var(--color-bg);
}

.wa-setup-card {
    width: 100%;
    max-width: 540px;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 36px 32px;
}

.wa-setup-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
}

.wa-setup-title {
    font-size: 20px;
    font-weight: 800;
    margin: 0 0 4px;
}

.wa-setup-subtitle {
    font-size: 13px;
    color: var(--color-text-muted);
    margin: 0;
}

.wa-setup-fields {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.wa-field-hint {
    font-size: 11.5px;
    color: var(--color-text-muted);
    line-height: 1.5;
}

.wa-required { color: var(--color-primary); font-weight: 700; }
.wa-required-note { font-size: 12px; color: var(--color-text-muted); }

.wa-token-row {
    display: flex;
    gap: 6px;
    align-items: center;
}

.wa-token-row .form-control { flex: 1; }

.wa-token-toggle {
    width: 36px;
    height: 38px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-card);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    flex-shrink: 0;
    transition: border-color var(--transition-fast);
}
.wa-token-toggle:hover { border-color: var(--color-primary); color: var(--color-primary); }

.wa-webhook-info {
    background: #fff5f5;
    border: 1px solid #fecaca;
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wa-webhook-info-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-primary);
}

.wa-webhook-url-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wa-webhook-url {
    font-family: monospace;
    font-size: 12px;
    color: var(--color-primary);
    word-break: break-all;
    flex: 1;
}

.wa-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 9px;
    border: 1px solid #fca5a5;
    border-radius: var(--radius-sm);
    background: #fff;
    font-size: 11px;
    font-family: var(--font-primary);
    color: var(--color-primary);
    cursor: pointer;
    flex-shrink: 0;
    transition: background var(--transition-fast);
}
.wa-copy-btn:hover { background: #fee2e2; }
.wa-copy-btn:active { background: #fecaca; }

.wa-setup-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
}

.wa-setup-alert {
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 16px;
}
.wa-setup-alert--error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: var(--color-danger);
}
.wa-setup-alert--success {
    background: #fff5f5;
    border: 1px solid #fecaca;
    color: var(--color-primary);
}

/* ---------- Settings button in sidebar header ---------- */
.wa-settings-btn {
    margin-left: auto;
    width: 28px;
    height: 28px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    transition: all var(--transition-fast);
}
.wa-settings-btn:hover { border-color: var(--color-primary); color: var(--color-primary); }

/* ---------- Settings overlay / panel ---------- */
.wa-settings-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.wa-settings-panel {
    background: var(--color-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 28px 28px 24px;
}

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

.wa-settings-panel-header h3 {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
}

/* ---------- Settings panel tabs (Connection / AI Bot) ---------- */
.wa-settings-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 0;
}
.wa-settings-tab {
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    color: var(--color-text-muted);
    margin-bottom: -1px;
    transition: all var(--transition-fast);
}
.wa-settings-tab:hover { color: var(--color-text); }
.wa-settings-tab.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

/* ---------- AI bot toggle label ---------- */
.wa-ai-toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
}
.wa-ai-toggle-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* ---------- Bot toggle button in thread header ---------- */
.wa-bot-toggle-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    padding: 4px 10px;
    border: 1px solid #22c55e;
    color: #16a34a;
    background: #f0fdf4;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}
.wa-bot-toggle-btn:hover { background: #dcfce7; }
.wa-bot-toggle-btn.wa-bot-paused {
    border-color: var(--color-border);
    color: var(--color-text-muted);
    background: var(--color-bg);
}
.wa-bot-toggle-btn.wa-bot-paused:hover { background: var(--color-hover); }

/* ═══════════════════════════════════════════════════════════════════════════
   Booking / Free Consultation Page
   URL: /book-consultation
═══════════════════════════════════════════════════════════════════════════ */

/* Page shell — full-viewport centering (no sidebar on this page) */
.booking-page-wrap {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 3rem 1.25rem 4rem;
    background: var(--color-bg);
}

/* Two-column card */
.booking-layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 0;
    max-width: 920px;
    width: 100%;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--color-card);
    box-shadow: var(--shadow-lg);
}

@media (max-width: 720px) {
    .booking-layout {
        grid-template-columns: 1fr;
    }
    .booking-info {
        border-right: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    }
}

/* ── Left info panel ── */
.booking-info {
    padding: 2.25rem 2rem;
    border-right: 1px solid var(--color-border);
    background: linear-gradient(160deg, #0f172a 0%, #1a2742 100%);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.booking-brand-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.booking-brand-logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
}

.booking-brand-name {
    font-weight: 800;
    font-size: 0.95rem;
    line-height: 1.2;
    color: #ffffff;
}

.booking-brand-tagline {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 500;
}

.booking-info-block h1 {
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 0.4rem;
    color: #ffffff;
}

.booking-info-block p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.65);
}

.booking-meta-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.booking-meta-list li {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 600;
}

.booking-meta-icon {
    display: flex;
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.55);
}

.booking-divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.booking-perks-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 0.75rem;
}

.booking-perks-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.booking-perk-item {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
}

.booking-perk-num {
    background: rgba(246, 95, 104, 0.18);
    color: #ff929a;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 0;
    flex-shrink: 0;
    margin-top: 2px;
}

.booking-perk-body strong {
    display: block;
    font-size: 0.875rem;
    line-height: 1.3;
    color: #ffffff;
}

.booking-perk-body span {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

.booking-trust-row {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: auto;
}

.booking-trust-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 600;
}

.booking-trust-check {
    color: #69db7c;
    font-size: 0.9rem;
}

/* ── Right scheduler panel ── */
.booking-scheduler {
    padding: 2.25rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Step indicator */
.booking-step-bar {
    display: flex;
    align-items: center;
    gap: 0;
}

.booking-step-pip {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-text-muted);
}

.booking-step-pip .pip {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
    flex-shrink: 0;
    transition: all 0.2s;
}

.booking-step-pip.active .pip {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: #fff;
}

.booking-step-pip.done .pip {
    border-color: var(--color-success);
    background: #d3f9d8;
    color: var(--color-success);
}

.booking-step-pip.active {
    color: var(--color-text-main);
}

.booking-step-connector {
    flex: 1;
    height: 2px;
    background: var(--color-border);
    margin: 0 0.5rem;
}

.booking-step-connector.done {
    background: var(--color-success);
}

/* Section heading */
.booking-sch-heading {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-text-main);
    margin-bottom: 0.75rem;
}

/* Week nav */
.booking-week-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.booking-week-label {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--color-text-main);
}

.booking-week-btn {
    background: none;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 0.3rem 0.75rem;
    font-family: var(--font-primary);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-text-main);
    cursor: pointer;
    transition: border-color var(--transition-fast), color var(--transition-fast);
}

.booking-week-btn:hover:not(:disabled) {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.booking-week-btn:disabled {
    opacity: 0.3;
    cursor: default;
}

/* Day tabs */
.booking-day-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.4rem;
    margin-bottom: 1.25rem;
}

@media (max-width: 480px) {
    .booking-day-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.booking-day-tab {
    padding: 0.5rem 0.2rem;
    text-align: center;
    border: 1.5px solid var(--color-border);
    border-radius: 0;
    cursor: pointer;
    background: var(--color-card);
    color: var(--color-text-main);
    font-family: var(--font-primary);
    transition: border-color var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
}

.booking-day-tab:hover {
    border-color: var(--color-primary);
    background: #fff5f5;
}

.booking-day-tab.selected {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: #fff;
}

.booking-day-tab .dn {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.7;
    display: block;
}

.booking-day-tab .dd {
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.1;
    display: block;
}

.booking-day-tab .dm {
    font-size: 0.65rem;
    opacity: 0.65;
    display: block;
}

/* Slots */
.booking-slots-area {
    min-height: 100px;
}

.booking-slots-spinner {
    display: none;
    padding: 2rem;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

.booking-slots-spinner.on {
    display: block;
}

.booking-slots-hint {
    padding: 2rem;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.875rem;
    background: var(--color-bg);
    border: 1px dashed var(--color-border);
    border-radius: 0;
}

.booking-slots-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.45rem;
}

@media (max-width: 480px) {
    .booking-slots-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.booking-slot-btn {
    padding: 0.55rem 0.3rem;
    text-align: center;
    border: 1.5px solid var(--color-border);
    border-radius: 0;
    font-family: var(--font-primary);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-text-main);
    background: var(--color-card);
    cursor: pointer;
    transition: border-color var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
}

.booking-slot-btn:hover {
    border-color: var(--color-primary);
    background: #fff5f5;
    color: var(--color-primary);
}

.booking-slot-btn.selected {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: #fff;
}

.booking-no-slots {
    text-align: center;
    padding: 1.5rem;
    color: var(--color-text-muted);
    font-size: 0.875rem;
    background: var(--color-bg);
    border: 1px dashed var(--color-border);
    border-radius: 0;
}

/* Booking form */
.booking-form {
    display: none;
}

.booking-form.on {
    display: block;
}

.booking-selected-pill {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #d3f9d8;
    border: 1px solid #8ce99a;
    border-radius: 0;
    padding: 0.6rem 1rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--color-success);
    margin-bottom: 1.25rem;
}

.booking-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

@media (max-width: 480px) {
    .booking-form-grid {
        grid-template-columns: 1fr;
    }
}

.booking-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.booking-form-group label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-text-main);
}

.booking-span2 {
    grid-column: 1 / -1;
}

.booking-req {
    color: var(--color-danger);
}

.booking-optional {
    font-weight: 400;
    color: var(--color-text-muted);
}

.booking-form-group input[type="text"],
.booking-form-group input[type="email"],
.booking-form-group textarea {
    padding: 0.65rem 0.85rem;
    border: 1.5px solid var(--color-border);
    border-radius: 0;
    font-family: var(--font-primary);
    font-size: 0.9rem;
    color: var(--color-text-main);
    background: var(--color-input);
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.booking-form-group input:focus,
.booking-form-group textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(246, 95, 104, 0.12);
}

.booking-form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.booking-form-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.booking-back-link {
    background: none;
    border: none;
    font-family: var(--font-primary);
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--color-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: color var(--transition-fast);
}

.booking-back-link:hover {
    color: var(--color-primary);
}

/* Error banner */
.booking-error-banner {
    background: #fff5f5;
    border: 1px solid #ffc9c9;
    border-radius: 0;
    padding: 0.75rem 1rem;
    color: var(--color-danger);
    font-size: 0.875rem;
    font-weight: 600;
}

.booking-error-banner ul {
    margin: 0.35rem 0 0 1.1rem;
}

.booking-error-banner li {
    margin-bottom: 0.2rem;
}

/* Confirmation screen */
.booking-confirmed-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 1rem;
    gap: 1rem;
    min-height: 300px;
}

.booking-confirmed-icon {
    font-size: 3.5rem;
    line-height: 1;
}

.booking-confirmed-screen h2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--color-text-main);
}

.booking-confirmed-screen p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    max-width: 320px;
}

.booking-confirmed-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #d3f9d8;
    border: 1px solid #8ce99a;
    border-radius: 0;
    padding: 0.5rem 1.1rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--color-success);
}

/* body override — remove sidebar margin on booking page */
body:not(.with-sidebar) .main-wrapper {
    margin-left: 0;
    padding: 0;
}

body:not(.with-sidebar) .main-wrapper .container {
    max-width: 100%;
    padding: 0;
}

/* ===========================================================================
   Public Storefront (/shop/{business_url})
   =========================================================================== */

.shop-page {
    min-height: 100vh;
    background-color: var(--color-bg, #f8f9fa);
    font-family: var(--font-primary);
}

.shop-hero {
    border-bottom: 1px solid var(--color-border);
    background-color: var(--color-card);
}

.shop-cover {
    height: 220px;
    background-color: var(--color-bg, #f1f3f5);
    background-size: cover;
    background-position: center;
}

.shop-cover--placeholder {
    background: linear-gradient(135deg, rgba(246, 95, 104, 0.35), rgba(102, 126, 234, 0.35));
}

.shop-hero-content {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    max-width: 1200px;
    margin: -44px auto 0;
    padding: 0 24px 24px;
}

.shop-logo {
    width: 92px;
    height: 92px;
    object-fit: cover;
    border-radius: 0;
    border: 4px solid var(--color-card);
    box-shadow: var(--shadow-md);
    flex-shrink: 0;
    background-color: var(--color-card);
}

.shop-hero-info {
    flex: 1;
    min-width: 0;
    padding-bottom: 4px;
}

.shop-name {
    font-size: 1.9rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.shop-tagline {
    color: var(--color-text-muted);
    max-width: 560px;
    margin: 0 0 8px;
}

.shop-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.shop-meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background-color: var(--color-bg, #f1f3f5);
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 0;
    white-space: nowrap;
}

.shop-meta-pill--accent {
    background-color: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.35);
    color: #2b8a3e;
}

.shop-address {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 6px;
}

.shop-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.shop-link-pill {
    background-color: var(--color-card);
    border: 1px solid var(--color-border);
    color: var(--color-text-main);
    padding: 6px 16px;
    border-radius: 0;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-fast);
}

.shop-link-pill:hover {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-text-inverse);
}

.shop-body {
    display: flex;
    align-items: flex-start;
    gap: 28px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 20px 100px;
}

.shop-main {
    flex: 1;
    min-width: 0;
}

.shop-categories {
    margin-bottom: 20px;
}

.shop-category {
    margin-bottom: 32px;
}

.shop-category-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 14px;
}

.shop-products-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.shop-product-card .product-body {
    padding-top: 18px;
}

.shop-product-image {
    height: 140px;
    background-color: rgba(0, 0, 0, 0.04);
    background-size: cover;
    background-position: center;
}

.shop-product-card--with-image .product-body {
    padding-top: 14px;
}

.shop-product-price-mobile {
    display: none;
}

.shop-add-btn-icon {
    display: none;
}

/* Cart */
.shop-cart-panel {
    flex: 0 0 340px;
}

.shop-cart-card {
    max-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.shop-cart-close {
    display: none;
    background: none;
    border: none;
    font-size: 1.1rem;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 4px;
}

.shop-customer-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
}

.shop-order-btn {
    margin-top: 16px;
}

.shop-cart-bar {
    display: none;
    position: fixed;
    left: 14px;
    right: 14px;
    bottom: 14px;
    z-index: 60;
    background-color: var(--color-primary);
    color: var(--color-text-inverse);
    border: none;
    border-radius: 0;
    padding: 16px 20px;
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 700;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transform: translateY(140%);
    transition: transform 0.25s ease;
}

.shop-cart-bar--visible {
    transform: translateY(0);
}

.shop-cart-bar-count {
    display: flex;
    align-items: center;
    gap: 10px;
}

.shop-cart-bar-badge {
    background-color: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    min-width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    padding: 0 6px;
}

/* Not-found page */
.shop-not-found {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background-color: var(--color-bg, #f8f9fa);
}

.shop-not-found-card {
    text-align: center;
    max-width: 420px;
    background-color: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 40px 28px;
}

.shop-not-found-emoji {
    font-size: 3rem;
    margin-bottom: 12px;
}

.shop-not-found-card h1 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.shop-not-found-card p {
    color: var(--color-text-muted);
}

@media (max-width: 900px) {
    .shop-page {
        background-color: var(--color-card);
    }

    /* Compact app-style header */
    .shop-cover {
        height: 130px;
    }

    .shop-hero-content {
        align-items: flex-end;
        gap: 12px;
        margin: -34px auto 0;
        padding: 0 16px 16px;
    }

    .shop-logo {
        width: 64px;
        height: 64px;
        border-radius: 0;
        border-width: 3px;
    }

    .shop-hero-info {
        flex: 1;
        min-width: 0;
        padding-bottom: 0;
    }

    .shop-name {
        font-size: 1.25rem;
        margin-bottom: 2px;
    }

    .shop-tagline {
        margin: 0 0 6px;
        font-size: 0.85rem;
        max-width: none;
    }

    .shop-meta-row {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -16px 6px;
        padding: 0 16px;
        scrollbar-width: none;
    }

    .shop-meta-row::-webkit-scrollbar {
        display: none;
    }

    .shop-address,
    .shop-tagline {
        text-align: left;
    }

    .shop-links {
        justify-content: flex-start;
        margin-top: 6px;
    }

    /* Sticky horizontally-scrolling category pills, app-tab style */
    .shop-categories {
        position: sticky;
        top: 0;
        z-index: 30;
        margin: 0 -16px 12px;
        padding: 10px 16px;
        background-color: var(--color-card);
        border-bottom: 1px solid var(--color-border);
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .shop-body {
        flex-direction: column;
        align-items: stretch;
        max-width: none;
        padding: 0 16px 110px;
    }

    .shop-category-title {
        font-size: 1.05rem;
        padding: 0 2px;
    }

    /* Product rows: name/description/price on the left, add button on the right — app list style */
    .shop-products-grid {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .shop-product-card {
        border-radius: 0;
        box-shadow: none;
    }

    .shop-product-card:hover {
        transform: none;
        box-shadow: none;
    }

    /* Cards with a product photo become app-style rows: details on the left, thumbnail on the right */
    .shop-product-card--with-image {
        display: flex;
        align-items: stretch;
    }

    .shop-product-card--with-image .product-body {
        order: 1;
        flex: 1;
        min-width: 0;
    }

    .shop-product-card--with-image .shop-product-image {
        order: 2;
        width: 96px;
        height: auto;
        flex-shrink: 0;
        border-radius: 0;
    }

    .shop-product-card .product-body {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        padding: 14px;
    }

    .shop-product-info {
        flex: 1;
        min-width: 0;
    }

    .shop-product-card .product-title {
        font-size: 0.98rem;
        margin-bottom: 3px;
    }

    .shop-product-card .product-desc {
        height: auto;
        -webkit-line-clamp: 2;
        font-size: 0.8rem;
        margin-bottom: 6px;
    }

    .shop-product-price-mobile {
        display: inline-block;
        font-size: 0.95rem;
    }

    .shop-product-price-desktop {
        display: none;
    }

    .shop-product-card .product-footer {
        flex-shrink: 0;
    }

    .shop-add-btn {
        width: 38px;
        height: 38px;
        padding: 0;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 1.3rem;
        line-height: 1;
    }

    .shop-add-btn-full {
        display: none;
    }

    .shop-add-btn-icon {
        display: inline-block;
    }

    /* Cart as a bottom sheet */
    .shop-cart-panel {
        flex: 1 1 auto;
        width: 100%;
        position: fixed;
        inset: auto 0 0 0;
        z-index: 70;
        max-height: 88vh;
        transform: translateY(110%);
        transition: transform 0.25s ease;
    }

    .shop-cart-panel--open {
        transform: translateY(0);
    }

    .shop-cart-card {
        max-height: 88vh;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.15);
    }

    .shop-cart-close {
        display: inline-block;
    }

    .shop-cart-bar {
        display: flex;
    }
}
