:root {
    --bg-main: #f8fafc;
    --sidebar-bg: #475569;
    --header-bg: #1e293b;
    --text-main: #334155;
    --text-light: #ffffff;
    --primary: #2563eb;
    --success: #22c55e;
    --danger: #ef4444;
    --card-teal: #ccfbf1;
    --border-color: #e2e8f0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

body {
    background-color: var(--bg-main);
    min-height: 100vh;
    color: var(--text-main);
    overflow: hidden;
}

.app-container {
    display: flex;
    flex-direction: column;
    width: 100vw;
    height: 100vh;
}

.app-header {
    height: 60px;
    background: var(--header-bg);
    padding: 0 24px;
    color: var(--text-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.path-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
}

.app-body {
    display: flex;
    flex: 1;
    height: calc(100vh - 60px);
}

.sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    color: var(--text-light);
    height: 100%;
    overflow-y: auto;
}

.profile-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.profile-box img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-info #user-name {
    font-weight: 600;
    font-size: 15px;
}

.profile-info small {
    opacity: 0.7;
    font-size: 12px;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.menu-title {
    font-size: 11px;
    text-transform: uppercase;
    color: #cbd5e1;
    letter-spacing: 1px;
    font-weight: 700;
    margin: 16px 0 8px 12px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-light);
    font-weight: 600;
}

.btn-logout {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-light);
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    width: 100%;
    text-align: center;
}

.btn-logout:hover {
    background: var(--danger);
}

.content-area {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
    background: var(--bg-main);
    height: 100%;
    position: relative;

}

.page-watermark {
    position: fixed;
    top: calc(50% + 30px);
    left: calc(50% + 130px);
    transform: translate(-50%, -50%);
    width: 280px;
    opacity: 0.10;
    pointer-events: none;
    z-index: 0;
}

.view-panel {
    position: relative;
    z-index: 1;
}

.view-panel {
    display: none;
}

.view-panel.active {
    display: block;
}

.breadcrumb {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 24px;
    font-weight: 600;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.card-metric {
    background: var(--card-teal);
    border: 1px solid #99f6e4;
}

.card-metric h3 {
    font-size: 14px;
    color: #0f766e;
    font-weight: 600;
    margin-bottom: 12px;
}

.card-metric p {
    font-size: 32px;
    font-weight: 800;
    color: #115e59;
}

.pos-wrapper {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
    height: 100%;
    align-items: start;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 190px));
    justify-content: start;
    gap: 16px;
    overflow-y: auto;
    padding-right: 8px;
    align-content: start;
}

.prod-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
}

.prod-card:hover {
    transform: translateY(-2px);
}

.prod-card img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    background: #f1f5f9;
}

.prod-card-body {
    padding: 12px;
    text-align: center;
}

.prod-card h4 {
    font-size: 14px;
    color: var(--text-main);
    font-weight: 600;
}

.prod-card b {
    color: var(--primary);
    font-size: 14px;
}

/* KELOLA MENU (manage card) */
.manage-card {
    cursor: default;
}

.manage-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.manage-actions .btn {
    flex: 1;
    padding: 6px 8px;
    font-size: 12px;
    justify-content: center;
}

.upload-preview {
    width: 100%;
    max-height: 160px;
    object-fit: cover;
    border-radius: 8px;
    margin: 10px 0 16px 0;
    border: 1px solid var(--border-color);
}

.checkout-sidebar {
    background: white;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 100%;
    position: sticky;
    top: 0;
    align-self: start;
}

.cart-container {
    flex: 1;
    overflow-y: auto;
    margin: 16px 0;
    min-height: 0;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    gap: 8px;
}

/* CART QTY CONTROL */
.qty-control {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.qty-btn {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: #f1f5f9;
    cursor: pointer;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.qty-btn:hover {
    background: #e2e8f0;
}

.cart-item-remove {
    color: var(--danger);
    cursor: pointer;
    font-size: 12px;
    margin-left: 6px;
}

.checkout-footer {
    border-top: 2px dashed var(--border-color);
    padding-top: 16px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.total-row b {
    font-size: 24px;
    color: var(--danger);
    font-weight: 800;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.card-table {
    padding: 0;
    overflow: hidden;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}


.table th {
    background: #f1f5f9;
    padding: 16px;
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
}

.table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    text-align: center;
}

.input-ctrl {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-top: 6px;
    margin-bottom: 16px;
    font-size: 14px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}

.badge {
    padding: 6px 12px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-success {
    background: #dcfce7;
    color: #16a34a;
}

.badge-danger {
    background: #fee2e2;
    color: #dc2626;
}

.badge-info {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-secondary {
    background: #e2e8f0;
    color: #334155;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.auth-card {
    background: white;
    padding: 40px;
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.brand-logo {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 24px;
    text-align: center;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-card {
    background: white;
    padding: 32px;
    border-radius: 16px;
    width: 100%;
    max-width: 460px;
    max-height: 90vh;
    overflow-y: auto;
}

.qris-frame {
    width: 220px;
    height: 220px;
    border: 1px solid var(--border-color);
    margin: 20px auto;
    padding: 12px;
    display: block;
}

@media (max-width: 1024px) {
    .pos-wrapper {
        grid-template-columns: 1fr;
    }

    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .app-body {
        flex-direction: column;
        height: auto;
        overflow-y: auto;
    }

    .sidebar {
        width: 100%;
        height: auto;
        padding: 12px;
    }

    .profile-box,
    .menu-title,
    .btn-logout {
        display: none;
    }

    .nav-menu {
        flex-direction: row;
        overflow-x: auto;
    }

    .nav-item {
        padding: 8px 14px;
        white-space: nowrap;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .content-area {
        height: auto;
    }

    .page-watermark {
        top: 50%;
        left: 50%;
        width: 180px;
    }
}