:root {
  --bg: #eef8ff;
  --surface: #ffffff;
  --text: #09265c;
  --muted: #597496;
  --line: rgba(12, 121, 216, .14);
  --accent: #087ff5;
  --accent-text: #ffffff;
  --accent-soft: color-mix(in srgb, var(--accent) 11%, transparent);
  --warm: #f3a63a;
  --danger: #c94152;
  --shadow: 0 18px 50px rgba(33, 132, 215, .14);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  min-height: 100%; margin: 0; color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
button, input, textarea { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

.ambient { position: fixed; border-radius: 999px; filter: blur(1px); opacity: .52; pointer-events: none; }
.ambient-one { width: 370px; height: 370px; top: -195px; right: -145px; background: radial-gradient(circle, #92d5ff, transparent 67%); }
.ambient-two { width: 290px; height: 290px; bottom: -175px; left: -160px; background: radial-gradient(circle, #c6eaff, transparent 67%); }

.app-shell { width: min(100%, 760px); min-height: 100vh; margin: 0 auto; padding: max(16px, env(safe-area-inset-top)) 16px calc(28px + env(safe-area-inset-bottom)); position: relative; }
.topbar { min-height: 70px; display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; gap: 11px; padding: 10px 12px; background: color-mix(in srgb, var(--surface) 88%, transparent); border: 1px solid rgba(255, 255, 255, .72); border-radius: 20px; box-shadow: 0 10px 28px rgba(34, 133, 212, .1); }
.home-link { min-height: 40px; display: inline-flex; align-items: center; gap: 8px; margin-left: auto; padding: 0 15px; color: var(--accent-text); background: var(--accent); border-radius: 999px; box-shadow: 0 8px 18px color-mix(in srgb, var(--accent) 26%, transparent); font-size: 12px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.home-link:hover { filter: brightness(1.05); }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; color: var(--accent-text); background: var(--accent); border: 0; border-radius: 50%; box-shadow: 0 8px 21px color-mix(in srgb, var(--accent) 25%, transparent); }
.brand-mark svg { width: 23px; height: 23px; }
.calendar-brand { display: inline-flex; min-width: 0; align-items: center; gap: 11px; color: var(--text); text-decoration: none; }
.calendar-brand strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; letter-spacing: -.02em; }
.header-label { color: var(--muted); font-size: 14px; white-space: nowrap; }
.eyebrow, .section-kicker { color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.avatar { width: 40px; height: 40px; border: 0; border-radius: 50%; color: var(--accent-text); background: linear-gradient(145deg, var(--accent), #0a61cf); font-weight: 800; box-shadow: 0 7px 20px color-mix(in srgb, var(--accent) 25%, transparent); }

.hero { padding: 33px 27px 31px; margin: 16px 0 20px; overflow: hidden; background: linear-gradient(135deg, #dff3ff 0%, #9edcff 58%, #76c7f9 100%); border: 1px solid rgba(255, 255, 255, .68); border-radius: 28px; box-shadow: var(--shadow); }
.hero-chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; color: #126fcf; background: rgba(255, 255, 255, .72); border-radius: 999px; font-size: 12px; font-weight: 750; }
.hero-chip i { width: 7px; height: 7px; border-radius: 50%; background: #1e83f6; box-shadow: 0 0 0 4px rgba(30, 131, 246, .14); }
.hero h1 { margin: 16px 0 10px; max-width: 590px; font-size: clamp(38px, 11vw, 62px); font-weight: 800; line-height: .98; letter-spacing: -.055em; }
.hero h1 em { color: #087ff5; font-style: normal; font-weight: 800; }
.hero p { max-width: 520px; margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }

.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 5px; margin: 0 0 20px; background: color-mix(in srgb, var(--surface) 90%, transparent); border: 1px solid var(--line); border-radius: 17px; box-shadow: 0 8px 22px rgba(34, 133, 212, .08); }
.tabs.has-admin { grid-template-columns: repeat(3, 1fr); }
.tab { min-height: 46px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; color: var(--muted); background: transparent; font-size: 14px; font-weight: 750; cursor: pointer; }
.tab svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tab.is-active { color: var(--accent-text); background: var(--accent); box-shadow: 0 5px 16px color-mix(in srgb, var(--accent) 28%, transparent); }
.tab-count { min-width: 20px; height: 20px; padding: 0 6px; display: grid; place-items: center; color: var(--accent-text); background: var(--accent); border-radius: 10px; font-size: 11px; }

.loading-card, .panel { min-height: 280px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 34px 24px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 26px; box-shadow: var(--shadow); }
.loading-card p, .panel p { margin: 7px 0 0; color: var(--muted); line-height: 1.55; }
.loader { width: 34px; height: 34px; margin-bottom: 17px; border: 3px solid var(--accent-soft); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.panel-icon { width: 54px; height: 54px; display: grid; place-items: center; margin-bottom: 18px; color: var(--accent-text); background: var(--accent); border-radius: 18px; font-size: 26px; }
.panel h2, .section-heading h2, .success-panel h2 { margin: 7px 0 0; font-size: 30px; font-weight: 800; line-height: 1.1; letter-spacing: -.035em; }
.consent-panel .primary-button { margin-top: 25px; }

.notice { padding: 13px 15px; margin: 0 0 16px; color: var(--danger); background: color-mix(in srgb, var(--danger) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--danger) 20%, transparent); border-radius: 14px; font-size: 13px; line-height: 1.45; }
.telegram-open-link { min-height: 50px; padding: 12px 17px; display: flex; align-items: center; justify-content: center; gap: 10px; margin: -5px 0 16px; color: var(--accent-text); background: linear-gradient(135deg, #229ed9, #168ac3); border-radius: 15px; box-shadow: 0 11px 25px rgba(34, 158, 217, .22); font-size: 14px; font-weight: 800; text-decoration: none; }
.telegram-open-link:hover { filter: brightness(1.04); }
.telegram-open-link:active { transform: scale(.99); }
.progress-wrap { padding: 15px 17px; margin-bottom: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.progress-copy { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; font-size: 12px; }
.progress-copy span { color: var(--muted); }
.progress-track { height: 5px; overflow: hidden; background: var(--accent-soft); border-radius: 99px; }
.progress-track i { display: block; height: 100%; width: 25%; background: linear-gradient(90deg, var(--accent), #56c5ff); border-radius: inherit; transition: width .35s ease; }
.step, #meetings-view, #admin-view { scroll-margin-top: 12px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin: 25px 4px 16px; }
.section-heading > p { max-width: 250px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; text-align: right; }
.back-button, .text-button { min-height: 42px; padding: 0; border: 0; color: var(--accent); background: transparent; font-size: 13px; font-weight: 750; cursor: pointer; }

.type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.type-card { min-height: 155px; padding: 18px; display: flex; flex-direction: column; align-items: flex-start; text-align: left; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 21px; box-shadow: 0 9px 25px rgba(34,133,212,.09); cursor: pointer; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.type-card:active { transform: scale(.98); }
.type-card:hover { border-color: color-mix(in srgb, var(--accent) 42%, transparent); box-shadow: 0 13px 30px rgba(34,133,212,.17); }
.type-card.is-selected, .date-button.is-selected, .time-button.is-selected {
  color: var(--accent-text); background: var(--accent); border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.type-card.is-selected p, .type-card.is-selected .duration,
.date-button.is-selected span, .date-button.is-selected small { color: inherit; opacity: .86; }
.type-icon { width: 38px; height: 38px; display: grid; place-items: center; margin-bottom: 17px; color: var(--accent); background: var(--accent-soft); border-radius: 12px; font-weight: 850; }
.type-card strong { font-size: 16px; letter-spacing: -.015em; }
.type-card p { flex: 1; margin: 6px 0 15px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.duration { color: var(--accent); font-size: 12px; font-weight: 800; }

.date-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.date-button { min-height: 82px; padding: 10px 6px; border: 1px solid var(--line); border-radius: 17px; color: var(--text); background: var(--surface); cursor: pointer; }
.date-button span { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; }
.date-button strong { display: block; margin: 4px 0 1px; font-family: Georgia, serif; font-size: 26px; font-weight: 500; }
.date-button small { color: var(--accent); font-weight: 750; }
.date-button:hover, .date-button:active { color: var(--accent-text); background: var(--accent); }
.date-button:hover span, .date-button:hover small, .date-button:active span, .date-button:active small { color: inherit; opacity: .82; }
.time-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.time-button { min-height: 50px; border: 1px solid var(--line); border-radius: 14px; color: var(--text); background: var(--surface); font-weight: 750; cursor: pointer; }
.time-button:hover, .time-button:active { color: var(--accent-text); background: var(--accent); border-color: var(--accent); }
.empty-state { grid-column: 1 / -1; padding: 30px 20px; color: var(--muted); text-align: center; background: var(--surface); border: 1px dashed var(--line); border-radius: 18px; }
.step-entering { animation: step-confirm .48s ease-out; }
@keyframes step-confirm {
  0% { opacity: .45; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

.booking-form { display: grid; gap: 14px; padding: 19px; background: var(--surface); border: 1px solid var(--line); border-radius: 23px; box-shadow: var(--shadow); }
.booking-form label { display: grid; gap: 7px; color: var(--text); font-size: 12px; font-weight: 750; }
.booking-form label small { color: var(--muted); font-weight: 500; }
.booking-form input, .booking-form textarea { width: 100%; min-height: 49px; padding: 13px 14px; color: var(--text); background: var(--bg); border: 1px solid transparent; border-radius: 13px; outline: none; resize: vertical; }
.booking-form textarea { min-height: 88px; }
.booking-form input:focus, .booking-form textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.booking-form .primary-button { margin-top: 3px; }
.primary-button { width: 100%; min-height: 52px; padding: 12px 17px; display: flex; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: 15px; color: var(--accent-text); background: linear-gradient(135deg, var(--accent), #0a62cf); font-weight: 800; cursor: pointer; box-shadow: 0 11px 25px color-mix(in srgb, var(--accent) 22%, transparent); }
.primary-button:disabled { opacity: .55; cursor: wait; }

.review-card { padding: 20px; margin-bottom: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 23px; box-shadow: var(--shadow); }
.review-hero { padding-bottom: 17px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.review-hero strong { display: block; font-family: Georgia, serif; font-size: 24px; font-weight: 500; }
.review-hero span { color: var(--accent); font-size: 13px; font-weight: 800; }
.review-row { display: grid; grid-template-columns: 92px 1fr; gap: 10px; padding: 8px 0; font-size: 13px; line-height: 1.35; }
.review-row span { color: var(--muted); }
.submit-note { color: var(--muted); font-size: 11px; text-align: center; }
.success-panel { min-height: 400px; padding: 35px 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.success-panel > p { max-width: 380px; color: var(--muted); line-height: 1.5; }
.success-panel .primary-button { max-width: 360px; margin-top: 20px; }
.success-mark { width: 78px; height: 78px; display: grid; place-items: center; margin-bottom: 22px; color: var(--accent); background: var(--accent-soft); border-radius: 28px; transform: rotate(-3deg); }
.success-mark svg { width: 48px; fill: none; stroke: currentColor; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }

.meetings-heading { margin-top: 28px; }
.meeting-list { display: grid; gap: 11px; }
.meeting-card { padding: 17px; display: grid; grid-template-columns: 54px 1fr; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; }
.meeting-date { height: 58px; display: grid; place-items: center; align-content: center; color: var(--accent); background: var(--accent-soft); border-radius: 14px; }
.meeting-date strong { font-family: Georgia, serif; font-size: 23px; line-height: 1; }
.meeting-date span { margin-top: 3px; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.meeting-content { min-width: 0; }
.meeting-content strong { display: block; overflow: hidden; margin: 2px 0 5px; text-overflow: ellipsis; white-space: nowrap; }
.meeting-meta { color: var(--muted); font-size: 12px; }
.status-pill { display: inline-flex; margin-top: 10px; padding: 5px 8px; color: var(--accent); background: var(--accent-soft); border-radius: 8px; font-size: 10px; font-weight: 800; }
.meet-link { display: inline-block; margin-top: 9px; color: var(--accent); font-size: 12px; font-weight: 800; text-decoration: none; }

.admin-heading { align-items: center; margin-top: 28px; }
.refresh-button { min-height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 11px; color: var(--accent); background: var(--surface); font-size: 12px; font-weight: 800; cursor: pointer; }
.admin-summary { padding: 13px 15px; margin-bottom: 12px; color: var(--muted); background: var(--accent-soft); border-radius: 14px; font-size: 12px; line-height: 1.45; }
.admin-list { display: grid; gap: 12px; }
.admin-card { padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 21px; box-shadow: 0 9px 25px rgba(34,133,212,.09); }
.admin-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.admin-card-head strong { font-family: Georgia, serif; font-size: 21px; font-weight: 500; line-height: 1.15; }
.admin-card-head span { flex: 0 0 auto; padding: 5px 8px; color: var(--accent); background: var(--accent-soft); border-radius: 8px; font-size: 10px; font-weight: 850; }
.admin-when { margin-bottom: 12px; color: var(--accent); font-size: 13px; font-weight: 800; }
.admin-details { display: grid; gap: 7px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.admin-details b { color: var(--text); }
.admin-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.admin-actions button { min-height: 45px; border-radius: 13px; font-weight: 800; cursor: pointer; }
.approve-button { border: 0; color: var(--accent-text); background: var(--accent); }
.reject-button { border: 1px solid color-mix(in srgb, var(--danger) 25%, transparent); color: var(--danger); background: color-mix(in srgb, var(--danger) 7%, var(--surface)); }
.admin-actions button:disabled { opacity: .55; cursor: wait; }
.reject-box { display: grid; gap: 9px; padding-top: 13px; margin-top: 13px; border-top: 1px solid var(--line); }
.reject-box textarea { width: 100%; min-height: 78px; padding: 12px; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 12px; outline: none; resize: vertical; }
.reject-box textarea:focus { border-color: var(--danger); }
.confirm-reject-button { min-height: 43px; border: 0; border-radius: 12px; color: #fff; background: var(--danger); font-weight: 800; cursor: pointer; }
.admin-upcoming-heading { margin-top: 34px; }
.admin-card.is-upcoming .admin-actions { display: none; }

.toast { position: fixed; z-index: 5; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); width: min(calc(100% - 32px), 500px); padding: 13px 16px; transform: translateX(-50%); color: #fff; background: #09265c; border-radius: 13px; box-shadow: 0 13px 35px rgba(0,0,0,.2); font-size: 13px; text-align: center; }
footer { padding: 34px 0 4px; color: var(--muted); font-size: 10px; text-align: center; }

@media (max-width: 480px) {
  .app-shell { padding-inline: 12px; }
  .hero { padding: 25px 20px; }
  .hero h1 { font-size: 41px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 6px; }
  .section-heading > p { max-width: none; text-align: left; }
  .type-grid { gap: 8px; }
  .type-card { min-height: 164px; padding: 15px; }
  .date-grid { grid-template-columns: repeat(3, 1fr); gap: 7px; }
  .time-grid { grid-template-columns: repeat(3, 1fr); gap: 7px; }
  .tab { font-size: 12px; }
  .tab svg { width: 16px; }
  .header-label, .avatar { display: none; }
  .home-link { min-height: 36px; padding: 0 11px; font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
