@media (min-width: 560px) {
  .form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lokasi-picker { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .kpi-main { grid-column: span 2; }
  .app-content { padding-left: 24px; padding-right: 24px; }
}

@media (max-width: 380px) {
  .app-header h1 { font-size: 16px; }
  .app-header p { font-size: 12px; }
  .brand-logo { width: 40px; height: 40px; }
  .nav-item span { font-size: 11px; }
  .nav-item svg { width: 24px; height: 24px; }
  .app-content { padding-left: 14px; padding-right: 14px; }
  .stat-card strong { font-size: 26px; }
  .kpi-main strong { font-size: 40px; }
  .kpi-abj { padding-right: 88px; }
  .abj-status-icon { width: 62px; height: 62px; right: 12px; top: 14px; border-radius: 16px; }
  .page-title { font-size: 24px; }
  .card { padding: 16px; }
  .login-card-head img { width: 56px; height: 56px; flex-basis: 56px; border-radius: 16px; }
  .login-card-head h3 { font-size: 18px; }
  .login-poster img { max-height: 340px; border-radius: 18px; }
  .lokasi-option { min-height: 104px; padding: 10px 8px; font-size: 13px; }
  .lokasi-option img { width: 48px; height: 48px; }
  .btn { min-height: 52px; font-size: 15px; }
  .input, .select, .textarea { min-height: 52px; font-size: 16px; }
  .indicator-guide { grid-template-columns: 58px minmax(0, 1fr); gap: 10px; padding: 12px; }
  .indicator-code { min-height: 58px; font-size: 17px; }
  .indicator-copy h4 { font-size: 15px; }
  .indicator-copy p, .indicator-copy strong { font-size: 13px; }
  .indicator-copy small, .abj-color-chip { font-size: 12px; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1c19;
    --surface: #142520;
    --surface-2: #1b302a;
    --text: #e6f4f1;
    --muted: #7aada4;
    --line: #25403a;
    --primary-soft: #1a3d38;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
  }
  .input, .select, .textarea { background: #1a2e29; border-color: var(--line); color: var(--text); }
  .input:focus, .select:focus, .textarea:focus { background: #1f3530; }
  .input::placeholder, .textarea::placeholder { color: #4a7068; }
  .login-card-head img,
  .login-poster img { background: #0f1f1b; border-color: var(--line); }
  .lokasi-option { background: #1a2e29; border-color: var(--line); color: var(--text); }
  .lokasi-option:hover { background: #1f3530; }
  .lokasi-option.is-active { background: #173d36; border-color: var(--primary); color: #d5f7ef; }
  .app-header, .bottom-nav { background: rgba(14, 26, 23, 0.97); }
  .list-item, .check-card, .btn-ghost { background: var(--surface); }
  .btn-ghost { color: var(--text); border-color: var(--line); }
  .modal-card { background: var(--surface); color: var(--text); }
  .mobile-table th { background: var(--surface-2); }
}

@media print {
  body { background: #fff; }
  .app-header, .bottom-nav, .btn, .filter-grid, #toastRoot { display: none !important; }
  .app-shell { max-width: none; box-shadow: none; }
  .app-content { padding: 16px; }
  .card { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
  .stat-grid { grid-template-columns: repeat(4, 1fr) !important; }
}
