@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@500;600;700;800&family=Poppins:wght@500;600;700;800&family=Roboto:wght@500;700;900&display=swap');

/* ===== COLOR DESIGN TOKENS (LIGHT & DARK THEMES) ===== */
:root, [data-theme="light"] {
  --bg: #f8fafc;
  --bg-app: #f1f5f9;
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --surface-hover: #f1f5f9;
  --surface-glass: rgba(255, 255, 255, 0.92);
  
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-ghost: rgba(37, 99, 235, 0.08);
  --primary-border: #bfdbfe;
  
  --gold: #d97706;
  --gold-light: #fef3c7;
  
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --border-dark: #cbd5e1;
  
  --danger: #ef4444;
  --danger-hover: #dc2626;
  --danger-light: #fef2f2;
  --danger-border: #fecaca;
  
  --success: #10b981;
  --success-hover: #059669;
  --success-light: #ecfdf5;
  --success-border: #a7f3d0;
  
  --warning: #f59e0b;
  --warning-light: #fffbeb;
  
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.03);
  --shadow-md: 0 4px 14px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.03);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.08), 0 4px 10px rgba(0,0,0,0.04);
  
  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Consolas', 'Courier New', monospace;
  --transition: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --preview-backdrop: #cbd5e1;
}

/* ===== DARK MODE THEME ===== */
[data-theme="dark"], body.dark-mode {
  --bg: #0b0f19;
  --bg-app: #0f172a;
  --surface: #131b2e;
  --surface-alt: #1a243b;
  --surface-hover: #22304e;
  --surface-glass: rgba(19, 27, 46, 0.92);
  
  --primary: #3b82f6;
  --primary-hover: #60a5fa;
  --primary-light: rgba(59, 130, 246, 0.15);
  --primary-ghost: rgba(59, 130, 246, 0.12);
  --primary-border: #1e3a8a;
  
  --gold: #f59e0b;
  --gold-light: rgba(245, 158, 11, 0.15);
  
  --text: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --border: #243048;
  --border-light: #1c273e;
  --border-dark: #334155;
  
  --danger: #f87171;
  --danger-hover: #ef4444;
  --danger-light: rgba(239, 68, 68, 0.15);
  --danger-border: #7f1d1d;
  
  --success: #34d399;
  --success-hover: #10b981;
  --success-light: rgba(16, 185, 129, 0.15);
  --success-border: #064e3b;
  
  --warning: #fbbf24;
  --warning-light: rgba(251, 191, 36, 0.15);
  
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-sm: 0 2px 6px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 12px 30px rgba(0,0,0,0.5);
  --preview-backdrop: #090d16;
}

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

html {
  font-size: 14.5px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-ui);
  background: var(--bg-app);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  transition: background-color var(--transition), color var(--transition);
}

/* Card Font Families */
.font-inter .v-card, .font-inter .v-card-preview { font-family: 'Inter', sans-serif; }
.font-poppins .v-card, .font-poppins .v-card-preview { font-family: 'Poppins', sans-serif; }
.font-mono .v-card, .font-mono .v-card-preview { font-family: 'JetBrains Mono', monospace; }
.font-roboto .v-card, .font-roboto .v-card-preview { font-family: 'Roboto', sans-serif; }

/* Card Border Styles */
.border-dashed .v-card, .border-dashed .v-card-preview { border-style: dashed; }
.border-solid .v-card, .border-solid .v-card-preview { border-style: solid; }
.border-none .v-card, .border-none .v-card-preview { border: none !important; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }

/* ===== ROLE MODE VISIBILITY ===== */
body.mode-kasir .admin-only {
  display: none !important;
}

body.mode-admin .quick-pos-panel {
  display: block;
}

/* ===== APP HEADER (STREAMLINED & SPACIOUS NAVBAR) ===== */
.app-header {
  background: var(--surface-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
  transition: background-color var(--transition), border-color var(--transition);
}

.app-header .header-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1.15rem;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.brand-icon-wrap {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.brand-icon-wrap .icon {
  font-size: 1.25rem;
}

.brand-text h1 {
  font-size: 1.12rem;
  font-weight: 850;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.2;
}

.header-badge {
  font-size: 0.65rem;
  font-weight: 800;
  color: #3b82f6;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.header-badge.pro-badge {
  color: #f59e0b;
  font-weight: 900;
}

[data-theme="dark"] .header-badge {
  color: #60a5fa;
}

/* Mode Switcher Pill */
.mode-switcher {
  display: flex;
  background: var(--surface-alt);
  padding: 0.2rem;
  border-radius: 24px;
  border: 1px solid var(--border);
}

.btn-mode {
  border: none;
  background: none;
  font-family: var(--font-ui);
  font-size: 0.76rem;
  font-weight: 750;
  color: var(--text-secondary);
  padding: 0.3rem 0.85rem;
  border-radius: 20px;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-mode:hover {
  color: var(--text);
}

.btn-mode.active {
  background: #0f172a;
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .btn-mode.active {
  background: #3b82f6;
  color: #ffffff;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

/* Stock Quick Pill */
.header-stock-pill {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-secondary);
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
}

.header-stock-pill.low {
  background: var(--danger-light);
  border-color: var(--danger-border);
  color: var(--danger);
}

.stock-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
}

.header-stock-pill.low .stock-dot {
  background: var(--danger);
  animation: pulseGreen 1.5s infinite;
}

/* PRO Status Badge Button in Header */
.btn-pro-badge {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-xs);
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.3);
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-pro-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.45);
}

.btn-pro-badge.active-pro {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

/* Dropdown Menu Container */
.header-menu-container {
  position: relative;
}

.header-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  min-width: 250px;
  padding: 0.4rem 0;
  display: none;
  flex-direction: column;
  z-index: 1000;
  animation: modalIn 160ms cubic-bezier(0.16, 1, 0.3, 1);
}

.header-dropdown-menu.show {
  display: flex;
}

.dropdown-header {
  padding: 0.4rem 0.95rem;
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dropdown-item {
  padding: 0.6rem 1rem;
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
}

.dropdown-item:hover {
  background: var(--surface-hover);
  color: var(--primary);
}

.dropdown-divider {
  height: 1px;
  background: var(--border-light);
  margin: 0.35rem 0;
}

/* Theme Toggle Button */
.btn-theme-toggle {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: all var(--transition);
}

.btn-theme-toggle:hover {
  background: var(--surface-hover);
  border-color: var(--primary);
  transform: rotate(15deg);
}

[data-theme="light"] .theme-icon-dark { display: none; }
[data-theme="light"] .theme-icon-light { display: block; }
[data-theme="dark"] .theme-icon-light { display: none; }
[data-theme="dark"] .theme-icon-dark { display: block; }

/* ===== ⚠️ STOCK ALERT BANNER ===== */
.stock-alert-banner {
  background: var(--warning-light);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  animation: fadeIn 200ms ease;
}

.stock-alert-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.alert-icon {
  font-size: 1.4rem;
}

.alert-text {
  font-size: 0.8rem;
  color: var(--text);
  display: flex;
  flex-direction: column;
}

.alert-text strong {
  color: #b45309;
}

.stock-alert-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

/* ===== MAIN WORKSPACE ===== */
.app-main {
  max-width: 1440px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

/* ===== PANELS ===== */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: background-color var(--transition), border-color var(--transition);
}

.panel-header {
  padding: 0.85rem 1.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border-light);
  flex-wrap: wrap;
}

.panel-header h2 {
  font-size: 0.92rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.panel-body {
  padding: 1.15rem 1.35rem;
}

/* ===== ⚙️ SETTINGS TAB NAVIGATION ===== */
.setting-tab-nav {
  display: flex;
  gap: 0.35rem;
  background: var(--surface-alt);
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  flex-wrap: wrap;
}

.btn-setting-tab {
  border: none;
  background: none;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 750;
  color: var(--text-secondary);
  padding: 0.4rem 0.85rem;
  border-radius: calc(var(--radius-sm) - 2px);
  cursor: pointer;
  transition: all var(--transition);
}

.btn-setting-tab:hover {
  color: var(--text);
}

.btn-setting-tab.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-xs);
}

.setting-tab-pane {
  animation: fadeIn 200ms ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.settings-grid-tab {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.35rem;
  align-items: center;
}

/* Google Sheets Box */
.sheets-config-box {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 1.15rem;
}

/* ===== 🎨 THEME STORE / TEMPLATE PRESET GALLERY ===== */
.theme-store-section {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.15rem;
}

.theme-store-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.85rem;
}

.theme-preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.65rem;
}

.theme-preset-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 0.65rem 0.75rem;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.theme-preset-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.theme-preset-card.active {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 0 0 2px var(--primary-ghost);
}

.preset-color-bar {
  height: 6px;
  border-radius: 4px;
  width: 100%;
}

.theme-blue-bar { background: linear-gradient(90deg, #2563eb, #60a5fa); }
.theme-gaming-bar { background: linear-gradient(90deg, #7c3aed, #ec4899); }
.theme-cafe-bar { background: linear-gradient(90deg, #d97706, #fbbf24); }
.theme-mono-bar { background: linear-gradient(90deg, #0f172a, #64748b); }
.theme-festive-bar { background: linear-gradient(90deg, #059669, #34d399); }

.preset-name {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.badge-tab-pro {
  font-size: 0.58rem;
  font-weight: 850;
  color: #ffffff;
  background: linear-gradient(135deg, #d97706, #f59e0b);
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: inline-block;
  vertical-align: middle;
}

.preset-desc {
  font-size: 0.66rem;
  color: var(--text-secondary);
}

/* Card Theme Classes */
.theme-gold .v-sn-badge { background: #b45309 !important; }
.theme-gold .v-code-box { background: #fef3c7 !important; border-color: #fde68a !important; }
.theme-gold .v-meta-tag { color: #d97706 !important; }

/* ===== ⚡ QUICK POS CASHIER PANEL ===== */
.quick-pos-panel {
  border: 2px solid var(--primary-border);
  background: var(--primary-light);
}

.quick-pos-header {
  padding: 0.85rem 1.35rem;
  background: var(--surface);
  border-bottom: 1px solid var(--primary-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.quick-pos-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.pos-pulse-dot {
  width: 10px;
  height: 10px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulseGreen 2s infinite;
}

@keyframes pulseGreen {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.quick-pos-title h3 {
  font-size: 1rem;
  font-weight: 850;
  color: var(--text);
  line-height: 1.2;
}

.quick-pos-subtitle {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.pos-stat-pill {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 650;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
}

.pos-stat-omset {
  background: var(--success-light);
  border-color: var(--success-border);
  color: var(--success);
}

.quick-pos-grid {
  padding: 1.15rem 1.35rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.95rem;
}

.btn-pos-pkg {
  background: var(--surface);
  border: 2px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 0.95rem 1.15rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  text-align: left;
  box-shadow: var(--shadow-sm);
  min-height: 52px;
}

.btn-pos-pkg:hover:not(:disabled) {
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.22);
}

.btn-pos-pkg:active:not(:disabled) {
  transform: translateY(0);
}

.btn-pos-pkg:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  border-color: var(--border);
  background: var(--surface-alt);
}

.pos-pkg-name {
  font-size: 0.96rem;
  font-weight: 850;
  color: var(--text);
  line-height: 1.2;
}

.pos-pkg-price {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--primary);
}

.pos-pkg-stock-badge {
  font-size: 0.72rem;
  font-weight: 750;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-border);
  padding: 0.18rem 0.55rem;
  border-radius: 12px;
  margin-top: 0.2rem;
}

.pos-pkg-stock-badge.empty {
  background: var(--danger-light);
  color: var(--danger);
  border-color: var(--danger-border);
}

.pos-pkg-stock-badge.warning {
  background: var(--warning-light);
  color: #b45309;
  border-color: rgba(245, 158, 11, 0.5);
}

/* Media Upload Elements */
.media-upload-column {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  width: 105px;
}

.logo-upload-area {
  width: 105px;
  height: 85px;
  border: 2px dashed var(--border-dark);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  background: var(--surface-alt);
}

.logo-upload-area:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.logo-upload-area img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: none;
}

.logo-upload-area .placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  color: var(--text-muted);
  font-size: 0.68rem;
  text-align: center;
  line-height: 1.2;
}

.logo-upload-area .placeholder .icon {
  font-size: 1.45rem;
  opacity: 0.8;
}

.setting-column {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.55rem;
}

/* ===== FORM ELEMENTS ===== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.form-group label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-input {
  font-family: var(--font-ui);
  font-size: 0.86rem;
  padding: 0.48rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--surface);
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  width: 100%;
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-ghost);
}

.form-input::placeholder {
  color: var(--text-muted);
}

select.form-input {
  cursor: pointer;
  appearance: none;
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
  padding-right: 1.8rem;
}

.toggle-group {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  flex-wrap: wrap;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  font-weight: 600;
}

.toggle-label:hover {
  color: var(--text);
}

.toggle-label input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* ===== TOOLBAR & LIVE SEARCH ===== */
.toolbar-panel {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 0.95rem 1.35rem;
  transition: background-color var(--transition), border-color var(--transition);
}

.toolbar-search-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.search-box-wrapper {
  position: relative;
  flex: 1;
  min-width: 280px;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 0.85rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 0.52rem 2.2rem 0.52rem 2.4rem;
  font-size: 0.86rem;
  font-family: var(--font-ui);
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface-alt);
  color: var(--text);
  outline: none;
  transition: all var(--transition);
}

.search-input:focus {
  background: var(--surface);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-ghost);
}

.search-clear-btn {
  position: absolute;
  right: 0.75rem;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.88rem;
  padding: 0.2rem;
}

.auto-archive-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.76rem;
  font-weight: 650;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
}

.auto-archive-label input {
  accent-color: var(--primary);
}

/* ===== ACTION BAR ===== */
.action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--border-light);
  padding-top: 0.75rem;
}

.action-bar-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.action-bar-left h2 {
  font-size: 0.95rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.badge-selected {
  font-size: 0.74rem;
  font-weight: 750;
  color: var(--success);
  background: var(--success-light);
  padding: 0.2rem 0.65rem;
  border-radius: 20px;
  border: 1px solid var(--success-border);
}

/* Filter Tabs */
.filter-tabs {
  display: flex;
  gap: 0.25rem;
  background: var(--surface-alt);
  padding: 0.25rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
}

.filter-tab {
  border: none;
  background: none;
  font-family: var(--font-ui);
  font-size: 0.76rem;
  font-weight: 650;
  color: var(--text-secondary);
  padding: 0.3rem 0.7rem;
  border-radius: calc(var(--radius-xs) - 2px);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.filter-tab:hover {
  color: var(--text);
}

.filter-tab.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-xs);
}

/* Status Badges */
.badge-status {
  font-size: 0.7rem;
  font-weight: 750;
  padding: 0.2rem 0.55rem;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
}

.badge-status-unprinted {
  background: var(--success-light);
  color: var(--success);
  border: 1px solid var(--success-border);
}

.badge-status-printed {
  background: var(--surface-alt);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.badge-reseller {
  background: var(--gold-light);
  color: var(--gold);
  border: 1px solid rgba(217, 119, 6, 0.3);
  font-size: 0.7rem;
  font-weight: 750;
  padding: 0.18rem 0.55rem;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

/* Selection Button Group */
.btn-group-select {
  display: inline-flex;
  border-radius: var(--radius-xs);
  overflow: hidden;
  border: 1px solid var(--border);
}

.btn-group-select .btn {
  border-radius: 0;
  border: none;
  border-right: 1px solid var(--border);
}

.btn-group-select .btn:last-child {
  border-right: none;
}

/* ===== BUTTONS ===== */
.btn {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 650;
  padding: 0.48rem 0.95rem;
  border: none;
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition);
  white-space: nowrap;
  line-height: 1.3;
  min-height: 34px;
}

.btn-sm {
  font-size: 0.76rem;
  padding: 0.35rem 0.7rem;
  min-height: 28px;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--surface-hover);
  border-color: var(--text-muted);
}

.btn-danger {
  background: var(--surface);
  color: var(--danger);
  border: 1px solid var(--danger-border);
}

.btn-danger:hover {
  background: var(--danger-light);
  border-color: var(--danger);
}

.btn-pro {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.3);
}

.btn-pro:hover {
  background: linear-gradient(135deg, #fbbf24, #b45309);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(217, 119, 6, 0.4);
}

.btn-print {
  background: #0f172a;
  color: #fff;
  padding: 0.48rem 1.35rem;
  font-size: 0.84rem;
  font-weight: 800;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.3);
}

[data-theme="dark"] .btn-print {
  background: #3b82f6;
  color: #ffffff;
  box-shadow: 0 2px 12px rgba(59, 130, 246, 0.4);
}

.btn-print:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-icon {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 0.3rem;
  border-radius: var(--radius-xs);
  cursor: pointer;
  font-size: 1rem;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-icon:hover {
  color: var(--danger);
  background: var(--danger-light);
}

.actions {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  flex-wrap: wrap;
}

.badge {
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.74rem;
  font-weight: 800;
  padding: 0.15rem 0.6rem;
  border-radius: 20px;
}

/* ===== 2-COLUMN WORKSPACE ===== */
.app-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.15rem;
  align-items: start;
}

/* ===== DATA TABLE ===== */
#voucher-panel .table-container {
  max-height: 520px;
  overflow-x: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  min-width: 620px;
}

.data-table thead {
  background: var(--surface-alt);
  position: sticky;
  top: 0;
  z-index: 10;
}

.data-table th {
  padding: 0.65rem 0.85rem;
  text-align: left;
  font-size: 0.7rem;
  font-weight: 750;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 0.52rem 0.85rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background var(--transition);
}

.data-table tbody tr:hover {
  background: var(--surface-hover);
}

.data-table tbody tr.row-selected {
  background: var(--primary-light);
}

.data-table tbody tr:nth-child(even):not(.row-selected) {
  background: var(--surface-alt);
}

.data-table .col-check {
  width: 40px;
  text-align: center;
}

.data-table .col-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

.data-table .col-no {
  width: 55px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.data-table .col-code {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--primary);
  letter-spacing: 0.03em;
}

.data-table .col-action {
  width: 40px;
  text-align: center;
}

/* Upgraded Empty State */
.empty-state {
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
}

.empty-state .icon {
  font-size: 2.8rem;
  margin-bottom: 0.6rem;
  opacity: 0.7;
}

.empty-state p {
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
  font-weight: 750;
  color: var(--text);
}

.empty-state .hint {
  font-size: 0.8rem;
  color: var(--text-secondary);
  max-width: 440px;
  margin: 0 auto 1.25rem;
}

.empty-state-cta-wrap {
  display: flex;
  justify-content: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

/* ===== PREVIEW CONTAINER ===== */
.preview-container {
  padding: 0.95rem;
  background: var(--preview-backdrop);
  min-height: 220px;
  max-height: 560px;
  overflow-y: auto;
  border-radius: 0 0 var(--radius) var(--radius);
  transition: background-color var(--transition);
}

#print-area {
  display: none;
}

/* Sheet Previews */
.preview-page {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
  border-radius: 3px;
  margin: 0 auto 1.25rem;
  padding: 4px;
  aspect-ratio: 210 / 297;
  max-width: 100%;
  display: grid;
  gap: 0;
  box-sizing: border-box;
  position: relative;
}

.preview-page.layout-10 { grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(5, 1fr); }
.preview-page.layout-16 { grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(4, 1fr); }
.preview-page.layout-20 { grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(5, 1fr); }
.preview-page.layout-25 { grid-template-columns: repeat(5, 1fr); grid-template-rows: repeat(5, 1fr); }
.preview-page.layout-30 { grid-template-columns: repeat(5, 1fr); grid-template-rows: repeat(6, 1fr); }
.preview-page.layout-40 { grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(10, 1fr); }
.preview-page.layout-50 { grid-template-columns: repeat(5, 1fr); grid-template-rows: repeat(10, 1fr); }
.preview-page.layout-60 { grid-template-columns: repeat(6, 1fr); grid-template-rows: repeat(10, 1fr); }
.preview-page.layout-80 { grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(10, 1fr); }

.preview-page.layout-label-103 { grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(4, 1fr); gap: 3px; }
.preview-page.layout-label-108 { grid-template-columns: repeat(5, 1fr); grid-template-rows: repeat(8, 1fr); gap: 2px; }
.preview-page.layout-label-121 { grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(5, 1fr); gap: 4px; }

.preview-page.layout-thermal-58 {
  max-width: 230px;
  margin: 0 auto 1rem;
  aspect-ratio: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.preview-page.layout-thermal-58 .v-card-preview {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 3px 10px rgba(0,0,0,0.15);
  padding: 8px 10px;
  border: none;
  border-bottom: 2px dashed #94a3b8;
  font-size: 8.5px;
}

.preview-page.layout-thermal-80 {
  max-width: 290px;
  margin: 0 auto 1rem;
  aspect-ratio: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.preview-page.layout-thermal-80 .v-card-preview {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 3px 10px rgba(0,0,0,0.15);
  padding: 10px 14px;
  border: none;
  border-bottom: 2px dashed #94a3b8;
  font-size: 9.5px;
}

/* ===== PREVIEW VOUCHER CARD ===== */
.v-card-preview {
  border: 0.5px dashed #94a3b8;
  background: #ffffff;
  color: #0f172a;
  padding: 3.5px 4px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  font-size: 5px;
  line-height: 1.15;
  box-sizing: border-box;
  position: relative;
}

.v-card-bg-layer {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  pointer-events: none;
  z-index: 1;
}

/* Stempel / Watermark Diagonal */
.v-card-watermark {
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-25deg);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: rgba(239, 68, 68, 0.22);
  border: 1px solid rgba(239, 68, 68, 0.28);
  padding: 1px 4px;
  border-radius: 2px;
  pointer-events: none;
  z-index: 3;
  white-space: nowrap;
  text-transform: uppercase;
}

.v-card-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.v-card-preview .v-top {
  border-bottom: 0.5px solid #cbd5e1;
  padding-bottom: 2px;
  position: relative;
  width: 100%;
}

.v-card-preview .v-top.v-header-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.v-card-preview .v-top.v-header-left {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 2px;
}

.v-card-preview .v-left-brand {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.v-card-preview .v-logo-side {
  width: 13px;
  height: 13px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

.v-card-preview .v-ssid-inline {
  font-weight: 750;
  font-size: 5px;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.v-card-preview .v-top.v-header-left .v-sn-badge {
  position: static;
  flex-shrink: 0;
}

.v-card-preview .v-logo-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.v-card-preview .v-logo-wide {
  height: 16px;
  max-width: 86%;
  object-fit: contain;
  margin: 0 auto;
  display: block;
}

.v-card-preview .v-sn-badge {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 1px;
  font-weight: 800;
  font-size: 4.8px;
  border-radius: 1.5px;
  padding: 1px 2.5px;
  background: #0f172a;
  color: #ffffff;
}

.v-card-preview .v-ssid-bar {
  width: 100%;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.15;
  font-weight: 700;
  color: #1e293b;
  font-size: 5px;
  margin-top: 1px;
}

.v-card-preview .v-no-logo-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.v-card-preview .v-no-logo-ssid {
  font-weight: 800;
  color: #0f172a;
  font-size: 5.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Full Width Bold Hero Code Box (Without QR) */
.v-card-preview .v-hero-row {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 2px 0;
}

.v-card-preview .v-code-box {
  text-align: center;
  border: 0.8px solid #cbd5e1;
  border-radius: 2.5px;
  background: #f8fafc;
  padding: 2.5px 2px;
  width: 100%;
}

.v-card-preview .v-code-label {
  font-size: 4px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #64748b;
  text-transform: uppercase;
  line-height: 1;
}

.v-card-preview .v-code-value {
  font-family: var(--font-mono);
  font-weight: 900;
  font-size: 8.8px;
  color: #000000;
  letter-spacing: 0.08em;
  line-height: 1.2;
  word-break: break-all;
}

/* Meta Grid */
.v-card-preview .v-meta-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1px;
  border-top: 0.5px solid #e2e8f0;
  padding-top: 1.5px;
  font-size: 4.8px;
}

.v-card-preview .v-meta-tag {
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.v-card-preview .v-meta-val {
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
}

.v-card-preview .v-meta-price .v-meta-val {
  font-weight: 800;
  color: #0f172a;
}

.v-card-preview .v-sub-grid {
  display: flex;
  justify-content: space-between;
  gap: 1px;
  color: #475569;
  font-size: 4.2px;
}

.v-card-preview .v-sub-item {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.v-card-preview .v-footer {
  text-align: center;
  color: #64748b;
  font-size: 4.2px;
  border-top: 0.4px dashed #e2e8f0;
  padding-top: 1px;
}

.v-card-preview .v-hint {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

/* Theme Previews */
.v-card-preview.theme-blue .v-sn-badge { background: #1e40af; }
.v-card-preview.theme-blue .v-code-box { background: #eff6ff; border-color: #93c5fd; }
.v-card-preview.theme-blue .v-meta-tag { color: #1d4ed8; }

.v-card-preview.theme-mono .v-sn-badge { background: #000000; }
.v-card-preview.theme-mono .v-code-box { background: #ffffff; border-color: #000000; }
.v-card-preview.theme-mono .v-meta-tag { color: #000000; }

.v-card-preview.theme-emerald .v-sn-badge { background: #047857; }
.v-card-preview.theme-emerald .v-code-box { background: #ecfdf5; border-color: #6ee7b7; }
.v-card-preview.theme-emerald .v-meta-tag { color: #059669; }

.v-card-preview.theme-purple .v-sn-badge { background: #6d28d9; }
.v-card-preview.theme-purple .v-code-box { background: #f5f3ff; border-color: #c4b5fd; }
.v-card-preview.theme-purple .v-meta-tag { color: #7c3aed; }

/* Micro Layout Live Previews (40, 50, 60, 80) */
.preview-page.layout-40 .v-card-preview,
.preview-page.layout-50 .v-card-preview,
.preview-page.layout-60 .v-card-preview,
.preview-page.layout-80 .v-card-preview {
  padding: 1.5px 2px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.preview-page.layout-60 .v-code-label,
.preview-page.layout-80 .v-code-label {
  display: none !important;
}

.preview-page.layout-60 .v-sub-grid,
.preview-page.layout-80 .v-sub-grid,
.preview-page.layout-60 .v-footer,
.preview-page.layout-80 .v-footer {
  display: none !important;
}

.preview-page.layout-40 .v-code-value { font-size: 7px; }
.preview-page.layout-50 .v-code-value { font-size: 6px; }
.preview-page.layout-60 .v-code-value { font-size: 5.2px; }
.preview-page.layout-80 .v-code-value { font-size: 4.5px; }

.preview-dummy-banner {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-xs);
  font-size: 0.76rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.65rem;
}

.preview-more {
  text-align: center;
  padding: 0.6rem;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--surface);
  border-radius: var(--radius-xs);
  margin-top: 0.4rem;
  box-shadow: var(--shadow-sm);
}

/* ===== MODALS ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: modalIn 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-content.modal-wide { max-width: 760px; }
.modal-content.modal-rekap { max-width: 920px; width: 95%; }

@keyframes modalIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

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

.modal-header h3 {
  font-size: 1.02rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.modal-body {
  padding: 1.35rem;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 0.85rem 1.35rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: 0.55rem;
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.modal-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

/* ===== 3-TIER PRICING & PAYMENT MODAL ===== */
.pricing-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.85rem;
  margin-bottom: 1.15rem;
}

.pricing-card {
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--surface);
  position: relative;
}

.pricing-card.featured {
  border-color: var(--primary);
  background: var(--primary-light);
}

.pricing-card.lifetime {
  border-color: var(--gold);
  background: var(--gold-light);
}

.pricing-badge {
  position: absolute;
  top: -11px;
  right: 12px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
  text-transform: uppercase;
}

.pricing-title {
  font-size: 0.95rem;
  font-weight: 850;
  line-height: 1.2;
}

.pricing-price {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--text);
  margin: 0.35rem 0 0.65rem;
}

.pricing-price span {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.pricing-features {
  list-style: none;
  font-size: 0.76rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

/* Payment Box & License Input Box */
.payment-methods-box {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 1rem 1.15rem;
  margin-bottom: 1rem;
}

.payment-method-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 0.75rem 0.95rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.license-activation-card {
  background: var(--surface-alt);
  border: 2px dashed var(--primary);
  border-radius: var(--radius-xs);
  padding: 1rem 1.15rem;
}

/* Rekap Dashboard & Dual Visual Charts */
.rekap-period-tabs {
  display: flex;
  gap: 0.35rem;
  background: var(--surface-alt);
  padding: 0.3rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
  margin-bottom: 0.95rem;
  overflow-x: auto;
}

.rekap-period-tab {
  border: none;
  background: none;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
  padding: 0.4rem 0.8rem;
  border-radius: calc(var(--radius-xs) - 2px);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.rekap-period-tab:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.rekap-period-tab.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-xs);
}

.rekap-filter-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.75rem;
  align-items: flex-end;
  margin-bottom: 1.15rem;
  background: var(--surface-alt);
  padding: 0.85rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
}

.rekap-card-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.15rem;
}

.rekap-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.85rem 1.15rem;
  border-radius: var(--radius-xs);
  box-shadow: var(--shadow-xs);
}

.rekap-card-accent-green { border-left: 4px solid var(--success); }
.rekap-card-accent-blue { border-left: 4px solid var(--primary); }
.rekap-card-accent-purple { border-left: 4px solid #7c3aed; }

.rekap-val {
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1.2;
}

.rekap-label {
  font-size: 0.68rem;
  font-weight: 750;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Dual Analytics Charts */
.rekap-charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.95rem;
  margin-bottom: 1.15rem;
}

.rekap-chart-box {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 0.95rem 1.15rem;
}

.rekap-chart-title {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rekap-bars-grid {
  display: flex;
  align-items: flex-end;
  gap: 0.45rem;
  height: 95px;
  padding-top: 12px;
}

.chart-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}

.chart-bar-fill {
  width: 100%;
  max-width: 28px;
  background: linear-gradient(180deg, var(--primary), var(--primary-hover));
  border-radius: 4px 4px 0 0;
  transition: height 300ms ease;
  min-height: 4px;
}

.chart-bar-fill.accent-gold {
  background: linear-gradient(180deg, #f59e0b, #d97706);
}

.chart-bar-label {
  font-size: 0.64rem;
  color: var(--text-secondary);
  margin-top: 4px;
  white-space: nowrap;
}

.chart-bar-value {
  font-size: 0.62rem;
  font-weight: 750;
  color: var(--primary);
  margin-bottom: 2px;
}

.rekap-section-title {
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--text);
  margin: 0.95rem 0 0.45rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rekap-table-wrapper {
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  margin-bottom: 0.6rem;
}

/* Audit Trail Modal */
.badge-audit {
  font-size: 0.68rem;
  font-weight: 750;
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.badge-audit-print { background: var(--success-light); color: var(--success); }
.badge-audit-status { background: var(--primary-light); color: var(--primary); }
.badge-audit-delete { background: var(--danger-light); color: var(--danger); }
.badge-audit-shift { background: var(--gold-light); color: var(--gold); }

/* Reseller Cards */
.reseller-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.reseller-card {
  border: 1px solid var(--border);
  background: var(--surface-alt);
  padding: 0.85rem 1.15rem;
  border-radius: var(--radius-xs);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.reseller-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.reseller-name {
  font-weight: 850;
  font-size: 0.98rem;
  color: var(--text);
}

.reseller-meta {
  font-size: 0.76rem;
  color: var(--text-secondary);
}

.reseller-stat-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  border-top: 1px dashed var(--border);
  padding-top: 0.4rem;
  margin-top: 0.2rem;
}

.reseller-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  margin-top: 0.4rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--border);
}

.reseller-card-actions .btn {
  font-size: 0.72rem;
  padding: 0.3rem 0.45rem;
  justify-content: center;
}

/* PIN Keypad */
.pin-input-wrap {
  display: flex;
  justify-content: center;
  margin: 1.5rem 0;
}

/* ===== TOAST NOTIFICATION ===== */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #0f172a;
  color: #fff;
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 700;
  box-shadow: var(--shadow-lg);
  z-index: 2000;
  opacity: 0;
  transition: all 250ms ease;
  pointer-events: none;
}

[data-theme="dark"] .toast {
  background: #1e293b;
  border: 1px solid #334155;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== RESPONSIVE MOBILE ENGINE (SMARTPHONE OPTIMIZATION) ===== */
@media (max-width: 960px) {
  .app-content {
    grid-template-columns: 1fr;
  }
  .rekap-charts-grid, .pricing-grid-3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .app-header {
    padding: 0.65rem 0.85rem;
  }

  .header-brand .header-badge {
    display: none;
  }

  .app-main {
    padding: 0.65rem;
  }

  .settings-grid-tab {
    grid-template-columns: 1fr;
  }

  .media-upload-column {
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: center;
  }

  .setting-tab-nav {
    display: flex;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    gap: 0.35rem;
    padding-bottom: 4px;
    margin-bottom: 0.65rem;
    scrollbar-width: none;
  }

  .setting-tab-nav::-webkit-scrollbar {
    display: none;
  }

  .btn-setting-tab {
    flex-shrink: 0;
    font-size: 0.76rem;
    padding: 0.45rem 0.75rem;
    white-space: nowrap;
  }

  .quick-pos-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }

  .quick-pos-stats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
  }

  .quick-pos-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .btn-pos-pkg {
    padding: 0.65rem 0.5rem;
    min-height: 52px;
  }

  .action-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
  }

  .action-bar-left, .action-bar-right {
    width: 100%;
    justify-content: space-between;
  }

  .filter-tabs {
    width: 100%;
    display: flex;
  }

  .filter-tab {
    flex: 1;
    text-align: center;
    justify-content: center;
    font-size: 0.75rem;
    padding: 0.45rem 0.3rem;
  }

  .table-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .search-box {
    width: 100%;
    max-width: none;
  }

  .actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.45rem;
    width: 100%;
  }

  .actions .btn {
    width: 100%;
    justify-content: center;
    font-size: 0.8rem;
    padding: 0.55rem 0.5rem;
    min-height: 42px;
  }

  #btn-print {
    grid-column: 1 / -1;
    min-height: 46px;
    font-size: 0.95rem;
    font-weight: 850;
  }

  .rekap-card-grid-3,
  .rekap-filter-row {
    grid-template-columns: 1fr;
  }

  .modal-content {
    width: 96% !important;
    max-width: 96vw !important;
    padding: 1.15rem 1rem !important;
    max-height: 90vh !important;
  }

  /* Prevent iOS auto-zoom on form inputs */
  input[type="text"],
  input[type="password"],
  input[type="number"],
  input[type="url"],
  select {
    font-size: 16px !important;
  }
}

@media (max-width: 480px) {
  .app-header .header-inner {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .header-left {
    gap: 0.6rem;
  }

  .header-brand .brand-title {
    font-size: 0.95rem;
  }

  .header-right {
    gap: 0.35rem;
    flex-wrap: wrap;
  }

  .header-stock-pill {
    padding: 0.25rem 0.5rem;
    font-size: 0.72rem;
  }

  #btn-rekap {
    padding: 0.35rem 0.6rem;
    font-size: 0.72rem;
  }

  .btn-pro-badge {
    padding: 0.35rem 0.6rem;
    font-size: 0.72rem;
  }

  .preview-container {
    padding: 0.4rem;
  }

  .preview-page {
    padding: 2px;
  }

  .v-card-preview {
    padding: 2px;
    font-size: 6.5px;
  }

  .v-card-preview .v-code-value {
    font-size: 8px;
  }

  .v-card-preview .v-meta-tag,
  .v-card-preview .v-meta-val {
    font-size: 6.5px;
  }

  .v-card-preview .v-sn-val {
    font-size: 6px;
  }
}
