/* =========================================================
   AUTO KACA — Cetak WO
   Pastel & fresh theme
   ========================================================= */

:root {
  /* Palette */
  --bg-1: #F0FDFA;          /* mint top */
  --bg-2: #EFF6FF;          /* sky bottom */
  --surface: #FFFFFF;
  --surface-soft: #F8FAFC;
  --border: #E2E8F0;
  --border-soft: #EEF2F6;

  --ink-1: #0F172A;         /* primary text */
  --ink-2: #475569;         /* secondary text */
  --ink-3: #94A3B8;         /* tertiary text */

  /* Pastel accents */
  --mint: #5EEAD4;
  --mint-deep: #14B8A6;
  --sky: #7DD3FC;
  --sky-deep: #0EA5E9;
  --peach: #FED7AA;
  --lemon: #FEF3C7;

  /* Status */
  --ok-bg: #D1FAE5;
  --ok-fg: #065F46;
  --ok-ring: #6EE7B7;
  --bad-bg: #FEE2E2;
  --bad-fg: #991B1B;
  --bad-ring: #FCA5A5;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow-md: 0 6px 24px -8px rgba(15, 23, 42, .12), 0 2px 6px -2px rgba(15, 23, 42, .06);
  --shadow-lg: 0 24px 64px -20px rgba(15, 23, 42, .18), 0 8px 20px -8px rgba(15, 23, 42, .08);

  /* Radii */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-pill: 999px;

  /* Type */
  --f-display: "Bricolage Grotesque", "Plus Jakarta Sans", system-ui, sans-serif;
  --f-body: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Pastikan atribut `hidden` HTML selalu menyembunyikan elemen,
   walau ada aturan display: grid/flex/inline-flex pada CSS lain.
   Tanpa ini, modal & toast tetap tampil karena display: grid
   menang atas UA stylesheet [hidden] { display:none }. */
[hidden] {
  display: none !important;
}

html { -webkit-text-size-adjust: 100%; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-1);
  background:
    radial-gradient(120% 80% at 100% 0%, #ECFEFF 0%, transparent 60%),
    radial-gradient(120% 80% at 0% 100%, #EFF6FF 0%, transparent 55%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 100%);
  background-attachment: fixed;
  position: relative;
  overflow-x: hidden;
}

/* ---------- Decorative background ---------- */
.bg-decor {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .55;
}
.blob--mint  { width: 380px; height: 380px; background: #A7F3D0; top: -120px; left: -100px; }
.blob--sky   { width: 460px; height: 460px; background: #BAE6FD; top: 35%; right: -160px; }
.blob--peach { width: 320px; height: 320px; background: #FED7AA; bottom: -120px; left: 30%; opacity: .35; }

/* ---------- Header ---------- */
.site-header {
  position: relative;
  z-index: 1;
  padding: 56px 24px 16px;
  text-align: center;
}

.brand-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 8px;
  background: rgba(255, 255, 255, .7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}
.brand-logo {
  width: 32px; height: 32px;
  display: grid; place-items: center;
}
.brand-logo svg { width: 100%; height: 100%; }
.brand-tag {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-1);
}

.page-title {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(38px, 6.5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink-1);
  margin-bottom: 18px;
}
.title-accent {
  background: linear-gradient(120deg, var(--mint-deep), var(--sky-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-style: italic;
  font-weight: 700;
}

.clock {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: 15px;
  color: var(--ink-2);
  margin-bottom: 22px;
}
.clock-date { color: var(--ink-2); }
.clock-time {
  color: var(--ink-1);
  background: rgba(255, 255, 255, .75);
  padding: 4px 10px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-soft);
}
.clock-dot { color: var(--ink-3); }

.welcome-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: rgba(255, 255, 255, .85);
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
}
.welcome-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--mint-deep);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, .18);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: .85; }
}

/* ---------- Layout ---------- */
.container {
  position: relative;
  z-index: 1;
  flex: 1;
  width: 100%;
  max-width: 880px;
  margin: 32px auto 0;
  padding: 0 24px 48px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Wider variant — dipakai di halaman log agar tabel tidak terpotong */
.container--wide {
  max-width: 1400px;
  padding: 0 32px 48px;
}

/* ---------- Card ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
  padding: 40px;
  box-shadow: var(--shadow-lg);
}

.card-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 28px;
}
.card-head-icon {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #ECFEFF, #DBEAFE);
  color: var(--sky-deep);
  border: 1px solid #BAE6FD;
}
.card-head-icon svg { width: 22px; height: 22px; }
.card-head-icon--success {
  background: linear-gradient(135deg, #D1FAE5, #A7F3D0);
  color: var(--ok-fg);
  border-color: var(--ok-ring);
}
.card-title {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.01em;
  color: var(--ink-1);
  margin-bottom: 4px;
}
.card-sub {
  font-size: 14px;
  color: var(--ink-2);
}

/* ---------- Textarea ---------- */
.input-wrap {
  position: relative;
  margin-bottom: 20px;
}
.wo-textarea {
  width: 100%;
  min-height: 180px;
  padding: 20px 22px;
  font-family: var(--f-mono);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.8;
  color: var(--ink-1);
  background: var(--surface-soft);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  outline: none;
  resize: vertical;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.wo-textarea::placeholder {
  color: var(--ink-3);
  font-weight: 400;
}
.wo-textarea:hover {
  border-color: #CBD5E1;
}
.wo-textarea:focus {
  background: #FFFFFF;
  border-color: var(--sky);
  box-shadow: 0 0 0 4px rgba(125, 211, 252, .25);
}

.input-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding: 0 4px;
}
.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.dot--mint { background: var(--mint-deep); }

.link-btn {
  background: none;
  border: none;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-3);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: color .15s, background .15s;
}
.link-btn:hover { color: var(--ink-1); background: var(--surface-soft); }

/* ---------- Primary button ---------- */
.primary-btn {
  position: relative;
  width: 100%;
  padding: 18px 24px;
  border: none;
  border-radius: var(--r-lg);
  background: linear-gradient(120deg, #34D399 0%, #22D3EE 60%, #38BDF8 100%);
  color: white;
  font-family: var(--f-body);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .08em;
  cursor: pointer;
  box-shadow: 0 8px 24px -6px rgba(56, 189, 248, .55), inset 0 1px 0 rgba(255, 255, 255, .3);
  transition: transform .12s ease, box-shadow .15s ease, filter .15s;
  overflow: hidden;
}
.primary-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px -6px rgba(56, 189, 248, .65), inset 0 1px 0 rgba(255, 255, 255, .35);
  filter: saturate(1.05);
}
.primary-btn:active:not(:disabled) { transform: translateY(0); }
.primary-btn:disabled {
  cursor: not-allowed;
  filter: saturate(.45) brightness(1.05);
}

.btn-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: opacity .2s;
}
.btn-ico { width: 18px; height: 18px; }

.btn-spinner {
  position: absolute;
  top: 50%; left: 50%;
  width: 22px; height: 22px;
  margin: -11px 0 0 -11px;
  border: 2.5px solid rgba(255, 255, 255, .35);
  border-top-color: white;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  animation: spin .8s linear infinite;
}
.primary-btn.loading .btn-label { opacity: 0; }
.primary-btn.loading .btn-spinner { opacity: 1; }
@keyframes spin { to { transform: rotate(360deg); } }

.primary-btn--compact {
  width: auto;
  padding: 12px 24px;
  font-size: 14px;
}

/* ---------- Ghost button ---------- */
.ghost-btn {
  padding: 12px 24px;
  background: var(--surface-soft);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--ink-2);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.ghost-btn:hover {
  background: white;
  color: var(--ink-1);
  border-color: #CBD5E1;
}

/* ---------- Result card / Table ---------- */
.result-card {
  animation: rise .35s cubic-bezier(.2, .8, .2, 1);
}
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.table-wrap {
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: 24px;
}
.result-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.result-table thead {
  background: var(--surface-soft);
}
.result-table th {
  text-align: left;
  padding: 14px 18px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
  border-bottom: 1px solid var(--border-soft);
}
.result-table td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle;
}
.result-table tbody tr:last-child td { border-bottom: none; }
.result-table tbody tr {
  transition: background .15s;
}
.result-table tbody tr:hover { background: #FAFBFD; }

.cell-wo {
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: 14px;
  color: var(--ink-1);
}

/* Status badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .08em;
}
.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.badge--ok {
  background: var(--ok-bg);
  color: var(--ok-fg);
  box-shadow: inset 0 0 0 1px var(--ok-ring);
}
.badge--ok::before { background: #059669; }
.badge--bad {
  background: var(--bad-bg);
  color: var(--bad-fg);
  box-shadow: inset 0 0 0 1px var(--bad-ring);
}
.badge--bad::before { background: #DC2626; }

/* File link */
.file-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--sky-deep);
  text-decoration: none;
  padding: 6px 12px;
  margin-left: -12px;
  border-radius: 8px;
  transition: background .15s, color .15s;
  max-width: 100%;
}
.file-link:hover { background: #F0F9FF; color: #0369A1; }
.file-link svg { width: 14px; height: 14px; flex: 0 0 auto; }
.file-link .name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 240px;
}

.no-file {
  font-size: 13px;
  color: var(--ink-3);
  font-style: italic;
}

/* Folder button */
.folder-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  background: var(--surface-soft);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--ink-1);
  text-decoration: none;
  transition: background .15s, transform .12s, border-color .15s;
}
.folder-btn:hover {
  background: white;
  border-color: var(--sky);
  transform: translateY(-1px);
}
.folder-btn svg { width: 18px; height: 18px; color: var(--mint-deep); }
.external-ico {
  margin-left: 4px;
  color: var(--ink-3);
  font-size: 13px;
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding: 28px 24px;
  background: rgba(255, 255, 255, .75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid var(--border-soft);
  text-align: center;
  font-size: 13px;
}
.foot-line { color: var(--ink-3); margin-right: 8px; }
.foot-brand {
  font-family: var(--f-display);
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--ink-1);
}

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15, 23, 42, .35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 20px;
  animation: fade .18s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.modal {
  width: 100%;
  max-width: 440px;
  background: white;
  border-radius: var(--r-xl);
  padding: 36px 32px 28px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: pop .25s cubic-bezier(.2, .8, .2, 1);
}
@keyframes pop {
  from { opacity: 0; transform: translateY(10px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-ico {
  width: 60px; height: 60px;
  margin: 0 auto 20px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #FEF3C7, #FED7AA);
  color: #B45309;
  border: 1px solid #FCD34D;
}
.modal-ico svg { width: 30px; height: 30px; }

.modal-title {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--ink-1);
  margin-bottom: 10px;
}
.modal-body {
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.6;
  margin-bottom: 28px;
}
.modal-body strong { color: var(--ink-1); }
.modal-body em {
  font-style: normal;
  font-weight: 700;
  background: var(--lemon);
  padding: 1px 8px;
  border-radius: 6px;
  color: #92400E;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.modal-actions .ghost-btn,
.modal-actions .primary-btn--compact {
  flex: 1;
  max-width: 160px;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  z-index: 200;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: white;
  border: 1px solid var(--border-soft);
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-md);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-1);
  opacity: 0;
  transition: opacity .2s ease, transform .25s cubic-bezier(.2, .8, .2, 1);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast-ico {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--lemon);
  color: #92400E;
  font-weight: 800;
  font-size: 13px;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .site-header { padding: 36px 18px 8px; }
  .container { padding: 0 16px 40px; gap: 20px; }
  .card { padding: 28px 22px; border-radius: var(--r-lg); }
  .card-head { gap: 12px; margin-bottom: 22px; }
  .card-title { font-size: 20px; }
  .result-table th, .result-table td { padding: 12px 14px; }
  .file-link .name { max-width: 120px; }
  .modal { padding: 30px 22px 22px; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions .ghost-btn,
  .modal-actions .primary-btn--compact { max-width: 100%; width: 100%; }
  .folder-btn { width: 100%; justify-content: center; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* =========================================================
   USER BADGE (top-right pada halaman utama)
   ========================================================= */
.user-badge {
  position: fixed;
  top: 20px;
  right: 24px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 8px 14px;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-md);
  font-size: 13px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.user-badge:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid white;
  background: var(--surface-soft);
}
.user-avatar--fallback {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--mint), var(--sky));
  color: white;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 15px;
  border: none;
}

.user-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  min-width: 0;
}
.user-name {
  font-weight: 700;
  color: var(--ink-1);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 160px;
}
.user-email {
  color: var(--ink-3);
  font-size: 11.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 160px;
}

.user-logout {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--ink-3);
  background: transparent;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.user-logout:hover {
  background: var(--bad-bg);
  color: var(--bad-fg);
}
.user-logout svg { width: 16px; height: 16px; }

/* =========================================================
   LOGIN PAGE
   ========================================================= */
.login-body {
  min-height: 100vh;
  display: flex;
}

.login-wrap {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  gap: 24px;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: white;
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
  padding: 44px 40px 36px;
  box-shadow: var(--shadow-lg);
  text-align: center;
  animation: rise .35s cubic-bezier(.2, .8, .2, 1);
}

.login-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 8px;
  background: var(--surface-soft);
  border-radius: var(--r-pill);
  margin-bottom: 28px;
}
.login-logo {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
}
.login-logo svg { width: 100%; height: 100%; }
.login-brand-tag {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-1);
}

.login-title {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 32px;
  letter-spacing: -0.02em;
  color: var(--ink-1);
  margin-bottom: 10px;
}

.login-sub {
  font-size: 14.5px;
  color: var(--ink-2);
  line-height: 1.6;
  margin-bottom: 28px;
}
.login-domain {
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: 13.5px;
  background: var(--lemon);
  color: #92400E;
  padding: 2px 8px;
  border-radius: 6px;
}

.login-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bad-bg);
  color: var(--bad-fg);
  border: 1px solid var(--bad-ring);
  border-radius: var(--r-md);
  text-align: left;
  font-size: 13.5px;
  line-height: 1.5;
  margin-bottom: 24px;
}
.login-alert svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin-top: 1px;
}
.login-alert strong { font-weight: 700; }

.google-btn {
  /* Tidak dipakai lagi setelah ganti ke form login.
     Kept for legacy / kalau nanti dikembalikan ke Google OAuth. */
  display: none;
}

/* ----- Form login (email + nama) ----- */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
  margin-bottom: 4px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-2);
  letter-spacing: .04em;
}
.form-optional {
  font-weight: 500;
  color: var(--ink-3);
  margin-left: 4px;
  font-size: 11.5px;
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--f-body);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-1);
  background: var(--surface-soft);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.form-input::placeholder {
  color: var(--ink-3);
  font-weight: 400;
}
.form-input:hover {
  border-color: #CBD5E1;
}
.form-input:focus {
  background: white;
  border-color: var(--sky);
  box-shadow: 0 0 0 4px rgba(125, 211, 252, .25);
}

.primary-btn--login {
  margin-top: 8px;
}
.primary-btn--login .btn-ico {
  margin-left: 4px;
  transition: transform .15s;
}
.primary-btn--login:hover:not(:disabled) .btn-ico {
  transform: translateX(2px);
}

.login-foot {
  margin-top: 24px;
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.6;
}

.login-credit {
  font-size: 12.5px;
  color: var(--ink-3);
}
.login-credit span {
  font-family: var(--f-display);
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--ink-2);
}

/* Responsive — login & badge */
@media (max-width: 640px) {
  .user-badge {
    top: 12px;
    right: 12px;
    padding: 6px 6px 6px 10px;
  }
  .user-meta { display: none; }   /* di mobile, hanya avatar + logout */
  .user-avatar { width: 32px; height: 32px; }
  .user-logout { width: 28px; height: 28px; }

  .login-card { padding: 32px 24px 28px; border-radius: var(--r-lg); }
  .login-title { font-size: 26px; }
}

/* =========================================================
   NAV TABS (antara header dan main)
   ========================================================= */
.page-nav {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 0 24px 28px;
}

.nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: rgba(255, 255, 255, .7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid var(--border-soft);
  border-radius: var(--r-pill);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: .03em;
  color: var(--ink-2);
  text-decoration: none;
  transition: background .15s, border-color .15s, color .15s, transform .12s;
}
.nav-tab svg { width: 16px; height: 16px; flex: 0 0 auto; }
.nav-tab:hover:not(.nav-tab--active) {
  background: rgba(255, 255, 255, .9);
  border-color: var(--sky);
  color: var(--ink-1);
  transform: translateY(-1px);
}
.nav-tab--active {
  background: white;
  border-color: var(--sky);
  color: var(--sky-deep);
  box-shadow: var(--shadow-sm);
}

/* =========================================================
   LOG PAGE — stats row
   ========================================================= */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 0;
}

.stat-card {
  background: white;
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  box-shadow: var(--shadow-sm);
}
.stat-val {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 36px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink-1);
}
.stat-lbl {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.stat-card--ok  { border-top: 3px solid #6EE7B7; }
.stat-card--ok  .stat-val { color: var(--ok-fg); }
.stat-card--bad { border-top: 3px solid #FCA5A5; }
.stat-card--bad .stat-val { color: var(--bad-fg); }
.stat-card--info { border-top: 3px solid var(--sky); }
.stat-card--info .stat-val { color: var(--sky-deep); }

/* =========================================================
   LOG PAGE — filter card
   ========================================================= */
.filter-card { padding: 24px 32px; }

.filter-form {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 180px;
}
.filter-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.filter-input {
  padding: 11px 14px;
  font-family: var(--f-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-1);
  background: var(--surface-soft);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.filter-input:focus {
  background: white;
  border-color: var(--sky);
  box-shadow: 0 0 0 3px rgba(125, 211, 252, .2);
}
.filter-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  padding-bottom: 1px;
}
.filter-active-info {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
  font-size: 13px;
  color: var(--ink-2);
}
.filter-active-info strong { color: var(--ink-1); }

/* =========================================================
   LOG TABLE — extra cell styles
   ========================================================= */
.log-table .cell-ts {
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-2);
  white-space: nowrap;
}
.log-table .cell-name {
  font-weight: 600;
  font-size: 13.5px;
  color: var(--ink-1);
}
.log-table .cell-email {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--ink-2);
}
.log-table .cell-msg {
  font-size: 12.5px;
  color: var(--ink-2);
  font-style: italic;
}

/* =========================================================
   EMPTY STATE
   ========================================================= */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 12px;
  color: var(--ink-3);
}
.empty-state svg {
  width: 44px;
  height: 44px;
  opacity: .4;
}
.empty-state p {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-2);
}

/* Responsive log page */
@media (max-width: 700px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .stat-val { font-size: 28px; }
  .filter-form { flex-direction: column; }
  .filter-group { min-width: 100%; }
  .filter-actions { width: 100%; }
  .filter-actions .primary-btn--compact,
  .filter-actions .ghost-btn { flex: 1; text-align: center; justify-content: center; }
  .log-table .cell-email,
  .log-table .cell-ts { display: none; }
}

/* =========================================================
   LOG PAGE — WO filter + highlight
   ========================================================= */
.filter-input--mono {
  font-family: var(--f-mono);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.filter-input--mono::placeholder {
  font-family: var(--f-body);
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
}

/* WO chip di filter-active-info */
.filter-wo-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--f-mono);
  font-size: 12px;
  background: var(--lemon);
  color: #92400E;
  padding: 1px 8px;
  border-radius: 6px;
}
.filter-wo-chip strong { font-weight: 700; }

/* WO result highlight */
.wo-highlight {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--f-mono);
  font-weight: 700;
  font-size: 13.5px;
  color: var(--sky-deep);
  background: #EFF6FF;
  padding: 3px 10px;
  border-radius: 6px;
  border: 1px solid #BFDBFE;
}