/**
 * Клиентский портал online.* — рамка телефона и мобильный shell.
 */

.client-portal-host {
  min-height: 100vh;
  background: linear-gradient(160deg, #0f172a 0%, #1e293b 45%, #334155 100%);
}

.client-portal-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding: 0.5rem 1rem;
  background: rgba(15, 23, 42, 0.92);
  color: #e2e8f0;
  font-size: 0.8rem;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.client-portal-toolbar__badge {
  background: #1e3a5f;
  color: #fff;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
}

.client-portal-toolbar__host {
  opacity: 0.85;
  font-family: ui-monospace, monospace;
}

.client-portal-toolbar__btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: inherit;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: inherit;
}

.client-portal-toolbar__btn[aria-pressed="false"] {
  opacity: 0.6;
}

.client-portal-toolbar__link {
  color: #93c5fd;
  text-decoration: none;
}

.client-portal-toolbar__link--crm {
  margin-left: auto;
  color: #fcd34d;
}

.client-portal-device {
  width: min(390px, calc(100vw - 2rem));
  margin: 1rem auto 0.5rem;
  background: #111;
  border-radius: 2.25rem;
  padding: 0.65rem;
  box-shadow:
    0 0 0 2px #333,
    0 24px 48px rgba(0, 0, 0, 0.45);
  position: relative;
}

.client-portal-host.client-portal-preview--off .client-portal-device {
  width: 100%;
  max-width: 100%;
  margin: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  background: transparent;
}

.client-portal-host.client-portal-preview--off .client-portal-device__notch,
.client-portal-host.client-portal-preview--off .client-portal-device__home {
  display: none;
}

.client-portal-device__notch {
  width: 120px;
  height: 22px;
  background: #111;
  border-radius: 0 0 14px 14px;
  margin: -0.35rem auto 0.25rem;
  position: relative;
  z-index: 2;
}

.client-portal-device__screen {
  background: hsl(var(--background, 0 0% 100%));
  border-radius: 1.75rem;
  overflow: hidden;
  min-height: min(720px, calc(100vh - 8rem));
  max-height: calc(100vh - 7rem);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.client-portal-host.client-portal-preview--off .client-portal-device__screen {
  border-radius: 0;
  min-height: calc(100vh - 2.5rem);
  max-height: none;
}

.client-portal-device__home {
  width: 36px;
  height: 4px;
  background: #444;
  border-radius: 2px;
  margin: 0.5rem auto 0.15rem;
}

.client-portal-shell.auth-shell {
  display: block;
  min-height: 0;
}

.client-portal-shell .auth-hero {
  display: none !important;
}

.client-portal-panel.auth-panel {
  width: 100%;
  max-width: none;
  min-height: 0;
  padding: 0;
}

.client-portal-panel .auth-panel-inner {
  padding: 1rem 1rem 1.5rem;
}

.client-portal-hint {
  text-align: center;
  color: #94a3b8;
  font-size: 0.75rem;
  margin: 0.5rem 1rem 1.5rem;
}

.client-portal-hint code {
  background: rgba(0, 0, 0, 0.25);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.client-portal-404 {
  padding: 2rem 1.25rem;
  text-align: center;
}

.client-portal-404 h1 {
  font-size: 2.5rem;
  margin: 0 0 0.5rem;
}

@media (max-width: 480px) {
  .client-portal-toolbar__host {
    display: none;
  }
  .client-portal-device {
    width: 100%;
    margin: 0;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
  }
  .client-portal-device__notch,
  .client-portal-device__home {
    display: none;
  }
  .client-portal-device__screen {
    border-radius: 0;
    min-height: calc(100vh - 2.5rem);
    max-height: none;
  }
}
