@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

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

:root {
  --primary: #1e3a5f;
  --primary-mid: #2563eb;
  --primary-dark: #0f2744;
  --primary-light: #e8eef5;
  --accent: #3b82f6;
  --success: #059669;
  --success-light: #d1fae5;
  --warning: #d97706;
  --warning-light: #fef3c7;
  --danger: #dc2626;
  --danger-light: #fee2e2;
  --bg: #eef2f7;
  --bg-card: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 4px 20px rgba(15, 23, 42, .08);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, .12);
  --nav-height: 72px;
  --header-height: 72px;
  --sidebar-width: 220px;
  --app-shell-width: 100%;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

html, body {
  height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

#app {
  width: 100%;
  max-width: var(--app-shell-width);
  margin: 0 auto;
  min-height: 100%;
  position: relative;
  background: var(--bg);
}

.hidden { display: none !important; }

/* ── Auth ── */
.auth-screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px 20px;
  padding-top: calc(24px + var(--safe-top));
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(59, 130, 246, .25) 0%, transparent 60%),
    linear-gradient(165deg, var(--primary-dark) 0%, var(--primary) 45%, #1a4d8c 100%);
}

.auth-logo {
  text-align: center;
  margin-bottom: 28px;
  color: #fff;
}

.auth-logo-img {
  width: 180px;
  height: auto;
  display: block;
  margin: 0 auto 14px;
  border-radius: 0;
  background: transparent;
}

.auth-logo p {
  opacity: .75;
  font-size: .9rem;
  font-weight: 500;
  letter-spacing: .02em;
}

.auth-card {
  background: var(--bg-card);
  border-radius: 24px;
  padding: 8px 8px 24px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, .1);
}

.auth-tabs {
  display: flex;
  background: var(--bg);
  border-radius: 16px;
  padding: 4px;
  margin-bottom: 20px;
}

.auth-tab {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  border-radius: 12px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .2s;
}

.auth-tab.active {
  background: var(--bg-card);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.auth-form-wrap {
  padding: 0 16px;
}

.auth-card h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 18px;
  color: var(--text);
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  background: #fafbfc;
  color: var(--text);
  transition: border-color .2s, box-shadow .2s, background .2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.form-group input::placeholder {
  color: #94a3b8;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all .2s;
  width: 100%;
}

.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .6; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(135deg, var(--primary-mid) 0%, var(--primary) 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(30, 58, 95, .35);
}

.btn-success {
  background: var(--success);
  color: #fff;
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-outline {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  color: var(--text);
}

.btn-sm {
  padding: 9px 14px;
  font-size: .82rem;
  width: auto;
  border-radius: 10px;
}

.auth-link {
  text-align: center;
  margin-top: 16px;
  font-size: .88rem;
  color: var(--text-muted);
}

.auth-link a {
  color: var(--primary-mid);
  font-weight: 600;
  text-decoration: none;
}

/* ── Header ── */
.app-header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: #fff;
  padding: calc(10px + var(--safe-top)) 16px 10px;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 4px 20px rgba(15, 39, 68, .25);
  overflow: visible;
  min-height: 64px;
}

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

.header-logo {
  height: 52px;
  width: auto;
  max-width: 100px;
  object-fit: contain;
  object-position: left center;
  flex-shrink: 0;
  display: block;
  background: transparent;
}

.app-header h1 {
  font-size: 1rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.app-header .subtitle {
  font-size: .75rem;
  opacity: .7;
  margin-top: 2px;
  font-weight: 500;
}

.logout-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .2);
  color: #fff;
  font-size: .75rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 10px;
  flex-shrink: 0;
  transition: background .2s;
}

.logout-btn:active { background: rgba(255, 255, 255, .22); }
.logout-icon { font-size: .95rem; line-height: 1; }

/* ── Content ── */
.app-content {
  padding: 16px;
  padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + 20px);
}

.page-header {
  margin-bottom: 18px;
}

.page-header h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.02em;
}

.page-header p {
  font-size: .85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.page-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.page-header-row .btn {
  width: auto;
  flex-shrink: 0;
  padding: 10px 16px;
}

/* ── Dashboard ── */
.hero-card {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-mid) 100%);
  border-radius: 20px;
  padding: 22px 20px;
  color: #fff;
  margin-bottom: 16px;
  box-shadow: 0 8px 28px rgba(30, 58, 95, .35);
  position: relative;
  overflow: hidden;
}

.hero-card::after {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  background: rgba(255, 255, 255, .08);
  border-radius: 50%;
}

.hero-card .label {
  font-size: .8rem;
  font-weight: 500;
  opacity: .8;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.hero-card .value {
  font-size: clamp(1.45rem, 4.5vw, 1.85rem);
  font-weight: 800;
  margin-top: 6px;
  letter-spacing: -.02em;
}

.hero-card .sub {
  font-size: .8rem;
  opacity: .7;
  margin-top: 8px;
}

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

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 14px 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  text-align: center;
}

.stat-card .stat-icon {
  font-size: 1.2rem;
  margin-bottom: 6px;
  display: block;
}

.stat-card .label {
  font-size: .68rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.stat-card .value {
  font-size: 1.15rem;
  font-weight: 800;
  margin-top: 4px;
  color: var(--text);
}

.stat-card .value.money {
  font-size: .9rem;
}

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  margin-bottom: 10px;
  transition: box-shadow .2s;
}

.card:active {
  box-shadow: var(--shadow);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.card-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-light) 0%, #dbeafe 100%);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
}

.card-title {
  font-weight: 700;
  font-size: .95rem;
  line-height: 1.3;
  word-break: break-word;
}

.card-subtitle {
  font-size: .78rem;
  color: var(--text-muted);
  margin-top: 2px;
  font-weight: 500;
}

.badge {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  flex-shrink: 0;
}

.badge-ativo { background: var(--success-light); color: var(--success); }
.badge-quitado { background: var(--primary-light); color: var(--primary-mid); }
.badge-cancelado { background: var(--danger-light); color: var(--danger); }
.badge-pendente { background: var(--warning-light); color: var(--warning); }

.card-body {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 4px 12px;
  margin-bottom: 12px;
}

.card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .84rem;
  padding: 9px 0;
}

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

.card-row .label { color: var(--text-muted); font-weight: 500; }
.card-row .val { font-weight: 700; color: var(--text); }

.card-row.highlight .val {
  color: var(--primary-mid);
  font-size: .95rem;
}

.card-actions {
  display: flex;
  gap: 8px;
}

.card-actions .btn { flex: 1; }

/* ── Card accordion (empréstimos) ── */
.card-accordion {
  padding: 0;
  overflow: hidden;
}

.card-accordion-toggle {
  width: 100%;
  display: block;
  padding: 14px 16px;
  border: none;
  background: transparent;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  color: inherit;
}

.card-accordion-toggle:active {
  background: var(--bg);
}

.card-accordion-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.card-accordion-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.card-chevron {
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  transition: transform .25s ease;
  margin-top: 2px;
}

.card-accordion.is-open .card-chevron {
  transform: rotate(-135deg);
  margin-top: 6px;
}

.card-accordion-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.card-accordion-summary .summary-label {
  font-size: .78rem;
  color: var(--text-muted);
  font-weight: 600;
}

.card-accordion-summary .summary-val {
  font-size: 1rem;
  font-weight: 800;
  color: var(--primary-mid);
}

.card-accordion-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .28s ease;
}

.card-accordion.is-open .card-accordion-panel {
  grid-template-rows: 1fr;
}

.card-accordion-inner {
  overflow: hidden;
}

.card-accordion.is-open .card-accordion-inner {
  padding: 0 16px 16px;
}

.card-accordion .card-body {
  margin-top: 4px;
}

.card-accordion .card-actions {
  margin-top: 12px;
  padding-top: 0;
}

.card-actions-extra {
  margin-top: 8px !important;
}

.btn-whatsapp {
  background: #25d366;
  color: #fff;
  border: none;
  box-shadow: 0 4px 14px rgba(37, 211, 102, .35);
}

.btn-whatsapp:active {
  background: #1ebe57;
}

.btn-whatsapp-block {
  width: 100%;
  margin-bottom: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-whatsapp-block::before {
  content: '';
  width: 18px;
  height: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347z'/%3E%3Cpath d='M12 0C5.373 0 0 5.373 0 12c0 2.124.558 4.122 1.532 5.855L.057 23.43a.75.75 0 0 0 .92.92l5.575-2.475A11.95 11.95 0 0 0 12 24c6.627 0 12-5.373 12-12S18.627 0 12 0zm0 21.75a9.714 9.714 0 0 1-4.95-1.35l-.355-.21-3.305 1.47 1.47-3.225-.231-.37A9.72 9.72 0 0 1 2.25 12C2.25 6.615 6.615 2.25 12 2.25S21.75 6.615 21.75 12 17.385 21.75 12 21.75z'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* ── Search / Filter ── */
.search-bar {
  margin-bottom: 14px;
  position: relative;
}

.search-bar input,
.search-bar select {
  width: 100%;
  padding: 13px 16px 13px 42px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .92rem;
  font-family: inherit;
  background: var(--bg-card);
  color: var(--text);
  appearance: none;
  box-shadow: var(--shadow-sm);
}

.search-bar select {
  padding-left: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.search-bar::before {
  content: '🔍';
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: .9rem;
  pointer-events: none;
  z-index: 1;
  opacity: .5;
}

.search-bar:has(select)::before { display: none; }

.search-bar input:focus,
.search-bar select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .1);
}

/* ── Bottom Nav ── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, var(--app-shell-width));
  height: calc(var(--nav-height) + var(--safe-bottom));
  padding: 8px 12px calc(8px + var(--safe-bottom));
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  display: flex;
  gap: 6px;
  z-index: 100;
  box-shadow: 0 -4px 24px rgba(15, 23, 42, .06);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: .62rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  padding: 8px 2px;
  border-radius: 14px;
  transition: all .2s;
}

.nav-item .nav-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-item .nav-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-item.active {
  color: var(--primary-mid);
  background: var(--primary-light);
}

/* ── FAB ── */
.fab {
  position: fixed;
  bottom: calc(var(--nav-height) + var(--safe-bottom) + 14px);
  right: max(16px, calc((100vw - min(100vw, var(--app-shell-width))) / 2 + 16px));
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary-mid) 0%, var(--primary) 100%);
  color: #fff;
  border: none;
  font-size: 1.6rem;
  font-weight: 300;
  line-height: 1;
  box-shadow: 0 6px 20px rgba(37, 99, 235, .45);
  cursor: pointer;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s, box-shadow .2s;
}

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

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  cursor: pointer;
}

.modal {
  position: relative;
  z-index: 1;
  background: var(--bg-card);
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-width: min(520px, var(--app-shell-width));
  max-height: 92vh;
  overflow-y: auto;
  padding: 12px 20px 28px;
  animation: slideUp .3s cubic-bezier(.32, .72, 0, 1);
  border-top: 1px solid var(--border);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.modal-header h3 {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -.02em;
}

.modal-close {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--bg);
  border-radius: 10px;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  flex-shrink: 0;
}

#admin-modal.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(15, 23, 42, .55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 0;
}

#admin-modal.modal-overlay .admin-modal-content {
  position: relative;
  z-index: 1;
  background: var(--bg-card);
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-width: min(520px, var(--app-shell-width));
  max-height: 92vh;
  overflow-y: auto;
  padding: 20px 20px 28px;
  animation: slideUp .3s cubic-bezier(.32, .72, 0, 1);
}

.modal-handle {
  width: 40px;
  height: 4px;
  background: var(--border);
  border-radius: 4px;
  margin: 0 auto 16px;
}

.modal h2 {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 18px;
  letter-spacing: -.02em;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.modal-actions .btn { flex: 1; }

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

/* ── Toast ── */
.toast {
  position: fixed;
  top: calc(16px + var(--safe-top));
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: #fff;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: .88rem;
  font-weight: 500;
  z-index: 300;
  max-width: 90%;
  text-align: center;
  animation: fadeIn .3s;
  box-shadow: var(--shadow-lg);
}

.toast.error { background: var(--danger); }
.toast.success { background: var(--success); }

@keyframes fadeIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ── Empty / Loading ── */
.empty-state {
  text-align: center;
  padding: 56px 24px;
  color: var(--text-muted);
}

.empty-state .icon {
  width: 64px;
  height: 64px;
  background: var(--primary-light);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin: 0 auto 16px;
}

.empty-state p {
  font-size: .92rem;
  font-weight: 500;
}

.loading {
  text-align: center;
  padding: 48px;
  color: var(--text-muted);
  font-size: .9rem;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--primary-mid);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: 0 auto 14px;
}

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

.section-title {
  font-size: .75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 10px;
}

.summary-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.summary-card .card-row {
  padding: 14px 16px;
}

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

.hint-text {
  font-size: .8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.4;
}

.empty-text {
  font-size: .85rem;
  color: var(--text-muted);
  text-align: center;
  padding: 16px;
}

.parcela-list, .pagamento-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}

.parcela-item, .pagamento-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.parcela-info, .pagamento-item > div:first-child {
  flex: 1;
  min-width: 0;
}

.parcela-info strong, .pagamento-item strong {
  display: block;
  font-size: .88rem;
}

.parcela-info small, .pagamento-item small {
  display: block;
  font-size: .72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.parcela-valor {
  display: block;
  font-weight: 700;
  color: var(--primary-mid);
  font-size: .9rem;
  margin-top: 2px;
}

.pagamento-valor {
  text-align: right;
  font-weight: 700;
  font-size: .88rem;
}

.pagamento-valor small {
  display: block;
  font-weight: 500;
  font-size: .7rem;
  color: var(--text-muted);
}

.pagamento-abatimento {
  border-left: 3px solid var(--accent);
}

.pagamento-parcela {
  border-left: 3px solid var(--success);
}

.parcela-item .btn {
  flex-shrink: 0;
  width: auto;
}

/* ── Gestão ── */
.periodo-tabs {
  display: flex;
  background: var(--bg-card);
  border-radius: 14px;
  padding: 4px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.periodo-tab {
  flex: 1;
  padding: 11px 12px;
  border: none;
  background: transparent;
  border-radius: 10px;
  font-size: .9rem;
  font-weight: 700;
  font-family: inherit;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .2s;
}

.periodo-tab.active {
  background: var(--primary-mid);
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, .3);
}

.hero-profit {
  background: linear-gradient(135deg, #065f46 0%, #059669 100%);
  box-shadow: 0 8px 28px rgba(5, 150, 105, .35);
}

.stats-grid-2 {
  grid-template-columns: 1fr 1fr;
}

.stat-profit .value {
  color: var(--success);
}

.stat-warning .value {
  color: var(--danger);
}

.stat-sub {
  font-size: .72rem;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 600;
}

.profit-text {
  color: var(--success) !important;
  font-weight: 800 !important;
}

.alert-card {
  border-color: #fecaca;
  background: #fffbfb;
}

.gestao-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 8px;
}

.gestao-proximas .gestao-row {
  padding: 12px 16px;
}

.gestao-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.gestao-row strong {
  display: block;
  font-size: .88rem;
}

.gestao-row small {
  display: block;
  font-size: .72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.gestao-row .val {
  font-weight: 700;
  color: var(--primary-mid);
  white-space: nowrap;
}

/* ── Painel Admin ── */
.admin-header {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
}

.admin-badge {
  display: inline-block;
  background: rgba(255, 255, 255, .15);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.admin-section {
  margin-bottom: 22px;
}

.hero-admin {
  background: linear-gradient(135deg, #312e81 0%, #6366f1 55%, #4f46e5 100%);
  box-shadow: 0 12px 32px rgba(79, 70, 229, .4);
  padding: 24px 20px;
  margin-bottom: 0;
}

.hero-admin-deco {
  position: absolute;
  bottom: -40px;
  left: -20px;
  width: 140px;
  height: 140px;
  background: rgba(255, 255, 255, .06);
  border-radius: 50%;
  pointer-events: none;
}

.hero-admin-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}

.hero-admin-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .15);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.hero-admin-icon svg {
  width: 22px;
  height: 22px;
  stroke: #fff;
}

.admin-hero-pill {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .22);
  padding: 6px 12px;
  border-radius: 20px;
}

.hero-admin .label,
.hero-admin .value,
.hero-admin .sub {
  position: relative;
  z-index: 1;
}

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

.admin-stat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.admin-stat-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 4px 0 0 4px;
}

.admin-stat-success::before { background: var(--success); }
.admin-stat-danger::before { background: var(--danger); }
.admin-stat-indigo::before { background: #6366f1; }
.admin-stat-blue::before { background: #3b82f6; }
.admin-stat-amber::before { background: #f59e0b; }
.admin-stat-violet::before { background: #8b5cf6; }

.admin-stat-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

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

.admin-stat-success .admin-stat-icon { background: #d1fae5; color: #059669; }
.admin-stat-danger .admin-stat-icon { background: #fee2e2; color: #dc2626; }
.admin-stat-indigo .admin-stat-icon { background: #e0e7ff; color: #4f46e5; }
.admin-stat-blue .admin-stat-icon { background: #dbeafe; color: #2563eb; }
.admin-stat-amber .admin-stat-icon { background: #fef3c7; color: #d97706; }
.admin-stat-violet .admin-stat-icon { background: #ede9fe; color: #7c3aed; }

.admin-stat-body {
  min-width: 0;
  flex: 1;
}

.admin-stat-label {
  display: block;
  font-size: .72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .03em;
}

.admin-stat-value {
  display: block;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  margin-top: 2px;
  letter-spacing: -.02em;
}

.admin-stat-value.money {
  font-size: 1.05rem;
}

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

.admin-recent-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
}

.admin-avatar {
  background: linear-gradient(135deg, #c7d2fe 0%, #a5b4fc 100%);
  color: #3730a3;
  font-size: .9rem;
}

.admin-recent-info {
  flex: 1;
  min-width: 0;
}

.admin-recent-info strong {
  display: block;
  font-size: .9rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-recent-info small {
  display: block;
  font-size: .76rem;
  color: var(--text-muted);
  margin-top: 1px;
}

.admin-recent-date {
  display: block;
  font-size: .68rem;
  color: var(--text-muted);
  margin-top: 3px;
  font-weight: 600;
}

.admin-recent-valor {
  text-align: right;
  flex-shrink: 0;
}

.admin-recent-valor span {
  display: block;
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: .04em;
}

.admin-recent-valor strong {
  display: block;
  font-size: .92rem;
  font-weight: 800;
  color: #4f46e5;
  margin-top: 2px;
}

.admin-search-wrap {
  position: relative;
  margin-bottom: 16px;
}

.admin-search-wrap svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  stroke: var(--text-muted);
  pointer-events: none;
}

.admin-search-wrap input {
  width: 100%;
  padding: 13px 14px 13px 42px;
  border: 1px solid var(--border);
  border-radius: 14px;
  font-family: inherit;
  font-size: .9rem;
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.admin-search-wrap input:focus {
  outline: none;
  border-color: #818cf8;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .15);
}

.admin-user-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.admin-user-card {
  background: var(--bg-card);
  border-radius: 18px;
  padding: 0 0 14px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  margin-bottom: 0;
  overflow: hidden;
  position: relative;
}

.admin-user-card.is-inactive {
  opacity: .88;
}

.admin-user-accent {
  height: 4px;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
}

.admin-user-card.is-pending .admin-user-accent {
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
}

.admin-user-card.is-inactive .admin-user-accent {
  background: linear-gradient(90deg, #fca5a5, #f87171);
}

.admin-pending-box {
  margin: 0 16px 12px;
  padding: 12px 14px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 14px;
}

.admin-pending-box p {
  margin: 0;
  font-size: .82rem;
  color: #92400e;
  line-height: 1.45;
}

.admin-alert-pending {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid #fcd34d;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}

.admin-alert-pending strong {
  display: block;
  font-size: .95rem;
  color: #92400e;
}

.admin-alert-pending p {
  margin: 4px 0 0;
  font-size: .8rem;
  color: #b45309;
}

.admin-filter-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 12px;
  -webkit-overflow-scrolling: touch;
}

.admin-filter-tab {
  flex-shrink: 0;
  padding: 10px 14px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: 12px;
  font-size: .82rem;
  font-weight: 700;
  font-family: inherit;
  color: var(--text-muted);
  cursor: pointer;
}

.admin-filter-tab.active {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #fff;
}

.admin-recent-card.is-pending {
  border-color: #fcd34d;
  background: #fffdf5;
}

.content-grid > .span-full {
  grid-column: 1 / -1;
}

.admin-user-list {
  grid-column: 1 / -1;
}

.admin-user-card .card-header {
  padding: 14px 16px 0;
  margin-bottom: 12px;
}

.admin-user-info {
  min-width: 0;
}

.admin-valor-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 16px 12px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 100%);
  border: 1px solid #e0e7ff;
  border-radius: 14px;
}

.admin-valor-chip-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(79, 70, 229, .12);
}

.admin-valor-chip-icon svg {
  width: 18px;
  height: 18px;
  stroke: #4f46e5;
}

.admin-valor-chip span {
  display: block;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #6366f1;
}

.admin-valor-chip strong {
  display: block;
  font-size: 1.1rem;
  font-weight: 800;
  color: #3730a3;
  margin-top: 2px;
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0 16px 12px;
}

.admin-metric {
  text-align: center;
  background: var(--bg);
  border-radius: 12px;
  padding: 10px 6px;
  border: 1px solid var(--border);
}

.admin-metric-val {
  display: block;
  font-size: .95rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}

.admin-metric-val.money {
  font-size: .72rem;
  word-break: break-word;
}

.admin-metric-label {
  display: block;
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 4px;
  letter-spacing: .03em;
}

.admin-obs-box {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0 16px 12px;
  padding: 10px 12px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 12px;
}

.admin-obs-box svg {
  width: 16px;
  height: 16px;
  stroke: #d97706;
  flex-shrink: 0;
  margin-top: 2px;
}

.admin-obs-box p {
  margin: 0;
  font-size: .78rem;
  color: #92400e;
  line-height: 1.4;
}

.admin-user-actions {
  padding: 0 16px;
  margin-top: 0;
}

.admin-user-actions .btn-sm {
  padding: 10px 14px;
  font-size: .82rem;
  width: auto;
  flex: 1;
  border-radius: 12px;
}

.btn-danger-outline {
  background: #fff;
  border: 1.5px solid var(--danger);
  color: var(--danger);
}

.btn-success-outline {
  background: #fff;
  border: 1.5px solid var(--success);
  color: var(--success);
}

.admin-modal-content {
  width: 100%;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 16px;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
}

.checkbox-label input {
  width: 18px;
  height: 18px;
}

.error-text {
  color: var(--danger);
}

/* ── Content grid (listas responsivas) ── */
.content-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ══════════════════════════════════════════
   RESPONSIVO — mobile, tablet e desktop
   ══════════════════════════════════════════ */

/* Celulares pequenos */
@media (max-width: 359px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .nav-item {
    font-size: .58rem;
    padding: 6px 1px;
  }

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

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

  .card-actions {
    flex-direction: column;
  }

  .card-actions .btn {
    width: 100%;
  }

  .page-header-row {
    flex-wrap: wrap;
  }
}

@media (max-width: 767px) {
  .form-group input,
  .form-group select,
  .form-group textarea,
  .search-bar input,
  .search-bar select,
  .admin-search-wrap input {
    font-size: 16px;
  }

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

  .stats-grid .stat-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

/* Celulares médios / grandes */
@media (min-width: 400px) {
  .auth-card {
    padding: 8px 12px 28px;
  }

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

@media (min-width: 520px) {
  :root {
    --app-shell-width: 520px;
  }

  #app {
    box-shadow: 0 0 0 1px var(--border);
  }

  body {
    background: #e4e9f0;
  }
}

/* Tablet — grid de cards e stats */
@media (min-width: 640px) {
  .content-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-items: start;
  }

  .content-grid > :not(.card) {
    grid-column: 1 / -1;
  }

  .app-content,
  .admin-content {
    padding: 20px 24px calc(var(--nav-height) + var(--safe-bottom) + 24px);
  }

  .stats-grid {
    gap: 12px;
  }

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

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

  .admin-user-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .hero-card {
    padding: 26px 24px;
  }

  .auth-logo-img {
    width: 200px;
  }
}

/* Tablet landscape / desktop — layout com sidebar */
@media (min-width: 768px) {
  :root {
    --app-shell-width: 1200px;
    --nav-height: auto;
  }

  #app {
    box-shadow: none;
    border: none;
  }

  #main-app,
  #admin-app {
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    grid-template-areas:
      "header header"
      "sidebar content";
    min-height: 100vh;
    min-height: 100dvh;
  }

  #main-app > .app-header,
  #admin-app > .app-header {
    grid-area: header;
    position: sticky;
    top: 0;
    z-index: 110;
    padding: 14px 24px;
  }

  #main-app > .bottom-nav,
  #admin-app > .bottom-nav {
    grid-area: sidebar;
    position: sticky;
    top: calc(var(--header-height) + var(--safe-top));
    align-self: start;
    height: calc(100vh - var(--header-height) - var(--safe-top));
    height: calc(100dvh - var(--header-height) - var(--safe-top));
    width: 100%;
    left: auto;
    bottom: auto;
    transform: none;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding: 16px 10px;
    gap: 4px;
    border-top: none;
    border-right: 1px solid var(--border);
    box-shadow: none;
    background: var(--bg-card);
  }

  #main-app > .app-content,
  #admin-app > .app-content {
    grid-area: content;
    padding: 24px 32px 32px;
    padding-bottom: 32px;
  }

  #main-app > .fab,
  #admin-app > .fab {
    bottom: 28px;
    right: max(28px, calc((100vw - min(100vw, var(--app-shell-width))) / 2 + 28px));
  }

  .nav-item {
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    padding: 12px 14px;
    font-size: .86rem;
    border-radius: 12px;
  }

  .nav-item .nav-icon {
    width: 22px;
    height: 22px;
  }

  .nav-item .nav-icon svg {
    width: 22px;
    height: 22px;
  }

  .auth-screen {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: clamp(24px, 5vw, 56px);
    padding: 48px clamp(24px, 5vw, 64px);
  }

  .auth-logo {
    margin-bottom: 0;
    flex: 1;
    max-width: 380px;
    text-align: left;
  }

  .auth-logo-img {
    margin: 0 0 16px;
  }

  .auth-card {
    flex: 1;
    max-width: 440px;
    padding: 12px 12px 32px;
  }

  .modal-overlay {
    align-items: center;
    padding: 24px;
  }

  .modal {
    border-radius: 24px;
    border: 1px solid var(--border);
    max-height: 88vh;
    animation: modalFadeIn .28s ease;
  }

  #admin-modal.modal-overlay {
    align-items: center;
    padding: 24px;
  }

  #admin-modal.modal-overlay .admin-modal-content {
    border-radius: 24px;
    border: 1px solid var(--border);
    animation: modalFadeIn .28s ease;
  }

  .content-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

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

  .page-header h2 {
    font-size: 1.5rem;
  }

  .card-header {
    align-items: center;
  }
}

/* Desktop largo */
@media (min-width: 1024px) {
  :root {
    --sidebar-width: 240px;
  }

  .content-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
  }

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

  .admin-user-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-content,
  .admin-content {
    padding: 28px 40px 40px;
  }

  .hero-card .value {
    font-size: 2rem;
  }

  .hero-admin .value {
    font-size: 2.1rem;
  }
}

@media (min-width: 1280px) {
  .admin-user-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ── PWA / Instalar app ── */
.pwa-standalone .install-banner,
.pwa-standalone .auth-install-btn,
.pwa-standalone #ios-install-sheet {
  display: none !important;
}

html.pwa-standalone,
html.pwa-standalone body {
  height: 100%;
  height: 100dvh;
}

html.pwa-standalone #app {
  min-height: 100dvh;
}

.install-banner {
  position: fixed;
  top: calc(10px + var(--safe-top));
  left: 50%;
  transform: translateX(-50%);
  width: min(calc(100% - 20px), calc(var(--app-shell-width) - 20px));
  z-index: 500;
  animation: fadeInDown .35s ease;
}

.install-banner-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(15, 23, 42, .18);
}

.install-banner-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: contain;
  flex-shrink: 0;
}

.install-banner-text {
  flex: 1;
  min-width: 0;
}

.install-banner-text strong {
  display: block;
  font-size: .88rem;
  line-height: 1.2;
}

.install-banner-text span {
  display: block;
  font-size: .72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.install-banner .btn-sm {
  flex-shrink: 0;
  padding: 8px 12px;
  font-size: .78rem;
  width: auto;
}

.install-dismiss {
  width: 28px;
  height: 28px;
  border: none;
  background: var(--bg);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.auth-install-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 400px;
  margin: 16px auto 0;
  padding: 14px 18px;
  border: 1.5px dashed rgba(255, 255, 255, .35);
  border-radius: 14px;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  font-size: .9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .2s;
}

.auth-install-btn:active {
  background: rgba(255, 255, 255, .18);
}

.auth-install-icon {
  font-size: 1.1rem;
}

.install-ios-sheet {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.install-ios-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .55);
  backdrop-filter: blur(4px);
}

.install-ios-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  background: var(--bg-card);
  border-radius: 24px 24px 0 0;
  padding: 24px 20px calc(24px + var(--safe-bottom));
  animation: slideUp .3s cubic-bezier(.32, .72, 0, 1);
  text-align: center;
}

.install-ios-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  margin-bottom: 12px;
}

.install-ios-card h3 {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.install-ios-card > p {
  font-size: .88rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.install-ios-steps {
  text-align: left;
  margin: 0 0 20px;
  padding-left: 20px;
  font-size: .88rem;
  line-height: 1.6;
}

.install-ios-steps li {
  margin-bottom: 10px;
}

.ios-share-icon {
  display: inline-block;
  font-size: 1rem;
}

.install-ios-close {
  position: absolute;
  top: 14px;
  right: 14px;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}
