/* ==========================================================================
   ساختمان من — استایل موبایل‌محور (RTL)
   طراحی و توسعه: حسین هدایتی — ۰۹۱۲۷۷۸۷۸۷۲
   ========================================================================== */

:root {
  --bg: #eef5f2;
  --surface: #ffffff;
  --surface-2: #f5faf8;
  --ink: #10231e;
  --ink-2: #33493f;
  --muted: #768a83;
  --line: #e1ece8;
  --line-2: #d0e2dc;
  --brand: #0e7a63;
  --brand-dark: #0a3b31;
  --brand-2: #13a184;
  --brand-soft: #e2f5ee;
  --gold: #b8891f;
  --gold-soft: #fbf1d8;
  --danger: #c33d3d;
  --danger-soft: #fdeaea;
  --warn: #9a5c00;
  --warn-soft: #fff2dd;
  --ok: #0f7a4c;
  --ok-soft: #e3f7ec;
  --info: #2a5cb8;
  --info-soft: #e9f0ff;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 12px 28px -20px rgba(8, 55, 46, 0.45);
  --shadow-lg: 0 24px 60px -28px rgba(8, 55, 46, 0.5);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --nav-h: 66px;
}

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

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Vazirmatn', 'IRANSans', Tahoma, 'Segoe UI', sans-serif;
  background:
    radial-gradient(900px 480px at 100% -8%, #d9efe6 0%, transparent 58%),
    radial-gradient(760px 480px at -10% 108%, #e3f1ea 0%, transparent 60%),
    var(--bg);
  color: var(--ink);
  direction: rtl;
  text-align: start;
  min-height: 100dvh;
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior-y: none;
}

body.no-scroll {
  overflow: hidden;
}

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

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

button {
  border: 0;
  background: none;
  cursor: pointer;
  touch-action: manipulation;
}

h1,
h2,
h3,
h4,
p,
ul,
ol {
  margin: 0;
}

ul,
ol {
  padding-inline-start: 20px;
}

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

code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.88em;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 5px;
  direction: ltr;
  display: inline-block;
}

.ic {
  flex: none;
  vertical-align: middle;
}

[hidden] {
  display: none !important;
}

/* --------------------------------- splash -------------------------------- */

.boot-splash {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--brand-dark);
}

.boot-logo {
  width: 76px;
  height: 76px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  background: linear-gradient(150deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
  box-shadow: 0 20px 40px -20px rgba(10, 59, 49, 0.8);
  animation: pulse 1.8s ease-in-out infinite;
}

.boot-name {
  font-weight: 800;
  font-size: 20px;
}

.boot-text {
  color: var(--muted);
  font-size: 13px;
}

@keyframes pulse {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-4px) scale(1.03); }
}

/* ---------------------------------- app ---------------------------------- */

.app-root {
  min-height: 100dvh;
}

.app {
  max-width: 640px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(var(--nav-h) + var(--safe-b) + 8px);
  position: relative;
}

.page {
  padding: 4px 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: calc(var(--safe-t) + 10px) 16px 10px;
  background: linear-gradient(180deg, rgba(238, 245, 242, 0.97) 0%, rgba(238, 245, 242, 0.88) 70%, rgba(238, 245, 242, 0) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(150deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
  box-shadow: 0 10px 20px -12px rgba(10, 59, 49, 0.85);
  flex: none;
}

.brand-mark.dark {
  background: var(--brand-dark);
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.35;
}

.brand-text strong {
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 52vw;
}

.brand-text small {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 52vw;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-2);
  box-shadow: 0 6px 14px -12px rgba(8, 55, 46, 0.6);
  transition: transform 0.15s ease, background 0.15s ease;
}

.icon-btn:active {
  transform: scale(0.94);
}

.icon-btn.subtle {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: var(--muted);
}

.icon-btn.ghost {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.notif-dot {
  position: absolute;
  top: 2px;
  inset-inline-start: 2px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
  border: 2px solid var(--bg);
  line-height: 1;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(150deg, #17594b, #0a3b31);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  flex: none;
  border: 2px solid #fff;
  box-shadow: 0 8px 18px -14px rgba(8, 55, 46, 0.8);
}

.avatar.sm {
  width: 38px;
  height: 38px;
  font-size: 12px;
}

.avatar.dark {
  background: #e8f2ee;
  color: var(--brand-dark);
  border-color: transparent;
}

.avatar.dark.sm {
  width: 34px;
  height: 34px;
}

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

.page-head-text {
  flex: 1;
  min-width: 0;
}

.page-head h1 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.2px;
}

.page-head p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.head-extra {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ------------------------------ bottom nav ------------------------------- */

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 640px;
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  padding: 8px 8px calc(8px + var(--safe-b));
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -12px 30px -24px rgba(8, 55, 46, 0.6);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 2px;
  border-radius: 12px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  transition: color 0.18s ease, background 0.18s ease;
}

.nav-item .ic {
  transition: transform 0.18s ease;
}

.nav-item.active {
  color: var(--brand);
  background: var(--brand-soft);
}

.nav-item.active .ic {
  transform: translateY(-1px) scale(1.05);
}

.nav-item:active {
  transform: scale(0.96);
}

/* --------------------------------- credit -------------------------------- */

.credit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 16px 16px 22px;
  font-size: 11.5px;
  color: var(--muted);
  text-align: center;
}

.credit a {
  color: var(--brand);
  font-weight: 700;
}

.credit-phone {
  direction: ltr;
  font-size: 11px;
  padding: 1px 8px;
  border: 1px dashed var(--line-2);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.7);
}

/* -------------------------------- buttons -------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 16px;
  border-radius: 13px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.4;
  transition: transform 0.14s ease, opacity 0.14s ease, background 0.14s ease;
  min-height: 44px;
  text-align: center;
}

.btn:active {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(150deg, var(--brand) 0%, var(--brand-dark) 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 12px 22px -16px rgba(10, 59, 49, 0.9);
}

.btn-danger {
  background: var(--danger-soft);
  border-color: #f3cfcf;
  color: var(--danger);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--brand);
  box-shadow: none;
}

.btn-block {
  width: 100%;
}

.btn-lg {
  min-height: 52px;
  font-size: 15px;
  border-radius: 15px;
}

.btn-sm {
  min-height: 36px;
  padding: 6px 12px;
  font-size: 12.5px;
  border-radius: 10px;
}

.btn-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-row > .btn {
  flex: 1;
  min-width: 120px;
}

.btn-spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

.btn:not(.btn-primary) .btn-spinner {
  border-color: rgba(14, 122, 99, 0.25);
  border-top-color: var(--brand);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* -------------------------------- badges --------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.6;
  background: var(--surface-2);
  color: var(--ink-2);
  border: 1px solid var(--line);
  white-space: nowrap;
}

.badge.gold {
  background: var(--gold-soft);
  color: #8a6412;
  border-color: #f0dfb4;
}

.badge.info {
  background: var(--info-soft);
  color: var(--info);
  border-color: #d6e2fb;
}

.badge.warn {
  background: var(--warn-soft);
  color: var(--warn);
  border-color: #f6dfb8;
}

.badge.ok {
  background: var(--ok-soft);
  color: var(--ok);
  border-color: #c9efda;
}

.badge.danger {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: #f5cccc;
}

.badge.muted {
  background: #f1f4f3;
  color: var(--muted);
}

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

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

.hint {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.6;
  display: block;
}

.hint-inline {
  color: var(--muted);
  font-weight: 400;
  font-size: 11px;
}

.debt-chip {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--danger);
  background: var(--danger-soft);
  border-radius: 8px;
  padding: 2px 8px;
  white-space: nowrap;
}

.stars {
  letter-spacing: 3px;
  font-weight: 700;
}

.link-more {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 12px;
  font-weight: 700;
  color: var(--brand);
  white-space: nowrap;
}

/* --------------------------------- lists --------------------------------- */

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

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

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

.section-head h2 {
  font-size: 15px;
  font-weight: 800;
}

.section-head p {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 1px;
}

.row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.row-button {
  width: 100%;
  text-align: start;
  transition: transform 0.14s ease, border-color 0.14s ease;
}

.row-button:active {
  transform: scale(0.985);
  border-color: var(--line-2);
}

.row strong {
  font-size: 13.5px;
  font-weight: 700;
  display: block;
}

.row small {
  display: block;
  font-size: 11px;
  color: var(--muted);
}

.mini-ic {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex: none;
  background: var(--surface-2);
  color: var(--ink-2);
  border: 1px solid var(--line);
}

.mini-ic.brand { background: var(--brand-soft); color: var(--brand); border-color: #cdece1; }
.mini-ic.ok { background: var(--ok-soft); color: var(--ok); border-color: #c9efda; }
.mini-ic.warn { background: var(--warn-soft); color: var(--warn); border-color: #f6dfb8; }
.mini-ic.info { background: var(--info-soft); color: var(--info); border-color: #d6e2fb; }
.mini-ic.gold { background: var(--gold-soft); color: var(--gold); border-color: #f0dfb4; }
.mini-ic.danger { background: var(--danger-soft); color: var(--danger); border-color: #f5cccc; }

/* --------------------------------- cards --------------------------------- */

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

.card-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.empty-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.info-box {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 11px 13px;
  border-radius: 13px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.75;
}

.info-box .ic {
  margin-top: 2px;
  color: var(--brand);
}

.info-box.ok {
  background: var(--ok-soft);
  border-color: #c9efda;
  color: #0b5c3a;
}

.info-box.ok .ic { color: var(--ok); }

.info-box.warn {
  background: var(--warn-soft);
  border-color: #f6dfb8;
  color: #7c4b00;
}

.info-box.warn .ic { color: var(--warn); }

/* -------------------------------- toggle --------------------------------- */

.toggle {
  width: 48px;
  height: 28px;
  border-radius: 20px;
  background: #d9e4e0;
  position: relative;
  flex: none;
  transition: background 0.2s ease;
}

.toggle.big {
  width: 56px;
  height: 32px;
}

.toggle-thumb {
  position: absolute;
  top: 3px;
  inset-inline-start: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease;
}

.toggle.big .toggle-thumb {
  width: 26px;
  height: 26px;
}

.toggle.on {
  background: linear-gradient(150deg, var(--brand-2), var(--brand));
}

.toggle.on .toggle-thumb {
  transform: translateX(-20px);
}

.toggle.big.on .toggle-thumb {
  transform: translateX(-24px);
}

/* ------------------------------ page loading ----------------------------- */

.page-loading {
  min-height: 46vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid rgba(14, 122, 99, 0.18);
  border-top-color: var(--brand);
  animation: spin 0.8s linear infinite;
}

.skeleton-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px 0;
}

.skeleton-row {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.sk {
  background: linear-gradient(90deg, #eef4f1 25%, #e2ece8 37%, #eef4f1 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s ease infinite;
  border-radius: 8px;
  display: block;
}

.sk-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex: none;
}

.sk-lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.sk-line {
  height: 10px;
  width: 100%;
}

.sk-line.short {
  width: 55%;
}

@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 7px;
  padding: 26px 14px;
}

.empty-ic {
  width: 60px;
  height: 60px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--brand);
  border: 1px solid var(--line);
  margin-bottom: 2px;
}

.empty strong {
  font-size: 14.5px;
  font-weight: 800;
}

.empty p {
  font-size: 12px;
  color: var(--muted);
  max-width: 320px;
  line-height: 1.8;
}

.empty .btn {
  margin-top: 8px;
}

.empty.error .empty-ic {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: #f5cccc;
}

.fatal-error {
  padding: 20px;
}

/* --------------------------------- forms --------------------------------- */

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.field > label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-2);
}

.field .req {
  color: var(--danger);
}

.input {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  color: var(--ink);
  font-size: 14px;
  outline: none;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.input:focus {
  border-color: var(--brand-2);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(19, 161, 132, 0.14);
}

.input::placeholder {
  color: #a3b4ae;
  font-size: 13px;
}

textarea.input {
  min-height: 80px;
  resize: vertical;
  line-height: 1.8;
}

select.input {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(0% + 14px) calc(50% + 1px), calc(0% + 19px) calc(50% + 1px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-inline-start: 32px;
}

.switch-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  cursor: pointer;
}

.switch-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.switch-text strong {
  font-size: 13px;
  font-weight: 700;
}

.switch-text small {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
}

.switch {
  position: relative;
  flex: none;
  width: 46px;
  height: 27px;
  display: block;
}

.switch input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
  z-index: 2;
}

.switch-track {
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: #d7e3df;
  transition: background 0.2s ease;
}

.switch-thumb {
  position: absolute;
  top: 3px;
  inset-inline-start: 3px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
}

.switch input:checked + .switch-track {
  background: linear-gradient(150deg, var(--brand-2), var(--brand));
}

.switch input:checked + .switch-track .switch-thumb {
  transform: translateX(-19px);
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px;
}

.seg-option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 8px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}

.seg-option input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
}

.seg-option:has(input:checked) {
  background: #fff;
  color: var(--brand);
  box-shadow: 0 4px 12px -8px rgba(8, 55, 46, 0.5);
}

.form-error {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 10px 12px;
  border-radius: 11px;
  background: var(--danger-soft);
  border: 1px solid #f5cccc;
  color: var(--danger);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
}

.form-grid.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 10px;
}

.inline-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.upload-box {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px;
  border: 1.5px dashed var(--line-2);
  border-radius: 13px;
  background: var(--surface-2);
  cursor: pointer;
  overflow: hidden;
}

.upload-box input[type='file'] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--brand);
  flex: none;
}

.upload-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.upload-text strong {
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upload-text small {
  font-size: 10.5px;
  color: var(--muted);
}

.upload-preview {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border-radius: 9px;
  border: 1px solid var(--line);
  margin-inline-start: auto;
}

.upload-box.has-image {
  border-style: solid;
  border-color: #c9efda;
  background: var(--ok-soft);
}

.receipt-img {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
}

/* --------------------------------- sheets -------------------------------- */

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(6, 30, 25, 0);
  transition: background 0.24s ease;
  padding: 0;
}

.sheet-backdrop.open {
  background: rgba(6, 30, 25, 0.5);
}

.sheet {
  width: 100%;
  max-width: 640px;
  max-height: 92dvh;
  background: var(--surface);
  border-radius: 24px 24px 0 0;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: var(--shadow-lg);
  padding-bottom: var(--safe-b);
}

.sheet-backdrop.open .sheet {
  transform: translateY(0);
}

.sheet.wide {
  max-height: 94dvh;
}

.sheet-handle {
  width: 42px;
  height: 4px;
  border-radius: 3px;
  background: var(--line-2);
  margin: 9px auto 2px;
  flex: none;
}

.sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 18px 8px;
  flex: none;
}

.sheet-title {
  font-size: 16px;
  font-weight: 800;
}

.sheet-sub {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.6;
}

.sheet-close {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--muted);
  flex: none;
}

.sheet-body {
  padding: 8px 18px 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.sheet-footer {
  padding: 10px 18px calc(14px + var(--safe-b));
  border-top: 1px solid var(--line);
  background: var(--surface);
  flex: none;
}

.sheet-subtitle {
  font-size: 12.5px;
  font-weight: 800;
  margin: 16px 0 8px;
  color: var(--ink-2);
}

.confirm-sheet {
  max-width: 420px;
  border-radius: 22px 22px 0 0;
}

.confirm-text {
  font-size: 13.5px;
  line-height: 1.9;
  color: var(--ink-2);
  padding-bottom: 6px;
}

.sheet-loading {
  padding: 4px 0;
}

/* --------------------------------- toasts -------------------------------- */

.toast-root {
  position: fixed;
  z-index: 200;
  top: calc(var(--safe-t) + 12px);
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 28px);
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  border-radius: 13px;
  background: #0f2f28;
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: 0 18px 34px -18px rgba(0, 0, 0, 0.6);
  animation: toastIn 0.25s ease both;
  pointer-events: auto;
}

.toast.ok { background: #0d5a44; }
.toast.err { background: #962f2f; }
.toast.info { background: #23456f; }

.toast.out {
  animation: toastOut 0.24s ease both;
}

.toast .ic {
  flex: none;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastOut {
  to { opacity: 0; transform: translateY(-8px) scale(0.98); }
}

/* ------------------------------- notifications --------------------------- */

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  position: relative;
}

.notif-item.unread {
  background: var(--brand-soft);
  border-color: #cdece1;
}

.notif-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex: none;
  background: var(--surface-2);
  color: var(--ink-2);
  border: 1px solid var(--line);
}

.notif-icon.payment { background: var(--gold-soft); color: var(--gold); border-color: #f0dfb4; }
.notif-icon.parking { background: var(--info-soft); color: var(--info); border-color: #d6e2fb; }
.notif-icon.success { background: var(--ok-soft); color: var(--ok); border-color: #c9efda; }
.notif-icon.charge { background: var(--warn-soft); color: var(--warn); border-color: #f6dfb8; }

.notif-title {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
}

.notif-body {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.7;
  margin-top: 1px;
}

.notif-time {
  display: block;
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 4px;
}

.notif-dot-inline {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  flex: none;
  margin-top: 6px;
}

/* ---------------------------------- tabs --------------------------------- */

.tabs-pill {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: #e3ede9;
  border-radius: 13px;
  padding: 4px;
}

.tab-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 6px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
  transition: background 0.16s ease, color 0.16s ease;
}

.tab-btn.active {
  background: #fff;
  color: var(--brand);
  box-shadow: 0 5px 14px -10px rgba(8, 55, 46, 0.6);
}

.tab-count {
  min-width: 20px;
  padding: 0 5px;
  height: 18px;
  border-radius: 9px;
  background: rgba(14, 122, 99, 0.12);
  color: inherit;
  font-size: 10px;
  display: grid;
  place-items: center;
  line-height: 1;
}

/* ---------------------------------- auth --------------------------------- */

.auth-screen {
  min-height: 100dvh;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--safe-t) + 20px) 16px calc(var(--safe-b) + 20px);
  background:
    radial-gradient(700px 420px at 100% 0%, #d3ece2 0%, transparent 60%),
    radial-gradient(600px 420px at 0% 100%, #dff0e9 0%, transparent 60%),
    #edf5f2;
}

.auth-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(6px);
  opacity: 0.5;
  pointer-events: none;
}

.orb-1 {
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, #9fe0cd, transparent 70%);
  top: -70px;
  inset-inline-start: -50px;
}

.orb-2 {
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, #f2dfae, transparent 70%);
  bottom: -100px;
  inset-inline-end: -70px;
}

.auth-inner {
  position: relative;
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-hero {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.auth-logo {
  width: 68px;
  height: 68px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: linear-gradient(150deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
  box-shadow: 0 22px 40px -22px rgba(10, 59, 49, 0.9);
  margin-bottom: 6px;
}

.auth-hero h1 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.4px;
}

.auth-hero p {
  font-size: 12.5px;
  color: var(--muted);
}

.auth-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  border: 1px solid #fff;
  border-radius: 24px;
  padding: 16px;
  box-shadow: 0 30px 60px -34px rgba(8, 55, 46, 0.55);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: #e9f2ee;
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 14px;
}

.auth-tab {
  text-align: center;
  padding: 8px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  transition: background 0.16s ease, color 0.16s ease;
}

.auth-tab.active {
  background: #fff;
  color: var(--brand);
  box-shadow: 0 5px 14px -10px rgba(8, 55, 46, 0.6);
}

.auth-card-head {
  margin-bottom: 12px;
}

.auth-card-head h2 {
  font-size: 17px;
  font-weight: 800;
}

.auth-card-head p {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.7;
}

.auth-note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 12px;
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.7;
}

.auth-note .ic {
  margin-top: 2px;
  color: var(--brand);
  flex: none;
}

.auth-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
}

.auth-badges span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink-2);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 4px 10px;
}

.auth-badges .ic {
  color: var(--brand);
}

.auth-guide {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  color: var(--brand);
}

.auth-screen .credit {
  padding: 0;
}

.code-wrap {
  text-align: center;
}

.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 10px;
}

.code-icon {
  width: 58px;
  height: 58px;
  border-radius: 19px;
  display: inline-grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand);
  margin-bottom: 8px;
}

.code-title {
  font-size: 17px;
  font-weight: 800;
}

.code-sub {
  font-size: 12px;
  color: var(--muted);
  margin: 3px 0 14px;
  line-height: 1.8;
}

.code-sub strong {
  color: var(--ink);
}

.demo-code {
  background: var(--warn-soft);
  border: 1px dashed #edcf9c;
  border-radius: 13px;
  padding: 10px 12px;
  margin-bottom: 14px;
  text-align: start;
}

.demo-label {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--warn);
  margin-bottom: 4px;
}

.demo-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
}

.demo-row strong {
  font-size: 16px;
  letter-spacing: 4px;
  color: var(--ink);
}

.demo-code small {
  display: block;
  font-size: 10px;
  color: var(--warn);
  margin-top: 4px;
  line-height: 1.6;
}

.otp-input {
  width: 100%;
  height: 62px;
  border-radius: 15px;
  border: 1.5px solid var(--line-2);
  background: var(--surface-2);
  text-align: center;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 14px;
  padding-inline-start: 14px;
  outline: none;
  margin-bottom: 12px;
  direction: ltr;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.otp-input:focus {
  border-color: var(--brand-2);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(19, 161, 132, 0.14);
}

.resend-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 12px;
  font-size: 11.5px;
  color: var(--muted);
  flex-wrap: wrap;
}

.resend-row .btn {
  padding: 4px 8px;
  min-height: 30px;
}

/* ---------------------------------- home --------------------------------- */

.welcome-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding-top: 4px;
}

.welcome-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.3px;
  line-height: 1.6;
}

.wave {
  font-size: 16px;
}

.welcome-sub {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 1px;
}

.admin-badge {
  margin-top: 4px;
}

.balance-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  padding: 16px;
  color: #fff;
  background:
    radial-gradient(320px 180px at 100% 0%, rgba(255, 255, 255, 0.16) 0%, transparent 70%),
    linear-gradient(150deg, #12806a 0%, #0b4a3d 55%, #083329 100%);
  box-shadow: 0 20px 38px -24px rgba(8, 55, 46, 0.9);
}

.balance-card::after {
  content: '';
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 26px solid rgba(255, 255, 255, 0.06);
  bottom: -90px;
  inset-inline-start: -60px;
  pointer-events: none;
}

.balance-card.is-masked {
  background:
    radial-gradient(320px 180px at 100% 0%, rgba(255, 255, 255, 0.1) 0%, transparent 70%),
    linear-gradient(150deg, #2b4a44 0%, #1b3530 60%, #152a26 100%);
}

.balance-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.unit-chip,
.type-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
}

.type-chip {
  background: rgba(255, 255, 255, 0.08);
}

.balance-label {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 16px;
  position: relative;
  z-index: 1;
}

.balance-amount {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.5;
  margin-top: 2px;
  position: relative;
  z-index: 1;
}

.balance-amount.settled {
  font-size: 21px;
  color: #b8f0d9;
}

.masked-amount {
  letter-spacing: 8px;
  color: rgba(255, 255, 255, 0.85);
}

.balance-masked-note,
.balance-pending {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.78);
  margin-top: 4px;
  position: relative;
  z-index: 1;
}

.balance-pending {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 2px 8px;
}

.balance-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
  padding-top: 11px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.72);
  position: relative;
  z-index: 1;
}

.balance-foot a {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: #fff;
  font-weight: 700;
}

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

.quick {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 6px;
  border-radius: 15px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-2);
  text-align: center;
  box-shadow: 0 8px 18px -18px rgba(8, 55, 46, 0.6);
  transition: transform 0.14s ease, border-color 0.14s ease;
}

.quick:active {
  transform: scale(0.96);
  border-color: var(--brand-2);
}

.qi {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand);
}

.qi.gold {
  background: var(--gold-soft);
  color: var(--gold);
}

.parking-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px;
}

.parking-card.free {
  border-color: #bfe8d5;
  background: linear-gradient(180deg, #fff 0%, #f2fbf7 100%);
}

.parking-card.muted {
  background: var(--surface);
}

.parking-card strong {
  font-size: 13px;
  font-weight: 700;
  display: block;
}

.parking-card small {
  font-size: 10.5px;
  color: var(--muted);
  display: block;
  line-height: 1.6;
}

.free-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 13px;
  border-radius: 15px;
  background: linear-gradient(135deg, #e9f9f1 0%, #f5fdf9 100%);
  border: 1px solid #c4ecda;
}

.free-banner strong {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: #0b5c3a;
}

.free-banner small {
  display: block;
  font-size: 10.5px;
  color: #4b7a68;
  line-height: 1.6;
}

.admin-alerts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.alert-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.alert-row.warn {
  background: var(--warn-soft);
  border-color: #f4dcb4;
}

.alert-row.info {
  background: var(--info-soft);
  border-color: #d5e1fb;
}

.alert-row strong {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
}

.alert-row small {
  display: block;
  font-size: 10.5px;
  color: var(--ink-2);
  opacity: 0.8;
}

.announce-card {
  position: relative;
  display: block;
  padding: 13px 14px;
  border-radius: 15px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.announce-card strong {
  display: block;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 2px;
}

.announce-card p {
  font-size: 11.5px;
  color: var(--ink-2);
  line-height: 1.8;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.announce-meta {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 5px;
}

.pin {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 9.5px;
  font-weight: 700;
  color: #8a6412;
  background: var(--gold-soft);
  border: 1px solid #f0dfb4;
  border-radius: 6px;
  padding: 1px 6px;
  margin-bottom: 4px;
}

.admin-shortcut {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff 0%, #fdf8ea 100%);
  border: 1px solid #f0e2bd;
}

.admin-shortcut strong {
  display: block;
  font-size: 13px;
  font-weight: 800;
}

.admin-shortcut small {
  display: block;
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.6;
}

.pending-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}

.pending-ic {
  width: 58px;
  height: 58px;
  border-radius: 19px;
  display: grid;
  place-items: center;
  background: var(--warn-soft);
  color: var(--warn);
  margin-bottom: 2px;
}

.pending-card h2 {
  font-size: 16px;
  font-weight: 800;
}

.pending-card > p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.85;
  max-width: 340px;
}

.pending-form {
  width: 100%;
  margin-top: 10px;
  text-align: start;
}

.pending-help {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--brand);
  margin-top: 4px;
}

/* -------------------------------- charges -------------------------------- */

.admin-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-toolbar .btn {
  flex: none;
}

.filter-select {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 10px;
  min-height: 42px;
  flex: 1;
  min-width: 150px;
  color: var(--muted);
}

.filter-select select {
  border: 0;
  background: transparent;
  outline: none;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  width: 100%;
  min-height: 40px;
  appearance: none;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 11px;
  min-height: 42px;
  flex: 1;
  color: var(--muted);
}

.search-box input {
  border: 0;
  background: transparent;
  outline: none;
  width: 100%;
  font-size: 12.5px;
  min-height: 40px;
}

.money-summary {
  border-radius: 20px;
  padding: 16px;
  background: linear-gradient(150deg, #ffffff 0%, #f4fbf8 100%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.money-summary.masked {
  background: linear-gradient(150deg, #fbfcfc 0%, #f1f6f4 100%);
}

.ms-main span {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
}

.ms-main strong {
  display: block;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-top: 1px;
}

.ms-main strong.debt { color: var(--danger); }
.ms-main strong.ok { color: var(--ok); }

.ms-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line-2);
}

.ms-grid > div {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.ms-grid span {
  font-size: 10px;
  color: var(--muted);
}

.ms-grid strong {
  font-size: 12px;
  font-weight: 700;
}

.ms-note {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 6px;
}

.ms-actions {
  margin-top: 12px;
}

.charge-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 13px;
  box-shadow: var(--shadow);
}

.charge-card.paid {
  opacity: 0.85;
}

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

.charge-badges {
  display: flex;
  align-items: center;
  gap: 4px;
}

.cat-badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 7px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink-2);
}

.cat-badge.charge { background: var(--brand-soft); color: var(--brand); border-color: #cdece1; }
.cat-badge.development { background: var(--info-soft); color: var(--info); border-color: #d6e2fb; }
.cat-badge.other { background: var(--gold-soft); color: #8a6412; border-color: #f0dfb4; }

.charge-title {
  font-size: 14px;
  font-weight: 800;
  margin-top: 7px;
}

.charge-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 4px;
}

.charge-meta span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.charge-note {
  font-size: 11.5px;
  color: var(--ink-2);
  background: var(--surface-2);
  border-radius: 9px;
  padding: 7px 9px;
  margin-top: 7px;
  line-height: 1.75;
}

.charge-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px dashed var(--line);
}

.charge-amount strong {
  font-size: 15px;
  font-weight: 800;
}

.charge-amount small {
  display: block;
  font-size: 10.5px;
  color: var(--danger);
}

.pay-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border-radius: 15px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.pay-card.compact {
  padding: 10px;
}

.pay-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex: none;
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--line);
}

.pay-icon.confirmed { background: var(--ok-soft); color: var(--ok); border-color: #c9efda; }
.pay-icon.rejected { background: var(--danger-soft); color: var(--danger); border-color: #f5cccc; }
.pay-icon.pending { background: var(--warn-soft); color: var(--warn); border-color: #f6dfb8; }

.pay-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.pay-head strong {
  font-size: 14px;
  font-weight: 800;
}

.pay-meta {
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.7;
}

.pay-ref {
  font-size: 10.5px;
  color: var(--ink-2);
  margin-top: 2px;
}

.pay-note {
  font-size: 11px;
  color: var(--muted);
  background: var(--surface-2);
  border-radius: 8px;
  padding: 5px 8px;
  margin-top: 5px;
}

.pay-amount-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--brand-soft);
  border: 1px solid #cdece1;
  border-radius: 13px;
  padding: 11px 13px;
  margin-bottom: 12px;
}

.pay-amount-box span {
  font-size: 11.5px;
  color: var(--brand);
}

.pay-amount-box strong {
  font-size: 16px;
  font-weight: 800;
  color: var(--brand-dark);
}

.link-box {
  background: var(--surface-2);
  border: 1px dashed var(--line-2);
  border-radius: 12px;
  padding: 11px;
  font-size: 11px;
  word-break: break-all;
  line-height: 1.8;
  color: var(--ink-2);
  margin-bottom: 10px;
}

.target-unit {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px;
  border-radius: 13px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  margin-bottom: 12px;
}

.target-unit strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
}

.target-unit small {
  display: block;
  font-size: 10.5px;
  color: var(--muted);
}

/* -------------------------------- parking -------------------------------- */

.my-parking {
  border-radius: 20px;
  padding: 15px;
  background: linear-gradient(150deg, #fff 0%, #f5faf8 100%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.my-parking.free {
  background:
    radial-gradient(280px 140px at 100% 0%, rgba(19, 161, 132, 0.12) 0%, transparent 70%),
    linear-gradient(150deg, #f4fdf9 0%, #e9f8f1 100%);
  border-color: #bfe8d5;
}

.mp-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mp-icon {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink-2);
  flex: none;
}

.my-parking.free .mp-icon {
  background: #fff;
  border-color: #c9efda;
  color: var(--ok);
}

.mp-top strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
}

.mp-top small {
  display: block;
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.6;
}

.mp-note {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  font-size: 11px;
  color: #2f6b57;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 10px;
  padding: 7px 9px;
  margin-top: 10px;
}

.mp-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 11px;
  padding-top: 9px;
  border-top: 1px dashed var(--line-2);
  font-size: 10.5px;
  color: var(--muted);
}

.free-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 13px;
  box-shadow: var(--shadow);
}

.free-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.free-head strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
}

.free-head small {
  display: block;
  font-size: 10.5px;
  color: var(--muted);
}

.free-note {
  font-size: 11.5px;
  color: var(--ink-2);
  background: var(--surface-2);
  border-radius: 9px;
  padding: 7px 9px;
  margin: 9px 0;
  line-height: 1.75;
}

.free-card .btn {
  margin-top: 9px;
}

.request-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 13px;
  box-shadow: var(--shadow);
}

.request-card.pending {
  border-color: #f4dcb4;
  background: linear-gradient(180deg, #fff 0%, #fffcf5 100%);
}

.req-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.unit-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--brand-dark);
  background: var(--brand-soft);
  border: 1px solid #cdece1;
  border-radius: 20px;
  padding: 2px 9px;
}

.req-text {
  font-size: 12.5px;
  line-height: 1.85;
  margin-top: 7px;
  color: var(--ink-2);
}

.req-text strong {
  color: var(--ink);
}

.req-note {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  font-size: 11px;
  color: var(--ink-2);
  background: var(--surface-2);
  border-radius: 9px;
  padding: 6px 9px;
  margin-top: 6px;
  line-height: 1.7;
}

.req-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 5px;
}

.req-contact {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 8px;
  padding: 4px 8px;
  margin-top: 7px;
}

.request-card .btn-row {
  margin-top: 10px;
}

.request-card > .btn {
  margin-top: 9px;
}

/* --------------------------------- board --------------------------------- */

.announce-full {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 14px;
  box-shadow: var(--shadow);
}

.announce-full.pinned {
  border-color: #f0dfb4;
  background: linear-gradient(180deg, #fff 0%, #fffcf4 100%);
}

.announce-top {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.announce-top h3 {
  font-size: 14.5px;
  font-weight: 800;
  line-height: 1.6;
}

.row-actions {
  display: flex;
  gap: 2px;
  flex: none;
}

.announce-body {
  font-size: 12.5px;
  color: var(--ink-2);
  line-height: 1.95;
  margin-top: 8px;
  white-space: pre-wrap;
  word-break: break-word;
}

.announce-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 10px;
  color: var(--muted);
  margin-top: 11px;
  padding-top: 9px;
  border-top: 1px dashed var(--line);
}

.announce-footer span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

/* -------------------------------- profile -------------------------------- */

.profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px;
  border-radius: 20px;
  background:
    radial-gradient(300px 160px at 100% 0%, rgba(19, 161, 132, 0.14) 0%, transparent 70%),
    linear-gradient(150deg, #fff 0%, #f3faf7 100%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.profile-avatar {
  width: 58px;
  height: 58px;
  border-radius: 19px;
  display: grid;
  place-items: center;
  background: linear-gradient(150deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  flex: none;
  box-shadow: 0 14px 24px -16px rgba(10, 59, 49, 0.9);
}

.profile-card h2 {
  font-size: 16px;
  font-weight: 800;
}

.profile-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}

.contact-card {
  display: flex;
  flex-direction: column;
}

.contact-card .switch-field {
  border-top: 1px dashed var(--line);
  margin-top: 10px;
  padding-top: 4px;
}

.contact-hint {
  display: flex;
  align-items: center;
  gap: 4px;
}

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

.up-hero {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.up-number {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid var(--line-2);
  color: var(--brand-dark);
  font-size: 19px;
  font-weight: 800;
  flex: none;
}

.up-hero strong {
  display: block;
  font-size: 13.5px;
  font-weight: 800;
}

.up-hero small {
  display: block;
  font-size: 10.5px;
  color: var(--muted);
}

.up-hero > .badge {
  margin-inline-start: auto;
}

.up-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.up-grid > div {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 8px 10px;
}

.up-grid span {
  display: block;
  font-size: 10px;
  color: var(--muted);
}

.up-grid strong {
  display: block;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.up-balance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 13px;
  background: var(--brand-soft);
  border: 1px solid #cdece1;
}

.up-balance span {
  display: block;
  font-size: 10.5px;
  color: var(--brand);
}

.up-balance strong {
  display: block;
  font-size: 16px;
  font-weight: 800;
  color: var(--brand-dark);
}

.up-balance.masked {
  background: #f2f5f4;
  border-color: var(--line);
}

.up-balance.masked strong {
  color: var(--muted);
  letter-spacing: 4px;
}

.up-balance.masked span {
  color: var(--muted);
}

.lock-note {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 2px 8px;
  white-space: nowrap;
}

.up-phone {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  color: var(--muted);
  flex-wrap: wrap;
}

.menu-card {
  padding: 4px 14px;
}

.menu-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  width: 100%;
  text-align: start;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

.menu-row:last-child {
  border-bottom: 0;
}

.menu-row strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
}

.menu-row small {
  display: block;
  font-size: 10.5px;
  color: var(--muted);
}

.menu-row.danger strong {
  color: var(--danger);
}

.profile-footer-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 10.5px;
  color: var(--muted);
  padding: 4px 2px;
}

.profile-footer-note span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* --------------------------------- admin --------------------------------- */

.admin-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 0 8px;
  margin: 0 -16px;
  padding-inline: 16px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

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

.admin-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  flex: none;
}

.admin-tab.active {
  background: linear-gradient(150deg, var(--brand), var(--brand-dark));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 20px -16px rgba(10, 59, 49, 0.9);
}

.admin-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 12px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.stat-ic {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand);
  margin-bottom: 7px;
}

.stat-card.warn .stat-ic { background: var(--warn-soft); color: var(--warn); }
.stat-card.ok .stat-ic { background: var(--ok-soft); color: var(--ok); }
.stat-card.info .stat-ic { background: var(--info-soft); color: var(--info); }

.stat-value {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: -0.3px;
}

.stat-label {
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 1px;
}

.stat-hint {
  font-size: 9.5px;
  color: var(--muted);
  margin-top: 2px;
}

.quick-admin {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}

.quick-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 11px 4px;
  border-radius: 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 10px;
  font-weight: 700;
  text-align: center;
}

.quick-action .ic {
  color: var(--brand);
}

.quick-action:active {
  transform: scale(0.96);
}

.unit-badge {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  border: 1px solid #cdece1;
  color: var(--brand-dark);
  font-size: 16px;
  font-weight: 800;
  flex: none;
}

.unit-badge.sm {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  font-size: 13px;
}

.admin-unit-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  box-shadow: var(--shadow);
}

.unit-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.unit-card-head strong {
  display: block;
  font-size: 13.5px;
  font-weight: 800;
}

.unit-card-head small {
  display: block;
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.6;
}

.unit-card-head > .badge {
  flex: none;
}

.unit-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}

.unit-card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.unit-card-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  margin-top: 9px;
}

.unit-card-actions button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 2px;
  border-radius: 9px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 9.5px;
  font-weight: 600;
  color: var(--ink-2);
}

.unit-card-actions button .ic {
  color: var(--brand);
}

.unit-card-actions button.danger {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: #f5cccc;
}

.unit-card-actions button.danger .ic {
  color: var(--danger);
}

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

.ledger-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.ledger-box > div {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 8px 10px;
}

.ledger-box span {
  display: block;
  font-size: 10px;
  color: var(--muted);
}

.ledger-box strong {
  display: block;
  font-size: 12.5px;
  font-weight: 800;
}

.ledger-box strong.debt { color: var(--danger); }
.ledger-box strong.ok { color: var(--ok); }

.pending-user {
  background: var(--surface);
  border: 1px solid #f4dcb4;
  border-radius: 16px;
  padding: 12px;
  box-shadow: var(--shadow);
}

.pending-user .btn-row {
  margin-top: 9px;
}

.pending-user .btn-row .btn {
  min-width: 0;
  flex: 1;
}

.user-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.user-name {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.user-name strong {
  font-size: 13px;
  font-weight: 700;
}

.user-meta {
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.6;
}

.admin-charge-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  flex-wrap: wrap;
}

.charge-row-head {
  display: flex;
  align-items: center;
  gap: 5px;
  width: 100%;
}

.admin-charge-row .grow strong {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
}

.admin-charge-row .grow small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  line-height: 1.6;
}

.charge-row-amount {
  text-align: end;
}

.charge-row-amount strong {
  display: block;
  font-size: 12.5px;
  font-weight: 800;
}

.charge-row-amount small {
  display: block;
  font-size: 9.5px;
  color: var(--danger);
}

.summary-chips {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.summary-chips > div {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 8px 9px;
}

.summary-chips span {
  display: block;
  font-size: 9.5px;
  color: var(--muted);
}

.summary-chips strong {
  display: block;
  font-size: 11.5px;
  font-weight: 800;
}

.summary-chips strong.debt {
  color: var(--danger);
}

.payment-admin-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 13px;
  box-shadow: var(--shadow);
}

.payment-admin-card.pending {
  border-color: #f4dcb4;
  background: linear-gradient(180deg, #fff 0%, #fffcf5 100%);
}

.payment-admin-card .pay-head > div > small {
  display: block;
  font-size: 10.5px;
  color: var(--muted);
}

.payment-admin-card .btn-row {
  margin-top: 9px;
}

.payment-admin-card .btn-row .btn {
  min-width: 0;
}

.sms-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 15px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.sms-status.ok {
  background: var(--ok-soft);
  border-color: #c9efda;
}

.sms-status.warn {
  background: var(--warn-soft);
  border-color: #f6dfb8;
}

.sms-status strong {
  display: block;
  font-size: 12.5px;
  font-weight: 800;
}

.sms-status small {
  display: block;
  font-size: 10.5px;
  color: var(--ink-2);
  opacity: 0.8;
  line-height: 1.6;
}

.template-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.template-chips button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 20px;
  background: var(--brand-soft);
  color: var(--brand);
  border: 1px solid #cdece1;
}

.sms-counter {
  text-align: end;
  font-size: 10px;
  color: var(--muted);
  margin: -6px 0 10px;
}

.sms-counter.over {
  color: var(--danger);
  font-weight: 700;
}

.sms-log {
  gap: 7px;
}

.sms-row {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.sms-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 2px;
}

.sms-row p {
  font-size: 11px;
  color: var(--ink-2);
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.sms-row small {
  display: block;
  font-size: 9.5px;
  color: var(--muted);
  margin-top: 3px;
}

.parking-admin-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.parking-admin-row.free {
  background: var(--ok-soft);
  border-color: #c9efda;
}

.parking-admin-row strong {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
}

.parking-admin-row small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  line-height: 1.6;
}

.settings-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 10px;
  font-size: 10.5px;
  color: var(--muted);
}

.settings-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* --------------------------------- guide --------------------------------- */

.guide-public {
  padding-bottom: 0;
}

.public-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: calc(var(--safe-t) + 12px) 16px 10px;
  max-width: 640px;
  margin: 0 auto;
  width: 100%;
}

.brand-dark {
  display: flex;
  align-items: center;
  gap: 9px;
}

.brand-dark strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
}

.brand-dark small {
  display: block;
  font-size: 10.5px;
  color: var(--muted);
}

.guide-page {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.guide-hero {
  border-radius: 22px;
  padding: 20px 16px;
  background:
    radial-gradient(300px 180px at 100% 0%, rgba(255, 255, 255, 0.14) 0%, transparent 70%),
    linear-gradient(150deg, #12806a 0%, #0b4a3d 60%, #083329 100%);
  color: #fff;
  box-shadow: 0 20px 40px -26px rgba(8, 55, 46, 0.9);
}

.guide-logo {
  width: 54px;
  height: 54px;
  border-radius: 17px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  margin-bottom: 10px;
}

.guide-hero h1 {
  font-size: 19px;
  font-weight: 800;
  line-height: 1.6;
  letter-spacing: -0.3px;
}

.guide-hero p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.95;
  margin-top: 6px;
}

.guide-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.guide-chips button {
  font-size: 10.5px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
}

.guide-chips button:active {
  background: rgba(255, 255, 255, 0.22);
}

.guide-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px;
  box-shadow: var(--shadow);
  scroll-margin-top: 20px;
}

.guide-section h2 {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 15.5px;
  font-weight: 800;
  margin-bottom: 10px;
}

.guide-section h2 .ic {
  color: var(--brand);
  flex: none;
}

.guide-section h3 {
  font-size: 13px;
  font-weight: 800;
  margin: 14px 0 5px;
  color: var(--brand-dark);
  padding-inline-start: 9px;
  border-inline-start: 3px solid var(--brand-2);
}

.guide-section h3:first-of-type {
  margin-top: 4px;
}

.guide-section p {
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.95;
}

.guide-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.9;
}

.guide-list li::marker {
  color: var(--brand);
  font-weight: 700;
}

.guide-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 11px 12px;
  border-radius: 13px;
  background: var(--brand-soft);
  border: 1px solid #cdece1;
  color: #0b5c3a;
  font-size: 11.5px;
  line-height: 1.8;
  margin-top: 12px;
}

.guide-note .ic {
  flex: none;
  margin-top: 2px;
}

.guide-note.warn {
  background: var(--warn-soft);
  border-color: #f6dfb8;
  color: #7c4b00;
}

.guide-note code {
  background: rgba(255, 255, 255, 0.6);
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.feature-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px;
}

.feature-ic {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--brand);
  margin-bottom: 6px;
}

.feature-card strong {
  display: block;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.5;
}

.feature-card p {
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.8;
  margin-top: 3px;
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.step-card {
  display: flex;
  gap: 10px;
  padding: 11px;
  border-radius: 13px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.step-number {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: linear-gradient(150deg, var(--brand), var(--brand-dark));
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  flex: none;
}

.step-card strong {
  display: block;
  font-size: 12.5px;
  font-weight: 800;
}

.step-card p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.85;
  margin-top: 2px;
}

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

.faq-item {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 12px;
  overflow: hidden;
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 0;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-arrow {
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: transform 0.2s ease;
  flex: none;
}

.faq-item[open] .faq-arrow {
  transform: rotate(-90deg);
  color: var(--brand);
}

.faq-item p {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.9;
  padding: 0 0 12px;
}

.support-section {
  background: linear-gradient(160deg, #fff 0%, #fbf6e9 100%);
  border-color: #f0e2bd;
}

.developer-card {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px;
  border-radius: 15px;
  background: #fff;
  border: 1px solid #f0e2bd;
  margin-top: 10px;
  box-shadow: 0 12px 24px -22px rgba(120, 90, 20, 0.6);
}

.dev-avatar {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: linear-gradient(150deg, #d8b45f, #a87c16);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  flex: none;
}

.developer-card strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
}

.developer-card small {
  display: block;
  font-size: 10.5px;
  color: var(--muted);
}

.dev-phone {
  display: inline-block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 1px;
}

.developer-card > .ic {
  color: var(--gold);
  flex: none;
}

.support-section .hint {
  margin-top: 8px;
  text-align: center;
}

/* ---------------------------------- pay ---------------------------------- */

.pay-page {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 0 16px calc(var(--safe-b) + 10px);
}

.pay-loading {
  flex: 1;
  display: grid;
  place-items: center;
}

.pay-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(var(--safe-t) + 16px) 0 14px;
}

.pay-brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: linear-gradient(150deg, var(--brand), var(--brand-dark));
  color: #fff;
  flex: none;
  box-shadow: 0 14px 26px -18px rgba(10, 59, 49, 0.9);
}

.pay-header strong {
  display: block;
  font-size: 15px;
  font-weight: 800;
}

.pay-header small {
  display: block;
  font-size: 10.5px;
  color: var(--muted);
}

.pay-main {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.invoice-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.invoice-card.compact {
  margin-top: 12px;
  padding: 12px;
}

.invoice-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.invoice-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 800;
  color: var(--brand);
  background: var(--brand-soft);
  border: 1px solid #cdece1;
  border-radius: 20px;
  padding: 3px 10px;
}

.invoice-status {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  color: var(--muted);
}

.invoice-unit {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 13px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.invoice-unit strong {
  display: block;
  font-size: 13px;
  font-weight: 800;
}

.invoice-unit small {
  display: block;
  font-size: 10.5px;
  color: var(--muted);
}

.summary-amount {
  margin-inline-start: auto;
  font-size: 14px;
  font-weight: 800;
  color: var(--brand-dark);
}

.invoice-items {
  list-style: none;
  padding: 0;
  margin: 12px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.invoice-items li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--ink-2);
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--line);
}

.invoice-items li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.invoice-items li small {
  display: block;
  font-size: 10px;
  color: var(--muted);
}

.invoice-items li strong {
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
}

.invoice-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 13px;
  border-radius: 13px;
  background: linear-gradient(150deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
}

.invoice-total span {
  font-size: 11.5px;
  opacity: 0.85;
}

.invoice-total strong {
  font-size: 17px;
  font-weight: 800;
}

.pay-form-card h2 {
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 10px;
}

.pay-secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 8px;
}

.pay-support {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  align-self: center;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--brand);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 6px 13px;
  margin: 12px 0 4px;
}

.pay-page .credit {
  padding: 12px 0 4px;
}

.pay-result {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 7px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 26px 16px;
  box-shadow: var(--shadow);
}

.result-icon {
  width: 76px;
  height: 76px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand);
  margin-bottom: 4px;
}

.pay-result.ok .result-icon { background: var(--ok-soft); color: var(--ok); }
.pay-result.pending .result-icon { background: var(--warn-soft); color: var(--warn); }
.pay-result.danger .result-icon { background: var(--danger-soft); color: var(--danger); }

.pay-result h1 {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.6;
}

.pay-result > p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.9;
  max-width: 340px;
}

.pay-result .invoice-card {
  width: 100%;
  text-align: start;
}

.pay-result .btn {
  margin-top: 8px;
  width: 100%;
}

/* ------------------------------- responsive ------------------------------ */

@media (min-width: 700px) {
  body {
    font-size: 15.5px;
  }

  .app {
    max-width: 680px;
    border-inline: 1px solid rgba(208, 226, 220, 0.5);
    background: rgba(255, 255, 255, 0.28);
  }

  .bottom-nav {
    max-width: 680px;
    border-radius: 18px 18px 0 0;
  }

  .sheet {
    border-radius: 24px;
    margin-bottom: 3dvh;
    max-height: 88dvh;
  }

  .sheet-backdrop {
    align-items: flex-end;
    padding-bottom: 0;
  }

  .quick-grid {
    grid-template-columns: repeat(6, 1fr);
  }

  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 359px) {
  .quick-grid {
    grid-template-columns: 1fr 1fr;
  }

  .balance-amount {
    font-size: 22px;
  }

  .ms-grid {
    grid-template-columns: 1fr 1fr;
  }

  .up-grid,
  .ledger-box {
    grid-template-columns: 1fr;
  }

  .quick-admin {
    grid-template-columns: 1fr 1fr;
  }

  .form-grid.two {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ------------------------------- print ----------------------------------- */

@media print {
  .bottom-nav,
  .app-header,
  .credit,
  .toast-root,
  .sheet-backdrop {
    display: none !important;
  }

  .app {
    max-width: none;
    padding: 0;
  }

  body {
    background: #fff;
  }
}

