/* ================================================
   LEGALPASS — PORTAL & ADMIN STYLES
   ================================================ */

/* ── Portal Shell ─────────────────────────────── */
body.portal-body {
  background: #FFFFFF;
  min-height: 100vh;
  overflow-x: hidden;
}

.portal-layout {
  min-height: 100vh;
  max-width: 100%;
}

.portal-main {
  max-width: 100%;
  overflow-x: hidden;
}

/* ── Sidebar ─────────────────────────────────── */
.sidebar {
  width: 256px;
  background: var(--gold);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  min-height: 0;
  overflow: hidden;
  overflow-x: hidden;
  z-index: 50;
}

.sidebar__header {
  padding: 1.1rem 0 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
.sidebar__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  position: relative;
  margin: 0 1rem 1.15rem;
  padding: 0.75rem 1rem;
  background: #FFFFFF;
  border: 1px solid var(--grey-mid);
  border-radius: var(--radius);
  text-align: left;
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.12),
    0 8px 20px rgba(42, 74, 72, 0.14);
  transition:
    background var(--transition),
    transform var(--transition),
    box-shadow var(--transition);
}
.sidebar__logo:hover {
  background: var(--gold-pale);
  transform: translateY(-1px);
  box-shadow:
    0 4px 10px rgba(0, 0, 0, 0.14),
    0 10px 24px rgba(42, 74, 72, 0.16);
}
.sidebar__logo::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.7rem;
  height: 1px;
  background: rgba(255, 255, 255, 0.18);
}
.sidebar__logo img {
  height: 40px;
  width: auto;
  flex-shrink: 0;
  display: block;
}
.sidebar__user {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0 1.5rem;
  margin-top: 0.15rem;
}
.sidebar__avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2A4A48 0%, #1a3533 100%);
  border: 2px solid rgba(255, 255, 255, 0.35);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.88rem; font-weight: 700;
  color: #FFFFFF;
  flex-shrink: 0;
  letter-spacing: 0.03em;
}
.sidebar__user-name {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--white);
  line-height: 1.3;
}
.sidebar__user-plan {
  font-size: 0.73rem;
  color: rgba(255,255,255,0.75);
  letter-spacing: 0.04em;
}

/* Minutes widget */
.sidebar__minutes {
  margin: 1rem 1rem 0;
  background: rgba(77,124,122,0.07);
  border: 1px solid rgba(77,124,122,0.2);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
}
.sidebar__minutes-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.92);
  margin-bottom: 0.35rem;
}
.sidebar__minutes-count {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
.sidebar__minutes-sub {
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255,255,255,0.9);
  margin-top: 0.15rem;
}
.sidebar__minutes-bar {
  height: 3px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  margin-top: 0.65rem;
  overflow: hidden;
}
.sidebar__minutes-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: 2px;
  transition: width 1.2s cubic-bezier(0.34,1.1,0.64,1);
}
.sidebar__minutes-fill--warning { background: linear-gradient(90deg, #C9914C, #E2B97A); }
.sidebar__minutes-fill--danger  { background: linear-gradient(90deg, var(--danger), #E27A7A); }

/* Nav items */
.sidebar__nav {
  flex: 1 1 auto;
  min-height: 0;
  padding: 1.25rem 0 0.5rem;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
.sidebar__nav-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.95);
  padding: 0 1.5rem;
  margin-bottom: 0.4rem;
  margin-top: 1.4rem;
  display: block;
}
.sidebar__nav-label:first-child { margin-top: 0; }

.sidebar__nav-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.68rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #ffffff;
  transition: all var(--transition);
  border-left: 3px solid transparent;
  cursor: pointer;
}
.sidebar__nav-item:hover {
  color: #FFFFFF;
  background: rgba(255,255,255,0.12);
  border-left-color: rgba(255,255,255,0.5);
}
.sidebar__nav-item.active {
  color: var(--white);
  background: rgba(255,255,255,0.18);
  border-left-color: var(--white);
  font-weight: 600;
}
.sidebar__nav-icon {
  width: 18px; height: 18px;
  flex-shrink: 0;
  opacity: 0.9;
}
.sidebar__nav-item.active .sidebar__nav-icon,
.sidebar__nav-item:hover  .sidebar__nav-icon { opacity: 1; }

.sidebar__header,
.sidebar__minutes {
  flex-shrink: 0;
}

.sidebar__footer {
  position: relative;
  flex-shrink: 0;
  margin: 0.65rem 1rem 1.1rem;
  margin-top: auto;
  padding: 0.8rem 1.1rem;
  border-top: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--btn-primary-bg);
  background: #FFFFFF;
  border: 1px solid var(--grey-mid);
  border-radius: var(--radius);
  cursor: pointer;
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.12),
    0 8px 20px rgba(42, 74, 72, 0.14);
  transition:
    background var(--transition),
    color var(--transition),
    transform var(--transition),
    box-shadow var(--transition);
}
.sidebar__footer::before {
  content: '';
  position: absolute;
  top: -0.65rem;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
}
.sidebar__footer svg {
  color: var(--btn-primary-bg);
  flex-shrink: 0;
}
.sidebar__footer:hover {
  color: var(--btn-primary-bg);
  background: var(--gold-pale);
  transform: translateY(-2px);
  box-shadow:
    0 4px 10px rgba(0, 0, 0, 0.16),
    0 12px 28px rgba(42, 74, 72, 0.18);
}
.sidebar__footer:hover svg {
  color: var(--btn-primary-bg);
}

/* ── Main area ───────────────────────────────── */
.portal-main {
  margin-left: 256px;
  width: calc(100% - 256px);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.portal-topbar {
  height: 62px;
  background: var(--white);
  border-bottom: 1px solid var(--grey-mid);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 40;
}
.portal-topbar__title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--navy);
}
.portal-topbar__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.portal-topbar__avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy-dark), #2A4A48);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 700;
  color: #FFFFFF;
  cursor: pointer;
}

.portal-content {
  flex: 1;
  padding: 2rem;
  box-sizing: border-box;
  max-width: 100%;
  overflow-x: hidden;
}

/* ── Minutes Meter SVG ───────────────────────── */
.minutes-meter-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.minutes-meter {
  position: relative;
  width: 168px; height: 168px;
}
.minutes-meter svg {
  /* Scale with the container (the width/height attrs are fixed at 168) so the
     ring stays centred and the center text lines up at every screen size. */
  display: block;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  overflow: visible;
}
.minutes-meter__track {
  fill: none;
  stroke: #E6F4F1;
  stroke-width: 13;
}
.minutes-meter__fill {
  fill: none;
  stroke: url(#meterGradient);
  stroke-width: 13;
  stroke-linecap: round;
  stroke-dasharray: 452;
  stroke-dashoffset: 452;
  filter: drop-shadow(0 2px 5px rgba(20,184,166,0.35));
  transition: stroke-dashoffset 1.5s cubic-bezier(0.34,1.1,0.64,1);
}
.minutes-meter__fill--warning { stroke: var(--warning); filter: drop-shadow(0 2px 5px rgba(217,164,6,0.3)); }
.minutes-meter__fill--danger  { stroke: var(--danger);  filter: drop-shadow(0 2px 5px rgba(201,76,76,0.3)); }

.minutes-meter__center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
}
.minutes-meter__value {
  font-family: var(--font-display);
  font-size: 3rem; font-weight: 800;
  color: var(--midnight, #1F2937); line-height: 1;
  letter-spacing: -0.02em;
}
.minutes-meter__label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--grey-dark);
  margin-top: 0.35rem;
  letter-spacing: 0.1em;
  line-height: 1.4;
}
.minutes-meter__remain {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--navy-dark);
}

/* ── Stat cards ──────────────────────────────── */
.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  border: 1px solid var(--grey-mid);
}
.stat-card__label {
  font-size: 0.74rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-mid); margin-bottom: 0.45rem;
}
.stat-card__value {
  font-family: var(--font-display);
  font-size: 2rem; font-weight: 700;
  color: var(--text); line-height: 1;
}
.stat-card__value--accent {
  color: var(--navy-dark);
}
.stat-card__sub {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-mid); margin-top: 0.25rem;
}

/* ── Chat session rows ───────────────────────── */
.chat-row {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--grey-mid);
}
.chat-row:last-child { border-bottom: none; }
.chat-row__icon {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--grey-light);
  display: flex; align-items: center; justify-content: center;
  color: var(--navy); flex-shrink: 0; font-size: 1rem;
}
.chat-row__info { flex: 1; min-width: 0; }
.chat-row__date {
  font-size: 0.88rem; font-weight: 500; color: var(--text);
}
.chat-row__attorney {
  font-size: 0.76rem; color: var(--grey-dark);
}
.chat-row__duration {
  font-size: 0.88rem; font-weight: 600; color: var(--navy);
  flex-shrink: 0;
}

/* ── Mobile sidebar toggle ───────────────────── */
.sidebar-open-btn {
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--navy-dark);
  font-size: 1.35rem;
  cursor: pointer;
  padding: 0.35rem;
  margin-right: 0.15rem;
  min-width: 44px;
  min-height: 44px;
  flex-shrink: 0;
}
.portal-topbar__left {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  min-width: 0;
  flex: 1;
}

/* ── Dashboard layout ────────────────────────── */
.dash-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 1.5rem;
}
.usage-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--grey-mid);
  padding: 2rem;
}
.usage-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}
.usage-card__title {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey-dark);
}
.dash-usage-row {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}
.dash-stats-grid {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
/* Minutes used + when the allowance refills — the supporting detail under the
   gauge, which carries the headline "minutes left" number. */
.dash-usage-caption {
  font-size: 0.88rem;
  color: var(--text-mid);
  margin: 0 0 1rem;
}
.portal-welcome { margin-bottom: 1.5rem; }
.portal-welcome h3 {
  font-size: 1.5rem;
  margin-bottom: 0.2rem;
}
.portal-welcome p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-mid);
}
.quick-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1.25rem;
}
.quick-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  background: var(--grey-light);
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  border: 1px solid var(--grey-mid);
  transition: all var(--transition);
  cursor: pointer;
  min-height: 44px;
}
.quick-link:hover {
  background: var(--white);
  border-color: var(--gold);
  color: var(--navy);
  box-shadow: var(--shadow);
}
.quick-link__icon { font-size: 1.1rem; flex-shrink: 0; }
.plan-info-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--grey-mid);
  padding: 1.25rem;
}
.plan-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--grey-mid);
  font-size: 0.88rem;
}
.plan-info-row:last-child { border-bottom: none; }
.plan-info-row__label { color: var(--grey-dark); }
.plan-info-row__value { font-weight: 600; color: var(--text); text-align: right; }

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

/* ── Transcript cards ─────────────────────────── */
.transcript-card {
  background: var(--white);
  border: 1px solid var(--grey-mid);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr auto;
  align-items: center;
  gap: 1rem;
  transition: box-shadow var(--transition);
}
.transcript-card:hover { box-shadow: var(--shadow); }
.transcript-card__label {
  font-size: 0.72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--grey-dark); margin-bottom: 0.2rem;
}
.transcript-card__value {
  font-size: 0.9rem; color: var(--text); font-weight: 500;
}

/* ── Invoice rows ─────────────────────────────── */
.invoice-row {
  background: var(--white);
  border: 1px solid var(--grey-mid);
  border-radius: var(--radius);
  padding: 0.9rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr 0.7fr 0.6fr auto;
  align-items: center;
  gap: 1rem;
}
.invoice-row__period { font-size: 0.9rem; font-weight: 500; color: var(--text); }
.invoice-row__amount { font-size: 0.9rem; font-weight: 600; color: var(--navy); }

/* ── Data table (admin) ───────────────────────── */
.data-table-wrap {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--grey-mid);
  /* Scroll the table sideways on narrow screens instead of clipping it. */
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  box-shadow: var(--shadow);
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  /* Keep columns readable; the wrap above scrolls when this exceeds the screen. */
  min-width: 560px;
}
.data-table thead {
  background: var(--navy);
}
.data-table th {
  color: rgba(255,255,255,0.8);
  font-size: 0.74rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.9rem 1.25rem;
  text-align: left;
  white-space: nowrap;
}
.data-table td {
  padding: 0.9rem 1.25rem;
  font-size: 0.88rem; color: var(--text);
  border-bottom: 1px solid var(--grey-mid);
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: var(--grey-light); }

/* ── Search bar ──────────────────────────────── */
.search-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--white);
  border: 1.5px solid var(--grey-mid);
  border-radius: var(--radius);
  padding: 0 1rem;
  transition: border-color var(--transition);
}
.search-bar:focus-within { border-color: var(--navy); }
.search-bar__icon { color: var(--grey); flex-shrink: 0; }
.search-bar input {
  flex: 1; border: none; outline: none;
  font-family: var(--font-body);
  font-size: 0.9rem; color: var(--text);
  padding: 0.7rem 0; background: transparent;
}
.search-bar input::placeholder { color: var(--grey); }

/* ── Admin nav ────────────────────────────────── */
.admin-nav {
  background: var(--gold);
  height: 60px;
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  border-bottom: 1px solid rgba(77,124,122,0.14);
  position: sticky; top: 0; z-index: 100;
}
.admin-nav__logo {
  font-family: var(--font-display);
  font-size: 1.35rem; font-weight: 700;
  color: var(--white);
}
.admin-nav__logo span { color: var(--gold); }
.admin-nav__badge {
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--gold-dim);
  background: var(--gold-pale);
  padding: 0.2rem 0.65rem;
  border-radius: 100px;
}
.admin-nav__right {
  display: flex; align-items: center; gap: 1rem;
}
.admin-nav__user {
  font-size: 0.85rem; color: rgba(255,255,255,0.65);
}

/* ── Chat page specific ──────────────────────── */
.chat-page-layout {
  display: flex;
  height: calc(100vh - 62px);
}
.chat-embed-area {
  flex: 1;
  background: var(--grey-light);
  display: flex; align-items: stretch; justify-content: stretch;
  border-right: 1px solid var(--grey-mid);
  position: relative;
  overflow: hidden;
  min-height: 420px;
}
.portal-layout--chat.chat-proprofs-live .chat-embed-area {
  background: #F0F2F6;
}
.portal-layout--chat.chat-proprofs-live .proprofs-embed-host,
.portal-layout--chat.chat-proprofs-live .chat-proprofs-stack,
.portal-layout--chat.chat-proprofs-live .chat-proprofs-stack__frame {
  width: 100%;
  height: 100%;
  min-height: 100%;
}
.portal-layout--chat.chat-session-started .chat-proprofs-stack__launcher {
  display: none !important;
}
.chat-embed-placeholder {
  text-align: center;
  max-width: 340px;
}
.chat-embed-icon {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--navy-mid);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.25rem;
  font-size: 2rem;
}
.chat-sidebar {
  width: 300px; flex-shrink: 0;
  background: var(--white);
  display: flex; flex-direction: column;
  padding: 1.5rem;
  overflow-y: auto;
}
.attorney-card {
  border: 1px solid var(--grey-mid);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}
.attorney-avatar {
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, #2A4A48 0%, #1a3533 100%);
  border: 2px solid rgba(255, 255, 255, 0.35);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 1.1rem; font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 0.75rem;
}
.minutes-countdown {
  background: linear-gradient(165deg, var(--navy-dark) 0%, #2A4A48 100%);
  border-radius: 12px;
  padding: 1.35rem 1.25rem;
  text-align: center;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow:
    0 4px 12px rgba(42,74,72,0.15),
    0 12px 28px rgba(42,74,72,0.12);
}
.minutes-countdown__eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.88);
  margin-bottom: 0.5rem;
}
.minutes-countdown__num {
  font-family: var(--font-display);
  font-size: 2.8rem; font-weight: 700;
  color: #FFFFFF;
  line-height: 1;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
  font-variant-numeric: tabular-nums;
}
.minutes-countdown__label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.88);
  margin-top: 0.35rem;
}
.minutes-countdown__bar {
  margin-top: 1rem;
  height: 4px;
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
  overflow: hidden;
}
.minutes-countdown__bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #E8C547, #F5D76E);
  border-radius: 2px;
  transition: width 1s linear;
}

/* ── Start chat card (dashboard) ─────────────── */
.start-chat-card {
  background: linear-gradient(165deg, var(--navy-dark) 0%, #2A4A48 100%);
  border-radius: 14px;
  padding: 2rem 1.75rem;
  color: var(--white);
  text-align: center;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: visible;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow:
    0 4px 12px rgba(42,74,72,0.18),
    0 16px 36px rgba(42,74,72,0.2);
}
.start-chat-card::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  background: radial-gradient(ellipse 80% 70% at 50% 30%, rgba(255,255,255,0.1) 0%, transparent 70%);
  pointer-events: none;
}
.start-chat-card__status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #1B5E3A;
  background: #E8F8EF;
  border: 1px solid rgba(45,138,91,0.35);
  padding: 0.4rem 0.9rem;
  border-radius: 100px;
  margin-bottom: 1.25rem;
  position: relative;
}
.start-chat-card h3 {
  color: #FFFFFF;
  font-size: 1.45rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  position: relative;
}
.start-chat-card__minutes {
  color: rgba(255,255,255,0.92);
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  position: relative;
  line-height: 1.5;
}
.start-chat-card__minutes strong {
  color: #FFFFFF;
  font-weight: 700;
  font-size: 1.05rem;
}
.start-chat-card > .btn {
  position: relative;
  z-index: 2;
  background: #FFFFFF !important;
  color: var(--btn-primary-bg) !important;
  border-color: #FFFFFF !important;
  transform: translateY(-4px);
  box-shadow:
    0 4px 10px rgba(0,0,0,0.2),
    0 10px 28px rgba(0,0,0,0.22);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.start-chat-card > .btn:hover {
  background: var(--gold-pale) !important;
  color: var(--btn-primary-bg) !important;
  transform: translateY(-8px) scale(1.02);
  box-shadow:
    0 8px 16px rgba(0,0,0,0.24),
    0 16px 40px rgba(0,0,0,0.28);
}

/* ── Plan cards (pricing) ─────────────────────── */
.pricing-cards {
  perspective: 1200px;
}
.plan-card {
  background: linear-gradient(165deg, #FFFFFF 0%, #F8FCFB 100%);
  border: 1px solid rgba(201, 221, 221, 0.65);
  border-radius: 14px;
  padding: 2.25rem;
  display: flex; flex-direction: column;
  transition: box-shadow 0.28s ease, transform 0.28s ease, border-color 0.28s ease;
  position: relative;
  overflow: visible;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.95) inset,
    0 2px 4px rgba(42,74,72,0.04),
    0 8px 20px rgba(42,74,72,0.08),
    0 20px 40px rgba(42,74,72,0.07);
  transform: translateY(0);
}
.plan-card::after {
  content: '';
  position: absolute;
  inset: auto 12% -6px 12%;
  height: 12px;
  border-radius: 50%;
  background: rgba(42,74,72,0.12);
  filter: blur(10px);
  opacity: 0.55;
  transition: opacity 0.28s ease, transform 0.28s ease;
  z-index: -1;
}
.plan-card:hover {
  border-color: rgba(77,124,122,0.35);
  transform: translateY(-10px);
  box-shadow:
    0 1px 0 rgba(255,255,255,1) inset,
    0 4px 8px rgba(42,74,72,0.06),
    0 16px 32px rgba(42,74,72,0.12),
    0 32px 56px rgba(42,74,72,0.14);
}
.plan-card:hover::after {
  opacity: 0.75;
  transform: scaleX(1.05);
}
.plan-card--featured {
  border-color: rgba(77,124,122,0.5);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.95) inset,
    0 4px 12px rgba(42,74,72,0.08),
    0 12px 28px rgba(42,74,72,0.12),
    0 24px 48px rgba(42,74,72,0.1);
}
.plan-card--featured:hover {
  box-shadow:
    0 1px 0 rgba(255,255,255,1) inset,
    0 8px 16px rgba(42,74,72,0.1),
    0 20px 40px rgba(42,74,72,0.16),
    0 36px 64px rgba(42,74,72,0.18);
}
.plan-card > .btn {
  position: relative;
  z-index: 2;
  /* Pin the CTA to the bottom of the card so it lines up across cards even
     when one has a "Most Popular" badge or extra content above it (the card
     itself is display:flex; flex-direction:column, and grid rows stretch to
     equal height by default, so this reliably aligns all buttons). */
  margin-top: auto;
  transform: translateY(-4px);
  box-shadow:
    0 3px 6px rgba(42,74,72,0.14),
    0 8px 20px rgba(42,74,72,0.2);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.22s ease, border-color 0.22s ease;
}
.plan-card:hover > .btn {
  transform: translateY(-8px);
  box-shadow:
    0 6px 12px rgba(42,74,72,0.18),
    0 14px 32px rgba(42,74,72,0.28);
}
.plan-card > .btn:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow:
    0 8px 16px rgba(42,74,72,0.22),
    0 18px 40px rgba(42,74,72,0.32);
}
.plan-card--featured > .btn {
  transform: translateY(-5px);
  box-shadow:
    0 4px 8px rgba(42,74,72,0.16),
    0 10px 24px rgba(42,74,72,0.24);
}
.plan-card--featured:hover > .btn,
.plan-card--featured > .btn:hover {
  transform: translateY(-11px) scale(1.02);
  box-shadow:
    0 10px 20px rgba(42,74,72,0.22),
    0 20px 44px rgba(42,74,72,0.34);
}
.plan-card__recommend {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%) translateY(-2px);
  z-index: 5;
  background: linear-gradient(165deg, #2A4A48 0%, var(--navy-dark) 100%);
  color: #FFFFFF;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.5rem 1.35rem;
  border-radius: 100px;
  border: 2px solid #FFFFFF;
  white-space: nowrap;
  box-shadow:
    0 3px 6px rgba(42, 74, 72, 0.2),
    0 8px 20px rgba(42, 74, 72, 0.28),
    0 14px 32px rgba(42, 74, 72, 0.18);
}
.plan-card--featured .plan-card__recommend {
  transform: translateX(-50%) translateY(-4px);
  font-size: 0.82rem;
  padding: 0.55rem 1.5rem;
  box-shadow:
    0 4px 8px rgba(42, 74, 72, 0.22),
    0 10px 26px rgba(42, 74, 72, 0.32),
    0 18px 40px rgba(42, 74, 72, 0.22);
}
.plan-card__tier {
  font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 0.5rem;
}
.plan-card__name {
  font-family: var(--font-display);
  font-size: 1.9rem; font-weight: 700;
  color: var(--text); margin-bottom: 0.25rem;
}
.plan-card__price {
  font-family: var(--font-display);
  font-size: 2.8rem; font-weight: 700;
  color: var(--navy); line-height: 1;
  margin-bottom: 0.25rem;
}
.plan-card__price sup {
  font-size: 1.2rem; vertical-align: super;
  font-weight: 400;
}
.plan-card__price-sub {
  font-size: 0.85rem; color: var(--grey-dark);
  margin-bottom: 1.5rem;
}
.plan-card__divider {
  height: 1px; background: var(--grey-mid); margin: 1.25rem 0;
}
.plan-card__features { flex: 1; margin-bottom: 1.75rem; }
.plan-card__feature {
  display: flex; align-items: flex-start; gap: 0.6rem;
  font-size: 0.9rem; color: var(--text-mid);
  margin-bottom: 0.7rem; line-height: 1.45;
}
.plan-card__feature-icon {
  color: var(--gold); font-size: 0.85rem;
  flex-shrink: 0; margin-top: 1px;
}

/* ── Auth pages ───────────────────────────────── */
.auth-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
}
.auth-brand {
  background: var(--navy-dark);
  display: flex; flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 3rem 3.5rem;
  position: sticky;
  top: 0;
  height: 100vh;
  max-height: 100vh;
  width: 100%;
  overflow: hidden;
}
.auth-brand__visual {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.auth-brand__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  opacity: 0;
  transform: scale(1.06);
  animation: auth-slide 18s ease-in-out infinite;
}
.auth-brand__img--1 { opacity: 1; animation-delay: 0s; }
.auth-brand__img--2 { opacity: 0; animation-delay: 9s; }
@keyframes auth-slide {
  0%, 40%   { opacity: 1; transform: scale(1.06); }
  50%, 90%  { opacity: 0; transform: scale(1.1); }
  100%      { opacity: 1; transform: scale(1.06); }
}
.auth-brand::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(42,74,72,0.5) 0%,
    rgba(42,74,72,0.68) 50%,
    rgba(42,74,72,0.82) 100%
  );
  pointer-events: none;
}
.auth-brand::after { display: none; }
.auth-brand__content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 400px;
}
.auth-brand__headline {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3vw, 2.6rem);
  font-weight: 600; color: var(--white);
  line-height: 1.2; margin-bottom: 1rem;
}
.auth-brand__headline em { color: var(--accent-on-brand); font-style: normal; }
.auth-brand__sub {
  font-size: 0.95rem; color: rgba(255,255,255,0.72);
  max-width: 380px; line-height: 1.65;
  margin-bottom: 1.5rem;
}
.auth-brand__quote {
  border-left: 2px solid var(--accent-on-brand);
  padding-left: 1.25rem;
}
.auth-brand__stat-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-on-brand);
  line-height: 1;
}
.auth-brand__stat-label {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.72);
  margin-top: 0.2rem;
}
.auth-brand__bullet {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.88);
}
.auth-brand__bullet span { color: var(--accent-on-brand); font-weight: 700; }
.auth-brand__quote-text {
  font-family: var(--font-display);
  font-size: 1rem; font-style: italic;
  color: rgba(255,255,255,0.85); margin-bottom: 0.4rem;
  line-height: 1.45;
}
.auth-brand__stats,
.auth-brand__bullets {
  margin-top: 1.5rem !important;
}
.auth-brand__bullets {
  gap: 0.55rem !important;
}
.auth-brand__bullet {
  font-size: 0.84rem;
}
.auth-brand__quote-author {
  font-size: 0.82rem; color: rgba(255,255,255,0.45);
}
.auth-form-panel {
  display: flex; align-items: center; justify-content: center;
  padding: 2.5rem 3.5rem;
  background: var(--white);
  min-height: 100vh;
}
.auth-form-inner { width: 100%; max-width: 400px; display: flex; flex-direction: column; }
.auth-form-inner h2 {
  font-size: 1.85rem; margin-bottom: 0.4rem;
}
.auth-form-inner .auth-sub {
  font-size: 0.92rem; color: var(--grey-dark); margin-bottom: 1.5rem;
}

/* Signup: tighter form so less scrolling */
.auth-layout--signup .auth-form-panel {
  align-items: center;
  padding: 0.85rem 2.25rem;
}
.auth-layout--signup .auth-form-inner .auth-sub {
  margin-bottom: 0.5rem;
}
@media (min-width: 901px) {
  .auth-layout--signup .auth-form-inner h2 {
    font-size: 1.4rem;
    margin-bottom: 0.1rem;
  }
}
.auth-layout--signup .auth-brand__quote {
  display: none;
}

@media (max-width: 900px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-brand {
    position: relative;
    height: 200px;
    max-height: 200px;
    min-height: 0;
    padding: 1.5rem;
    justify-content: center;
    align-items: center;
    text-align: center;
  }
  .auth-brand__content {
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .auth-brand__headline { font-size: 1.5rem; margin-bottom: 0; }
  .auth-brand__sub,
  .auth-brand__quote,
  .auth-brand__stats,
  .auth-brand__bullets { display: none; }
  .auth-form-panel {
    min-height: 0;
    padding: 2rem 1.5rem 2.5rem;
    align-items: flex-start;
  }
  .auth-layout--signup .auth-form-panel {
    padding-top: 1.5rem;
  }
  .invoice-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .auth-form-panel { padding: 2rem 1.25rem; }
  .plan-selectors { grid-template-columns: repeat(3,1fr); gap: 0.5rem; }
  .plan-selector-card { padding: 0.75rem 0.5rem; }
  .plan-selector-card__mins { font-size: 1.2rem; }
  .modal-plan-cards { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  /* Prevent mobile browsers zooming inputs below 16px */
  .form-input,
  .form-select,
  .search-bar input {
    font-size: 16px;
  }

  .sidebar-open-btn { display: inline-flex; }

  .sidebar {
    position: fixed;
    top: 0; bottom: 0; left: 0;
    height: 100dvh;
    max-height: 100dvh;
    transform: translateX(-100%);
    transition: transform 0.28s ease;
    z-index: 200;
    width: min(280px, 88vw);
    overflow: hidden;
  }
  .sidebar__footer {
    margin-top: auto;
    padding-bottom: max(1.1rem, env(safe-area-inset-bottom));
  }
  .sidebar.sidebar--open { transform: translateX(0); }
  .sidebar-backdrop {
    display: none;
    position: fixed; inset: 0;
    background: rgba(7,21,53,0.55);
    z-index: 199;
  }
  .sidebar-backdrop.visible { display: block; }
  .portal-main {
    margin-left: 0;
    width: 100%;
    min-height: 100vh;
  }
  .portal-topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    height: auto;
    min-height: 56px;
    padding: 0.65rem 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .portal-topbar__title {
    font-size: 1.15rem;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .portal-topbar__actions {
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-left: auto;
  }
  .portal-topbar__actions .btn { font-size: 0.78rem; padding: 0.45rem 0.75rem; }
  .portal-topbar__actions .badge--hide-mobile,
  .portal-topbar__left .badge--hide-mobile,
  .portal-topbar__left .session-pill { display: none; }
  .portal-content { padding: 1rem; }
  .portal-welcome h3 { font-size: 1.25rem; }
  .portal-welcome p { font-size: 0.88rem; }
  .usage-card { padding: 1.25rem; }
  .usage-card__header { flex-direction: column; align-items: flex-start; }
  .dash-usage-row {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }
  .dash-stats-grid { width: 100%; }
  .quick-links { grid-template-columns: 1fr; }
  .stat-card { padding: 1rem; }
  .stat-card__value { font-size: 1.65rem; }
  .minutes-meter { width: 150px; height: 150px; }
  .minutes-meter__value { font-size: 1.85rem; }
  .start-chat-card { padding: 1.35rem; }
  .start-chat-card > .btn { width: 100%; justify-content: center; }
  .chat-row {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.65rem;
  }
  .chat-row__duration {
    width: 100%;
    padding-left: 3.25rem;
    text-align: left;
  }
  /* Chat page — scrollable stack, no horizontal clip */
  .portal-layout--chat {
    height: auto !important;
    min-height: 100vh;
    overflow-x: hidden !important;
    overflow-y: visible !important;
  }
  .portal-layout--chat .portal-main {
    overflow-x: hidden !important;
    overflow-y: visible !important;
    min-height: 0;
  }
  .portal-topbar__left {
    flex: 1;
    min-width: 0;
    max-width: 100%;
  }
  .chat-page-layout {
    flex-direction: column;
    height: auto;
    min-height: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }
  .portal-layout--chat.chat-proprofs-live .chat-embed-area {
    height: clamp(420px, 62vh, 640px);
    min-height: 420px;
    max-height: 640px;
  }
  .portal-layout--chat.chat-session-started .chat-proprofs-stack__launcher {
    display: none !important;
  }
  .chat-embed-area {
    /* Explicit height — min-height alone makes height:100% children collapse */
    height: clamp(360px, 58vh, 520px);
    min-height: 360px;
    max-height: 520px;
    width: 100%;
    max-width: 100%;
    border-right: none;
    flex: none;
    box-sizing: border-box;
    display: block;
    position: relative;
    overflow: hidden;
  }
  .chat-embed-area .proprofs-frame-bg,
  .chat-embed-area #chatCanvas {
    width: 100%;
    height: 100%;
    min-height: 100%;
    position: relative;
    overflow: hidden;
  }
  .chat-embed-area .sim-widget-wrap {
    position: absolute !important;
    inset: 0.5rem !important;
    left: 0.5rem !important;
    top: 0.5rem !important;
    right: 0.5rem !important;
    bottom: 0.5rem !important;
    width: auto !important;
    height: auto !important;
    transform: none !important;
  }
  .chat-embed-area .sim-widget {
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }
  .chat-embed-area,
  .chat-embed-area .proprofs-frame-bg {
    max-width: 100%;
    overflow-x: hidden;
  }
  .chat-sidebar {
    width: 100%;
    max-width: 100%;
    flex-shrink: 0;
    padding: 1rem;
    box-sizing: border-box;
    border-top: 1px solid var(--grey-mid);
  }
  .minutes-countdown__num { font-size: 2.2rem; }

  /* Transcripts page */
  .transcripts-page .transcript-header-row { display: none; }
  .transcripts-page .transcript-card {
    grid-template-columns: 1fr 1fr !important;
    gap: 0.75rem 1rem;
    padding: 1rem !important;
    align-items: start;
  }
  .transcripts-page .transcript-card > *:last-child {
    grid-column: 1 / -1;
    justify-self: stretch;
  }
  .transcripts-page .transcript-card .btn {
    width: 100%;
    justify-content: center;
  }
  .transcripts-toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.75rem !important;
  }
  .transcripts-toolbar .search-bar {
    flex: none !important;
    min-width: 0 !important;
    width: 100%;
    max-width: 100%;
  }
  .transcripts-toolbar .filter-tabs {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
  }
  .transcripts-toolbar .form-select {
    width: 100% !important;
    max-width: 100%;
  }

  /* Account settings */
  .settings-layout,
  .settings-stack,
  .settings-card {
    max-width: 100%;
    overflow-x: hidden;
  }
  .settings-grid-2,
  .settings-row-2 {
    grid-template-columns: 1fr !important;
  }
  .settings-card {
    padding: 1.25rem;
  }
  .settings-card__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  .settings-toggle-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }
  .settings-toggle-row .settings-switch {
    align-self: flex-end;
  }
  .settings-meta-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }
  .settings-meta-item__value {
    text-align: left;
    word-break: break-word;
  }
  .settings-connected {
    flex-wrap: wrap;
  }
  .settings-layout .form-input,
  .settings-layout .form-select {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  .account-settings-page .settings-action-row {
    flex-direction: column;
    align-items: stretch;
  }
  .account-settings-page .settings-action-row .btn {
    width: 100%;
    justify-content: center;
  }
  .data-table { font-size: 0.82rem; }
  .data-table th, .data-table td { padding: 0.7rem 0.9rem; }
  /* Don't hide columns — the wrap scrolls sideways so every column stays reachable. */
  .filter-tabs { flex-wrap: wrap; gap: 0.35rem; }
  .filter-tabs .tab-btn { flex: 1 1 auto; min-width: 0; font-size: 0.78rem; padding: 0.5rem 0.65rem; }
  .transcript-card { padding: 1rem; }
  .modal { width: calc(100vw - 2rem); max-width: none; margin: 1rem; }
}

@media (max-width: 640px) {
  .dash-stats-grid { grid-template-columns: 1fr 1fr; gap: 0.65rem; }
  .minutes-meter { width: 140px; height: 140px; }
  .minutes-meter__value { font-size: 1.75rem; }
  .summary-strip { grid-template-columns: 1fr 1fr; }
  .transcripts-page .summary-strip { grid-template-columns: 1fr; }
  .transcripts-page .transcript-card {
    grid-template-columns: 1fr !important;
  }
  .transcripts-page .transcript-card > *:last-child {
    grid-column: 1;
  }
  .portal-topbar__actions {
    width: 100%;
    justify-content: flex-end;
  }
  .portal-topbar__actions .btn-sm {
    flex: 1;
    max-width: 100%;
    justify-content: center;
  }
  .billing-grid { grid-template-columns: 1fr; }
  .invoice-table-header > *:nth-child(n+3),
  .invoice-row > *:nth-child(n+3) { display: none; }
  .danger-zone > div { flex-direction: column; gap: 1rem; align-items: flex-start; }
}

@media (max-width: 480px) {
  .dash-stats-grid { grid-template-columns: 1fr; }
  .portal-topbar__actions .btn { flex: 1 1 100%; justify-content: center; }
  .chat-row__attorney { font-size: 0.72rem; }
  .auth-layout--signup .plan-selectors { grid-template-columns: 1fr; }
}

/* ── Account settings ─────────────────────────── */
.settings-layout {
  width: 100%;
  max-width: none;
}
.settings-stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.settings-stack .settings-card {
  margin-bottom: 0;
}
.settings-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  align-items: stretch;
}
.settings-row-2 .settings-card {
  margin-bottom: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.settings-action-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
@media (max-width: 900px) {
  .settings-row-2 { grid-template-columns: 1fr; }
}
.settings-card {
  background: var(--white);
  border: 1px solid var(--grey-mid);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 1.25rem;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.95) inset,
    0 4px 16px rgba(42,74,72,0.06);
}
.settings-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--grey-mid);
}
.settings-card__title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mid);
  margin-bottom: 0.25rem;
}
.settings-card__desc {
  font-size: 0.88rem;
  color: var(--text-mid);
  margin: 0;
  line-height: 1.5;
}
.settings-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.settings-toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--grey-mid);
}
.settings-toggle-row:last-child { border-bottom: none; padding-bottom: 0; }
.settings-toggle-row:first-of-type { padding-top: 0; }
.settings-toggle-row__label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.2rem;
}
.settings-toggle-row__hint {
  font-size: 0.82rem;
  color: var(--text-mid);
  line-height: 1.45;
  margin: 0;
}
.settings-switch {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.settings-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.settings-switch__track {
  position: absolute;
  inset: 0;
  background: var(--grey-mid);
  border-radius: 100px;
  cursor: pointer;
  transition: background var(--transition);
}
.settings-switch__track::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: var(--white);
  border-radius: 50%;
  transition: transform var(--transition);
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
.settings-switch input:checked + .settings-switch__track {
  background: var(--navy-dark);
}
.settings-switch input:checked + .settings-switch__track::after {
  transform: translateX(20px);
}
.settings-meta-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.settings-meta-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  padding: 0.65rem 0.85rem;
  background: var(--grey-light);
  border-radius: var(--radius);
  border: 1px solid var(--grey-mid);
}
.settings-meta-item__label { color: var(--text-mid); }
.settings-meta-item__value { font-weight: 600; color: var(--text); }
.settings-connected {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--grey-mid);
  border-radius: var(--radius);
  background: var(--grey-light);
}
.settings-connected__icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--grey-mid);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--navy-dark);
}
@media (max-width: 640px) {
  .settings-grid-2 { grid-template-columns: 1fr; }
  .settings-card { padding: 1.25rem; }
}
