@font-face {
  font-family: yekan;
  font-style: normal;
  font-weight: 400;
  src: url("fonts/iran-yekan-400.woff2") format("woff2");
}
@font-face {
  font-family: yekan;
  font-style: normal;
  font-weight: 500;
  src: url("fonts/iran-yekan-500.woff2") format("woff2");
}
@font-face {
  font-family: yekan;
  font-style: normal;
  font-weight: 700;
  src: url("fonts/iran-yekan-700.woff2") format("woff2");
}

:root {
  --agent-ink: #1a2332;
  --agent-muted: #8b93a1;
  --agent-blue: #5d6fd4;
  --agent-blue-deep: #4c5cbf;
  --agent-sheet: #ffffff;
  --agent-bg: #ffffff;
  --agent-hero: #5d6fd4;
  --agent-success: #16a34a;
  --agent-danger: #e11d48;
  --agent-border: #e6eaf0;
  --agent-fill: #ffffff;
  --agent-safe-bottom: env(safe-area-inset-bottom, 0px);
  --agent-safe-top: env(safe-area-inset-top, 0px);
  --agent-radius: 1.25rem;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
}

body.agent-body {
  font-family: yekan, Tahoma, sans-serif;
  color: var(--agent-ink);
  background: var(--agent-bg);
  -webkit-tap-highlight-color: transparent;
}

.agent-shell {
  min-height: 100dvh;
  display: flex;
  justify-content: center;
}

.agent-install-banner {
  position: fixed;
  z-index: 10000;
  left: 0.85rem;
  right: 0.85rem;
  bottom: calc(0.85rem + var(--agent-safe-bottom));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 0.9rem;
  border: 1px solid var(--agent-border);
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

.agent-install-banner[hidden] {
  display: none !important;
}

.agent-install-banner__copy {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.agent-install-banner__copy strong {
  font-size: 0.92rem;
}

.agent-install-banner__copy span {
  color: var(--agent-muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.agent-install-banner__actions {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.agent-install-banner__dismiss,
.agent-install-banner__cta {
  appearance: none;
  border: 0;
  font: inherit;
  cursor: pointer;
  min-height: 2.25rem;
  padding: 0.4rem 0.75rem;
  border-radius: 0.7rem;
}

.agent-install-banner__dismiss {
  background: transparent;
  color: var(--agent-muted);
}

.agent-install-banner__cta {
  background: var(--agent-blue);
  color: #fff;
  font-weight: 700;
}

.agent-orientation-lock {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: none;
  place-items: center;
  padding: 1.5rem;
  background: #fff;
  color: var(--agent-ink);
  text-align: center;
}

.agent-orientation-lock p {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.7;
}

@media (orientation: landscape) and (max-height: 34rem) {
  .agent-orientation-lock {
    display: grid;
  }

  .agent-shell {
    visibility: hidden;
    pointer-events: none;
  }

  html,
  body.agent-body {
    overflow: hidden;
    height: 100%;
    touch-action: none;
  }
}

.agent-screen {
  width: 100%;
  max-width: 28rem;
  min-height: 100dvh;
  position: relative;
  background: var(--agent-bg);
}

body.agent-auth {
  background: #fff;
}

.agent-auth-page {
  width: 100%;
  max-width: 28rem;
  min-height: 100dvh;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(1.25rem + var(--agent-safe-top)) 1rem calc(1.25rem + var(--agent-safe-bottom));
}

.agent-auth-card {
  width: 100%;
  background: #fff;
  border-radius: 1.5rem;
  padding: 1.75rem 1.35rem 1.5rem;
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.agent-auth-mark {
  display: flex;
  justify-content: center;
}

.agent-auth-mark-ring {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #eef0fa 0%, #dde2f6 100%);
  border: 1px solid #c4cbeb;
}

.agent-auth-mark-logo {
  width: 2.35rem;
  height: auto;
  display: block;
  object-fit: contain;
}

.agent-auth-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.agent-auth-title {
  margin: 0;
  font-size: 1.65rem;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.02em;
}

.agent-auth-subtitle {
  margin: 0;
  color: var(--agent-muted);
  line-height: 1.75;
  font-size: 0.92rem;
}

.agent-auth-modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  padding: 0.3rem;
  border-radius: 0.9rem;
  background: #f3f4f6;
}

.agent-auth-mode {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.4rem;
  padding: 0.45rem 0.5rem;
  border-radius: 0.7rem;
  text-decoration: none;
  color: var(--agent-muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.agent-auth-mode.is-active {
  background: #fff;
  color: var(--agent-ink);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.agent-auth-phone {
  color: #111827;
  font-weight: 600;
  white-space: nowrap;
}

.agent-auth-edit {
  color: var(--agent-blue-deep);
  font-weight: 700;
  text-decoration: none;
  margin-inline-start: 0.2rem;
}

.agent-auth-edit:hover {
  text-decoration: underline;
}

.agent-auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 0.25rem;
}

.agent-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.agent-field > span,
.agent-birthdate > legend {
  font-size: 0.9rem;
  color: #374151;
  font-weight: 600;
}

.agent-field > span em,
.agent-birthdate > legend em {
  color: var(--agent-danger);
  font-style: normal;
  margin-inline-start: 0.1rem;
}

.agent-field input,
.agent-auth-select {
  width: 100%;
  border: 1px solid var(--agent-border);
  background: #fff;
  border-radius: 0.85rem;
  padding: 0.95rem 1rem;
  font: inherit;
  font-size: 1rem;
  color: var(--agent-ink);
}

.agent-auth-select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;
}

.agent-field input:focus,
.agent-auth-select:focus,
.agent-otp-digit:focus {
  outline: none;
  border-color: var(--agent-blue);
  box-shadow: 0 0 0 3px rgba(93, 111, 212, 0.15);
}

.agent-phone-field {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid var(--agent-border);
  border-radius: 0.85rem;
  background: #fff;
  padding: 0.15rem 0.95rem;
  min-height: 3.35rem;
}

.agent-phone-field:focus-within {
  border-color: var(--agent-blue);
  box-shadow: 0 0 0 3px rgba(93, 111, 212, 0.15);
}

.agent-phone-prefix {
  color: #6b7280;
  font-weight: 600;
  font-size: 0.98rem;
  flex-shrink: 0;
}

.agent-phone-divider {
  width: 1px;
  align-self: stretch;
  margin: 0.65rem 0;
  background: #e5e7eb;
}

.agent-phone-field input {
  border: 0;
  padding: 0.85rem 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  min-width: 0;
  flex: 1;
}

.agent-phone-field input:focus {
  border: 0;
  box-shadow: none;
}

.agent-cta {
  appearance: none;
  border: 0;
  border-radius: 0.9rem;
  min-height: 3.25rem;
  padding: 0.95rem 1rem;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  background: var(--agent-blue);
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.agent-cta:active {
  background: var(--agent-blue-deep);
}

body.agent-auth .agent-cta {
  background: var(--agent-blue);
}

body.agent-auth .agent-cta:active {
  background: var(--agent-blue-deep);
}

body.agent-auth .agent-cta-muted,
body.agent-auth .agent-cta:disabled {
  background: #9ca3af;
  cursor: not-allowed;
  opacity: 1;
}

body.agent-auth .agent-cta-muted:active,
body.agent-auth .agent-cta:disabled:active {
  background: #9ca3af;
}

.agent-link-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--agent-blue-deep);
  font: inherit;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  padding: 0.35rem;
  cursor: pointer;
}

.agent-auth-resend {
  margin: 0;
  text-align: center;
}

.agent-field-hint {
  margin: -0.35rem 0 0;
  color: var(--agent-muted);
  font-size: 0.8rem;
}

.agent-birthdate {
  border: 0;
  margin: 0;
  padding: 0;
  min-inline-size: 0;
}

.agent-birthdate > legend {
  padding: 0;
  margin-bottom: 0.45rem;
}

.agent-birthdate-box {
  display: grid;
  grid-template-columns: 0.85fr 1.35fr 1.1fr;
  gap: 0;
  border: 1px solid var(--agent-border);
  border-radius: 0.95rem;
  background: #fff;
  min-height: 4.35rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  position: relative;
  z-index: 2;
}

.agent-birthdate-box:focus-within,
.agent-birthdate-box:has(.is-open) {
  border-color: var(--agent-blue);
  box-shadow: 0 0 0 3px rgba(93, 111, 212, 0.15);
}

.agent-birthdate-part {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.2rem;
  min-width: 0;
  padding: 0.55rem 0.65rem 0.6rem;
  position: relative;
}

.agent-birthdate-part + .agent-birthdate-part {
  border-inline-start: 1px solid #edf0f5;
}

.agent-birthdate-part.is-open {
  z-index: 5;
}

.agent-birthdate-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--agent-muted);
  line-height: 1;
  padding-inline: 0.15rem;
}

.agent-picker-trigger {
  appearance: none;
  width: 100%;
  border: 0;
  background: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 14 8' fill='none'%3E%3Cpath d='M1.5 1.5 7 6.5l5.5-5' stroke='%235d6fd4' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 0.1rem center;
  background-size: 0.7rem;
  min-height: 1.7rem;
  padding: 0.15rem 0.15rem 0.05rem 1.15rem;
  font: inherit;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--agent-ink);
  text-align: start;
  line-height: 1.3;
  cursor: pointer;
}

.agent-picker-trigger.is-placeholder {
  color: #9aa3b2;
  font-weight: 600;
}

.agent-picker-trigger:focus {
  outline: none;
}

.agent-picker-menu {
  position: absolute;
  top: calc(100% + 0.45rem);
  inset-inline: 0;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  background: #fff;
  border: 1px solid #e4e8f2;
  border-radius: 0.9rem;
  box-shadow: 0 14px 34px rgba(30, 42, 90, 0.14);
  max-height: 14rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  z-index: 20;
}

.agent-picker-menu-year {
  min-width: 7.5rem;
  inset-inline-end: 0;
  inset-inline-start: auto;
}

.agent-birthdate-part-month .agent-picker-menu {
  min-width: 8.5rem;
}

.agent-picker-menu li {
  margin: 0;
}

.agent-picker-option {
  appearance: none;
  width: 100%;
  border: 0;
  background: transparent;
  border-radius: 0.65rem;
  padding: 0.7rem 0.8rem;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--agent-ink);
  text-align: start;
  cursor: pointer;
}

.agent-picker-option:hover,
.agent-picker-option:focus {
  outline: none;
  background: #eef0fa;
  color: var(--agent-blue-deep);
}

.agent-picker-option[aria-selected="true"] {
  background: #5d6fd4;
  color: #fff;
}

.agent-picker-option[aria-selected="true"]:hover,
.agent-picker-option[aria-selected="true"]:focus {
  background: #4c5cbf;
  color: #fff;
}

.agent-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.agent-alert {
  border-radius: 0.85rem;
  padding: 0.8rem 0.95rem;
  font-size: 0.9rem;
  line-height: 1.6;
  border: 1px solid transparent;
}

.agent-alert-success {
  background: #ecfdf3;
  border-color: #bbf7d0;
  color: #166534;
}

.agent-alert-danger {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #9f1239;
}

.agent-otp {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
}

.agent-otp-digit {
  width: 100%;
  aspect-ratio: 1;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  border-radius: 0.85rem;
  border: 1px solid var(--agent-border);
  background: #fff;
  font-family: inherit;
  color: var(--agent-ink);
}

.agent-otp-timer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #111827;
  font-size: 0.92rem;
}

.agent-otp-timer strong {
  color: var(--agent-blue-deep);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.agent-otp-timer.is-expired,
.agent-otp-timer.is-expired strong {
  color: var(--agent-danger);
}

.agent-select-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.agent-select-card {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 0.9rem 0.95rem;
  border: 1px solid var(--agent-border);
  border-radius: 0.9rem;
  background: #fff;
  cursor: pointer;
}

.agent-select-card:has(input:checked) {
  border-color: var(--agent-blue);
  background: #eef0fa;
}

.agent-select-card input {
  margin-top: 0.2rem;
  accent-color: var(--agent-blue);
}

.agent-select-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.agent-select-card-body strong {
  font-size: 0.98rem;
}

.agent-select-card-body span {
  color: var(--agent-muted);
  font-size: 0.84rem;
}

/* Legacy hero auth (unused) kept minimal for safety */
.agent-auth-layout,
.agent-auth-hero,
.agent-auth-sheet,
.agent-auth-sheet-handle,
.agent-auth-hero-art,
.agent-auth-hero-brand,
.agent-auth-logo,
.agent-auth-orb {
  display: none;
}

@media (max-width: 47.99rem) {
  html:has(.agent-dialer-screen),
  body:has(.agent-dialer-screen) {
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
  }

  body:has(.agent-dialer-screen) .agent-shell {
    min-height: 100dvh;
    height: 100dvh;
    overflow: hidden;
  }

  .agent-dialer-screen {
    height: 100dvh;
    max-height: 100dvh;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: var(--agent-safe-top) 0 calc(4.85rem + var(--agent-safe-bottom));
    background: var(--agent-bg);
  }
}

.agent-list-screen {
  padding: var(--agent-safe-top) 0 calc(5.25rem + var(--agent-safe-bottom));
  background: var(--agent-bg);
}

.agent-dialer-screen > :not(.agent-app-bar):not(.agent-tabbar),
.agent-list-screen > :not(.agent-app-bar):not(.agent-tabbar) {
  margin-inline: 1rem;
}

.agent-list-screen > :not(.agent-app-bar):not(.agent-tabbar) {
  margin-inline: 1.1rem;
}

.agent-app-bar {
  flex-shrink: 0;
  margin-bottom: 0.75rem;
  background: #fff;
  border-bottom: 1px solid var(--agent-border);
}

.agent-phone-status {
  display: none;
}

.agent-app-bar__toolbar {
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr) 2.75rem;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem 0.7rem;
}

.agent-app-bar__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  text-decoration: none;
}

.agent-app-bar__logo img {
  width: 1.55rem;
  height: auto;
  display: block;
  object-fit: contain;
}

.agent-app-bar__center {
  display: flex;
  justify-content: center;
  min-width: 0;
}

.agent-app-bar__action {
  display: flex;
  justify-content: flex-end;
}

.agent-app-bar__icon-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--agent-ink);
  text-decoration: none;
  flex-shrink: 0;
}

.agent-app-bar__icon-btn svg {
  width: 1.35rem;
  height: 1.35rem;
  flex-shrink: 0;
}

.agent-dialer-screen > .agent-alert {
  flex-shrink: 0;
}

.agent-line-picker {
  position: relative;
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  color: var(--agent-ink);
}

.agent-line-picker__form {
  position: relative;
  min-width: 0;
  width: fit-content;
  max-width: 100%;
}

.agent-line-picker__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  width: fit-content;
  max-width: 100%;
  min-height: 2.75rem;
  padding: 0.35rem 0.65rem 0.35rem 0.45rem;
  border: 1px solid var(--agent-border);
  border-radius: 0.95rem;
  background: #f8fafc;
  color: var(--agent-ink);
  font: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.agent-line-picker.is-single .agent-line-picker__trigger {
  cursor: default;
}

.agent-line-picker__trigger:hover:not(:disabled),
.agent-line-picker.is-open .agent-line-picker__trigger {
  background: #eef0fa;
  border-color: rgba(93, 111, 212, 0.35);
}

.agent-line-picker.is-single .agent-line-picker__trigger:hover {
  background: #f8fafc;
  border-color: var(--agent-border);
}

.agent-line-picker.is-open .agent-line-picker__trigger {
  box-shadow: 0 0 0 3px rgba(93, 111, 212, 0.12);
}

.agent-line-picker__trigger:disabled {
  cursor: default;
  opacity: 1;
}

.agent-line-picker__icon {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--agent-blue);
  background: rgba(93, 111, 212, 0.12);
}

.agent-line-picker__icon svg {
  width: 0.95rem;
  height: 0.95rem;
}

.agent-line-picker__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.05rem;
  min-width: 0;
}

.agent-line-picker__label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--agent-muted);
  line-height: 1;
}

.agent-line-picker__number {
  font-size: 0.92rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.2;
}

.agent-line-picker__chevron {
  width: 0.95rem;
  height: 0.95rem;
  display: inline-flex;
  color: #94a3b8;
  transition: transform 0.18s ease;
  flex-shrink: 0;
}

.agent-line-picker__chevron svg {
  width: 0.95rem;
  height: 0.95rem;
}

.agent-line-picker.is-open .agent-line-picker__chevron {
  transform: rotate(180deg);
  color: var(--agent-blue);
}

.agent-line-picker__menu {
  position: absolute;
  top: calc(100% + 0.45rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  min-width: min(100%, 14rem);
  width: max-content;
  max-width: calc(100vw - 2rem);
  padding: 0.35rem;
  background: #fff;
  border: 1px solid var(--agent-border);
  border-radius: 0.95rem;
  box-shadow:
    0 8px 16px rgba(15, 39, 68, 0.06),
    0 20px 40px rgba(15, 39, 68, 0.12);
}

.agent-line-picker__option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.55rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  text-align: right;
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: background 0.12s ease;
}

.agent-line-picker__option:hover,
.agent-line-picker__option:focus-visible {
  background: #f1f5f9;
  outline: none;
}

.agent-line-picker__option.is-selected {
  box-shadow: inset 0 0 0 1px rgba(93, 111, 212, 0.22);
}

.agent-line-picker__option-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.12rem;
  min-width: 0;
}

.agent-line-picker__option-number {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--agent-ink);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.agent-line-picker__option-meta {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--agent-muted);
}

.agent-line-picker__check {
  width: 1rem;
  height: 1rem;
  color: var(--agent-blue);
  flex-shrink: 0;
}

.agent-line-picker__check svg {
  width: 1rem;
  height: 1rem;
}

.agent-icon-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  color: #fff;
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  font: inherit;
  font-size: 0.85rem;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.agent-icon-btn svg {
  width: 1.15rem;
  height: 1.15rem;
}

.agent-dialer-card,
.agent-recent {
  background: var(--agent-sheet);
  border-radius: 1.15rem;
  padding: 1rem 0.95rem 1.05rem;
  border: 1px solid var(--agent-border);
}

.agent-dialer-card {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding: 1rem 1rem 1.05rem;
}

.agent-dial-form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 0;
  flex: 1 1 auto;
  justify-content: center;
}

.agent-dial-display {
  text-align: center;
  font-size: clamp(1.25rem, 4.2vh, 1.55rem);
  font-weight: 700;
  letter-spacing: 0.03em;
  margin-bottom: clamp(0.7rem, 2vh, 1rem);
  flex-shrink: 0;
  min-height: 3.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--agent-border);
  border-radius: 0.95rem;
  background: #f8fafc;
  color: var(--agent-ink);
  font-variant-numeric: tabular-nums;
  user-select: none;
  pointer-events: none;
  padding: 0.65rem 0.85rem;
}

.agent-dial-display.is-empty {
  color: var(--agent-muted);
  font-weight: 600;
  font-size: clamp(1rem, 3.2vh, 1.15rem);
  letter-spacing: 0;
}

.agent-dial-display.is-invalid {
  border-color: rgba(225, 29, 72, 0.45);
  background: #fff1f2;
}

.agent-keypad {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.55rem, 1.8vh, 0.8rem);
  width: min(100%, 18.5rem);
  margin: 0 auto;
  flex: 0 1 auto;
  direction: ltr;
}

.agent-key {
  appearance: none;
  border: 1px solid var(--agent-border);
  border-radius: 999px;
  width: 100%;
  aspect-ratio: 1;
  max-height: 4.6rem;
  background: var(--agent-fill);
  color: var(--agent-ink);
  font: inherit;
  font-size: clamp(1.2rem, 3.8vh, 1.45rem);
  font-weight: 700;
  cursor: pointer;
}

.agent-key:active {
  background: #e8eef8;
}

.agent-dial-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  width: min(100%, 18.5rem);
  margin: clamp(0.75rem, 2vh, 1rem) auto 0;
  flex-shrink: 0;
}

.agent-key-action {
  background: var(--agent-fill);
  font-size: clamp(1.05rem, 3.2vh, 1.2rem);
  font-weight: 700;
  color: var(--agent-muted);
}

.agent-call-btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  width: min(100%, 4.75rem);
  min-height: 4rem;
  height: 4rem;
  background: var(--agent-success);
  color: #fff;
  font: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.agent-call-btn svg {
  width: 1.55rem;
  height: 1.55rem;
}

.agent-dialer-note {
  margin: clamp(0.65rem, 1.8vh, 0.9rem) 0 0;
  text-align: center;
  color: var(--agent-muted);
  font-size: 0.78rem;
  line-height: 1.45;
  flex-shrink: 0;
}

.agent-recent {
  margin-top: 0.85rem;
}

.agent-recent h2 {
  margin: 0 0 0.65rem;
  font-size: 0.92rem;
}

.agent-recent ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.agent-recent-item {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  border: 1px solid var(--agent-border);
  background: var(--agent-fill);
  border-radius: 0.8rem;
  padding: 0.7rem 0.8rem;
  font: inherit;
  cursor: pointer;
}

.agent-recent-item span {
  color: var(--agent-muted);
  font-size: 0.8rem;
}

.agent-tabbar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: min(100%, 28rem);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.2rem;
  padding: 0.4rem 0.7rem calc(0.45rem + var(--agent-safe-bottom));
  background: #fff;
  border-top: 1px solid var(--agent-border);
  z-index: 30;
}

.agent-tabbar a,
.agent-tabbar span {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.05rem;
  text-align: center;
  text-decoration: none;
  color: var(--agent-muted);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.28rem 0.2rem 0.22rem;
  border-radius: 0.75rem;
  line-height: 1.1;
}

.agent-tabbar__icon {
  width: 1.7rem;
  height: 1.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.agent-tabbar__icon svg {
  width: 1.6rem;
  height: 1.6rem;
}

.agent-tabbar__label {
  line-height: 1.1;
}

.agent-tabbar a.is-active {
  color: var(--agent-blue);
  background: #eef3ff;
  font-weight: 700;
}

.agent-tabbar .is-disabled {
  opacity: 0.4;
}


.agent-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.agent-page-kicker {
  margin: 0 0 0.2rem;
  color: var(--agent-muted);
  font-size: 0.78rem;
}

.agent-page-header h1 {
  margin: 0;
  font-size: 1.35rem;
}

.agent-icon-btn-dark {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border-color: var(--agent-border);
  background: var(--agent-sheet);
  color: var(--agent-ink);
}

.agent-list-card {
  background: var(--agent-sheet);
  border-radius: 1.15rem;
  padding: 1rem;
  border: 1px solid var(--agent-border);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
}

.agent-list-card h2 {
  margin: 0 0 0.35rem;
  font-size: 0.92rem;
}

.agent-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--agent-border);
  background: var(--agent-fill);
  border-radius: 0.8rem;
  padding: 0.75rem 0.85rem;
}

.agent-list-item.is-static {
  cursor: default;
}

.agent-call-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  color: var(--agent-muted);
  font-size: 0.78rem;
}

.agent-call-dir {
  display: inline-flex;
  align-items: center;
  height: 1.25rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
}

.agent-call-dir.is-inbound {
  background: #e0f2fe;
  color: #0369a1;
}

.agent-call-dir.is-outbound {
  background: #ecfdf5;
  color: #047857;
}

.agent-list-item-main {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.agent-list-item-main > strong {
  align-self: flex-start;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.agent-list-item-main > strong[dir="ltr"] {
  unicode-bidi: isolate;
}

.agent-list-item-main span,
.agent-list-item time {
  color: var(--agent-muted);
  font-size: 0.78rem;
}

.agent-list-item time {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
  white-space: nowrap;
}

.agent-list-item-action {
  color: var(--agent-blue);
  font-size: 0.82rem;
  font-weight: 700;
}

.agent-empty {
  margin: 0.4rem 0;
  color: var(--agent-muted);
  font-size: 0.88rem;
  text-align: center;
}

.agent-contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.agent-contact-form .agent-cta {
  margin-top: 0.15rem;
}

.agent-cta-danger {
  width: 100%;
  background: #b42318;
}

.agent-cta-danger:active {
  background: #912018;
}

.agent-profile-card h2 {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
}

.agent-profile-fields {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.agent-profile-field {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--agent-border);
}

.agent-profile-field:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.agent-profile-field dt {
  margin: 0;
  color: var(--agent-muted);
  font-size: 0.82rem;
}

.agent-profile-field dd {
  margin: 0;
  font-weight: 600;
  text-align: left;
}

.agent-profile-password-form .agent-cta {
  width: 100%;
}

.agent-profile-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  padding: 1rem;
  border: 1px solid var(--agent-border);
  border-radius: 1.15rem;
  background: var(--agent-sheet);
  color: inherit;
  text-decoration: none;
}

.agent-profile-action__copy {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.agent-profile-action__copy > span {
  color: var(--agent-muted);
  font-size: 0.78rem;
}

.agent-profile-action__chevron {
  color: var(--agent-muted);
  font-size: 1.25rem;
  line-height: 1;
}

@media (min-width: 48rem) {
  html,
  body.agent-body {
    height: auto;
    min-height: 100%;
    overflow: auto;
  }

  body.agent-body,
  body.agent-auth {
    background: #f3f4f6;
  }

  .agent-shell {
    align-items: stretch;
    justify-content: flex-start;
    min-height: 100dvh;
    height: auto;
    padding: 1.5rem 1rem 2rem;
    overflow: visible;
  }

  body:has(.agent-dialer-screen) .agent-shell {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }

  .agent-shell > .agent-screen,
  .agent-shell > .agent-auth-page {
    width: 26.5rem;
    max-width: 100%;
    height: auto;
    min-height: calc(100dvh - 3.5rem);
    margin-inline: auto;
    border: 0;
    border-radius: 0;
    overflow: visible;
    position: relative;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  }

  .agent-shell > .agent-auth-page {
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
  }

  .agent-shell > .agent-auth-page .agent-auth-card {
    width: 100%;
    height: auto;
    min-height: calc(100dvh - 3.5rem);
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    justify-content: center;
    padding: 2.5rem 1.75rem 2rem;
  }

  .agent-screen {
    display: flex;
    flex-direction: column;
  }

  .agent-list-screen {
    height: auto;
    min-height: calc(100dvh - 3.5rem);
    overflow: visible;
    padding-top: 0;
  }

  .agent-dialer-screen {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    min-height: calc(100dvh - 3.5rem);
    height: auto;
    max-height: none;
    overflow: visible;
    padding: 0 0 5.25rem;
    background: #fff;
  }

  .agent-dialer-card {
    flex: 0 0 auto;
  }

  .agent-dial-form {
    flex: 0 0 auto;
    justify-content: flex-start;
  }

  .agent-dial-display {
    font-size: 1.45rem;
  }

  .agent-dial-display.is-empty {
    font-size: 1.1rem;
  }

  .agent-keypad {
    gap: 0.75rem;
    flex: 0 0 auto;
  }

  .agent-key {
    font-size: 1.4rem;
    max-height: none;
  }

  .agent-dial-actions {
    margin-top: 1rem;
  }

  .agent-phone-status {
    display: none !important;
  }

  .agent-app-bar {
    border-radius: 0;
  }

  .agent-tabbar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: none;
    transform: none;
    border-radius: 0;
  }
}

