:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --border-color: #e2e8f0;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  /* Status Colors */
  --color-red: #ef4444;
  --color-red-bg: #fef2f2;
  --color-yellow: #f59e0b;
  --color-yellow-bg: #fffbeb;
  --color-green: #10b981;
  --color-green-bg: #ecfdf5;
  --color-blue: #3b82f6;
  --color-blue-bg: #eff6ff;

  --font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

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

html, body {
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ================= HEADER ================= */
.app-header {
  background: #0f172a;
  color: #ffffff;
  border-bottom: 1px solid #1e293b;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.header-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

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

.brand-logo {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.4);
}

.brand-info .school-tag {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #38bdf8;
  text-transform: uppercase;
}

.brand-info h1 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.badge-version {
  font-size: 0.65rem;
  background: #1e293b;
  color: #94a3b8;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  border: 1px solid #334155;
}

.nav-tabs {
  display: flex;
  gap: 0.5rem;
  background: #1e293b;
  padding: 4px;
  border-radius: var(--radius-md);
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: #94a3b8;
  border: none;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.nav-btn:hover {
  color: #ffffff;
}

.nav-btn.active {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}

.header-user-panel {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.user-info-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.82rem;
  color: #e2e8f0;
  font-weight: 600;
}

.user-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #2563eb;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-danger-outline {
  background: transparent;
  border: 1px solid #ef4444;
  color: #f87171;
}

.btn-danger-outline:hover {
  background: #ef4444;
  color: #ffffff;
}

/* ================= STATS BAR ================= */
.stats-bar {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
}

.stats-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  background: #ffffff;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-icon {
  font-size: 1.6rem;
  line-height: 1;
}

.stat-content {
  flex: 1;
}

.stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin: 2px 0;
}

.stat-hint {
  font-size: 0.7rem;
  font-weight: 600;
}

.stat-red {
  border-left: 4px solid var(--color-red);
}
.stat-red .stat-value { color: var(--color-red); }
.stat-red .stat-hint { color: #dc2626; }

.stat-yellow {
  border-left: 4px solid var(--color-yellow);
}
.stat-yellow .stat-value { color: var(--color-yellow); }
.stat-yellow .stat-hint { color: #d97706; }

.stat-green {
  border-left: 4px solid var(--color-green);
}
.stat-green .stat-value { color: var(--color-green); }
.stat-green .stat-hint { color: #059669; }

.stat-blue {
  border-left: 4px solid var(--color-blue);
}
.stat-blue .stat-value { color: var(--color-blue); }
.stat-blue .stat-hint { color: #2563eb; }

/* ================= MAIN CONTAINER ================= */
.main-content {
  max-width: 1300px;
  margin: 0 auto;
  padding: 1.5rem;
}

.tab-pane {
  display: none;
}

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

/* ================= TOOLBAR & SEARCH ================= */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: #ffffff;
  border: 1px solid var(--border-color);
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius-md);
  flex: 1;
  min-width: 280px;
  box-shadow: var(--shadow-sm);
}

.search-box svg {
  color: var(--text-light);
}

.search-box input {
  border: none;
  outline: none;
  font-size: 0.9rem;
  width: 100%;
  font-family: inherit;
  background: transparent;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

select {
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: #ffffff;
  font-size: 0.85rem;
  font-family: inherit;
  color: var(--text-main);
  outline: none;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

/* ================= BUTTONS ================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
  font-family: inherit;
  text-decoration: none;
}

.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 0.8rem 1.5rem;
  font-size: 1rem;
}

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

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
  background: #334155;
  color: #ffffff;
}

.btn-secondary:hover {
  background: #1e293b;
}

.btn-outline {
  background: #ffffff;
  border-color: var(--border-color);
  color: var(--text-main);
}

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

.btn-success {
  background: var(--color-green);
  color: #ffffff;
}

.btn-success:hover {
  background: #059669;
}

/* ================= ITEMS GRID ================= */
.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.25rem;
}

.item-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  position: relative;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.item-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.item-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.item-code {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #334155;
  letter-spacing: 0.04em;
}

/* Status Badges */
.status-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.pill-rencana {
  background: var(--color-red-bg);
  color: #dc2626;
  border: 1px solid #fecaca;
}

.pill-proses {
  background: var(--color-yellow-bg);
  color: #b45309;
  border: 1px solid #fde68a;
}

.pill-siap {
  background: var(--color-green-bg);
  color: #047857;
  border: 1px solid #a7f3d0;
}

.pill-sudah {
  background: var(--color-blue-bg);
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.item-card-title h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
  margin-bottom: 3px;
}

.item-card-kegiatan {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.item-card-rekening {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #64748b;
  background: #f8fafc;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
  margin-top: 4px;
}

/* Mini Checklist Progress */
.item-mini-checklist {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 8px 10px;
  background: #f8fafc;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-color);
}

.mini-check-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.mini-check-badge.done {
  background: #dcfce7;
  color: #15803d;
}

.mini-check-badge.pending {
  background: #fee2e2;
  color: #b91c1c;
}

.item-card-financial {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 0.6rem;
  border-top: 1px solid #f1f5f9;
}

.financial-total {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
}

.financial-tax {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.item-card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
}

.item-card-actions .btn {
  flex: 1;
  justify-content: center;
}

/* ================= SCANNER SECTION ================= */
.scanner-wrapper {
  max-width: 650px;
  margin: 0 auto;
}

.scanner-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
}

.scanner-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
  gap: 1rem;
}

.scanner-title h2 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.scanner-title p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.scanner-viewport-container {
  position: relative;
  background: #0f172a;
  border-radius: var(--radius-md);
  overflow: hidden;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scanner-viewport {
  width: 100% !important;
  border: none !important;
}

.scanner-viewport video {
  border-radius: var(--radius-md);
  object-fit: cover;
}

/* Camera Target Box Overlay */
.scanner-guide {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.guide-box {
  width: 220px;
  height: 220px;
  position: relative;
}

.guide-box .corner {
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: #38bdf8;
  border-style: solid;
}

.guide-box .tl { top: 0; left: 0; border-width: 3px 0 0 3px; }
.guide-box .tr { top: 0; right: 0; border-width: 3px 3px 0 0; }
.guide-box .bl { bottom: 0; left: 0; border-width: 0 0 3px 3px; }
.guide-box .br { bottom: 0; right: 0; border-width: 0 3px 3px 0; }

.laser-line {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ef4444, transparent);
  box-shadow: 0 0 10px #ef4444;
  animation: scanMove 2s infinite ease-in-out;
}

@keyframes scanMove {
  0% { top: 0; }
  50% { top: 100%; }
  100% { top: 0; }
}

.manual-code-box {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-color);
}

.manual-code-box label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.manual-input-row {
  display: flex;
  gap: 0.5rem;
}

.manual-input-row input {
  flex: 1;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-family: var(--font-mono);
}

/* ================= FORM PENAMBAHAN ================= */
.form-wrapper {
  max-width: 850px;
  margin: 0 auto;
}

.form-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
}

.form-header {
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
}

.form-header h2 {
  font-size: 1.35rem;
  font-weight: 800;
}

.form-header p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.1rem;
}

.form-group.full-width {
  grid-column: span 2;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: #334155;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.input-readonly {
  background: #f8fafc;
  font-weight: 700;
  color: var(--primary);
}

.hint {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 3px;
}

/* Tax Calculator Panel */
.tax-box {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.tax-box-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 1rem;
}

.tax-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.tax-checkbox-col {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  justify-content: center;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  cursor: pointer;
}

.tax-preview-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.tax-preview-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tax-preview-item span {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.tax-preview-item strong {
  font-size: 1rem;
  font-family: var(--font-mono);
}

.tax-preview-item.highlight strong {
  font-size: 1.1rem;
}

.form-actions {
  margin-top: 1.5rem;
  display: flex;
  justify-content: flex-end;
}

/* ================= MODAL ================= */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

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

.modal-dialog {
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.2);
  display: flex;
  flex-direction: column;
}

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

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.modal-badge-id {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 800;
  background: #e2e8f0;
  padding: 4px 8px;
  border-radius: 6px;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-light);
  line-height: 1;
}

.modal-close:hover {
  color: var(--text-main);
}

.modal-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  background: #f8fafc;
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
}

/* Status Banner inside Modal */
.status-banner {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.banner-icon {
  font-size: 2rem;
  line-height: 1;
}

.banner-content h4 {
  font-size: 1.05rem;
  font-weight: 800;
}

.banner-content p {
  font-size: 0.82rem;
}

.banner-red {
  background: var(--color-red-bg);
  border: 1px solid #fecaca;
  color: #991b1b;
}

.banner-yellow {
  background: var(--color-yellow-bg);
  border: 1px solid #fde68a;
  color: #92400e;
}

.banner-green {
  background: var(--color-green-bg);
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.banner-blue {
  background: var(--color-blue-bg);
  border: 1px solid #bfdbfe;
  color: #1e40af;
}

/* Detail Info Grid */
.item-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  background: #f8fafc;
  padding: 0.9rem;
  border-radius: var(--radius-md);
}

.detail-item {
  display: flex;
  flex-direction: column;
}

.detail-label {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.detail-item strong {
  font-size: 0.875rem;
}

/* Financial Card */
.financial-summary-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.1rem;
}

.fin-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  padding: 4px 0;
}

.fin-row.total {
  border-top: 1px solid var(--border-color);
  margin-top: 6px;
  padding-top: 8px;
  font-weight: 800;
  font-size: 1rem;
}

/* Verification Checklist */
.verification-checklist-box {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.1rem;
}

.checklist-header h4 {
  font-size: 0.95rem;
  font-weight: 800;
}

.checklist-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.75rem;
}

.checklist-items {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.6rem 0.8rem;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.check-row:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.check-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  cursor: pointer;
  accent-color: var(--primary);
}

.check-text strong {
  display: block;
  font-size: 0.85rem;
}

.check-text span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ARKAS Assistant Panel */
.arkas-assistant-panel {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.arkas-panel-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 800;
  color: #1e3a8a;
  margin-bottom: 4px;
}

.arkas-panel-desc {
  font-size: 0.8rem;
  color: #3b82f6;
  margin-bottom: 1rem;
}

.arkas-copy-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.copy-cell {
  background: #ffffff;
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid #dbeafe;
}

.copy-cell span {
  font-size: 0.72rem;
  color: #64748b;
  display: block;
}

.copy-val-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 3px;
}

.copy-val-row span {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
}

.btn-copy {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
}

.btn-copy:hover {
  background: #2563eb;
  color: #ffffff;
}

.mark-arkas-form {
  border-top: 1px dashed #bfdbfe;
  padding-top: 0.9rem;
}

.mark-arkas-form h5 {
  font-size: 0.85rem;
  color: #1e3a8a;
  margin-bottom: 0.5rem;
}

.mark-arkas-inputs {
  display: flex;
  gap: 0.5rem;
}

.mark-arkas-inputs input {
  flex: 1;
  padding: 0.55rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

/* ================= SOP & CHEATSHEET ================= */
.sop-container {
  max-width: 950px;
  margin: 0 auto;
}

.sop-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
}

.sop-card h2 {
  font-size: 1.45rem;
  font-weight: 800;
}

.sop-card .subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
}

.sop-steps {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.sop-step {
  display: flex;
  gap: 1.25rem;
}

.step-badge {
  padding: 6px 12px;
  height: fit-content;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
}

.step-badge.red { background: #fee2e2; color: #b91c1c; }
.step-badge.yellow { background: #fef3c7; color: #b45309; }
.step-badge.green { background: #dcfce7; color: #15803d; }

.step-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.step-body p, .step-body ul {
  font-size: 0.875rem;
  color: #334155;
}

.step-body ul {
  margin-left: 1.2rem;
  margin-top: 0.4rem;
}

.alert-box {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-top: 0.6rem;
}

.alert-danger {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.tax-rule-cheatsheet h3 {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.cheatsheet-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.cheatsheet-table th,
.cheatsheet-table td {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  text-align: left;
}

.cheatsheet-table th {
  background: #f8fafc;
  font-weight: 700;
}

/* ================= PRINTABLE AREA (STIKER / VOUCHER) ================= */
.printable-voucher {
  background: #ffffff;
  border: 2px solid #0f172a;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  max-width: 600px;
  margin: 0 auto;
}

.voucher-header {
  text-align: center;
  border-bottom: 2px solid #0f172a;
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
}

.voucher-school {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.voucher-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #334155;
}

.voucher-year {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
}

.voucher-body {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 1rem;
}

.voucher-qr-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-right: 1px dashed #cbd5e1;
  padding-right: 1.25rem;
}

.voucher-qr-col img {
  width: 130px;
  height: 130px;
  border: 1px solid #cbd5e1;
  padding: 4px;
}

.voucher-code {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.85rem;
  margin-top: 4px;
}

.voucher-scan-hint {
  font-size: 0.65rem;
  color: #64748b;
  text-align: center;
}

.voucher-info-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.v-row {
  display: flex;
  font-size: 0.8rem;
  line-height: 1.3;
}

.v-label {
  width: 110px;
  color: #64748b;
  font-size: 0.75rem;
}

.v-val {
  flex: 1;
  color: #0f172a;
}

.voucher-signatures {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid #cbd5e1;
  padding-top: 0.75rem;
  margin-top: 0.75rem;
}

.sig-col {
  text-align: center;
  width: 180px;
}

.sig-title {
  font-size: 0.7rem;
  color: #64748b;
}

.sig-role {
  font-size: 0.75rem;
  font-weight: 700;
}

.sig-space {
  height: 40px;
}

.sig-name {
  font-size: 0.75rem;
  font-weight: 600;
}

.voucher-warning {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: 0.68rem;
  padding: 4px 8px;
  border-radius: 4px;
  margin-top: 0.75rem;
  text-align: center;
}

/* ================= TOAST NOTIFICATION ================= */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background: #0f172a;
  color: #ffffff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: slideIn 0.3s ease-out;
}

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

/* ================= PRINT STYLES ================= */
@media print {
  body * {
    visibility: hidden;
  }
  .no-print {
    display: none !important;
  }
  #modalPrint, #printableArea, #printableArea * {
    visibility: visible;
  }
  #modalPrint {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    display: block !important;
  }
  .print-dialog {
    box-shadow: none;
    border: none;
    max-width: 100%;
  }
}

/* ================= RESPONSIVE DESIGN (OPTIMAL UNTUK HP & TABLET) ================= */
@media (max-width: 768px) {
  .app-header {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .header-container {
    padding: 0.75rem 0.85rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
  }

  .brand {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.65rem;
    width: 100%;
  }

  .brand-logo {
    width: 38px;
    height: 38px;
    min-width: 38px;
  }

  .brand-info h1 {
    font-size: 1.12rem;
  }

  .brand-info .school-tag {
    font-size: 0.62rem;
  }

  /* 2x2 Grid Tab Navigasi Khusus HP */
  .nav-tabs {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    width: 100% !important;
    gap: 6px !important;
    padding: 5px !important;
    background: #1e293b !important;
    border-radius: var(--radius-md) !important;
    box-sizing: border-box !important;
    overflow-x: visible !important;
  }

  .nav-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0.65rem 0.4rem !important;
    font-size: 0.78rem !important;
    text-align: center !important;
    white-space: nowrap !important;
    gap: 0.35rem !important;
    border-radius: var(--radius-sm) !important;
    width: 100% !important;
  }

  .nav-btn svg {
    width: 15px !important;
    height: 15px !important;
    flex-shrink: 0 !important;
  }

  /* User Info & Action Buttons Bar */
  .header-user-panel {
    display: flex !important;
    flex-wrap: wrap !important;
    width: 100% !important;
    gap: 0.5rem !important;
    align-items: center !important;
    justify-content: space-between !important;
  }

  .user-info-pill {
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
    font-size: 0.75rem !important;
    padding: 6px 10px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .header-user-panel .btn {
    flex: 1 1 calc(50% - 0.25rem) !important;
    justify-content: center !important;
    padding: 0.5rem 0.5rem !important;
    font-size: 0.78rem !important;
    gap: 0.35rem !important;
    box-sizing: border-box !important;
  }

  /* Stats Bar 2x2 Grid Responsif di HP */
  .stats-bar {
    padding: 0.65rem 0;
  }

  .stats-container {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem !important;
    padding: 0 0.85rem !important;
  }

  .stat-card {
    padding: 0.65rem 0.75rem !important;
    gap: 0.5rem !important;
    border-radius: var(--radius-sm) !important;
  }

  .stat-icon {
    font-size: 1.35rem !important;
  }

  .stat-label {
    font-size: 0.65rem !important;
    line-height: 1.15 !important;
  }

  .stat-value {
    font-size: 1.25rem !important;
    margin: 1px 0 !important;
  }

  .stat-hint {
    font-size: 0.62rem !important;
    line-height: 1.1 !important;
  }

  /* Toolbar & Filter Search */
  .main-content {
    padding: 1rem 0.85rem;
  }

  .toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.75rem !important;
    margin-bottom: 1rem !important;
  }

  .search-box {
    min-width: 100% !important;
    width: 100% !important;
  }

  .filter-group {
    display: flex !important;
    width: 100% !important;
    overflow-x: auto !important;
    gap: 0.4rem !important;
    padding-bottom: 4px !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .filter-btn {
    white-space: nowrap !important;
    padding: 0.4rem 0.75rem !important;
    font-size: 0.78rem !important;
  }

  .items-grid {
    grid-template-columns: 1fr !important;
    gap: 0.85rem !important;
  }

  .item-card-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.5rem !important;
  }

  .item-card-footer {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.5rem !important;
  }

  .item-card-footer .btn {
    width: 100% !important;
    justify-content: center !important;
  }

  /* Scanner & QR Reader Responsif */
  .scanner-card {
    padding: 1rem !important;
  }

  .scanner-title h2 {
    font-size: 1.1rem !important;
  }

  .scanner-card-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.75rem !important;
  }

  .scanner-card-header .btn {
    width: 100% !important;
    justify-content: center !important;
  }

  .guide-box {
    width: 180px !important;
    height: 180px !important;
  }

  /* Form & Tables */
  .form-grid {
    grid-template-columns: 1fr !important;
  }

  .form-group.full-width {
    grid-column: span 1 !important;
  }

  .tax-preview-panel {
    grid-template-columns: 1fr 1fr !important;
    gap: 0.5rem !important;
  }

  .voucher-body {
    flex-direction: column !important;
  }

  .voucher-qr-col {
    border-right: none !important;
    border-bottom: 1px dashed #cbd5e1 !important;
    padding-bottom: 1rem !important;
    text-align: center !important;
  }

  /* Modal Dialog di Layar HP */
  .modal-dialog {
    margin: 0.75rem !important;
    max-height: 94vh !important;
    width: calc(100% - 1.5rem) !important;
    border-radius: var(--radius-md) !important;
  }

  .modal-header {
    padding: 1rem !important;
  }

  .modal-body {
    padding: 1rem !important;
  }

  .modal-footer {
    padding: 0.75rem 1rem !important;
    flex-direction: column-reverse !important;
    gap: 0.5rem !important;
  }

  .modal-footer .btn {
    width: 100% !important;
    justify-content: center !important;
  }

  /* Tabel SOP & Pajak */
  .table-responsive {
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
}

/* ================= SECURE LOGIN SCREEN ================= */
.login-overlay {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top, #1e293b, #0f172a);
  padding: 1.5rem;
  position: relative;
}

.login-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 440px;
  width: 100%;
  padding: 2.25rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: modalFade 0.3s ease-out;
}

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

.login-header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.login-logo {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  border-radius: var(--radius-md);
  margin: 0 auto 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.35);
}

.login-school-tag {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #2563eb;
  text-transform: uppercase;
}

.login-header h2 {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 2px 0 4px;
}

.login-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.security-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #ecfdf5;
  color: #047857;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  margin-top: 0.75rem;
  border: 1px solid #a7f3d0;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon svg {
  position: absolute;
  left: 12px;
  color: #94a3b8;
  pointer-events: none;
}

.input-with-icon input {
  width: 100%;
  padding: 0.7rem 0.85rem 0.7rem 2.4rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: all 0.2s;
}

.input-with-icon input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.btn-block {
  width: 100%;
  justify-content: center;
  margin-top: 1rem;
}

.login-footer {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-color);
}

.default-cred-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  font-size: 0.78rem;
}

.cred-title {
  font-weight: 700;
  color: #334155;
  display: block;
  margin-bottom: 4px;
}

.cred-item {
  color: #475569;
  margin-bottom: 2px;
}

.cred-item code {
  background: #e2e8f0;
  padding: 1px 5px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: #0f172a;
}

.cred-warning {
  display: block;
  font-size: 0.7rem;
  color: #b45309;
  margin-top: 6px;
  font-style: italic;
}

/* ================= HEADER USER PANEL ================= */
.header-user-panel {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.user-info-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #1e293b;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #e2e8f0;
  border: 1px solid #334155;
}

.user-avatar {
  width: 22px;
  height: 22px;
  background: #2563eb;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.btn-danger-outline {
  background: transparent;
  border: 1px solid #ef4444;
  color: #ef4444;
}

.btn-danger-outline:hover {
  background: #ef4444;
  color: #ffffff;
}

.btn-danger {
  background: #ef4444;
  color: #ffffff;
  border: 1px solid transparent;
}

.btn-danger:hover {
  background: #dc2626;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}

/* ================= POPUP AUTH OVERLAY & CARDS ================= */
.popup-auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.popup-auth-overlay.active {
  display: flex;
  animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.popup-auth-card {
  background: #ffffff;
  border-radius: 20px;
  max-width: 440px;
  width: 100%;
  padding: 2.25rem 2rem;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.8);
  position: relative;
  overflow: hidden;
  animation: popScale 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popScale {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}

/* Icon & Pulse Effects */
.popup-icon-wrap {
  position: relative;
  width: 82px;
  height: 82px;
  margin: 0 auto 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-pulse-glow {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  opacity: 0.45;
  animation: pulseAura 2s infinite ease-out;
}

.icon-pulse-glow.green { background: radial-gradient(circle, #10b981, transparent); }
.icon-pulse-glow.red   { background: radial-gradient(circle, #ef4444, transparent); }
.icon-pulse-glow.blue  { background: radial-gradient(circle, #3b82f6, transparent); }

@keyframes pulseAura {
  0% { transform: scale(0.9); opacity: 0.5; }
  50% { transform: scale(1.15); opacity: 0.25; }
  100% { transform: scale(0.9); opacity: 0.5; }
}

.icon-circle {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.icon-circle.green { background: linear-gradient(135deg, #10b981, #059669); color: #ffffff; }
.icon-circle.red   { background: linear-gradient(135deg, #ef4444, #dc2626); color: #ffffff; }
.icon-circle.blue  { background: linear-gradient(135deg, #3b82f6, #2563eb); color: #ffffff; }

.animated-check path {
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: drawCheck 0.6s 0.2s ease forwards;
}

@keyframes drawCheck {
  to { stroke-dashoffset: 0; }
}

/* Badge & Headings */
.popup-badge {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: 999px;
  display: inline-block;
  margin-bottom: 0.6rem;
  text-transform: uppercase;
}

.popup-badge.green { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.popup-badge.red   { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.popup-badge.blue  { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }

.popup-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0.35rem;
  letter-spacing: -0.01em;
}

.popup-user-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #2563eb;
  margin-bottom: 0.3rem;
}

.popup-role-pill {
  display: inline-block;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
  margin-bottom: 0.85rem;
  border: 1px solid #cbd5e1;
}

.popup-desc {
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

/* Auto Progress Bar */
.popup-progress-track {
  width: 100%;
  height: 5px;
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.popup-progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  animation: progressFill 1.8s linear forwards;
}

.popup-progress-bar.green { background: linear-gradient(90deg, #10b981, #34d399); }
.popup-progress-bar.blue  { background: linear-gradient(90deg, #3b82f6, #60a5fa); }

@keyframes progressFill {
  0%   { width: 0%; }
  100% { width: 100%; }
}

.popup-actions-row {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.popup-actions-row .btn {
  flex: 1;
  justify-content: center;
}

/* ==========================================================================
   MOBILE RESPONSIVE STYLES (SMARTPHONE OPTIMIZATION)
   ========================================================================== */

@media (max-width: 768px) {
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
  }

  /* 1. HEADER & NAVBAR */
  .header-container {
    padding: 0.75rem 1rem !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.75rem !important;
  }

  .brand {
    width: 100% !important;
    justify-content: flex-start !important;
    gap: 0.65rem !important;
  }

  .brand-logo {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
  }

  .brand-info h1 {
    font-size: 1.1rem !important;
    letter-spacing: -0.01em !important;
  }

  .badge-version {
    font-size: 0.6rem !important;
    padding: 1px 5px !important;
  }

  /* Nav Tabs: High Density 2x2 Grid */
  .nav-tabs {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    width: 100% !important;
    gap: 6px !important;
    padding: 5px !important;
    background: #1e293b !important;
    border-radius: var(--radius-md) !important;
    box-sizing: border-box !important;
  }

  .nav-btn {
    width: 100% !important;
    justify-content: center !important;
    padding: 9px 6px !important;
    font-size: 0.78rem !important;
    white-space: nowrap !important;
    gap: 0.4rem !important;
    box-sizing: border-box !important;
  }

  .nav-btn svg {
    width: 15px !important;
    height: 15px !important;
    shrink-0: 0;
  }

  /* User Info & Actions Panel */
  .header-user-panel {
    width: 100% !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
    justify-content: space-between !important;
    box-sizing: border-box !important;
  }

  .user-info-pill {
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 0.45rem 0.75rem !important;
    font-size: 0.78rem !important;
    box-sizing: border-box !important;
  }

  #btnOpenChangePassword,
  #btnLogout {
    flex: 1 1 calc(50% - 0.25rem) !important;
    justify-content: center !important;
    padding: 0.5rem 0.5rem !important;
    font-size: 0.78rem !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
  }

  /* 2. STATS BAR: 2x2 TELEMETRY GRID */
  .stats-bar {
    padding: 0.75rem 0 !important;
  }

  .stats-container {
    padding: 0 0.85rem !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.6rem !important;
    box-sizing: border-box !important;
  }

  .stat-card {
    padding: 0.65rem 0.75rem !important;
    gap: 0.5rem !important;
    min-width: 0 !important;
    border-radius: var(--radius-sm) !important;
    box-sizing: border-box !important;
  }

  .stat-icon {
    font-size: 1.25rem !important;
  }

  .stat-label {
    font-size: 0.65rem !important;
    line-height: 1.15 !important;
    font-weight: 700 !important;
  }

  .stat-value {
    font-size: 1.35rem !important;
    margin: 1px 0 !important;
  }

  .stat-hint {
    font-size: 0.62rem !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* 3. MAIN CONTENT & TOOLBAR */
  .main-content {
    padding: 1rem 0.85rem !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }

  .toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.6rem !important;
    margin-bottom: 1rem !important;
  }

  .search-box {
    min-width: 0 !important;
    width: 100% !important;
    padding: 0.55rem 0.75rem !important;
    box-sizing: border-box !important;
  }

  .filter-group {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.5rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .filter-group select,
  .filter-group .btn {
    width: 100% !important;
    font-size: 0.8rem !important;
    padding: 0.5rem !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }

  /* 4. ITEMS GRID */
  .items-grid {
    grid-template-columns: 1fr !important;
    gap: 0.85rem !important;
    width: 100% !important;
  }

  .item-card {
    padding: 1rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .item-card-header {
    flex-wrap: wrap !important;
    gap: 0.4rem !important;
  }

  .item-card-actions {
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
  }

  .item-card-actions .btn {
    flex: 1 1 calc(50% - 0.25rem) !important;
    font-size: 0.8rem !important;
    padding: 0.45rem 0.5rem !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }

  /* 5. SCANNER SECTION */
  .scanner-wrapper {
    max-width: 100% !important;
    padding: 0 !important;
  }

  .scanner-card {
    padding: 1.15rem 1rem !important;
    border-radius: var(--radius-md) !important;
  }

  .scanner-header {
    flex-direction: column !important;
    gap: 0.75rem !important;
    align-items: stretch !important;
  }

  .scanner-title h2 {
    font-size: 1.15rem !important;
  }

  .scanner-title p {
    font-size: 0.8rem !important;
  }

  .scanner-controls {
    display: flex !important;
    gap: 0.5rem !important;
    width: 100% !important;
  }

  .scanner-controls .btn {
    flex: 1 !important;
    justify-content: center !important;
    font-size: 0.82rem !important;
    padding: 0.55rem 0.75rem !important;
  }

  .scanner-viewport-container {
    min-height: 240px !important;
    max-height: 340px !important;
    width: 100% !important;
  }

  .scanner-viewport, #reader {
    width: 100% !important;
    max-width: 100% !important;
  }

  #reader video {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    object-fit: cover !important;
  }

  .guide-box {
    width: 170px !important;
    height: 170px !important;
  }

  .manual-input-row {
    flex-direction: column !important;
    gap: 0.5rem !important;
  }

  .manual-input-row input,
  .manual-input-row button {
    width: 100% !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }

  /* 6. FORM RENCANA BELANJA */
  .form-wrapper {
    max-width: 100% !important;
  }

  .form-card {
    padding: 1.25rem 1rem !important;
    border-radius: var(--radius-md) !important;
  }

  .form-header h2 {
    font-size: 1.15rem !important;
  }

  .form-grid {
    grid-template-columns: 1fr !important;
    gap: 0.85rem !important;
  }

  .form-group.full-width {
    grid-column: span 1 !important;
  }

  .tax-options-grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }

  .tax-preview-panel {
    grid-template-columns: 1fr 1fr !important;
    gap: 0.5rem !important;
  }

  .form-actions {
    width: 100% !important;
  }

  .form-actions .btn {
    width: 100% !important;
    justify-content: center !important;
  }

  /* 7. MODAL DIALOGS */
  .modal-overlay {
    padding: 0.5rem !important;
    align-items: flex-end !important;
  }

  .modal-dialog {
    max-width: 100% !important;
    width: 100% !important;
    max-height: 94vh !important;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
    margin: 0 !important;
  }

  .modal-header {
    padding: 1rem 0.85rem !important;
  }

  .modal-body {
    padding: 1rem 0.85rem !important;
    gap: 1rem !important;
  }

  .item-detail-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 0.5rem !important;
  }

  .arkas-copy-grid {
    grid-template-columns: 1fr !important;
    gap: 0.5rem !important;
  }

  .mark-arkas-inputs {
    flex-direction: column !important;
    gap: 0.5rem !important;
  }

  .mark-arkas-inputs input,
  .mark-arkas-inputs button {
    width: 100% !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }

  .modal-footer {
    padding: 0.85rem !important;
    flex-direction: column-reverse !important;
    gap: 0.5rem !important;
  }

  .modal-footer .btn {
    width: 100% !important;
    justify-content: center !important;
  }

  /* 8. SOP & TAX TABLE */
  .table-responsive {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .cheatsheet-table {
    font-size: 0.75rem !important;
    min-width: 520px !important;
  }

  /* 9. LOGIN VIEW */
  .login-overlay {
    padding: 1rem !important;
  }

  .login-card {
    padding: 1.5rem 1.25rem !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
}



