:root {
  --ink: #1b2845;
  --ink2: #269fd2;
  --gold: #269fd2;
  --paper: #f8fafc;
  --card: #ffffff;
  --line: #e2e8f0;
  --muted: #64748b;
  --bad: #dc2626;
  --ok: #16a34a;
  --warn: #f59e0b;
  --accent-soft: #eaf6fb;
  --primary-soft: #eef2f7;
  --shadow: 0 10px 28px rgba(15, 23, 42, .08);
}

html {
  background: var(--paper);
  color: #0f172a;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  background:
    radial-gradient(circle at 100% 0, rgba(38, 159, 210, .05), transparent 28rem),
    var(--paper);
}

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

h1 {
  color: #0f172a;
  font-family: inherit;
  font-size: clamp(1.8rem, 7vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: 1.15;
}

h2 {
  color: #1e293b;
  font-size: 1rem;
  font-weight: 650;
}

.eyebrow {
  color: var(--ink2) !important;
  font-size: .68rem !important;
  letter-spacing: .14em;
}

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

.offline {
  background: #dc2626;
  font-weight: 600;
}

/* Sign in */
.auth-shell {
  min-height: 100dvh;
  display: grid;
  place-items: stretch;
  padding: 0;
  background: var(--paper);
}

.auth-brand {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 32px 24px;
  background: linear-gradient(135deg, #1b2845 0%, #24385f 58%, #269fd2 130%);
  color: #fff;
}

.auth-brand::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 70px;
  background: linear-gradient(transparent, rgba(15, 23, 42, .18));
}

.auth-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(45px);
  opacity: .22;
}

.auth-glow-one {
  width: 260px;
  height: 260px;
  top: -100px;
  right: -70px;
  background: #fff;
}

.auth-glow-two {
  width: 300px;
  height: 300px;
  bottom: -180px;
  left: -70px;
  background: #37c9c0;
}

.auth-brand-content {
  position: relative;
  z-index: 1;
  width: min(100%, 430px);
  text-align: center;
}

.auth-brand-content img {
  display: block;
  width: 156px;
  height: auto;
  margin: 0 auto;
}

.auth-brand-content > p {
  max-width: 360px;
  margin: 13px auto 0;
  color: rgba(255, 255, 255, .76);
  font-size: .86rem;
}

.feature-pills {
  display: none;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 25px;
}

.feature-pills span {
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 999px;
  background: rgba(255, 255, 255, .09);
  font-size: .72rem;
  font-weight: 600;
  backdrop-filter: blur(8px);
}

.login-panel {
  display: grid;
  align-items: start;
  padding: 0 18px 32px;
}

.login-card {
  width: min(100%, 430px);
  margin: -18px auto 0;
  padding: 28px 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
  position: relative;
  z-index: 2;
}

.mobile-logo {
  display: none;
}

.login-card h1 {
  margin: .25rem 0 .5rem;
  font-size: 1.85rem;
}

.login-card .muted {
  margin: 0 0 24px;
  font-size: .9rem;
}

.login-card label,
.form-section label {
  color: #475569;
  font-size: .78rem;
  font-weight: 550;
}

.login-card input,
.form-section input {
  height: 48px;
  border-color: var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: #0f172a;
  transition: border-color .2s, box-shadow .2s, background .2s;
}

.login-card input::placeholder,
.form-section input::placeholder {
  color: #94a3b8;
}

.login-card input:focus,
.form-section input:focus {
  border-color: var(--ink2);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(38, 159, 210, .13);
}

.primary,
.secondary {
  min-height: 48px;
  border-radius: 8px;
  font-size: .88rem;
  transition: transform .15s, box-shadow .2s, background .2s;
}

/* Membership plan administration */
.admin-action {
  margin: 7px 0 5px;
}

.admin-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  margin: 7px 0 5px;
}

.admin-actions .admin-action {
  margin: 0;
}

.user-editor {
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}

.user-admin-list {
  display: grid;
  gap: 9px;
}

.user-admin-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.user-admin-card > span:nth-child(2) {
  min-width: 0;
}

.user-admin-card b,
.user-admin-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-admin-card small {
  margin-top: 2px;
  color: var(--muted);
  font-size: .72rem;
}

.user-state {
  padding: 5px 8px;
  border-radius: 999px;
  font-size: .65rem;
  font-weight: 700;
  white-space: nowrap;
}

.user-state.is-active {
  background: #e8f7ee;
  color: var(--ok);
}

.user-state.is-disabled {
  background: #eef2f7;
  color: var(--muted);
}

.user-admin-card .user-last-login {
  grid-column: 2 / -1;
  margin: -7px 0 0;
}

.user-admin-actions {
  display: grid;
  grid-column: 2 / -1;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.user-admin-actions .secondary,
.user-admin-actions .danger-button {
  min-height: 42px;
}

.access-warning {
  margin: 12px 0 0;
  padding: 14px;
  border: 1px solid #f2c66d;
  border-radius: 12px;
  background: #fff8e8;
  color: var(--ink);
}

.access-warning p {
  margin: 7px 0;
  color: var(--muted);
  font-size: .8rem;
}

.access-warning-actions {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.access-warning.is-confirmed {
  border-color: var(--ok);
  background: #edf8f2;
}

.customer-sync-action {
  margin-top: 8px;
}

.customer-profile-editor {
  position: relative;
  overflow: hidden;
  padding-top: 4px;
}

.customer-profile-editor::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--ink2), #25b7b0);
  content: "";
}

.customer-profile-editor form {
  padding: 16px 0 13px;
  border-top: 1px solid var(--line);
}

.customer-profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.customer-profile-grid label:first-child {
  grid-column: 1 / -1;
}

.customer-profile-grid label {
  margin: 0;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 650;
}

.customer-profile-grid input {
  margin-top: 6px;
}

.customer-profile-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 12px;
}

.customer-profile-actions p {
  flex: 1;
  margin: 0;
  font-size: .75rem;
}

.customer-profile-actions button {
  width: auto;
  min-height: 44px;
  padding-inline: 16px;
}

/* Customer activity */
.activity-entry-card {
  width: 100%;
  display: grid;
  grid-template-columns: 42px minmax(0,1fr) auto;
  align-items: center;
  gap: 12px;
  margin: -6px 0 16px;
  padding: 13px;
  border: 1px solid #f0d9a8;
  border-radius: 12px;
  background: linear-gradient(135deg,#fffdf7,#fff8e8);
  color: var(--ink);
  text-align: left;
}

.activity-entry-card b,
.activity-entry-card small {
  display: block;
}

.activity-entry-card small {
  margin-top: 2px;
  color: var(--muted);
  font-size: .72rem;
}

.activity-entry-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #fef0c7;
  color: #a65f08;
  font-size: 1.25rem;
}

.activity-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.activity-heading h1 {
  margin-bottom: .45rem;
}

.activity-heading p.muted {
  max-width: 520px;
  margin: 0 0 18px;
  font-size: .82rem;
}

.activity-freshness {
  display: grid;
  gap: 3px;
  margin-bottom: 12px;
  padding: 13px 14px;
  border: 1px solid #f2c66d;
  border-radius: 10px;
  background: #fff8e8;
  color: #854d0e;
}

.activity-freshness span {
  font-size: .75rem;
}

.activity-settings-card,
.activity-filter-panel {
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.activity-settings-card form {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: end;
  gap: 10px;
}

.activity-settings-card label,
.activity-filter-panel label {
  display: grid;
  gap: 5px;
  margin: 0;
  color: var(--muted);
  font-size: .7rem;
  font-weight: 650;
}

.activity-settings-card label span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.activity-settings-card input {
  width: 90px;
}

.activity-settings-card button {
  width: auto;
  min-height: 44px;
}

.activity-settings-card p {
  grid-column: 1/-1;
  margin: 0;
  font-size: .72rem;
}

.activity-filter-panel {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 10px;
}

.activity-filter-panel input,
.activity-filter-panel select {
  width: 100%;
  height: 43px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: #0f172a;
  outline: none;
}

.activity-filter-panel input:focus,
.activity-filter-panel select:focus {
  border-color: var(--ink2);
  box-shadow: 0 0 0 3px rgba(38,159,210,.13);
}

.activity-filter-panel .activity-search {
  grid-column: 1/-1;
}

.activity-filter-panel .activity-check {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.activity-filter-panel .activity-check input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--ink2);
}

.activity-aggregates {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 7px;
  margin: 15px 0;
}

.activity-aggregates span {
  padding: 10px 6px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--muted);
  font-size: .64rem;
  text-align: center;
}

.activity-aggregates b {
  display: block;
  margin-bottom: 2px;
  color: #0f172a;
  font-size: 1rem;
}

.activity-list {
  display: grid;
  gap: 10px;
}

.activity-card {
  position: relative;
  overflow: hidden;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(15,23,42,.04);
}

.activity-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: #d97706;
  content: "";
}

.activity-card.absence-high::before {background:#c2410c}
.activity-card.absence-critical::before {background:#dc2626}

.activity-card-head,
.activity-membership,
.activity-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.activity-card-head h2,
.activity-card-head p {
  margin: 0;
}

.activity-card-head p,
.activity-membership span {
  margin-top: 3px;
  color: var(--muted);
  font-size: .72rem;
}

.absence-badge {
  padding: 6px 9px;
  border: 1px solid #f2c66d;
  border-radius: 999px;
  background: #fff8e8;
  color: #9a5a08;
  font-size: .65rem;
  font-weight: 750;
  white-space: nowrap;
}

.absence-high .absence-badge {border-color:#fdba74;background:#fff0e5;color:#9a3412}
.absence-critical .absence-badge {border-color:#fecaca;background:#fff1f2;color:#b91c1c}

.activity-membership {
  margin: 13px 0;
  padding: 10px 0;
  border-block: 1px solid var(--line);
}

.activity-membership b,
.activity-membership span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-metrics {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 9px;
  margin-bottom: 13px;
}

.activity-metrics span {
  min-width: 0;
}

.activity-metrics small,
.activity-metrics b {
  display: block;
}

.activity-metrics small {
  color: var(--muted);
  font-size: .64rem;
}

.activity-metrics b {
  margin-top: 3px;
  font-size: .76rem;
  overflow-wrap: anywhere;
}

.activity-card-actions {
  justify-content: flex-start;
}

.activity-card-actions .primary,
.activity-card-actions .secondary {
  width: auto;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-inline: 13px;
  text-decoration: none;
  font-size: .75rem;
}

.activity-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 18px;
}

.activity-pagination button {
  width: 48px;
}

.customer-activity-summary {
  position: relative;
}

.customer-activity-alert {
  margin: 8px 0 13px;
  padding: 10px;
  border: 1px solid #f2c66d;
  border-radius: 8px;
  background: #fff8e8;
  color: #9a5a08;
  font-size: .75rem;
  font-weight: 700;
}

@media (min-width: 760px) {
  .content:has(#customerActivityPage:not([hidden])) {
    width: min(100%,1040px);
  }

  .activity-filter-panel {
    grid-template-columns: repeat(4,minmax(0,1fr));
  }

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

@media (max-width: 560px) {
  .activity-heading,
  .activity-settings-card form {
    display: grid;
    grid-template-columns: 1fr;
  }

  .activity-heading .compact-action,
  .activity-settings-card button {
    width: 100%;
  }

  .activity-filter-panel,
  .activity-metrics {
    grid-template-columns: 1fr;
  }

  .activity-filter-panel .activity-search {
    grid-column: auto;
  }

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

  .activity-card-head,
  .activity-membership {
    align-items: flex-start;
    flex-direction: column;
  }

  .activity-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .activity-card-actions .primary {
    grid-column: 1/-1;
  }
}

@media (max-width: 520px) {
  .customer-profile-grid {
    grid-template-columns: 1fr;
  }

  .customer-profile-grid label:first-child {
    grid-column: auto;
  }

  .customer-profile-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .customer-profile-actions button {
    width: 100%;
  }
}

.compact-action {
  width: auto;
  min-height: 44px;
  padding: 0 15px;
  white-space: nowrap;
}

.admin-hint {
  margin: -8px 0 18px;
  font-size: .84rem;
}

.plan-editor {
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}

.admin-form input,
.admin-form select,
.admin-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: #0f172a;
  outline: none;
}

.admin-form input,
.admin-form select {
  height: 48px;
  padding: 0 13px;
}

.admin-form textarea {
  min-height: 82px;
  padding: 11px 13px;
  resize: vertical;
}

.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus {
  border-color: var(--ink2);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(38, 159, 210, .13);
}

.weekday-field {
  min-width: 0;
  margin: 2px 0 15px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.weekday-field legend {
  padding: 0 5px;
  color: #475569;
  font-size: .78rem;
  font-weight: 550;
}

.weekday-field > small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: .72rem;
}

.weekday-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.weekday-grid label {
  display: grid;
  place-items: center;
  gap: 4px;
  min-width: 0;
  min-height: 48px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.weekday-grid label:has(input:checked) {
  border-color: var(--ink2);
  background: var(--accent-soft);
  color: var(--ink);
}

.direction-field {
  min-width: 0;
  margin: 2px 0 15px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.direction-field legend {
  padding: 0 5px;
  color: #475569;
  font-size: .78rem;
  font-weight: 550;
}

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

.direction-options label {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
}

.direction-options label:has(input:checked) {
  border-color: var(--ink2);
  background: var(--accent-soft);
  color: var(--ink);
  font-weight: 700;
}

.admin-form .direction-options input {
  width: 18px;
  height: 18px;
  padding: 0;
  accent-color: var(--ink2);
}

.weekday-grid input {
  width: 17px;
  height: 17px;
  padding: 0;
  accent-color: var(--ink2);
}

.active-toggle {
  display: flex !important;
  min-height: 48px;
  flex-direction: row !important;
  align-items: center;
  gap: 10px !important;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f8fafc;
}

.active-toggle input {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  padding: 0;
  accent-color: var(--ink2);
}

.editor-actions {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 9px;
}

.plan-admin-list {
  display: grid;
  gap: 11px;
}

.plan-admin-card {
  position: relative;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(15, 23, 42, .04);
}

.plan-admin-card.is-inactive {
  background: #f8fafc;
  opacity: .78;
}

.plan-admin-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.plan-admin-head h2 {
  margin: 3px 0 0;
  font-size: 1.06rem;
}

.plan-code {
  color: var(--muted);
  font-size: .66rem;
  font-weight: 750;
  letter-spacing: .08em;
}

.plan-state {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: .66rem;
  font-weight: 700;
}

.plan-state.is-active {
  background: #e8f7ee;
  color: var(--ok);
}

.plan-state.is-disabled {
  background: #eef2f7;
  color: var(--muted);
}

.plan-admin-card > p {
  margin: 11px 0;
  color: var(--muted);
  font-size: .82rem;
}

.plan-admin-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
}

.plan-admin-meta span {
  padding: 5px 8px;
  border-radius: 7px;
  background: var(--primary-soft);
  color: #475569;
  font-size: .7rem;
}

.plan-admin-price {
  display: block;
  margin: 6px 0 13px;
  color: var(--ink);
  font-size: 1.15rem;
}

.plan-admin-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.danger-button {
  min-height: 48px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fff1f2;
  color: var(--bad);
  font-weight: 700;
}

.danger-button:disabled {
  border-color: var(--line);
  background: #f1f5f9;
  color: var(--muted);
}

.subscription-filters {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.subscription-filters .search {
  margin: 0 !important;
}

.subscription-filters > select {
  width: 100%;
  height: 52px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

.subscription-editor {
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}

.editor-customer {
  display: flex;
  flex-direction: column;
  margin: -3px 0 15px;
  padding: 12px;
  border-radius: 9px;
  background: var(--accent-soft);
}

.editor-customer span {
  margin-top: 3px;
  color: var(--muted);
  font-size: .76rem;
}

.subscription-admin-list {
  display: grid;
  gap: 11px;
}

/* SMS notifications */
.sms-settings-card textarea,
#smsTestForm textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 12px;
  background: #f8fafc;
  color: var(--ink);
  font: inherit;
}

.toggle-field {
  min-height: 48px;
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f8fafc;
}

.toggle-field input[type="checkbox"] {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.sms-provider-actions {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.sms-provider-result,
.sms-template-metrics {
  margin-top: 12px;
  padding: 12px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--muted);
  overflow-wrap: anywhere;
}

.sms-template-metrics p {
  margin: 6px 0;
  color: var(--ink);
  line-height: 1.45;
}

.sms-history-head,
.sms-message-head,
.sms-message-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sms-history-head select {
  min-width: 145px;
}

.sms-message-list {
  display: grid;
  gap: 10px;
}

.sms-message-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(15, 23, 42, .04);
}

.sms-message-head small,
.sms-message-meta {
  color: var(--muted);
  font-size: .72rem;
}

.sms-message-head small {
  display: block;
  margin-top: 3px;
}

.sms-message-card > p {
  margin: 12px 0;
  color: #334155;
  font-size: .84rem;
  line-height: 1.45;
}

.sms-state,
.sms-inline-status {
  padding: 5px 8px;
  border-radius: 999px;
  background: #eef2f7;
  color: var(--muted);
  font-size: .67rem;
  font-weight: 750;
  text-align: right;
}

.sms-accepted,
.sms-delivered,
.sms-sent {
  background: #e8f7ee;
  color: var(--ok);
}

.sms-failed,
.sms-skipped {
  background: #fff1f2;
  color: var(--bad);
}

.sms-queued,
.sms-processing,
.sms-pending {
  background: #fff7ed;
  color: #c2410c;
}

.sms-error {
  margin-top: 10px;
  color: var(--bad);
  font-size: .74rem;
}

.sms-customer-preferences {
  padding: 12px 16px 16px;
}

.sms-customer-preferences .primary,
.sms-customer-preferences .secondary {
  margin-top: 8px;
}

@media (min-width: 620px) {
  .sms-provider-actions {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 420px) {
  .sms-history-head,
  .sms-message-head,
  .sms-message-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .sms-state,
  .sms-inline-status {
    text-align: left;
  }
}

.subscription-admin-card {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(15, 23, 42, .04);
}

.subscription-admin-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.subscription-admin-head > div {
  min-width: 0;
}

.subscription-admin-head h2 {
  margin: 3px 0 1px;
  font-size: 1.04rem;
}

.subscription-admin-head small {
  color: var(--muted);
}

.status-badge {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  background: #eef2f7;
  color: var(--muted);
  font-size: .65rem;
  font-weight: 700;
}

.status-badge.status-active {
  background: #e8f7ee;
  color: var(--ok);
}

.status-badge.status-expiring,
.status.status-expiring {
  border: 1px solid #fed7aa;
  background: #fff7ed;
  color: #c2410c;
}

.status-badge.status-scheduled,
.status.status-scheduled {
  background: #eff6ff;
  color: #1d4ed8;
}

.status-badge.status-frozen {
  background: #fff7e6;
  color: #b76a06;
}

.status-badge.status-cancelled,
.status-badge.status-sync_error {
  background: #fff1f2;
  color: var(--bad);
}

.subscription-plan,
.subscription-period {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.subscription-plan {
  margin: 15px 0 8px;
}

.subscription-plan span {
  flex: 0 0 auto;
  font-weight: 700;
}

.subscription-period {
  margin-bottom: 14px;
  padding: 9px 11px;
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  font-size: .78rem;
}

.device-editor {
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}

.form-note {
  margin: -2px 0 10px;
  color: var(--muted);
  font-size: .74rem;
}

.device-admin-list {
  display: grid;
  gap: 11px;
}

.device-admin-card {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(15, 23, 42, .04);
}

.device-admin-card.is-removed {
  background: #f8fafc;
  opacity: .78;
}

.device-admin-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.device-admin-head > div {
  min-width: 0;
}

.device-admin-head h2 {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
  font-size: 1.04rem;
}

.device-admin-state {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 999px;
  background: #eef2f7;
  color: var(--muted);
  font-size: .65rem;
  font-weight: 700;
}

.device-admin-state i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.device-admin-state.is-online {
  background: #e8f7ee;
  color: var(--ok);
}

.device-admin-state.is-offline {
  background: #fff1f2;
  color: var(--bad);
}

.device-admin-address {
  margin: 13px 0;
  padding: 9px 11px;
  overflow-wrap: anywhere;
  border-radius: 8px;
  background: #f8fafc;
  color: #475569;
  font: .76rem ui-monospace, SFMono-Regular, Menlo, monospace;
}

.device-admin-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  overflow: hidden;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--line);
}

.device-admin-info span {
  min-width: 0;
  padding: 9px 10px;
  background: #fff;
}

.device-admin-info small,
.device-admin-info b {
  display: block;
}

.device-admin-info small {
  color: var(--muted);
  font-size: .66rem;
}

.device-admin-info b {
  margin-top: 2px;
  overflow: hidden;
  font-size: .76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 560px) {
  .admin-actions,
  .subscription-filters {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 700px) {
  .admin-actions {
    grid-template-columns: repeat(2, 1fr);
  }
}

.primary {
  background: var(--ink);
  box-shadow: 0 5px 14px rgba(27, 40, 69, .17);
}

.primary:not(:disabled):hover {
  background: #24385f;
  box-shadow: 0 7px 18px rgba(27, 40, 69, .23);
  transform: translateY(-1px);
}

.secondary {
  border: 1px solid var(--line);
  background: var(--primary-soft);
  color: var(--ink);
}

/* Application shell */
.topbar {
  height: 68px;
  padding: 0 16px;
  border-bottom: 0;
  background: linear-gradient(100deg, #1b2845, #24385f);
  color: #fff;
  box-shadow: 0 3px 14px rgba(15, 23, 42, .16);
  backdrop-filter: none;
}

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

.topbar-brand img {
  width: 72px;
  height: 54px;
  object-fit: contain;
}

.topbar-brand span {
  padding-left: 13px;
  border-left: 1px solid rgba(255, 255, 255, .2);
  color: rgba(255, 255, 255, .78);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .03em;
}

.logout-btn {
  height: 38px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 8px;
  background: rgba(255, 255, 255, .07);
  color: rgba(255, 255, 255, .84);
  font-size: .75rem;
}

.logout-btn svg {
  width: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.content {
  width: min(100%, 760px);
  padding: 30px 16px 108px;
}

.page {
  animation: aqua-up .25s ease-out;
}

@keyframes aqua-up {
  from { opacity: 0; transform: translateY(7px); }
}

.stats {
  gap: 12px;
}

.stats article,
.stats .stat-card {
  min-height: 108px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .04);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  text-align: left;
}

.stats article::before,
.stats .stat-card::before {
  content: "";
  width: 30px;
  height: 3px;
  margin-bottom: 12px;
  border-radius: 3px;
  background: var(--ink2);
}

.stats .stat-expiring-card {
  border-color: #fed7aa;
  background: linear-gradient(145deg, #fff 20%, #fff7ed);
  cursor: pointer;
}

.stats .stat-expiring-card::before {
  background: #f97316;
}

.stats .stat-expiring-card:focus-visible {
  outline: 3px solid rgba(249, 115, 22, .28);
  outline-offset: 2px;
}

.stats .stat-activity-card {
  border-color: #f0d9a8;
  background: linear-gradient(145deg, #fffdf7, #fff7e5);
}

.stats .stat-activity-card::before {
  background: #d97706;
}

.stats .stat-activity-card small {
  color: #9a681a;
  font-size: .62rem;
}

.stats span {
  color: var(--muted);
  font-size: .73rem;
  font-weight: 550;
}

.stats strong {
  color: #0f172a;
  font-family: inherit;
  font-size: 1.85rem;
  font-weight: 700;
}

.hero-action {
  height: 54px;
  margin-top: 16px;
  background: linear-gradient(135deg, #269fd2, #25b7b0);
  box-shadow: 0 7px 18px rgba(38, 159, 210, .24);
}

.hero-action:not(:disabled):hover {
  background: linear-gradient(135deg, #218dbb, #21a49e);
}

/* Cards, lists and search */
.list {
  gap: 10px;
}

.list-card {
  min-height: 72px;
  padding: 12px 14px;
  border-color: var(--line);
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .025);
}

.customer-link {
  transition: border-color .2s, box-shadow .2s, transform .15s;
}

.customer-link:hover {
  border-color: rgba(38, 159, 210, .55);
  box-shadow: 0 6px 18px rgba(15, 23, 42, .07);
  transform: translateY(-1px);
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: #187ba5;
}

.list-card small {
  color: var(--muted);
}

.status {
  padding: 4px 8px;
  border-radius: 999px;
  background: #dcfce7;
  color: #15803d;
  font-size: .61rem;
  font-weight: 700;
}

.status-expired,
.status-cancelled,
.status-failed {
  background: #fee2e2;
  color: #b91c1c;
}

.status-pending,
.status-not_started,
.status-frozen {
  background: #fef3c7;
  color: #b45309;
}

.chevron {
  color: #94a3b8;
}

.search {
  height: 48px;
  border-color: var(--line);
  border-radius: 8px;
  background: #fff;
  color: #94a3b8;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .025);
}

.search:focus-within {
  border-color: var(--ink2);
  box-shadow: 0 0 0 3px rgba(38, 159, 210, .12);
}

.result {
  min-height: 54px;
  border-color: var(--line);
  border-radius: 8px;
  background: #fff;
}

.result:hover {
  border-color: rgba(38, 159, 210, .55);
  background: #f8fcfe;
}

.empty {
  border-color: #cbd5e1;
  border-radius: 10px;
}

/* Forms */
.steps i {
  background: #e2e8f0;
}

.steps i.active {
  background: var(--ink2);
}

.form-section {
  padding: 18px;
  border-color: var(--line);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .025);
}

.section-title span {
  border-radius: 7px;
  background: var(--ink);
}

.selected-card {
  border: 1px solid #bae6fd;
  border-radius: 8px;
  background: #f0f9ff;
}

.plans {
  gap: 9px;
}

.plan {
  border-color: var(--line);
  border-radius: 9px;
  transition: border-color .2s, background .2s, box-shadow .2s;
}

.plan:has(input:checked) {
  border-color: var(--ink2);
  background: #f0f9ff;
  box-shadow: 0 0 0 2px rgba(38, 159, 210, .1);
}

.plan input {
  accent-color: var(--ink2);
}

.period-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.photo-ready img {
  border-radius: 8px;
}

.photo-ready button {
  color: var(--ink2);
}

/* Customer detail */
.back {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 600;
}

.back:hover {
  color: var(--ink2);
}

.profile-head {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.profile-head h1 {
  font-size: 1.45rem;
}

.detail-photo {
  border-radius: 10px;
}

.detail-initials {
  background: linear-gradient(135deg, var(--ink), #365485);
}

.detail-card {
  border-color: var(--line);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .025);
}

.detail-row,
.visit-row {
  border-color: var(--line);
}

.current-membership {
  border-radius: 12px;
  background:
    radial-gradient(circle at 100% 0, rgba(38, 159, 210, .34), transparent 45%),
    linear-gradient(135deg, #1b2845, #24385f);
  box-shadow: 0 8px 22px rgba(27, 40, 69, .16);
}

.current-membership > div {
  color: #cbd5e1;
}

.current-membership .status,
.current-membership .status-badge {
  background: rgba(255, 255, 255, .12);
  color: #fff;
}

.current-membership .status-badge.status-expiring {
  border-color: rgba(253, 186, 116, .65);
  background: rgba(249, 115, 22, .22);
  color: #ffedd5;
}

.expiration-copy {
  margin: 10px 0 0;
  color: #ffedd5;
  font-size: .78rem;
  font-weight: 650;
}

.history-card {
  border-color: var(--line);
  border-radius: 10px;
}

/* Visits */
.visit-filters {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.visit-filters .search {
  margin: 0 !important;
}

.visit-date {
  height: 52px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--muted);
  font-size: .72rem;
}

.visit-date input {
  min-width: 0;
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: .85rem;
  outline: none;
}

.visit-filters .secondary {
  min-height: 52px;
  border-radius: 9px;
}

.visits-list {
  display: grid;
  gap: 9px;
}

.visit-card {
  width: 100%;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px 11px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: inherit;
  font: inherit;
  text-align: left;
}

.visit-card-icon {
  width: 40px;
  height: 40px;
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #e8f7ee;
  color: var(--ok);
  font-weight: 800;
}

.visit-card-customer,
.visit-card-time {
  min-width: 0;
}

.visit-card-customer b,
.visit-card-customer small,
.visit-card-time b,
.visit-card-time small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.visit-card-customer small,
.visit-card-time small {
  margin-top: 2px;
  color: var(--muted);
  font-size: .7rem;
}

.visit-card-time {
  grid-column: 2 / -1;
}

.visit-card-time b {
  font-size: .76rem;
}

.visit-card-method {
  display: none;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #187ba5;
  font-size: .65rem;
  white-space: nowrap;
}

.visit-card .chevron {
  grid-column: 3;
  grid-row: 1;
}

.direction-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: .7rem;
  font-weight: 700;
  vertical-align: middle;
  white-space: nowrap;
}

.direction-badge svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.direction-badge em {
  font-style: normal;
}

.direction-entry { color: #15803d; }
.direction-exit { color: #c2410c; }
.direction-unknown { color: var(--muted); }

.device-direction {
  margin: -6px 0 12px;
}

/* Devices */
.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.page-heading h1 {
  margin-bottom: 1.2rem;
}

.refresh-btn {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink2);
  font-size: 1.45rem;
}

.device-list {
  display: grid;
  gap: 12px;
}

.device-card {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 5px rgba(15, 23, 42, .035);
}

.device-card-head {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.device-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--accent-soft);
  color: #187ba5;
}

.device-icon svg {
  width: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.device-card h2 {
  overflow: hidden;
  margin: 0 0 2px;
  font-size: .95rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device-card-head p {
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: .72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device-state {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: .62rem;
  font-weight: 700;
  white-space: nowrap;
}

.device-state i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.device-online { background: #dcfce7; color: #15803d; }
.device-offline { background: #fee2e2; color: #b91c1c; }
.device-disabled,
.device-unknown { background: #f1f5f9; color: #64748b; }

.device-address {
  overflow: hidden;
  margin: 14px 0;
  padding: 8px 10px;
  border-radius: 7px;
  background: #f8fafc;
  color: #64748b;
  font: .7rem ui-monospace, SFMono-Regular, Menlo, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.device-metrics div {
  padding: 11px 7px;
  text-align: center;
}

.device-metrics div + div {
  border-left: 1px solid var(--line);
}

.device-metrics strong,
.device-metrics span {
  display: block;
}

.device-metrics strong {
  color: #0f172a;
  font-size: 1.05rem;
}

.device-metrics span {
  margin-top: 2px;
  color: var(--muted);
  font-size: .62rem;
}

.device-metrics .has-errors strong {
  color: var(--bad);
}

.device-details {
  display: grid;
  gap: 8px;
}

.device-details div {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  color: var(--muted);
  font-size: .72rem;
}

.device-details b {
  max-width: 62%;
  overflow-wrap: anywhere;
  color: #334155;
  text-align: right;
}

.success-icon {
  background: var(--ok);
  box-shadow: 0 0 0 11px rgba(22, 163, 74, .1);
}

.receipt {
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .04);
}

/* Navigation */
.bottom-nav {
  height: 78px;
  border-color: var(--line);
  box-shadow: 0 -5px 18px rgba(15, 23, 42, .055);
}

.bottom-nav button {
  color: #64748b;
}

.bottom-nav button span {
  height: 25px;
  display: grid;
  place-items: center;
}

.bottom-nav svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bottom-nav .active {
  color: var(--ink2);
}

.operator-mode .bottom-nav {
  grid-template-columns: repeat(4, 1fr);
}

.bottom-nav .nav-create span {
  width: 50px;
  height: 50px;
  border: 5px solid var(--paper);
  background: linear-gradient(135deg, #269fd2, #25b7b0);
  box-shadow: 0 5px 14px rgba(38, 159, 210, .28);
}

.bottom-nav .nav-create svg {
  width: 22px;
  height: 22px;
}

/* Camera remains high contrast */
dialog,
dialog::backdrop {
  background: #0f172a;
}

.camera-head {
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.video-wrap video.environment {
  transform: none;
}

.camera-switch {
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, .1);
  transition: background .2s ease, transform .25s ease, opacity .2s ease;
}

.camera-switch svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.camera-switch:focus-visible {
  outline: 3px solid #25b7b0;
  outline-offset: 2px;
}

.camera-switch:active {
  transform: scale(.92);
}

.camera-switch.is-switching svg {
  animation: camera-switch-spin .55s ease;
}

@keyframes camera-switch-spin {
  to { transform: rotate(180deg); }
}

@media (prefers-reduced-motion: reduce) {
  .camera-switch.is-switching svg { animation: none; }
}

.customer-tech-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0 16px;
}

.customer-tech-filters label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 800;
}

.customer-tech-filters select {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 0 10px;
  color: var(--ink);
  background: #fff;
}

.customer-tech-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.customer-tech-badges em { padding: 4px 7px; border-radius: 999px; font-size: .62rem; font-style: normal; font-weight: 800; background: #eef2f1; color: #607673; }
.customer-tech-badges .tech-active { color: #146446; background: #d9f2e7; }
.customer-tech-badges .tech-denied,.customer-tech-badges .tech-error { color: #8d3e45; background: #f8dfe1; }
.customer-tech-badges .tech-possibly_removed { color: #7c5711; background: #fff0c7; }

.pwa-device-list { display: grid; gap: 10px; margin-bottom: 14px; }
.pwa-device-card { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 15px; border: 1px solid var(--line); border-radius: 17px; background: #f8faf9; }
.pwa-device-card small { display: block; margin-top: 3px; color: var(--muted); }
.pwa-device-card dl { grid-column: 1 / -1; margin: 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.pwa-device-card dl div { padding: 9px; border-radius: 12px; background: #fff; }
.pwa-device-card dt { color: var(--muted); font-size: .65rem; }
.pwa-device-card dd { margin: 4px 0 0; font-size: .77rem; font-weight: 750; }
.pwa-state { align-self: start; padding: 5px 8px; border-radius: 999px; font-size: .65rem; font-weight: 850; background: #edf2ef; }
.pwa-state.pwa-active { color: #126344; background: #d8f3e7; }
.pwa-state.pwa-possibly_removed { color: #7c5711; background: #fff0c5; }

.push-integration-state { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0 0 18px; padding: 14px; border-radius: 15px; background: #f2f6f4; color: var(--muted); font-size: .8rem; }
.integration-pill { padding: 4px 8px; border-radius: 999px; font-weight: 850; }
.integration-pill.is-enabled { color: #126344; background: #d8f3e7; }
.integration-pill.is-disabled { color: #8d3e45; background: #f8dfe1; }

.face-guide.good {
  border-color: #25b7b0;
}

.capture:not(:disabled) i {
  background: #25b7b0;
}

@media (min-width: 760px) {
  .content {
    padding-top: 38px;
  }

  .bottom-nav {
    width: 620px;
    border: 1px solid var(--line);
    border-bottom: 0;
    border-radius: 14px 14px 0 0;
  }

  .field-grid {
    gap: 0 12px;
  }

  .visit-filters {
    grid-template-columns: minmax(250px, 1fr) 190px 150px;
  }

  .visit-card {
    grid-template-columns: 40px minmax(0, 1fr) minmax(180px, auto) auto 18px;
    gap: 12px;
  }

  .visit-card-icon {
    grid-row: 1;
  }

  .visit-card-time {
    grid-column: 3;
    text-align: right;
  }

  .visit-card-method {
    display: inline-block;
  }

  .visit-card .chevron {
    grid-column: 5;
  }
}

@media (min-width: 900px) {
  .auth-shell {
    grid-template-columns: minmax(420px, 1fr) minmax(420px, 1fr);
  }

  .auth-brand {
    min-height: 100dvh;
    place-items: center;
    padding: 64px;
  }

  .auth-brand-content {
    text-align: left;
  }

  .auth-brand-content img {
    width: min(100%, 370px);
    margin: 0;
  }

  .auth-brand-content > p {
    margin: 24px 0 0;
    font-size: 1rem;
    line-height: 1.65;
  }

  .feature-pills {
    display: flex;
    justify-content: flex-start;
  }

  .login-panel {
    place-items: center;
    padding: 48px;
  }

  .login-card {
    margin: 0;
    padding: 8px 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
}

@media (max-width: 420px) {
  .logout-btn span {
    display: none;
  }

  .topbar-brand span {
    font-size: .69rem;
  }

  .status {
    max-width: 88px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .subscription-status {
    max-width: 112px;
    white-space: normal;
    text-align: center;
    line-height: 1.15;
  }
}
