:root {
    --shop-primary: #059669;
    --shop-primary-dark: #047857;
    --shop-primary-light: #d1fae5;
    --shop-accent: #f59e0b;
    --shop-navy: #0f172a;
    --shop-slate: #1e293b;
    --shop-border: #e2e8f0;
    --shop-bg: #f8fafc;
    --shop-card: #ffffff;
    --shop-text-dark: #0f172a;
    --shop-text-muted: #64748b;
    --shop-danger: #ef4444;
    --shop-success: #10b981;
    --bottom-nav-height: 64px;
    --top-bar-height: 58px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--shop-bg);
    color: var(--shop-text-dark);
    min-height: 100vh;
    padding-bottom: calc(var(--bottom-nav-height) + 16px);
}

/* Loading Screen */
.shop-loading-screen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: #0f172a;
    color: #ffffff;
}

.shop-loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(16, 185, 129, 0.2);
    border-top-color: #10b981;
    border-radius: 50%;
    animation: shopSpin 0.9s linear infinite;
    margin-bottom: 20px;
}

@keyframes shopSpin {
    to { transform: rotate(360deg); }
}

.shop-loading-title {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #10b981;
}

.shop-loading-subtitle {
    font-size: 13px;
    color: #94a3b8;
    margin-top: 6px;
}

/* Top Navigation Bar */
.shop-topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #0f172a;
    color: #ffffff;
    height: var(--top-bar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.shop-topbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.shop-topbar-brand .logo-icon {
    width: 34px;
    height: 34px;
    background: #10b981;
    color: #0f172a;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
}

.shop-topbar-brand .brand-name {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 17px;
    letter-spacing: 0.5px;
    color: #ffffff;
    line-height: 1.1;
}

.shop-topbar-brand .brand-tagline {
    font-size: 11px;
    color: #10b981;
    font-weight: 600;
}

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

.shop-badge-role {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.4);
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
    text-transform: uppercase;
}

.btn-icon-topbar {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #ffffff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-icon-topbar:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Bottom Navigation Bar */
.shop-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background: #ffffff;
    border-top: 1px solid var(--shop-border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.shop-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #64748b;
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    gap: 3px;
    position: relative;
    padding: 8px 0;
    transition: color 0.15s;
}

.shop-nav-item i {
    font-size: 18px;
}

.shop-nav-item.active {
    color: #059669;
}

.shop-nav-item .nav-badge {
    position: absolute;
    top: 4px;
    right: calc(50% - 16px);
    background: #ef4444;
    color: #ffffff;
    border-radius: 10px;
    padding: 1px 6px;
    font-size: 10px;
    font-weight: 700;
}

/* Page Containers */
.shop-content {
    padding: 16px;
    max-width: 600px;
    margin: 0 auto;
}

/* KPI Cards */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.kpi-card {
    background: #ffffff;
    border: 1px solid var(--shop-border);
    border-radius: 14px;
    padding: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
    overflow: hidden;
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--shop-primary);
}

.kpi-card.warning::before {
    background: var(--shop-accent);
}

.kpi-card.danger::before {
    background: var(--shop-danger);
}

.kpi-card.info::before {
    background: #0284c7;
}

.kpi-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--shop-text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.kpi-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--shop-text-dark);
    font-family: 'Outfit', sans-serif;
    margin-top: 4px;
}

.kpi-sub {
    font-size: 11px;
    color: #94a3b8;
}

/* Action Banner */
.quick-action-banner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.quick-action-btn {
    background: #ffffff;
    border: 1px solid var(--shop-border);
    border-radius: 12px;
    padding: 12px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--shop-text-dark);
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    cursor: pointer;
    transition: transform 0.1s, border-color 0.2s;
}

.quick-action-btn:hover {
    border-color: var(--shop-primary);
    transform: translateY(-2px);
    color: var(--shop-primary);
}

.quick-action-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.quick-action-icon.green { background: #d1fae5; color: #059669; }
.quick-action-icon.blue { background: #e0f2fe; color: #0284c7; }
.quick-action-icon.amber { background: #fef3c7; color: #d97706; }
.quick-action-icon.purple { background: #f3e8ff; color: #7c3aed; }

/* Section Header */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.section-title {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--shop-text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Order Cards */
.order-card {
    background: #ffffff;
    border: 1px solid var(--shop-border);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

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

.order-id-block {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.order-code {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 15px;
    color: var(--shop-text-dark);
}

.order-time {
    font-size: 11px;
    color: #94a3b8;
}

.order-status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.status-placed { background: #fef3c7; color: #b45309; }
.status-accepted { background: #e0f2fe; color: #0369a1; }
.status-packing { background: #f3e8ff; color: #6d28d9; }
.status-outfordelivery { background: #ffedd5; color: #c2410c; }
.status-delivered { background: #d1fae5; color: #047857; }
.status-cancelled { background: #fee2e2; color: #b91c1c; }

.customer-info-box {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.customer-name {
    font-weight: 700;
    font-size: 14px;
    color: #1e293b;
}

.customer-address {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}

.btn-call {
    background: #d1fae5;
    color: #047857;
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.order-items-preview {
    background: #f8fafc;
    border-radius: 10px;
    padding: 10px;
    font-size: 13px;
    margin-bottom: 12px;
}

.order-item-row {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
}

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

.order-amount-box {
    display: flex;
    flex-direction: column;
}

.order-amount-label {
    font-size: 11px;
    color: #64748b;
}

.order-total-amount {
    font-family: 'Outfit', sans-serif;
    font-size: 17px;
    font-weight: 800;
    color: #0f172a;
}

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

.btn-shop-sm {
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s;
}

.btn-shop-primary {
    background: var(--shop-primary);
    color: #ffffff;
}

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

.btn-shop-secondary {
    background: #f1f5f9;
    color: #334155;
}

.btn-shop-outline-danger {
    background: transparent;
    border: 1px solid #fecaca;
    color: #ef4444;
}

/* Modals */
.shop-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    overflow-y: auto;
}

.shop-modal-content {
    background: #ffffff;
    width: 100%;
    max-width: 520px;
    border-radius: 20px;
    padding: 24px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
    animation: modalPopIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    margin: auto;
}

@keyframes modalPopIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

.shop-modal-title {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 700;
}

.shop-modal-close {
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #64748b;
}

/* Form Controls */
.form-label-shop {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
    display: block;
}

.form-control-shop {
    width: 100%;
    border: 1px solid var(--shop-border);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 14px;
    color: var(--shop-text-dark);
    outline: none;
    transition: border-color 0.15s;
}

.form-control-shop:focus {
    border-color: var(--shop-primary);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

/* Quick Billing Screen */
.quick-bill-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.item-search-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid var(--shop-border);
    padding: 12px;
}

.search-results-list {
    max-height: 200px;
    overflow-y: auto;
    margin-top: 8px;
    border-top: 1px solid var(--shop-border);
}

.search-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 6px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
}

.search-item-row:hover {
    background: #f8fafc;
}

.cart-items-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid var(--shop-border);
    padding: 14px;
}

.cart-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}

.cart-item-info {
    flex: 1;
}

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

.stepper-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid var(--shop-border);
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    cursor: pointer;
}

.bill-summary-bar {
    background: #0f172a;
    color: #ffffff;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Stock Lookup */
.stock-item-card {
    background: #ffffff;
    border: 1px solid var(--shop-border);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stock-badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
}

.stock-badge.ok {
    background: #d1fae5;
    color: #047857;
}

.stock-badge.low {
    background: #fee2e2;
    color: #b91c1c;
}
