/* =========================================================
   Theme layer (dimuat setelah Tailwind) — komponen & koreksi
   ========================================================= */

:root {
  --surface: #0d1426;
  --surface-2: #111a2e;
  --line: rgba(148, 163, 184, 0.14);
  --brand: #17a1ee;
  --accent: #f5a524;
}

html, body { max-width: 100%; overflow-x: hidden; }
body { min-height: 100dvh; }

/* ---------- Header / nav ---------- */
.glass-nav {
  background: rgba(10, 16, 32, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.glass-card {
  background: rgba(17, 26, 46, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

/* ---------- Normalisasi form ---------- */
input:not([type="radio"]):not([type="checkbox"]):not([type="hidden"]):not([type="range"]),
select,
textarea {
  min-height: 46px;
  border-radius: 0.75rem !important;
  background-color: rgba(10, 16, 32, 0.85) !important;
  border: 1px solid rgba(148, 163, 184, 0.20) !important;
  font-size: 15px !important;
  transition: border-color .15s ease, box-shadow .15s ease;
}

textarea { min-height: 96px; }

input:not([type="radio"]):not([type="checkbox"]):not([type="hidden"]):focus,
select:focus,
textarea:focus {
  border-color: rgba(23, 161, 238, 0.75) !important;
  box-shadow: 0 0 0 3px rgba(23, 161, 238, 0.18) !important;
  outline: none !important;
}

@media (min-width: 640px) {
  input:not([type="radio"]):not([type="checkbox"]):not([type="hidden"]),
  select,
  textarea { font-size: 14px !important; }
}

/* ---------- Tabel menjadi kartu di layar kecil ---------- */
@media (max-width: 767px) {
  .table-stack,
  .table-stack tbody,
  .table-stack tr,
  .table-stack td { display: block; width: 100%; }

  .table-stack thead { display: none; }

  .table-stack tr {
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 1rem;
    background: rgba(17, 26, 46, 0.65);
    margin: 0 0 0.75rem;
    padding: 0.25rem 0.25rem 0.25rem 0;
    overflow: hidden;
  }

  .table-stack tr:last-child { margin-bottom: 0; }

  .table-stack td {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 0.9rem !important;
    border: 0 !important;
    text-align: right !important;
    white-space: normal !important;
    max-width: none !important;
  }

  .table-stack td::before {
    content: attr(data-label);
    flex: 0 0 42%;
    text-align: left;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #94a3b8;
    padding-top: 2px;
  }

  .table-stack td:empty { display: none; }
}

/* ---------- Animasi ---------- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fadeIn .35s ease-out both; }

@keyframes bounceSubtle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.animate-bounce-subtle { animation: bounceSubtle 2.4s ease-in-out infinite; }

.active-tab {
  background: linear-gradient(135deg, #17a1ee 0%, #0a80cb 100%);
  color: #fff;
  border-color: transparent !important;
  box-shadow: 0 10px 24px -12px rgba(23, 161, 238, 0.8);
}

@media (min-width: 768px) {
  ::-webkit-scrollbar { width: 10px; height: 10px; }
  ::-webkit-scrollbar-track { background: #0a1020; }
  ::-webkit-scrollbar-thumb { background: #24314c; border-radius: 8px; }
  ::-webkit-scrollbar-thumb:hover { background: #31415f; }
}

@media print {
  .no-print { display: none !important; }
}

[x-cloak] { display: none !important; }

/* iOS: hindari auto-zoom pada input di dalam sheet */
@media (max-width: 767px) {
  .sheet input,
  .sheet select,
  .sheet textarea { font-size: 16px !important; }
}
