/* ——— Global Dent Club (брендбук) ——— */
:root {
  --gdc-charcoal: #071939;
  --gdc-cool-grey: #3A435E;
  --gdc-oxford: #A4B6C4;
  --gdc-gold: #BFAB8A;
  --gdc-gold-hover: #d4c4a8;
  --gdc-white: #FFFFFF;
  --gdc-black: #000000;
  --gdc-bg-image: url('./bg6@3x.png');
  --gdc-login-overlay: linear-gradient(160deg, rgba(7, 25, 57, 0.88) 0%, rgba(7, 25, 57, 0.72) 45%, rgba(58, 67, 94, 0.55) 100%);
}

/* Изоляция от стилей презентации (index): только внутри портала */
.preza-auth-hidden { display: none !important; }

/* Экран входа поверх презентации (index) — всегда виден до авторизации */
body:not(.preza-admin-page) #preza-auth-root,
body:not(.preza-admin-page) #preza-session-ended {
  position: fixed;
  inset: 0;
  z-index: 500000;
  width: 100%;
  height: 100%;
  max-width: 100vw;
  max-height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
}
body:not(.preza-admin-page) #preza-auth-root.preza-auth-hidden,
body:not(.preza-admin-page) #preza-session-ended.preza-auth-hidden {
  display: none !important;
  pointer-events: none !important;
}

/* ——— Вход (GDC + фон bg6) ——— */
html.preza-login-active,
html.preza-login-active body {
  overflow: hidden !important;
  width: 100%;
  max-width: 100vw;
  height: 100%;
  max-height: 100dvh;
  overscroll-behavior: none;
  touch-action: manipulation;
}
html.preza-login-active body {
  position: fixed;
  inset: 0;
}
html.preza-login-active #presentation-app {
  visibility: hidden !important;
  pointer-events: none !important;
}

.preza-portal-login {
  width: 100%;
  height: 100%;
  max-height: 100dvh;
  min-height: 0;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(10px, 2.5vh, 20px) clamp(12px, 3vw, 20px);
  overflow: hidden;
  background-color: var(--gdc-charcoal);
  background-image: var(--gdc-login-overlay), var(--gdc-bg-image);
  background-size: cover, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
  font-family: 'Open Sans', system-ui, sans-serif;
  color: var(--gdc-white);
}

.preza-auth-card--dark {
  width: 100%;
  max-width: min(440px, 100%);
  max-height: calc(100dvh - 24px);
  box-sizing: border-box;
  overflow: hidden;
  flex-shrink: 1;
  background: rgba(7, 25, 57, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(191, 171, 138, 0.35);
  border-radius: 16px;
  padding: clamp(18px, 3vh, 28px) clamp(16px, 4vw, 24px);
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.45);
}

.preza-auth-card--dark .preza-auth-logo {
  display: block;
  max-width: min(180px, 42vw);
  margin: 0 auto clamp(8px, 1.8vh, 14px);
}
.preza-auth-logo--gdc,
.preza-admin-sidebar__logo {
  opacity: 0.5;
}
.preza-auth-logo--gdc {
  max-width: 220px;
  width: 100%;
  height: auto;
}

.preza-auth-card--dark h1 {
  font-size: clamp(0.92rem, 2.6vw, 1.05rem);
  text-align: center;
  margin: 0 0 4px;
  font-weight: 600;
  color: #fff;
}

.preza-auth-sub {
  text-align: center;
  font-size: clamp(0.7rem, 2.2vw, 0.78rem);
  color: var(--gdc-oxford);
  margin: 0 0 clamp(12px, 2vh, 18px);
}

.preza-auth-hint {
  text-align: center;
  font-size: 0.72rem;
  color: rgba(164, 182, 196, 0.9);
  margin-top: 16px;
  line-height: 1.45;
}
.preza-link-app {
  display: block;
  text-align: center;
  margin-top: 20px;
  font-size: 0.75rem;
  color: var(--gdc-gold);
  text-decoration: none;
}
.preza-link-app:hover { color: var(--gdc-gold-hover); text-decoration: underline; }

body.preza-admin-page #preza-auth-root {
  position: fixed;
  inset: 0;
  z-index: 100000;
  width: 100%;
  height: 100%;
  max-width: 100vw;
  max-height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
  background-color: var(--gdc-charcoal);
  background-image: var(--gdc-login-overlay), var(--gdc-bg-image);
  background-size: cover, cover;
  background-position: center, center;
}

#preza-auth-root .preza-field,
.preza-login-form--admin .preza-field {
  margin-bottom: clamp(10px, 1.6vh, 12px);
  width: 100%;
}
#preza-auth-root .preza-field label,
.preza-login-form--admin .preza-field label {
  display: block;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 6px;
  line-height: 1.3;
}
#preza-auth-root .preza-field input,
.preza-login-form--admin .preza-field input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: #fff;
  color: #1a2332 !important;
  -webkit-text-fill-color: #1a2332;
  font-size: 0.88rem;
  font-family: inherit;
  line-height: 1.25;
  margin: 0;
}
.preza-login-form--admin {
  display: flex;
  flex-direction: column;
  width: 100%;
}
.preza-btn--login {
  margin-top: 4px;
}
#preza-auth-root .preza-auth-error {
  color: #ff8a80;
  font-size: 0.72rem;
  min-height: 1.2em;
  text-align: center;
  margin: 8px 0;
}

.preza-btn {
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 11px 18px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
}
.preza-btn--primary {
  background: var(--gdc-gold);
  color: var(--gdc-charcoal);
  width: 100%;
  box-shadow: 0 4px 14px rgba(191, 171, 138, 0.35);
}
.preza-btn--primary:hover { background: var(--gdc-gold-hover); }
.preza-btn--outline {
  background: #fff;
  color: var(--gdc-charcoal);
  border: 1px solid var(--gdc-oxford);
}
.preza-btn--outline:hover { background: rgba(164, 182, 196, 0.12); border-color: var(--gdc-cool-grey); }
.preza-btn--ghost.preza-btn--dark,
body.preza-admin-page .preza-btn--ghost {
  background: transparent;
  border: 1px solid var(--adm-border2, rgba(255,255,255,0.12));
  color: var(--adm-text2, #8899b0);
}
body.preza-admin-page .preza-btn--ghost:hover {
  background: rgba(255,255,255,0.06);
  color: var(--adm-text, #e4e8f0);
}
body.preza-admin-page .preza-btn--outline {
  border: 1px solid var(--adm-border2, rgba(255,255,255,0.12));
  color: var(--adm-text2, #8899b0);
  background: transparent;
}
body.preza-admin-page .preza-btn--outline:hover {
  border-color: var(--adm-gold, #bfab8a);
  color: var(--adm-gold, #bfab8a);
}
body.preza-admin-page .preza-btn--danger {
  background: var(--adm-red-bg, rgba(248,113,113,0.12));
  border: none;
  color: var(--adm-red, #f87171);
}
body.preza-admin-page .preza-btn--danger:hover {
  background: rgba(248,113,113,0.22);
}
.preza-btn--ghost {
  background: transparent;
  color: #5a6b7d;
  border: 1px solid #d0dae6;
}
.preza-btn--ghost:hover { background: #f5f7fa; }
.preza-btn--danger {
  background: #fdecea;
  color: #c0392b;
  border: 1px solid #f5b7b1;
}
.preza-btn--danger:hover { background: #fadbd8; }

#presentation-app.preza-locked-by-auth {
  visibility: hidden !important;
  pointer-events: none !important;
  position: fixed !important;
  left: -99999px !important;
  top: 0 !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
}

/* ══════════════════════════════════════════
   Тёмная тема ADMIN: CSS-переменные
══════════════════════════════════════════ */
body.preza-admin-page {
  --adm-bg:          #0e1117;
  --adm-bg2:         #131a2e;
  --adm-surface:     #161d2d;
  --adm-surface2:    #1b2338;
  --adm-surface3:    #212c42;
  --adm-border:      rgba(255,255,255,0.07);
  --adm-border2:     rgba(255,255,255,0.12);
  --adm-text:        #e4e8f0;
  --adm-text2:       #8899b0;
  --adm-text3:       #5a6a82;
  --adm-gold:        #bfab8a;
  --adm-gold2:       rgba(191,171,138,0.15);
  --adm-gold3:       rgba(191,171,138,0.08);
  --adm-green:       #22c55e;
  --adm-green-bg:    rgba(34,197,94,0.12);
  --adm-red:         #f87171;
  --adm-red-bg:      rgba(248,113,113,0.12);
  --adm-amber:       #fbbf24;
  --adm-amber-bg:    rgba(251,191,36,0.12);
  --adm-blue:        #60a5fa;
  --adm-blue-bg:     rgba(96,165,250,0.12);
  --adm-purple:      #a78bfa;
  --adm-purple-bg:   rgba(167,139,250,0.12);

  margin: 0;
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--adm-bg);
  color: var(--adm-text);
  -webkit-font-smoothing: antialiased;
}

body.preza-admin-page #preza-admin-root {
  position: static;
  inset: auto;
  z-index: auto;
  min-height: 100vh;
  background: var(--adm-bg);
  color: var(--adm-text);
  overflow: visible;
}

body.preza-admin-page #preza-auth-root.preza-auth-hidden {
  position: static;
  background: none;
}

.preza-admin-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 48px;
}

/* ——— Таблица презентаций ——— */
.preza-table-panel {
  background: var(--adm-surface, #161d2d);
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
  border: 1px solid var(--adm-border, rgba(255,255,255,0.07));
  overflow: hidden;
}

.preza-table-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  padding: 14px 18px;
  background: var(--adm-surface2, #1b2338);
  border-bottom: 1px solid var(--adm-border, rgba(255,255,255,0.07));
}

.preza-table-search-wrap {
  flex: 1;
  min-width: 220px;
  position: relative;
}
.preza-table-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--adm-text3, #5a6a82);
  pointer-events: none;
  display: flex;
}
.preza-table-search {
  width: 100%;
  font-family: inherit;
  font-size: 0.85rem;
  padding: 10px 14px 10px 42px;
  border: 1px solid var(--adm-border2, rgba(255,255,255,0.12));
  border-radius: 12px;
  background: var(--adm-surface3, #212c42);
  color: var(--adm-text, #e4e8f0) !important;
  -webkit-text-fill-color: var(--adm-text, #e4e8f0);
  box-sizing: border-box;
}
.preza-table-search::placeholder { color: var(--adm-text3, #5a6a82); }
.preza-table-search:focus {
  outline: none;
  border-color: var(--adm-gold, #bfab8a);
  box-shadow: 0 0 0 3px rgba(191,171,138,0.15);
}

.preza-table-filter-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.preza-table-filter-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--adm-text3, #5a6a82);
  white-space: nowrap;
}
.preza-table-select {
  font-family: inherit;
  font-size: 0.8rem;
  padding: 9px 28px 9px 12px;
  border: 1px solid var(--adm-border2, rgba(255,255,255,0.12));
  border-radius: 10px;
  background: var(--adm-surface3, #212c42);
  color: var(--adm-text, #e4e8f0) !important;
  cursor: pointer;
  min-width: 140px;
}

.preza-table-count {
  font-size: 0.7rem;
  color: var(--adm-text3, #5a6a82);
  margin-left: auto;
  white-space: nowrap;
}

.preza-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.preza-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
}
.preza-table thead {
  background: var(--adm-surface2, #1b2338);
  position: sticky;
  top: 0;
  z-index: 1;
}
.preza-table th {
  text-align: left;
  font-size: 0.66rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--adm-text3, #5a6a82);
  padding: 11px 16px;
  border-bottom: 1px solid var(--adm-border, rgba(255,255,255,0.07));
  white-space: nowrap;
}
.preza-table-th-actions { text-align: center; width: 168px; }

.preza-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--adm-border, rgba(255,255,255,0.07));
  color: var(--adm-text, #e4e8f0);
  vertical-align: middle;
}
.preza-table-row:hover td { background: var(--adm-surface2, #1b2338); }
.preza-table-row--off td { opacity: 0.55; }

.preza-table-clinic-name {
  font-weight: 600;
  color: var(--adm-text, #e4e8f0);
}
.preza-table-date {
  font-variant-numeric: tabular-nums;
  color: var(--adm-text2, #8899b0);
  white-space: nowrap;
}

.preza-pill {
  display: inline-block;
  font-size: 0.67rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
}
.preza-pill--on {
  background: var(--adm-green-bg, rgba(34,197,94,0.12));
  color: var(--adm-green, #22c55e);
}
.preza-pill--off {
  background: var(--adm-red-bg, rgba(248,113,113,0.12));
  color: var(--adm-red, #f87171);
}

.preza-table-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
}

.preza-icon-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  border: none;
  border-radius: 9px;
  background: var(--adm-surface3, #212c42);
  color: var(--adm-text2, #8899b0);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, transform 0.1s, color 0.15s;
}
.preza-icon-btn:hover {
  background: var(--adm-border2, rgba(255,255,255,0.12));
  color: var(--adm-text, #e4e8f0);
}
.preza-icon-btn:active { transform: scale(0.93); }
.preza-icon-btn--warn {
  color: var(--adm-amber, #fbbf24);
  background: var(--adm-amber-bg, rgba(251,191,36,0.12));
}
.preza-icon-btn--warn:hover { background: rgba(251,191,36,0.2); }
.preza-icon-btn--success {
  color: var(--adm-green, #22c55e);
  background: var(--adm-green-bg, rgba(34,197,94,0.12));
}
.preza-icon-btn--success:hover { background: rgba(34,197,94,0.2); }
.preza-icon-btn--danger {
  color: var(--adm-red, #f87171);
  background: var(--adm-red-bg, rgba(248,113,113,0.12));
}
.preza-icon-btn--danger:hover { background: rgba(248,113,113,0.2); }

.preza-table-empty {
  text-align: center;
  padding: 48px 20px !important;
  color: var(--adm-text3, #5a6a82);
  font-size: 0.88rem;
}

.preza-cfg-field--check { margin-top: 8px; }
.preza-check-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--adm-text, #e4e8f0);
  cursor: pointer;
}
.preza-check-label input { width: 18px; height: 18px; accent-color: var(--adm-gold, #bfab8a); }

.preza-cfg-slides {
  margin-left: 36px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
  padding: 12px;
  background: var(--adm-surface3, #212c42);
  border-radius: 10px;
  border: 1px solid var(--adm-border, rgba(255,255,255,0.07));
}
.preza-slide-pick {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.75rem;
  color: var(--adm-text, #e4e8f0);
  cursor: pointer;
  padding: 8px 10px;
  background: var(--adm-surface2, #1b2338);
  border-radius: 8px;
  border: 1px solid var(--adm-border, rgba(255,255,255,0.07));
}
.preza-slide-pick--locked {
  cursor: default;
  opacity: 0.55;
}
.preza-slide-pick__pos {
  flex-shrink: 0;
  min-width: 28px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--adm-text3, #5a6a82);
  padding-top: 1px;
}
.preza-slide-pick__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.preza-slide-pick__note {
  font-size: 0.68rem;
  color: var(--adm-text3, #5a6a82);
  font-style: normal;
}
.preza-slide-pick input { margin-top: 2px; flex-shrink: 0; }
.preza-slide-pick strong { font-weight: 600; }
.preza-table-th-num { width: 56px; text-align: center; }
.preza-table-user-count {
  text-align: center;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--adm-text, #e4e8f0);
}

.preza-logo-dual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-left: 36px;
  max-width: 520px;
}
@media (max-width: 600px) {
  .preza-logo-dual { grid-template-columns: 1fr; margin-left: 0; }
}
.preza-logo-slot-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #1d1d1f;
  margin-bottom: 4px;
}
.preza-logo-slot-hint {
  display: block;
  font-size: 0.68rem;
  color: #6e6e73;
  margin-bottom: 10px;
}
.preza-logo-preview-box {
  height: 72px;
  border: 1px dashed #c5d4e8;
  border-radius: 10px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  overflow: hidden;
}
.preza-logo-preview-box img {
  max-width: 100%;
  max-height: 64px;
  object-fit: contain;
}
.preza-logo-preview-empty {
  font-size: 0.72rem;
  color: #6e6e73;
}
.preza-logo-slot-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.preza-btn--sm {
  padding: 8px 14px;
  font-size: 0.75rem;
  width: auto;
}
.preza-logo-dual-note { margin-left: 36px; }

/* ═══ Шаг 7: Системы имплантов ═══ */
.preza-implant-systems-list { display: flex; flex-direction: column; gap: 12px; }
.preza-implant-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--adm-surface2, #1b2338);
  border: 1px solid var(--adm-border, rgba(255,255,255,0.07));
  border-radius: 14px;
  padding: 16px;
  position: relative;
  transition: border-color 0.15s;
}
.preza-implant-row:has(input[name="implant-active"]:checked) {
  border-color: rgba(191,171,138,0.3);
}
.preza-implant-row__check { padding-top: 4px; flex-shrink: 0; }
.preza-implant-row__fields { flex: 1; min-width: 0; }
.preza-implant-fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
}
@media (max-width: 700px) { .preza-implant-fields-grid { grid-template-columns: 1fr; } }
.preza-implant-field--wide { grid-column: 1 / -1; }
.preza-implant-field__label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--adm-text3, #5a6a82);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.preza-implant-input {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 11px;
  border: 1px solid var(--adm-border2, rgba(255,255,255,0.12));
  border-radius: 8px;
  background: var(--adm-surface3, #212c42);
  color: var(--adm-text, #e4e8f0) !important;
  font-family: inherit;
  font-size: 0.82rem;
  -webkit-text-fill-color: var(--adm-text, #e4e8f0);
}
.preza-implant-input:focus {
  outline: none;
  border-color: var(--adm-gold, #bfab8a);
  box-shadow: 0 0 0 2px rgba(191,171,138,0.15);
}
.preza-implant-logo-row { display: flex; gap: 8px; align-items: center; }
.preza-implant-logo-row .preza-implant-input { flex: 1; }
.preza-implant-logo-preview {
  display: block;
  width: 64px;
  height: 32px;
  object-fit: contain;
  margin-top: 6px;
  border-radius: 6px;
  background: var(--adm-surface3, #212c42);
  border: 1px solid var(--adm-border, rgba(255,255,255,0.07));
}
.preza-implant-logo-preview--empty { height: 0; margin: 0; border: none; opacity: 0; pointer-events: none; }
.preza-implant-row__del { position: absolute; top: 10px; right: 10px; }

.sp-logo-row--dual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.sp-logo-block { flex: 1; }
.sp-logo-hint {
  font-size: 0.68rem;
  color: #6e6e73;
  margin: 0 0 8px;
}
.sp-logo-block .sp-btn { margin-top: 6px; margin-right: 6px; }

.preza-admin-top {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 2px solid #d8e2ec;
}

.preza-admin-badge-portal {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gdc-cool-grey);
  background: #e3f2fd;
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 8px;
}

.preza-admin-top h1 {
  font-size: 1.25rem;
  margin: 0 0 6px;
  color: #1a2332;
  font-weight: 700;
}

.preza-admin-top-desc {
  margin: 0;
  font-size: 0.72rem;
  color: #5a6b7d;
  line-height: 1.5;
}
.preza-admin-top-desc code {
  background: #e8eef4;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.68rem;
}
.preza-admin-top-desc a { color: var(--gdc-cool-grey); }

.preza-admin-top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.preza-admin-info {
  background: #fff;
  border: 1px solid #d8e2ec;
  border-left: 4px solid var(--gdc-cool-grey);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 0.75rem;
  line-height: 1.55;
  color: #3d4f5f;
  margin-bottom: 20px;
}
.preza-admin-info a { color: var(--gdc-cool-grey); font-weight: 600; }

.preza-admin-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.preza-admin-card {
  background: #fff;
  border: 1px solid #d8e2ec;
  border-radius: 12px;
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  box-shadow: 0 2px 8px rgba(26, 35, 50, 0.04);
}
.preza-admin-card.inactive { opacity: 0.65; background: #f8fafc; }

.preza-admin-card h3 {
  margin: 0 0 6px;
  font-size: 0.95rem;
  color: #1a2332;
}

.preza-admin-card-meta {
  margin: 0;
  font-size: 0.72rem;
  color: #5a6b7d;
  line-height: 1.45;
}

.preza-status {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  margin-top: 8px;
}
.preza-status--on { background: #e8f8ef; color: #1e8449; }
.preza-status--off { background: #fdecea; color: #c0392b; }

.preza-admin-card-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 150px;
}

.preza-admin-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--adm-text3, #5a6a82);
  font-size: 0.85rem;
  background: var(--adm-surface, #161d2d);
  border-radius: 12px;
  border: 1px dashed var(--adm-border2, rgba(255,255,255,0.12));
}

/* ——— Конфигуратор презентации (полноэкранная панель) ——— */
#preza-admin-configurator {
  background: var(--adm-surface, #161d2d);
  border: 1px solid var(--adm-border, rgba(255,255,255,0.07));
  border-radius: 14px;
  padding: 0;
  box-shadow: 0 4px 24px rgba(0,0,0,0.35);
  overflow: hidden;
}

.preza-cfg-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  background: var(--adm-surface2, #1b2338);
  border-bottom: 1px solid var(--adm-border, rgba(255,255,255,0.07));
}

.preza-cfg-header h2 {
  margin: 0;
  font-size: 1rem;
  color: var(--adm-text, #e4e8f0);
}

.preza-cfg-body {
  padding: 22px;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
}

.preza-cfg-step {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--adm-border, rgba(255,255,255,0.07));
}
.preza-cfg-step:last-of-type { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.preza-cfg-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--adm-gold2, rgba(191,171,138,0.15));
  color: var(--adm-gold, #bfab8a);
  font-size: 0.72rem;
  font-weight: 700;
  margin-right: 10px;
  vertical-align: middle;
}

.preza-cfg-step-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--adm-text, #e4e8f0);
  margin: 0 0 6px;
  display: flex;
  align-items: center;
}

.preza-cfg-step-help {
  font-size: 0.72rem;
  color: var(--adm-text3, #5a6a82);
  margin: 0 0 14px 36px;
  line-height: 1.5;
}

.preza-cfg-field {
  margin-bottom: 14px;
  margin-left: 36px;
}
.preza-cfg-field label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--adm-text2, #8899b0);
  margin-bottom: 6px;
}
.preza-cfg-field input,
.preza-cfg-field select,
.preza-cfg-field textarea {
  width: 100%;
  max-width: 480px;
  padding: 11px 13px;
  border: 1px solid var(--adm-border2, rgba(255,255,255,0.12));
  border-radius: 8px;
  background: var(--adm-surface3, #212c42);
  color: var(--adm-text, #e4e8f0) !important;
  font-size: 0.82rem;
  font-family: inherit;
  -webkit-text-fill-color: var(--adm-text, #e4e8f0);
}
.preza-cfg-field input:focus,
.preza-cfg-field select:focus {
  outline: none;
  border-color: var(--adm-gold, #bfab8a);
  box-shadow: 0 0 0 3px rgba(191,171,138,0.15);
}

.preza-cfg-clinics {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px;
  margin-left: 36px;
  padding: 12px;
  background: var(--adm-surface3, #212c42);
  border-radius: 10px;
  border: 1px solid var(--adm-border, rgba(255,255,255,0.07));
}
.preza-cfg-clinics label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--adm-text, #e4e8f0);
  cursor: pointer;
  padding: 8px 10px;
  background: var(--adm-surface2, #1b2338);
  border-radius: 8px;
  border: 1px solid var(--adm-border, rgba(255,255,255,0.07));
}
.preza-cfg-clinics label:hover { border-color: var(--adm-gold, #bfab8a); }

.preza-users-list {
  margin: 0 0 20px 36px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.preza-users-empty {
  margin: 0;
  padding: 14px 16px;
  background: var(--adm-surface3, #212c42);
  border: 1px dashed var(--adm-border2, rgba(255,255,255,0.12));
  border-radius: 10px;
  font-size: 0.78rem;
  color: var(--adm-text3, #5a6a82);
}

.preza-user-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--adm-surface2, #1b2338);
  border: 1px solid var(--adm-border, rgba(255,255,255,0.07));
  border-radius: 12px;
}
.preza-user-row__fields {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 16px;
  flex: 1;
  min-width: 260px;
}
.preza-user-field {
  flex: 1;
  min-width: 140px;
  max-width: 220px;
}
.preza-user-field label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--adm-text3, #5a6a82);
  margin-bottom: 5px;
}
.preza-user-field input[type="text"],
.preza-user-field input[type="password"] {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--adm-border2, rgba(255,255,255,0.12));
  border-radius: 8px;
  font-size: 0.82rem;
  font-family: inherit;
  color: var(--adm-text, #e4e8f0) !important;
  background: var(--adm-surface3, #212c42);
  box-sizing: border-box;
}
.preza-user-field--pass { min-width: 180px; max-width: 240px; }
.preza-user-pass-wrap {
  display: flex;
  align-items: stretch;
  gap: 0;
}
.preza-user-pass-wrap input {
  flex: 1;
  border-radius: 8px 0 0 8px !important;
  border-right: none !important;
}
.preza-user-pass-toggle {
  flex: 0 0 40px;
  border: 1px solid #c5d4e8;
  border-left: none;
  border-radius: 0 8px 8px 0;
  background: #fff;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
  padding: 0;
}
.preza-user-pass-toggle:hover { background: #eef4fa; }
.preza-user-active {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: #1a2332;
  cursor: pointer;
  padding-bottom: 10px;
  white-space: nowrap;
}
.preza-user-row__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.preza-users-add {
  margin-left: 36px;
  padding: 16px;
  background: #fff;
  border: 1px solid #e8eef4;
  border-radius: 12px;
  max-width: 520px;
}
.preza-users-add__title {
  margin: 0 0 12px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #1a2332;
}
.preza-users-add__row { margin-left: 0 !important; max-width: 100%; }
.preza-users-add .preza-btn { margin-top: 10px; }

.preza-cfg-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  max-width: 480px;
  margin-left: 36px;
}

.preza-cfg-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px 22px;
  background: #f5f8fb;
  border-top: 1px solid #d8e2ec;
}

/* Сеанс завершён (презентация) */
#preza-session-ended {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: linear-gradient(145deg, #0a1628, #1a3d5c);
  font-family: 'Unbounded', system-ui, sans-serif;
  color: #fff;
}
#preza-session-ended .preza-portal-login { height: 100%; max-height: 100dvh; }
#preza-session-ended h1 { color: #ff8a80; text-align: center; }

/* ——— Apple-style: клиники и команды ——— */
.sp-nav {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  margin-bottom: 20px;
}
.sp-nav__item {
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 10px 20px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #6e6e73;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.sp-nav__item--active {
  background: #fff;
  color: #1d1d1f;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.preza-pres-clinic-embed {
  margin: 8px 0 0 36px;
  max-width: 100%;
  color: #1d1d1f;
  overflow: hidden;
  isolation: isolate;
}

.sp-clinic-app { max-width: 1100px; }
.sp-clinic-app--embed {
  max-width: 100%;
  width: 100%;
}
.sp-clinic-app--embed .sp-split {
  grid-template-columns: minmax(168px, 220px) minmax(0, 1fr);
  min-height: 340px;
  max-height: min(68vh, 620px);
  align-items: stretch;
}
.sp-clinic-app--embed .sp-sidebar {
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.sp-clinic-app--embed .sp-branch-list {
  flex: 1;
  min-height: 0;
  max-height: 420px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
.sp-clinic-app--embed .sp-main {
  min-width: 0;
  min-height: 0;
  overflow: auto;
}
.sp-clinic-app--embed .sp-branch-editor {
  min-width: 0;
}
.sp-clinic-app--embed .sp-staff-grid {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.sp-clinic-app--embed .sp-seg {
  flex-wrap: wrap;
}
.sp-clinic-app--embed .sp-seg__btn {
  flex: 1 1 30%;
  min-width: 96px;
}
.sp-clinic-app--embed .sp-branch-editor__head {
  flex-wrap: wrap;
  align-items: stretch;
}
.sp-clinic-app--embed .sp-field--grow {
  min-width: 180px;
}
.sp-toolbar--compact { margin-bottom: 10px; }
.sp-empty--inline {
  padding: 28px 20px;
  text-align: center;
  background: #f5f5f7;
  border-radius: 14px;
}
.sp-empty__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 16px;
}

.sp-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 16px;
}
.sp-toolbar__group { flex: 1; min-width: 200px; }
.sp-toolbar__actions { display: flex; flex-wrap: wrap; gap: 8px; }

.sp-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6e6e73;
  margin-bottom: 6px;
}
.sp-input, .sp-select, .sp-textarea {
  width: 100%;
  font-family: inherit;
  font-size: 0.92rem;
  padding: 12px 14px;
  border: 1px solid #d2d2d7;
  border-radius: 12px;
  background: #fff;
  color: #1d1d1f !important;
  -webkit-text-fill-color: #1d1d1f;
  box-sizing: border-box;
}
.sp-input:focus, .sp-select:focus, .sp-textarea:focus {
  outline: none;
  border-color: var(--gdc-charcoal);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.15);
}
.sp-textarea { resize: vertical; min-height: 80px; }

.sp-btn {
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 980px;
  border: none;
  cursor: pointer;
  transition: transform 0.1s, opacity 0.15s;
}
.sp-btn:active { transform: scale(0.98); }
.sp-btn--primary { background: var(--gdc-gold); color: var(--gdc-charcoal); }
.sp-btn--primary:hover { background: var(--gdc-gold-hover); }
.sp-btn--secondary { background: #fff; color: var(--gdc-charcoal); border: 1px solid #d2d2d7; }
.sp-btn--secondary:hover { background: #f5f5f7; }
.sp-btn--tinted { background: #e8e8ed; color: #1d1d1f; }
.sp-btn--danger-soft { background: #fff; color: #ff3b30; border: 1px solid #ffc9c5; }

.sp-logo-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  background: #fff;
  border-radius: 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.sp-logo-preview {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  background: #f5f5f7;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 0.7rem;
  color: #6e6e73;
}
.sp-logo-preview img { width: 100%; height: 100%; object-fit: contain; }
.sp-logo-title { margin: 0 0 8px; font-size: 0.88rem; font-weight: 600; }

.sp-split {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 16px;
  min-height: 420px;
}
@media (max-width: 768px) {
  .sp-split { grid-template-columns: 1fr; }
}

.sp-sidebar {
  background: #fff;
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.sp-sidebar__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 8px 12px;
}
.sp-sidebar__head h2 { margin: 0; font-size: 0.88rem; font-weight: 600; }
.sp-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--gdc-charcoal);
  color: #fff;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}
.sp-branch-list { list-style: none; margin: 0; padding: 0; }
.sp-branch-item { margin-bottom: 4px; }
.sp-branch-item__btn {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}
.sp-branch-item--active .sp-branch-item__btn,
.sp-branch-item__btn:hover { background: #f5f5f7; }
.sp-branch-item--active .sp-branch-item__btn { background: #e8f4fd; }
.sp-branch-item__title {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: #1d1d1f;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sp-branch-item__meta { display: block; font-size: 0.68rem; color: #6e6e73; margin-top: 2px; }

.sp-main {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.sp-main-placeholder { color: #6e6e73; font-size: 0.88rem; text-align: center; padding: 60px 20px; }

.sp-branch-editor__head {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 16px;
}
.sp-field { margin-bottom: 14px; }
.sp-field--grow { flex: 1; }

.sp-seg {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: #f5f5f7;
  border-radius: 12px;
  margin: 20px 0 16px;
}
.sp-seg__btn {
  flex: 1;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 10px 8px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #6e6e73;
  cursor: pointer;
}
.sp-seg__btn--active {
  background: #fff;
  color: #1d1d1f;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.sp-staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
  width: 100%;
}
.sp-staff-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: #6e6e73;
  font-size: 0.82rem;
  padding: 24px;
  background: #f5f5f7;
  border-radius: 14px;
}

/* Карточки сотрудников в конфигураторе (sp-staff-card в JS) */
.sp-staff-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #f5f5f7;
  border: 1px solid #e8e8ed;
  border-radius: 14px;
  cursor: pointer;
  min-width: 0;
  transition: background 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.sp-staff-card:hover {
  background: #fff;
  border-color: #d2d2d7;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}
.sp-staff-card__photo {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  background: #e8e8ed;
  display: block;
}
.sp-staff-card__photo--empty {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  line-height: 1;
  background: linear-gradient(145deg, #f0f0f5 0%, #e8e8ed 100%);
  border: 1px solid #d2d2d7;
}
.sp-staff-card__body {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.sp-staff-card__name {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: #1d1d1f;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sp-staff-card__role {
  margin: 4px 0 0;
  font-size: 0.72rem;
  color: #6e6e73;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sp-person-card {
  background: #f5f5f7;
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}
.sp-person-card__photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: none;
  padding: 0;
  overflow: hidden;
  background: #e8e8ed;
  cursor: pointer;
}
.sp-person-card__photo img { width: 100%; height: 100%; object-fit: cover; }
.sp-person-card__placeholder { font-size: 0.65rem; color: #6e6e73; line-height: 80px; }
.sp-person-card__name { margin: 0; font-size: 0.82rem; font-weight: 600; color: #1d1d1f; }
.sp-person-card__pos, .sp-person-card__phone { margin: 0; font-size: 0.68rem; color: #6e6e73; }
.sp-person-card__edit {
  font-family: inherit;
  font-size: 0.72rem;
  color: var(--gdc-charcoal);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
}

.sp-add-card {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  border: 2px dashed #d2d2d7;
  border-radius: 16px;
  background: transparent;
  color: var(--gdc-charcoal);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
}
.sp-add-card:hover { background: #f5f5f7; border-color: var(--gdc-charcoal); }
.sp-add-card__plus {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gdc-charcoal);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.sp-empty {
  text-align: center;
  padding: 60px 24px;
  background: #fff;
  border-radius: 20px;
}
.sp-empty__title { font-size: 1.1rem; font-weight: 600; margin: 0 0 8px; }
.sp-empty__text { color: #6e6e73; font-size: 0.88rem; margin: 0 0 20px; }

/* Bottom sheet (карточка сотрудника) */
.sp-sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 200000;
  background: rgba(0, 0, 0, 0);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  transition: background 0.28s ease;
}
.sp-sheet-overlay--visible { background: rgba(0, 0, 0, 0.42); }

.sp-sheet {
  width: 100%;
  max-width: 520px;
  max-height: 92vh;
  background: #fff;
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.15);
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  color: #1d1d1f;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
}
.sp-sheet-overlay--visible .sp-sheet { transform: translateY(0); }

.sp-sheet * { color: inherit; box-sizing: border-box; }
.sp-sheet .sp-input, .sp-sheet .sp-textarea {
  color: #1d1d1f !important;
  background: #f5f5f7 !important;
  border-color: #e8e8ed !important;
}

.sp-sheet__header {
  padding: 16px 20px;
  border-bottom: 1px solid #e8e8ed;
  position: relative;
}
.sp-sheet__header h2 { margin: 0; font-size: 1.05rem; font-weight: 600; text-align: center; padding: 0 40px; }
.sp-sheet__subtitle {
  margin: 6px 0 0;
  text-align: center;
  font-size: 0.75rem;
  color: #6e6e73;
  padding: 0 16px;
}
.sp-sheet__close {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: #f5f5f7;
  font-size: 1.3rem;
  cursor: pointer;
  color: #6e6e73;
}
.sp-sheet__body { padding: 20px; overflow-y: auto; flex: 1; }
.sp-sheet__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 20px 24px;
  border-top: 1px solid #e8e8ed;
  justify-content: flex-end;
}
.sp-sheet__footer .sp-btn--primary { flex: 1; min-width: 120px; }

.sp-sheet-fields { display: flex; flex-direction: column; gap: 14px; }

.sp-sheet-photo { text-align: center; margin-bottom: 22px; }
.sp-sheet-photo__tap {
  display: inline-block;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
}
.sp-sheet-photo__ring {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 112px;
  height: 112px;
  margin: 0 auto;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(145deg, #f5f5f7 0%, #e8e8ed 100%);
  border: 3px solid #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}
.sp-sheet-photo__ring img { width: 100%; height: 100%; object-fit: cover; }
.sp-sheet-photo__empty {
  font-size: 2.2rem;
  color: var(--gdc-charcoal);
  font-weight: 300;
  line-height: 1;
}
.sp-sheet-photo__hint { font-size: 0.72rem; color: #6e6e73; margin: 12px 0 0; }

.sp-add-person {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
  padding: 14px 18px;
  border: none;
  border-radius: 14px;
  background: var(--gdc-charcoal);
  color: #fff;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 113, 227, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.sp-add-person:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 113, 227, 0.35);
}
.sp-add-person:active { transform: scale(0.98); }
.sp-add-person__icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 400;
}

/* ═══════════════════════════════════════════
   Тёмная CRM-оболочка
═══════════════════════════════════════════ */
.preza-admin-app {
  display: grid;
  grid-template-columns: 232px 1fr;
  min-height: 100vh;
  background: var(--adm-bg, #0e1117);
}
@media (max-width: 900px) {
  .preza-admin-app { grid-template-columns: 1fr; }
  .preza-admin-sidebar {
    position: sticky;
    top: 0;
    z-index: 50;
    flex-direction: row !important;
    flex-wrap: wrap;
    padding: 10px 14px !important;
  }
  .preza-admin-sidebar__foot { width: 100%; flex-direction: row !important; }
  .preza-admin-sidebar__brand { display: none !important; }
}

.preza-admin-sidebar {
  background: var(--adm-surface, #161d2d);
  color: var(--adm-text, #e4e8f0);
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  gap: 4px;
  border-right: 1px solid var(--adm-border, rgba(255,255,255,0.07));
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.preza-admin-sidebar__brand {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 8px 20px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--adm-border, rgba(255,255,255,0.07));
}
.preza-admin-sidebar__logo {
  display: block;
  width: 100%;
  max-width: 140px;
  height: auto;
  object-fit: contain;
  opacity: 0.45;
}
.preza-admin-sidebar__title { display: none; }
.preza-admin-sidebar__sub { display: none; }

.preza-admin-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.preza-admin-sidebar__foot {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 10px;
  margin-top: 4px;
  border-top: 1px solid var(--adm-border, rgba(255,255,255,0.07));
}
.preza-admin-nav__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--adm-text2, #8899b0);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.preza-admin-nav__item:hover {
  background: rgba(255,255,255,0.05);
  color: var(--adm-text, #e4e8f0);
}
.preza-admin-nav__item--active {
  background: var(--adm-gold2, rgba(191,171,138,0.15));
  color: var(--adm-gold, #bfab8a);
  box-shadow: inset 3px 0 0 var(--adm-gold, #bfab8a);
}
.preza-admin-nav__item--danger:hover {
  background: rgba(248,113,113,0.12);
  color: #f87171;
}
.preza-admin-nav__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 20px;
  opacity: 0.8;
}
.preza-admin-nav__item--active .preza-admin-nav__icon { opacity: 1; }

/* ─── Основная область ─── */
.preza-admin-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 0 28px 40px;
  background: var(--adm-bg, #0e1117);
}
.preza-admin-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 0 16px;
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(180deg, var(--adm-bg, #0e1117) 80%, transparent);
  border-bottom: 1px solid var(--adm-border, rgba(255,255,255,0.07));
  margin-bottom: 20px;
}
.preza-admin-topbar__titles h1 {
  margin: 0 0 2px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--adm-text, #e4e8f0);
  letter-spacing: -0.02em;
}
.preza-admin-topbar__desc {
  margin: 0;
  font-size: 0.78rem;
  color: var(--adm-text3, #5a6a82);
}
.preza-admin-topbar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.preza-admin-view { flex: 1; min-width: 0; }

/* ─── KPI карточки ─── */
.preza-admin-dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.preza-kpi {
  background: var(--adm-surface, #161d2d);
  border: 1px solid var(--adm-border, rgba(255,255,255,0.07));
  border-radius: 14px;
  padding: 18px 18px 16px;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s;
}
.preza-kpi:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}
.preza-kpi::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--adm-border2, rgba(255,255,255,0.12));
}
.preza-kpi--ok::before { background: var(--adm-green, #22c55e); }
.preza-kpi--warn::before { background: var(--adm-amber, #fbbf24); }
.preza-kpi--info::before { background: var(--adm-blue, #60a5fa); }
.preza-kpi__value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--adm-text, #e4e8f0);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.preza-kpi__label {
  font-size: 0.7rem;
  color: var(--adm-text3, #5a6a82);
  margin-top: 5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.preza-kpi--warn .preza-kpi__value { color: var(--adm-amber, #fbbf24); }
.preza-kpi--ok .preza-kpi__value { color: var(--adm-green, #22c55e); }
.preza-kpi--info .preza-kpi__value { color: var(--adm-blue, #60a5fa); }

/* ─── Чипсы ─── */
.preza-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px 12px;
}
.preza-chip {
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--adm-border2, rgba(255,255,255,0.12));
  background: transparent;
  color: var(--adm-text2, #8899b0);
  cursor: pointer;
  transition: all 0.15s;
}
.preza-chip:hover {
  border-color: var(--adm-gold, #bfab8a);
  color: var(--adm-text, #e4e8f0);
}
.preza-chip--active {
  background: var(--adm-gold2, rgba(191,171,138,0.15));
  border-color: var(--adm-gold, #bfab8a);
  color: var(--adm-gold, #bfab8a);
}

/* ─── Дашборд аналитики ─── */
.adm-analytics {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.adm-kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 12px;
}
.adm-section {
  background: var(--adm-surface, #161d2d);
  border: 1px solid var(--adm-border, rgba(255,255,255,0.07));
  border-radius: 16px;
  overflow: hidden;
}
.adm-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--adm-border, rgba(255,255,255,0.07));
}
.adm-section__title {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--adm-text, #e4e8f0);
  letter-spacing: -0.01em;
}
.adm-section__sub {
  font-size: 0.7rem;
  color: var(--adm-text3, #5a6a82);
  margin-top: 2px;
}
.adm-section__body {
  padding: 16px 20px;
}

/* Горизонтальные бар-чарты */
.adm-bar-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.adm-bar-item {
  display: grid;
  grid-template-columns: 140px 1fr 36px;
  align-items: center;
  gap: 10px;
}
@media (max-width: 600px) {
  .adm-bar-item { grid-template-columns: 90px 1fr 30px; gap: 6px; }
}
.adm-bar-item__label {
  font-size: 0.75rem;
  color: var(--adm-text2, #8899b0);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.adm-bar-item__track {
  height: 7px;
  background: var(--adm-surface3, #212c42);
  border-radius: 6px;
  overflow: hidden;
}
.adm-bar-item__fill {
  height: 100%;
  border-radius: 6px;
  background: var(--adm-gold, #bfab8a);
  transition: width 0.6s cubic-bezier(0.22,1,0.36,1);
}
.adm-bar-item__fill--green { background: var(--adm-green, #22c55e); }
.adm-bar-item__fill--blue  { background: var(--adm-blue, #60a5fa); }
.adm-bar-item__fill--amber { background: var(--adm-amber, #fbbf24); }
.adm-bar-item__fill--red   { background: var(--adm-red, #f87171); }
.adm-bar-item__fill--purple{ background: var(--adm-purple, #a78bfa); }
.adm-bar-item__val {
  font-size: 0.78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--adm-text, #e4e8f0);
  text-align: right;
}

/* Пончик-диаграмма */
.adm-donut-wrap {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: center;
}
@media (max-width: 600px) { .adm-donut-wrap { grid-template-columns: 1fr; } }
.adm-donut-svg { flex-shrink: 0; display: block; }
.adm-donut-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.adm-donut-legend__item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
}
.adm-donut-legend__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.adm-donut-legend__label { color: var(--adm-text2, #8899b0); }
.adm-donut-legend__val {
  margin-left: auto;
  font-weight: 700;
  color: var(--adm-text, #e4e8f0);
  font-variant-numeric: tabular-nums;
}

/* Сетка 2-col */
.adm-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
@media (max-width: 760px) { .adm-grid-2 { grid-template-columns: 1fr; } }

/* Активность (sparkline-полосы) */
.adm-sparkbar-row {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 60px;
}
.adm-sparkbar {
  flex: 1;
  border-radius: 3px 3px 0 0;
  background: var(--adm-gold2, rgba(191,171,138,0.15));
  min-height: 4px;
  transition: background 0.2s;
  cursor: default;
  position: relative;
}
.adm-sparkbar:hover { background: var(--adm-gold, #bfab8a); }
.adm-sparkbar-labels {
  display: flex;
  justify-content: space-between;
  padding-top: 6px;
  font-size: 0.62rem;
  color: var(--adm-text3, #5a6a82);
}

/* Пустой стейт */
.adm-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--adm-text3, #5a6a82);
  font-size: 0.82rem;
}

.preza-table-row { cursor: pointer; }
.preza-table-row:focus-visible { outline: 2px solid var(--gdc-gold); outline-offset: -2px; }
.preza-table-clinic-sub {
  display: block;
  font-size: 0.68rem;
  color: #86868b;
  font-weight: 400;
  margin-top: 2px;
}
.preza-badge-demo {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(191, 171, 138, 0.25);
  color: var(--gdc-charcoal);
  border: 1px solid rgba(191, 171, 138, 0.5);
  margin-left: 6px;
  vertical-align: middle;
}
.preza-table-users {
  font-size: 0.78rem;
  color: #424245;
}
.preza-table-users code {
  font-size: 0.72rem;
  background: #f5f5f7;
  padding: 2px 6px;
  border-radius: 4px;
}

.preza-toast-host {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 300000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-width: min(400px, calc(100vw - 32px));
}
.preza-toast {
  pointer-events: auto;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 0.82rem;
  font-weight: 500;
  color: #fff;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
  animation: preza-toast-in 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}
.preza-toast--success { background: #1e8449; }
.preza-toast--error { background: #c0392b; }
.preza-toast--info { background: var(--gdc-cool-grey); }
@keyframes preza-toast-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.preza-modal-host {
  position: fixed;
  inset: 0;
  z-index: 250000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}
.preza-modal-host--open {
  opacity: 1;
  visibility: visible;
}
.preza-modal {
  width: 100%;
  max-width: 440px;
  background: var(--adm-surface, #161d2d);
  border: 1px solid var(--adm-border2, rgba(255,255,255,0.12));
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  color: var(--adm-text, #e4e8f0);
}
.preza-modal h3 { margin: 0 0 8px; font-size: 1.05rem; color: var(--adm-text, #e4e8f0); }
.preza-modal p { margin: 0 0 16px; font-size: 0.82rem; color: var(--adm-text2, #8899b0); line-height: 1.5; }
.preza-modal__actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

#preza-admin-configurator.preza-admin-view:not(.preza-auth-hidden) {
  display: block;
}
.preza-cfg-shell {
  display: grid;
  grid-template-columns: 210px 1fr;
  min-height: calc(100vh - 48px);
  background: var(--adm-surface, #161d2d);
  border-radius: 16px;
  border: 1px solid var(--adm-border, rgba(255,255,255,0.07));
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}
@media (max-width: 800px) {
  .preza-cfg-shell { grid-template-columns: 1fr; }
  .preza-cfg-nav { display: none; }
}
.preza-cfg-nav {
  background: var(--adm-surface2, #1b2338);
  border-right: 1px solid var(--adm-border, rgba(255,255,255,0.07));
  padding: 16px 12px;
  overflow-y: auto;
}
.preza-cfg-nav__title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6e6e73;
  margin: 0 8px 12px;
}
.preza-cfg-nav__link {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  margin-bottom: 4px;
  border: none;
  border-radius: 10px;
  background: transparent;
  font-family: inherit;
  font-size: 0.78rem;
  color: #424245;
  cursor: pointer;
  transition: background 0.15s;
}
.preza-cfg-nav__link:hover { background: #eef4fa; }
.preza-cfg-nav__link--active {
  background: #e3f2fd;
  color: var(--gdc-cool-grey);
  font-weight: 600;
}
.preza-cfg-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 80px);
}
.preza-cfg-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #f8fafc;
}
.preza-cfg-breadcrumb {
  font-size: 0.72rem;
  color: #6e6e73;
  margin: 0 0 4px;
}
.preza-cfg-breadcrumb strong { color: #1a2332; }
.preza-cfg-body {
  max-height: none;
  flex: 1;
  overflow-y: auto;
}
.preza-cfg-footer {
  position: sticky;
  bottom: 0;
  z-index: 5;
  background: #fff;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
}
.preza-cfg-footer--dirty .preza-cfg-save-hint {
  display: inline;
}
.preza-cfg-save-hint {
  display: none;
  font-size: 0.72rem;
  color: #e67e22;
  margin-right: auto;
  font-weight: 500;
}
.preza-cfg-step {
  scroll-margin-top: 80px;
}
.preza-auth-card--login-v2 { max-width: 420px; }

/* ——— Boot loader (доп. к inline critical) ——— */
.preza-app-loader__ring { box-sizing: border-box; }

/* ——— Админка: полировка ——— */
.preza-auth-hint--soft { opacity: 0.75; font-size: 0.68rem; }
.preza-admin-sidebar__brand {
  flex-direction: column;
  gap: 6px;
}
.preza-admin-sidebar__title {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
  text-align: center;
}
.preza-admin-nav__icon svg { display: block; }
.preza-admin-nav__icon { display: flex; align-items: center; justify-content: center; width: 20px; }
.preza-btn--primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.preza-admin-topbar {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  margin-bottom: 4px;
  backdrop-filter: blur(8px);
}
body.preza-admin-ready .preza-admin-view {
  animation: prezaAdminIn 0.35s ease both;
}
@keyframes prezaAdminIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Skeleton при загрузке данных с сервера */
.preza-admin-skeleton {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}
.preza-admin-skeleton--kpis {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}
.preza-admin-skeleton__card {
  height: 76px;
  border-radius: 14px;
  background: linear-gradient(90deg, #eceef2 0%, #f8f9fb 45%, #eceef2 90%);
  background-size: 200% 100%;
  animation: prezaShimmer 1.2s ease-in-out infinite;
}
.preza-admin-skeleton__panel {
  height: 280px;
  border-radius: 16px;
  background: linear-gradient(90deg, #eceef2 0%, #f8f9fb 45%, #eceef2 90%);
  background-size: 200% 100%;
  animation: prezaShimmer 1.2s ease-in-out infinite;
}
@keyframes prezaShimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
body.preza-admin-data-loading .preza-admin-dashboard:not(:empty),
body.preza-admin-data-loading #preza-admin-presentations-list:not(:empty) {
  opacity: 0.55;
  pointer-events: none;
}

.preza-table-clinic-sub {
  display: block;
  font-size: 0.72rem;
  color: #86868b;
  margin-top: 2px;
  font-weight: 400;
}
.preza-badge-demo {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(191, 171, 138, 0.25);
  color: #8a7355;
  vertical-align: middle;
}
.preza-table-empty {
  text-align: center;
  padding: 48px 24px !important;
  color: #86868b;
  font-size: 0.88rem;
}
.preza-kpi {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.preza-kpi:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}
.preza-table-panel {
  transition: box-shadow 0.2s ease;
}
.preza-table-panel:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
}

/* ═══ Переходы между входом «Презентация» ↔ «Конфигуратор» ═══ */
#preza-auth-root {
  position: relative;
}
.preza-portal-login {
  perspective: 1400px;
  transform-style: preserve-3d;
}
.preza-auth-card--dark {
  transform-style: preserve-3d;
  will-change: transform, opacity, filter;
}

.preza-portal-switch {
  display: flex;
  position: relative;
  margin-top: clamp(12px, 2vh, 18px);
  padding: 4px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(191, 171, 138, 0.28);
  gap: 0;
}
.preza-portal-switch__glow {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(191, 171, 138, 0.42), rgba(191, 171, 138, 0.12));
  border: 1px solid rgba(191, 171, 138, 0.45);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: transform 0.45s cubic-bezier(0.34, 1.25, 0.64, 1);
  pointer-events: none;
}
body.preza-admin-page .preza-portal-switch__glow,
.preza-portal-switch--admin .preza-portal-switch__glow {
  transform: translateX(100%);
}
.preza-portal-switch__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 52px;
  padding: 6px 4px;
  border-radius: 10px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-align: center;
  transition: color 0.25s ease, transform 0.2s ease;
  z-index: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.preza-portal-switch__item:hover:not(.preza-portal-switch__item--active) {
  color: rgba(255, 255, 255, 0.88);
  transform: translateY(-1px);
}
.preza-portal-switch__item--active {
  color: #fff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}
.preza-portal-switch__icon {
  display: block;
  opacity: 0.85;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.preza-portal-switch__item--active .preza-portal-switch__icon {
  opacity: 1;
  transform: scale(1.08);
}

/* Занавес перехода */
.preza-portal-transition-curtain {
  position: fixed;
  inset: 0;
  z-index: 100002;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  background: radial-gradient(ellipse 80% 60% at 50% 50%, rgba(191, 171, 138, 0.18) 0%, rgba(7, 25, 57, 0.98) 65%);
}
.preza-portal-transition-curtain__ring {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid rgba(191, 171, 138, 0.25);
  border-top-color: var(--gdc-gold);
  margin: 0 auto 20px;
  opacity: 0;
}
.preza-portal-transition-curtain__text {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  text-align: center;
  letter-spacing: 0.02em;
  opacity: 0;
  transform: translateY(12px);
  max-width: 280px;
  padding: 0 20px;
}

/* —— Выход —— */
html.preza-portal-exit--admin #preza-auth-root.preza-portal-exiting .preza-portal-login,
html.preza-portal-exit--staff #preza-auth-root.preza-portal-exiting .preza-portal-login {
  animation: prezaPortalBgZoomOut 0.62s cubic-bezier(0.55, 0, 1, 0.45) forwards;
}
html.preza-portal-exit--admin #preza-auth-root.preza-portal-exiting .preza-auth-card {
  animation: prezaPortalCardExitLeft 0.62s cubic-bezier(0.55, 0, 1, 0.45) forwards;
}
html.preza-portal-exit--staff #preza-auth-root.preza-portal-exiting .preza-auth-card {
  animation: prezaPortalCardExitRight 0.62s cubic-bezier(0.55, 0, 1, 0.45) forwards;
}
html.preza-portal-exit--admin #preza-auth-root.preza-portal-exiting .preza-portal-transition-curtain,
html.preza-portal-exit--staff #preza-auth-root.preza-portal-exiting .preza-portal-transition-curtain {
  opacity: 1;
  visibility: visible;
  animation: prezaPortalCurtainIn 0.62s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
html.preza-portal-exit--admin #preza-auth-root.preza-portal-exiting .preza-portal-transition-curtain__ring,
html.preza-portal-exit--staff #preza-auth-root.preza-portal-exiting .preza-portal-transition-curtain__ring {
  animation: prezaPortalRingSpin 0.62s linear forwards, prezaPortalFadeIn 0.35s ease forwards;
}
html.preza-portal-exit--admin #preza-auth-root.preza-portal-exiting .preza-portal-transition-curtain__text,
html.preza-portal-exit--staff #preza-auth-root.preza-portal-exiting .preza-portal-transition-curtain__text {
  animation: prezaPortalTextRise 0.5s 0.12s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* —— Вход —— */
html.preza-portal-enter--admin #preza-auth-root,
html.preza-portal-enter--staff #preza-auth-root {
  animation: none !important;
}
html.preza-portal-enter--admin #preza-auth-root > .preza-portal-login,
html.preza-portal-enter--staff #preza-auth-root > .preza-portal-login {
  animation: none !important;
}
html.preza-portal-enter--admin #preza-auth-root.preza-portal-entering .preza-portal-login {
  animation: prezaPortalBgZoomIn 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}
html.preza-portal-enter--staff #preza-auth-root.preza-portal-entering .preza-portal-login {
  animation: prezaPortalBgZoomIn 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}
html.preza-portal-enter--admin #preza-auth-root.preza-portal-entering .preza-auth-card {
  animation: prezaPortalCardEnterRight 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}
html.preza-portal-enter--staff #preza-auth-root.preza-portal-entering .preza-auth-card {
  animation: prezaPortalCardEnterLeft 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}
html.preza-portal-enter--admin #preza-auth-root.preza-portal-entering .preza-auth-logo,
html.preza-portal-enter--staff #preza-auth-root.preza-portal-entering .preza-auth-logo {
  animation: prezaPortalStagger 0.65s 0.15s cubic-bezier(0.22, 1, 0.36, 1) both;
}
html.preza-portal-enter--admin #preza-auth-root.preza-portal-entering h1,
html.preza-portal-enter--staff #preza-auth-root.preza-portal-entering h1 {
  animation: prezaPortalStagger 0.65s 0.22s cubic-bezier(0.22, 1, 0.36, 1) both;
}
html.preza-portal-enter--admin #preza-auth-root.preza-portal-entering .preza-auth-sub,
html.preza-portal-enter--staff #preza-auth-root.preza-portal-entering .preza-auth-sub {
  animation: prezaPortalStagger 0.65s 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}
html.preza-portal-enter--admin #preza-auth-root.preza-portal-entering .preza-login-form--admin,
html.preza-portal-enter--staff #preza-auth-root.preza-portal-entering .preza-login-form--admin {
  animation: prezaPortalStagger 0.65s 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
}
html.preza-portal-enter--admin #preza-auth-root.preza-portal-entering .preza-portal-switch,
html.preza-portal-enter--staff #preza-auth-root.preza-portal-entering .preza-portal-switch {
  animation: prezaPortalStagger 0.65s 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes prezaPortalCardExitLeft {
  to { opacity: 0; transform: translateX(-72px) scale(0.9) rotateY(14deg); filter: blur(6px); }
}
@keyframes prezaPortalCardExitRight {
  to { opacity: 0; transform: translateX(72px) scale(0.9) rotateY(-14deg); filter: blur(6px); }
}
@keyframes prezaPortalCardEnterRight {
  from { opacity: 0; transform: translateX(80px) scale(0.88) rotateY(-16deg); filter: blur(8px); }
  to { opacity: 1; transform: none; filter: none; }
}
@keyframes prezaPortalCardEnterLeft {
  from { opacity: 0; transform: translateX(-80px) scale(0.88) rotateY(16deg); filter: blur(8px); }
  to { opacity: 1; transform: none; filter: none; }
}
@keyframes prezaPortalBgZoomOut {
  to { transform: scale(1.06); filter: brightness(0.75); }
}
@keyframes prezaPortalBgZoomIn {
  from { transform: scale(1.05); filter: brightness(0.8); }
  to { transform: none; filter: none; }
}
@keyframes prezaPortalCurtainIn {
  from { opacity: 0; }
  15% { opacity: 1; }
  to { opacity: 1; }
}
@keyframes prezaPortalRingSpin {
  to { transform: rotate(360deg); opacity: 1; }
}
@keyframes prezaPortalFadeIn {
  to { opacity: 1; }
}
@keyframes prezaPortalTextRise {
  to { opacity: 1; transform: none; }
}
@keyframes prezaPortalStagger {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .preza-portal-switch__glow,
  .preza-auth-card--dark,
  .preza-portal-login,
  .preza-portal-transition-curtain,
  .preza-portal-transition-curtain__ring,
  .preza-portal-transition-curtain__text {
    animation: none !important;
    transition: none !important;
  }
}