/* RAHAYU — Biro Jasa Samsat · prototype UI */

:root {
  --red: #e5352b;
  --red-dark: #c62828;
  --red-soft: #fdecec;
  --orange: #ff9500;
  --orange-soft: #fff4e5;
  --green: #1faa4c;
  --green-soft: #e8f8ee;
  --blue: #3478f6;
  --blue-soft: #eaf2ff;
  --yellow-soft: #fff6df;
  --bg: #f2f2f7;
  --card: #ffffff;
  --text: #1c1c1e;
  --text-2: #6e6e73;
  --text-3: #9a9aa0;
  --line: #ececf0;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 6px 20px rgba(0, 0, 0, 0.05);
  --nav-h: 64px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    system-ui, -system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: -0.01em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.modal-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
}

img {
  max-width: 100%;
  display: block;
}

[hidden] {
  display: none !important;
}

/* ---------- App frame ---------- */

.app {
  position: relative;
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  overflow-x: hidden;
}

.page {
  padding: 0 16px 28px;
  animation: pageIn 0.22s ease;
}

.page.has-nav {
  padding-bottom: calc(var(--nav-h) + 32px + env(safe-area-inset-bottom, 0px));
}

.page.no-top-pad {
  padding-top: 0;
}

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (min-width: 520px) {
  body {
    background: #e4e4ea;
    padding: 24px 0;
  }

  .app {
    min-height: calc(100vh - 48px);
    border-radius: 28px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.16);
    overflow: hidden;
  }

  .bottom-nav {
    border-radius: 0 0 28px 28px;
  }
}

/* ---------- Typography helpers ---------- */

.page-title {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 10px 0 14px;
}

.section-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-3);
  text-transform: uppercase;
  margin: 22px 0 10px;
  line-height: 1.3;
}

.muted {
  color: var(--text-2);
}

.small {
  font-size: 13px;
}

.tiny {
  font-size: 12px;
}

.num {
  font-variant-numeric: tabular-nums;
}

/* ---------- Top bars ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 52px;
  padding: 6px 8px;
  background: rgba(242, 242, 247, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.topbar.solid {
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
}

.topbar .icon-btn {
  flex: 0 0 auto;
}

.topbar h1 {
  flex: 1;
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  text-align: center;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.topbar .icon-btn:last-child,
.topbar .spacer {
  margin-left: auto;
}

.topbar .side {
  min-width: 40px;
  display: flex;
  justify-content: flex-end;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  color: var(--text);
}

.icon-btn:active {
  background: rgba(0, 0, 0, 0.05);
}

/* ---------- Cards ---------- */

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}

.card + .card {
  margin-top: 12px;
}

.card-click {
  display: block;
  transition: transform 0.12s ease;
}

.card-click:active {
  transform: scale(0.985);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  transition: transform 0.12s ease, filter 0.12s ease;
}

.btn:active {
  transform: scale(0.98);
  filter: brightness(0.96);
}

.btn-primary {
  background: var(--red);
  color: #fff;
  box-shadow: 0 8px 20px rgba(229, 53, 43, 0.28);
}

.btn-soft {
  background: var(--red-soft);
  color: var(--red);
}

.btn-ghost {
  background: #f4f4f7;
  color: var(--text);
}

.btn-outline {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-sm {
  min-height: 40px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 12px;
}

.btn-wa {
  background: #25d366;
  color: #fff;
  width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35);
}

.btn-wa svg {
  width: 22px;
  height: 22px;
}

.link-btn {
  color: var(--text-2);
  font-size: 15px;
  font-weight: 500;
  min-height: 44px;
  padding: 10px 16px;
}

.cta-stack {
  position: sticky;
  bottom: 12px;
  z-index: 15;
  margin-top: 20px;
}

/* ---------- Badges ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.badge-green {
  background: var(--green-soft);
  color: var(--green);
}

.badge-orange {
  background: var(--orange-soft);
  color: #c36a00;
}

.badge-red {
  background: var(--red-soft);
  color: var(--red);
}

.badge-blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.badge-gray {
  background: #f0f0f4;
  color: var(--text-2);
}

/* ---------- Tabs (pill) ---------- */

.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: #e9e9ef;
  border-radius: 14px;
  margin: 4px 0 14px;
  overflow-x: auto;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  flex: 1 1 auto;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-2);
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.tab.active {
  background: var(--red);
  color: #fff;
  box-shadow: 0 4px 12px rgba(229, 53, 43, 0.25);
}

/* ---------- Tabs (underline) ---------- */

.tabs-line {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin: 14px 0 14px;
}

.tabs-line .tab {
  flex: 1;
  min-height: 44px;
  border-radius: 0;
  background: none !important;
  box-shadow: none !important;
  color: var(--text-3);
  font-size: 15px;
  font-weight: 500;
  position: relative;
}

.tabs-line .tab.active {
  color: var(--red);
}

.tabs-line .tab.active::after {
  content: "";
  position: absolute;
  left: 20%;
  right: 20%;
  bottom: -1px;
  height: 2.5px;
  border-radius: 2px;
  background: var(--red);
}

/* ---------- Bottom navigation ---------- */

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
  padding: 6px 4px env(safe-area-inset-bottom, 0px);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  z-index: 40;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  min-height: 52px;
  color: var(--text-3);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.nav-item.active {
  color: var(--red);
  font-weight: 600;
}

.nav-item:active {
  opacity: 0.7;
}

.nav-new-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-top: -18px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  box-shadow: 0 8px 18px rgba(229, 53, 43, 0.35);
  border: 3px solid #fff;
}

.nav-new span:last-child {
  margin-top: 1px;
}

/* ---------- Toast / modal ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-h) + 20px + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 12px);
  width: max-content;
  max-width: min(360px, calc(100vw - 32px));
  padding: 12px 18px;
  border-radius: 14px;
  background: rgba(28, 28, 30, 0.94);
  color: #fff;
  text-align: center;
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast-msg {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.toast-sub {
  margin-top: 3px;
  font-size: 12px;
  font-weight: 400;
  opacity: 0.8;
  max-width: 300px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
}

@media (min-width: 520px) {
  .modal {
    align-items: center;
  }
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}

.modal-card {
  position: relative;
  width: 100%;
  max-width: 380px;
  background: #fff;
  border-radius: 22px;
  padding: 22px 20px 18px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
  animation: sheetUp 0.22s ease;
}

@keyframes sheetUp {
  from {
    transform: translateY(24px);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

.modal-icon {
  font-size: 34px;
  line-height: 1;
  margin-bottom: 8px;
}

.modal-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin-bottom: 8px;
}

.modal-body {
  color: var(--text-2);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  margin-bottom: 16px;
}

.modal-body p {
  margin: 0;
  white-space: pre-line;
  background: #f6f6f9;
  border-radius: 12px;
  padding: 12px;
  text-align: left;
}

/* ---------- Login / logo ---------- */

.auth {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 24px 32px;
  text-align: center;
  background:
    radial-gradient(1200px 400px at 50% -10%, rgba(229, 53, 43, 0.07), transparent 60%),
    var(--bg);
}

.logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.logo-mark {
  width: 88px;
  height: 56px;
}

.logo-word {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--red);
  line-height: 1.1;
}

.logo-sub {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  letter-spacing: 0.02em;
}

.auth h2 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 36px 0 24px;
  line-height: 1.25;
}

.user-card {
  width: 100%;
  max-width: 300px;
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 22px 16px 18px;
  margin-bottom: 14px;
  transition: transform 0.12s ease;
}

.user-card:active {
  transform: scale(0.97);
}

.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  border-radius: 50%;
  color: #fff;
  font-size: 24px;
  font-weight: 600;
}

.avatar-sm {
  width: 48px;
  height: 48px;
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.user-card .name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.user-card .hint {
  margin-top: 4px;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--text-3);
}

/* ---------- PIN ---------- */

.pin-wrap {
  width: 100%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pin-user {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 26px;
}

.pin-user .name {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.pin-label {
  margin-top: 22px;
  font-size: 14px;
  color: var(--text-2);
  font-weight: 500;
}

.pin-dots {
  display: flex;
  gap: 14px;
  margin: 18px 0 8px;
}

.pin-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #d8d8de;
  transition: background 0.12s ease, transform 0.12s ease;
}

.pin-dot.filled {
  background: var(--red);
  transform: scale(1.08);
}

.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
  margin-top: 18px;
}

.key {
  min-height: 56px;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s ease, background 0.1s ease;
}

.key:active {
  transform: scale(0.95);
  background: #f0f0f4;
}

.key-del {
  background: #2c2c2e;
  color: #fff;
}

.key-del:active {
  background: #3a3a3c;
}

.key-empty {
  visibility: hidden;
  box-shadow: none;
  background: transparent;
}

/* ---------- Home ---------- */

.home-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
}

.home-greet {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.home-greet strong,
.home-greet b {
  font-weight: 600;
}

.home-date {
  margin-top: 5px;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--text-2);
  letter-spacing: -0.01em;
}

.bell {
  position: relative;
  background: #fff;
  box-shadow: var(--shadow);
  border-radius: 50%;
}

.bell-dot {
  position: absolute;
  top: 10px;
  right: 11px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  border: 2px solid #fff;
}

.fee-card {
  margin-top: 16px;
  background: linear-gradient(160deg, #ffecec 0%, #fde2e2 100%);
  border: 1px solid rgba(229, 53, 43, 0.08);
}

.fee-card .label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--red);
}

.fee-card .amount {
  margin-top: 6px;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.fee-card .delta {
  margin-top: 8px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--green);
}

.fee-card .delta span {
  color: var(--text-2);
  font-weight: 400;
}

.fee-bars {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 28px;
  opacity: 0.9;
}

.fee-bars i {
  display: block;
  width: 7px;
  border-radius: 3px;
  background: var(--red);
}

.fee-bars i:nth-child(1) { height: 40%; opacity: 0.45; }
.fee-bars i:nth-child(2) { height: 65%; opacity: 0.65; }
.fee-bars i:nth-child(3) { height: 50%; opacity: 0.55; }
.fee-bars i:nth-child(4) { height: 100%; }

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.stat-card {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 14px;
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow);
  min-height: 92px;
  transition: transform 0.12s ease;
}

.stat-card:active {
  transform: scale(0.97);
}

.stat-icon {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon svg {
  width: 18px;
  height: 18px;
}

.stat-num {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.stat-label {
  margin-top: 5px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.stat-red .stat-icon { background: var(--red-soft); color: var(--red); }
.stat-orange .stat-icon { background: var(--orange-soft); color: var(--orange); }
.stat-blue .stat-icon { background: var(--blue-soft); color: var(--blue); }
.stat-green .stat-icon { background: var(--green-soft); color: var(--green); }

.potential-card {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff5f5;
  border: 1px solid rgba(229, 53, 43, 0.08);
}

.potential-card .target {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--red);
  box-shadow: 0 4px 12px rgba(229, 53, 43, 0.15);
}

.potential-card .label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  color: var(--red);
}

.potential-card .amount {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.potential-card .hint {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-2);
  margin-top: 3px;
  line-height: 1.35;
}

.home-cta {
  margin-top: 16px;
  min-height: 54px;
  font-size: 15.5px;
  font-weight: 600;
}

.alert-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.alert-item .grow {
  flex: 1;
  min-width: 0;
}

.alert-item .title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.alert-item .sub {
  margin-top: 2px;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-2);
  line-height: 1.35;
}

.alert-item .warn {
  color: var(--red);
  font-weight: 500;
}

/* ---------- List rows (follow-up / vehicles / customers) ---------- */

.list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.row-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px;
  transition: transform 0.12s ease;
}

.row-card:active {
  transform: scale(0.985);
}

.date-chip {
  flex: 0 0 auto;
  width: 58px;
  text-align: center;
  padding: 8px 4px;
  border-radius: 12px;
  background: var(--red-soft);
}

.date-chip .d {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-2);
  line-height: 1.2;
}

.date-chip .days {
  margin-top: 3px;
  font-size: 14px;
  font-weight: 600;
  color: var(--red);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.date-chip.soon .days {
  color: var(--red);
}

.date-chip.later {
  background: var(--orange-soft);
}

.date-chip.later .days {
  color: #c36a00;
}

.row-main {
  flex: 1;
  min-width: 0;
}

.row-main .plate {
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.row-main .meta {
  margin-top: 2px;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--text-2);
  line-height: 1.35;
}

.row-main .meta strong {
  color: var(--text);
  font-weight: 500;
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.chev {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 44px;
  color: var(--text-3);
}

.plate-only {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.due-tag {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
}

/* ---------- Search ---------- */

.search {
  position: relative;
  margin-bottom: 12px;
}

.search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  pointer-events: none;
}

.search input {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px 10px 42px;
  border-radius: 14px;
  border: none;
  background: #e9e9ef;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: -0.01em;
  outline: none;
}

.search input:focus {
  background: #fff;
  box-shadow: 0 0 0 2px rgba(229, 53, 43, 0.35);
}

.empty-state {
  text-align: center;
  color: var(--text-3);
  padding: 32px 12px;
  font-size: 13px;
  font-weight: 400;
}

/* ---------- Vehicle detail ---------- */

.v-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
}

.v-plate {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.info-list {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.info-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.info-row .ico {
  width: 22px;
  display: flex;
  color: var(--text-3);
}

.info-row .val {
  font-weight: 500;
}

.due-card {
  margin-top: 14px;
  background: var(--yellow-soft);
  border: 1px solid rgba(255, 149, 0, 0.18);
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.due-card .ico {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--orange);
  box-shadow: 0 4px 10px rgba(255, 149, 0, 0.15);
}

.due-card .label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-2);
  text-transform: uppercase;
}

.due-card .date {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-top: 2px;
  line-height: 1.25;
}

.due-card .left {
  margin-top: 2px;
  font-size: 13px;
  font-weight: 500;
  color: var(--red);
}

.timeline {
  display: flex;
  flex-direction: column;
}

.tl-item {
  display: flex;
  gap: 12px;
  padding: 4px 0;
}

.tl-rail {
  flex: 0 0 auto;
  width: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tl-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d0d0d6;
  margin-top: 6px;
  box-shadow: 0 0 0 3px #f2f2f7;
}

.tl-item:first-child .tl-dot {
  background: var(--red);
}

.tl-line {
  flex: 1;
  width: 2px;
  background: #e4e4ea;
  margin: 4px 0 0;
  min-height: 18px;
}

.tl-item:last-child .tl-line {
  display: none;
}

.tl-body {
  flex: 1;
  min-width: 0;
  padding-bottom: 16px;
}

.tl-date {
  font-size: 12px;
  color: var(--text-3);
  font-weight: 400;
}

.tl-title {
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-top: 1px;
  line-height: 1.3;
}

.tl-meta {
  font-size: 12.5px;
  font-weight: 400;
  color: var(--text-2);
  margin-top: 2px;
}

.tl-end {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
}

/* ---------- Forms ---------- */

.field {
  margin-top: 16px;
}

.field > label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text-2);
  margin-bottom: 7px;
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: #fff;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: -0.01em;
  outline: none;
  transition: border-color 0.15s ease;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--red);
}

.textarea {
  min-height: 96px;
  resize: vertical;
}

.input-group {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.input-group:focus-within {
  border-color: var(--red);
}

.input-group .prefix {
  display: flex;
  align-items: center;
  padding: 0 4px 0 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  background: #fafafc;
}

.input-group .input {
  border: none;
  border-radius: 0;
  text-align: right;
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.input-group .suffix-btn {
  width: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  background: #fafafc;
}

.vehicle-preview {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 10px;
}

.car-thumb {
  flex: 0 0 auto;
  width: 78px;
  height: 60px;
  border-radius: 12px;
  background: linear-gradient(160deg, #f0f0f4, #e4e4ea);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9a9aa0;
}

.vehicle-preview .plate {
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.vehicle-preview .meta {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-2);
  margin-top: 2px;
}

.total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding: 14px 16px;
  background: var(--blue-soft);
  border-radius: 14px;
}

.total-row .label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  letter-spacing: -0.01em;
}

.total-row .val {
  font-size: 22px;
  font-weight: 600;
  color: var(--blue);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.kv {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  font-size: 14px;
  letter-spacing: -0.01em;
}

.kv + .kv {
  border-top: 1px solid var(--line);
}

.kv .k {
  color: var(--text-2);
  font-weight: 500;
}

.kv .v {
  font-weight: 600;
  text-align: right;
}

/* ---------- Documents ---------- */

.note-banner {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--blue-soft);
  color: #1b5fd1;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}

.note-banner svg {
  flex: 0 0 auto;
  margin-top: 1px;
}

.doc-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
  margin-bottom: 12px;
}

.doc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.doc-head .name {
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.doc-empty {
  border: 1.5px dashed #d8d8de;
  border-radius: 14px;
  background: #fafafc;
  min-height: 132px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-3);
  text-align: center;
  padding: 16px;
}

.doc-empty .cam {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #efeff4;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
}

.doc-empty .hint {
  font-size: 13px;
  font-weight: 500;
}

.doc-photo {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  min-height: 150px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 45%),
    repeating-linear-gradient(
      180deg,
      transparent,
      transparent 13px,
      rgba(40, 60, 120, 0.07) 13px,
      rgba(40, 60, 120, 0.07) 14px
    ),
    linear-gradient(160deg, #f4efe2 0%, #e7dcc4 55%, #ddd2b8 100%);
}

.doc-photo::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 14px;
  width: 46px;
  height: 58px;
  border-radius: 6px;
  background: linear-gradient(180deg, #cfd8e8, #aeb9cf);
  opacity: 0.75;
}

.doc-photo::after {
  content: attr(data-watermark);
  position: absolute;
  right: 12px;
  bottom: 10px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: rgba(160, 60, 50, 0.45);
  text-transform: uppercase;
}

.doc-photo .stamp {
  position: absolute;
  top: 18px;
  right: 16px;
  width: 54px;
  height: 54px;
  border: 2.5px solid rgba(190, 50, 40, 0.35);
  border-radius: 50%;
  transform: rotate(-14deg);
}

.doc-photo .photo-x {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(28, 28, 30, 0.72);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 500;
}

.doc-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.doc-actions .btn {
  min-height: 44px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* ---------- Transaction detail ---------- */

.tx-hero {
  text-align: left;
}

.tx-id {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.tx-date {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-2);
  margin-top: 2px;
}

.tx-head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.thumb-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.thumb {
  text-align: center;
}

.thumb .pic {
  height: 88px;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  background:
    repeating-linear-gradient(
      180deg,
      transparent,
      transparent 9px,
      rgba(40, 60, 120, 0.08) 9px,
      rgba(40, 60, 120, 0.08) 10px
    ),
    linear-gradient(160deg, #f2ecdc, #ddd2b6);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.thumb .pic.missing {
  background: #f4f4f7;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  box-shadow: inset 0 0 0 1.5px #e4e4ea;
}

.thumb .cap {
  margin-top: 6px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-2);
  letter-spacing: -0.01em;
}

.add-doc {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 50px;
  margin-top: 14px;
  border-radius: 14px;
  border: 1.5px dashed #d8d8de;
  background: #fafafc;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-2);
}

/* ---------- Customers / more ---------- */

.cust-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 12px 14px 14px;
}

.cust-card:active {
  transform: scale(0.985);
}

.cust-card .grow {
  flex: 1;
  min-width: 0;
}

.cust-card .name {
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.cust-card .phone {
  font-size: 13.5px;
  font-weight: 400;
  color: var(--text-2);
  margin-top: 1px;
}

.cust-card .count {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-3);
  margin-top: 2px;
}

.avatar-blue { background: #3478f6; }
.avatar-purple { background: #9b59f6; }
.avatar-teal { background: #2bb3a3; }
.avatar-pink { background: #e85d9c; }
.avatar-orange { background: #ff9500; }
.avatar-red { background: var(--red); }

.fab {
  position: fixed;
  right: max(16px, calc(50% - 215px + 16px));
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 28px rgba(229, 53, 43, 0.4);
  z-index: 35;
}

.fab:active {
  transform: scale(0.94);
}

.menu-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 14px 16px;
  text-align: left;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.menu-item + .menu-item {
  border-top: 1px solid var(--line);
}

.menu-item:active {
  background: #f7f7fa;
}

.menu-item .m-ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-item .m-ico.red { background: var(--red-soft); color: var(--red); }
.menu-item .m-ico.blue { background: var(--blue-soft); color: var(--blue); }
.menu-item .m-ico.orange { background: var(--orange-soft); color: var(--orange); }

.menu-item .m-sub {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-3);
  margin-top: 1px;
  letter-spacing: -0.01em;
}

.menu-item .grow {
  flex: 1;
}

.more-user {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

/* ---------- Reports ---------- */

.report-hero {
  background: linear-gradient(160deg, #ffecec, #fde2e2);
  border: 1px solid rgba(229, 53, 43, 0.08);
  position: relative;
}

.report-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.report-stat {
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 14px;
}

.report-stat .label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  letter-spacing: -0.01em;
}

.report-stat .value {
  margin-top: 6px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.jenis-list {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 4px 16px;
  margin-top: 8px;
}

.jenis-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  font-size: 14px;
  letter-spacing: -0.01em;
}

.jenis-row + .jenis-row {
  border-top: 1px solid var(--line);
}

.jenis-row .name {
  font-weight: 500;
  color: var(--text);
}

.jenis-row .count {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  background: #f2f2f7;
  min-width: 34px;
  text-align: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 13px;
}

/* ---------- Misc ---------- */

.tx-status-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.progress-note {
  text-align: center;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-3);
  letter-spacing: -0.01em;
  margin-top: 18px;
  padding-bottom: 8px;
}

.divider-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-3);
}

.divider-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
