:root {
    --primary: #184e34;
    --primary-dark: #0f3523;
    --primary-light: #297a53;
    --primary-soft: #ecf5f0;
    --accent-gold: #c59b27;
    --accent-gold-soft: #fcf6e8;
    
    --ink: #14241b;
    --ink-light: #2c4236;
    --muted: #66786e;
    --muted-light: #94a59c;
    
    --cream: #f4f7f4;
    --surface: #ffffff;
    --surface-alt: #f9fbf9;
    --border: #dbe4dd;
    --border-light: #edf2ee;
    
    --shadow-sm: 0 2px 8px rgba(18, 45, 30, 0.04);
    --shadow-md: 0 8px 24px rgba(18, 45, 30, 0.07);
    --shadow-lg: 0 18px 45px rgba(18, 45, 30, 0.11);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-pill: 9999px;
    
    --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-serif: "Playfair Display", Georgia, serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--ink);
    background-color: var(--cream);
    background-image: 
        radial-gradient(at 0% 0%, rgba(200, 230, 210, 0.3) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(230, 240, 235, 0.5) 0px, transparent 50%);
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* ─────────────────────────────────────────────────────────────
   SIDEBAR NAVIGATION
───────────────────────────────────────────────────────────── */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 260px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    border-right: 1px solid var(--border);
    padding: 24px 18px;
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-light);
}

.brand-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(24, 78, 52, 0.2);
}

.brand h2 {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--ink);
}

.brand h2 span {
    color: var(--primary-light);
}

.badge-pro {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--accent-gold);
    background: var(--accent-gold-soft);
    padding: 2px 7px;
    border-radius: var(--radius-pill);
    display: inline-block;
}

.rest-badge {
    margin: 18px 0;
    padding: 12px 14px;
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rest-badge:hover {
    background: var(--primary-soft);
    border-color: var(--primary-light);
    transform: translateY(-1px);
}

.rest-avatar {
    font-size: 18px;
}

.rest-meta {
    flex: 1;
    min-width: 0;
}

.rest-meta b {
    display: block;
    font-size: 12px;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rest-meta span {
    display: block;
    font-size: 10px;
    color: var(--primary-light);
    font-weight: 600;
}

.edit-icon {
    font-size: 12px;
    opacity: 0.6;
}

.nav-title {
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 1.2px;
    color: var(--muted-light);
    margin: 8px 10px 10px;
}

.side-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
}

.nav-link:hover {
    background: var(--surface-alt);
    color: var(--ink);
}

.nav-link.selected {
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-weight: 700;
}

.nav-link .icon {
    font-size: 14px;
    opacity: 0.8;
}

.nav-pill {
    margin-left: auto;
    font-size: 9.5px;
    font-weight: 700;
    background: #d4f3e1;
    color: var(--primary-dark);
    padding: 2px 8px;
    border-radius: var(--radius-pill);
}

.nav-counter {
    margin-left: auto;
    font-size: 10px;
    font-weight: 700;
    background: var(--border);
    color: var(--ink-light);
    padding: 1px 7px;
    border-radius: var(--radius-pill);
}

.sidefoot {
    margin-top: auto;
    padding: 14px;
    background: linear-gradient(145deg, #ebf5ee, #f9fcf9);
    border: 1px solid #d5e5db;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 12px;
}

.agent-avatar-small {
    position: relative;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.pulse-ring {
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 2px solid var(--primary-light);
    animation: pulseWave 2s infinite ease-out;
}

@keyframes pulseWave {
    0% { transform: scale(0.9); opacity: 0.8; }
    100% { transform: scale(1.4); opacity: 0; }
}

.sidefoot b {
    display: block;
    font-size: 11px;
    color: var(--ink);
}

.sidefoot p {
    font-size: 10px;
    color: var(--muted);
    line-height: 1.35;
    margin-top: 2px;
}

/* ─────────────────────────────────────────────────────────────
   MAIN VIEWPORT LAYOUT
───────────────────────────────────────────────────────────── */
main {
    margin-left: 260px;
    padding: 0 40px 40px;
    max-width: 1440px;
}

.app-header {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--muted);
}

.breadcrumbs .slash {
    color: var(--border);
}

.breadcrumbs b {
    color: var(--ink);
    font-weight: 700;
}

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

.header-btn {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--ink-light);
    padding: 8px 14px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.header-btn:hover {
    border-color: var(--primary-light);
    color: var(--primary);
}

.header-btn.sim-btn {
    background: var(--primary-soft);
    border-color: #cde4d6;
    color: var(--primary-dark);
}

.system-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 600;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
    animation: statusBlink 2.5s infinite;
}

@keyframes statusBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ─────────────────────────────────────────────────────────────
   HERO BANNER
───────────────────────────────────────────────────────────── */
.welcome-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 32px 36px;
    background: linear-gradient(135deg, #133a27, #1f5439 80%);
    color: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.welcome-banner::after {
    content: "🍽️";
    position: absolute;
    right: 25px;
    bottom: -15px;
    font-size: 120px;
    opacity: 0.08;
    pointer-events: none;
}

.welcome-tag {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #98e2b8;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.welcome-content h1 {
    font-family: var(--font-serif);
    font-size: 34px;
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1.15;
    margin-bottom: 6px;
}

.welcome-content p {
    font-size: 14px;
    color: #c4ded0;
    max-width: 540px;
}

.welcome-cta {
    display: flex;
    gap: 12px;
}

.btn-primary {
    background: linear-gradient(135deg, #268054, #1a623f);
    color: white;
    border: none;
    padding: 12px 22px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0,0,0,0.18);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2f9a65, #1f734a);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.22);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 12px 20px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.22);
}

/* ─────────────────────────────────────────────────────────────
   ANALYTICS STATS GRID
───────────────────────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background: var(--surface-alt);
    border: 1px solid var(--border-light);
}

.stat-data label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 4px;
}

.stat-data strong {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -1px;
    color: var(--ink);
    line-height: 1.1;
    display: block;
}

.stat-data small {
    font-size: 11px;
    font-weight: 700;
}

.trend.positive { color: #16a34a; }
.trend.neutral { color: var(--muted); }

/* ─────────────────────────────────────────────────────────────
   MAIN CALL STUDIO & TRANSCRIPT SECTION
───────────────────────────────────────────────────────────── */
.columns {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 20px;
    margin-bottom: 24px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 18px;
}

.section-label {
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 1.2px;
    color: var(--primary-light);
    display: block;
    margin-bottom: 2px;
}

.card-header h2 {
    font-size: 19px;
    font-weight: 700;
    color: var(--ink);
}

.status-pill {
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 700;
}

.status-pill.ready {
    background: var(--primary-soft);
    color: var(--primary-dark);
}

.status-pill.calling {
    background: #fef3c7;
    color: #92400e;
    animation: callingBlink 1.5s infinite;
}

.status-pill.connected {
    background: #dcfce7;
    color: #15803d;
}

@keyframes callingBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Call Stage */
.call-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 0 16px;
    text-align: center;
}

.avatar-halo {
    position: relative;
    width: 86px;
    height: 86px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.orb {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1b5338, #0e3522);
    box-shadow: 0 10px 25px rgba(24, 78, 52, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    z-index: 2;
    transition: all 0.3s ease;
}

.avatar-halo.speaking .orb {
    transform: scale(1.06);
    box-shadow: 0 0 35px rgba(41, 122, 83, 0.6);
}

.receptionist-container h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.verified-tag {
    font-size: 10px;
    color: var(--primary-light);
    font-weight: 700;
    background: var(--primary-soft);
    padding: 1px 6px;
    border-radius: 4px;
}

.receptionist-role {
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
}

/* Voice Bars */
.voice-bars {
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin: 16px 0;
    opacity: 0.3;
    transition: opacity 0.3s;
}

.voice-bars i {
    display: block;
    width: 4px;
    height: 8px;
    background: var(--primary-light);
    border-radius: 4px;
    transition: height 0.15s;
}

.voice-bars.active {
    opacity: 1;
}

.voice-bars.active i {
    animation: barWave 0.7s infinite alternate ease-in-out;
}

.voice-bars.active i:nth-child(2n) { animation-delay: 0.1s; }
.voice-bars.active i:nth-child(3n) { animation-delay: 0.25s; }
.voice-bars.active i:nth-child(4n) { animation-delay: 0.4s; }

@keyframes barWave {
    0% { height: 6px; }
    100% { height: 28px; background: #34d399; }
}

/* Call Controls */
.call-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
}

.ctrl-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--ink);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.ctrl-btn:hover:not(:disabled) {
    background: var(--surface-alt);
    border-color: var(--primary-light);
    transform: scale(1.05);
}

.ctrl-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.ctrl-btn.mic-btn.listening {
    background: #fee2e2;
    border-color: #ef4444;
    color: #b91c1c;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25);
    animation: micPulse 1.2s infinite;
}

@keyframes micPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.ctrl-btn.end-btn {
    background: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
}

.ctrl-btn.end-btn:hover:not(:disabled) {
    background: #fee2e2;
}

.ctrl-tip {
    font-size: 8px;
    font-weight: 700;
    margin-top: 1px;
}

.call-main-btn {
    padding: 13px 26px;
    background: linear-gradient(135deg, var(--ink), #2d4538);
    color: white;
    border: none;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
    transition: all 0.2s;
}

.call-main-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.22);
}

.call-main-btn.active-call {
    background: linear-gradient(135deg, #15803d, #166534);
    animation: callGlow 2s infinite alternate;
}

@keyframes callGlow {
    0% { box-shadow: 0 0 10px rgba(22, 128, 61, 0.4); }
    100% { box-shadow: 0 0 24px rgba(22, 128, 61, 0.8); }
}

.call-helper {
    font-size: 11.5px;
    color: var(--muted);
    margin-bottom: 14px;
}

/* Call Options Bar */
.call-options-bar {
    width: 100%;
    display: flex;
    gap: 12px;
    padding: 12px;
    background: var(--surface-alt);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
}

.option-item {
    flex: 1;
    text-align: left;
}

.option-item label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    color: var(--muted);
    margin-bottom: 4px;
}

.option-item select {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: white;
    font-size: 11.5px;
    color: var(--ink);
    font-family: inherit;
    cursor: pointer;
}

/* Prompt Chips */
.prompt-chips-section {
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
    margin-top: 8px;
}

.chips-title {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.8px;
    color: var(--muted-light);
    display: block;
    margin-bottom: 8px;
}

.chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.prompt-chip {
    padding: 7px 12px;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 600;
    color: var(--ink-light);
    cursor: pointer;
    transition: all 0.15s ease;
}

.prompt-chip:hover {
    background: var(--primary-soft);
    border-color: var(--primary-light);
    color: var(--primary-dark);
    transform: translateY(-1px);
}

/* Chat Input Bar */
.call-chat-bar {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}

.call-chat-bar input {
    flex: 1;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    font-size: 12.5px;
    font-family: inherit;
    background: var(--surface-alt);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.call-chat-bar input:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(41, 122, 83, 0.12);
    background: white;
}

.call-chat-bar button {
    padding: 10px 18px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.call-chat-bar button:hover {
    background: var(--primary-dark);
}

/* ─────────────────────────────────────────────────────────────
   CALL TRANSCRIPT CARD
───────────────────────────────────────────────────────────── */
.transcript-card {
    height: 100%;
}

.transcript-actions {
    display: flex;
    gap: 6px;
}

.tool-btn {
    padding: 5px 10px;
    border: 1px solid var(--border);
    background: var(--surface-alt);
    color: var(--ink-light);
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.tool-btn:hover {
    background: white;
    border-color: var(--primary-light);
}

.tool-btn.danger {
    color: #b91c1c;
}

.transcript-feed {
    flex: 1;
    min-height: 380px;
    max-height: 440px;
    overflow-y: auto;
    padding: 10px 4px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scrollbar-width: thin;
}

.empty-feed {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--muted);
    padding: 20px;
}

.empty-icon {
    font-size: 36px;
    margin-bottom: 8px;
    opacity: 0.5;
}

.empty-feed b {
    font-size: 13px;
    color: var(--ink);
    margin-bottom: 4px;
}

.empty-feed p {
    font-size: 11.5px;
    max-width: 280px;
    line-height: 1.4;
}

/* Chat Message Bubbles */
.chat-bubble {
    max-width: 86%;
    padding: 12px 15px;
    border-radius: var(--radius-md);
    font-size: 12px;
    line-height: 1.5;
    position: relative;
    animation: bubbleSlide 0.25s ease-out;
}

@keyframes bubbleSlide {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.chat-bubble.ai {
    align-self: flex-start;
    background: var(--primary-soft);
    color: var(--ink-light);
    border-bottom-left-radius: 4px;
    border: 1px solid #d5e6db;
}

.chat-bubble.caller {
    align-self: flex-end;
    background: #e2ede5;
    color: var(--primary-dark);
    border-bottom-right-radius: 4px;
    border: 1px solid #c7dcd0;
}

.bubble-meta {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--primary-light);
    margin-bottom: 4px;
}

.chat-bubble.caller .bubble-meta {
    color: #23583c;
}

.transcript-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 14px;
    border-top: 1px solid var(--border-light);
    font-size: 11px;
    color: var(--muted);
}

.feed-status {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dot-live {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary-light);
}

.duration-badge {
    font-weight: 700;
    color: var(--ink-light);
}

/* ─────────────────────────────────────────────────────────────
   MENU & POS BILLING SECTION
───────────────────────────────────────────────────────────── */
.restaurant-menu {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 30px;
    margin-bottom: 24px;
}

.menu-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 20px;
}

.menu-header-row h2 {
    font-family: var(--font-serif);
    font-size: 26px;
    font-weight: 700;
    color: var(--ink);
}

.menu-header-row p {
    font-size: 12.5px;
    color: var(--muted);
}

.menu-search-wrapper {
    position: relative;
    width: 280px;
}

.menu-search-wrapper input {
    width: 100%;
    padding: 9px 12px 9px 34px;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    font-size: 12px;
    background: var(--surface-alt);
    font-family: inherit;
    outline: none;
}

.menu-search-wrapper input:focus {
    border-color: var(--primary-light);
    background: white;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    opacity: 0.5;
}

.menu-filter-bar {
    margin-bottom: 20px;
}

.filter-buttons {
    display: flex;
    gap: 8px;
    padding: 5px;
    background: var(--surface-alt);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    width: fit-content;
}

.filter-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn.active {
    background: white;
    color: var(--primary-dark);
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}

.menu-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.dish-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    gap: 14px;
    transition: all 0.2s ease;
    position: relative;
}

.dish-card:hover {
    border-color: #aed1be;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.dish-icon-box {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    background: #f1f7f3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    flex-shrink: 0;
}

.dish-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.dish-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 4px;
}

.dish-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
}

.dish-price {
    font-size: 13.5px;
    font-weight: 800;
    color: var(--primary-dark);
}

.dish-desc {
    font-size: 11px;
    color: var(--muted);
    line-height: 1.4;
    margin-bottom: 12px;
    flex: 1;
}

.dish-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dish-tags {
    display: flex;
    gap: 4px;
}

.dish-tag {
    font-size: 9px;
    font-weight: 700;
    background: #e9f2ec;
    color: var(--primary-dark);
    padding: 2px 6px;
    border-radius: 4px;
}

.add-dish-btn {
    background: var(--surface-alt);
    border: 1px solid var(--border);
    color: var(--primary-dark);
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.add-dish-btn:hover {
    background: var(--primary-soft);
    border-color: var(--primary-light);
    color: var(--primary);
}

/* POS Bill Card */
.bill-card {
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: fit-content;
}

.bill-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.bill-header h3 {
    font-size: 17px;
    font-weight: 800;
}

.clear-bill {
    background: transparent;
    border: none;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}

.clear-bill:hover {
    color: #dc2626;
}

.bill-items {
    min-height: 140px;
    max-height: 230px;
    overflow-y: auto;
    margin: 14px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 4px;
}

.bill-empty {
    height: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    color: var(--muted);
    text-align: center;
    padding: 12px;
}

.empty-cart-icon {
    font-size: 26px;
    opacity: 0.5;
    margin-bottom: 6px;
}

.bill-empty p {
    font-size: 11px;
    line-height: 1.4;
}

.bill-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-light);
}

.bill-item-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--ink);
}

.bill-item-unit {
    font-size: 10px;
    color: var(--muted);
}

.bill-qty-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.qty-btn {
    width: 22px;
    height: 22px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.qty-btn:hover {
    border-color: var(--primary-light);
}

.bill-qty-num {
    font-size: 12px;
    font-weight: 700;
    min-width: 14px;
    text-align: center;
}

.bill-summary {
    padding-top: 12px;
    border-top: 1px solid var(--border);
    margin-bottom: 16px;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 6px;
}

.total-line {
    font-size: 15px;
    font-weight: 800;
    color: var(--ink);
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--border);
}

.highlight-total {
    color: var(--primary-dark);
    font-size: 18px;
}

.checkout-btn {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 14px rgba(24, 78, 52, 0.25);
    transition: all 0.2s;
}

.checkout-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(24, 78, 52, 0.35);
}

.checkout-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--muted);
    box-shadow: none;
}

/* ─────────────────────────────────────────────────────────────
   DATA TABLES (KITCHEN & RESERVATIONS)
───────────────────────────────────────────────────────────── */
.lower-section {
    grid-template-columns: 1.15fr 0.85fr;
}

.data-table-card {
    padding: 24px;
}

.badge-count {
    font-size: 11px;
    font-weight: 700;
    background: #e0f2fe;
    color: #0369a1;
    padding: 3px 9px;
    border-radius: var(--radius-pill);
}

.btn-table-action {
    background: var(--primary-soft);
    border: 1px solid #cce2d5;
    color: var(--primary-dark);
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

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

.table-container {
    overflow-x: auto;
    margin-top: 8px;
}

.styled-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    text-align: left;
}

.styled-table th {
    padding: 10px 12px;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.8px;
    color: var(--muted-light);
    border-bottom: 1px solid var(--border);
}

.styled-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-light);
    color: var(--ink-light);
}

.styled-table tr:hover td {
    background: var(--surface-alt);
}

.order-id {
    font-weight: 800;
    color: var(--primary-dark);
}

.status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: var(--radius-pill);
    font-size: 10.5px;
    font-weight: 700;
}

.status-badge.preparing { background: #fef3c7; color: #92400e; }
.status-badge.ready { background: #dbeafe; color: #1e40af; }
.status-badge.delivered { background: #dcfce7; color: #15803d; }
.status-badge.confirmed { background: #d1fae5; color: #065f46; }

.table-action-btn {
    border: 1px solid var(--border);
    background: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
}

.table-action-btn:hover {
    background: var(--surface-alt);
    border-color: var(--primary-light);
}

/* ─────────────────────────────────────────────────────────────
   MODALS AND DIALOGS
───────────────────────────────────────────────────────────── */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(14, 30, 21, 0.65);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 1000;
    animation: modalFadeIn 0.2s ease-out;
}

.modal[hidden] {
    display: none !important;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.dialog {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 28px;
    position: relative;
    border: 1px solid var(--border);
}

.close-modal-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface-alt);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal-btn:hover {
    background: #fee2e2;
    color: #dc2626;
}

.modal-header {
    margin-bottom: 20px;
}

.modal-header h2 {
    font-family: var(--font-serif);
    font-size: 22px;
    color: var(--ink);
    margin-top: 2px;
}

.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--ink-light);
    margin-bottom: 5px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 12.5px;
    font-family: inherit;
    background: var(--surface-alt);
    outline: none;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary-light);
    background: white;
    box-shadow: 0 0 0 3px rgba(41, 122, 83, 0.1);
}

.form-row-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

.btn-cancel {
    padding: 10px 16px;
    border: 1px solid var(--border);
    background: white;
    color: var(--muted);
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.receipt-dialog {
    max-width: 440px;
}

.receipt-summary-box {
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px;
    margin: 14px 0;
}

/* ─────────────────────────────────────────────────────────────
   PHONE SIMULATOR MODAL
───────────────────────────────────────────────────────────── */
.phone-modal .phone-frame {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.close-phone-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    cursor: pointer;
}

.smartphone {
    width: 320px;
    height: 600px;
    background: #000;
    border-radius: 46px;
    border: 4px solid #2e3530;
    box-shadow: 0 25px 60px rgba(0,0,0,0.4), inset 0 0 0 2px #555;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 22px;
    background: #000;
    border-bottom-left-radius: 14px;
    border-bottom-right-radius: 14px;
    z-index: 10;
}

.speaker-grill {
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 45px;
    height: 4px;
    background: #333;
    border-radius: 4px;
    z-index: 11;
}

.phone-screen {
    flex: 1;
    background: linear-gradient(180deg, #102d20 0%, #081710 100%);
    color: white;
    display: flex;
    flex-direction: column;
    padding: 30px 20px 20px;
}

.phone-status-bar {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 24px;
}

.phone-call-active {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    text-align: center;
}

.caller-avatar-circle {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 12px;
}

.caller-name {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 2px;
}

.caller-subtitle {
    font-size: 12px;
    color: #a4ceb7;
    margin-bottom: 4px;
}

.sim-call-status {
    font-size: 11px;
    color: #4ade80;
    font-weight: 600;
    margin-bottom: 16px;
}

.phone-sound-wave {
    display: flex;
    gap: 3px;
    height: 20px;
    align-items: center;
    margin-bottom: 20px;
}

.phone-sound-wave span {
    width: 3px;
    height: 6px;
    background: #4ade80;
    border-radius: 2px;
    animation: barWave 0.6s infinite alternate;
}

.phone-sound-wave span:nth-child(2) { animation-delay: 0.15s; }
.phone-sound-wave span:nth-child(3) { animation-delay: 0.3s; }
.phone-sound-wave span:nth-child(4) { animation-delay: 0.45s; }
.phone-sound-wave span:nth-child(5) { animation-delay: 0.2s; }

.phone-live-transcript-box {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    padding: 12px;
    font-size: 11px;
    line-height: 1.45;
    color: #e5f5eb;
    margin-bottom: auto;
    width: 100%;
    min-height: 70px;
    text-align: left;
}

.phone-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    width: 100%;
    margin-bottom: 24px;
}

.phone-act-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
}

.phone-act-btn span {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.phone-act-btn.active span {
    background: white;
    color: #111;
}

.phone-act-btn small {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.7);
}

.phone-hangup-row {
    margin-bottom: 10px;
}

.phone-hangup-btn {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #ef4444;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.phone-hangup-btn:hover {
    transform: scale(1.08);
}

/* ─────────────────────────────────────────────────────────────
   TOAST NOTIFICATION
───────────────────────────────────────────────────────────── */
.toast {
    position: fixed;
    right: 30px;
    bottom: 30px;
    background: var(--ink);
    color: white;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    font-size: 12px;
    font-weight: 600;
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: toastUp 0.3s ease-out;
}

@keyframes toastUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ─────────────────────────────────────────────────────────────
   FOOTER
───────────────────────────────────────────────────────────── */
.app-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 12px;
}

.footer-left b {
    color: var(--ink);
}

/* ─────────────────────────────────────────────────────────────
   RESPONSIVE QUERIES
───────────────────────────────────────────────────────────── */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .columns, .lower-section {
        grid-template-columns: 1fr;
    }
    .menu-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .sidebar {
        width: 72px;
        padding: 16px 8px;
    }
    .brand h2, .brand small, .rest-badge, .nav-title, .nav-link span:not(.icon), .nav-pill, .nav-counter, .sidefoot {
        display: none;
    }
    .brand {
        justify-content: center;
        padding-bottom: 12px;
    }
    .nav-link {
        justify-content: center;
        padding: 12px;
    }
    main {
        margin-left: 72px;
        padding: 0 20px 30px;
    }
}

@media (max-width: 650px) {
    .welcome-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
        padding: 24px;
    }
    .welcome-cta {
        width: 100%;
        flex-direction: column;
    }
    .btn-primary, .btn-secondary {
        width: 100%;
        justify-content: center;
    }
    .menu-grid {
        grid-template-columns: 1fr;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
}
