/* ============================================
   Alam Ubud Jewelry Workshop - POS System
   Premium Dark Theme with Gold Accents
   ============================================ */

/* ---- CSS Variables ---- */
:root {
    --bg-primary: #0f0f14;
    --bg-secondary: #1a1a24;
    --bg-tertiary: #232334;
    --bg-card: #1e1e2e;
    --bg-card-hover: #262640;
    --bg-input: #161622;

    --gold-primary: #c9a84c;
    --gold-secondary: #dfc06e;
    --gold-tertiary: #e8d18e;
    --gold-dark: #8a6d2b;
    --gold-gradient: linear-gradient(135deg, #c9a84c, #e8d18e, #c9a84c);
    --gold-glow: 0 0 20px rgba(201, 168, 76, 0.15);

    --text-primary: #e8e6f0;
    --text-secondary: #9896a8;
    --text-muted: #6b697a;
    --text-gold: #dfc06e;

    --accent-green: #4ade80;
    --accent-red: #f87171;
    --accent-blue: #60a5fa;
    --accent-purple: #a78bfa;
    --accent-orange: #fb923c;
    --accent-cyan: #22d3ee;

    --border-color: rgba(201, 168, 76, 0.12);
    --border-subtle: rgba(255, 255, 255, 0.06);

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.5);
    --shadow-gold: 0 4px 15px rgba(201, 168, 76, 0.12);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    --sidebar-width: 270px;
    --header-height: 65px;

    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

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

/* ---- Reset ---- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 14px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { color: var(--gold-secondary); text-decoration: none; }
a:hover { color: var(--gold-tertiary); }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--gold-dark); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-primary); }

/* ============================================
   LAYOUT
   ============================================ */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ---- Sidebar ---- */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: var(--transition);
}

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

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 42px;
    height: 42px;
    background: var(--gold-gradient);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--bg-primary);
    box-shadow: var(--shadow-gold);
}

.logo-text { display: flex; flex-direction: column; }
.logo-title { font-size: 15px; font-weight: 700; color: var(--gold-secondary); letter-spacing: 0.3px; }
.logo-subtitle { font-size: 11px; color: var(--text-secondary); font-weight: 400; }

.sidebar-close {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
}

/* Sidebar Nav */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 16px 12px;
}

.nav-section { margin-bottom: 24px; }
.nav-section-title {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    padding: 0 12px;
    margin-bottom: 8px;
    display: block;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
    margin-bottom: 3px;
}

.nav-item:hover {
    background: rgba(201, 168, 76, 0.08);
    color: var(--gold-secondary);
}

.nav-item.active {
    background: rgba(201, 168, 76, 0.12);
    color: var(--gold-secondary);
    box-shadow: inset 3px 0 0 var(--gold-primary);
}

.nav-item i { font-size: 15px; width: 20px; text-align: center; }

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

.user-info { display: flex; align-items: center; gap: 10px; }
.user-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-primary);
    font-size: 14px;
    border: 1px solid var(--border-color);
}
.user-details { display: flex; flex-direction: column; }
.user-name { font-size: 12px; font-weight: 600; color: var(--text-primary); }
.user-role { font-size: 10px; color: var(--gold-primary); text-transform: uppercase; letter-spacing: 0.5px; }

.logout-btn {
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.2);
    color: var(--accent-red);
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}
.logout-btn:hover {
    background: rgba(248, 113, 113, 0.2);
    transform: scale(1.05);
}

/* ---- Main Content ---- */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ---- Header ---- */
.top-header {
    height: var(--header-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(12px);
}

.header-left { display: flex; align-items: center; gap: 16px; }
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
}

.page-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.2px;
}

.header-right { display: flex; align-items: center; gap: 16px; }
.header-date {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    padding: 6px 14px;
    border-radius: 20px;
}
.header-date i { color: var(--gold-primary); font-size: 12px; }

/* ---- Content Area ---- */
.content-area {
    flex: 1;
    padding: 28px;
}

/* ============================================
   COMPONENTS
   ============================================ */

/* ---- Cards ---- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
}
.card:hover {
    border-color: rgba(201, 168, 76, 0.2);
    box-shadow: var(--shadow-gold);
}
.card-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}
.card-body { padding: 22px; }

/* ---- Stat Cards ---- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 22px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gold-gradient);
    opacity: 0;
    transition: var(--transition);
}
.stat-card:hover::before { opacity: 1; }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-gold); }

.stat-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}
.stat-icon.gold { background: rgba(201, 168, 76, 0.12); color: var(--gold-secondary); }
.stat-icon.green { background: rgba(74, 222, 128, 0.12); color: var(--accent-green); }
.stat-icon.blue { background: rgba(96, 165, 250, 0.12); color: var(--accent-blue); }
.stat-icon.purple { background: rgba(167, 139, 250, 0.12); color: var(--accent-purple); }
.stat-icon.cyan { background: rgba(34, 211, 238, 0.12); color: var(--accent-cyan); }

.stat-label { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.8px; }
.stat-value { font-size: 26px; font-weight: 800; color: var(--text-primary); letter-spacing: -0.5px; }
.stat-sub { font-size: 11px; color: var(--text-secondary); margin-top: 4px; }

/* ---- Alerts ---- */
.alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 13px;
    font-weight: 500;
    animation: slideDown 0.3s ease;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
.alert-success { background: rgba(74, 222, 128, 0.1); border: 1px solid rgba(74, 222, 128, 0.2); color: var(--accent-green); }
.alert-error { background: rgba(248, 113, 113, 0.1); border: 1px solid rgba(248, 113, 113, 0.2); color: var(--accent-red); }
.alert-close {
    margin-left: auto;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    opacity: 0.6;
}
.alert-close:hover { opacity: 1; }

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

.btn-gold {
    background: var(--gold-gradient);
    color: var(--bg-primary);
}
.btn-gold:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-gold);
    color: var(--bg-primary);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}
.btn-outline:hover {
    border-color: var(--gold-primary);
    color: var(--gold-secondary);
    background: rgba(201, 168, 76, 0.06);
}

.btn-danger {
    background: rgba(248, 113, 113, 0.12);
    border: 1px solid rgba(248, 113, 113, 0.2);
    color: var(--accent-red);
}
.btn-danger:hover {
    background: rgba(248, 113, 113, 0.2);
}

.btn-success {
    background: rgba(74, 222, 128, 0.12);
    border: 1px solid rgba(74, 222, 128, 0.2);
    color: var(--accent-green);
}
.btn-success:hover {
    background: rgba(74, 222, 128, 0.2);
}

.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-lg { padding: 14px 28px; font-size: 15px; }
.btn-icon { padding: 8px; width: 36px; height: 36px; justify-content: center; }

/* ---- Forms ---- */
.form-group { margin-bottom: 18px; }
.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.form-control {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
    font-family: var(--font);
    transition: var(--transition);
}
.form-control:focus {
    outline: none;
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.1);
}
.form-control::placeholder { color: var(--text-muted); }

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%239896a8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 34px;
}

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

.form-error { font-size: 11px; color: var(--accent-red); margin-top: 4px; }

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

/* ---- Tables ---- */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-md);
}
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.table thead th {
    background: var(--bg-tertiary);
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    white-space: nowrap;
    border-bottom: 1px solid var(--border-color);
}
.table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-primary);
    vertical-align: middle;
}
.table tbody tr {
    transition: var(--transition);
}
.table tbody tr:hover {
    background: rgba(201, 168, 76, 0.04);
}
.table tbody tr:last-child td { border-bottom: none; }

/* ---- Badges ---- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
}
.badge-gold { background: rgba(201, 168, 76, 0.12); color: var(--gold-secondary); }
.badge-green { background: rgba(74, 222, 128, 0.12); color: var(--accent-green); }
.badge-red { background: rgba(248, 113, 113, 0.12); color: var(--accent-red); }
.badge-blue { background: rgba(96, 165, 250, 0.12); color: var(--accent-blue); }
.badge-purple { background: rgba(167, 139, 250, 0.12); color: var(--accent-purple); }
.badge-orange { background: rgba(251, 146, 60, 0.12); color: var(--accent-orange); }

/* ---- Modal ---- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s;
}
.modal-overlay.active { display: flex; }
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modalSlide 0.3s ease;
}
@keyframes modalSlide {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.modal-title { font-size: 16px; font-weight: 700; }
.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
}
.modal-close:hover { color: var(--accent-red); }
.modal-body { padding: 24px; }
.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ---- Pagination ---- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 20px;
    list-style: none;
}
.pagination li { list-style: none; }
.pagination a, .pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    text-decoration: none;
}
.pagination a:hover { border-color: var(--gold-primary); color: var(--gold-secondary); }
.pagination .active span {
    background: var(--gold-gradient);
    color: var(--bg-primary);
    border-color: transparent;
}
.pagination .disabled span { opacity: 0.3; cursor: not-allowed; }

/* ---- Empty State ---- */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}
.empty-state i { font-size: 48px; color: var(--text-muted); margin-bottom: 16px; opacity: 0.5; }
.empty-state h3 { font-size: 16px; color: var(--text-secondary); margin-bottom: 8px; }
.empty-state p { font-size: 13px; color: var(--text-muted); }

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}
.login-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 40%, rgba(201, 168, 76, 0.06) 0%, transparent 50%),
                radial-gradient(circle at 70% 60%, rgba(201, 168, 76, 0.04) 0%, transparent 50%);
    animation: loginBg 20s linear infinite;
}
@keyframes loginBg {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 40px;
    width: 420px;
    max-width: 90%;
    position: relative;
    z-index: 1;
    box-shadow: var(--shadow-lg);
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}
.login-logo .logo-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
    font-size: 24px;
}
.login-logo h1 {
    font-size: 22px;
    font-weight: 800;
    color: var(--gold-secondary);
    margin-bottom: 4px;
}
.login-logo p {
    font-size: 12px;
    color: var(--text-secondary);
}

.login-form .form-control { padding: 12px 16px; font-size: 14px; }
.login-form .btn { width: 100%; padding: 13px; font-size: 14px; justify-content: center; }

.login-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}
.login-remember input[type="checkbox"] {
    accent-color: var(--gold-primary);
    width: 16px; height: 16px;
}
.login-remember label { font-size: 13px; color: var(--text-secondary); cursor: pointer; }

/* ============================================
   POS PAGE
   ============================================ */
.pos-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 0;
    height: calc(100vh - var(--header-height));
    margin: -28px;
}

.pos-products {
    padding: 24px;
    overflow-y: auto;
    background: var(--bg-primary);
}

.pos-search-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}
.pos-search-bar .form-control { flex: 1; }

.pos-categories {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.pos-cat-btn {
    padding: 7px 16px;
    border-radius: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}
.pos-cat-btn:hover, .pos-cat-btn.active {
    background: rgba(201, 168, 76, 0.12);
    border-color: var(--gold-primary);
    color: var(--gold-secondary);
}

.pos-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}

.pos-product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.pos-product-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--gold-gradient);
    opacity: 0;
    transition: var(--transition);
}
.pos-product-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
    border-color: var(--gold-primary);
}
.pos-product-card:hover::before { opacity: 1; }
.pos-product-card.addon { border-left: 3px solid var(--accent-purple); }

.pos-product-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.pos-product-category {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}
.pos-product-price {
    font-size: 16px;
    font-weight: 800;
    color: var(--gold-secondary);
}
.pos-product-type {
    position: absolute;
    top: 10px;
    right: 10px;
}

/* Cart Sidebar */
.pos-cart {
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.pos-cart-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}
.pos-cart-header h2 {
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}
.pos-cart-header h2 i { color: var(--gold-primary); }
.cart-count {
    background: var(--gold-gradient);
    color: var(--bg-primary);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
}

.pos-cart-customer {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-subtle);
}
.pos-cart-customer .form-control { font-size: 12px; padding: 8px 12px; }

.pos-cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 10px 20px;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-subtle);
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cart-item-price { font-size: 11px; color: var(--text-secondary); }

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 6px;
}
.cart-item-qty button {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.cart-item-qty button:hover { border-color: var(--gold-primary); color: var(--gold-secondary); }
.cart-item-qty span { font-size: 13px; font-weight: 600; min-width: 20px; text-align: center; }

.cart-item-subtotal {
    font-size: 12px;
    font-weight: 700;
    color: var(--gold-secondary);
    white-space: nowrap;
}

.cart-item-remove {
    background: none;
    border: none;
    color: var(--accent-red);
    cursor: pointer;
    font-size: 13px;
    opacity: 0.6;
    transition: var(--transition);
}
.cart-item-remove:hover { opacity: 1; }

.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 40px;
    text-align: center;
}
.cart-empty i { font-size: 40px; color: var(--text-muted); opacity: 0.3; margin-bottom: 12px; }
.cart-empty p { font-size: 13px; color: var(--text-muted); }

/* Cart Footer */
.pos-cart-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}

.cart-totals { margin-bottom: 16px; }
.cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    font-size: 13px;
}
.cart-total-row span:first-child { color: var(--text-secondary); }
.cart-total-row span:last-child { font-weight: 600; }
.cart-total-row.grand-total {
    border-top: 1px solid var(--border-color);
    padding-top: 10px;
    margin-top: 6px;
}
.cart-total-row.grand-total span:last-child {
    font-size: 20px;
    font-weight: 800;
    color: var(--gold-secondary);
}

.pos-pay-btn {
    width: 100%;
    padding: 14px;
    background: var(--gold-gradient);
    color: var(--bg-primary);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 700;
    font-family: var(--font);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.pos-pay-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-gold);
}
.pos-pay-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Payment Modal */
.payment-methods {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}
.payment-method-btn {
    padding: 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-input);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}
.payment-method-btn i { font-size: 20px; }
.payment-method-btn:hover, .payment-method-btn.active {
    border-color: var(--gold-primary);
    color: var(--gold-secondary);
    background: rgba(201, 168, 76, 0.08);
}

/* Receipt Modal */
.receipt {
    background: white;
    color: #111;
    padding: 30px;
    border-radius: var(--radius-md);
    font-family: 'Courier New', monospace;
    max-width: 320px;
    margin: 0 auto;
}
.receipt-header { text-align: center; margin-bottom: 16px; border-bottom: 1px dashed #ccc; padding-bottom: 16px; }
.receipt-header h3 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.receipt-header p { font-size: 10px; color: #666; line-height: 1.4; }
.receipt-info { font-size: 11px; margin-bottom: 12px; }
.receipt-info p { display: flex; justify-content: space-between; padding: 2px 0; }
.receipt-items { border-top: 1px dashed #ccc; border-bottom: 1px dashed #ccc; padding: 10px 0; margin-bottom: 10px; }
.receipt-item { font-size: 11px; margin-bottom: 6px; }
.receipt-item-name { font-weight: 700; }
.receipt-item-detail { display: flex; justify-content: space-between; color: #666; }
.receipt-totals { font-size: 12px; }
.receipt-totals p { display: flex; justify-content: space-between; padding: 2px 0; }
.receipt-totals .receipt-grand { font-size: 16px; font-weight: 700; border-top: 2px solid #111; padding-top: 8px; margin-top: 6px; }
.receipt-footer { text-align: center; margin-top: 16px; border-top: 1px dashed #ccc; padding-top: 16px; font-size: 10px; color: #666; }

/* ---- Chart Container ---- */
.chart-container { position: relative; height: 280px; }

/* ---- Filters ---- */
.filter-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    align-items: flex-end;
}
.filter-bar .form-group { margin-bottom: 0; min-width: 150px; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .pos-layout {
        grid-template-columns: 1fr;
    }
    .pos-cart {
        position: fixed;
        right: -100%;
        top: 0;
        bottom: 0;
        width: 380px;
        z-index: 200;
        transition: var(--transition);
    }
    .pos-cart.open { right: 0; }

    .pos-cart-toggle {
        display: flex !important;
        position: fixed;
        bottom: 20px;
        right: 20px;
        width: 56px;
        height: 56px;
        border-radius: 50%;
        background: var(--gold-gradient);
        color: var(--bg-primary);
        border: none;
        font-size: 20px;
        cursor: pointer;
        z-index: 190;
        align-items: center;
        justify-content: center;
        box-shadow: var(--shadow-gold);
    }
}

@media (max-width: 768px) {
    .sidebar {
        left: calc(-1 * var(--sidebar-width));
    }
    .sidebar.open { left: 0; }
    .sidebar-close { display: block; }
    .menu-toggle { display: block; }

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

    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .stat-value { font-size: 20px; }

    .pos-product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }

    .filter-bar { flex-direction: column; }
    .filter-bar .form-group { min-width: 100%; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .pos-product-grid { grid-template-columns: 1fr; }
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 90;
    display: none;
}
.sidebar-overlay.active { display: block; }

.pos-cart-toggle { display: none; }

/* ---- Utility ---- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-gold { color: var(--gold-secondary); }
.text-green { color: var(--accent-green); }
.text-red { color: var(--accent-red); }
.text-muted { color: var(--text-muted); }
.fw-bold { font-weight: 700; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mt-2 { margin-top: 16px; }
.d-flex { display: flex; }
.gap-2 { gap: 12px; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-100 { width: 100%; }

/* Action Buttons */
.action-btns {
    display: flex;
    align-items: center;
    gap: 6px;
}
