/**
 * Kost-Kostan POS System - Main Stylesheet
 * Font: Arial Narrow for all reports/nota
 */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --secondary: #6b7280;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  --dark: #1a1a2e;
  --light: #f8fafc;
  --white: #ffffff;
  --border: #e2e8f0;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body {
  font-family: 'Arial Narrow', Arial, sans-serif;
  background: #f1f5f9;
  color: #1e293b;
  font-size: 14px;
  line-height: 1.6;
}

/* ===== LOGIN PAGE ===== */
#login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--dark) 0%, #2d2d44 100%);
  padding: 20px;
}

.login-box {
  background: var(--white);
  border-radius: 12px;
  padding: 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
}

.login-header {
  text-align: center;
  margin-bottom: 30px;
}

.login-logo {
  width: 80px;
  height: 80px;
  margin-bottom: 15px;
}

.login-header h1 {
  font-size: 24px;
  color: var(--dark);
  margin-bottom: 5px;
}

.login-header p {
  color: var(--secondary);
  font-size: 14px;
}

.login-form .form-group {
  margin-bottom: 20px;
}

.login-form label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--dark);
}

.login-form input {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.3s;
}

.login-form input:focus {
  outline: none;
  border-color: var(--primary);
}

.trial-info {
  margin-top: 20px;
  padding: 15px;
  background: #fef3c7;
  border: 1px solid var(--warning);
  border-radius: 8px;
  text-align: center;
}

.trial-info p {
  margin-bottom: 10px;
  color: #92400e;
}

/* ===== BUTTONS ===== */
.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  background: var(--secondary);
  color: var(--white);
}

.btn-secondary:hover {
  background: #4b5563;
}

.btn-success {
  background: var(--success);
  color: var(--white);
}

.btn-warning {
  background: var(--warning);
  color: var(--white);
}

.btn-danger {
  background: var(--danger);
  color: var(--white);
}

.btn-block {
  width: 100%;
  justify-content: center;
}

.btn-icon {
  padding: 10px;
  background: transparent;
  color: var(--white);
  position: relative;
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ===== TOP NAVIGATION ===== */
.top-nav {
  background: var(--dark);
  color: var(--white);
  padding: 0 30px;
  height: 70px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  box-shadow: var(--shadow);
  gap: 15px;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 15px;
  min-width: 0;
  overflow: hidden;
}

.nav-logo {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.nav-left h1 {
  font-size: 20px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}

.trial-banner {
  background: var(--warning);
  color: #000;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  animation: pulse 2s infinite;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 1;
  min-width: 0;
}

.expired-banner {
  background: #dc2626;
  color: #fff;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .4px;
  animation: pulse 1.4s infinite;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 1;
  min-width: 0;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, .35);
}

.nav-right {
  flex-shrink: 0;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  max-width: 220px;
}

.user-info i {
  font-size: 20px;
}

.user-info small {
  flex-basis: 100%;
  margin-left: 28px;
}

.badge {
  position: absolute;
  top: 5px;
  right: 5px;
  background: var(--danger);
  color: var(--white);
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
}

/* ===== SIDEBAR (collapsible) ===== */
.sidebar {
  position: fixed;
  left: 0;
  top: 70px;
  bottom: 0;
  width: 250px;
  background: var(--white);
  box-shadow: var(--shadow);
  overflow: hidden;
  z-index: 90;
  display: flex;
  flex-direction: column;
  transition: width 0.28s ease, transform 0.28s ease;
}

.sidebar .nav-menu {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar.collapsed {
  width: 72px;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
}

.sidebar-logo {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.sidebar-brand {
  font-size: 15px;
  font-weight: 700;
  color: var(--dark);
  white-space: nowrap;
  overflow: hidden;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.sidebar.collapsed .sidebar-brand {
  opacity: 0;
  width: 0;
  padding-right: 0;
}

.sidebar-toggle {
  font-size: 14px;
  color: var(--secondary);
  margin-left: auto;
  transition: transform 0.28s ease;
}

.sidebar.collapsed .sidebar-toggle {
  transform: rotate(180deg);
}

/* Kontrol Menu Sidebar (footer) */
.sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 14px;
  background: #f8fafc;
  border-top: 1px solid var(--border);
  position: sticky;
  bottom: 0;
}

.sidebar-footer-row {
  display: flex;
  gap: 6px;
}

.ctrl-btn {
  flex: 1 1 45%;
  min-width: 0;
  padding: 7px 8px;
  font-size: 11px;
  font-family: inherit;
  color: #334155;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  justify-content: center;
  white-space: nowrap;
  overflow: hidden;
}

.ctrl-btn:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
  color: var(--primary);
}

.ctrl-btn i {
  font-size: 11px;
  flex-shrink: 0;
}

.ctrl-btn span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar.collapsed .sidebar-footer {
  padding: 10px 8px;
  gap: 5px;
}

.sidebar.collapsed .sidebar-footer-row {
  flex-direction: column;
  gap: 5px;
}

.sidebar.collapsed .ctrl-btn span {
  display: none;
}

.sidebar.collapsed .ctrl-btn {
  min-width: auto;
  justify-content: center;
  padding: 8px 6px;
}

/* ===== TEMA / THEMES ===== */
body.theme-light {
  background: #f8fafc;
  color: #1e293b;
}

body.theme-dark {
  background: #0f172a;
  color: #f1f5f9;
}

body.theme-dark .sidebar,
body.theme-dark .main-content,
body.theme-dark .modal,
body.theme-dark .card,
body.theme-dark .table-container,
body.theme-dark .list-page,
body.theme-dark .page {
  background: #1e293b !important;
  color: #f1f5f9;
}

body.theme-dark .list-grid thead th,
body.theme-dark .table-container th {
  background: #334155 !important;
  color: #f1f5f9;
}

body.theme-dark .list-grid tbody tr,
body.theme-dark .table-container tr {
  background: #1e293b;
  color: #f1f5f9;
}

body.theme-dark .list-grid tbody tr:nth-child(even) {
  background: #253144;
}

body.theme-dark .list-grid tbody tr:hover,
body.theme-dark .table-container tr:hover {
  background: #334155;
}

/* ===== TEMA GELAP: kontras teks tabel ===== */
body.theme-dark table.list-grid tbody td,
body.theme-dark table.data-table tbody td,
body.theme-dark .table-container tbody td {
  color: #e2e8f0;
  border-bottom-color: #334155;
}

body.theme-dark table.list-grid thead th,
body.theme-dark table.data-table thead th {
  color: #f8fafc;
  border-bottom-color: #475569;
}

body.theme-dark table.list-grid td.rownum,
body.theme-dark table.list-grid th.rownum {
  color: #94a3b8;
  background: #263449;
  border-right-color: #475569;
}

body.theme-dark table.list-grid thead th.rownum {
  background: #334155;
}

body.theme-dark table.list-grid tbody tr.selected {
  background: #1e3a8a;
}

body.theme-dark table.list-grid td.list-empty {
  color: #64748b;
}

body.theme-dark table.list-grid tbody td a,
body.theme-dark table.list-grid tbody td .link {
  color: #a5b4fc;
}

body.theme-dark table.list-grid tbody td .muted,
body.theme-dark table.list-grid tbody td .text-muted {
  color: #94a3b8;
}

body.theme-dark table.list-grid tbody td strong {
  color: #f8fafc;
}

/* Baris data & sel warnanya tetap terbaca */
body.theme-dark table.list-grid tbody td .badge {
  color: #0f172a;
}

body.theme-dark .list-table-wrap {
  background: #1e293b;
  border-color: #334155;
}

body.theme-dark .list-count {
  color: #94a3b8;
}

body.theme-dark .list-count strong {
  color: #f1f5f9;
}

body.theme-dark .list-footer {
  color: #cbd5e1;
}

body.theme-dark .list-input,
body.theme-dark .list-select,
body.theme-dark .form-control,
body.theme-dark input,
body.theme-dark select,
body.theme-dark textarea {
  background: #334155;
  color: #f1f5f9;
  border-color: #475569;
}

body.theme-dark .btn,
body.theme-dark .list-btn,
body.theme-dark .ctrl-btn {
  background: #334155;
  color: #f1f5f9;
  border-color: #475569;
}

body.theme-dark .list-footer,
body.theme-dark .list-header,
body.theme-dark .list-filter,
body.theme-dark .page-header {
  background: #1e293b;
  border-color: #334155;
}

body.theme-dark .trial-banner,
body.theme-dark .trial-info {
  background: #7f1d1d;
  color: #fecaca;
}

body.theme-pink {
  background: #fdf2f8;
  color: #4a044e;
}

body.theme-pink .sidebar,
body.theme-pink .main-content,
body.theme-pink .modal,
body.theme-pink .card,
body.theme-pink .table-container,
body.theme-pink .list-page,
body.theme-pink .page {
  background: #fce7f3 !important;
  color: #4a044e;
}

body.theme-pink .list-grid thead th,
body.theme-pink .table-container th {
  background: #f9a8d4 !important;
  color: #4a044e;
}

body.theme-pink .list-grid tbody tr,
body.theme-pink .table-container tr {
  background: #fce7f3;
  color: #4a044e;
}

body.theme-pink .list-grid tbody tr:nth-child(even) {
  background: #fbcfe8;
}

body.theme-pink .list-grid tbody tr:hover,
body.theme-pink .table-container tr:hover {
  background: #fbcfe8;
}

body.theme-pink .btn,
body.theme-pink .list-btn,
body.theme-pink .ctrl-btn,
body.theme-pink .list-btn.primary {
  background: #ec4899;
  color: #fff;
  border-color: #db2777;
}

body.theme-pink .list-btn.primary:hover {
  background: #db2777;
}

body.theme-pink .list-footer,
body.theme-pink .list-header,
body.theme-pink .list-filter,
body.theme-pink .page-header {
  background: #fce7f3;
  border-color: #f9a8d4;
}

body.theme-pink .trial-banner,
body.theme-pink .trial-info {
  background: #700078;
  color: #fce7f3;
}

/* ===== MASTER SATUAN STYLING ===== */
.unit-conversion-table {
  width: 100%;
  border-collapse: collapse;
}

.unit-conversion-table th,
.unit-conversion-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  font-size: 13px;
}

.unit-conversion-table th {
  background: #f1f5f9;
  font-weight: 600;
}

body.theme-dark .unit-conversion-table th {
  background: #334155;
  color: #f1f5f9;
}

body.theme-dark .unit-conversion-table td {
  border-color: #334155;
}

body.theme-pink .unit-conversion-table th {
  background: #f9a8d4;
  color: #4a044e;
}

body.theme-pink .unit-conversion-table td {
  border-color: #f9a8d4;
}

.conversion-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.conversion-row input {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 13px;
}

body.theme-dark .conversion-row input {
  background: #334155;
  border-color: #475569;
  color: #f1f5f9;
}

body.theme-pink .conversion-row input {
  background: #fff;
  border-color: #f9a8d4;
  color: #4a044e;
}

.remove-conversion-btn {
  padding: 6px 10px;
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fca5a5;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

.remove-conversion-btn:hover {
  background: #fecaca;
}

body.theme-dark .remove-conversion-btn {
  background: #450a0a;
  color: #fca5a5;
  border-color: #7f1d1d;
}

body.theme-pink .remove-conversion-btn {
  background: #fce7f3;
  color: #be123c;
  border-color: #f9a8d4;
}

/* ===== QRIS DISPLAY ===== */
.qris-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.8);
  z-index: 2000;
  justify-content: center;
  align-items: center;
}

.qris-modal.show {
  display: flex;
}

.qris-content {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  position: relative;
}

body.theme-dark .qris-content {
  background: #1e293b;
  color: #f1f5f9;
}

.qris-content h3 {
  margin: 0 0 16px 0;
  font-size: 18px;
}

.qris-image {
  width: 260px;
  height: 260px;
  margin: 0 auto 16px auto;
  border: 4px solid #fff;
  border-radius: 8px;
  background: #fff;
}

.qris-nominal {
  font-size: 24px;
  font-weight: 700;
  color: #dc2626;
  margin: 16px 0;
}

.qris-btn-confirm {
  background: #10b981;
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  margin: 4px;
}

.qris-btn-confirm:hover {
  background: #059669;
}

.qris-btn-close {
  background: #6b7280;
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  margin: 4px;
}

.qris-btn-close:hover {
  background: #4b5563;
}

/* ===== CASHIER TRANSACTION ===== */
.cashier-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  height: calc(100vh - 160px);
}

.cashier-cart {
  background: #fff;
  border-radius: 8px;
  padding: 16px;
  overflow: auto;
}

body.theme-dark .cashier-cart {
  background: #1e293b;
}

.cashier-cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
}

body.theme-dark .cashier-cart-header {
  border-color: #334155;
}

.cashier-total {
  font-size: 20px;
  font-weight: 700;
  margin-top: 16px;
  text-align: right;
}

.cashier-payment-section {
  background: #fff;
  border-radius: 8px;
  padding: 16px;
  height: fit-content;
}

body.theme-dark .cashier-payment-section {
  background: #1e293b;
}

.payment-method-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  margin-bottom: 8px;
  cursor: pointer;
}

.payment-method-option.selected {
  background: #eff6ff;
  border-color: #4f46e5;
}

body.theme-dark .payment-method-option {
  background: #1e293b;
  border-color: #334155;
}

body.theme-dark .payment-method-option.selected {
  background: #1e3a5f;
  border-color: #4f46e5;
}

.cash-change {
  font-size: 18px;
  font-weight: 700;
  color: #10b981;
  margin-top: 12px;
}

/* ===== IMPORT EXPORT ===== */
.import-export-section {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

body.theme-dark .import-export-section {
  background: #1e293b;
}

.import-export-section h3 {
  margin-top: 0;
  margin-bottom: 16px;
}

.file-upload-area {
  border: 2px dashed #cbd5e1;
  border-radius: 8px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.file-upload-area:hover {
  border-color: #4f46e5;
  background: #f8fafc;
}

body.theme-dark .file-upload-area {
  border-color: #475569;
  background: #1e293b;
}

body.theme-dark .file-upload-area:hover {
  border-color: #4f46e5;
  background: #253144;
}

.btn-outline {
  background: #fff;
  color: #4f46e5;
  border: 1px solid #4f46e5;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
}

.btn-outline:hover {
  background: #eff6ff;
}

body.theme-dark .btn-outline {
  background: #1e293b;
  color: #818cf8;
  border-color: #818cf8;
}

body.theme-dark .btn-outline:hover {
  background: #253144;
}

.nav-menu {
  list-style: none;
  padding: 16px 0;
}

.nav-group {
  border-bottom: 1px solid #f1f5f9;
}

.nav-group-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  cursor: pointer;
  color: var(--secondary);
  font-size: 13px;
  font-weight: 600;
  transition: background 0.2s;
  justify-content: flex-start;
}

.nav-group-header:hover {
  background: #f1f5f9;
  color: var(--primary);
}

.nav-group-header i:first-child {
  width: 20px;
  text-align: center;
}

/* Arrow kanan tetap di ujung kanan */
.nav-group-arrow {
  font-size: 11px;
  margin-left: auto;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.nav-group-arrow.rotated {
  transform: rotate(180deg);
}

.nav-group.collapsed .nav-group-arrow {
  transform: rotate(-90deg);
}

.nav-submenu {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.28s ease;
  background: #fafafa;
}

.nav-submenu.expanded {
  max-height: 500px;
  padding-bottom: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--secondary);
  font-size: 13px;
  text-align: left;
}

.nav-item:hover {
  background: #f1f5f9;
  color: var(--primary);
}

.nav-item.active {
  background: var(--primary);
  color: var(--white);
}

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

/* ===== WARNA IKON/LABEL MENU (per grup) ===== */
.nav-item[data-color="indigo"] i { color: #4f46e5; }
.nav-item[data-color="emerald"] i { color: #10b981; }
.nav-item[data-color="amber"] i { color: #f59e0b; }
.nav-item[data-color="rose"] i { color: #f43f5e; }
.nav-item[data-color="sky"] i { color: #0ea5e9; }
.nav-item[data-color="violet"] i { color: #8b5cf6; }
.nav-item[data-color="teal"] i { color: #14b8a6; }
.nav-item[data-color="orange"] i { color: #f97316; }
.nav-item[data-color="slate"] i { color: #64748b; }
.nav-item[data-color="pink"] i { color: #ec4899; }
.nav-item[data-color="lime"] i { color: #84cc16; }

.nav-group-header[data-color="indigo"] i:first-child { color: #4f46e5; }
.nav-group-header[data-color="emerald"] i:first-child { color: #10b981; }
.nav-group-header[data-color="amber"] i:first-child { color: #f59e0b; }
.nav-group-header[data-color="rose"] i:first-child { color: #f43f5e; }
.nav-group-header[data-color="sky"] i:first-child { color: #0ea5e9; }
.nav-group-header[data-color="violet"] i:first-child { color: #8b5cf6; }
.nav-group-header[data-color="teal"] i:first-child { color: #14b8a6; }
.nav-group-header[data-color="orange"] i:first-child { color: #f97316; }
.nav-group-header[data-color="slate"] i:first-child { color: #64748b; }
.nav-group-header[data-color="pink"] i:first-child { color: #ec4899; }
.nav-group-header[data-color="lime"] i:first-child { color: #84cc16; }

/* Ikon grup tampil dalam kotak rounded */
.nav-group-header i:first-child {
  width: 26px;
  height: 26px;
  line-height: 26px;
  border-radius: 7px;
  font-size: 12px;
  flex-shrink: 0;
  background: rgba(99, 102, 241, 0.1);
}

.nav-group-header[data-color="emerald"] i:first-child { background: rgba(16, 185, 129, 0.12); }
.nav-group-header[data-color="amber"] i:first-child { background: rgba(245, 158, 11, 0.14); }
.nav-group-header[data-color="sky"] i:first-child { background: rgba(14, 165, 233, 0.12); }
.nav-group-header[data-color="violet"] i:first-child { background: rgba(139, 92, 246, 0.12); }
.nav-group-header[data-color="orange"] i:first-child { background: rgba(249, 115, 22, 0.12); }
.nav-group-header[data-color="slate"] i:first-child { background: rgba(100, 116, 139, 0.14); }
.nav-group-header[data-color="rose"] i:first-child { background: rgba(244, 63, 94, 0.12); }
.nav-group-header[data-color="teal"] i:first-child { background: rgba(20, 184, 166, 0.12); }
.nav-group-header[data-color="pink"] i:first-child { background: rgba(236, 72, 153, 0.12); }
.nav-group-header[data-color="lime"] i:first-child { background: rgba(132, 204, 22, 0.14); }

.nav-item:hover i,
.nav-group-header:hover i:first-child {
  transform: scale(1.08);
}

.nav-item i,
.nav-group-header i:first-child {
  transition: transform 0.2s ease;
}

.sidebar.collapsed .nav-item span,
.sidebar.collapsed .nav-group-header span {
  opacity: 0;
  width: 0;
  overflow: hidden;
}

.sidebar.collapsed .nav-group {
  position: relative;
}

.sidebar.collapsed .nav-submenu {
  position: absolute;
  left: 100%;
  top: 0;
  width: 210px;
  background: var(--white);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  max-height: none !important;
  padding: 8px 0;
  border: 1px solid var(--border);
  border-left: none;
  border-radius: 0 8px 8px 0;
  display: none;
}

.sidebar.collapsed .nav-submenu.expanded {
  display: block;
}

.sidebar.collapsed .nav-submenu .nav-item {
  padding: 10px 16px;
  justify-content: flex-start;
  white-space: nowrap;
}

/* Hover preview group header when collapsed */
.sidebar.collapsed .nav-group-header {
  position: relative;
  justify-content: center;
  padding: 11px 8px;
}

.sidebar.collapsed .nav-group-header i:first-child {
  margin-right: 0;
}

.sidebar.collapsed .nav-group-arrow {
  display: none;
}

/* ===== MAIN CONTENT ===== */
.main-content {
  margin-left: 250px;
  margin-top: 70px;
  padding: 30px;
  min-height: calc(100vh - 70px);
  transition: margin-left 0.28s ease;
}

.main-content.sidebar-collapsed {
  margin-left: 72px;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--border);
  gap: 12px;
  flex-wrap: wrap;
}
.page-header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.page-header h2 {
  font-size: 24px;
  color: var(--dark);
}

.date-display {
  color: var(--secondary);
  font-size: 14px;
}

/* ===== BADGE SIDEBAR ===== */
.nav-badge {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-badge.show {
  display: inline-flex;
}

.nav-item.active .nav-badge {
  background: #fff;
  color: #ef4444;
}

.sidebar.collapsed .nav-badge {
  position: absolute;
  top: 4px;
  right: 10px;
  min-width: 16px;
  height: 16px;
  font-size: 9.5px;
  padding: 0 4px;
}

/* ===== PANEL PAKET KURIR BELUM DIAMBIL ===== */
.pending-packages-panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 5px solid #f59e0b;
  border-radius: 10px;
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.pending-packages-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: linear-gradient(90deg, #fffbeb, #fef3c7);
  border-bottom: 1px solid #fde68a;
}

.pending-packages-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pending-packages-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #fbbf24, #d97706);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(217, 119, 6, 0.3);
}

.pending-packages-title h3 {
  font-size: 15px;
  font-weight: 700;
  color: #92400e;
  margin: 0;
}

.pending-packages-title p {
  font-size: 12px;
  color: #b45309;
  margin: 2px 0 0;
}

.pending-packages-count {
  background: #ef4444;
  color: #fff;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.pending-packages-list {
  max-height: 260px;
  overflow-y: auto;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pending-packages-empty {
  text-align: center;
  padding: 22px 10px;
  color: #64748b;
}

.pending-packages-empty i {
  font-size: 30px;
  color: #10b981;
  margin-bottom: 6px;
}

.pending-packages-empty p {
  margin: 0;
  font-size: 13px;
}

.pending-package-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  transition: background .2s, border-color .2s;
}

.pending-package-item:hover {
  background: #fffbeb;
  border-color: #fcd34d;
}

.pending-package-main {
  flex: 1;
  min-width: 0;
}

.pending-package-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pending-package-room {
  background: #e0e7ff;
  color: #4338ca;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.pending-package-meta {
  font-size: 11.5px;
  color: #64748b;
  margin-top: 3px;
}

.pending-package-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.pkg-btn {
  padding: 7px 12px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: inherit;
  white-space: nowrap;
}

.pkg-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.pkg-btn.call {
  background: #f59e0b;
  border-color: #d97706;
  color: #fff;
}

.pkg-btn.call:hover {
  background: #d97706;
}

.pkg-btn.wa {
  background: #22c55e;
  border-color: #16a34a;
  color: #fff;
}

.pkg-btn.wa:hover {
  background: #16a34a;
}

.pkg-btn.voice {
  background: #8b5cf6;
  border-color: #7c3aed;
  color: #fff;
}

.pkg-btn.voice:hover {
  background: #7c3aed;
}

/* Tombol panggilan suara di modal */
.btn-voice {
  background: #8b5cf6;
  border-color: #7c3aed;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.btn-voice:hover {
  background: #7c3aed;
  border-color: #6d28d9;
}

.btn-voice:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

body.theme-dark .pkg-btn.voice { background: #7c3aed; border-color: #6d28d9; color: #fff; }
body.theme-pink .pkg-btn.voice { background: #8b5cf6; border-color: #7c3aed; color: #fff; }

/* ===== MODAL PANGGIL PENYEWA ===== */
.modal-call-content {
  max-width: 520px;
}

.call-tenant-box {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border-radius: 12px;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  border: 1px solid #c7d2fe;
  margin-bottom: 16px;
}

.call-tenant-avatar {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: linear-gradient(135deg, #818cf8, #4f46e5);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.3);
}

.call-tenant-info h4 {
  margin: 0 0 6px;
  font-size: 19px;
  color: #1e1b4b;
}

.call-room-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  color: #4338ca;
  border: 1px solid #c7d2fe;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.call-phone {
  font-size: 12px;
  color: #4f46e5;
  margin-top: 6px;
  font-weight: 600;
}

.call-package-info {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.call-package-info > div {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.call-package-info span {
  font-size: 10.5px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: .4px;
}

.call-package-info strong {
  font-size: 13px;
  color: var(--dark);
}

.call-preview {
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  overflow: hidden;
}

.call-preview-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #dcfce7;
  color: #15803d;
  font-size: 12px;
  font-weight: 700;
}

.call-preview pre {
  margin: 0;
  padding: 12px;
  background: #f0fdf4;
  color: #14532d;
  font-family: inherit;
  font-size: 12.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 220px;
  overflow-y: auto;
}

body.theme-dark .pending-packages-head { background: #422006; border-bottom-color: #78350f; }
body.theme-dark .pending-packages-title h3 { color: #fcd34d; }
body.theme-dark .pending-packages-title p { color: #fbbf24; }
body.theme-dark .pending-packages-list { background: #1e293b; }
body.theme-dark .pending-package-item { background: #334155; border-color: #475569; }
body.theme-dark .pending-package-item:hover { background: #422006; border-color: #b45309; }
body.theme-dark .pending-package-name { color: #f1f5f9; }
body.theme-dark .pending-package-meta { color: #94a3b8; }
body.theme-dark .pkg-btn { background: #334155; border-color: #475569; color: #f1f5f9; }
body.theme-dark .call-tenant-box { background: #312e81; border-color: #4338ca; }
body.theme-dark .call-tenant-info h4 { color: #e0e7ff; }
body.theme-dark .call-room-badge { background: #1e293b; color: #c7d2fe; }
body.theme-dark .call-phone { color: #a5b4fc; }
body.theme-dark .call-package-info > div { background: #334155; border-color: #475569; }
body.theme-dark .call-package-info strong { color: #f1f5f9; }
body.theme-dark .call-preview { border-color: #166534; }
body.theme-dark .call-preview-head { background: #14532d; color: #86efac; }
body.theme-dark .call-preview pre { background: #052e16; color: #bbf7d0; }

body.theme-pink .pending-packages-head { background: #fdf2f8; border-bottom-color: #f9a8d4; }
body.theme-pink .pending-packages-title h3 { color: #9d174d; }
body.theme-pink .pending-packages-title p { color: #be185d; }
body.theme-pink .pending-packages-list { background: #fce7f3; }
body.theme-pink .pending-package-item { background: #fff; border-color: #f9a8d4; }
body.theme-pink .pending-package-name { color: #4a044e; }
body.theme-pink .call-tenant-box { background: #fce7f3; border-color: #f9a8d4; }
body.theme-pink .call-tenant-info h4 { color: #4a044e; }
body.theme-pink .call-room-badge { background: #fff; color: #be185d; border-color: #f9a8d4; }
body.theme-pink .call-phone { color: #be185d; }
body.theme-pink .call-package-info strong { color: #4a044e; }
body.theme-pink .call-preview { border-color: #86efac; }
body.theme-pink .call-preview pre { background: #f0fdf4; color: #14532d; }



/* ===== MODAL KAMAR: 2 KOLOM (tanpa scroll) ===== */
.room-form-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: start;
}

.room-form-col {
  min-width: 0;
}

.room-form-col .room-form-section {
  margin-bottom: 12px;
}

.room-form-section-full {
  height: 100%;
}

.room-facility-count {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  color: #6366f1;
  background: #e0e7ff;
  padding: 2px 8px;
  border-radius: 999px;
}

@media (max-width: 780px) {
  .room-form-cols { grid-template-columns: 1fr; }
}

body.theme-dark .room-facility-count { background: #312e81; color: #c7d2fe; }
body.theme-pink .room-facility-count { background: #fce7f3; color: #9d174d; }

/* ===== MODAL KAMAR (layout ringkas tanpa scroll) ===== */
.modal .modal-room-content {
  max-width: 1040px !important;
  width: calc(100vw - 80px) !important;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-room-header {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  border-bottom: none;
  color: #fff;
  padding: 16px 20px;
  flex-shrink: 0;
}

.modal-room-title {
  display: flex;
  align-items: center;
  gap: 13px;
}

.modal-room-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  flex-shrink: 0;
}

.modal-room-title h3 {
  font-size: 17px;
  color: #fff;
  margin: 0;
}

.modal-room-title p {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.85);
  margin: 2px 0 0;
}

.modal-room-header .modal-close {
  color: rgba(255, 255, 255, 0.9);
}

.modal-room-header .modal-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
}

.modal-room-body {
  padding: 14px 18px;
  overflow-y: auto;
  flex: 1 1 auto;
}

.modal-room-body .form-group {
  margin-bottom: 9px;
}

.modal-room-body .form-group label {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.modal-room-body .form-control {
  padding: 6px 10px;
  font-size: 12.5px;
}

.modal-room-body .form-control:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

/* Bagian form */
.room-form-section {
  margin-bottom: 11px;
  padding: 11px 13px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fbfcfe;
}

.room-form-section-head {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
  color: #4f46e5;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 9px;
  padding-bottom: 6px;
  border-bottom: 1px dashed #e2e8f0;
}

.room-form-section-head i {
  font-size: 13px;
}

/* Grid field */
.room-form-grid {
  display: grid;
  gap: 10px;
}

.room-form-grid-2 { grid-template-columns: repeat(2, 1fr); }
.room-form-grid-3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 640px) {
  .room-form-grid-2,
  .room-form-grid-3 { grid-template-columns: 1fr; }
}

/* Pemilih fasilitas */
.facility-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 5px;
  margin-bottom: 8px;
}

.facility-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #475569;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all .18s ease;
  user-select: none;
  margin: 0;
}

.facility-option:hover {
  border-color: #818cf8;
  color: #4338ca;
  background: #eef2ff;
}

.facility-option.active {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  border-color: #4f46e5;
  color: #fff;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.3);
}

/* Checkbox asli disembunyikan, diganti tampilan kotak centang */
.facility-checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.facility-box {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1.5px solid #94a3b8;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all .18s ease;
}

.facility-box i {
  font-size: 9px;
  color: #fff;
  opacity: 0;
  transform: scale(.5);
  transition: all .18s ease;
}

.facility-option.active .facility-box {
  background: #fff;
  border-color: #fff;
}

.facility-option.active .facility-box i {
  opacity: 1;
  transform: scale(1);
  color: #4f46e5;
}

.facility-option > i {
  font-size: 12px;
  flex-shrink: 0;
}

.facility-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.theme-dark .room-form-section { background: #1e293b; border-color: #334155; }
body.theme-dark .room-form-section-head { color: #a5b4fc; border-bottom-color: #334155; }
body.theme-dark .room-form-body .form-group label,
body.theme-dark .modal-room-body .form-group label { color: #cbd5e1; }
body.theme-dark .facility-option { background: #334155; border-color: #475569; color: #e2e8f0; }
body.theme-dark .facility-option:hover { background: #312e81; border-color: #6366f1; color: #c7d2fe; }
body.theme-dark .facility-option.active { background: linear-gradient(135deg, #6366f1, #4f46e5); color: #fff; }

body.theme-pink .room-form-section { background: #fffdfe; border-color: #f9a8d4; }
body.theme-pink .room-form-section-head { color: #be185d; border-bottom-color: #fbcfe8; }
body.theme-pink .facility-option { background: #fff; border-color: #f9a8d4; color: #831843; }
body.theme-pink .facility-option:hover { background: #fce7f3; border-color: #ec4899; color: #9d174d; }
body.theme-pink .facility-option.active { background: linear-gradient(135deg, #ec4899, #db2777); color: #fff; }


/* ===== BARIS LOKASI DATABASE (dashboard, bawah) ===== */
.dashboard-db-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 10px 14px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  font-size: 12px;
  color: #075985;
}

.dashboard-db-bar i {
  color: #4f46e5;
}

.dashboard-db-bar .db-path-text {
  font-family: Consolas, 'Courier New', monospace;
  color: #4f46e5;
  font-weight: 600;
  word-break: break-all;
}

body.theme-dark .dashboard-db-bar { background: #0c4a6e; border-color: #075985; color: #bae6fd; }
body.theme-dark .dashboard-db-bar .db-path-text { color: #a5b4fc; }
body.theme-pink .dashboard-db-bar { background: #fdf2f8; border-color: #f9a8d4; color: #831843; }
body.theme-pink .dashboard-db-bar .db-path-text { color: #be185d; }


/* ===== TAB BAR KLASIK (desktop POS) ===== */
.classic-tabbar {
  display: flex;
  align-items: stretch;
  gap: 2px;
  background: #dfe3ea;
  border: 1px solid #b8c0cc;
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  padding: 3px 3px 0;
  margin-bottom: -1px;
  overflow-x: auto;
}

.classic-tab {
  padding: 7px 16px;
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
  background: #eef1f6;
  border: 1px solid #b8c0cc;
  border-bottom: none;
  border-radius: 5px 5px 0 0;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background .15s, color .15s;
  position: relative;
  top: 1px;
}

.classic-tab:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.classic-tab.active {
  background: #ffffff;
  color: #1d4ed8;
  border-bottom-color: #ffffff;
  font-weight: 700;
  box-shadow: inset 0 3px 0 #2563eb;
}

.classic-tab i {
  font-size: 11px;
}

/* Halaman yang memakai tab bar */
.classic-tabbed-page {
  background: var(--white);
  border: 1px solid #b8c0cc;
  border-radius: 0 6px 6px 6px;
  padding: 14px 16px;
}

body.theme-dark .classic-tabbar { background: #1e293b; border-color: #475569; }
body.theme-dark .classic-tab { background: #334155; border-color: #475569; color: #cbd5e1; }
body.theme-dark .classic-tab:hover { background: #3f4a5f; color: #f1f5f9; }
body.theme-dark .classic-tab.active { background: #1e293b; color: #a5b4fc; border-bottom-color: #1e293b; }
body.theme-dark .classic-tabbed-page { background: #1e293b; border-color: #475569; }

body.theme-pink .classic-tabbar { background: #fbcfe8; border-color: #f9a8d4; }
body.theme-pink .classic-tab { background: #fce7f3; border-color: #f9a8d4; color: #831843; }
body.theme-pink .classic-tab:hover { background: #f9a8d4; color: #4a044e; }
body.theme-pink .classic-tab.active { background: #fff; color: #be185d; border-bottom-color: #fff; }
body.theme-pink .classic-tabbed-page { background: #fff; border-color: #f9a8d4; }


/* ===== KUNCI HPP & STOK ITEM ===== */
.item-lock {
  font-size: 10px;
  color: #94a3b8;
  margin-left: 3px;
  cursor: help;
}

.item-lock-hint {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  padding: 8px 11px;
  border-radius: 7px;
  background: #fef3c7;
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: 12px;
  font-weight: 600;
}

.item-lock-hint i {
  font-size: 13px;
}

body.theme-dark .item-lock-hint { background: #422006; border-color: #78350f; color: #fcd34d; }
body.theme-pink .item-lock-hint { background: #fef3c7; border-color: #fcd34d; color: #92400e; }

/* ===== FORM HINT & FORM ROW ===== */
.form-hint {
  display: block;
  font-size: 11.5px;
  color: #94a3b8;
  margin-top: 4px;
  font-style: italic;
}

.label-optional {
  font-weight: 400;
  color: #94a3b8;
  font-style: italic;
}

.form-row-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (max-width: 620px) {
  .form-row-2 { grid-template-columns: 1fr; }
}

/* ===== PICKER TEMA ===== */
.theme-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.theme-card {
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: all .2s ease;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.theme-card:hover {
  border-color: #818cf8;
  box-shadow: 0 5px 16px rgba(15, 23, 42, .12);
  transform: translateY(-2px);
}

.theme-card.active {
  border-color: #4f46e5;
  background: #eef2ff;
}

.theme-preview {
  display: block;
  height: 84px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(0, 0, 0, .08);
}

.theme-preview .tp-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 16px;
}

.theme-preview .tp-side {
  position: absolute;
  top: 16px;
  left: 0;
  bottom: 0;
  width: 42px;
}

.theme-preview .tp-body {
  position: absolute;
  top: 16px;
  left: 42px;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.theme-preview-light .tp-top { background: #1e293b; }
.theme-preview-light .tp-side { background: #f1f5f9; border-right: 1px solid #e2e8f0; }
.theme-preview-light .tp-body { background: #ffffff; color: #f59e0b; }

.theme-preview-dark .tp-top { background: #0f172a; }
.theme-preview-dark .tp-side { background: #1e293b; border-right: 1px solid #334155; }
.theme-preview-dark .tp-body { background: #0f172a; color: #a5b4fc; }

.theme-preview-pink .tp-top { background: #4a044e; }
.theme-preview-pink .tp-side { background: #fce7f3; border-right: 1px solid #f9a8d4; }
.theme-preview-pink .tp-body { background: #fdf2f8; color: #ec4899; }

.theme-name {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 7px;
}

.theme-card.active .theme-name { color: #4338ca; }

.theme-desc {
  font-size: 11.5px;
  color: #64748b;
}

.theme-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 13px;
  border-radius: 8px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  font-size: 12.5px;
}

.theme-note i {
  margin-top: 2px;
  flex-shrink: 0;
}

body.theme-dark .theme-card { background: #1e293b; border-color: #334155; }
body.theme-dark .theme-card.active { border-color: #6366f1; background: #312e81; }
body.theme-dark .theme-name { color: #f1f5f9; }
body.theme-dark .theme-card.active .theme-name { color: #c7d2fe; }
body.theme-dark .theme-desc { color: #94a3b8; }
body.theme-dark .theme-note { background: #172554; border-color: #1e40af; color: #bfdbfe; }

body.theme-pink .theme-card { background: #fff; border-color: #f9a8d4; }
body.theme-pink .theme-card.active { border-color: #db2777; background: #fce7f3; }
body.theme-pink .theme-name { color: #4a044e; }
body.theme-pink .theme-card.active .theme-name { color: #9d174d; }
body.theme-pink .theme-desc { color: #be185d; }
body.theme-pink .theme-note { background: #fce7f3; border-color: #f9a8d4; color: #9d174d; }


/* ===== DAFTAR REKENING BANK ===== */
.banks-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.bank-item-card {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 11px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
}

.bank-item-card:hover {
  border-color: #c7d2fe;
  box-shadow: 0 3px 10px rgba(15, 23, 42, .07);
}

.bank-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex-shrink: 0;
}

.bank-actions .mini-btn {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #fff;
  color: #475569;
  cursor: pointer;
  font-size: 12px;
  transition: all .15s;
}

.bank-actions .mini-btn:hover {
  background: #eef2ff;
  border-color: #a5b4fc;
  color: #4338ca;
}

.bank-actions .mini-btn.btn-danger:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}

body.theme-dark .bank-actions .mini-btn {
  background: #0f172a;
  border-color: #334155;
  color: #cbd5e1;
}

body.theme-dark .bank-actions .mini-btn:hover {
  background: #312e81;
  border-color: #6366f1;
  color: #c7d2fe;
}

body.theme-dark .bank-actions .mini-btn.btn-danger:hover {
  background: #7f1d1d;
  border-color: #fca5a5;
  color: #fecaca;
}

.bank-logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: .2px;
  color: #fff;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
  overflow: hidden;
}

.bank-logo i {
  font-size: 20px;
  color: #fff;
}

/* Warna brand tiap bank */
.bank-logo-bca      { background: linear-gradient(135deg, #003d7a, #0a6fc2); }
.bank-logo-bri      { background: linear-gradient(135deg, #003b71, #1260a8); }
.bank-logo-mandiri  { background: linear-gradient(135deg, #002c5f, #0f4c9c); }
.bank-logo-bni      { background: linear-gradient(135deg, #8c1119, #d32029); }
.bank-logo-bjb      { background: linear-gradient(135deg, #143c6b, #2f7fd1); }
.bank-logo-mayapada { background: linear-gradient(135deg, #5c1f8e, #9c4dcc); }
.bank-logo-permata  { background: linear-gradient(135deg, #6b1f7a, #b040c4); }
.bank-logo-cimb     { background: linear-gradient(135deg, #0e4a87, #1f7ac4); }
.bank-logo-danamon  { background: linear-gradient(135deg, #00539f, #1a86d8); }
.bank-logo-bsri     { background: linear-gradient(135deg, #00693e, #12a05e); }
.bank-logo-maspion  { background: linear-gradient(135deg, #b81c22, #ef4444); }
.bank-logo-ocbc     { background: linear-gradient(135deg, #b31217, #e04a4e); }
.bank-logo-ctbk     { background: linear-gradient(135deg, #00539f, #1a86d8); }
.bank-logo-livin    { background: linear-gradient(135deg, #0f766e, #14b8a6); }
.bank-logo-jago     { background: linear-gradient(135deg, #c0392b, #e74c3c); }
.bank-logo-umn      { background: linear-gradient(135deg, #1a237e, #3949ab); }
.bank-logo-mir      { background: linear-gradient(135deg, #00539f, #1a86d8); }
.bank-logo-all      { background: linear-gradient(135deg, #475569, #94a3b8); }
.bank-logo-syariah  { background: linear-gradient(135deg, #00693e, #12a05e); }
.bank-logo-default  { background: linear-gradient(135deg, #475569, #94a3b8); }

.bank-detail {
  flex: 1;
  min-width: 0;
}

.bank-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #1e293b;
}

.bank-number {
  font-family: Consolas, 'Courier New', monospace;
  font-size: 14px;
  font-weight: 700;
  color: #4f46e5;
  letter-spacing: 0.5px;
  margin: 2px 0;
}

.bank-holder {
  font-size: 11.5px;
  color: #64748b;
}

.bank-nomor-rekening {
  font-family: Consolas, 'Courier New', monospace;
  font-weight: 700;
  color: #4f46e5;
  letter-spacing: 0.4px;
}

.banks-empty {
  padding: 20px;
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
}

body.theme-dark .bank-item-card { background: #1e293b; border-color: #334155; }
body.theme-dark .bank-name { color: #f1f5f9; }
body.theme-dark .bank-number { color: #a5b4fc; }
body.theme-dark .bank-holder { color: #94a3b8; }
body.theme-dark .bank-nomor-rekening { color: #a5b4fc; }
body.theme-dark .banks-empty { border-color: #475569; color: #64748b; }

body.theme-pink .bank-item-card { background: #fff; border-color: #f9a8d4; }
body.theme-pink .bank-name { color: #4a044e; }
body.theme-pink .bank-number { color: #be185d; }
body.theme-pink .bank-holder { color: #be185d; }
body.theme-pink .bank-nomor-rekening { color: #be185d; }
body.theme-pink .banks-empty { border-color: #f9a8d4; color: #be185d; }

/* ===== STATS GRID ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: var(--white);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: var(--shadow);
  transition: transform 0.3s;
  border-left: 4px solid transparent;
}

.stat-card:hover {
  transform: translateY(-5px);
}

/* Kartu dashboard yang bisa diklik */
.stat-card-link {
  cursor: pointer;
  position: relative;
}

.stat-card-arrow {
  position: absolute;
  top: 14px;
  right: 16px;
  font-size: 13px;
  color: #94a3b8;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity .2s ease, transform .2s ease;
}

.stat-card-link:hover .stat-card-arrow {
  opacity: 1;
  transform: translateX(0);
  color: #8b5cf6;
}

.stat-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

/* Ikon besar dengan efek gradient + bayangan */
.stat-icon-lg {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  font-size: 30px;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
  position: relative;
  overflow: hidden;
}

.stat-icon-lg::after {
  content: '';
  position: absolute;
  top: -18px;
  right: -18px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
}

.stat-icon-lg i {
  position: relative;
  z-index: 1;
}

.stat-primary .stat-icon { background: linear-gradient(135deg, #818cf8, #4f46e5); color: #fff; }
.stat-success .stat-icon { background: linear-gradient(135deg, #34d399, #059669); color: #fff; }
.stat-info .stat-icon { background: linear-gradient(135deg, #60a5fa, #2563eb); color: #fff; }
.stat-warning .stat-icon { background: linear-gradient(135deg, #fbbf24, #d97706); color: #fff; }
.stat-danger .stat-icon { background: linear-gradient(135deg, #fb7185, #e11d48); color: #fff; }
.stat-secondary .stat-icon { background: linear-gradient(135deg, #94a3b8, #475569); color: #fff; }

.stat-card.stat-primary { border-left-color: #4f46e5; }
.stat-card.stat-success { border-left-color: #059669; }
.stat-card.stat-info { border-left-color: #2563eb; }
.stat-card.stat-warning { border-left-color: #d97706; }
.stat-card.stat-danger { border-left-color: #e11d48; }
.stat-card.stat-secondary { border-left-color: #475569; }
.stat-card.stat-warning-soft { border-left-color: #8b5cf6; }
.stat-card.stat-warning-soft .stat-icon { background: linear-gradient(135deg, #a78bfa, #7c3aed); color: #fff; }

/* Label status berwarna di bawah angka */
.status-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.2px;
  white-space: normal;
  line-height: 1.35;
  max-width: 100%;
}
.status-label i {
  flex-shrink: 0;
}

.status-label i {
  font-size: 7px;
}

.status-label-success { background: #d1fae5; color: #047857; }
.status-label-info { background: #dbeafe; color: #1d4ed8; }
.status-label-pink { background: #fce7f3; color: #be185d; }
.status-label-warning { background: #fef3c7; color: #b45309; }
.status-label-danger { background: #fee2e2; color: #b91c1c; }
.status-label-primary { background: #e0e7ff; color: #4338ca; }
.status-label-slate { background: #e2e8f0; color: #334155; }
.status-label-violet { background: #ede9fe; color: #6d28d9; }

body.theme-dark .status-label-success { background: #064e3b; color: #6ee7b7; }
body.theme-dark .status-label-info { background: #1e3a8a; color: #93c5fd; }
body.theme-dark .status-label-pink { background: #831843; color: #f9a8d4; }
body.theme-dark .status-label-warning { background: #78350f; color: #fcd34d; }
body.theme-dark .status-label-danger { background: #7f1d1d; color: #fca5a5; }
body.theme-dark .status-label-primary { background: #312e81; color: #c7d2fe; }
body.theme-dark .status-label-slate { background: #334155; color: #cbd5e1; }
body.theme-dark .status-label-violet { background: #4c1d95; color: #ddd6fe; }

body.theme-pink .status-label-success { background: #d1fae5; color: #047857; }
body.theme-pink .status-label-info { background: #dbeafe; color: #1d4ed8; }
body.theme-pink .status-label-pink { background: #fbcfe8; color: #9d174d; }
body.theme-pink .status-label-warning { background: #fef3c7; color: #b45309; }
body.theme-pink .status-label-danger { background: #fee2e2; color: #b91c1c; }
body.theme-pink .status-label-primary { background: #e0e7ff; color: #4338ca; }
body.theme-pink .status-label-slate { background: #e2e8f0; color: #334155; }
body.theme-pink .status-label-violet { background: #ede9fe; color: #6d28d9; }

.stat-info {
  min-width: 0;
  flex: 1;
}

.stat-info h3 {
  font-size: 28px;
  font-weight: 700;
  color: var(--dark);
}

.stat-info p {
  color: var(--secondary);
  font-size: 13px;
}

/* ===== CHARTS ===== */
.charts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 30px;
  width: 100%;
}

.chart-container {
  background: var(--white);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow);
  /* Tinggi tetap supaya canvas tidak tumbuh terus (maintainAspectRatio:false) */
  height: 400px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

/* Grafik omzet selebar penuh konten */
.chart-container-wide {
  width: 100%;
}

.chart-container h3 {
  margin-bottom: 14px;
  color: var(--dark);
  font-size: 16px;
  flex-shrink: 0;
}

/* Wrapper canvas dengan tinggi pasti -> Chart.js resize stabil */
.chart-body {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
}

.chart-body canvas {
  position: absolute !important;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
}

/* ===== TABLES ===== */
.table-container {
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 15px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  background: #f8fafc;
  font-weight: 600;
  color: var(--dark);
  font-size: 13px;
  text-transform: uppercase;
}

.data-table tbody tr:hover {
  background: #f8fafc;
}

.data-table .actions {
  display: flex;
  gap: 8px;
}

.data-table .actions button {
  padding: 5px 10px;
  font-size: 12px;
}

/* ===== FORMS ===== */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--dark);
}

.form-control {
  width: 100%;
  padding: 10px 15px;
  border: 2px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-family: 'Arial Narrow', Arial, sans-serif;
  transition: border-color 0.3s;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
}

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

.money-input {
  text-align: right;
}

/* ===== MODALS ===== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 20px;
}

.modal.show {
  display: flex;
}

.modal-content {
  background: var(--white);
  border-radius: 12px;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-lg {
  max-width: 800px;
}

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

.modal-header h3 {
  font-size: 18px;
  color: var(--dark);
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--secondary);
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 20px;
  border-top: 1px solid var(--border);
}

/* ===== TRANSACTION SUMMARY ===== */
.transaction-summary {
  background: #f8fafc;
  padding: 20px;
  border-radius: 8px;
  margin-top: 20px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.summary-row.total {
  border-bottom: none;
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  margin-top: 10px;
  padding-top: 15px;
  border-top: 2px solid var(--primary);
}

/* ===== QRIS DISPLAY ===== */
.qris-display {
  text-align: center;
  padding: 30px;
  background: #f8fafc;
  border-radius: 8px;
}

.qris-display img {
  max-width: 300px;
  margin-bottom: 20px;
}

.qris-amount {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary);
}

/* ===== FILTERS BAR ===== */
.filters-bar {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filters-bar .form-control {
  width: auto;
  min-width: 150px;
}

/* ===== ROOMS GRID ===== */
.rooms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.room-card {
  background: var(--white);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--success);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}

.room-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

.room-card.occupied {
  border-left-color: var(--danger);
}

.room-card.maintenance {
  border-left-color: var(--warning);
}

.room-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.room-card h4 {
  font-size: 20px;
  margin-bottom: 4px;
  color: var(--dark);
}

.room-card .room-type {
  color: var(--secondary);
  font-size: 13px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.room-card .room-price {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 10px;
}

.room-card .room-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.room-card .room-status i {
  font-size: 11px;
}

/* Label status kamar */
.room-status.status-kosong { background: #d1fae5; color: #065f46; }
.room-status.status-terisi { background: #dbeafe; color: #1e40af; }
.room-status.status-perbaikan { background: #fef3c7; color: #92400e; }

/* ===== IKON FASILITAS KAMAR ===== */
.room-facilities {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

.facility-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 7px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 11px;
  font-weight: 600;
  transition: background .2s, color .2s, transform .2s;
}

.facility-chip:hover {
  background: #e0e7ff;
  border-color: #c7d2fe;
  color: #4338ca;
  transform: translateY(-1px);
}

.facility-chip i {
  font-size: 12px;
  color: #6366f1;
}

.facility-chip:hover i {
  color: #4338ca;
}

.facility-chip em {
  font-style: normal;
}

.facility-empty {
  font-size: 11.5px;
  color: #94a3b8;
  font-style: italic;
}

body.theme-dark .room-card .room-status.status-kosong { background: #064e3b; color: #6ee7b7; }
body.theme-dark .room-card .room-status.status-terisi { background: #1e3a8a; color: #93c5fd; }
body.theme-dark .room-card .room-status.status-perbaikan { background: #78350f; color: #fcd34d; }
body.theme-dark .facility-chip { background: #334155; border-color: #475569; color: #cbd5e1; }
body.theme-dark .facility-chip:hover { background: #312e81; border-color: #4338ca; color: #c7d2fe; }
body.theme-dark .facility-chip i { color: #a5b4fc; }
body.theme-dark .facility-empty { color: #64748b; }

body.theme-pink .room-card .room-status.status-kosong { background: #d1fae5; color: #065f46; }
body.theme-pink .room-card .room-status.status-terisi { background: #dbeafe; color: #1e40af; }
body.theme-pink .room-card .room-status.status-perbaikan { background: #fef3c7; color: #92400e; }
body.theme-pink .facility-chip { background: #fdf2f8; border-color: #f9a8d4; color: #831843; }
body.theme-pink .facility-chip:hover { background: #fbcfe8; border-color: #ec4899; color: #9d174d; }
body.theme-pink .facility-chip i { color: #db2777; }
body.theme-pink .facility-empty { color: #be185d; }

/* ===== REPORTS GRID ===== */
.reports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.report-card {
  background: var(--white);
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: all 0.3s;
}

.report-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.report-card i {
  font-size: 40px;
  color: var(--primary);
  margin-bottom: 15px;
}

.report-card h3 {
  font-size: 16px;
  margin-bottom: 10px;
  color: var(--dark);
}

.report-card p {
  font-size: 13px;
  color: var(--secondary);
}

/* ===== REPORT PREVIEW ===== */
.report-preview {
  background: var(--white);
  border-radius: 12px;
  padding: 30px;
  margin-top: 20px;
  box-shadow: var(--shadow);
}

.report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--border);
}

/* Header laporan hanya berisi judul (tanpa tombol aksi) */
.report-header h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
}

body.theme-dark .report-header h3 { color: #f1f5f9; }
body.theme-pink .report-header h3 { color: #4a044e; }

.report-actions {
  display: flex;
  gap: 10px;
}

.report-content {
  font-family: 'Arial Narrow', Arial, sans-serif;
  line-height: 1.8;
}

/* ===== PENGATURAN MINI PRINTER ===== */
.mini-printer-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0;
  margin-bottom: 22px;
  overflow: hidden;
}

.mini-printer-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.mini-printer-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mini-printer-title i {
  color: #4f46e5;
  font-size: 15px;
}

.mini-printer-title h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.mini-printer-sub {
  font-size: 11.5px;
  color: #64748b;
  padding: 2px 8px;
  background: #e2e8f0;
  border-radius: 10px;
}

.mini-printer-desc {
  margin: 0;
  padding: 10px 16px;
  font-size: 12px;
  color: #64748b;
  background: #fcfcfd;
  border-bottom: 1px solid #eef2f7;
}

.mini-printer-body {
  display: flex;
  gap: 22px;
  padding: 16px;
  align-items: flex-start;
}

.mini-printer-settings {
  flex: 1;
  min-width: 0;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 6px;
}

.mp-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.mp-label {
  flex: 0 0 180px;
  text-align: right;
  font-size: 12.5px;
  color: #334155;
  font-weight: 500;
  padding-right: 4px;
}

.mp-control {
  flex: 1;
  min-width: 0;
}

.mp-control .list-select,
.mp-control .list-input {
  height: 30px;
  width: 100%;
}

.mp-logo-label {
  flex: 0 0 auto;
  text-align: right;
  font-size: 12.5px;
  color: #334155;
  font-weight: 500;
  min-width: 116px;
}

.mini-printer-logo {
  flex: 0 0 230px;
  border-left: 1px solid #eef2f7;
  padding-left: 18px;
}

.mp-logo-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.mp-warning {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 11.5px;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 6px;
  padding: 7px 9px;
  margin: 10px 0;
  line-height: 1.45;
}

.mp-warning i {
  color: #d97706;
  margin-top: 1px;
}

.mp-logo-preview {
  height: 130px;
  border: 2px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #94a3b8;
  font-size: 12px;
  overflow: hidden;
  margin-bottom: 10px;
}

.mp-logo-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.mp-logo-preview.has-logo {
  border-color: #a5b4fc;
  background: #ffffff;
  color: #4338ca;
}

.mp-logo-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.mp-paper-info {
  border-top: 1px solid #eef2f7;
  padding-top: 10px;
  font-size: 11.5px;
  color: #64748b;
  line-height: 1.6;
}

.mp-paper-info div {
  display: flex;
  flex-direction: column;
  margin-bottom: 8px;
}

.mp-paper-info strong {
  color: #334155;
  font-weight: 600;
}

.mini-printer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}

.mini-printer-preview-wrap {
  padding: 14px 16px;
  border-top: 1px solid #eef2f7;
}

.mini-printer-preview-wrap:last-child {
  border-top: 1px solid #eef2f7;
  border-bottom: 1px solid #eef2f7;
}

body.theme-dark .mini-printer-card { background: #1e293b; border-color: #334155; }
body.theme-dark .mini-printer-head { background: #0f172a; border-color: #334155; }
body.theme-dark .mini-printer-title h3 { color: #f1f5f9; }
body.theme-dark .mini-printer-desc { background: #172033; border-color: #334155; color: #94a3b8; }
body.theme-dark .mini-printer-logo { border-color: #334155; }
body.theme-dark .mp-label, body.theme-dark .mp-logo-label { color: #cbd5e1; }
body.theme-dark .mp-logo-preview { background: #0f172a; border-color: #334155; color: #64748b; }
body.theme-dark .mp-logo-preview.has-logo { background: #0f172a; border-color: #6366f1; color: #a5b4fc; }
body.theme-dark .mini-printer-actions { background: #0f172a; border-color: #334155; }
body.theme-dark .mini-printer-preview-wrap { border-color: #334155; }
body.theme-dark .mp-warning { background: #451a03; border-color: #b45309; color: #fcd34d; }
body.theme-dark .mp-warning i { color: #fbbf24; }
body.theme-dark .mp-paper-info strong { color: #cbd5e1; }
body.theme-dark .mp-paper-info { color: #94a3b8; }

body.theme-pink .mini-printer-card { background: #fff; border-color: #f9a8d4; }
body.theme-pink .mini-printer-head { background: #fdf2f8; border-color: #fbcfe8; }

@media (max-width: 900px) {
  .mini-printer-body { flex-direction: column; }
  .mini-printer-logo { flex: 1; width: 100%; border-left: none; border-top: 1px solid #eef2f7; padding-left: 0; padding-top: 14px; }
  .mp-label { flex-basis: 140px; }
}

/* ===== SETTINGS ===== */
.settings-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 10px;
}

.settings-tab {
  padding: 10px 20px;
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 600;
  color: var(--secondary);
  border-bottom: 2px solid transparent;
  margin-bottom: -12px;
}

.settings-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.settings-content {
  display: none;
}

.settings-content.active {
  display: block;
}

.license-info {
  background: #f8fafc;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.license-info p {
  margin-bottom: 10px;
}

.banks-list {
  margin-top: 20px;
}

.bank-item {
  background: #f8fafc;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ===== NOTIFICATION PANEL ===== */
.notification-panel {
  position: fixed;
  top: 70px;
  right: 0;
  width: 350px;
  background: var(--white);
  box-shadow: var(--shadow-lg);
  z-index: 95;
  transform: translateX(100%);
  transition: transform 0.3s;
  max-height: calc(100vh - 70px);
  overflow-y: auto;
}

.notification-panel.show {
  transform: translateX(0);
}

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

.notification-header h3 {
  font-size: 16px;
}

.notification-header button {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
}

.notification-list {
  padding: 10px;
}

.notification-item {
  padding: 15px;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 15px;
}

.notification-item.unread {
  background: #eff6ff;
}

.notification-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.notification-icon.warning { background: #fef3c7; color: var(--warning); }
.notification-icon.danger { background: #fee2e2; color: var(--danger); }
.notification-icon.info { background: #dbeafe; color: var(--info); }

.notification-content h4 {
  font-size: 14px;
  margin-bottom: 5px;
}

.notification-content p {
  font-size: 12px;
  color: var(--secondary);
}

/* ===== TOAST ===== */
.toast-container {
  position: fixed;
  top: 90px;
  right: 20px;
  z-index: 2000;
}

.toast {
  background: var(--white);
  padding: 15px 20px;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 300px;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.warning { border-left: 4px solid var(--warning); }
.toast.info { border-left: 4px solid var(--info); }

/* ===== ALERTS SECTION ===== */
.alerts-section {
  background: var(--white);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.alerts-section h3 {
  margin-bottom: 15px;
  color: var(--dark);
}

.alerts-container {
  max-height: 300px;
  overflow-y: auto;
}

.alert-item {
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.alert-item.warning {
  background: #fef3c7;
  border-left: 4px solid var(--warning);
}

.alert-item.danger {
  background: #fee2e2;
  border-left: 4px solid var(--danger);
}

.alert-item.info {
  background: #dbeafe;
  border-left: 4px solid var(--info);
}

/* ===== TABS ===== */
.tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.tab {
  padding: 10px 20px;
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  font-weight: 600;
  color: var(--secondary);
}

.tab.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.tab-content {
  display: none;
  background: var(--white);
  padding: 20px;
  border-radius: 0 8px 8px 8px;
  box-shadow: var(--shadow);
}

.tab-content.active {
  display: block;
}

/* ===== CONNECTION STATUS ===== */
.connection-status {
  margin-top: 20px;
  padding: 15px;
  border-radius: 8px;
}

.connection-status.success {
  background: #d1fae5;
  color: #065f46;
}

.connection-status.error {
  background: #fee2e2;
  color: #991b1b;
}

/* ===== ERROR MESSAGE ===== */
.error-message {
  color: var(--danger);
  font-size: 13px;
  margin-top: 10px;
  text-align: center;
}

/* ===== PRINT STYLES ===== */
@media print {
  .sidebar,
  .top-nav,
  .btn,
  .modal,
  .notification-panel {
    display: none !important;
  }
  
  .main-content {
    margin: 0;
    padding: 0;
  }
  
  .report-preview {
    box-shadow: none;
  }
  
  .report-content {
    font-family: 'Arial Narrow', Arial, sans-serif;
    font-size: 12px;
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s;
  }
  
  .sidebar.show {
    transform: translateX(0);
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .charts-grid {
    grid-template-columns: 1fr;
  }
  
  .notification-panel {
    width: 100%;
  }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: var(--secondary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* ===== PENGATURAN PRINTER ===== */
.printer-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}

.printer-hint {
  display: block;
  font-size: 11px;
  color: #64748b;
  margin-top: 4px;
  line-height: 1.45;
}

.printer-card {
  background: #ffffff;
}

body.theme-dark .printer-card {
  background: #1e293b;
  border-color: #334155 !important;
}

body.theme-dark .printer-card h3,
body.theme-dark .printer-label {
  color: #f1f5f9 !important;
}

body.theme-dark .printer-card p {
  color: #94a3b8 !important;
}

body.theme-dark #report-layout-preview {
  background: #0f172a;
  border-color: #334155;
  color: #e2e8f0;
}

body.theme-pink .printer-card {
  background: #fff;
}

body.theme-pink #report-layout-preview {
  background: #fff;
}

/* ===== SIMPLE LIST LAYOUT (grid menyatu dengan halaman) ===== */
.list-page {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 136px);
  min-height: 520px;
  background: transparent;
  border: none;
  box-shadow: none;
  font-size: 13px;
  color: #1e293b;
  overflow: hidden;
}

.list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  flex-shrink: 0;
}

.list-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.list-header .subtitle {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

.list-filter {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  padding: 8px 16px;
  flex-shrink: 0;
}

.list-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
}

.list-field {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.list-field label {
  font-size: 12px;
  color: #475569;
  font-weight: 600;
}

.list-label {
  font-size: 12px;
  color: #475569;
  font-weight: 600;
  margin-right: 6px;
}

.list-input,
.list-select {
  height: 28px;
  padding: 0 10px;
  font-family: inherit;
  font-size: 13px;
  color: #1e293b;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  outline: none;
}

.list-input:focus,
.list-select:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.list-input[type="text"] { min-width: 200px; }

.list-radio-group {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.list-radio-group label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  font-size: 12px;
  color: #475569;
}

.list-radio-group input[type="radio"] {
  margin: 0;
  accent-color: #4f46e5;
}

.list-count {
  font-size: 12px;
  color: #64748b;
  margin-top: 6px;
}

.list-count strong {
  color: #0f172a;
  font-weight: 700;
}

.list-table-wrap {
  flex: 1;
  overflow: auto;
  background: #ffffff;
  min-height: 120px;
}

table.list-grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-family: inherit;
}

table.list-grid thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f1f5f9;
  color: #334155;
  font-weight: 600;
  font-size: 12px;
  text-align: left;
  padding: 8px 10px;
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
  user-select: none;
}

table.list-grid thead th.sortable { cursor: pointer; }

table.list-grid tbody td {
  padding: 8px 10px;
  border-bottom: 1px solid #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #334155;
}

/* Badge di dalam sel tabel (override .badge global yang position:absolute) */
table.list-grid tbody td .badge {
  position: static;
  display: inline-block;
  background: #e2e8f0;
  color: #334155;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
}

table.list-grid tbody td .badge.success { background: #d1fae5; color: #047857; }
table.list-grid tbody td .badge.warning { background: #fef3c7; color: #b45309; }
table.list-grid tbody td .badge.danger  { background: #fee2e2; color: #b91c1c; }
table.list-grid tbody td .badge.info    { background: #dbeafe; color: #1d4ed8; }
table.list-grid tbody td .badge.secondary { background: #e2e8f0; color: #475569; }

body.theme-dark table.list-grid tbody td .badge { color: #0f172a; }
body.theme-pink table.list-grid tbody td .badge { color: #0f172a; }

table.list-grid tbody tr {
  transition: background 0.15s;
}

table.list-grid tbody tr:nth-child(even) {
  background: #f8fafc;
}

table.list-grid tbody tr:hover {
  background: #eef2ff;
}

table.list-grid tbody tr.selected {
  background: #dbeafe;
}

table.list-grid td.rownum,
table.list-grid th.rownum {
  width: 42px;
  min-width: 42px;
  text-align: right;
  color: #64748b;
  font-variant-numeric: tabular-nums;
  position: sticky;
  left: 0;
  z-index: 1;
  background: #f8fafc;
  border-right: 1px solid #e2e8f0;
}

table.list-grid thead th.rownum { z-index: 3; background: #f1f5f9; }

table.list-grid td.num,
table.list-grid th.num { text-align: right; font-variant-numeric: tabular-nums; }

table.list-grid td.center,
table.list-grid th.center { text-align: center; }

table.list-grid td.list-empty {
  text-align: center;
  padding: 24px;
  color: #94a3b8;
  font-style: italic;
}

table.list-grid .mini-btn {
  padding: 4px 10px;
  height: auto;
  font-size: 12px;
  font-family: inherit;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  cursor: pointer;
  border-radius: 4px;
}

table.list-grid .mini-btn:hover { background: #f1f5f9; border-color: #94a3b8; }

.list-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.list-footer .spacer { flex: 1 1 20px; }

.list-btn {
  height: 30px;
  padding: 0 14px;
  font-family: inherit;
  font-size: 13px;
  color: #334155;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}

.list-btn:hover:not(:disabled) { background: #f1f5f9; border-color: #94a3b8; }
.list-btn:active:not(:disabled) { background: #e2e8f0; }
.list-btn:disabled { color: #94a3b3; cursor: default; }

.list-btn.primary {
  background: #4f46e5;
  color: #fff;
  border-color: #4f46e5;
}

.list-btn.primary:hover:not(:disabled) { background: #4338ca; }

/* Tombol preset periode pada filter laporan */
.report-range-btn {
  height: 28px;
  padding: 0 11px;
  font-size: 12px;
}

.report-range-btn.active {
  background: #4f46e5;
  color: #fff;
  border-color: #4f46e5;
  font-weight: 600;
}

.report-range-btn.active:hover:not(:disabled) { background: #4338ca; }

body.theme-dark .list-btn {
  background: #0f172a;
  color: #cbd5e1;
  border-color: #334155;
}

body.theme-dark .list-btn:hover:not(:disabled) { background: #1e293b; border-color: #475569; }

body.theme-dark .report-range-btn.active {
  background: #4f46e5;
  color: #fff;
  border-color: #4f46e5;
}

.list-page-info {
  min-width: 56px;
  text-align: center;
  font-size: 12px;
  padding: 0 6px;
  color: #475569;
  font-variant-numeric: tabular-nums;
}

.list-footer-sep {
  width: 1px;
  height: 20px;
  background: #cbd5e1;
  margin: 0 6px;
}

.list-hint {
  font-size: 11px;
  color: #94a3b8;
  padding-left: 6px;
}

/* Reports simple layout */
.list-report-layout {
  display: flex;
  flex: 1;
  min-height: 0;
  width: 100%;
}

.list-report-sidebar {
  width: 250px;
  flex-shrink: 0;
  overflow: auto;
  background: #f8fafc;
  border-right: 1px solid #e2e8f0;
  padding: 8px;
}

.list-report-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #334155;
}

.list-report-item:hover { background: #eef2ff; border-color: #c7d2fe; }
.list-report-item.active { background: #4f46e5; color: #fff; border-color: #4f46e5; }
.list-report-item i { width: 16px; text-align: center; font-size: 14px; }

.list-report-main {
  flex: 1 1 auto;
  min-width: 0;
  overflow: auto;
  background: #ffffff;
  padding: 16px 20px;
}

/* Empty state laporan */
.report-empty-state {
  padding: 50px 30px;
  text-align: center;
  color: #64748b;
}

.report-empty-state i {
  font-size: 42px;
  color: #cbd5e1;
  display: block;
  margin-bottom: 12px;
}

.report-empty-state p {
  margin: 0;
  font-size: 13.5px;
}

.report-empty-state strong {
  color: var(--primary);
}

.list-report-main .report-preview {
  display: block;
  margin: 0;
  box-shadow: none;
  border: none;
  background: #fff;
}

.list-report-main .report-header {
  padding-bottom: 12px;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.list-report-main .report-content {
  box-shadow: none;
  border: none;
  padding: 0;
}

@media print {
  .list-page { height: auto; border: none; box-shadow: none; background: #fff; }
  .list-header, .list-filter, .list-footer { display: none !important; }
  .list-table-wrap { overflow: visible; border: none; }
}
/* ===== PENJUALAN KASIR (POS) ===== */
.pos-topbar {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 12px;
  flex-wrap: wrap;
  padding: 8px 10px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 8px;
}
.pos-topbar-left { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.pos-field { display: flex; flex-direction: column; gap: 2px; }
.pos-field label { font-size: 10.5px; color: #475569; font-weight: 600; }
.pos-field-grow { flex: 1; min-width: 260px; }
.pos-readonly { background: #e2e8f0 !important; }
.pos-totalbox {
  display: flex; flex-direction: column; justify-content: center; align-items: flex-end;
  border: 2px solid #111827; border-radius: 8px; padding: 6px 16px; background: #fff;
}
.pos-total-label { font-size: 10px; letter-spacing: 2px; color: #475569; font-weight: 700; }
.pos-total-value { font-size: 30px; font-weight: 800; font-family: 'Arial Narrow', Arial, sans-serif; line-height: 1.1; }
.pos-quickadd { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 10px; }
.pos-cart-wrap { max-height: 360px; overflow: auto; border: 1px solid #d1d5db; border-radius: 6px; }
.pos-cart tbody tr:hover { background: #f8fafc; }
.pos-cart input[type="number"] { padding: 4px 6px; }
.pos-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 10px 0; }
.pos-bottom-left, .pos-bottom-right { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-end; }
.pos-num { width: 140px; text-align: right; }
.pos-check { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #334155; cursor: pointer; user-select: none; }
.pos-empty-row .classic-empty { text-align: center; color: #94a3b8; padding: 24px; }
@media (max-width: 1100px) {
  .pos-totalbox { align-items: flex-start; }
  .pos-total-value { font-size: 24px; }
  .pos-bottom { flex-direction: column; }
}

/* ===== MULTI SATUAN ITEM ===== */
.item-units-box { border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px 10px; background: #f8fafc; margin-top: 8px; }
.item-units-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.item-units-header label { font-size: 11px; font-weight: 700; color: #334155; margin: 0; }
.item-units-header small { color: #64748b; font-weight: 400; }
.item-units-wrap { overflow-x: auto; }
.item-units-table { width: 100%; }
.item-units-table th, .item-units-table td { padding: 4px 6px; font-size: 12px; }
.item-units-table select, .item-units-table input { width: 100%; font-size: 12px; padding: 4px 6px; }
.items-inline {
  width: 90px; padding: 4px 6px; text-align: right; font-size: 12px;
  border: 1px solid transparent; border-radius: 4px; background: transparent;
}
.items-inline:hover, .items-inline:focus { border-color: #94a3b8; background: #fff; outline: none; }
.items-inline.locked-cell { background: transparent; border-color: transparent; cursor: not-allowed; }
.item-units-default-radio { width: 16px; height: 16px; cursor: pointer; }

/* ===== MULTI SATUAN DI DAFTAR ITEM ===== */
.items-subrow { background: #f8faff; }
.items-subrow td { color: #334155; }
.items-subrow .rownum { color: #94a3b8; font-weight: 400; }

/* ===== RESIZE KOLOM GRID (semua daftar) ===== */
table.list-grid { table-layout: fixed; }
table.list-grid thead th, table.list-grid tbody td { overflow: hidden; text-overflow: ellipsis; }
table.list-grid thead th { position: sticky; }
.col-resizer {
  position: absolute; top: 0; right: -3px; width: 7px; height: 100%;
  cursor: col-resize; z-index: 4; user-select: none; border-radius: 2px;
}
.col-resizer:hover, .col-resizer.resizing { background: rgba(79, 70, 229, .35); }

/* ===== DAFTAR ITEM: rata kiri semua kolom ===== */
#items-table th, #items-table td,
#items-table th.num, #items-table td.num,
#items-table th.center, #items-table td.center { text-align: left !important; }

/* ===== TEMA GELAP: perbaikan kontras ===== */
body.theme-dark .license-info { background: #0f172a; border: 1px solid #334155; color: #e2e8f0; }
body.theme-dark .license-info p, body.theme-dark .license-info span { color: #e2e8f0; }
body.theme-dark .license-info #license-status { color: #fbbf24; font-weight: 700; }
body.theme-dark .form-hint { color: #94a3b8; }
body.theme-dark .label-optional { color: #cbd5e1; }
body.theme-dark .theme-card { background: #1e293b; border-color: #3b4a63; }
body.theme-dark .theme-card:hover { border-color: #6366f1; }
body.theme-dark .list-btn:hover { background: #3b4a63; }
body.theme-dark .settings-tab:not(.active) { color: #cbd5e1; }
body.theme-dark .settings-tab:not(.active):hover { background: #334155; color: #f1f5f9; }
body.theme-dark .item-units-box { background: #0f172a; border-color: #334155; }
body.theme-dark .item-units-header label { color: #e2e8f0; }
body.theme-dark .item-units-header small { color: #94a3b8; }

/* ===== POS: autocomplete item kustom (nama di kiri, rata kiri) ===== */
.pos-item-field { position: relative; }
.pos-item-dropdown {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 70;
  max-height: 260px; overflow: auto; background: #ffffff;
  border: 1px solid #cbd5e1; border-radius: 10px;
  box-shadow: 0 10px 28px rgba(2, 6, 23, .22); padding: 4px;
}
.pos-item-option {
  display: flex; align-items: baseline; gap: 10px;
  padding: 7px 10px; border-radius: 8px; cursor: pointer; font-size: 12px;
}
.pos-item-option:hover, .pos-item-option.active { background: #eef2ff; }
.pos-item-option .pi-code { font-weight: 800; color: #1e293b; min-width: 74px; }
.pos-item-option .pi-name { flex: 1; color: #334155; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos-item-option .pi-price { color: #047857; font-weight: 700; white-space: nowrap; }
body.theme-dark .pos-item-dropdown { background: #1e293b; border-color: #334155; }
body.theme-dark .pos-item-option:hover, body.theme-dark .pos-item-option.active { background: #334155; }
body.theme-dark .pos-item-option .pi-code { color: #f1f5f9; }
body.theme-dark .pos-item-option .pi-name { color: #cbd5e1; }
body.theme-dark .pos-item-option .pi-price { color: #34d399; }

/* ===== TEMA GELAP: dashboard lengkap ===== */
body.theme-dark { --page-bg: #0f172a; }
body.theme-dark .stat-card { background: #1e293b; border-color: #334155; color: #f1f5f9; box-shadow: 0 8px 24px rgba(2, 6, 23, .45); }
body.theme-dark .stat-card:hover { box-shadow: 0 12px 28px rgba(2, 6, 23, .55); }
body.theme-dark .stat-info h3 { color: #f8fafc; }
body.theme-dark .stat-info p { color: #cbd5e1; }
body.theme-dark .chart-container { background: #1e293b; box-shadow: 0 8px 24px rgba(2, 6, 23, .45); }
body.theme-dark .chart-container h3 { color: #f1f5f9; border-bottom-color: #334155; }
body.theme-dark .alerts-section { background: #1e293b; box-shadow: 0 8px 24px rgba(2, 6, 23, .45); }
body.theme-dark .alerts-section h3 { color: #f1f5f9; }
body.theme-dark .alert-item.danger  { background: rgba(239, 68, 68, .13); border-left: 4px solid #f87171; color: #fecaca; }
body.theme-dark .alert-item.warning { background: rgba(245, 158, 11, .13); border-left: 4px solid #fbbf24; color: #fde68a; }
body.theme-dark .alert-item.info    { background: rgba(59, 130, 246, .13); border-left: 4px solid #60a5fa; color: #bfdbfe; }
body.theme-dark .alert-item h4, body.theme-dark .alert-item p { color: inherit; }
body.theme-dark .nav-submenu { background: #17203a; border-color: #334155; }
body.theme-dark .nav-item { color: #cbd5e1; }
body.theme-dark .nav-item:hover { background: #334155; color: #f1f5f9; }
body.theme-dark .nav-item.active { background: #4f46e5; color: #ffffff; }
body.theme-dark .nav-item.active i { color: #ffffff !important; }
body.theme-dark .stat-card-link .stat-card-arrow { color: #a5b4fc; }
body.theme-dark .dashboard-db-bar { background: #0c4a6e; border-color: #075985; color: #bae6fd; }

/* ===== POS: blok DIBAYAR / KEMBALI di atas (samping TOTAL) ===== */
.pos-topbar-right { display: flex; gap: 10px; align-items: stretch; }
.pos-paybox {
  display: flex; flex-direction: column; justify-content: center;
  border: 2px solid #047857; border-radius: 8px;
  background: #ecfdf5; padding: 6px 14px; min-width: 190px;
}
.pos-paybox-row { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; }
.pos-paybox-row.change { border-top: 1px dashed #10b981; margin-top: 4px; padding-top: 4px; }
.pos-paybox-label { font-size: 10px; letter-spacing: 1.5px; font-weight: 800; color: #065f46; }
.pos-paybox-value { font-family: 'Arial Narrow', Arial, sans-serif; font-weight: 800; font-size: 17px; white-space: nowrap; }
.pos-paid-color { color: #0f766e; }
.pos-change-color { color: #047857; }
body.theme-dark .pos-paybox { background: #052e22; border-color: #10b981; }
body.theme-dark .pos-paybox-label { color: #6ee7b7; }
body.theme-dark .pos-paid-color, body.theme-dark .pos-change-color { color: #34d399; }
body.theme-dark .pos-paybox-row.change { border-top-color: #10b981; }
@media (max-width: 900px) {
  .pos-topbar-right { flex-direction: column; }
}

/* ===== Notifikasi Perubahan Harga Beli (Purchase Variance) ===== */
.purchase-price-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 8px;
  font-size: 11.5px; font-weight: 700; line-height: 1.35;
  border: 1px solid transparent;
}
.purchase-price-badge.up   { background: #fef2f2; color: #dc2626; border-color: #fecaca; }
.purchase-price-badge.down { background: #f0fdf4; color: #16a34a; border-color: #bbf7d0; }
.purchase-price-badge i { font-size: 12px; }

.purchase-alert-panel {
  border: 1.5px solid #f59e0b; border-radius: 10px;
  background: #fffbeb; padding: 10px 14px; margin-top: 10px;
}
.purchase-alert-panel-title {
  display: flex; align-items: center; gap: 8px;
  font-weight: 800; font-size: 13px; color: #92400e; margin-bottom: 8px;
}
.purchase-alert-panel-row {
  display: flex; gap: 10px; align-items: center;
  background: #ffffff; border: 1px solid #fde68a; border-radius: 8px;
  padding: 7px 10px; margin-top: 6px; font-size: 12px;
}
.purchase-alert-panel-row.up   { border-left: 4px solid #dc2626; }
.purchase-alert-panel-row.down { border-left: 4px solid #16a34a; }
.purchase-alert-panel-row .pap-icon { font-size: 16px; }
.purchase-alert-panel-row.up .pap-icon { color: #dc2626; }
.purchase-alert-panel-row.down .pap-icon { color: #16a34a; }
.purchase-alert-panel-row .pap-info { min-width: 0; }
.purchase-alert-panel-row .pap-item { font-weight: 700; color: #1f2937; }
.purchase-alert-panel-row .pap-detail { color: #374151; }

body.theme-dark .purchase-price-badge.up   { background: rgba(239, 68, 68, .16); color: #fca5a5; border-color: #7f1d1d; }
body.theme-dark .purchase-price-badge.down { background: rgba(34, 197, 94, .13); color: #86efac; border-color: #14532d; }
body.theme-dark .purchase-alert-panel { background: #2b2103; border-color: #b45309; }
body.theme-dark .purchase-alert-panel-title { color: #fcd34d; }
body.theme-dark .purchase-alert-panel-row { background: #1e293b; border-color: #3b4a63; }
body.theme-dark .purchase-alert-panel-row.up { border-left-color: #f87171; }
body.theme-dark .purchase-alert-panel-row.down { border-left-color: #34d399; }
body.theme-dark .purchase-alert-panel-row .pap-item { color: #f1f5f9; }
body.theme-dark .purchase-alert-panel-row .pap-detail { color: #cbd5e1; }
body.theme-dark .purchase-alert-panel-row.up .pap-icon { color: #f87171; }
body.theme-dark .purchase-alert-panel-row.down .pap-icon { color: #34d399; }

/* ===== Backup Otomatis (Pengaturan > Database) ===== */
.auto-backup-card { margin-bottom: 20px; padding: 16px; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; box-shadow: 0 2px 8px rgba(15,23,42,.05); }
.auto-backup-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 14px; }
.auto-backup-head h4 i { color: #f97316; }
.auto-backup-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.auto-field { display: flex; flex-direction: column; gap: 6px; }
.auto-field label { font-size: 11px; font-weight: 700; color: #1e3a8a; letter-spacing: .3px; }
.auto-field input[type=time] { padding: 8px 10px; border: 1.5px solid #e2e8f0; border-radius: 8px; font-size: 15px; font-family: inherit; background: #fbfdff; min-width: 140px; }
.auto-field input[type=time]:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.auto-field small { color: #64748b; font-size: 10.5px; }
.auto-actions { flex-direction: row; gap: 8px; flex-wrap: wrap; }
.auto-actions .btn { white-space: nowrap; }
.auto-toggle { position: relative; display: inline-block; width: 52px; height: 28px; flex-shrink: 0; }
.auto-toggle input { opacity: 0; width: 0; height: 0; }
.auto-slider { position: absolute; cursor: pointer; inset: 0; background: #cbd5e1; border-radius: 28px; transition: .25s; }
.auto-slider::before { content: ""; position: absolute; height: 20px; width: 20px; left: 4px; top: 4px; background: #fff; border-radius: 50%; transition: .25s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.auto-toggle input:checked + .auto-slider { background: #16a34a; }
.auto-toggle input:checked + .auto-slider::before { transform: translateX(24px); }
.auto-backup-info { margin-top: 14px; border-top: 1px dashed #e2e8f0; padding-top: 12px; font-size: 12px; color: #334155; }
.auto-info-grid { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-bottom: 8px; }
.auto-info-label { color: #64748b; }
.auto-backup-note { font-size: 10.5px; color: #64748b; margin: 6px 0 0; }
.auto-backup-note code { background: #f1f5f9; padding: 1px 5px; border-radius: 4px; }
.auto-backup-msg { display: none; margin-top: 10px; padding: 9px 12px; border-radius: 8px; font-size: 12px; font-weight: 600; }
.auto-backup-msg.show { display: block; }
.auto-backup-msg.ok { background: #f0fdf4; border: 1px solid #86efac; color: #15803d; }
.auto-backup-msg.err { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }

body.theme-dark .auto-backup-card { background: #1e293b; border-color: #334155; }
body.theme-dark .auto-backup-head h4 { color: #f1f5f9; }
body.theme-dark .auto-backup-head h4 i { color: #fb923c; }
body.theme-dark .auto-backup-head p { color: #94a3b8 !important; }
body.theme-dark .auto-field label { color: #cbd5e1; }
body.theme-dark .auto-field input[type=time] { background: #0f172a; border-color: #334155; color: #f1f5f9; color-scheme: dark; }
body.theme-dark .auto-backup-info { border-top-color: #334155; color: #cbd5e1; }
body.theme-dark .auto-backup-note { color: #94a3b8; }
body.theme-dark .auto-backup-note code { background: #0f172a; color: #e2e8f0; }

/* ===== Peringatan Lisensi Hampir Berakhir ===== */
.license-expiry-header {
  background: linear-gradient(135deg, #b91c1c, #dc2626);
  color: #fff;
  border-radius: 12px 12px 0 0;
  margin: -20px -20px 16px;
  padding: 14px 18px;
}
.license-expiry-header h3 { color: #fff; font-size: 17px; display: flex; align-items: center; gap: 10px; margin: 0; }
.license-expiry-header button { color: rgba(255,255,255,.9); background: transparent; border: none; font-size: 22px; cursor: pointer; line-height: 1; }
.license-expiry-header button:hover { color: #fff; }
.expiry-warning-icon {
  width: 84px; height: 84px; border-radius: 50%;
  background: #fee2e2; color: #dc2626;
  display: flex; align-items: center; justify-content: center;
  margin: 4px auto 12px; font-size: 38px;
  animation: pulse 1.2s infinite;
}
body.theme-dark .license-expiry-header { background: linear-gradient(135deg, #7f1d1d, #b91c1c); }
body.theme-dark .expiry-warning-icon { background: #451414; color: #f87171; }

/* ===== Perpanjang Kontrak ===== */
.renew-info {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 12px;
}
.renew-info-row { display: flex; justify-content: space-between; gap: 16px; padding: 4px 0; border-bottom: 1px dotted #cbd5e1; }
.renew-info-row:last-child { border-bottom: none; }
.renew-info-row span { color: #64748b; }
.renew-info-row b { color: #0f1f3d; text-align: right; }
body.theme-dark .renew-info { background: #1e293b; border-color: #334155; }
body.theme-dark .renew-info-row span { color: #94a3b8; }
body.theme-dark .renew-info-row b { color: #f1f5f9; }

/* ===== Pengaturan QRIS (toko) ===== */
.qris-settings-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-left: 5px solid #f97316;
  border-radius: 12px;
  padding: 16px 18px;
  margin: 16px 0;
}
.qris-upload-row { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.qris-preview-img {
  width: 200px; height: 200px; object-fit: contain;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;
  box-shadow: 0 2px 8px rgba(15,23,42,.08);
}
.qris-upload-actions { display: flex; flex-direction: column; gap: 12px; min-width: 220px; }
.qris-upload-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
body.theme-dark .qris-settings-card { background: #1e293b; border-color: #334155; }
body.theme-dark .qris-preview-img { background: #0f172a; border-color: #334155; }

/* ===== Edit Penjualan Kasir ===== */
.sale-edit-items-wrap { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 10px; }
.sale-edit-items-wrap select.item-select,
.sale-edit-items-wrap .input-sm { width: 100%; }
.sale-edit-items-wrap td { vertical-align: middle; }
.sale-edit-items-wrap .money-input, .sale-edit-items-wrap input { font-size: 12.5px; }
.sale-edit-summary {
  display: flex; justify-content: flex-end; gap: 26px; flex-wrap: wrap;
  margin-top: 12px; padding: 10px 14px;
  background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 10px;
  font-size: 13px; color: #1e3a8a;
}
.sale-edit-summary b { font-family: Consolas, monospace; }
body.theme-dark .sale-edit-items-wrap { background: #1e293b; border-color: #334155; }
body.theme-dark .sale-edit-summary { background: #172554; border-color: #1e3a8a; color: #bfdbfe; }

/* ===== Super Admin & Impersonation ===== */
.impersonate-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 8px 14px;
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
  color: #111827;
  font-size: 13px;
  border-bottom: 2px solid #d97706;
  z-index: 20;
}
.super-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.super-stat-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-left: 4px solid #4f46e5;
  border-radius: 10px;
  padding: 12px 14px;
}
.super-stat-card .label { font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: #64748b; }
.super-stat-card .value { font-size: 22px; font-weight: 800; color: #1e293b; }
.super-admin-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.btn-tiny { padding: 4px 10px !important; font-size: 11px !important; }
