:root {
  color-scheme: light;
  --bg: #eef3f8;
  --panel: #ffffff;
  --text: #152033;
  --muted: #667085;
  --line: #d9e2ec;
  --accent: #1565c0;
  --accent-2: #0f8b6f;
  --danger: #b42318;
  --shadow: 0 18px 45px rgba(18, 38, 63, .10);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
}

.shell {
  width: min(960px, 100%);
  margin: 0 auto;
  padding: 18px;
}

.hero {
  display: block;
  padding: 22px;
  background: #123a63;
  color: #fff;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.brand-block {
  display: flex;
  gap: 16px;
  align-items: center;
}

.brand-icon {
  width: 96px;
  height: 96px;
  flex: 0 0 auto;
  border-radius: 22px;
  object-fit: cover;
  background: #fff;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .22);
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 13px;
  color: #b9dcff;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.05;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 18px;
  font-size: 24px;
}

h3 {
  margin-bottom: 14px;
  font-size: 17px;
}

.lead {
  max-width: 620px;
  margin-bottom: 0;
  color: #dcecff;
  line-height: 1.5;
}

.status {
  color: #cfe5ff;
  font-size: 14px;
  font-weight: 700;
}

.status-button {
  min-height: 34px;
  max-width: 100%;
  padding: 0 10px;
  border-color: rgba(207, 229, 255, .42);
  background: rgba(255, 255, 255, .10);
  color: #cfe5ff;
  text-align: left;
}

.tabs {
  display: flex;
  gap: 8px;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 12px;
  z-index: 9;
  width: min(520px, calc(100% - 20px));
  transform: translateX(-50%);
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.bottom-nav[hidden] {
  display: none;
}

.auth-choice {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  max-width: 420px;
  margin: 18px auto 0;
}

.auth-choice[hidden] {
  display: none;
}

.auth-action {
  min-height: 58px;
  font-size: 18px;
  box-shadow: var(--shadow);
}

.auth-action-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.tab,
button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.tab {
  flex: 1;
}

.tab.active,
button[type="submit"] {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.tab[hidden],
.panel[hidden] {
  display: none;
}

.panel {
  display: none;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 22px;
}

.panel.active {
  display: block;
  animation: panel-in .18s ease-out;
}

.panel-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

.panel-head h2 {
  margin-bottom: 0;
}

.back-btn {
  min-height: 38px;
  padding: 0 14px;
  background: #f8fafc;
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form {
  display: grid;
  gap: 14px;
}

.form.compact {
  align-content: start;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px 11px;
  color: var(--text);
  background: #fff;
  font-size: 16px;
}

input:focus,
select:focus,
button:focus-visible {
  outline: 3px solid rgba(21, 101, 192, .18);
  border-color: var(--accent);
}

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

.date-parts {
  display: grid;
  grid-template-columns: 1fr 1fr 1.35fr;
  gap: 10px;
}

.notice {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 7px;
  background: #edf7f4;
  border: 1px solid #c4e4dc;
  color: #145c4d;
  line-height: 1.45;
}

.home-menu {
  display: grid;
  gap: 22px;
}

.menu-section h3 {
  margin-bottom: 10px;
  color: #344054;
}

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

.menu-action {
  min-height: 64px;
  padding: 0 12px;
  border-color: #bfd2e6;
  background: #f8fbff;
  color: #17324d;
  font-size: 17px;
}

.menu-action-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.menu-action:active {
  transform: translateY(1px);
}

.phone-book-title {
  margin-bottom: 14px;
  color: #344054;
  font-size: 17px;
  font-weight: 700;
}

.phone-group {
  display: grid;
  gap: 8px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.phone-group:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.phone-row {
  display: grid;
  grid-template-columns: minmax(130px, auto) 1fr;
  gap: 10px;
  align-items: center;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid #d7e5f2;
  border-radius: 7px;
  background: #f8fbff;
  color: var(--text);
  text-decoration: none;
}

.phone-number {
  color: var(--accent);
  font-weight: 700;
}

.phone-label {
  color: #344054;
}

.profile-card {
  margin: 0;
  padding: 16px;
  border-left: 5px solid #eb6b75;
  border-radius: 7px;
  background: #4f414b;
  color: #fff;
  font-size: 16px;
  line-height: 1.45;
}

.profile-title {
  margin-bottom: 10px;
  font-weight: 700;
}

.profile-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.profile-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  background: #f3d7a5;
  -webkit-mask: var(--icon) center / 20px 20px no-repeat;
  mask: var(--icon) center / 20px 20px no-repeat;
}

.profile-icon-user {
  --icon: url("/icons/ui/tabler-user.svg?v=20260528a");
}

.profile-icon-badge {
  --icon: url("/icons/ui/tabler-badge.svg?v=20260528a");
}

.profile-icon-phone {
  --icon: url("/icons/ui/tabler-phone.svg?v=20260528a");
}

.profile-icon-building {
  --icon: url("/icons/ui/tabler-building.svg?v=20260528a");
}

.profile-icon-calendar {
  --icon: url("/icons/ui/tabler-calendar.svg?v=20260528a");
}

.profile-icon-clock {
  --icon: url("/icons/ui/tabler-clock.svg?v=20260528a");
}

.profile-icon-date {
  --icon: url("/icons/ui/tabler-date.svg?v=20260528a");
}

.profile-icon-bell {
  --icon: url("/icons/ui/tabler-bell.svg?v=20260528a");
}

.profile-icon-link {
  --icon: url("/icons/ui/tabler-link.svg?v=20260528a");
}

.profile-icon-at {
  --icon: url("/icons/ui/tabler-at.svg?v=20260528a");
}

.secondary-action {
  margin-top: 14px;
  width: 100%;
  border-color: var(--line);
  background: #fff;
  color: var(--text);
}

.profile-transfer-action {
  min-height: 28px;
  margin-left: 8px;
  padding: 0 9px;
  border-color: rgba(243, 215, 165, .55);
  background: rgba(243, 215, 165, .12);
  color: #ffe8bd;
  font-size: 13px;
  vertical-align: middle;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%) translateY(120px);
  width: min(560px, calc(100% - 24px));
  padding: 12px 14px;
  border-radius: 7px;
  background: #101828;
  color: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  transition: .18s ease;
  z-index: 10;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

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

@media (max-width: 720px) {
  .shell {
    padding: 10px;
  }

  .hero {
    display: block;
    padding: 18px;
  }

  .brand-block {
    align-items: flex-start;
  }

  .brand-icon {
    width: 72px;
    height: 72px;
    border-radius: 18px;
  }

  .auth-choice {
    max-width: none;
  }

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

  .date-parts {
    grid-template-columns: 1fr 1fr 1.2fr;
  }

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

  .phone-row {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .panel {
    padding: 16px;
  }
}
