/* ============================================================
   paketsolusi.com - Stylesheet utama
   Tema: Vercel-style, LIGHT MODE. Bersih, minimal, interaktif.
   ============================================================ */

:root {
  /* Palet */
  --bg: #ffffff;
  --bg-soft: #fafafa;
  --bg-muted: #f4f4f5;
  --fg: #0a0a0a;
  --fg-soft: #404040;
  --fg-muted: #737373;
  --border: #e5e5e5;
  --border-strong: #d4d4d4;
  --accent: #0070f3;
  --accent-hover: #0060df;
  --accent-soft: #e6f0fe;
  --success: #16a34a;
  --success-soft: #dcfce7;
  --warning: #d97706;
  --warning-soft: #fef3c7;
  --danger: #dc2626;
  --danger-soft: #fee2e2;
  --info: #0070f3;
  --info-soft: #e6f0fe;

  --radius: 8px;
  --radius-lg: 12px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.04);
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 12px 32px rgba(0,0,0,.10);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --sidebar-w: 256px;
  --header-h: 64px;
}

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

html, body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--fg);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: none; }

img { max-width: 100%; }

/* ---------- Layout utilitas ---------- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; }
.gap-4 { gap: 16px; } .gap-6 { gap: 24px; }
.grid { display: grid; }
.mt-1{margin-top:4px}.mt-2{margin-top:8px}.mt-3{margin-top:12px}
.mt-4{margin-top:16px}.mt-6{margin-top:24px}.mt-8{margin-top:32px}
.mb-1{margin-bottom:4px}.mb-2{margin-bottom:8px}.mb-3{margin-bottom:12px}
.mb-4{margin-bottom:16px}.mb-6{margin-bottom:24px}.mb-8{margin-bottom:32px}
.w-full { width: 100%; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }
.text-lg { font-size: 16px; }
.text-xl { font-size: 20px; }
.text-2xl { font-size: 26px; }
.text-muted { color: var(--fg-muted); }
.text-soft { color: var(--fg-soft); }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.hidden { display: none; }
.relative { position: relative; }

/* ---------- Tombol ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 9px 16px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; font-family: var(--font);
  cursor: pointer; border: 1px solid transparent;
  transition: all .15s ease; white-space: nowrap; line-height: 1;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-dark { background: var(--fg); color: #fff; }
.btn-dark:hover { background: #262626; }
.btn-outline { background: var(--bg); color: var(--fg); border-color: var(--border-strong); }
.btn-outline:hover { background: var(--bg-muted); border-color: var(--fg-muted); }
.btn-ghost { background: transparent; color: var(--fg-soft); }
.btn-ghost:hover { background: var(--bg-muted); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-success { background: var(--success); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 12px 22px; font-size: 15px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---------- Kartu ---------- */
.card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
}
.card-pad { padding: 20px; }
.card-header {
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.card-title { font-size: 15px; font-weight: 600; }
.card-body { padding: 20px; }

/* ---------- Badge ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 500;
}
.badge-gray { background: var(--bg-muted); color: var(--fg-soft); }
.badge-blue { background: var(--accent-soft); color: var(--accent); }
.badge-green { background: var(--success-soft); color: var(--success); }
.badge-yellow { background: var(--warning-soft); color: var(--warning); }
.badge-red { background: var(--danger-soft); color: var(--danger); }
.badge-dot::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; display: inline-block;
}

/* ---------- Form ---------- */
.form-group { margin-bottom: 16px; }
.label {
  display: block; font-size: 13px; font-weight: 500;
  margin-bottom: 6px; color: var(--fg-soft);
}
.input, .select, .textarea {
  width: 100%; padding: 9px 12px; font-size: 14px; font-family: var(--font);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--fg); transition: border .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.input::placeholder { color: var(--fg-muted); }
.textarea { resize: vertical; min-height: 90px; }
.input-hint { font-size: 12px; color: var(--fg-muted); margin-top: 5px; }
.input-error { border-color: var(--danger); }

/* ---------- Alert ---------- */
.alert {
  padding: 12px 16px; border-radius: var(--radius); font-size: 13px;
  display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px;
  border: 1px solid transparent;
}
.alert i { font-size: 18px; flex-shrink: 0; }
.alert-info { background: var(--info-soft); color: #0a4ba0; border-color: #bcd6ff; }
.alert-success { background: var(--success-soft); color: #14532d; border-color: #bbf7d0; }
.alert-warning { background: var(--warning-soft); color: #78350f; border-color: #fde68a; }
.alert-danger { background: var(--danger-soft); color: #7f1d1d; border-color: #fecaca; }

/* ---------- Tabel ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  text-align: left; padding: 11px 14px; font-weight: 600;
  color: var(--fg-muted); background: var(--bg-soft);
  border-bottom: 1px solid var(--border); white-space: nowrap;
  font-size: 12px; text-transform: uppercase; letter-spacing: .03em;
}
.table td {
  padding: 12px 14px; border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.table tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: var(--bg-soft); }

/* ---------- Statistik ---------- */
.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.stat-card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 18px 20px;
  transition: box-shadow .2s, transform .2s;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-card .stat-icon {
  width: 38px; height: 38px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; margin-bottom: 12px;
}
.stat-label { font-size: 12px; color: var(--fg-muted); font-weight: 500;
  text-transform: uppercase; letter-spacing: .03em; }
.stat-value { font-size: 24px; font-weight: 700; margin-top: 3px; }

/* ---------- Empty state ---------- */
.empty {
  text-align: center; padding: 48px 20px; color: var(--fg-muted);
}
.empty i { font-size: 44px; opacity: .4; margin-bottom: 12px; display: block; }

/* ---------- Pagination ---------- */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 20px; }
.pagination a, .pagination span {
  padding: 7px 12px; border-radius: var(--radius-sm); font-size: 13px;
  border: 1px solid var(--border); color: var(--fg-soft); background: var(--bg);
}
.pagination a:hover { background: var(--bg-muted); }
.pagination .active { background: var(--fg); color: #fff; border-color: var(--fg); }

/* ---------- WhatsApp floating ---------- */
.wa-float {
  position: fixed; bottom: 24px; right: 24px; z-index: 999;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25d366; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; box-shadow: 0 6px 20px rgba(37,211,102,.45);
  transition: transform .2s; animation: wa-pulse 2.4s infinite;
}
.wa-float:hover { transform: scale(1.1); }
@keyframes wa-pulse {
  0% { box-shadow: 0 6px 20px rgba(37,211,102,.45), 0 0 0 0 rgba(37,211,102,.4); }
  70% { box-shadow: 0 6px 20px rgba(37,211,102,.45), 0 0 0 16px rgba(37,211,102,0); }
  100% { box-shadow: 0 6px 20px rgba(37,211,102,.45), 0 0 0 0 rgba(37,211,102,0); }
}

/* ---------- Skeleton & spinner ---------- */
.spinner {
  width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff; border-radius: 50%;
  animation: spin .6s linear infinite; display: inline-block;
}
.spinner-dark { border-color: var(--border-strong); border-top-color: var(--accent); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Toast ---------- */
.toast-container {
  position: fixed; top: 20px; right: 20px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
}
.toast {
  background: var(--fg); color: #fff; padding: 12px 16px;
  border-radius: var(--radius); font-size: 13px; box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 10px; min-width: 260px;
  animation: toast-in .25s ease;
}
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.info { background: var(--accent); }
@keyframes toast-in {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  display: none; align-items: center; justify-content: center; z-index: 1000;
  padding: 20px; backdrop-filter: blur(2px);
}
.modal-overlay.open { display: flex; animation: fade-in .15s; }
.modal {
  background: var(--bg); border-radius: var(--radius-lg);
  max-width: 480px; width: 100%; box-shadow: var(--shadow-lg);
  animation: modal-in .2s ease;
}
.modal-header { padding: 18px 20px; border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center; }
.modal-body { padding: 20px; }
.modal-footer { padding: 16px 20px; border-top: 1px solid var(--border);
  display: flex; gap: 10px; justify-content: flex-end; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-in {
  from { opacity: 0; transform: translateY(20px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border);
  margin-bottom: 20px; }
.tab {
  padding: 10px 16px; font-size: 14px; font-weight: 500; cursor: pointer;
  color: var(--fg-muted); border-bottom: 2px solid transparent;
  margin-bottom: -1px; transition: color .15s;
}
.tab:hover { color: var(--fg); }
.tab.active { color: var(--fg); border-bottom-color: var(--fg); }

/* ---------- Animasi masuk ---------- */
.fade-up { animation: fade-up .4s ease both; }
@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Responsif ---------- */
@media (max-width: 768px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .hide-mobile { display: none !important; }
}
@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr; }
}
