/* 
   Nandi Foundation App CSS
   Theme: Sleek Dark / Amber-Gold Accent / Glassmorphism
*/

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Space+Mono:wght@400;700&display=swap');

:root {
    --bg-main: #0b0c10;
    --bg-card: rgba(22, 28, 45, 0.6);
    --bg-card-hover: rgba(30, 41, 59, 0.8);
    --border-color: rgba(255, 255, 255, 0.08);
    
    --accent: #f59e0b; /* Amber */
    --accent-hover: #d97706;
    --accent-rgb: 245, 158, 11;
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --success: #10b981; /* Emerald */
    --warning: #f59e0b;
    --danger: #ef4444;   /* Crimson */
    --info: #0ea5e9;     /* Sky */
    
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'Space Mono', monospace;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.15);
    --shadow-glow: 0 0 20px rgba(245, 158, 11, 0.2);
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.5;
    overflow-x: hidden;
    height: 100vh;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Layout Utilities */
.app-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/* Simulator Split Screen */
.simulator-panel {
    width: 380px;
    min-width: 380px;
    background: #07080c;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    z-index: 10;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 1025px) {
    .simulator-panel.collapsed {
        width: 0px;
        min-width: 0px;
        padding: 0px;
        border-right: none;
        opacity: 0;
        pointer-events: none;
        overflow: hidden;
    }
}

.dashboard-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.03), transparent 60%);
}

/* Toggle controls for responsive mode */
.view-toggle-bar {
    display: none;
    background: #111827;
    padding: 10px;
    justify-content: space-around;
    border-bottom: 1px solid var(--border-color);
}
.toggle-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}
.toggle-btn.active {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent);
}

/* Smartphone Simulator Frame */
.phone-frame {
    width: 340px;
    height: 690px;
    background: #1e293b;
    border-radius: 42px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8),
                inset 0 0 4px 2px rgba(255, 255, 255, 0.15),
                0 0 0 6px #334155;
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 11px;
    overflow: hidden;
}

.phone-speaker {
    position: absolute;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: #475569;
    border-radius: 2px;
    z-index: 99;
}

.phone-camera {
    position: absolute;
    top: 13px;
    left: calc(50% + 45px);
    width: 8px;
    height: 8px;
    background: #0f172a;
    border-radius: 50%;
    border: 1px solid #334155;
    z-index: 99;
}

.phone-screen {
    flex: 1;
    width: 100%;
    height: 100%;
    border-radius: 32px;
    background: #090a0f;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.8);
}

/* Phone Status Bar */
.phone-status-bar {
    height: 30px;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary);
    background: #090a0f;
    z-index: 90;
    user-select: none;
}
.phone-status-right {
    display: flex;
    align-items: center;
    gap: 6px;
}
.phone-status-right svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
}

/* Customer App Wrapper */
.phone-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    padding-bottom: 60px; /* space for phone bottom bar */
}

/* Phone Bottom Nav */
.phone-nav {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 55px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 100;
    padding-bottom: 4px;
}
.phone-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 9px;
    font-weight: 500;
    cursor: pointer;
    width: 20%;
    transition: all 0.2s ease;
}
.phone-nav-item.active {
    color: var(--accent);
}
.phone-nav-item svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    transition: transform 0.2s ease;
}
.phone-nav-item:hover svg {
    transform: translateY(-2px);
}
.phone-home-indicator {
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    z-index: 101;
    pointer-events: none;
}

/* Customer App Pages */
.phone-page {
    display: none;
    flex-direction: column;
    padding: 16px;
    animation: fadeIn 0.3s ease;
}
.phone-page.active {
    display: flex;
}

/* Page Header Customer App */
.phone-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.phone-user-badge {
    display: flex;
    align-items: center;
    gap: 8px;
}
.phone-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #fff;
    font-size: 13px;
}
.phone-tier {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
}
.tier-bronze { background: rgba(205, 127, 50, 0.2); color: #cd7f32; border: 1px solid rgba(205, 127, 50, 0.4); }
.tier-silver { background: rgba(192, 192, 192, 0.2); color: #c0c0c0; border: 1px solid rgba(192, 192, 192, 0.4); }
.tier-gold { background: rgba(255, 215, 0, 0.2); color: #ffd700; border: 1px solid rgba(255, 215, 0, 0.4); }

/* QR Code Section */
.qr-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 20px;
}
.qr-card-container {
    background: #fff;
    padding: 12px;
    border-radius: 18px;
    margin: 15px 0;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    position: relative;
    overflow: hidden;
}
.qr-card-container svg {
    display: block;
}
.points-display {
    font-size: 32px;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 4px;
}
.points-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Progress Ring Container */
.points-progress-container {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin-top: 15px;
    background: rgba(255,255,255,0.03);
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.02);
}
.progress-bar-bg {
    flex: 1;
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    background: var(--accent);
    width: 40%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* Rewards Grid (Mobile) */
.rewards-list-mobile {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.reward-card-mobile {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}
.reward-info-mobile h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}
.reward-info-mobile p {
    font-size: 11px;
    color: var(--text-secondary);
}
.reward-btn-mobile {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent);
    border: 1px solid rgba(245, 158, 11, 0.3);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.reward-btn-mobile:hover:not(:disabled) {
    background: var(--accent);
    color: #000;
}
.reward-btn-mobile:disabled {
    background: rgba(255,255,255,0.03);
    color: var(--text-muted);
    border-color: transparent;
    cursor: not-allowed;
}

/* Mini-Game: Chai Clicker */
.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 0;
}
.clicker-box {
    margin: 20px 0;
    position: relative;
    cursor: pointer;
}
.clicker-cup {
    width: 140px;
    height: 140px;
    fill: var(--accent);
    transition: transform 0.1s ease;
    filter: drop-shadow(0 8px 15px rgba(245, 158, 11, 0.2));
}
.clicker-cup:active {
    transform: scale(0.9);
}
.steaming-animation {
    position: absolute;
    top: -30px;
    left: 45px;
    display: flex;
    gap: 10px;
}
.steam-wave {
    width: 3px;
    height: 25px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
    animation: steamRising 1.5s infinite ease-in-out;
}
.steam-wave:nth-child(2) { animation-delay: 0.4s; }
.steam-wave:nth-child(3) { animation-delay: 0.8s; }

.clicker-score {
    font-size: 20px;
    font-weight: 700;
    margin-top: 10px;
}
.clicker-toast {
    position: absolute;
    font-weight: bold;
    color: var(--accent);
    font-size: 18px;
    pointer-events: none;
    animation: floatUpFade 0.6s forwards ease-out;
}

/* Podcast Screen */
.podcast-player {
    background: rgba(15, 23, 42, 0.4);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    padding: 16px;
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.podcast-art {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    background: linear-gradient(45deg, #1e1b4b, #311042);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
    margin-bottom: 15px;
}
.podcast-art svg {
    width: 48px;
    height: 48px;
    fill: var(--accent);
}
.track-title {
    font-size: 14px;
    font-weight: 700;
    text-align: center;
}
.track-author {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 15px;
}
.player-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
}
.player-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
}
.play-pause-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.play-pause-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}
.playback-bar {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 10px;
    font-family: var(--font-mono);
}
.playback-progress {
    flex: 1;
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    position: relative;
    cursor: pointer;
}
.playback-fill {
    height: 100%;
    background: var(--accent);
    width: 0%;
    border-radius: 2px;
}

/* Social Media Post Feed */
.social-feed {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.social-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
}
.social-card-header {
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
}
.social-card-body {
    padding: 0 12px 12px 12px;
    font-size: 12px;
    color: var(--text-secondary);
}
.social-card-img-placeholder {
    height: 130px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(15, 23, 42, 0.4));
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 1px solid rgba(255,255,255,0.02);
    border-bottom: 1px solid rgba(255,255,255,0.02);
}
.social-card-actions {
    padding: 8px 12px;
    display: flex;
    gap: 15px;
    border-top: 1px solid rgba(255,255,255,0.02);
}
.social-action-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}
.social-action-btn.liked {
    color: var(--danger);
}
.social-action-btn svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}


/* MERCHANT DASHBOARD DESIGN */

/* Sidebar Navigation */
.merchant-layout {
    display: flex;
    height: 100%;
    overflow: hidden;
}
.merchant-sidebar {
    width: 200px;
    background: #090a0f;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 20px 10px;
}
.merchant-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 10px;
    margin-bottom: 30px;
}
.merchant-logo svg {
    width: 24px;
    height: 24px;
    fill: var(--accent);
}
.merchant-logo h2 {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.5px;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.merchant-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}
.merchant-nav-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 10px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
}
.merchant-nav-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}
.merchant-nav-btn:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
}
.merchant-nav-btn.active {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent);
    border-left: 3px solid var(--accent);
    border-radius: 0 10px 10px 0;
}
.merchant-sidebar-footer {
    font-size: 10px;
    color: var(--text-muted);
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

/* Dashboard Content Area */
.merchant-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Dashboard Header */
.merchant-header {
    height: 70px;
    border-bottom: 1px solid var(--border-color);
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(11, 12, 16, 0.5);
    backdrop-filter: blur(10px);
}
.merchant-header-title h1 {
    font-size: 20px;
    font-weight: 700;
}
.merchant-header-stats {
    display: flex;
    gap: 20px;
}
.header-stat-card {
    display: flex;
    flex-direction: column;
    text-align: right;
}
.header-stat-val {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent);
}
.header-stat-lbl {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* Panels */
.dashboard-tab-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: none;
}
.dashboard-tab-content.active {
    display: block;
}

/* KPI Cards Layout */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}
.kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}
.kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
}
.kpi-icon svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}
.kpi-data h3 {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.1;
}
.kpi-data p {
    font-size: 12px;
    color: var(--text-secondary);
}

/* POS Screen Split */
.pos-layout {
    display: flex;
    gap: 20px;
    height: calc(100vh - 120px);
    overflow: hidden;
}
.pos-products-pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
}
.pos-checkout-pane {
    width: 320px;
    min-width: 320px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    padding: 18px;
    height: 100%;
}

/* Categories Filter Bar */
.pos-categories {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}
.category-tab {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}
.category-tab:hover {
    color: var(--text-primary);
}
.category-tab.active {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
}

/* Product Cards Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    padding-bottom: 30px;
}
.product-card {
    background: rgba(15, 23, 42, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    user-select: none;
}
.product-card:hover {
    border-color: rgba(245, 158, 11, 0.5);
    background: rgba(245, 158, 11, 0.05);
    transform: translateY(-2px);
}
.product-card:active {
    transform: scale(0.97);
}
.product-card-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 9px;
    font-weight: bold;
    padding: 1px 4px;
    border-radius: 4px;
}
.badge-low-stock {
    background: var(--danger);
    color: #fff;
}
.product-icon {
    font-size: 24px;
    margin-bottom: 8px;
}
.product-name {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.product-stock-lbl {
    font-size: 10px;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.product-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
    margin-top: auto;
}

/* Checkout Panel Items */
.checkout-cart-list {
    flex: 1;
    overflow-y: auto;
    margin: 15px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 4px;
}
.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.02);
}
.cart-item-info {
    flex: 1;
}
.cart-item-name {
    font-size: 12px;
    font-weight: 600;
}
.cart-item-price {
    font-size: 11px;
    color: var(--accent);
}
.cart-item-qty-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}
.qty-btn {
    width: 20px;
    height: 20px;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    background: rgba(255,255,255,0.05);
    color: var(--text-primary);
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.qty-btn:hover {
    background: rgba(255,255,255,0.15);
}
.cart-item-qty {
    font-size: 12px;
    font-weight: 600;
    min-width: 14px;
    text-align: center;
}

/* Customer Link Status */
.customer-pos-link {
    background: rgba(245, 158, 11, 0.05);
    border: 1px dashed rgba(245, 158, 11, 0.3);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    margin-bottom: 15px;
}
.customer-pos-link.linked {
    background: rgba(16, 185, 129, 0.05);
    border-color: rgba(16, 185, 129, 0.3);
}
.linked-header {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
}
.linked-header span:first-child {
    color: var(--accent);
}
.customer-pos-link.linked .linked-header span:first-child {
    color: var(--success);
}
.pos-scan-btn {
    background: var(--accent);
    color: #000;
    border: none;
    border-radius: 8px;
    padding: 8px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    width: 100%;
    transition: all 0.2s ease;
}
.pos-scan-btn:hover {
    background: var(--accent-hover);
}

/* POS Bill Breakdown */
.checkout-totals {
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
}
.total-row {
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
}
.total-row.grand-total {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 800;
    margin-top: 4px;
    border-top: 1px dashed var(--border-color);
    padding-top: 6px;
}
.checkout-action-btn {
    background: var(--success);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 12px;
    font-size: 14px;
    font-weight: 700;
    margin-top: 15px;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.2);
}
.checkout-action-btn:hover {
    background: #059669;
    transform: translateY(-1px);
}
.checkout-action-btn:active {
    transform: translateY(0);
}
.checkout-action-btn:disabled {
    background: rgba(255,255,255,0.05);
    color: var(--text-muted);
    cursor: not-allowed;
    box-shadow: none;
}

/* Inventory Tab Table */
.inventory-controls {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}
.search-input {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 16px;
    color: var(--text-primary);
    width: 250px;
}
.search-input:focus {
    outline: 1px solid var(--accent);
}
.inventory-grid-split {
    display: flex;
    gap: 20px;
}
.inventory-table-container {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
}
.inventory-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
}
.inventory-table th, .inventory-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}
.inventory-table th {
    background: rgba(0,0,0,0.2);
    color: var(--text-secondary);
    font-weight: 600;
}
.inventory-table tbody tr:hover {
    background: rgba(255,255,255,0.01);
}
.stock-status {
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: bold;
}
.status-ok { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.status-low { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.status-out { background: rgba(239, 68, 68, 0.15); color: var(--danger); }

/* Roster / Staff Tab */
.staff-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
}
.staff-list-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.staff-card-item {
    background: rgba(0,0,0,0.15);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.staff-card-item h4 {
    font-size: 14px;
    font-weight: 600;
}
.staff-card-item p {
    font-size: 11px;
    color: var(--text-secondary);
}
.staff-salary-tag {
    font-family: var(--font-mono);
    color: var(--accent);
    font-weight: bold;
}
.roster-grid {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    padding: 16px;
}
.roster-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    text-align: center;
}
.roster-table th, .roster-table td {
    border: 1px solid var(--border-color);
    padding: 12px 6px;
}
.roster-table th {
    background: rgba(0,0,0,0.1);
    font-weight: 600;
}
.roster-cell-shift {
    background: rgba(245, 158, 11, 0.05);
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.roster-cell-shift:hover {
    background: rgba(245, 158, 11, 0.15);
}
.roster-shift-name {
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 2px;
}
.roster-shift-time {
    font-size: 9px;
    color: var(--text-muted);
}

/* CCTV Screen Tab */
.cctv-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.cctv-camera {
    background: #000;
    aspect-ratio: 16/9;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}
.cctv-camera-feed {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0.15;
    background-image: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 4px, 6px 100%;
    pointer-events: none;
    animation: cctvScanline 8s linear infinite;
}
.cctv-static-canvas {
    position: absolute;
    width: 100%;
    height: 100%;
    top:0;
    left:0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.06;
}
.cctv-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 2;
    color: #10b981;
    font-family: var(--font-mono);
    font-size: 11px;
    text-shadow: 0 0 4px rgba(16, 185, 129, 0.8);
}
.cctv-header-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.cctv-rec-dot {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--danger);
    font-weight: bold;
    text-shadow: 0 0 4px rgba(239, 68, 68, 0.8);
}
.cctv-rec-dot span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--danger);
    display: inline-block;
    animation: blink 1s steps(2, start) infinite;
}
.cctv-scene-mock {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: rgba(255, 255, 255, 0.15);
    font-size: 14px;
    font-weight: 500;
}
.cctv-scene-mock svg {
    width: 48px;
    height: 48px;
    fill: currentColor;
    margin-bottom: 8px;
}

/* Social media publisher page */
.social-center-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    max-width: 700px;
}
.social-form-group {
    margin-bottom: 18px;
}
.social-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-secondary);
}
.social-textbox {
    width: 100%;
    height: 120px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 13px;
    resize: none;
}
.social-textbox:focus {
    outline: 1px solid var(--accent);
}
.social-checkboxes-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
.social-platform-check {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}
.social-platform-check input {
    cursor: pointer;
    accent-color: var(--accent);
}
.social-platform-check:hover {
    background: rgba(255,255,255,0.06);
}

/* Toast System */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.toast {
    background: #1e293b;
    border-left: 4px solid var(--accent);
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideInLeft 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    min-width: 250px;
}
.toast.toast-success { border-left-color: var(--success); }
.toast.toast-error { border-left-color: var(--danger); }
.toast.toast-warning { border-left-color: var(--warning); }


/* SVG Chart Styling */
.chart-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    margin-top: 24px;
}
.chart-svg {
    width: 100%;
    height: 180px;
    overflow: visible;
}
.chart-path {
    fill: none;
    stroke: var(--accent);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 4px 8px rgba(245, 158, 11, 0.3));
}
.chart-grid {
    stroke: rgba(255,255,255,0.05);
    stroke-width: 1;
}
.chart-text {
    fill: var(--text-muted);
    font-size: 9px;
    font-family: var(--font-mono);
}

/* Form Styles for stock updates etc. */
.card-form {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px;
    width: 300px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.form-title {
    font-size: 14px;
    font-weight: 700;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 6px;
    margin-bottom: 4px;
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.form-group label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
}
.form-input {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 10px;
    color: var(--text-primary);
    font-size: 12px;
}
.form-btn {
    background: var(--accent);
    color: #000;
    border: none;
    border-radius: 6px;
    padding: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 6px;
}
.form-btn:hover {
    background: var(--accent-hover);
}

/* Transaction log tab styling */
.history-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.01);
    border-bottom: 1px solid var(--border-color);
    font-size: 12px;
}
.history-row:last-child {
    border-bottom: none;
}
.history-time {
    font-family: var(--font-mono);
    color: var(--text-muted);
}
.history-items {
    font-weight: 500;
}
.history-total {
    font-weight: bold;
    color: var(--success);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes blink {
    from, to { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes steamRising {
    0% { transform: translateY(0) scaleY(1); opacity: 0.5; }
    50% { transform: translateY(-15px) scaleY(1.2); opacity: 0.8; }
    100% { transform: translateY(-30px) scaleY(0.8); opacity: 0; }
}

@keyframes floatUpFade {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(-60px); opacity: 0; }
}

@keyframes slideInLeft {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes cctvScanline {
    from { transform: translateY(-100%); }
    to { transform: translateY(100%); }
}

/* Responsive Rules */
@media (max-width: 1024px) {
    .app-container {
        flex-direction: column;
        overflow-y: auto;
        height: auto;
    }
    .view-toggle-bar {
        display: flex;
    }
    .simulator-panel {
        width: 100%;
        min-width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 24px;
        display: none; /* controlled by js toggle */
    }
    .dashboard-panel {
        width: 100%;
        display: none; /* controlled by js toggle */
    }
    .simulator-panel.mobile-active,
    .dashboard-panel.mobile-active {
        display: flex;
    }
    .merchant-layout {
        flex-direction: column;
        height: auto;
        overflow: visible;
    }
    .merchant-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        flex-direction: row;
        overflow-x: auto;
        padding: 10px;
        margin-bottom: 0;
    }
    .merchant-logo {
        margin-bottom: 0;
        margin-right: 15px;
    }
    .merchant-nav {
        flex-direction: row;
        gap: 10px;
    }
    .merchant-nav-btn.active {
        border-left: none;
        border-bottom: 3px solid var(--accent);
        border-radius: 10px 10px 0 0;
    }
    .dashboard-tab-content {
        height: auto;
        overflow-y: visible;
    }
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .pos-layout {
        flex-direction: column;
        height: auto;
        overflow: visible;
    }
    .pos-checkout-pane {
        width: 100%;
        min-width: 100%;
        height: auto;
    }
    .cctv-grid {
        grid-template-columns: 1fr;
    }
    .staff-layout {
        grid-template-columns: 1fr;
    }
    .inventory-grid-split {
        flex-direction: column;
    }
    .card-form {
        width: 100%;
    }
}
