/* css/style.css - Premium Dark Theme v6.0 (Near-Black) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    /* Main Accent & Semantic Colors */
    --primary: #6366F1;
    --primary-light: #818CF8;
    --primary-dark: #4F46E5;
    --secondary: #94A3B8;
    --accent: #A78BFA;
    --warning: #F59E0B;
    --danger: #EF4444;

    /* Near-Black Backgrounds */
    --bg-main: #0a0a0a;
    --bg-card: #141414;
    --bg-hover: rgba(255, 255, 255, 0.04);

    /* Text Colors — High contrast for daylight readability */
    --text-main: #f0f0f0;
    --text-muted: rgba(255, 255, 255, 0.60);

    /* Elements */
    --glass-bg: #141414;
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: none;

    /* Shapes & Animation */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-full: 9999px;
    --transition: all 0.2s ease;

    /* Sidebar Nav Accent Colors */
    --nav-dashboard: #4a9eff;
    --nav-pos: #7ec8e3;
    --nav-barang: #34d399;
    --nav-kategori: #fbbf24;
    --nav-supplier: #60a5fa;
    --nav-pelanggan: #38bdf8;
    --nav-transaksi: #f472b6;
    --nav-laporan: #a78bfa;
    --nav-settings: #94a3b8;
    --nav-bulkedit: #fb923c;
    --success: #10B981;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    /* Modern typography */
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    background-image: none;
    overflow-x: hidden;
}

/* ==================== GLASS ==================== */
.glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: none;
    border-radius: var(--radius-md);
}

/* ==================== LOGIN ==================== */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 48px 40px;
    text-align: center;
    animation: fadeInUp 0.6s ease;
}

.login-header i {
    font-size: 56px;
    color: var(--primary-light);
    margin-bottom: 8px;
}

.login-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-main);
}

.login-header p {
    margin-bottom: 32px;
    font-size: 14px;
}

.login-container .form-group {
    text-align: left;
    margin-bottom: 20px;
}

.login-container label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.login-container label i {
    margin-right: 4px;
}

.login-container input[type="text"],
.login-container input[type="password"] {
    width: 100%;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-main);
    font-size: 15px;
    outline: none;
    transition: var(--transition);
}

.login-container input:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

.login-footer {
    margin-top: 24px;
    font-size: 12px;
}

/* ==================== LAYOUT ==================== */
.app-container {
    display: flex;
    height: 100vh;
    padding: 16px;
    gap: 16px;
}

.hidden {
    display: none !important;
}

/* ==================== SIDEBAR ==================== */
.sidebar {
    width: 260px;
    display: flex;
    flex-direction: column;
    padding: 20px 16px;
    transition: var(--transition);
    background: #0d0d0d;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
}

.logo-area i {
    font-size: 28px;
    color: var(--primary-light);
}

.logo-area h2 {
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.3px;
    color: #e0e0e0;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.nav-item {
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-weight: 500;
    font-size: 13px;
    text-decoration: none;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-main);
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.04);
    border-left: 3px solid currentColor;
}

/* Colored sidebar nav items */
.nav-item[data-page="dashboard"] {
    color: var(--nav-dashboard);
}

.nav-item[data-page="pos"] {
    color: var(--nav-pos);
}

.nav-item[data-page="barang"] {
    color: var(--nav-barang);
}

.nav-item[data-page="kategori"] {
    color: var(--nav-kategori);
}

.nav-item[data-page="supplier"] {
    color: var(--nav-supplier);
}

.nav-item[data-page="pelanggan"] {
    color: var(--nav-pelanggan);
}

.nav-item[data-page="transaksi"] {
    color: var(--nav-transaksi);
}

.nav-item[data-page="laporan"] {
    color: var(--nav-laporan);
}

.nav-item[data-page="settings"] {
    color: var(--nav-settings);
}

nav ul li {
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-weight: 500;
    margin-bottom: 2px;
    font-size: 13px;
    border-left: 3px solid transparent;
}

nav ul li:hover {
    background: var(--bg-hover);
    color: var(--text-main);
}

nav ul li.active {
    background: rgba(255, 255, 255, 0.04);
    color: var(--primary-light);
    border-left: 3px solid var(--primary);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 24px;
    border-top: 1px solid var(--glass-border);
}

.avatar img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.15);
}

.user-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
}

.user-role {
    font-size: 12px;
    color: var(--text-muted);
}

/* ==================== MAIN CONTENT ==================== */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow: hidden;
}

.top-header {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
}

.top-header h2 {
    font-size: 20px;
    font-weight: 600;
}

.current-time {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.header-actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

.action-btn {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-main);
}

.content-wrapper {
    flex: 1;
    overflow-y: auto;
    padding-right: 8px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ==================== DASHBOARD ==================== */
.dashboard-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.widget {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
}

.widget:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.03);
}

.card-gradient-1,
.card-gradient-2,
.card-gradient-3 {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
}

.widget-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--text-muted);
}

.widget-data h3 {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 4px;
}

.widget-data .value {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.3px;
    margin: 2px 0;
    color: var(--text-main);
}

.widget-sub {
    font-size: 13px;
    color: var(--text-muted);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.chart-container {
    padding: 24px;
    min-height: 350px;
}

.chart-container h3 {
    margin-bottom: 16px;
    font-weight: 600;
    font-size: 16px;
}

.chart-container h3 i {
    margin-right: 8px;
    color: var(--primary-light);
}

.chart-container canvas {
    max-height: 280px;
}

.top-products {
    padding: 24px;
}

.top-products h3 {
    margin-bottom: 16px;
    font-weight: 600;
    font-size: 16px;
}

.top-products h3 i {
    margin-right: 8px;
    color: var(--warning);
}

.top-product-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.top-product-item .rank {
    width: 32px;
    height: 32px;
    background: rgba(79, 70, 229, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    color: var(--primary-light);
}

.top-product-item .product-info {
    flex: 1;
}

.top-product-item .product-info strong {
    font-size: 14px;
    display: block;
}

.top-product-item .product-info span {
    font-size: 12px;
}

.top-product-item .product-revenue {
    font-weight: 600;
    color: var(--accent);
    font-size: 13px;
}

/* ==================== BUTTONS ==================== */
.btn {
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    border: none;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    font-size: 14px;
    color: var(--text-main);
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-light);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-main);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
}

.btn-block {
    width: 100%;
    justify-content: center;
    padding: 14px;
    font-size: 16px;
}

.btn-ghost-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
    margin-top: 8px;
}

.btn-ghost-danger:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* ==================== TABLES ==================== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.search-filter {
    display: flex;
    gap: 12px;
    align-items: center;
    flex: 1;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    padding: 10px 16px;
    border-radius: 8px;
    min-width: 300px;
    border: 1px solid var(--glass-border);
}

.search-bar i {
    color: var(--text-muted);
}

.search-bar input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-main);
    width: 100%;
    font-size: 14px;
}

.filter-select {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 10px 16px;
    color: var(--text-main);
    font-size: 14px;
    outline: none;
    cursor: pointer;
}

.filter-select option {
    background: var(--bg-main);
}

.table-container {
    padding: 20px;
    overflow-x: auto;
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
}

.modern-table th,
.modern-table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

.modern-table th {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modern-table tbody tr {
    transition: var(--transition);
}

.modern-table tbody tr:hover {
    background: var(--bg-hover);
}

.text-center {
    text-align: center;
}

.badge-category {
    background: rgba(255, 255, 255, 0.05);
    /* Neutral flat */
    color: var(--secondary);
    /* Muted grayscale */
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 500;
}

.badge-stock {
    background: rgba(255, 255, 255, 0.05);
    color: var(--secondary);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 500;
}

.badge-stock.stock-empty {
    background: rgba(239, 68, 68, 0.1);
    /* Subtle red */
    color: var(--danger);
}

/* CRUD Action Buttons */
.btn-icon {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
}

/* Pastikan ikon Phosphor di dalam btn-icon terlihat jelas */
.btn-icon i,
.btn-icon .ph {
    font-size: 16px;
    line-height: 1;
    pointer-events: none;
}

.btn-icon.btn-edit {
    background: rgba(79, 70, 229, 0.15);
    color: var(--primary-light);
}

.btn-icon.btn-edit:hover {
    background: rgba(79, 70, 229, 0.3);
}

.btn-icon.btn-stock {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent);
}

.btn-icon.btn-stock:hover {
    background: rgba(16, 185, 129, 0.3);
}

.btn-icon.btn-delete {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.btn-icon.btn-delete:hover {
    background: rgba(239, 68, 68, 0.3);
}

.btn-icon.btn-scan-kode {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.btn-icon.btn-scan-kode:hover {
    background: rgba(245, 158, 11, 0.3);
}

.btn-icon.btn-barcode {
    background: rgba(167, 139, 250, 0.15);
    color: var(--accent);
}

.btn-icon.btn-barcode:hover {
    background: rgba(167, 139, 250, 0.3);
}

/* Scan Barcode Edit Modal */
.scan-info-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
}

.scan-input-highlight {
    border: 2px dashed var(--warning) !important;
    font-size: 16px !important;
    text-align: center;
    letter-spacing: 2px;
    font-weight: 600 !important;
    animation: scanPulse 2s ease-in-out infinite;
}

.scan-input-highlight:focus {
    border-color: var(--accent) !important;
    animation: none;
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.2) !important;
}

@keyframes scanPulse {

    0%,
    100% {
        border-color: rgba(245, 158, 11, 0.4);
    }

    50% {
        border-color: rgba(245, 158, 11, 1);
    }
}

.scan-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}

.scan-preview {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    animation: fadeInUp 0.3s ease;
}

/* Form inputs for modals */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

.form-input {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    color: var(--text-main);
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

select.form-input {
    cursor: pointer;
}

.badge-method {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 500;
}

.badge-status {
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
}

.badge-success {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.format-price {
    font-family: 'Outfit', monospace;
    font-size: 14px;
}

.accent-text {
    color: var(--accent);
}

.text-muted {
    color: var(--text-muted);
}

/* ==================== PAGINATION ==================== */
.pagination {
    padding: 16px 0;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.btn-page {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    transition: var(--transition);
}

.btn-page:hover {
    background: rgba(79, 70, 229, 0.2);
    color: white;
}

.btn-page.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.page-info {
    font-size: 12px;
    color: var(--text-muted);
    margin-left: 12px;
}

/* ==================== POS ==================== */
.pos-container {
    display: flex;
    gap: 24px;
    height: 100%;
    overflow: hidden;
}

.pos-items-area {
    flex: 2;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
}

.pos-search {
    position: relative;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.pos-search i {
    font-size: 24px;
    color: var(--primary-light);
}

.pos-search input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-main);
    font-size: 18px;
    width: 100%;
}

.pos-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    gap: 16px;
}

.pos-placeholder i {
    font-size: 48px;
}

.search-results-dropdown {
    position: absolute;
    top: 80px;
    left: 24px;
    right: 24px;
    z-index: 100;
    max-height: 400px;
    overflow-y: auto;
    background: var(--bg-main);
}

.search-item {
    display: flex;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: var(--transition);
}

.search-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.pos-grid {
    flex: 1;
    overflow-y: auto;
    display: flex;
    align-content: flex-start;
    flex-wrap: wrap;
}

.pos-cart-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 24px;
    min-width: 380px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
}

.cart-header {
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 16px;
    margin-bottom: 16px;
}

.cart-header h3 {
    font-size: 16px;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 8px;
}

.empty-cart-msg {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 0;
    font-style: italic;
}

.cart-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
}

.cart-item-price {
    font-size: 13px;
    color: var(--accent);
    margin-bottom: 4px;
}

.cart-item-discount {
    display: flex;
    align-items: center;
    gap: 4px;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.qty-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.qty-btn-danger {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.qty-btn-danger:hover {
    background: rgba(239, 68, 68, 0.4);
}

.qty-input {
    width: 36px;
    text-align: center;
    background: transparent;
    border: none;
    color: white;
    font-weight: bold;
    font-size: 14px;
}

.mini-input {
    width: 52px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 6px 8px;
    color: var(--text-main);
    text-align: center;
    font-size: 13px;
    outline: none;
    font-weight: 500;
}

.micro-input {
    width: 44px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 4px;
    color: var(--text-main);
    text-align: center;
    font-size: 11px;
    outline: none;
    font-weight: 500;
}

.mini-input:focus,
.micro-input:focus {
    border-color: var(--primary-light);
}

.cart-summary {
    border-top: 1px solid var(--glass-border);
    padding-top: 16px;
    margin-top: 12px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: 500;
    font-size: 14px;
    align-items: center;
}

.discount-row,
.tax-row {
    font-size: 13px;
}

.total-row {
    font-size: 20px;
    font-weight: 700;
    margin: 16px 0;
    padding-top: 12px;
    border-top: 1px dashed rgba(255, 255, 255, 0.2);
}

/* ==================== MODAL ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.modal-overlay.show {
    animation: fadeIn 0.2s ease;
}

.modal-overlay.closing {
    animation: fadeOut 0.3s ease;
}

.modal-content {
    width: 100%;
    max-width: 560px;
    padding: 32px;
    background: #1a1a1a;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.7);
    animation: slideUp 0.3s ease;
}

.modal-sm .modal-content,
.modal-content.modal-sm {
    max-width: 420px;
}

.modal-md .modal-content,
.modal-content.modal-md {
    max-width: 640px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 600;
}

.modal-header h2 i {
    margin-right: 8px;
    color: var(--primary-light);
}

.modal-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close-btn:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

.modal-body {
    color: var(--text-main);
}

.modal-footer {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    justify-content: flex-end;
}

/* Payment Method */
.payment-method-group {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.method-option {
    flex: 1;
    padding: 16px 12px;
    border: 2px solid var(--glass-border);
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.method-option i {
    font-size: 28px;
    color: var(--text-muted);
}

.method-option span {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

.method-option:hover {
    border-color: var(--primary-light);
}

.method-option.active {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.15);
}

.method-option.active i {
    color: var(--primary-light);
}

.method-option.active span {
    color: var(--text-main);
}

.pos-payment-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--primary-light);
    border-radius: 8px;
    padding: 16px;
    font-size: 24px;
    color: white;
    text-align: right;
    margin-top: 8px;
    outline: none;
}

.pos-payment-input:focus {
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 6px;
    color: var(--text-muted);
}

/* ==================== TOAST ==================== */
#toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 360px;
}

.toast {
    padding: 14px 18px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    transform: translateX(120%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.toast.show {
    transform: translateX(0);
}

.toast.hide {
    transform: translateX(120%);
    opacity: 0;
}

.toast i {
    font-size: 22px;
    flex-shrink: 0;
}

.toast span {
    flex: 1;
}

.toast-close {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    opacity: 0.5;
    padding: 4px;
}

.toast-close:hover {
    opacity: 1;
}

.toast-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.9), rgba(6, 95, 70, 0.95));
    color: white;
}

.toast-error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.9), rgba(127, 29, 29, 0.95));
    color: white;
}

.toast-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.9), rgba(146, 64, 14, 0.95));
    color: white;
}

.toast-info {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.9), rgba(55, 48, 163, 0.95));
    color: white;
}

/* ==================== LOADER ==================== */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.loader-overlay.show {
    opacity: 1;
}

.loader-content {
    text-align: center;
    color: var(--text-main);
}

.loader-content p {
    margin-top: 16px;
    font-size: 14px;
    color: var(--text-muted);
}

.loader-spinner {
    width: 42px;
    height: 42px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary-light);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

.loader-spinner.small {
    width: 24px;
    height: 24px;
    border-width: 2px;
}

.loader-spinner.tiny {
    width: 16px;
    height: 16px;
    border-width: 2px;
    display: inline-block;
    vertical-align: middle;
}

.inline-loader {
    text-align: center;
    padding: 32px;
}

.inline-loader p {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 12px;
}

/* ==================== SETTINGS ==================== */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
}

.settings-card {
    padding: 24px;
}

.settings-card h3 {
    font-size: 16px;
    margin-bottom: 8px;
    font-weight: 600;
}

.settings-card h3 i {
    margin-right: 8px;
    color: var(--primary-light);
}

.settings-card p {
    margin-bottom: 16px;
}

.backup-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.backup-item i {
    font-size: 24px;
    color: var(--primary-light);
}

.backup-item div {
    display: flex;
    flex-direction: column;
}

.trx-detail-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.trx-detail-header div {
    font-size: 13px;
    color: var(--text-muted);
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes pulse-sync {
    0% {
        transform: scale(0.95);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
    }

    100% {
        transform: scale(0.95);
        opacity: 0.5;
    }
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.sync-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-full);
}

.sync-dot {
    width: 8px;
    height: 8px;
    background-color: var(--success);
    border-radius: 50%;
    animation: pulse-sync 2s infinite;
}

.sync-text {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--success);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .app-container {
        flex-direction: column;
        padding: 8px;
    }

    .sidebar {
        width: 100%;
        flex-direction: row;
        padding: 12px;
        overflow-x: auto;
    }

    .sidebar .logo-area {
        margin-bottom: 0;
    }

    .sidebar .nav-menu {
        flex-direction: row;
    }

    .sidebar .user-profile {
        display: none;
    }

    .pos-container {
        flex-direction: column;
    }

    .pos-cart-area {
        min-width: unset;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== RECEIPT STYLES ==================== */
.receipt-print-area {
    display: none;
    /* Hidden on screen, only shown when @media print */
}

.receipt {
    font-family: 'Courier New', 'Lucida Console', monospace;
    font-size: 12px;
    color: #000;
    background: #fff;
    width: 72mm;
    /* 80mm paper - margins */
    padding: 4mm;
    line-height: 1.4;
}

.receipt-header {
    text-align: center;
    margin-bottom: 4px;
}

.receipt-header h2 {
    font-size: 16px;
    margin: 0;
    font-weight: 700;
    color: #000;
}

.receipt-header p {
    margin: 2px 0;
    font-size: 10px;
    color: #333;
}

.receipt-divider {
    text-align: center;
    font-size: 10px;
    letter-spacing: -0.5px;
    color: #333;
    margin: 4px 0;
}

.receipt-invoice,
.receipt-kasir {
    font-size: 11px;
    margin: 2px 0;
}

.receipt-item {
    margin: 4px 0;
    font-size: 11px;
}

.receipt-item-name {
    font-weight: 600;
}

.receipt-item-detail {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    padding-left: 8px;
}

.receipt-totals .receipt-total-row {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    margin: 2px 0;
}

.receipt-totals .receipt-grand-total {
    font-size: 14px;
    font-weight: 700;
    border-top: 1px dashed #000;
    padding-top: 4px;
    margin-top: 4px;
}

.receipt-barcode {
    text-align: center;
    margin: 8px 0 4px;
}

.receipt-barcode svg {
    max-width: 100%;
    height: 40px;
}

.receipt-footer {
    text-align: center;
    font-size: 10px;
    margin-top: 4px;
    color: #333;
}

.receipt-footer p {
    margin: 1px 0;
}

/* ==================== PRINT MEDIA QUERY ==================== */
/* Thermal printer: hides everything except receipt */
@media print {

    /* Hide everything on screen */
    body>*:not(.receipt-print-area) {
        display: none !important;
    }

    /* Also hide toasts, modals, loaders */
    #toast-container,
    .modal-overlay,
    .loader-overlay,
    #fullpage-loader {
        display: none !important;
    }

    html,
    body {
        margin: 0 !important;
        padding: 0 !important;
        width: 80mm;
        background: #fff !important;
    }

    .receipt-print-area {
        display: block !important;
        position: absolute;
        top: 0;
        left: 0;
        width: 80mm;
        z-index: 999999;
        margin: 0;
        padding: 0;
    }

    .receipt {
        width: 72mm;
        margin: 0 auto;
        padding: 2mm 4mm;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        page-break-after: always;
    }

    /* Paper sizes */
    @page {
        size: 80mm auto;
        margin: 0;
    }

    /* 58mm paper alternative */
    .receipt.receipt-58mm {
        width: 48mm;
        font-size: 10px;
    }

    .receipt.receipt-58mm .receipt-header h2 {
        font-size: 13px;
    }

    .receipt.receipt-58mm .receipt-barcode svg {
        height: 30px;
    }
}

/* ==================== REPRINT BUTTON ==================== */
.btn-ghost-reprint {
    background: rgba(99, 102, 241, 0.1);
    border: 1px dashed rgba(99, 102, 241, 0.3);
    color: var(--primary-light);
    font-size: 13px;
}

.btn-ghost-reprint:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--primary-light);
}

/* ==================== BULK EDIT ==================== */
.nav-item[data-page="bulkedit"] {
    color: var(--nav-bulkedit);
}

.bulkedit-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    padding: 6px 8px;
    color: var(--text-main);
    font-size: 13px;
    text-align: right;
    outline: none;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
}

.bulkedit-input:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

.bulkedit-input.changed {
    border-color: var(--warning);
    background: rgba(245, 158, 11, 0.08);
}

.validation-card {
    padding: 14px 16px;
    border-radius: 8px;
    margin-bottom: 12px;
}

.validation-card h4 {
    font-size: 14px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.validation-card.card-ok {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.validation-card.card-ok h4 {
    color: var(--success);
}

.validation-card.card-warn {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.validation-card.card-warn h4 {
    color: var(--warning);
}

.validation-card.card-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.validation-card.card-danger h4 {
    color: var(--danger);
}

.validation-card ul {
    list-style: none;
    padding: 0;
    max-height: 120px;
    overflow-y: auto;
}

.validation-card li {
    font-size: 12px;
    color: var(--text-muted);
    padding: 3px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

/* ==================== SYNC LOADING BAR ==================== */
.sync-indicator.syncing {
    border-color: rgba(245, 158, 11, 0.3);
    background: rgba(245, 158, 11, 0.1);
}

.sync-indicator.syncing .sync-dot {
    background: var(--warning);
    animation: pulse-sync 0.5s infinite;
}

.sync-indicator.syncing .sync-text {
    color: var(--warning);
}

/* ==================== KEYBOARD SHORTCUT HINTS ==================== */
.shortcut-hint {
    font-size: 10px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
    font-family: monospace;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ==================== DENOMINATION BUTTONS ==================== */
.denomination-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.btn-denomination {
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: var(--primary-light);
    border-radius: var(--radius-sm);
    padding: 10px 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    white-space: nowrap;
}

.btn-denomination:hover {
    background: rgba(99, 102, 241, 0.28);
    border-color: var(--primary-light);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.btn-denomination:active {
    transform: translateY(0);
    box-shadow: none;
}