@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&display=swap');

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --pos-bg: #0d0d0d;
    --pos-sidebar: #111418;
    --pos-card: #1a1e24;
    --pos-card-hover: #222830;
    --pos-teal: #3db8a8;
    --pos-teal-dark: #2d8a7d;
    --pos-gold: #e8b84b;
    --pos-red: #e05252;
    --pos-blue: #4a90e2;
    --pos-white: #f0f0f0;
    --pos-gray: #6b7280;
    --pos-gray-light: #9ca3af;
    --pos-border: rgba(255, 255, 255, 0.07);
    --font: 'Cairo', sans-serif;
}

body {
    font-family: var(--font);
    background:
        radial-gradient(circle at top, rgba(61, 184, 168, 0.1), transparent 28%),
        linear-gradient(180deg, #060809 0%, #0b0f13 45%, #07090b 100%);
    color: var(--pos-white);
    direction: rtl;
    overflow: hidden;
    height: 100vh;
    position: relative;
    isolation: isolate;
}

body::before,
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
}

body::before {
    z-index: -2;
    opacity: 0.65;
    background-image:
        radial-gradient(circle at 18% 24%, rgba(255,255,255,0.92) 0 1px, transparent 1.9px),
        radial-gradient(circle at 74% 18%, rgba(232,184,75,0.8) 0 1.1px, transparent 2px),
        radial-gradient(circle at 60% 74%, rgba(61,184,168,0.75) 0 1px, transparent 1.8px),
        radial-gradient(circle at 32% 66%, rgba(255,255,255,0.6) 0 0.9px, transparent 1.6px);
    background-size: 260px 260px, 320px 320px, 230px 230px, 200px 200px;
    animation: posStarDrift 28s linear infinite;
}

body::after {
    z-index: -1;
    opacity: 0.38;
    background:
        radial-gradient(circle at 20% 18%, rgba(61, 184, 168, 0.16), transparent 18%),
        radial-gradient(circle at 82% 24%, rgba(232, 184, 75, 0.14), transparent 16%),
        radial-gradient(circle at 56% 82%, rgba(255, 255, 255, 0.08), transparent 20%);
    filter: blur(10px);
    animation: posStarPulse 9s ease-in-out infinite alternate;
}

::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--pos-teal-dark);
    border-radius: 2px;
}

@keyframes posStarDrift {
    from {
        transform: translate3d(0, 0, 0) scale(1);
    }

    50% {
        transform: translate3d(-16px, 22px, 0) scale(1.03);
    }

    to {
        transform: translate3d(-34px, 42px, 0) scale(1.05);
    }
}

@keyframes posStarPulse {
    from {
        opacity: 0.26;
        transform: scale(1);
    }

    to {
        opacity: 0.46;
        transform: scale(1.06);
    }
}

/* ===== LOGIN ===== */
.login-screen {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #0a0a0a 0%, #111418 50%, #0a0e12 100%);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    isolation: isolate;
}

.login-screen::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    opacity: 0.34;
    background-image:
        radial-gradient(circle at 14% 20%, rgba(255,255,255,0.9) 0 1px, transparent 2px),
        radial-gradient(circle at 78% 26%, rgba(255,255,255,0.72) 0 1.1px, transparent 2px),
        radial-gradient(circle at 52% 74%, rgba(232,184,75,0.72) 0 1px, transparent 1.9px),
        radial-gradient(circle at 34% 60%, rgba(61,184,168,0.65) 0 1px, transparent 1.8px);
    background-size: 240px 240px, 300px 300px, 220px 220px, 260px 260px;
    animation: posStarDrift 24s linear infinite;
}

.login-box {
    background: rgba(17, 20, 24, 0.82);
    border: 1px solid var(--pos-border);
    padding: 48px 40px;
    width: 380px;
    text-align: center;
    border-radius: 16px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(16px);
}

.login-logo {
    font-size: 64px;
    margin-bottom: 8px;
    filter: drop-shadow(0 4px 12px rgba(61, 184, 168, 0.3));
}

.login-title {
    font-size: 28px;
    font-weight: 900;
    margin-bottom: 4px;
}

.login-subtitle {
    color: var(--pos-gray);
    font-size: 13px;
    margin-bottom: 32px;
}

.login-field {
    position: relative;
    margin-bottom: 16px;
}

.login-field i {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--pos-gray);
    font-size: 14px;
}

.login-field input {
    width: 100%;
    background: var(--pos-card);
    border: 1px solid var(--pos-border);
    color: var(--pos-white);
    padding: 14px 40px 14px 16px;
    font-family: var(--font);
    font-size: 14px;
    outline: none;
    border-radius: 10px;
    direction: rtl;
    transition: border-color 0.2s;
}

.login-field input:focus {
    border-color: var(--pos-teal);
}

.login-error {
    color: var(--pos-red);
    font-size: 13px;
    min-height: 20px;
    margin-bottom: 8px;
}

.login-btn {
    width: 100%;
    background: var(--pos-teal);
    border: none;
    color: #fff;
    padding: 14px;
    font-size: 15px;
    font-weight: 800;
    font-family: var(--font);
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.login-btn:hover {
    background: #4dcfbe;
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(61, 184, 168, 0.3);
}

.login-hint {
    margin-top: 20px;
    font-size: 11px;
    color: var(--pos-gray);
    background: var(--pos-card);
    padding: 8px;
    border-radius: 6px;
}

/* ===== APP LAYOUT ===== */
.pos-app {
    display: flex;
    height: 100vh;
    overflow: hidden;
    position: relative;
    isolation: isolate;
}

.pos-app::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    opacity: 0.24;
    background-image:
        radial-gradient(circle at 12% 18%, rgba(255,255,255,0.82) 0 1px, transparent 2px),
        radial-gradient(circle at 84% 28%, rgba(61,184,168,0.7) 0 1px, transparent 1.9px),
        radial-gradient(circle at 58% 78%, rgba(232,184,75,0.68) 0 1px, transparent 1.8px);
    background-size: 280px 280px, 340px 340px, 240px 240px;
    animation: posStarDrift 30s linear infinite;
}

/* NAV SIDEBAR */
.pos-nav-sidebar {
    width: 72px;
    background: rgba(17, 20, 24, 0.82);
    border-left: 1px solid var(--pos-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 0;
    gap: 4px;
    flex-shrink: 0;
    backdrop-filter: blur(16px);
}

.pos-nav-logo {
    font-size: 28px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--pos-border);
    width: 100%;
    text-align: center;
}

.pos-nav-item {
    background: none;
    border: none;
    color: var(--pos-gray);
    width: 56px;
    height: 56px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font);
    position: relative;
}

.pos-nav-item i {
    font-size: 18px;
}

.pos-nav-item span {
    font-size: 9px;
    font-weight: 700;
}

.pos-nav-item:hover {
    color: var(--pos-teal);
    background: rgba(61, 184, 168, 0.08);
}

.pos-nav-item.active {
    color: var(--pos-teal);
    background: rgba(61, 184, 168, 0.15);
    border: 1px solid rgba(61, 184, 168, 0.3);
}

/* TABS */
.pos-tab {
    display: none;
    flex: 1;
    overflow: hidden;
    height: 100vh;
}

.pos-tab.active {
    display: flex;
    flex-direction: column;
}

.tab-page {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

/* TAB HEADER */
.tab-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.tab-header h2 {
    font-size: 22px;
    font-weight: 900;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tab-header h2 i {
    color: var(--pos-teal);
}

.tab-header p {
    font-size: 13px;
    color: var(--pos-gray);
    margin-top: 4px;
}

.tab-btn {
    background: var(--pos-teal);
    border: none;
    color: #fff;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 700;
    font-family: var(--font);
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.tab-btn:hover {
    background: #4dcfbe;
}

.tab-btn.outline {
    background: transparent;
    border: 1px solid var(--pos-border);
    color: var(--pos-gray-light);
}

.tab-btn.outline:hover {
    border-color: var(--pos-teal);
    color: var(--pos-teal);
}

/* ===== INVENTORY ===== */
.inv-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

.inv-stat {
    background: var(--pos-card);
    border: 1px solid var(--pos-border);
    border-radius: 10px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.inv-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.inv-stat-num {
    font-size: 22px;
    font-weight: 900;
}

.inv-stat-label {
    font-size: 11px;
    color: var(--pos-gray);
}

.inv-table-wrap {
    background: var(--pos-card);
    border: 1px solid var(--pos-border);
    border-radius: 10px;
    overflow: hidden;
}

.inv-search-row {
    display: flex;
    gap: 12px;
    padding: 14px;
    border-bottom: 1px solid var(--pos-border);
}

.inv-search {
    flex: 1;
    background: var(--pos-bg);
    border: 1px solid var(--pos-border);
    color: var(--pos-white);
    padding: 10px 14px;
    font-family: var(--font);
    font-size: 13px;
    outline: none;
    border-radius: 6px;
    direction: rtl;
}

.inv-search:focus {
    border-color: var(--pos-teal);
}

.inv-filter {
    background: var(--pos-bg);
    border: 1px solid var(--pos-border);
    color: var(--pos-white);
    padding: 10px 14px;
    font-family: var(--font);
    font-size: 13px;
    outline: none;
    border-radius: 6px;
    cursor: pointer;
    direction: rtl;
}

.inv-filter option {
    background: var(--pos-card);
}

.inv-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.inv-table thead {
    background: var(--pos-bg);
}

.inv-table th {
    padding: 12px 14px;
    font-weight: 700;
    color: var(--pos-gray-light);
    text-align: right;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.inv-table td {
    padding: 12px 14px;
    border-top: 1px solid var(--pos-border);
    font-size: 13px;
}

.inv-table tr:hover {
    background: rgba(61, 184, 168, 0.04);
}

.status-badge {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.status-ok {
    background: rgba(100, 180, 100, 0.15);
    color: #64b464;
}

.status-low {
    background: rgba(232, 184, 75, 0.15);
    color: var(--pos-gold);
}

.status-out {
    background: rgba(224, 82, 82, 0.15);
    color: var(--pos-red);
}

.inv-action {
    background: none;
    border: none;
    color: var(--pos-gray);
    cursor: pointer;
    padding: 4px 8px;
    font-size: 14px;
    transition: color 0.2s;
}

.inv-action:hover {
    color: var(--pos-teal);
}

.inv-action.del:hover {
    color: var(--pos-red);
}

/* ===== REPORTS ===== */
.report-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

.report-card {
    background: var(--pos-card);
    border: 1px solid var(--pos-border);
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.report-card-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
}

.report-card-num {
    font-size: 24px;
    font-weight: 900;
}

.report-card-label {
    font-size: 11px;
    color: var(--pos-gray);
}

.report-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.report-box {
    background: var(--pos-card);
    border: 1px solid var(--pos-border);
    border-radius: 10px;
    padding: 20px;
}

.report-box.full-width {
    grid-column: 1/-1;
}

.report-box h3 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--pos-gray-light);
}

.report-box h3 i {
    color: var(--pos-teal);
    font-size: 15px;
}

.chart-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.chart-bar-label {
    width: 80px;
    font-size: 12px;
    color: var(--pos-gray-light);
    text-align: left;
    flex-shrink: 0;
}

.chart-bar-track {
    flex: 1;
    height: 24px;
    background: var(--pos-bg);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.chart-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
    display: flex;
    align-items: center;
    padding: 0 8px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
}

.chart-bar-val {
    font-size: 12px;
    color: var(--pos-gray);
    min-width: 60px;
    text-align: right;
    flex-shrink: 0;
}

.top-item-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--pos-border);
}

.top-item-rank {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--pos-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    flex-shrink: 0;
}

.top-item-rank.gold {
    background: rgba(232, 184, 75, 0.2);
    color: var(--pos-gold);
}

.top-item-rank.silver {
    background: rgba(192, 192, 192, 0.2);
    color: #c0c0c0;
}

.top-item-rank.bronze {
    background: rgba(205, 127, 50, 0.2);
    color: #cd7f32;
}

.top-item-name {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
}

.top-item-qty {
    font-size: 13px;
    color: var(--pos-teal);
    font-weight: 700;
}

.top-item-rev {
    font-size: 12px;
    color: var(--pos-gray);
    min-width: 80px;
    text-align: left;
}

/* ===== E-MENU ===== */
.emenu-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 24px;
}

.emenu-qr-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.emenu-qr-card,
.emenu-stats-card {
    background: var(--pos-card);
    border: 1px solid var(--pos-border);
    border-radius: 10px;
    padding: 24px;
}

.emenu-qr-card h3,
.emenu-stats-card h3 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 16px;
}

.qr-placeholder {
    text-align: center;
    padding: 16px;
}

.qr-fake {
    width: 160px;
    height: 160px;
    margin: 0 auto;
    background: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.qr-grid {
    width: 120px;
    height: 120px;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(8, 1fr);
    gap: 2px;
}

.qr-grid::before {
    content: '';
    position: absolute;
    inset: 20px;
    background: repeating-conic-gradient(#333 0% 25%, #fff 0% 50%) 50% / 15px 15px;
}

.emenu-stat {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--pos-border);
    font-size: 13px;
}

.emenu-stat span:first-child {
    color: var(--pos-gray-light);
}

.emenu-stat span:last-child {
    font-weight: 700;
}

.emenu-preview {
    background: var(--pos-card);
    border: 1px solid var(--pos-border);
    border-radius: 10px;
    padding: 24px;
}

.emenu-phone-frame {
    width: 320px;
    margin: 0 auto;
    border: 2px solid var(--pos-border);
    border-radius: 24px;
    overflow: hidden;
    background: var(--pos-bg);
    max-height: 500px;
    overflow-y: auto;
}

.phone-header {
    padding: 16px;
    text-align: center;
    font-weight: 800;
    font-size: 16px;
    border-bottom: 1px solid var(--pos-border);
}

.phone-cats {
    display: flex;
    gap: 6px;
    padding: 12px;
    overflow-x: auto;
    scrollbar-width: none;
}

.phone-cats::-webkit-scrollbar {
    display: none;
}

.phone-cat-btn {
    background: var(--pos-card);
    border: 1px solid var(--pos-border);
    color: var(--pos-gray-light);
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 700;
    font-family: var(--font);
    cursor: pointer;
    border-radius: 16px;
    white-space: nowrap;
    transition: all 0.2s;
}

.phone-cat-btn.active {
    background: var(--pos-teal-dark);
    border-color: var(--pos-teal);
    color: #fff;
}

.phone-items {
    padding: 12px;
}

.phone-item {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--pos-border);
}

.phone-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.phone-item-info {
    flex: 1;
}

.phone-item-name {
    font-size: 13px;
    font-weight: 700;
}

.phone-item-desc {
    font-size: 11px;
    color: var(--pos-gray);
    margin-top: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.phone-item-price {
    font-size: 14px;
    font-weight: 800;
    color: var(--pos-teal);
    margin-top: 4px;
}

/* ===== MODALS ===== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 500;
    align-items: center;
    justify-content: center;
}

.modal-overlay.show {
    display: flex;
}

.modal-box {
    background: var(--pos-sidebar);
    border: 1px solid var(--pos-border);
    border-radius: 12px;
    width: 420px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--pos-border);
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 800;
}

.modal-header button {
    background: none;
    color: var(--pos-gray);
    font-size: 18px;
    cursor: pointer;
    border: none;
}

.modal-body {
    padding: 20px;
}

.modal-field {
    margin-bottom: 12px;
}

.modal-field label {
    font-size: 12px;
    color: var(--pos-gray-light);
    display: block;
    margin-bottom: 6px;
}

/* ===== POS LAYOUT (inside tab) ===== */
.pos-layout {
    display: grid;
    grid-template-columns: 360px 1fr;
    height: 100%;
    overflow: hidden;
    position: relative;
    flex: 1;
}

.pos-order-panel {
    background: var(--pos-sidebar);
    border-left: 1px solid var(--pos-border);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.pos-order-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--pos-border);
    flex-shrink: 0;
}

.pos-order-title {
    font-size: 15px;
    font-weight: 800;
}

.pos-clear-btn {
    background: rgba(224, 82, 82, 0.15);
    border: 1px solid rgba(224, 82, 82, 0.3);
    color: var(--pos-red);
    width: 34px;
    height: 34px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.pos-clear-btn:hover {
    background: rgba(224, 82, 82, 0.3);
}

.pos-customer-row {
    padding: 10px 14px;
    border-bottom: 1px solid var(--pos-border);
    flex-shrink: 0;
}

.pos-input {
    width: 100%;
    background: var(--pos-card);
    border: 1px solid var(--pos-border);
    color: var(--pos-white);
    padding: 10px 14px;
    font-family: var(--font);
    font-size: 13px;
    outline: none;
    border-radius: 6px;
    direction: rtl;
    transition: border-color 0.2s;
}

.pos-input:focus {
    border-color: var(--pos-teal);
}

.pos-input::placeholder {
    color: var(--pos-gray);
}

.pos-order-items {
    flex: 1;
    overflow-y: auto;
    padding: 6px 10px;
}

.pos-empty-order {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 180px;
    color: var(--pos-gray);
}

.pos-empty-order i {
    font-size: 36px;
    margin-bottom: 10px;
    opacity: 0.4;
}

.pos-empty-order p {
    font-size: 12px;
}

.pos-order-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 6px;
    border-bottom: 1px solid var(--pos-border);
    animation: slideIn 0.2s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.pos-order-item-img {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.pos-order-item-info {
    flex: 1;
    min-width: 0;
}

.pos-order-item-name {
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pos-order-item-price {
    font-size: 11px;
    color: var(--pos-teal);
    font-weight: 600;
}

.pos-order-item-controls {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

.pos-qty-btn {
    width: 24px;
    height: 24px;
    background: var(--pos-card);
    border: 1px solid var(--pos-border);
    color: var(--pos-white);
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.pos-qty-btn:hover {
    border-color: var(--pos-teal);
    color: var(--pos-teal);
}

.pos-qty {
    font-size: 13px;
    font-weight: 800;
    min-width: 18px;
    text-align: center;
}

.pos-del-btn {
    background: none;
    border: none;
    color: var(--pos-red);
    font-size: 13px;
    cursor: pointer;
    padding: 2px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.pos-del-btn:hover {
    opacity: 1;
}

.pos-totals {
    padding: 10px 14px;
    border-top: 1px solid var(--pos-border);
    background: var(--pos-bg);
    flex-shrink: 0;
}

.pos-total-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--pos-gray-light);
    margin-bottom: 4px;
}

.pos-total-row.total-final {
    font-size: 16px;
    font-weight: 900;
    color: var(--pos-teal);
    margin-bottom: 10px;
    padding-top: 6px;
    border-top: 1px solid var(--pos-border);
}

.pos-payment-methods {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}

.pay-method {
    flex: 1;
    background: var(--pos-card);
    border: 1px solid var(--pos-border);
    color: var(--pos-gray-light);
    padding: 7px 4px;
    font-size: 11px;
    font-weight: 700;
    font-family: var(--font);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.pay-method.active {
    background: var(--pos-teal-dark);
    border-color: var(--pos-teal);
    color: #fff;
}

.pay-method:hover:not(.active) {
    border-color: var(--pos-teal);
    color: var(--pos-teal);
}

.quick-cash {
    background: var(--pos-card);
    border: 1px solid var(--pos-border);
    color: var(--pos-white);
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 700;
    font-family: var(--font);
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.quick-cash:hover {
    background: var(--pos-teal-dark);
    border-color: var(--pos-teal);
}

.pos-place-btn {
    width: 100%;
    background: var(--pos-teal);
    border: none;
    color: #fff;
    padding: 12px;
    font-size: 14px;
    font-weight: 800;
    font-family: var(--font);
    cursor: pointer;
    border-radius: 8px;
    margin-bottom: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.pos-place-btn:hover {
    background: #4dcfbe;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(61, 184, 168, 0.3);
}

.pos-hold-btn {
    width: 100%;
    background: transparent;
    border: 1px solid var(--pos-border);
    color: var(--pos-gray-light);
    padding: 8px;
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.pos-hold-btn:hover {
    border-color: var(--pos-gold);
    color: var(--pos-gold);
}

/* ITEMS PANEL */
.pos-items-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: var(--pos-bg);
}

.pos-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    border-bottom: 1px solid var(--pos-border);
    background: var(--pos-sidebar);
    flex-shrink: 0;
    gap: 12px;
}

.pos-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 24px;
}

.pos-stats {
    display: flex;
    gap: 10px;
}

.pos-stat-card {
    background: var(--pos-card);
    border: 1px solid var(--pos-border);
    padding: 6px 14px;
    border-radius: 8px;
    text-align: center;
}

.pos-stat-num {
    font-size: 16px;
    font-weight: 900;
    color: var(--pos-teal);
}

.pos-stat-label {
    font-size: 9px;
    color: var(--pos-gray);
}

.pos-icon-btn {
    background: var(--pos-card);
    border: 1px solid var(--pos-border);
    color: var(--pos-gray-light);
    width: 34px;
    height: 34px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.pos-icon-btn:hover {
    border-color: var(--pos-teal);
    color: var(--pos-teal);
}

.pos-search-row {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid var(--pos-border);
    overflow-x: auto;
    flex-shrink: 0;
}

.pos-search-row::-webkit-scrollbar {
    display: none;
}

.pos-search-wrap {
    position: relative;
    flex-shrink: 0;
}

.pos-search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--pos-gray);
    font-size: 12px;
}

.pos-search {
    background: var(--pos-card);
    border: 1px solid var(--pos-border);
    color: var(--pos-white);
    padding: 8px 32px 8px 12px;
    font-family: var(--font);
    font-size: 12px;
    outline: none;
    border-radius: 20px;
    width: 180px;
    direction: rtl;
    transition: border-color 0.2s;
}

.pos-search:focus {
    border-color: var(--pos-teal);
}

.pos-cats {
    display: flex;
    gap: 4px;
}

.pos-cat-btn {
    background: var(--pos-card);
    border: 1px solid var(--pos-border);
    color: var(--pos-gray-light);
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 700;
    font-family: var(--font);
    cursor: pointer;
    border-radius: 20px;
    white-space: nowrap;
    transition: all 0.2s;
}

.pos-cat-btn:hover,
.pos-cat-btn.active {
    background: var(--pos-teal-dark);
    border-color: var(--pos-teal);
    color: #fff;
}

.pos-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    padding: 14px 16px;
    overflow-y: auto;
    flex: 1;
}

.pos-item-card {
    background: var(--pos-card);
    border: 1px solid var(--pos-border);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.pos-item-card:hover {
    border-color: var(--pos-teal);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(61, 184, 168, 0.1);
}

.pos-item-card:active {
    transform: scale(0.97);
}

.pos-item-card.disabled {
    cursor: not-allowed;
    opacity: 0.62;
    border-color: rgba(224, 82, 82, 0.35);
}

.pos-item-card.disabled:hover {
    transform: none;
    box-shadow: none;
    border-color: rgba(224, 82, 82, 0.35);
}

.pos-item-img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.pos-item-card:hover .pos-item-img {
    transform: scale(1.05);
}

.pos-item-body {
    padding: 8px 10px 6px;
}

.pos-item-name {
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pos-item-price {
    font-size: 13px;
    font-weight: 800;
    color: var(--pos-teal);
}

.pos-item-price span {
    font-size: 9px;
    color: var(--pos-gray);
    font-weight: 400;
}

.pos-item-cat-tag {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.7);
    color: var(--pos-teal);
    font-size: 8px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
}

.pos-item-cat-tag.warning {
    color: #fff;
    background: rgba(224, 82, 82, 0.9);
}

.status-high {
    background: rgba(74, 144, 226, 0.12);
    color: var(--pos-blue);
}

.erp-live-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(61, 184, 168, 0.1);
    border: 1px solid rgba(61, 184, 168, 0.24);
    color: var(--pos-gray-light);
    font-size: 12px;
    font-weight: 700;
}

.erp-live-chip i {
    color: #64b464;
    font-size: 10px;
}

.erp-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid var(--pos-border);
    border-radius: 18px;
    background: radial-gradient(circle at top right, rgba(61, 184, 168, 0.22), transparent 30%), linear-gradient(135deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
}

.erp-kicker {
    display: inline-flex;
    padding: 6px 10px;
    margin-bottom: 12px;
    border-radius: 999px;
    background: rgba(232, 184, 75, 0.12);
    color: var(--pos-gold);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.4px;
}

.erp-hero h3 {
    font-size: 30px;
    font-weight: 900;
    margin-bottom: 8px;
}

.erp-hero p {
    color: var(--pos-gray-light);
    max-width: 620px;
    line-height: 1.7;
}

.erp-metrics {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.erp-metric-card {
    padding: 18px;
    border-radius: 16px;
    border: 1px solid var(--pos-border);
    background: var(--pos-card);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.erp-metric-card.tone-teal {
    box-shadow: inset 0 0 0 1px rgba(61, 184, 168, 0.1);
}

.erp-metric-card.tone-green {
    box-shadow: inset 0 0 0 1px rgba(100, 180, 100, 0.12);
}

.erp-metric-card.tone-red {
    box-shadow: inset 0 0 0 1px rgba(224, 82, 82, 0.12);
}

.erp-metric-card.tone-gold {
    box-shadow: inset 0 0 0 1px rgba(232, 184, 75, 0.12);
}

.erp-metric-card.tone-blue {
    box-shadow: inset 0 0 0 1px rgba(74, 144, 226, 0.14);
}

.erp-metric-label {
    font-size: 12px;
    color: var(--pos-gray-light);
}

.erp-metric-value {
    font-size: 26px;
    font-weight: 900;
}

.erp-metric-meta {
    font-size: 11px;
    color: var(--pos-gray);
}

.erp-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.erp-alert-item {
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 10px;
    font-size: 13px;
    line-height: 1.6;
    border: 1px solid transparent;
}

.erp-alert-item.danger {
    background: rgba(224, 82, 82, 0.1);
    border-color: rgba(224, 82, 82, 0.18);
}

.erp-alert-item.warning {
    background: rgba(232, 184, 75, 0.1);
    border-color: rgba(232, 184, 75, 0.18);
}

.erp-alert-item.info {
    background: rgba(74, 144, 226, 0.1);
    border-color: rgba(74, 144, 226, 0.18);
}

.erp-alert-item.success {
    background: rgba(100, 180, 100, 0.1);
    border-color: rgba(100, 180, 100, 0.18);
}

.erp-list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--pos-border);
}

.erp-list-row:last-child {
    border-bottom: none;
}

.erp-list-row div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.erp-list-row strong {
    font-size: 13px;
}

.erp-list-row span {
    font-size: 11px;
    color: var(--pos-gray);
}

.erp-list-row.compact {
    padding: 10px 0;
}

.erp-stat-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--pos-border);
    font-size: 13px;
}

.erp-stat-strip:last-child {
    border-bottom: none;
}

.erp-empty {
    color: var(--pos-gray);
    font-size: 13px;
    text-align: center;
    padding: 20px 0;
}

/* HISTORY */
.pos-history-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 340px;
    height: 100%;
    background: var(--pos-sidebar);
    border-right: 1px solid var(--pos-border);
    z-index: 100;
    display: flex;
    flex-direction: column;
}

.pos-history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid var(--pos-border);
}

.pos-history-header h3 {
    font-size: 15px;
    font-weight: 800;
}

.pos-history-header button {
    background: none;
    color: var(--pos-gray);
    font-size: 18px;
    border: none;
    cursor: pointer;
}

.pos-history-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.history-item {
    background: var(--pos-card);
    border: 1px solid var(--pos-border);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 6px;
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.history-item-num {
    font-weight: 800;
    font-size: 12px;
}

.history-item-total {
    color: var(--pos-teal);
    font-weight: 800;
    font-size: 12px;
}

.history-item-meta {
    font-size: 10px;
    color: var(--pos-gray);
}

/* RECEIPT */
.receipt-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 999;
    align-items: center;
    justify-content: center;
}

.receipt-modal.show {
    display: flex;
}

.receipt-box {
    background: #fff;
    color: #000;
    width: 300px;
    padding: 20px 16px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 4px;
}

.receipt-header-logo {
    text-align: center;
    font-size: 18px;
    font-weight: 900;
    margin-bottom: 8px;
    font-family: var(--font);
}

.receipt-divider {
    color: #666;
    margin: 6px 0;
    font-size: 11px;
}

.receipt-item-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3px;
    font-size: 12px;
}

.receipt-total-row {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    margin-bottom: 3px;
    font-size: 12px;
}

.receipt-actions {
    display: flex;
    gap: 6px;
    margin-top: 12px;
}

.receipt-btn {
    flex: 1;
    padding: 8px;
    font-size: 12px;
    font-weight: 700;
    font-family: var(--font);
    cursor: pointer;
    border: none;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.print-btn {
    background: var(--pos-teal);
    color: #fff;
}

.close-btn {
    background: #eee;
    color: #333;
}

@media print {
    body * {
        visibility: hidden;
    }

    .receipt-box,
    .receipt-box * {
        visibility: visible;
    }

    .receipt-box {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
    }

    .receipt-actions {
        display: none !important;
    }
}

/* ===== BACK OFFICE ===== */
.bo-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.bo-tab {
    background: var(--pos-card);
    border: 1px solid var(--pos-border);
    color: var(--pos-gray-light);
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 700;
    font-family: var(--font);
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.bo-tab:hover {
    border-color: var(--pos-teal);
    color: var(--pos-teal);
}

.bo-tab.active {
    background: var(--pos-teal-dark);
    border-color: var(--pos-teal);
    color: #fff;
}

.bo-panel {
    display: none;
}

.bo-panel.active {
    display: block;
}

.bo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.bo-section {
    background: var(--pos-card);
    border: 1px solid var(--pos-border);
    border-radius: 10px;
    padding: 24px;
}

.bo-section h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--pos-white);
}

.bo-section h3 i {
    color: var(--pos-teal);
}

.bo-cats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.bo-cat-card {
    background: var(--pos-card);
    border: 1px solid var(--pos-border);
    border-radius: 10px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s;
}

.bo-cat-card:hover {
    border-color: var(--pos-teal);
}

.bo-cat-name {
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bo-cat-name i {
    color: var(--pos-teal);
}

.bo-cat-count {
    font-size: 11px;
    color: var(--pos-gray);
    background: var(--pos-bg);
    padding: 3px 10px;
    border-radius: 20px;
}

.bo-cat-actions {
    display: flex;
    gap: 4px;
}

.bo-menu-img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
}

@media(max-width:900px) {
    .bo-grid {
        grid-template-columns: 1fr;
    }

    .erp-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .erp-metrics {
        grid-template-columns: 1fr 1fr;
    }

    .erp-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .pos-layout {
        grid-template-columns: 1fr;
        grid-template-rows: 60vh 40vh;
    }

    .pos-items-panel {
        order: -1;
    }

    .pos-stats {
        display: none;
    }

    .inv-stats-row,
    .report-cards {
        grid-template-columns: 1fr 1fr;
    }

    .report-grid {
        grid-template-columns: 1fr;
    }

    .emenu-content {
        grid-template-columns: 1fr;
    }
}