/* =========================================================
   style.css - FINAL AMAN (Admin + Sprinter)
   - Admin: modal system via .modal + #loginPage.modal
   - Sprinter: login page via .login-container (bukan modal)
   - Tidak ada #loginPage global (yang bikin sprinter rusak)
   ========================================================= */

:root {
  --c-primary: #1a2980;
  --c-accent: #26d0ce;

  --c-bg: #f5f7fa;
  --c-bg2: #c3cfe2;
  --c-surface: #ffffff;
  --c-border: #e0e0e0;
  --c-muted: #666;

  --c-info-bg: #d1ecf1;
  --c-info-text: #0c5460;
  --c-info-border: #bee5eb;

  --c-warn-bg: #fff3cd;
  --c-warn-text: #856404;
  --c-warn-border: #ffeaa7;

  --c-danger-bg: #f8d7da;
  --c-danger-text: #721c24;
  --c-danger-border: #f5c6cb;

  --c-success-bg: #d4edda;
  --c-success-text: #155724;
  --c-success-border: #c3e6cb;

  --shadow-sm: 0 2px 4px rgba(0,0,0,0.10);
  --shadow: 0 4px 12px rgba(0,0,0,0.10);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.15);

  --r-md: 8px;
  --r-lg: 15px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: linear-gradient(135deg, var(--c-bg) 0%, var(--c-bg2) 100%);
  min-height: 100vh;
  color: #333;
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 3px solid rgba(26, 41, 128, 0.25);
  outline-offset: 2px;
  border-radius: 6px;
}

/* =========================================================
   SPRINTER LOGIN (PAGE BIASA, BUKAN MODAL)
   - Sprinter HTML: <div id="loginPage" class="login-container">
   ========================================================= */

.login-container {
  max-width: 420px;
  margin: 100px auto;
  padding: 40px;
  background: var(--c-surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.login-logo {
  width: 100px;
  height: 100px;
  margin: 0 auto 28px;
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-accent) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 40px;
  font-weight: 800;
}

.login-title {
  color: var(--c-primary);
  margin-bottom: 8px;
  font-size: 26px;
  font-weight: 900;
}

.login-subtitle {
  color: var(--c-muted);
  margin-bottom: 26px;
  font-size: 14px;
}

.login-input {
  width: 100%;
  padding: 14px 16px;
  margin-bottom: 16px;
  border: 2px solid var(--c-border);
  border-radius: var(--r-md);
  font-size: 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.login-input:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(26,41,128,0.10);
}

.login-btn {
  width: 100%;
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-accent) 100%);
  color: #fff;
  border: none;
  border-radius: var(--r-md);
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(26,41,128,0.25);
}

.login-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.login-error {
  color: #e74c3c;
  margin-top: 10px;
  font-size: 14px;
  display: none;
}

/* =========================================================
   MODAL SYSTEM (ADMIN)
   Admin HTML uses: <div id="loginPage" class="modal"> ... </div>
   - default modal is flex center (hidden via inline style display:none)
   ========================================================= */

.modal {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 24px;
  background: rgba(0,0,0,0.35);
  z-index: 9998;
}

/* Admin login modal centering only (tidak mengganggu sprinter karena sprinter bukan .modal) */
#loginPage.modal {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 24px;
  background: rgba(0,0,0,0.35);
  z-index: 9999;
}

.modal > .modal-content {
  margin: 0 auto;
  width: min(520px, 92vw);
  max-height: 85vh;
  overflow: auto;
  background: var(--c-surface);
  border-radius: var(--r-lg);
  box-shadow: 0 20px 60px rgba(0,0,0,0.30);
  padding: 22px;
}

/* login admin content */
#loginPage.modal > .modal-content {
  width: min(420px, 92vw) !important;
  max-width: 420px !important;
}

#loadingOverlay .modal-content { width: min(360px, 92vw); }
#viewUploadModal .modal-content { width: min(900px, 96vw); }

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 2px solid #eee;
}

.modal-title {
  color: var(--c-primary);
  font-size: 18px;
  font-weight: 900;
  margin: 0;
}

.modal-close {
  background: #f1f3f5;
  border: none;
  font-size: 16px;
  color: #333;
  cursor: pointer;
  padding: 10px 14px;
  border-radius: 10px;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.modal-close:hover {
  background: #e9ecef;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0,0,0,0.10);
}

/* =========================================================
   DASHBOARD LAYOUT (Admin + Sprinter)
   ========================================================= */

.dashboard-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.dashboard-header {
  background: var(--c-surface);
  border-radius: var(--r-lg);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 15px;
  min-width: 0;
}

.user-avatar {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-accent) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 18px;
  flex: 0 0 auto;
}

.user-details { min-width: 0; }

.user-details h2 {
  color: var(--c-primary);
  margin-bottom: 5px;
  font-size: 18px;
  overflow-wrap: anywhere;
}

.user-details p {
  color: var(--c-muted);
  font-size: 14px;
  overflow-wrap: anywhere;
}

/* Tabs (Admin) */
.tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 2px solid #eee;
  padding-bottom: 10px;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 10px 20px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-size: 16px;
  color: var(--c-muted);
  transition: all 0.2s;
  border-radius: 8px 8px 0 0;
}

.tab-btn:hover {
  background: #f8f9fa;
  color: var(--c-primary);
}

.tab-btn.active {
  color: var(--c-primary);
  border-bottom-color: var(--c-primary);
  background: #f8f9fa;
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--c-surface);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}

.stat-card:hover { transform: translateY(-4px); }

.stat-value {
  font-size: 32px;
  font-weight: 900;
  color: var(--c-primary);
  margin: 10px 0;
}

.stat-label {
  color: var(--c-muted);
  font-size: 14px;
}

/* AWB / Upload Section */
.awb-section {
  background: var(--c-surface);
  border-radius: var(--r-lg);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.section-title {
  color: var(--c-primary);
  margin-bottom: 20px;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
}

.awb-input-group {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.awb-input {
  flex: 1;
  min-width: 250px;
  padding: 12px;
  border: 2px solid var(--c-border);
  border-radius: var(--r-md);
  font-size: 16px;
}

.awb-input:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(26, 41, 128, 0.10);
}

.awb-select {
  flex: 1;
  min-width: 200px;
  padding: 12px;
  border: 2px solid var(--c-border);
  border-radius: var(--r-md);
  font-size: 16px;
  background: white;
  cursor: pointer;
}

.awb-select:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(26, 41, 128, 0.10);
}

/* Action buttons */
.action-btn {
  padding: 12px 20px;
  background: #3498db;
  color: white;
  border: none;
  border-radius: var(--r-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 800;
  transition: all 0.2s;
  user-select: none;
}

.action-btn:hover {
  background: #2980b9;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(41, 128, 185, 0.20);
}

.action-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.action-btn.success { background: #2ecc71; }
.action-btn.success:hover { background: #27ae60; }

/* Upload area */
.upload-area {
  border: 3px dashed #ddd;
  border-radius: var(--r-lg);
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 20px;
  background: #f8f9fa;
}

.upload-area:hover {
  border-color: #3498db;
  background: #f1f8ff;
}

.upload-area.dragover {
  border-color: #2ecc71;
  background: #d4edda;
}

.file-list {
  max-height: 200px;
  overflow-y: auto;
  margin-top: 20px;
}

.file-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-bottom: 1px solid #eee;
  background: white;
  border-radius: var(--r-md);
  margin-bottom: 5px;
}

.file-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.file-icon { color: #3498db; flex: 0 0 auto; }

.file-name {
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.file-size { color: var(--c-muted); font-size: 12px; }

.file-remove {
  background: none;
  border: none;
  color: #e74c3c;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
}

.file-remove:hover { background: #f8d7da; }

/* Preview */
.preview-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 15px;
}

/* Thumbs */
.thumb-container {
  position: relative;
  width: 150px;
  height: 150px;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 2px solid var(--c-border);
  background: white;
}

.thumb-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-overlay {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(0,0,0,0.70);
  color: white;
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 12px;
}

/* Tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--c-surface);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  margin: 20px 0;
}

.data-table th {
  background: #f8f9fa;
  padding: 15px;
  text-align: left;
  font-weight: 900;
  color: var(--c-primary);
  border-bottom: 2px solid #eee;
  font-size: 14px;
  white-space: nowrap;
}

.data-table td {
  padding: 12px 15px;
  border-bottom: 1px solid #eee;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.data-table tr:hover { background: #f8f9fa; }

/* Status badges (Admin + AWB) */
.status-badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.status-pending {
  background: var(--c-warn-bg);
  color: var(--c-warn-text);
  border: 1px solid var(--c-warn-border);
}

.status-delivered {
  background: var(--c-info-bg);
  color: var(--c-info-text);
  border: 1px solid var(--c-info-border);
}

/* Admin sprinter badges */
.status-badge.active {
  background: var(--c-success-bg);
  color: var(--c-success-text);
  border: 1px solid var(--c-success-border);
}

.status-badge.inactive {
  background: var(--c-danger-bg);
  color: var(--c-danger-text);
  border: 1px solid var(--c-danger-border);
}

/* Table action buttons */
.action-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-icon {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-size: 14px;
}

.btn-icon:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 8px rgba(0,0,0,0.12);
}

.btn-icon.view { background: #e3f2fd; color: #1976d2; }
.btn-icon.edit { background: #fff3cd; color: #856404; }
.btn-icon.delete { background: #f8d7da; color: #721c24; }
.btn-icon.download { background: #d4edda; color: #155724; }

/* =========================================================
   ADMIN: Sprinter management UI helpers (optional)
   ========================================================= */

.sprinter-id {
  background: #e3f2fd;
  color: #1976d2;
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 900;
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  letter-spacing: 0.5px;
}

.last-login {
  color: var(--c-muted);
  font-size: 13px;
  font-style: italic;
}

/* Forms (Admin modal forms) */
.form-group { margin-bottom: 14px; }
.form-label { display: block; margin-bottom: 6px; font-weight: 800; color: #444; font-size: 14px; }
.form-input {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--c-border);
  border-radius: var(--r-md);
  background: #fff;
}
.form-input:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(26,41,128,0.10);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-accent) 100%);
  color: #fff;
  border: none;
  border-radius: var(--r-md);
  padding: 10px 16px;
  font-weight: 900;
  cursor: pointer;
}
.btn-primary:hover { opacity: 0.92; }

.btn-secondary {
  background: #6c757d;
  color: #fff;
  border: none;
  border-radius: var(--r-md);
  padding: 10px 16px;
  font-weight: 900;
  cursor: pointer;
}
.btn-secondary:hover { background: #5a6268; }

/* ===== Table polish (safe) ===== */
.data-table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}

.data-table thead th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .3px;
  color: #334155;
  text-transform: uppercase;
}

.data-table tbody td {
  border-bottom: 1px solid #eef2f7;
  vertical-align: middle;
}

.data-table tbody tr:nth-child(even) {
  background: #fbfdff;
}

.data-table tbody tr:hover {
  background: #f1f7ff;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
}

/* ===== Badges (optional) ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid transparent;
  white-space: nowrap;
}

.badge.ok {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}

.badge.warn {
  background: #fffbeb;
  color: #92400e;
  border-color: #fde68a;
}

.badge.info {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.badge.muted {
  background: #f3f4f6;
  color: #374151;
  border-color: #e5e7eb;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 768px) {
  .dashboard-container { padding: 15px; }

  .dashboard-header {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }

  .stats-grid { grid-template-columns: 1fr; }

  .awb-input-group { flex-direction: column; }
  .awb-input, .awb-select { min-width: 100%; }

  .data-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }

  .form-actions { flex-direction: column; }
  .form-actions > * { width: 100%; }

  /* Sprinter login spacing on mobile */
  .login-container {
    margin: 50px auto;
    padding: 26px;
  }
  /* ===== Table polish (safe) ===== */
.data-table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}

.data-table thead th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .3px;
  color: #334155;
  text-transform: uppercase;
}

.data-table tbody td {
  border-bottom: 1px solid #eef2f7;
  vertical-align: middle;
}

.data-table tbody tr:nth-child(even) {
  background: #fbfdff;
}

.data-table tbody tr:hover {
  background: #f1f7ff;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
}

/* ===== Badges ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid transparent;
  white-space: nowrap;
}

.badge.ok {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}

.badge.warn {
  background: #fffbeb;
  color: #92400e;
  border-color: #fde68a;
}

.badge.info {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.badge.muted {
  background: #f3f4f6;
  color: #374151;
  border-color: #e5e7eb;
}

}

@media (max-width: 480px) {
  .status-badge { font-size: 10px; padding: 3px 8px; }
  .thumb-container { width: 120px; height: 120px; }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}



/* Print */
@media print {
  #loginPage.modal,
  #loadingOverlay,
  #addSprinterModal,
  #viewUploadModal,
  .tabs,
  .action-btn {
    display: none !important;
  }

  body { background: #fff; }

  .awb-section,
  .data-table {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}

/* Font Awesome weights (safer) */
.fas, .fa-solid { font-weight: 900 !important; }
.far, .fa-regular { font-weight: 400 !important; }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 4px; }
::-webkit-scrollbar-thumb { background: #c1c1c1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #a8a8a8; }

/* =========================================================
   SPRINTER MOBILE-FIRST (HP ONLY)
   - Aman: hanya menargetkan elemen halaman sprinter
   - Tidak mengganggu admin (admin login pakai #loginPage.modal)
   ========================================================= */

/* Touch-friendly defaults (sprinter only) */
#loginPage.login-container input,
#loginPage.login-container button,
#dashboardPage input,
#dashboardPage select,
#dashboardPage button {
  min-height: 44px;
}

/* ===== Sprinter Login (HP) ===== */
@media (max-width: 768px) {
  #loginPage.login-container {
    max-width: 100%;
    margin: 24px 12px;
    padding: 22px 16px;
    border-radius: 16px;
  }

  #loginPage.login-container .login-logo {
    width: 84px;
    height: 84px;
    margin-bottom: 18px;
  }

  #loginPage.login-container .login-title {
    font-size: 20px;
    line-height: 1.2;
  }

  #loginPage.login-container .login-subtitle {
    font-size: 13px;
  }

  #loginPage.login-container .login-input {
    font-size: 16px; /* cegah zoom iOS */
    padding: 12px 14px;
  }

  #loginPage.login-container .login-btn {
    width: 100%;
    justify-content: center;
    border-radius: 12px;
  }
}

/* ===== Sprinter Dashboard Layout (HP) ===== */
@media (max-width: 768px) {
  #dashboardPage .dashboard-container {
    padding: 14px 12px 28px;
  }

  #dashboardPage .dashboard-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  #dashboardPage .user-info {
    width: 100%;
    gap: 12px;
  }

  #dashboardPage .user-avatar {
    width: 46px;
    height: 46px;
    font-size: 18px;
  }

  #dashboardPage .user-details h2 {
    font-size: 18px;
    line-height: 1.2;
  }

  #dashboardPage .user-details p {
    font-size: 12px;
  }

  /* Logout button full width */
  #dashboardPage #logoutBtn.action-btn {
    width: 100%;
    justify-content: center;
  }

  /* Stats jadi 2 kolom (atau 1 kalau layar kecil) */
  #dashboardPage .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  #dashboardPage .stat-card {
    padding: 14px;
    border-radius: 14px;
  }

  #dashboardPage .stat-value {
    font-size: 26px;
    margin: 6px 0 0;
  }

  #dashboardPage .stat-label {
    font-size: 12px;
  }

  /* Upload section padding lebih rapat */
  #dashboardPage .awb-section {
    padding: 14px;
    border-radius: 14px;
  }

  #dashboardPage .section-title {
    font-size: 16px;
    margin-bottom: 14px;
  }

  /* Input group: 1 kolom */
  #dashboardPage .awb-input-group {
    flex-direction: column;
    gap: 10px;
  }

  #dashboardPage .awb-input,
  #dashboardPage .awb-select {
    min-width: 0;
    width: 100%;
    font-size: 16px; /* cegah zoom iOS */
    border-radius: 12px;
  }

  /* Button CHECK full width */
  #dashboardPage #checkAWBBtn.action-btn {
    width: 100%;
    justify-content: center;
    border-radius: 12px;
  }

  /* Upload area lebih besar & enak ditekan */
  #dashboardPage .upload-area {
    padding: 18px 14px;
    border-radius: 14px;
    min-height: 150px;
  }

  #dashboardPage .upload-area h3 {
    font-size: 14px;
  }

  #dashboardPage .upload-area p {
    font-size: 12px;
  }

  /* Selected files list lebih rapih */
  #dashboardPage .file-list .file-item {
    padding: 10px 10px;
    border-radius: 12px;
  }

  #dashboardPage .file-name {
    max-width: 220px;
  }

  /* Preview grid: 2 kolom */
  #dashboardPage .preview-container {
    gap: 10px;
  }

  #dashboardPage .thumb-container {
    width: calc(50% - 6px);
    height: auto;
    aspect-ratio: 1 / 1;
  }

  /* Tombol UPLOAD/RESET full width & tinggi */
  #dashboardPage #uploadBtn.action-btn,
  #dashboardPage #resetBtn.action-btn {
    flex: 1 1 0;
    width: 100%;
    justify-content: center;
    border-radius: 12px;
  }

  /* Container tombol (div inline style) dibuat wrap */
  #dashboardPage .awb-section > div[style*="display: flex"][style*="gap"] {
    flex-wrap: wrap;
  }
}

@media (max-width: 420px) {
  /* Stats jadi 1 kolom untuk layar kecil */
  #dashboardPage .stats-grid {
    grid-template-columns: 1fr;
  }

  #dashboardPage .file-name {
    max-width: 180px;
  }
}
