/* ================================================================
   Arjuna Computer & Design - POS & Kasir System Styles
   Theme: Light Tech Modern (Terang, Cyber Blueprint Grid, Cyan & Electric Blue Glow, Frosted Glass)
   ================================================================ */
:root {
  /* Brand Palettes - Light Tech Theme */
  --brand-blue: #0284c7;
  --brand-cyan: #00b4d8;
  --brand-cyan-light: rgba(0, 180, 216, 0.12);
  --brand-cyan-glow: rgba(6, 182, 212, 0.25);
  --brand-electric: #2563eb;
  --brand-navy: #0f172a;
  --brand-surface: #ffffff;
  --brand-card: rgba(255, 255, 255, 0.88);
  --brand-card-inner: #f8fafc;
  --brand-orange: #ea580c;
  --brand-accent: #f97316;

  /* Theme standard variables */
  --primary: #0284c7;
  --primary-dark: #0369a1;
  --primary-light: rgba(2, 132, 199, 0.12);
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;

  /* Surfaces & Backgrounds - Clean Tech Frosted */
  --bg: #f8fafc;
  --card: rgba(255, 255, 255, 0.88);
  --card-elevated: #ffffff;
  --border: rgba(2, 132, 199, 0.22);
  --border-subtle: rgba(226, 232, 240, 0.95);

  /* Typography - High Contrast Sharp */
  --text: #0f172a;
  --text-sub: #475569;
  --text-muted: #64748b;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 10px 30px -5px rgba(2, 132, 199, 0.08), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
  --shadow-glow: 0 0 25px rgba(6, 182, 212, 0.22);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #f8fafc;
  color: var(--text);
  font-size: 14px;
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  /* Cyber Blueprint Grid (36px) & Ambient Lighting (Cyan & Electric Blue) */
  background-image: 
    radial-gradient(at 0% 0%, rgba(2, 132, 199, 0.08) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(37, 99, 235, 0.07) 0px, transparent 50%),
    radial-gradient(at 50% 50%, rgba(6, 182, 212, 0.04) 0px, transparent 60%),
    linear-gradient(rgba(2, 132, 199, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(2, 132, 199, 0.035) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 100% 100%, 36px 36px, 36px 36px;
}

.font-heading {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  letter-spacing: -0.3px;
}

/* ====== LOGIN OVERLAY ====== */
.login-overlay {
  position: fixed; inset: 0;
  background: radial-gradient(circle at 50% 25%, rgba(6, 182, 212, 0.14) 0%, rgba(248, 250, 252, 0.95) 75%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center; z-index: 9999;
  padding: 16px;
  background-image: 
    radial-gradient(circle at 50% 20%, rgba(2, 132, 199, 0.12) 0%, transparent 60%),
    linear-gradient(rgba(2, 132, 199, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(2, 132, 199, 0.04) 1px, transparent 1px);
  background-size: 100% 100%, 36px 36px, 36px 36px;
}
.login-box {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(2, 132, 199, 0.35);
  border-radius: 20px;
  padding: 36px 32px;
  width: 100%; max-width: 410px;
  box-shadow: 0 25px 60px rgba(2, 132, 199, 0.12), var(--shadow-glow);
  text-align: center;
}
.login-logo { text-align: center; margin-bottom: 8px; }
.login-box h1 {
  color: #0f172a; font-size: 26px; font-weight: 800;
  letter-spacing: 1px; margin-bottom: 2px;
}
.login-box .subtitle {
  color: #0284c7; font-size: 13.5px; font-weight: 700; letter-spacing: 0.5px; margin-bottom: 2px;
}
.login-box .subtitle-sub {
  color: #64748b; font-size: 11.5px; margin-bottom: 22px;
}
.login-box label {
  display: block; text-align: left; font-size: 11px; font-weight: 700;
  color: #475569; text-transform: uppercase; letter-spacing: 0.5px; margin: 14px 0 5px;
}
.login-box input {
  width: 100%; padding: 12px 14px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px; font-size: 14px; color: #0f172a;
  transition: all 0.2s;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.04);
}
.login-box input:focus {
  border-color: #0284c7; outline: none;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.2), 0 0 15px rgba(6, 182, 212, 0.2);
}
.login-box button {
  width: 100%; padding: 13px; margin-top: 20px;
  background: linear-gradient(135deg, #0284c7 0%, #00b4d8 50%, #2563eb 100%);
  color: white; border: none; border-radius: 10px;
  font-size: 15px; font-weight: 700; cursor: pointer;
  box-shadow: 0 4px 18px rgba(2, 132, 199, 0.35);
  transition: all 0.2s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.login-box button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(2, 132, 199, 0.5);
  filter: brightness(1.08);
}
.login-box button:active { transform: translateY(0); }
.login-box .link-back-web {
  color: #64748b; font-size: 12px; text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
  transition: color 0.2s;
}
.login-box .link-back-web:hover { color: #0284c7; }
.login-error {
  color: #b91c1c; font-size: 12px; margin-top: 10px; padding: 10px 14px;
  background: #fef2f2; border: 1px solid #fecaca;
  border-radius: 8px; display: none; font-weight: 600; text-align: left;
}
.login-error.show { display: block; }

/* ====== APP HEADER (BRAND IDENTITY & STATUS) ====== */
.app-header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(2, 132, 199, 0.2);
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
  position: sticky; top: 0; z-index: 220;
  padding: 8px 16px;
}
.header-container {
  max-width: 1400px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px;
}
.brand-left { display: flex; align-items: center; gap: 12px; }
.brand-link {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: inherit;
}
.brand-logo-img {
  height: 40px; max-width: 140px;
  object-fit: contain; filter: drop-shadow(0 2px 6px rgba(2, 132, 199, 0.25));
}
.brand-titles { display: flex; flex-direction: column; gap: 1px; }
.brand-name {
  font-size: 15px; font-weight: 800; color: #0f172a;
  letter-spacing: 0.5px; line-height: 1.2;
}
.brand-subtitle {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--text-sub);
}
.badge-role {
  background: rgba(2, 132, 199, 0.1);
  border: 1px solid rgba(2, 132, 199, 0.3);
  color: #0284c7;
  font-size: 9.5px; font-weight: 800;
  padding: 1px 6px; border-radius: 4px;
  letter-spacing: 0.5px;
}
.tagline-text { color: var(--text-sub); font-size: 11px; }

.header-right {
  display: flex; align-items: center; gap: 10px;
}
.status-indicator {
  display: flex; align-items: center; gap: 7px;
  background: rgba(241, 245, 249, 0.9);
  border: 1px solid rgba(2, 132, 199, 0.22);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 11.5px; font-weight: 600;
  color: #334155;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.05);
}
.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #64748b; flex-shrink: 0;
  box-shadow: 0 0 8px currentColor;
}
.status-dot.online { background: #10b981; color: #10b981; }
.status-dot.offline { background: #ef4444; color: #ef4444; }
.status-dot.syncing { background: #f59e0b; color: #f59e0b; animation: pulse 1s infinite; }

.user-chip {
  display: flex; align-items: center; gap: 8px;
  background: rgba(241, 245, 249, 0.9);
  border: 1px solid rgba(2, 132, 199, 0.22);
  border-radius: 20px; padding: 4px 10px 4px 6px;
}
.avatar {
  width: 24px; height: 24px; border-radius: 50%;
  background: linear-gradient(135deg, #0284c7, #00b4d8);
  color: white; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 11px;
  box-shadow: 0 0 10px rgba(2, 132, 199, 0.3);
}
.user-name { font-size: 12px; font-weight: 700; color: #0f172a; }
.btn-logout {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #ef4444; border-radius: 14px;
  padding: 3px 8px; font-size: 11px; font-weight: 600;
  cursor: pointer; display: inline-flex; align-items: center; gap: 4px;
  transition: all 0.2s;
}
.btn-logout:hover {
  background: #ef4444; color: white; border-color: #ef4444;
}

.btn-website-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  background: rgba(2, 132, 199, 0.1);
  border: 1px solid rgba(2, 132, 199, 0.35);
  color: #0284c7; text-decoration: none;
  border-radius: 20px; font-size: 12px; font-weight: 700;
  transition: all 0.2s;
}
.btn-website-link:hover {
  background: #0284c7; color: #ffffff;
  box-shadow: 0 0 15px rgba(2, 132, 199, 0.35);
  transform: translateY(-1px);
}

/* Fallback class for legacy JS status bar queries */
.status-bar { display: none; }

/* ====== RUNNING TEXT BANNER (MARQUEE) ====== */
.running-banner {
  background: rgba(248, 250, 252, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(2, 132, 199, 0.18);
  display: flex; align-items: center;
  height: 36px; overflow: hidden;
  position: relative; z-index: 215;
}
.banner-badge {
  display: flex; align-items: center; gap: 7px;
  background: rgba(2, 132, 199, 0.1);
  border-right: 1px solid rgba(2, 132, 199, 0.25);
  color: #0284c7;
  font-size: 11px; font-weight: 800; letter-spacing: 0.6px;
  padding: 0 14px; height: 100%;
  white-space: nowrap; flex-shrink: 0; z-index: 2;
}
.pulse-beacon {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--brand-orange);
  box-shadow: 0 0 10px var(--brand-orange);
  animation: pulseBeacon 1.5s infinite;
}
@keyframes pulseBeacon {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 14px var(--brand-orange); }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.marquee-wrapper {
  flex: 1; overflow: hidden;
  position: relative; display: flex; align-items: center;
  height: 100%;
}
.marquee-track {
  display: inline-flex; white-space: nowrap;
  animation: marqueeScroll 45s linear infinite;
}
.running-banner:hover .marquee-track {
  animation-play-state: paused;
}
@keyframes marqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.marquee-text {
  display: inline-flex; align-items: center; gap: 14px;
  color: #475569; font-size: 12.5px; padding-left: 20px;
}
.marquee-text strong { color: #0f172a; }
.ticker-dot {
  color: #0284c7; font-weight: 900; opacity: 0.8;
}

/* ====== TAB NAVIGATION ====== */
.tab-nav {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(2, 132, 199, 0.2);
  display: flex; overflow-x: auto;
  position: sticky; top: 54px; z-index: 210;
  scrollbar-width: none;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
  padding: 0 12px;
}
.tab-nav::-webkit-scrollbar { display: none; }
.tab {
  padding: 12px 18px; border: none; background: none; cursor: pointer;
  color: var(--text-sub); font-size: 13px; white-space: nowrap; font-weight: 600;
  border-bottom: 2.5px solid transparent; margin-bottom: -1px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex; align-items: center; gap: 8px;
}
.tab i { font-size: 14px; }
.tab.active {
  color: #0284c7;
  border-bottom-color: #0284c7;
  background: rgba(2, 132, 199, 0.08);
  font-weight: 700;
}
.tab:hover:not(.active) {
  color: #0f172a;
  background: rgba(2, 132, 199, 0.04);
}
.badge {
  display: inline-block;
  background: var(--brand-orange);
  color: #ffffff;
  border-radius: 10px; padding: 1px 7px;
  font-size: 10px; margin-left: 4px; font-weight: 800;
  box-shadow: 0 0 8px rgba(234, 88, 12, 0.3);
}

/* ====== TAB CONTENT ====== */
.tab-content { display: none; padding: 18px; max-width: 1400px; margin: 0 auto; }
.tab-content.active { display: block; animation: fadeIn 0.25s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* ====== PAGE HEADER ====== */
.page-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px; flex-wrap: wrap; gap: 10px;
}
.page-header h2 {
  font-size: 18px; font-weight: 800; color: #0f172a;
  display: flex; align-items: center; gap: 8px;
}
.periode-select {
  padding: 8px 14px;
  background: #ffffff;
  border: 1.5px solid rgba(2, 132, 199, 0.25);
  border-radius: 8px; font-size: 13px; color: #0f172a;
  transition: border-color 0.2s;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.04);
}
.periode-select:focus { border-color: var(--primary); outline: none; }

/* ====== KASIR LAYOUT ====== */
.kasir-layout {
  display: grid; grid-template-columns: 1fr; gap: 16px;
  margin: 0 auto;
}
@media (min-width: 920px) {
  .kasir-layout { grid-template-columns: 1.65fr 1fr; align-items: start; }
}

/* Product Panel */
.search-bar input {
  width: 100%; padding: 12px 18px;
  background: #ffffff;
  border: 1.5px solid rgba(2, 132, 199, 0.25);
  border-radius: 12px; font-size: 14px; color: #0f172a;
  transition: all 0.2s;
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.05);
}
.search-bar input::placeholder { color: var(--text-muted); }
.search-bar input:focus {
  border-color: #0284c7; outline: none;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.18), var(--shadow-glow);
}

.kategori-tabs {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 12px 0 8px; scrollbar-width: none;
}
.kategori-tabs::-webkit-scrollbar { display: none; }
.kat-btn {
  padding: 7px 16px;
  background: #ffffff;
  border: 1px solid rgba(2, 132, 199, 0.2);
  border-radius: 20px;
  cursor: pointer; font-size: 12px; white-space: nowrap; font-weight: 600;
  color: var(--text-sub); transition: all 0.2s;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.03);
}
.kat-btn.active {
  background: linear-gradient(135deg, #0284c7 0%, #00b4d8 100%);
  color: #ffffff; border-color: #0284c7;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
  font-weight: 700;
}
.kat-btn:hover:not(.active) {
  border-color: #0284c7; color: #0284c7;
  background: rgba(2, 132, 199, 0.06);
}

.produk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px; margin-top: 8px;
}
.produk-card {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 14px; padding: 14px 10px;
  cursor: pointer;
  border: 1.5px solid rgba(226, 232, 240, 0.95);
  text-align: center;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.05);
  user-select: none;
  display: flex; flex-direction: column; justify-content: space-between;
  min-height: 120px;
}
.produk-card:hover {
  border-color: #00b4d8;
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(6, 182, 212, 0.2);
  background: #ffffff;
}
.produk-card:active { transform: translateY(0); filter: brightness(0.96); }
.pc-icon { font-size: 28px; margin-bottom: 6px; line-height: 1; filter: drop-shadow(0 2px 4px rgba(2, 132, 199, 0.15)); }
.pc-nama {
  font-size: 12.5px; font-weight: 700; color: #0f172a;
  line-height: 1.35; margin-bottom: 6px;
}
.pc-harga { font-size: 13.5px; color: #0284c7; font-weight: 800; }
.pc-sat { font-size: 10px; color: var(--text-muted); }

/* Cart Panel */
.cart-panel {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 16px; padding: 18px 16px;
  box-shadow: 0 10px 30px rgba(2, 132, 199, 0.08), 0 4px 12px -2px rgba(15, 23, 42, 0.03);
  border: 1.5px solid rgba(2, 132, 199, 0.22);
}
@media (min-width: 920px) {
  .cart-panel { position: sticky; top: 98px; max-height: calc(100vh - 110px); overflow-y: auto; }
}
/* Search Bar Wrapper with Quick Manual Button */
.search-bar-wrap {
  display: flex; gap: 8px; align-items: stretch; margin-bottom: 0px;
}
.search-bar-wrap .search-bar {
  flex: 1; margin-bottom: 0;
}
.btn-manual-quick {
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
  color: #ffffff;
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 12px;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.2s;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.25);
}
.btn-manual-quick:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.4);
}

.cart-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.cart-header-left { display: flex; align-items: center; gap: 8px; }
.cart-header h3 { font-size: 15px; font-weight: 800; color: #0f172a; margin: 0; }
.btn-manual-header {
  background: rgba(2, 132, 199, 0.1);
  border: 1px solid rgba(2, 132, 199, 0.35);
  color: #0284c7;
  border-radius: 7px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
}
.btn-manual-header:hover {
  background: #0284c7;
  color: #ffffff;
  transform: translateY(-1px);
}
.nota-no-display { font-size: 11px; color: #0284c7; font-family: monospace; font-weight: 700; }
.cart-empty { text-align: center; color: var(--text-muted); padding: 28px 16px; font-size: 13px; line-height: 1.8; }
.cart-item {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 0; border-bottom: 1px solid #f1f5f9;
}
.ci-info { flex: 1; min-width: 0; }
.ci-nama { font-size: 13px; font-weight: 700; color: #0f172a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci-harga { font-size: 11px; color: var(--text-sub); margin-top: 1px; }
.ci-qty { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.qty-btn {
  width: 26px; height: 26px;
  border: 1px solid rgba(2, 132, 199, 0.3);
  border-radius: 6px; background: #f8fafc;
  cursor: pointer; font-size: 14px; color: #0f172a;
  display: flex; align-items: center; justify-content: center; font-weight: bold;
  transition: all 0.15s;
}
.qty-btn:hover { background: #0284c7; color: #ffffff; border-color: #0284c7; }
.qty-val {
  min-width: 26px; text-align: center; font-weight: 700; font-size: 13px; color: #0f172a;
  cursor: pointer; padding: 2px 4px; border-radius: 4px; transition: background 0.15s;
}
.qty-val:hover { background: rgba(2, 132, 199, 0.15); color: #0284c7; }
.ci-sub { font-size: 12.5px; font-weight: 800; color: #0284c7; min-width: 65px; text-align: right; flex-shrink: 0; }
.ci-edit {
  color: #0284c7; cursor: pointer; font-size: 14px; padding: 2px 4px;
  border: none; background: none; flex-shrink: 0; line-height: 1;
  transition: transform 0.15s, color 0.15s;
}
.ci-edit:hover { color: #00b4d8; transform: scale(1.15); }
.ci-del {
  color: #f87171; cursor: pointer; font-size: 18px; padding: 2px 4px;
  border: none; background: none; flex-shrink: 0; line-height: 1;
  transition: color 0.15s;
}
.ci-del:hover { color: var(--danger); transform: scale(1.1); }

/* Manual Item Modal & Components */
.manual-mode-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px;
}
.manual-tab-btn {
  background: #f1f5f9;
  border: 1px solid rgba(2, 132, 199, 0.25);
  color: var(--text-sub);
  padding: 10px; border-radius: 10px;
  font-size: 12.5px; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: all 0.2s;
}
.manual-tab-btn.active {
  background: linear-gradient(135deg, #0284c7 0%, #00b4d8 100%);
  border-color: #0284c7;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.25);
}
.manual-calc-box {
  background: rgba(2, 132, 199, 0.05);
  border: 1px solid rgba(2, 132, 199, 0.25);
  border-radius: 12px; padding: 12px; margin-bottom: 12px;
}
.manual-preview-card {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.08) 0%, rgba(248, 250, 252, 0.9) 100%);
  border: 1px solid rgba(2, 132, 199, 0.3);
  border-radius: 12px; padding: 12px 14px; margin-bottom: 14px;
}
.chip-btn {
  background: #f1f5f9;
  border: 1px solid rgba(2, 132, 199, 0.25);
  color: #0284c7;
  border-radius: 6px; padding: 2px 7px;
  font-size: 10.5px; font-weight: 700;
  cursor: pointer; transition: all 0.15s;
}
.chip-btn:hover {
  background: #0284c7;
  color: #ffffff;
}

/* Section Divider */
.section-divider { height: 1px; background: rgba(2, 132, 199, 0.15); margin: 12px 0; }

/* Form Row in Cart */
.form-row { margin-bottom: 10px; }
.form-row label {
  font-size: 11px; font-weight: 700; color: var(--text-sub);
  display: block; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.4px;
}
.form-row input, .form-row select {
  width: 100%; padding: 9px 12px;
  background: #ffffff;
  border: 1.5px solid rgba(2, 132, 199, 0.25);
  border-radius: 8px; font-size: 13px; color: #0f172a;
  transition: all 0.2s;
  box-shadow: 0 1px 4px rgba(2, 132, 199, 0.04);
}
.form-row input::placeholder { color: var(--text-muted); }
.form-row input:focus, .form-row select:focus {
  border-color: #0284c7; outline: none;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.18);
}
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* Quick Cash Buttons */
.btn-uang-pas {
  background: rgba(2, 132, 199, 0.1);
  color: #0284c7;
  border: 1px solid #0284c7;
  border-radius: 4px;
  font-size: 10.5px; font-weight: 700;
  padding: 2px 7px; cursor: pointer;
  transition: all 0.15s;
}
.btn-uang-pas:hover { background: #0284c7; color: #ffffff; }
.quick-cash-row { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.qc-btn {
  flex: 1; min-width: 48px; padding: 6px 4px;
  background: #f1f5f9;
  border: 1px solid rgba(2, 132, 199, 0.22);
  border-radius: 6px; font-size: 11px; font-weight: 700;
  color: #0f172a; cursor: pointer; text-align: center;
  transition: all 0.15s;
}
.qc-btn:hover {
  background: #0284c7; color: #ffffff;
  border-color: #0284c7;
}
.qc-btn:active { transform: scale(0.96); }

/* Total Rows */
.total-rows { margin: 12px 0 8px; }
.total-row { display: flex; justify-content: space-between; padding: 4px 0; font-size: 13px; color: var(--text-sub); }
.total-row.grand {
  font-size: 18px; font-weight: 800; color: #0f172a;
  padding: 8px 0; border-top: 2px solid rgba(2, 132, 199, 0.3); margin-top: 6px;
}
.total-row.grand span:last-child {
  color: #0284c7; text-shadow: 0 0 10px rgba(6, 182, 212, 0.25);
}
.total-row.kembalian { color: var(--success); font-weight: 700; font-size: 14px; }
.total-row.sisa { color: var(--danger); font-weight: 700; font-size: 14px; }

/* Kasir Actions */
.kasir-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.kasir-actions .btn-full { grid-column: 1 / -1; }

/* ====== BUTTONS ====== */
.btn {
  padding: 10px 16px; border: none; border-radius: 10px; cursor: pointer;
  font-size: 13px; font-weight: 700; transition: all 0.2s; display: inline-flex;
  align-items: center; justify-content: center; gap: 6px; text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, #0284c7 0%, #00b4d8 50%, #2563eb 100%);
  color: white; box-shadow: 0 4px 15px rgba(2, 132, 199, 0.3);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.45);
  filter: brightness(1.06);
}
.btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white; box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}
.btn-success:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
  filter: brightness(1.06);
}
.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  color: white;
}
.btn-danger:hover { filter: brightness(1.08); }
.btn-warning {
  background: linear-gradient(135deg, var(--brand-orange) 0%, var(--brand-accent) 100%);
  color: white;
}
.btn-warning:hover { filter: brightness(1.08); }
.btn-secondary {
  background: #f1f5f9;
  color: #0f172a;
  border: 1.5px solid rgba(2, 132, 199, 0.25);
}
.btn-secondary:hover {
  background: rgba(2, 132, 199, 0.12);
  border-color: #0284c7;
}
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 8px; }
.btn-full { width: 100%; }

/* ====== PRODUK MANAGEMENT ====== */
.produk-list-item {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 12px; padding: 12px 16px;
  margin-bottom: 8px; display: flex; align-items: center; gap: 12px;
  border: 1.5px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.04);
  transition: all 0.2s;
}
.produk-list-item:hover {
  border-color: #0284c7;
  background: #ffffff;
  transform: translateX(2px);
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.1);
}
.pli-icon { font-size: 26px; flex-shrink: 0; }
.pli-info { flex: 1; min-width: 0; }
.pli-nama { font-weight: 700; font-size: 14px; color: #0f172a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pli-detail { font-size: 12px; color: var(--text-sub); margin-top: 2px; }
.pli-harga { font-weight: 800; color: #0284c7; font-size: 14px; flex-shrink: 0; text-align: right; }
.pli-actions { display: flex; gap: 6px; flex-shrink: 0; }
.kat-badge {
  display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 10px;
  background: rgba(2, 132, 199, 0.1); color: #0284c7; font-weight: 700;
  border: 1px solid rgba(2, 132, 199, 0.25);
}

/* ====== RIWAYAT ====== */
.filter-bar { display: grid; grid-template-columns: 1fr; gap: 8px; margin-bottom: 14px; }
@media (min-width: 540px) { .filter-bar { grid-template-columns: 2fr 1fr 1fr; } }
.filter-bar input, .filter-bar select {
  width: 100%; padding: 10px 14px;
  background: #ffffff;
  border: 1.5px solid rgba(2, 132, 199, 0.25);
  border-radius: 8px; font-size: 13px; color: #0f172a;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.04);
}
.filter-bar input:focus, .filter-bar select:focus { border-color: #0284c7; outline: none; }
.stats-bar {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 14px; padding: 14px 18px;
  display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 16px;
  border: 1.5px solid rgba(2, 132, 199, 0.22);
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.05);
}
.stat-item .label { font-size: 11px; color: var(--text-sub); margin-bottom: 2px; font-weight: 600; text-transform: uppercase; }
.stat-item .value { font-size: 16px; font-weight: 800; color: #0f172a; }
.history-item {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 12px; padding: 14px 16px;
  margin-bottom: 8px;
  border: 1.5px solid rgba(226, 232, 240, 0.95);
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.04);
}
.history-item:hover { border-color: #0284c7; background: #ffffff; box-shadow: 0 6px 18px rgba(2, 132, 199, 0.08); }
.hi-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px; gap: 8px; }
.hi-no { font-weight: 800; font-size: 14px; color: #0f172a; font-family: monospace; }
.hi-total { font-weight: 800; color: #0284c7; font-size: 14.5px; }
.hi-status { font-size: 11px; padding: 3px 10px; border-radius: 10px; font-weight: 700; flex-shrink: 0; }
.hi-status.lunas { background: #dcfce7; color: #16a34a; border: 1px solid #bbf7d0; }
.hi-status.hutang { background: #fee2e2; color: #dc2626; border: 1px solid #fecaca; }
.hi-detail { font-size: 12px; color: var(--text-sub); line-height: 1.7; }
.hi-actions { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }

/* ====== DASHBOARD & LAPORAN ====== */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
@media (min-width: 600px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }
.stat-card {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 14px; padding: 16px;
  border: 1.5px solid rgba(2, 132, 199, 0.2);
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.05);
}
.stat-card .label { font-size: 12px; color: var(--text-sub); margin-bottom: 6px; font-weight: 600; }
.stat-card .value { font-size: 20px; font-weight: 800; color: #0284c7; line-height: 1.2; }
.stat-card .sub { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.chart-card {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 14px; padding: 18px;
  margin-bottom: 16px;
  border: 1.5px solid rgba(2, 132, 199, 0.2);
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.05);
}
.chart-card h3 { font-size: 14px; font-weight: 700; margin-bottom: 14px; color: #0f172a; }
.chart-wrapper { height: 210px; position: relative; }

/* ====== SETTINGS ====== */
.settings-section {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 14px; padding: 20px;
  margin-bottom: 16px;
  border: 1.5px solid rgba(2, 132, 199, 0.2);
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.05);
}
.settings-section h2 {
  font-size: 15px; font-weight: 800; color: #0f172a;
  margin-bottom: 14px; padding-bottom: 10px;
  border-bottom: 1px solid rgba(2, 132, 199, 0.18);
}
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.form-field label {
  font-size: 11px; font-weight: 700; color: var(--text-sub);
  display: block; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.4px;
}
.form-field input, .form-field select {
  width: 100%; padding: 9px 12px;
  background: #ffffff;
  border: 1.5px solid rgba(2, 132, 199, 0.25);
  border-radius: 8px; font-size: 13px; color: #0f172a;
  transition: border-color 0.2s;
  box-shadow: 0 1px 4px rgba(2, 132, 199, 0.04);
}
.form-field input:focus, .form-field select:focus { border-color: #0284c7; outline: none; }
.info-text { font-size: 13px; color: var(--text-sub); line-height: 1.6; }
.theme-grid { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.theme-swatch {
  padding: 8px 14px; border-radius: 8px; cursor: pointer; color: white;
  font-size: 12px; font-weight: 700; border: 2px solid transparent; transition: all 0.2s;
}
.theme-swatch.active { border-color: white; box-shadow: 0 0 0 3px var(--primary); }
.theme-swatch:hover { transform: scale(1.05); }

/* ====== MODAL UMUM ====== */
.modal {
  display: none; position: fixed; inset: 0; z-index: 500;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  align-items: center; justify-content: center; padding: 16px;
}
.modal.show { display: flex; animation: fadeIn 0.2s ease-out; }
.modal-content {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(6, 182, 212, 0.35);
  border-radius: 18px; padding: 24px;
  width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 25px 60px rgba(2, 132, 199, 0.15), var(--shadow-glow);
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.modal-header h3 { font-size: 16px; font-weight: 800; color: #0f172a; }
.modal-close { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--text-muted); padding: 0 4px; }
.modal-close:hover { color: var(--danger); }

/* ====== NOTA MODAL (SELEBAR KERTAS A4) ====== */
.nota-modal {
  display: none; position: fixed; inset: 0; z-index: 600;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  overflow-y: auto; padding: 20px 10px;
}
.nota-modal.show { display: flex; align-items: flex-start; justify-content: center; }
.nota-modal-inner.a4-container {
  background: white; border-radius: 8px; width: 100%; max-width: 860px;
  margin: 10px auto; box-shadow: 0 25px 80px rgba(15, 23, 42, 0.25); overflow: hidden;
}
.nota-toolbar {
  padding: 12px 20px; background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(2, 132, 199, 0.25);
  box-shadow: 0 4px 15px rgba(2, 132, 199, 0.06);
  display: flex; gap: 10px; flex-wrap: wrap; justify-content: center;
}

/* ================================================================
   DESAIN NOTA FAKTUR KERTAS A4 (COMPACT & FONT AWAL MONOSPACE)
   ================================================================ */
.nota-a4 {
  background: white;
  color: #1e293b;
  padding: 5mm 24px 18px 24px;
  box-sizing: border-box;
  font-size: 11.5px;
  line-height: 1.4;
  width: 100%;
}

/* Header Kop Surat */
.a4-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.a4-brand-center-wrapper {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
}
.a4-logo-box img.nota-logo-img {
  max-width: 135px;
  max-height: 90px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}
.a4-toko-info-center {
  text-align: center;
  flex: 1;
}
.a4-toko-info-center h1 {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: 0.3px;
  line-height: 1.25;
  margin-bottom: 3px;
  text-align: center;
  white-space: nowrap;
}
.a4-bidang {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 9.5px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 2px;
  text-align: center;
  line-height: 1.3;
}
.a4-alamat, .a4-telp {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 9px;
  color: #475569;
  line-height: 1.35;
  text-align: center;
}

/* Header Kanan: Meta Transaksi & Data Konsumen (Font: Courier / Monospace - Digeser ke Kanan) */
.a4-header-right {
  width: 250px;
  min-width: 240px;
  flex-shrink: 0;
  margin-left: auto;
  text-align: left;
  font-family: 'Courier New', Courier, monospace;
}
.a4-nota-title {
  font-family: 'Courier New', Courier, monospace;
  font-size: 13px;
  font-weight: 900;
  color: #1e293b;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #0f172a;
  padding-bottom: 2px;
  margin-bottom: 4px;
}
.a4-meta-table {
  border-collapse: collapse;
  font-size: 10.5px;
  width: 100%;
  font-family: 'Courier New', Courier, monospace;
  margin-bottom: 6px;
}
.a4-meta-table td {
  padding: 1px 0;
  vertical-align: middle;
}
.a4-meta-table td.lbl {
  color: #475569;
  width: 65px;
  text-align: left;
  white-space: nowrap;
}
.a4-meta-table td.colon {
  width: 12px;
  text-align: center;
  font-weight: 700;
  color: #0f172a;
  padding: 0 1px;
}
.a4-meta-table td.val {
  text-align: left !important;
  color: #0f172a;
  padding-left: 2px;
}

/* Garis Pembatas Kop Surat */
.a4-divider-double {
  border-top: 3px double #0f172a;
  margin: 8px 0 10px;
}

/* Informasi Pelanggan (Font: Courier / Monospace - Terletak di Kanan Bawah Detail Transaksi) */
.a4-customer-bar {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 3px solid var(--primary);
  padding: 4px 8px;
  border-radius: 4px;
  margin-top: 4px;
  font-family: 'Courier New', Courier, monospace;
}
.a4-cust-table {
  border-collapse: collapse;
  font-size: 10.5px;
  width: 100%;
  font-family: 'Courier New', Courier, monospace;
}
.a4-cust-table td {
  padding: 1.5px 0;
  vertical-align: middle;
}
.a4-cust-table td.lbl {
  color: #475569;
  width: 95px;
  text-align: left;
  white-space: nowrap;
}
.a4-cust-table td.colon {
  width: 14px;
  text-align: center;
  font-weight: 700;
  color: #0f172a;
  padding: 0 2px;
}
.a4-cust-table td.val {
  text-align: left !important;
  color: #0f172a;
  padding-left: 2px;
}

/* Tabel Utama A4 (Desain Elegan: Tanpa Fill / Transparan, Garis Putus-Putus Halus) */
.a4-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 12px;
  font-family: 'Courier New', Courier, monospace;
}
.a4-table th {
  background: transparent !important;
  color: #0f172a;
  padding: 6px 8px;
  border-top: 1.5px dashed #0f172a;
  border-bottom: 1.5px dashed #0f172a;
  border-left: none;
  border-right: none;
  font-size: 11px;
  font-weight: 800;
  text-align: left;
}
.a4-table td {
  background: transparent !important;
  padding: 5px 8px;
  border-top: 1px dashed #cbd5e1;
  border-bottom: 1px dashed #cbd5e1;
  border-left: none;
  border-right: none;
  font-size: 11px;
  vertical-align: middle;
}
.text-right { text-align: right !important; }
.text-center { text-align: center !important; }

/* Bagian Bawah: Grid Info & Total */
.a4-bottom-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 16px;
  align-items: start;
  margin-top: 4px;
  font-family: 'Courier New', Courier, monospace;
}
.a4-catatan {
  font-size: 10.5px;
  color: #334155;
  background: #f8fafc;
  padding: 6px 10px;
  border-radius: 4px;
  border: 1px dashed #cbd5e1;
  margin-bottom: 6px;
}
.a4-bank {
  font-size: 10.5px;
  color: #334155;
  margin-bottom: 8px;
  line-height: 1.5;
}
.a4-qr-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}
.a4-qr-wrapper img {
  width: 80px !important;
  height: 80px !important;
}
.a4-qr-text {
  font-size: 9.5px;
  color: #334155;
  max-width: 175px;
  line-height: 1.35;
  font-family: 'Courier New', Courier, monospace;
}

/* Rincian Total */
.a4-totals-table {
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  font-family: 'Courier New', Courier, monospace;
}
.a4-totals-table .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 0;
  font-size: 11px;
}
.a4-totals-table .row.grand-total {
  font-size: 13.5px;
  font-weight: 900;
  color: #0f172a;
  border-top: 2px solid #0f172a;
  border-bottom: 2px solid #0f172a;
  padding: 5px 0;
  margin: 2px 0 4px 0;
}
.a4-totals-table .row.status-row {
  font-size: 11.5px;
  font-weight: 800;
  padding: 4px 0;
  border-bottom: 1px dashed #94a3b8;
  margin-bottom: 4px;
}
.a4-totals-table .row.status-row strong {
  font-size: 12px;
  letter-spacing: 0.5px;
}
.a4-totals-table .row.kembalian {
  color: var(--success);
  font-weight: 700;
  padding: 2px 0;
}
.a4-totals-table .row.sisa-row {
  color: var(--danger);
  font-weight: 700;
  background: transparent !important;
  border-radius: 0 !important;
  padding: 2px 0;
}

/* Tanda Tangan Compact */
.a4-ttd-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 10px;
  text-align: center;
  font-family: 'Courier New', Courier, monospace;
}
.a4-ttd-col .ttd-title {
  font-size: 10px;
  color: #475569;
  font-weight: 600;
}
.a4-ttd-col .ttd-space {
  height: 32px;
}
.a4-ttd-col .ttd-name {
  font-weight: 700;
  font-size: 10.5px;
  border-bottom: 1px dotted #475569;
  display: inline-block;
  min-width: 110px;
  padding-bottom: 1px;
}

.a4-footer-note {
  text-align: center;
  font-size: 9.5px;
  color: #94a3b8;
  font-style: italic;
  margin-top: 12px;
  padding-top: 6px;
  border-top: 1px dashed #e2e8f0;
  font-family: 'Courier New', Courier, monospace;
}

/* ====== EMPTY STATE ====== */
.empty-state { text-align: center; padding: 36px 16px; color: var(--text-sub); font-size: 13px; line-height: 1.8; }
.empty-state .icon { font-size: 40px; display: block; margin-bottom: 10px; }

/* ====== TOAST ====== */
.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: #0f172a; color: white; padding: 10px 22px; border-radius: 10px;
  font-size: 13px; font-weight: 600; z-index: 9999; transition: transform 0.3s ease;
  white-space: nowrap; pointer-events: none; box-shadow: 0 4px 20px rgba(15, 23, 42, 0.25);
  border: 1px solid rgba(2, 132, 199, 0.3);
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.error { background: var(--danger); border-color: #f87171; }

/* ====== LOGO PREVIEW ====== */
.logo-preview { max-width: 100px; max-height: 80px; border-radius: 8px; border: 1px solid var(--border); }

/* ====== RESPONSIVE & MOBILE FRIENDLY IMPROVEMENTS ====== */
@media (max-width: 768px) {
  body {
    font-size: 13.5px;
    padding-bottom: 24px;
  }
  .status-bar {
    padding: 6px 12px;
    height: auto;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 11.5px;
  }
  .tab-nav {
    top: 0;
    padding: 0 4px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  }
  .tab {
    padding: 10px 14px;
    font-size: 12.5px;
  }
  .tab-content {
    padding: 12px 10px;
  }
  .kasir-layout {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }
  .cart-panel {
    padding: 14px 12px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(2, 132, 199, 0.08);
  }
  .ci-nama {
    font-size: 13px;
  }
  .qty-btn {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }
  .form-row input, .form-row select {
    font-size: 14px;
    padding: 9px 12px;
  }
  .btn {
    padding: 11px 16px;
    font-size: 13px;
  }
  .produk-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .produk-card {
    padding: 10px 8px;
  }
  .stats-bar {
    padding: 10px 12px;
    gap: 12px;
    justify-content: space-between;
  }
  .modal {
    padding: 10px;
  }
  .modal-content {
    padding: 16px 14px;
    border-radius: 14px;
  }
  .nota-modal {
    padding: 8px 4px;
  }
  .nota-modal-inner.a4-container {
    border-radius: 8px;
    margin: 4px auto;
  }
  .nota-toolbar {
    padding: 10px 12px;
    gap: 8px;
  }
  .nota-toolbar .btn {
    flex: 1 1 45%;
    font-size: 12px;
    padding: 9px 8px;
  }
  .nota-a4 {
    padding: 14px 10px;
    font-size: 10px;
  }
  .a4-header {
    flex-direction: column;
    gap: 12px;
  }
  .a4-brand-center-wrapper {
    width: 100%;
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }
  .a4-header-right {
    min-width: 100%;
    max-width: 100%;
  }
  .a4-bottom-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .a4-qr-wrapper {
    justify-content: center;
  }
}

/* ====== CETAK NOTA KERTAS A4 ====== */
@media print {
  @page {
    size: A4 portrait;
    margin: 0 !important;
  }
  html, body {
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    width: 210mm !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  .no-print, .nota-toolbar, .tab-nav, .status-bar, .tab-content, .login-overlay {
    display: none !important;
  }
  .nota-modal {
    display: block !important;
    position: static !important;
    background: none !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
  }
  .nota-modal-inner.a4-container {
    box-shadow: none !important;
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    border-radius: 0 !important;
  }
  .nota-a4 {
    padding: 5mm 14mm 10mm 14mm !important;
    width: 100% !important;
    box-sizing: border-box !important;
    font-size: 11px !important;
    line-height: 1.4 !important;
  }
  .a4-header {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 20px !important;
  }
  .a4-brand-center-wrapper {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    text-align: center !important;
    gap: 14px !important;
    flex: 1 !important;
    width: auto !important;
  }
  .a4-logo-box img.nota-logo-img {
    max-width: 135px !important;
    max-height: 90px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
    flex-shrink: 0 !important;
  }
  .a4-toko-info-center {
    text-align: center !important;
    flex: 1 !important;
  }
  .a4-toko-info-center h1 {
    font-size: 15px !important;
    text-align: center !important;
    white-space: nowrap !important;
  }
  .a4-bidang {
    font-size: 9.5px !important;
    text-align: center !important;
  }
  .a4-alamat, .a4-telp {
    font-size: 9px !important;
    text-align: center !important;
  }
  .a4-header-right {
    width: 250px !important;
    min-width: 240px !important;
    flex-shrink: 0 !important;
    margin-left: auto !important;
  }
  .a4-customer-bar {
    margin-top: 4px !important;
  }
  .a4-bottom-grid {
    display: grid !important;
    grid-template-columns: 1.25fr 1fr !important;
    gap: 16px !important;
    align-items: start !important;
    margin-top: 6px !important;
  }
  .a4-qr-wrapper {
    display: flex !important;
    justify-content: flex-start !important;
    align-items: center !important;
    gap: 12px !important;
  }
  .a4-ttd-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
    margin-top: 10px !important;
  }

  * { visibility: hidden; }
  #notaPreview, #notaPreview * { visibility: visible; }
  #notaPreview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
  }
}