/* ═══════════════════════════════════════════════════════════
   КП «Теплопостачання міста Одеси» — Особистий кабінет
   primary:#FFB800  secondary:#00617B  debt:#E53935  paid:#43A047
   ═══════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:    #FFB800;
  --secondary:  #00617B;
  --p-text:     #090808;
  --s-text:     #6B6B6B;
  --p-bg:       #FFFFFF;
  --s-bg:       #F5F5F5;
  --border:     #EEEEEE;
  --debt:       #E53935;
  --paid:       #43A047;
  --error:      #E53935;
  --radius-card:14px;
  --radius-btn: 40px;
  --appbar-h:   90px;
  --nav-h:      110px;
  --shadow:     0 2px 10px rgba(0,0,0,0.08);
}

html { height: 100%; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--p-bg);
  color: var(--p-text);
  min-height: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

/* ── App shell ───────────────────────────────────────────── */
.app {
  width: 100%;
  max-width: 620px;
  min-height: 100vh;
  background: var(--p-bg);
  display: flex;
  flex-direction: column;
  position: relative;
}

/* ── AppBar ──────────────────────────────────────────────── */
.app-bar {
  background: var(--primary);
  height: var(--appbar-h);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 16px 14px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 50;
}

/* Push content below fixed AppBar */
.app {
  padding-top: var(--appbar-h);
}
/* Back-navigation bar is taller (110px) */
.app:has(.app-bar--back) {
  padding-top: 110px;
}
.app-bar-title {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 600;
  font-size: 28px;
  color: var(--p-text);
  line-height: 1;
  text-align: center;
}

/* AppBar with back navigation */
.app-bar--back {
  height: 110px;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding-bottom: 12px;
  padding-left: 8px;
}
.app-bar-back-row {
  display: flex;
  align-items: center;
  margin-bottom: 4px;
}
.app-bar-back-btn {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--p-text);
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}
.app-bar-back-btn .material-icons { font-size: 28px; }
.app-bar-back-label {
  font-size: 15px;
  color: var(--p-text);
  margin-left: 2px;
  font-family: 'Inter', sans-serif;
}
.app-bar--back .app-bar-title {
  font-size: 26px;
  padding-left: 0;
  text-align: center;
  width: 100%;
}

/* ── Scrollable body ─────────────────────────────────────── */
.app-body {
  flex: 1;
  padding-bottom: var(--nav-h);
}
.page-container {
  padding: 70px 20px 24px;
}

/* ── Bottom navigation ───────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 620px;
  height: var(--nav-h);
  background: var(--p-bg);
  display: flex;
  align-items: flex-start;
  padding: 10px 16px;
  z-index: 100;
}
.bottom-nav-pill {
  background: var(--s-bg);
  border-radius: 40px;
  height: 70px;
  width: 100%;
  max-width: 370px;
  margin: 0 auto;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 5px 8px;
}
.nav-item {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-item .material-icons {
  font-size: 22px;
  color: var(--s-text);
}
.nav-item-label {
  font-size: 10px;
  font-family: 'Inter', sans-serif;
  color: var(--s-text);
  white-space: nowrap;
}
.nav-item.active { background: var(--primary); }
.nav-item.active .material-icons,
.nav-item.active .nav-item-label { color: var(--p-text); }

/* ── Icon rounded square ─────────────────────────────────── */
.icon-sq {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.icon-sq .material-icons { font-size: 26px; }
.icon-sq--yellow  { background: #FFF3CC; }
.icon-sq--yellow  .material-icons { color: #E6A400; }
.icon-sq--teal    { background: #DFF1F5; }
.icon-sq--teal    .material-icons { color: #00617B; }
.icon-sq--green   { background: #E8F5E9; }
.icon-sq--green   .material-icons { color: #388E3C; }
.icon-sq--lavender{ background: #EDE7F6; }
.icon-sq--lavender .material-icons { color: #7B1FA2; }
.icon-sq--red     { background: #FFEBEE; }
.icon-sq--red     .material-icons { color: #C62828; }
.icon-sq--orange  { background: #FFF3E0; }
.icon-sq--orange  .material-icons { color: #E65100; }
.icon-sq--blue    { background: #E3F2FD; }
.icon-sq--blue    .material-icons { color: #1565C0; }
.icon-sq--pink    { background: #FCE4EC; }
.icon-sq--pink    .material-icons { color: #AD1457; }

/* ── Flutter-style info cards ────────────────────────────── */
.fl-card {
  width: 100%;
  min-height: 76px;
  background: var(--p-bg);
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  margin-top: 14px;
  gap: 14px;
}
.fl-card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
}
.fl-card-title {
  font-family: 'Inter Tight', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--p-text);
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.badge-new {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  background: #43A047;
  border-radius: 20px;
  padding: 2px 8px;
  line-height: 1.5;
  letter-spacing: 0.2px;
  white-space: nowrap;
  vertical-align: middle;
}
.fl-card-sub {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--s-text);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fl-card-action {
  font-family: 'Inter Tight', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--p-text);
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
}

/* ── Home page ───────────────────────────────────────────── */
.home-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-top: 32px;
}
.home-date-day {
  font-family: 'Inter Tight', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
}
.home-date-date {
  font-family: 'Inter Tight', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--p-text);
  margin-top: 6px;
}
.home-date-time {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: var(--s-text);
  margin-top: 8px;
}
.home-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2.5px solid var(--primary);
  background: var(--p-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  overflow: hidden;
  position: relative;
}
.home-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.home-avatar .material-icons {
  font-size: 64px;
  color: var(--primary);
}
.home-username {
  font-family: 'Inter Tight', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--secondary);
  margin-top: 20px;
}

/* ── Payment page rows ───────────────────────────────────── */
.pay-section-title {
  font-family: 'Inter Tight', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--p-text);
  text-align: center;
  margin-top: 28px;
}
.pay-period-value {
  font-family: 'Inter Tight', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--secondary);
  text-align: center;
  margin-top: 4px;
}
.pay-rows {
  margin-top: 16px;
}
.pay-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
}
.pay-row:last-child { border-bottom: none; }
.pay-row-label { color: var(--p-text); }
.pay-row-value { font-weight: 600; }
.pay-row-value--debt { color: var(--debt); }
.pay-row-value--paid { color: var(--paid); }
.pay-row-value--black { color: var(--p-text); }

.pay-total-wrap {
  text-align: center;
  margin-top: 24px;
  padding: 20px 0;
  border-top: 2px solid var(--border);
}
.pay-total-label {
  font-family: 'Inter Tight', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--p-text);
}
.pay-total-amount {
  font-family: 'Inter Tight', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--secondary);
  margin-top: 4px;
}

/* ── History cards ───────────────────────────────────────── */
.history-card {
  background: var(--p-bg);
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 16px 18px;
  margin-top: 12px;
}
.history-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.history-period {
  font-family: 'Inter Tight', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--p-text);
}
.history-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
}
.history-badge--debt { background: rgba(229,57,53,0.1); color: var(--debt); }
.history-badge--ok   { background: rgba(67,160,71,0.12); color: var(--paid); }
.history-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.history-row:last-child { border-bottom: none; }
.history-row-label { color: var(--s-text); font-family: 'Inter', sans-serif; }
.history-row-value { font-family: 'Inter', sans-serif; font-weight: 600; color: var(--p-text); }
.history-row-value--debt { color: var(--debt); }
.history-row-value--paid { color: var(--paid); }

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.page-btn {
  min-width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--p-bg);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--p-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 0 8px;
  transition: all 0.15s;
}
.page-btn:hover { background: var(--s-bg); }
.page-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  font-weight: 700;
}
.page-btn.disabled { opacity: 0.4; pointer-events: none; }
.btn-history-start {
  display: inline-block;
  margin-top: 16px;
  padding: 10px 24px;
  background: var(--primary);
  border-radius: var(--radius-btn);
  font-family: 'Inter Tight', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--p-text);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.btn-history-start:hover { background: var(--secondary); color: #F8F9FA; }

/* ── Contact type ────────────────────────────────────────── */
.home-contact-type {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: var(--s-text);
  margin-top: 6px;
  display: block;
  text-decoration: none;
}
.home-contact-type--empty {
  color: var(--secondary);
  font-weight: 500;
}
.ct-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--s-text);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 8px;
  text-align: center;
}
.ct-options {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.ct-option {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  background: var(--p-bg);
  transition: background 0.15s;
  position: relative;
}
.ct-option:last-child { border-bottom: none; }
.ct-option input[type="radio"] { display: none; }
.ct-option-text {
  flex: 1;
  font-size: 15px;
  color: var(--p-text);
  font-family: 'Inter', sans-serif;
}
.ct-option-check {
  font-size: 18px;
  color: transparent;
  transition: color 0.15s;
}
.ct-option:has(input:checked) { background: #EBF4FF; }
.ct-option:has(input:checked) .ct-option-text { color: var(--secondary); font-weight: 600; }
.ct-option:has(input:checked) .ct-option-check { color: var(--secondary); }

.alert-success {
  background: #E8F5E9;
  color: #2e7d32;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
}

.btn-receipt {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 24px;
  background: var(--primary);
  border: none;
  border-radius: var(--radius-btn);
  font-family: 'Inter Tight', sans-serif;
  font-size: 15px;
  font-weight: 400;
  color: var(--p-text);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  box-sizing: border-box;
}
.btn-receipt:hover { background: var(--secondary); color: #F8F9FA; }

/* ── Profile page ────────────────────────────────────────── */
.profile-avatar-wrap {
  display: flex;
  justify-content: center;
  padding-top: 36px;
}
.profile-avatar-circle {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  border: 2.5px solid var(--primary);
  background: var(--s-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  position: relative;
}
.profile-avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profile-avatar-circle .material-icons {
  font-size: 100px;
  color: var(--primary);
}
.profile-name-text {
  font-family: 'Inter Tight', sans-serif;
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  margin-top: 16px;
  color: var(--p-text);
}
.profile-section-label {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--s-text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 32px;
  margin-bottom: 4px;
}
.profile-menu-item {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  width: 100%;
  font-size: inherit;
  gap: 14px;
}
.profile-menu-item:last-of-type { border-bottom: none; }
.profile-menu-text {
  flex: 1;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: var(--p-text);
  text-align: left;
}
.profile-menu-chevron { color: var(--s-text) !important; font-size: 20px !important; }

/* ── Login steps ─────────────────────────────────────────── */
.auth-page {
  width: 100%;
  max-width: 620px;
  min-height: 100vh;
  background: var(--p-bg);
  padding: 40px 28px 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.auth-logo {
  width: 120px;
  height: 120px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}
.auth-title {
  font-family: 'Inter Tight', sans-serif;
  font-size: 30px;
  font-weight: 700;
  color: var(--p-text);
  text-align: center;
  margin-top: 36px;
  width: 100%;
}
.auth-desc {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: var(--s-text);
  text-align: center;
  margin-top: 12px;
  line-height: 1.6;
  width: 100%;
}
.auth-terms {
  font-size: 13px;
  color: var(--s-text);
  text-align: center;
  margin-top: 16px;
  line-height: 1.7;
  width: 100%;
}
.auth-terms a { color: var(--secondary); text-decoration: underline; }

/* Notice box — BankID update notification */
.notice-box {
  width: calc(100% + 56px);  /* виходить за padding auth-page (28px з кожного боку) */
  margin-left: -28px;
  align-self: flex-start;    /* скасовуємо подвійний зсув від align-items:center батька */
  background: #FFFDE7;
  border: 1px solid #FFE082;
  border-radius: 12px;
  padding: 16px 28px;
  margin-top: 20px;
  text-align: left;
  font-size: 13px;
  color: #3E2700;
  line-height: 1.65;
}
.notice-box p {
  margin: 0 0 8px;
}
.notice-box p:last-child {
  margin-bottom: 0;
}
.notice-title {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 10px !important;
}
.notice-box ul {
  margin: 4px 0 8px 18px;
  padding: 0;
}
.notice-box ul li {
  margin-bottom: 3px;
}
/* Мобілка / планшет: 25px відступи з кожного боку від краю екрану */
@media (max-width: 1039px) {
  .notice-box {
    width: calc(100% + 6px); /* 100% content + 3px з кожного боку = 25px від краю auth-page */
    margin-left: -3px;
  }
}
/* Desktop: розширюємо notice-box до ~1000px */
@media (min-width: 1040px) {
  .notice-box {
    width: 1000px;
    margin-left: -218px; /* (1000px - 564px content) / 2 = 218px → симетричний вихід */
  }
}

/* Quick pay section (step=2) */
.quick-pay-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  width: 100%;
}
.quick-pay-text {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--s-text);
  line-height: 1.6;
  text-align: center;
  margin-bottom: 31px; /* +15px відступ перед кнопкою */
}
.quick-pay-section .btn-secondary {
  font-family: 'Inter Tight', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--p-text);
}

/* BankID logo area */
.bankid-logo-wrap {
  margin: 32px auto 0;
  display: flex;
  justify-content: center;
}
.bankid-logo-wrap img { width: 200px; height: 51px; }

/* Checkbox */
.auth-checkbox-wrap {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 24px;
  width: 100%;
}
.auth-checkbox-wrap input[type=checkbox] {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--primary);
  cursor: pointer;
}
.auth-checkbox-wrap label {
  font-size: 14px;
  color: var(--s-text);
  line-height: 1.5;
  cursor: pointer;
}
.auth-checkbox-wrap a { color: var(--secondary); text-decoration: underline; }

/* Bank list */
.bank-list-desc {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--s-text);
  text-align: center;
  margin-top: 12px;
  line-height: 1.6;
  width: 100%;
}
.bank-list-box {
  background: var(--s-bg);
  border-radius: var(--radius-card);
  margin-top: 28px;
  width: 100%;
  overflow: hidden;
}
.bank-item {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--p-text);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  gap: 14px;
  transition: background 0.1s;
}
.bank-item:last-child { border-bottom: none; }
.bank-item:hover { background: var(--border); }
.bank-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  color: var(--p-text);
  font-family: 'Inter Tight', sans-serif;
}

/* Account input */
.account-input-wrap {
  width: 100%;
  margin-top: 32px;
  position: relative;
}
.account-input {
  width: 100%;
  height: 58px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 0 16px;
  font-size: 18px;
  font-family: 'Inter', sans-serif;
  color: var(--p-text);
  background: var(--p-bg);
  outline: none;
  letter-spacing: 2px;
  transition: border-color 0.2s;
}
.account-input:focus { border-color: var(--primary); }
.account-input::placeholder { letter-spacing: normal; color: #AAAAAA; font-size: 14px; }
.account-counter {
  text-align: right;
  font-size: 12px;
  color: var(--s-text);
  margin-top: 6px;
  font-family: 'Inter', sans-serif;
}
.auth-footer-note {
  font-size: 12px;
  color: var(--s-text);
  text-align: center;
  margin-top: 14px;
  line-height: 1.5;
  width: 100%;
}

/* Buttons */
.btn-primary {
  width: 100%;
  height: 56px;
  background: var(--primary);
  border: none;
  border-radius: var(--radius-btn);
  font-family: 'Inter Tight', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--p-text);
  cursor: pointer;
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.btn-primary:hover { background: var(--secondary); color: #F8F9FA; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
  width: 100%;
  height: 54px;
  background: var(--p-bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-btn);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: var(--s-text);
  cursor: pointer;
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.btn-secondary:hover { background: var(--secondary); color: #F8F9FA; border-color: var(--secondary); }

/* Form elements */
.form-group { margin-top: 18px; }
.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--p-text);
  margin-bottom: 8px;
}
.form-input {
  width: 100%;
  height: 52px;
  background: var(--s-bg);
  border: 1.5px solid transparent;
  border-radius: 12px;
  padding: 0 16px;
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  color: var(--p-text);
  outline: none;
  transition: border-color 0.2s;
}
.form-input:focus { border-color: var(--primary); background: var(--p-bg); }
.form-select {
  width: 100%;
  height: 52px;
  background: var(--s-bg);
  border: 1.5px solid transparent;
  border-radius: 12px;
  padding: 0 16px;
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  color: var(--p-text);
  outline: none;
  appearance: none;
  cursor: pointer;
  transition: border-color 0.2s;
}
.form-select:focus { border-color: var(--primary); background: var(--p-bg); }
.form-textarea {
  width: 100%;
  min-height: 120px;
  background: var(--s-bg);
  border: 1.5px solid transparent;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  color: var(--p-text);
  outline: none;
  resize: vertical;
  transition: border-color 0.2s;
}
.form-textarea:focus { border-color: var(--primary); background: var(--p-bg); }
.form-hint {
  font-size: 12px;
  color: var(--s-text);
  margin-top: 5px;
  display: block;
}

/* Alerts */
.alert-error {
  background: rgba(229,57,53,0.08);
  border: 1px solid var(--error);
  color: var(--error);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14px;
  margin-top: 16px;
  width: 100%;
}
.alert-success {
  background: rgba(67,160,71,0.08);
  border: 1px solid var(--paid);
  color: var(--paid);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14px;
  margin-top: 16px;
  width: 100%;
}
.api-error-banner {
  background: rgba(229,57,53,0.08);
  border: 1px solid var(--error);
  color: var(--error);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14px;
  margin-top: 20px;
}

/* Empty state */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 80px 0;
  text-align: center;
}
.empty-state .material-icons { font-size: 64px; color: var(--border); }
.empty-state p { font-size: 16px; color: var(--s-text); margin-top: 16px; }

/* Confirm dialog */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.confirm-overlay.active { display: flex; }
.confirm-box {
  background: var(--p-bg);
  border-radius: 20px;
  padding: 28px 24px;
  width: 100%;
  max-width: 340px;
  text-align: center;
}
.confirm-box h3 {
  font-family: 'Inter Tight', sans-serif;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}
.confirm-box p {
  font-size: 14px;
  color: var(--s-text);
  line-height: 1.5;
  margin-bottom: 24px;
}
.confirm-actions { display: flex; gap: 12px; }
.confirm-actions .btn-cancel {
  flex: 1;
  height: 48px;
  border-radius: 40px;
  border: 1.5px solid var(--border);
  background: var(--p-bg);
  font-size: 15px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
}
.confirm-actions .btn-danger {
  flex: 1;
  height: 48px;
  border-radius: 40px;
  border: none;
  background: var(--debt);
  color: #FFF;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Inter Tight', sans-serif;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Quick pay result page ───────────────────────────────── */
.qp-result-page {
  width: 100%;
  max-width: 620px;
  min-height: 100vh;
  background: var(--p-bg);
  padding: 40px 20px 60px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}
.qp-page-title {
  font-family: 'Inter Tight', sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--p-text);
  margin-bottom: 4px;
}

/* Info card */
.qp-info-card {
  background: var(--s-bg);
  border-radius: var(--radius-card);
  padding: 4px 20px;
  margin-top: 20px;
}
.qp-info-row {
  display: flex;
  flex-direction: column;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.qp-info-row:last-child { border-bottom: none; }
.qp-info-label {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: var(--s-text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 5px;
}
.qp-info-value {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--p-text);
  line-height: 1.3;
}

/* Amount card */
.qp-amount-card {
  background: var(--secondary);
  border-radius: var(--radius-card);
  padding: 24px 20px;
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.qp-amount-label {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  letter-spacing: 0.3px;
}
.qp-amount-value {
  font-family: 'Inter Tight', sans-serif;
  font-size: 38px;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.1;
}

.qp-actions {
  margin-top: 24px;
  width: 100%;
}

/* ── Account switcher chips (dashboard) ─────────────────── */
.acc-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 4px;
}
.acc-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border-radius: 40px;
  border: 1.5px solid var(--border);
  background: var(--p-bg);
  font-size: 13px;
  font-weight: 500;
  color: var(--p-text);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s, background 0.15s;
}
.acc-chip--active {
  background: var(--primary);
  border-color: var(--primary);
  font-weight: 700;
  cursor: default;
}
.acc-chip--add {
  border-style: dashed;
  color: var(--s-text);
  text-decoration: none;
}
.acc-chip:not(.acc-chip--active):not(.acc-chip--add):hover {
  border-color: var(--primary);
}

/* ── Accounts page cards ─────────────────────────────────── */
.acc-card {
  background: var(--p-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 14px 18px;
  margin-top: 14px;
}
.acc-card--active {
  border-color: var(--primary);
}
.acc-card-top {
  display: flex;
  align-items: center;
  gap: 14px;
}
.acc-card-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.acc-card-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--p-text);
}
.acc-card-number {
  font-size: 13px;
  color: var(--s-text);
  font-variant-numeric: tabular-nums;
}
.acc-card-type {
  font-size: 12px;
  color: var(--secondary);
  font-weight: 500;
}
.acc-badge {
  background: var(--primary);
  color: var(--p-text);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 40px;
  white-space: nowrap;
}
.acc-card-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.btn-acc-switch {
  flex: 1;
  padding: 10px;
  background: var(--primary);
  border: none;
  border-radius: var(--radius-btn);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.btn-acc-remove {
  padding: 10px 16px;
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-btn);
  font-size: 14px;
  color: var(--debt);
  cursor: pointer;
}
.btn-add-account {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 18px;
  padding: 14px;
  background: transparent;
  border: 2px dashed var(--border);
  border-radius: var(--radius-card);
  font-size: 15px;
  font-weight: 600;
  color: var(--secondary);
  cursor: pointer;
}
.add-acc-form {
  background: var(--s-bg);
  border-radius: var(--radius-card);
  padding: 20px;
  margin-top: 18px;
}
.add-acc-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 14px;
}
.add-acc-input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  background: var(--p-bg);
  color: var(--p-text);
  outline: none;
}
.add-acc-input:focus { border-color: var(--primary); }
.add-acc-address {
  font-size: 14px;
  color: var(--s-text);
  background: var(--p-bg);
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
}
.add-acc-error {
  color: var(--debt);
  font-size: 13px;
  margin-top: 8px;
}
.btn-cancel-link {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  background: transparent;
  border: none;
  font-size: 14px;
  color: var(--s-text);
  cursor: pointer;
  text-align: center;
}

/* ── Small screen tweaks ─────────────────────────────────── */
@media (max-width: 420px) {
  .app-bar-title { font-size: 24px; }
  .home-username { font-size: 18px; }
  .auth-title    { font-size: 26px; }
  .qp-pdf-frame  { height: calc(55vh - 100px); }
}
