/* POS SYSTEM - BLACK / WHITE / GREY THEME */
*, *::before, *::after { box-sizing: border-box; }
body { background: #f4f4f4; color: #1a1a1a; font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; font-size: 14px; min-height: 100vh; }
a { color: #333; text-decoration: none; }
a:hover { color: #000; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f0f0f0; }
::-webkit-scrollbar-thumb { background: #bbb; border-radius: 3px; }

.navbar-dark-pos { background: #1a1a1a !important; border-bottom: 1px solid #333; padding: 0 24px; min-height: 56px; }
.navbar-dark-pos .navbar-brand { color: #fff !important; font-weight: 700; font-size: 16px; letter-spacing: 0.5px; }
.navbar-dark-pos .nav-link { color: #aaa !important; font-size: 13px; font-weight: 500; padding: 18px 14px !important; border-bottom: 2px solid transparent; transition: color 0.15s, border-color 0.15s; }
.navbar-dark-pos .nav-link:hover { color: #fff !important; border-bottom-color: #666; }
.navbar-dark-pos .nav-link.active { color: #fff !important; border-bottom-color: #fff; }
.navbar-dark-pos .btn-logout { background: transparent; border: 1px solid #444; color: #aaa; font-size: 12px; padding: 5px 14px; border-radius: 4px; transition: all 0.15s; }
.navbar-dark-pos .btn-logout:hover { border-color: #fff; color: #fff; }
.page-wrapper { padding: 28px 24px; max-width: 1400px; margin: 0 auto; }

.card { border: 1px solid #e0e0e0 !important; border-radius: 8px !important; box-shadow: 0 1px 4px rgba(0,0,0,0.06) !important; background: #fff; }
.card-header { background: #f8f8f8 !important; border-bottom: 1px solid #e0e0e0 !important; padding: 14px 18px !important; font-weight: 600; font-size: 13px; color: #333; text-transform: uppercase; letter-spacing: 0.5px; border-radius: 8px 8px 0 0 !important; }
.card-body { padding: 18px !important; }

.btn-primary { background: #1a1a1a !important; border-color: #1a1a1a !important; color: #fff !important; font-weight: 500; }
.btn-primary:hover, .btn-primary:focus { background: #333 !important; border-color: #333 !important; }
.btn-secondary { background: #6c6c6c !important; border-color: #6c6c6c !important; color: #fff !important; }
.btn-secondary:hover { background: #555 !important; border-color: #555 !important; }
.btn-outline-primary { border-color: #333 !important; color: #333 !important; background: transparent !important; }
.btn-outline-primary:hover, .btn-check:checked + .btn-outline-primary { background: #1a1a1a !important; color: #fff !important; border-color: #1a1a1a !important; }
.btn-outline-secondary { border-color: #bbb !important; color: #555 !important; }
.btn-outline-secondary:hover { background: #eee !important; color: #222 !important; border-color: #999 !important; }
.btn-outline-danger { border-color: #dc3545 !important; color: #dc3545 !important; }
.btn-outline-danger:hover { background: #dc3545 !important; color: #fff !important; }
.btn-warning { background: #555 !important; border-color: #555 !important; color: #fff !important; }
.btn-warning:hover { background: #333 !important; border-color: #333 !important; color: #fff !important; }
.btn-light { background: #f0f0f0 !important; border-color: #ddd !important; color: #333 !important; }
.btn-light:hover { background: #e0e0e0 !important; }
.btn { border-radius: 5px; font-size: 13px; padding: 7px 16px; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-lg { padding: 10px 22px; font-size: 15px; }

.form-control, .form-select { border: 1px solid #d0d0d0; border-radius: 5px; font-size: 13px; padding: 8px 12px; color: #1a1a1a; background: #fff; transition: border-color 0.15s, box-shadow 0.15s; }
.form-control:focus, .form-select:focus { border-color: #888; box-shadow: 0 0 0 3px rgba(0,0,0,0.08); outline: none; }
.form-label { font-size: 12px; font-weight: 600; color: #444; margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.4px; }
.form-text { font-size: 11px; color: #999; }
.form-check-input:checked { background-color: #1a1a1a; border-color: #1a1a1a; }
.form-switch .form-check-input:checked { background-color: #333; border-color: #333; }

.table { font-size: 13px; margin-bottom: 0; }
.table thead th { background: #f0f0f0; color: #333; font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; padding: 10px 14px; border-bottom: 2px solid #e0e0e0; border-top: none; }
.table tbody td { padding: 11px 14px; border-bottom: 1px solid #f0f0f0; vertical-align: middle; color: #222; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: #fafafa; }
.table-responsive { border-radius: 0 0 8px 8px; overflow: hidden; }

.badge { font-size: 10px; font-weight: 600; padding: 4px 8px; border-radius: 4px; letter-spacing: 0.3px; }
.badge.text-bg-light { background: #ebebeb !important; color: #333 !important; border: 1px solid #ddd; }
.badge.text-bg-warning { background: #e8e8e8 !important; color: #555 !important; border: 1px solid #ccc; }
.badge.text-bg-success { background: #e0e0e0 !important; color: #222 !important; border: 1px solid #ccc; }
.badge.text-bg-danger { background: #f5e0e0 !important; color: #c00 !important; border: 1px solid #f0c0c0; }

.modal-content { border: 1px solid #ddd; border-radius: 10px; box-shadow: 0 8px 32px rgba(0,0,0,0.14); }
.modal-header { background: #1a1a1a; color: #fff; border-bottom: none; padding: 16px 20px; border-radius: 10px 10px 0 0; }
.modal-header .modal-title { font-size: 15px; font-weight: 600; }
.modal-header .btn-close { filter: invert(1); opacity: 0.7; }
.modal-body { padding: 20px; }
.modal-footer { background: #f8f8f8; border-top: 1px solid #eee; padding: 12px 20px; border-radius: 0 0 10px 10px; }

.alert { border-radius: 6px; font-size: 13px; padding: 10px 14px; }
.alert-danger { background: #fff0f0; border-color: #f5c0c0; color: #900; }
.alert-success { background: #f4f4f4; border-color: #ccc; color: #222; }
.alert-warning { background: #f9f9f9; border-color: #ddd; color: #333; }

.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid #e8e8e8; }
.page-header h1 { font-size: 20px; font-weight: 700; color: #1a1a1a; margin: 0; }
.page-header .text-muted { font-size: 12px; color: #999 !important; margin-top: 2px; }
.stat-card { background: #fff; border: 1px solid #e0e0e0; border-radius: 8px; padding: 18px 20px; box-shadow: 0 1px 4px rgba(0,0,0,0.05); }
.stat-card .stat-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: #888; margin-bottom: 6px; }
.stat-card .stat-value { font-size: 26px; font-weight: 700; color: #1a1a1a; line-height: 1; }
.stat-card .stat-sub { font-size: 11px; color: #aaa; margin-top: 4px; }

.product-card { cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s; user-select: none; }
.product-card:hover { border-color: #999 !important; box-shadow: 0 2px 8px rgba(0,0,0,0.10) !important; }
.cart-panel { position: sticky; top: 84px; }
.btn-complete-sale { width: 100%; background: #1a1a1a !important; border: none !important; color: #fff !important; font-size: 15px !important; font-weight: 700 !important; padding: 13px !important; letter-spacing: 0.5px; }
.btn-complete-sale:hover { background: #333 !important; }

.login-page-bg { background: #1a1a1a; min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-card { width: 100%; max-width: 380px; background: #fff; border-radius: 12px; box-shadow: 0 8px 40px rgba(0,0,0,0.35); padding: 36px 32px; }
.login-brand { font-size: 20px; font-weight: 800; color: #1a1a1a; letter-spacing: 0.5px; margin-bottom: 4px; }
.login-sub { font-size: 12px; color: #aaa; margin-bottom: 28px; }

.invoice-wrapper { background: #e8e8e8; padding: 30px 15px; min-height: 100vh; }
.invoice-a4 { background: #fff; width: 210mm; min-height: 297mm; margin: 0 auto; padding: 15mm 15mm 20mm 15mm; box-shadow: 0 4px 24px rgba(0,0,0,0.12); border-radius: 4px; position: relative; font-size: 13px; color: #1a1a1a; display: flex; flex-direction: column; }
.inv-header { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 3px solid #1a1a1a; padding-bottom: 14px; margin-bottom: 20px; }
.inv-store-name { font-size: 22px; font-weight: 800; color: #1a1a1a; }
.inv-store-meta { font-size: 12px; color: #666; line-height: 1.6; }
.inv-label-block { text-align: right; }
.inv-title { font-size: 28px; font-weight: 800; color: #1a1a1a; letter-spacing: 3px; }
.inv-meta { font-size: 12px; color: #666; margin-top: 6px; line-height: 1.7; }
.inv-info-row { display: flex; gap: 16px; margin-bottom: 20px; }
.inv-info-box { flex: 1; background: #f5f5f5; border: 1px solid #e8e8e8; border-radius: 6px; padding: 12px 14px; }
.inv-info-box .inv-box-title { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #888; margin-bottom: 6px; }
.inv-info-box .inv-box-value { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.inv-info-box .inv-box-sub { font-size: 12px; color: #666; line-height: 1.5; }
.inv-table { width: 100%; border-collapse: collapse; margin-bottom: 0; }
.inv-table thead tr { background: #1a1a1a; }
.inv-table thead th { padding: 9px 12px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: #fff; }
.inv-table tbody tr { border-bottom: 1px solid #f0f0f0; }
.inv-table tbody td { padding: 9px 12px; vertical-align: middle; }
.inv-table tbody tr:nth-child(even) { background: #fafafa; }
.inv-totals { margin-left: auto; width: 260px; margin-top: 12px; }
.inv-totals table { width: 100%; border-collapse: collapse; }
.inv-totals td { padding: 5px 8px; font-size: 13px; color: #333; }
.inv-totals .total-row td { font-size: 16px; font-weight: 700; color: #1a1a1a; border-top: 2px solid #1a1a1a; padding-top: 8px; }
.inv-totals .discount-row td { color: #c00; }
.inv-payment { margin-top: 16px; background: #f5f5f5; border: 1px solid #e8e8e8; border-radius: 6px; padding: 12px 14px; display: flex; gap: 30px; flex-wrap: wrap; }
.inv-payment-item .label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #999; }
.inv-payment-item .value { font-size: 14px; font-weight: 600; color: #1a1a1a; }
.paid-stamp { display: inline-block; border: 4px solid #1a1a1a; color: #1a1a1a; font-size: 32px; font-weight: 900; letter-spacing: 6px; padding: 4px 20px; border-radius: 6px; opacity: 0.75; transform: rotate(-8deg); }
.inv-terms { margin-top: auto; padding-top: 20px; border-top: 1px dashed #ccc; }
.inv-terms .terms-title { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #888; margin-bottom: 6px; }
.inv-terms .terms-body { font-size: 11px; color: #777; line-height: 1.6; white-space: pre-line; }
.inv-footer-line { text-align: center; font-size: 11px; color: #bbb; margin-top: 16px; }

.text-muted { color: #999 !important; }
.border-top { border-top: 1px solid #ebebeb !important; }
.border-bottom { border-bottom: 1px solid #ebebeb !important; }
.shadow-sm { box-shadow: 0 1px 4px rgba(0,0,0,0.06) !important; }
.rounded { border-radius: 6px !important; }

@media print {
    body { margin: 0; background: #fff; }
    .no-print, .navbar-dark-pos { display: none !important; }
    .page-wrapper { padding: 0; max-width: none; }
    .invoice-wrapper { background: #fff; padding: 0; }
    .invoice-a4 { width: 100%; min-height: auto; box-shadow: none; border-radius: 0; padding: 10mm 12mm 15mm 12mm; margin: 0; }
    @page { size: A4; margin: 0; }
}

@media (max-width: 991px) {
    .invoice-a4 { width: 100%; padding: 20px; }
    .page-wrapper { padding: 16px; }
    .cart-panel { position: static; }
}

@media (max-width: 575px) {
    .inv-info-row { flex-direction: column; }
    .inv-header { flex-direction: column; gap: 12px; }
    .inv-label-block { text-align: left; }
    .navbar-dark-pos { padding: 0 12px; }
    .navbar-dark-pos .nav-link { padding: 12px 8px !important; }
}
