/* Kasflow - gaya aplikasi di atas token AI Lab Design System (ds/styles.css).
   Gelap-dulu, ungu dominan, teal sebagai satu-satunya aksen, kontrol berbentuk pil. */

html { -webkit-text-size-adjust: 100%; color-scheme: dark; }
body { background: var(--bg-dark); }
a { color: var(--highlight-purple); text-decoration: none; }
a:hover { color: var(--highlight-soft); }
button, input, select, textarea { font-family: inherit; }
input::placeholder, textarea::placeholder { color: var(--grey-700); }
* { scrollbar-color: var(--grey-700) transparent; }
p { margin: 0; }
h1, h2, h3 { margin: 0; }

.shell { min-height: 100vh; color: var(--text-primary); font-family: var(--font-body);
  background: radial-gradient(900px 500px at 85% -10%, rgba(91, 33, 182, 0.35), transparent 70%), var(--bg-dark); }
.muted { color: var(--text-muted); }
.sec { color: var(--text-secondary); }
.small { font-size: 13px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.teal { color: var(--teal); }
.soft { color: var(--highlight-soft); }
.danger { color: var(--color-danger); }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header & navigasi ---------- */
header.top { position: sticky; top: 0; z-index: 20; background: rgba(14, 11, 31, 0.82);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border-subtle); }
.bar { max-width: 1240px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.brandbox { display: flex; align-items: center; gap: 12px; margin-right: auto; color: var(--text-primary); }
.brandbox:hover { color: var(--text-primary); }
.logo-tile { width: 38px; height: 38px; border-radius: 12px; background: var(--gradient-brand); display: flex;
  align-items: center; justify-content: center; box-shadow: var(--glow-purple); flex: none; }
.brandtext { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.brandname { font-family: var(--font-display); font-weight: 600; font-size: 17px; letter-spacing: -0.02em; }
.brandsub { font-size: 12px; color: var(--text-muted); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-actions { display: flex; align-items: center; gap: 10px; }
.tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--surface-card); border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a, .tabs button { display: inline-flex; align-items: center; padding: 8px 18px; border-radius: var(--radius-pill); border: 0;
  background: transparent; color: var(--text-secondary); font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: background var(--dur-fast) var(--ease-standard), color var(--dur-fast) var(--ease-standard); }
.tabs a:hover { color: var(--text-primary); }
.tabs a.on { background: var(--gradient-brand); color: #fff; }
.only-mobile { display: none; }
@media (max-width: 760px) {
  .bar { padding: 12px 16px; gap: 12px; }
  .brandsub { display: none; }
  .bar-actions { gap: 6px; }
  .bar-actions .btn { padding: 0 12px; }
  .only-desktop { display: none !important; }
  .only-mobile { display: inline; }
  .top-nav { display: none; }
  .bottom-nav { display: flex; position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 30;
    background: rgba(26, 21, 53, 0.92); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: var(--shadow-pop);
    width: calc(100% - 24px); max-width: 440px; justify-content: space-between; }
  .bottom-nav a { padding: 9px 6px; font-size: 13px; flex: 1; justify-content: center; }
}

main.page { max-width: 1240px; margin: 0 auto; padding: 32px 24px 120px; display: flex; flex-direction: column; gap: 24px; }
@media (max-width: 760px) { main.page { padding: 24px 16px 130px; } }
.stack { display: flex; flex-direction: column; gap: 24px; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.head > div { display: flex; flex-direction: column; gap: 8px; }
.overline { font-size: 12px; font-weight: 600; letter-spacing: 0.18em; color: var(--highlight-purple); text-transform: uppercase; }
.label-caps { font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
h1.display { font-family: var(--font-display); font-weight: 600; font-size: clamp(28px, 3.5vw, 40px); letter-spacing: -0.02em; line-height: 1.1; }
h1.display.xl { font-size: clamp(30px, 4vw, 44px); }
.grad { background: var(--gradient-brand-teal); -webkit-background-clip: text; background-clip: text; color: transparent; }
h2.title { font-family: var(--font-display); font-weight: 600; font-size: 20px; letter-spacing: -0.02em; }

/* ---------- Notifikasi ---------- */
.flash { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-radius: var(--radius-pill); font-size: 14px;
  font-weight: 600; align-self: flex-start; max-width: 100%; background: rgba(0, 212, 180, 0.12); border: 1px solid rgba(0, 212, 180, 0.4); color: var(--teal); }
.flash.bad { background: rgba(242, 88, 123, 0.12); border-color: rgba(242, 88, 123, 0.4); color: var(--color-danger); }
.flash.warn { background: rgba(242, 184, 75, 0.12); border-color: rgba(242, 184, 75, 0.4); color: var(--color-warning); }
.notice { border-radius: var(--radius-lg); padding: 16px 20px; border: 1px solid var(--border-brand); background: rgba(149, 98, 235, 0.1); color: var(--text-secondary); font-size: 14px; }
.notice.warn { border-color: rgba(242, 184, 75, 0.4); background: rgba(242, 184, 75, 0.1); color: var(--color-warning); }
.notice strong { color: var(--text-primary); }

/* ---------- Waveform ---------- */
.wave { display: inline-flex; align-items: center; }
.wave span { border-radius: var(--radius-pill); display: block; transform-origin: center; }
.wave.anim span { animation: ailab-wave 1.1s ease-in-out infinite; }
@keyframes ailab-wave { 0%, 100% { transform: scaleY(0.28); } 50% { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .wave.anim span { animation: none; } }

/* ---------- Tombol ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--control-md); padding: 0 22px;
  font-family: var(--font-body); font-size: 15px; font-weight: 600; line-height: 1; border-radius: var(--radius-pill); cursor: pointer;
  background: transparent; color: var(--text-primary); border: 1px solid var(--border-strong); white-space: nowrap; text-decoration: none;
  transition: transform var(--dur-fast) var(--ease-standard), box-shadow var(--dur-base) var(--ease-standard), filter var(--dur-fast) var(--ease-standard), background var(--dur-fast) var(--ease-standard); }
.btn:hover { background: rgba(255, 255, 255, 0.06); color: var(--text-primary); }
.btn:active { transform: scale(0.97); }
.btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.btn.sm { height: var(--control-sm); padding: 0 16px; font-size: 14px; gap: 7px; }
.btn.lg { height: var(--control-lg); padding: 0 30px; font-size: 16px; gap: 10px; }
.btn.primary { background: var(--gradient-brand); color: var(--text-on-brand); border-color: transparent; }
.btn.primary:hover { filter: brightness(1.08); background: var(--gradient-brand); color: var(--text-on-brand); }
.btn.teal { background: var(--teal); color: #06231f; border-color: transparent; }
.btn.teal:hover { filter: brightness(1.08); background: var(--teal); color: #06231f; }
.btn.ghost { border-color: transparent; color: var(--text-secondary); }
.btn.ghost:hover { color: var(--text-primary); }
.btn.danger { color: var(--color-danger); }
.btn.danger:hover { color: var(--color-danger); background: rgba(242, 88, 123, 0.1); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
form.inline { display: inline; margin: 0; }

/* ---------- Badge ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 11px; border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 600; letter-spacing: 0.02em; line-height: 1; white-space: nowrap;
  background: rgba(149, 98, 235, 0.16); color: var(--highlight-purple); border: 1px solid var(--border-brand); }
.badge.teal { background: rgba(0, 212, 180, 0.14); color: var(--teal); border-color: rgba(0, 212, 180, 0.4); }
.badge.solid { background: var(--gradient-brand); color: #fff; border-color: transparent; }
.badge.neutral { background: rgba(255, 255, 255, 0.06); color: var(--text-secondary); border-color: var(--border-subtle); }
.badge.late { background: rgba(242, 88, 123, 0.12); color: var(--color-danger); border-color: rgba(242, 88, 123, 0.4); }

/* ---------- Kartu & grid ---------- */
.card { border-radius: var(--radius-lg); padding: 24px; background: var(--surface-card); border: 1px solid var(--border-subtle); min-width: 0; }
.card.pad-sm { padding: 20px; }
.card.rows { padding: 8px 24px; }
.card.dashed { border: 1px dashed var(--border-strong); }
.card.brand { background: var(--gradient-surface); border-color: var(--border-brand); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.g-hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 20px; }
.g-mini { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 16px; }
.g-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 20px; }
.g-rep { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 20px; }
.g-cols2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.g-cols3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 560px) {
  .g-cols2.stackable, .g-cols3 { grid-template-columns: minmax(0, 1fr); }
  .hero-balance .deco { opacity: 0.3; transform: scale(0.7); transform-origin: right bottom; }
}

.hero-balance { position: relative; overflow: hidden; border-radius: var(--radius-xl); padding: 28px; min-height: 220px;
  background: linear-gradient(140deg, #3a1576 0%, #1a1535 70%); border: 1px solid var(--border-brand); box-shadow: var(--glow-purple);
  display: flex; flex-direction: column; gap: 18px; }
.hero-balance .deco { position: absolute; right: -10px; bottom: -6px; opacity: 0.55; pointer-events: none; }
.hero-balance > * { position: relative; }
.hero-balance .deco { position: absolute; }
.hero-profit { border-radius: var(--radius-xl); padding: 28px; background: var(--surface-card); border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card); display: flex; flex-direction: column; gap: 18px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.big { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.big.xl { font-size: clamp(36px, 5vw, 56px); }
.big.lg { font-size: clamp(32px, 4vw, 44px); }
.mt-auto { margin-top: auto; }
.split { display: flex; height: 10px; border-radius: var(--radius-pill); overflow: hidden; background: rgba(255, 255, 255, 0.06); gap: 3px; }
.split i { display: block; background: var(--highlight-purple); border-radius: var(--radius-pill); }
.split i + i { flex: 1; background: var(--teal); }
.legend-line { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--text-secondary); flex-wrap: wrap; }

a.mini { display: flex; flex-direction: column; gap: 10px; border-radius: var(--radius-lg); padding: 20px; background: var(--surface-card);
  border: 1px solid var(--border-subtle); color: var(--text-primary); transition: transform 200ms var(--ease-out), border-color 200ms; }
a.mini:hover { transform: translateY(-3px); border-color: var(--border-brand); color: var(--text-primary); }
a.mini .l { font-size: 13px; color: var(--text-muted); }
a.mini .v { font-family: var(--font-display); font-weight: 600; font-size: 24px; letter-spacing: -0.02em; }
a.mini .n { font-size: 12px; color: var(--highlight-soft); }
.stat-l { font-size: 13px; color: var(--text-muted); }
.stat-v { font-family: var(--font-display); font-weight: 600; font-size: 26px; letter-spacing: -0.02em; }
.stat-box { display: flex; flex-direction: column; gap: 8px; }

/* ---------- Grafik ---------- */
.chart { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; height: 200px; align-items: end; }
.chart .col { display: flex; flex-direction: column; align-items: center; gap: 10px; height: 100%; }
.chart .pair { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 5px; }
.chart .b { width: min(18px, 40%); border-radius: var(--radius-pill); }
.chart .b.in { background: var(--teal); }
.chart .b.out { background: var(--highlight-purple); }
.chart .m { font-size: 12px; color: var(--text-muted); }
.legend { display: flex; gap: 16px; font-size: 13px; color: var(--text-secondary); }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

/* ---------- Daftar ---------- */
.row-tx { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 12px 0; border-top: 1px solid var(--border-subtle); }
.row-tx.full { grid-template-columns: 96px minmax(0, 1fr) auto auto; padding: 14px 0; }
.row-tx:first-child { border-top: 0; }
.row-tx .t { font-size: 15px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-tx .meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--text-muted); min-width: 0; }
.row-tx .tx-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.row-tx .amount { font-family: var(--font-display); font-weight: 600; font-size: 16px; text-align: right; white-space: nowrap; }
.row-tx .d { font-size: 13px; color: var(--text-muted); }
.row-tx .pos { color: var(--teal); }
@media (max-width: 640px) {
  .row-tx { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; }
  .row-tx .t { white-space: normal; }
  .card.rows { padding: 4px 16px; }
  .row-tx.full { grid-template-columns: minmax(0, 1fr) auto; }
  .row-tx.full .d { grid-column: 1 / -1; }
  .row-tx.full .edit { grid-column: 1 / -1; justify-self: end; margin-top: -8px; }
}
.due-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 14px 16px; border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border-subtle); color: var(--text-primary); }
.due-row:hover { background: rgba(255, 255, 255, 0.06); color: var(--text-primary); }
.due-row .c { font-weight: 600; font-size: 15px; }
.due-row .a { font-family: var(--font-display); font-weight: 600; font-size: 15px; text-align: right; }
.due-row .s { font-size: 13px; color: var(--text-muted); }
.due-row .n { font-size: 12px; font-weight: 600; text-align: right; color: var(--text-muted); }
.due-row .n.late { color: var(--color-danger); }
.list-gap { display: flex; flex-direction: column; gap: 10px; }

/* ---------- Invoice ---------- */
.inv-layout { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 20px; align-items: start; }
a.inv-card { display: flex; flex-direction: column; gap: 12px; padding: 18px 20px; border-radius: var(--radius-lg); background: var(--surface-card);
  border: 1px solid var(--border-subtle); color: var(--text-primary); transition: background 200ms; }
a.inv-card:hover { background: var(--surface-raised); color: var(--text-primary); }
a.inv-card.on { background: var(--surface-raised); border-color: var(--border-brand); }
.inv-card .top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.inv-card .who { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.inv-card .who b { font-weight: 600; font-size: 16px; }
.inv-card .tot { font-family: var(--font-display); font-weight: 600; font-size: 17px; white-space: nowrap; }
.inv-card .foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.progress { flex: 1; min-width: 80px; height: 6px; border-radius: var(--radius-pill); background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--teal); border-radius: var(--radius-pill); }
.panel { position: sticky; top: 96px; border-radius: var(--radius-xl); overflow: hidden; background: var(--surface-card);
  border: 1px solid var(--border-brand); box-shadow: var(--shadow-lg); }
@media (max-width: 760px) { .panel { position: static; } }
.panel-head { padding: 24px 28px; background: linear-gradient(140deg, #3a1576 0%, #1a1535 80%); display: flex; justify-content: space-between;
  gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.panel-head .who { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.panel-body { padding: 24px 28px; display: flex; flex-direction: column; gap: 20px; }
.kv { display: flex; flex-direction: column; gap: 4px; }
.kv .k { font-size: 12px; color: var(--text-muted); }
.kv .v { font-size: 15px; font-weight: 500; }
.item-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--border-subtle); }
.item-row .s { font-weight: 600; text-align: right; }
.sum-line { display: flex; justify-content: space-between; font-size: 14px; }
.sum-line span:first-child { color: var(--text-secondary); }
.remaining { border-radius: var(--radius-lg); padding: 18px 20px; background: rgba(149, 98, 235, 0.1); border: 1px solid var(--border-brand);
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.remaining .v { font-family: var(--font-display); font-weight: 600; font-size: 28px; letter-spacing: -0.02em; }
.pay-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border-subtle); font-size: 14px; }
details.more > summary { list-style: none; cursor: pointer; display: inline-flex; }
details.more > summary::-webkit-details-marker { display: none; }
details.more[open] > summary { margin-bottom: 12px; }

/* ---------- Laporan ---------- */
.rep-row { display: flex; flex-direction: column; gap: 8px; }
.rep-row .line { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.rep-row .line b { font-weight: 600; }
.bar-track { height: 8px; border-radius: var(--radius-pill); background: rgba(255, 255, 255, 0.06); }
.bar-track i { display: block; height: 100%; border-radius: var(--radius-pill); background: var(--teal); }
.bar-track i.p { background: var(--highlight-purple); }
.owner-card { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 20px; align-items: center; }
.owner-card .v { font-family: var(--font-display); font-weight: 600; font-size: 22px; }

/* ---------- Form ---------- */
label.lbl { display: block; font-size: 13px; font-weight: 500; color: var(--text-secondary); margin: 0 0 7px; }
.field { display: flex; flex-direction: column; gap: 0; }
.field + .field { margin-top: 16px; }
.g-cols2 > .field, .g-cols3 > .field { margin-top: 0; }
input[type=text], input[type=email], input[type=password], input[type=number], select, textarea {
  width: 100%; height: var(--control-md); padding: 0 14px; background: var(--surface-card); color: var(--text-primary);
  border: 1px solid var(--border-strong); border-radius: var(--radius-md); font-size: 15px; outline: none;
  transition: border-color var(--dur-fast) var(--ease-standard), box-shadow var(--dur-fast) var(--ease-standard); }
textarea { height: auto; min-height: 84px; padding: 11px 14px; resize: vertical; }
select { appearance: none; -webkit-appearance: none; padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238B8B9E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
input:focus, select:focus, textarea:focus { border-color: var(--highlight-purple); box-shadow: var(--focus-ring); }
input.is-error { border-color: var(--color-danger); }
input[type=file] { height: auto; padding: 9px 12px; font-size: 13px; color: var(--text-secondary); }
input[type=file]::file-selector-button { margin-right: 12px; padding: 6px 14px; border-radius: var(--radius-pill); border: 1px solid var(--border-strong);
  background: transparent; color: var(--text-primary); font-weight: 600; cursor: pointer; }
.err { color: var(--color-danger); font-size: 12px; margin-top: 6px; }
.hint { color: var(--text-muted); font-size: 12px; margin-top: 6px; }
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.filters > div { flex: 1 1 150px; min-width: 0; }
.filters .go { flex: 0 0 auto; }

.sheet { width: 100%; max-width: 520px; margin: 0 auto; border-radius: var(--radius-xl); background: var(--bg-mid); border: 1px solid var(--border-brand);
  box-shadow: var(--shadow-pop), var(--glow-purple); padding: 28px; display: flex; flex-direction: column; gap: 22px; }
.sheet.wide { max-width: 860px; }
@media (max-width: 560px) { .sheet { padding: 20px; border-radius: var(--radius-lg); } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.sheet-head > div { display: flex; flex-direction: column; gap: 4px; }
.sheet-title { font-family: var(--font-display); font-weight: 600; font-size: 24px; letter-spacing: -0.02em; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { position: relative; display: block; cursor: pointer; }
.tile input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.tile .box { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: var(--radius-md); background: var(--surface-card);
  border: 1px solid var(--border-subtle); transition: background 200ms; height: 100%; }
.tile .box b { font-weight: 600; font-size: 15px; }
.tile .box span { font-size: 12px; color: var(--text-muted); }
.tile input:checked + .box { background: rgba(149, 98, 235, 0.16); border-color: var(--highlight-purple); }
.tile input:focus-visible + .box { box-shadow: var(--focus-ring); }
.amount-box { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px; border-radius: var(--radius-lg); background: var(--surface-card); border: 1px solid var(--border-strong); }
.amount-box:focus-within { border-color: var(--highlight-purple); box-shadow: var(--focus-ring); }
.amount-box .row { display: flex; align-items: baseline; gap: 10px; }
.amount-box .rp { font-family: var(--font-display); font-weight: 600; font-size: 28px; color: var(--text-muted); }
.amount-box input { flex: 1; min-width: 0; height: auto; padding: 0; background: transparent; border: 0; box-shadow: none;
  font-family: var(--font-display); font-weight: 600; font-size: 40px; letter-spacing: -0.02em; color: var(--text-primary); }
.amount-box input:focus { box-shadow: none; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { position: relative; display: inline-block; cursor: pointer; }
.pill input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.pill span { display: inline-flex; align-items: center; height: var(--control-sm); padding: 0 16px; border-radius: var(--radius-pill); font-size: 14px; font-weight: 600;
  border: 1px solid var(--border-strong); color: var(--text-primary); transition: background var(--dur-fast); }
.pill:hover span { background: rgba(255, 255, 255, 0.06); }
.pill input:checked + span { background: var(--gradient-brand); border-color: transparent; color: #fff; }
.pill input:focus-visible + span { box-shadow: var(--focus-ring); }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

/* tabel item invoice */
table.items { width: 100%; border-collapse: collapse; }
table.items th { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); text-align: left; padding: 0 6px 8px; }
table.items th.num, table.items td.num { text-align: right; }
table.items td { padding: 5px 6px; vertical-align: middle; }
table.items td.num { white-space: nowrap; color: var(--text-secondary); }
table.items tfoot td { padding-top: 10px; }
table.items .total-row td { font-weight: 700; border-top: 1px solid var(--border-strong); color: var(--text-primary); font-size: 16px; }
.tablewrap { overflow-x: auto; }
@media (max-width: 760px) {
  table.items thead { display: none; }
  table.items, table.items tbody, table.items tfoot { display: block; }
  table.items tr.item { display: grid; grid-template-columns: 76px 1fr 40px; gap: 6px; padding: 12px 0; border-bottom: 1px solid var(--border-subtle); }
  table.items tr.item td { padding: 0; }
  table.items tr.item td:nth-child(1) { grid-column: 1 / -1; }
  table.items tr.item td:nth-child(2) { grid-column: 1; grid-row: 2; }
  table.items tr.item td:nth-child(3) { grid-column: 2; grid-row: 2; }
  table.items tr.item td:nth-child(5) { grid-column: 3; grid-row: 2; }
  table.items tr.item td:nth-child(4) { grid-column: 1 / -1; grid-row: 3; text-align: right; font-size: 13px; }
  table.items tfoot tr { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; gap: 10px; }
  table.items tfoot td[colspan] { flex: 1; text-align: right; }
  table.items tfoot td:empty { display: none; }
  table.items tfoot input { width: 160px; text-align: right; }
}

/* pengaturan */
.cat-line { display: flex; gap: 8px; align-items: center; padding: 6px 0; }
.cat-line form { display: flex; gap: 8px; flex: 1; min-width: 0; }
.cat-line input { height: var(--control-sm); }

/* auth */
.auth { width: 100%; max-width: 420px; margin: 8vh auto 0; padding: 0 16px; display: flex; flex-direction: column; gap: 24px; }
.auth .logo-row { display: flex; align-items: center; gap: 12px; }
.auth .card { padding: 28px; border-radius: var(--radius-xl); box-shadow: var(--shadow-card); }
.foot-note { display: flex; align-items: center; gap: 14px; justify-content: center; padding-top: 24px; color: var(--grey-700); font-size: 13px; text-align: center; flex-wrap: wrap; }

@media (min-width: 761px) { .bottom-nav { display: none; } }
