:root {
  --ac-bg: #06080f;
  --ac-surface: rgba(18, 22, 34, 0.72);
  --ac-line: rgba(120, 170, 255, 0.14);
  --ac-text: #f0f3fa;
  --ac-muted: #8f9bb8;
  --ac-a1: #ff4d2e;
  --ac-a2: #a855f7;
  --ac-a3: #22d3ee;
  --ac-a4: #3b82f6;
  --ac-radius: 16px;
  --ac-font: "Outfit", system-ui, sans-serif;
  --ac-wait-card-bg: linear-gradient(155deg, rgba(22, 28, 44, 0.88) 0%, rgba(10, 14, 24, 0.94) 100%);
  --ac-wait-card-shade: 0 24px 56px rgba(0, 0, 0, 0.45);
  --ac-wait-card-inset: 0 1px 0 rgba(255, 255, 255, 0.06) inset;
  --ac-wait-icon-bg: linear-gradient(145deg, rgba(59, 130, 246, 0.2), rgba(34, 211, 238, 0.12));
  --ac-wait-icon-border: rgba(120, 170, 255, 0.28);
  --ac-wait-icon-color: #bae6fd;
  --ac-wait-icon-shadow: 0 8px 28px rgba(34, 211, 238, 0.12);
  --ac-wait-badge-text: rgba(186, 230, 253, 0.95);
  --ac-wait-badge-bg: rgba(59, 130, 246, 0.18);
  --ac-wait-badge-border: rgba(59, 130, 246, 0.35);
  --ac-wait-list-muted: rgba(180, 195, 220, 0.92);
  --ac-wait-check: rgba(52, 211, 153, 0.9);
  --ac-wait-foot: rgba(148, 163, 184, 0.85);
}

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

html { scroll-behavior: smooth; }

body.ac-page {
  margin: 0;
  font-family: var(--ac-font);
  background: var(--ac-bg);
  color: var(--ac-text);
  min-height: 100vh;
}

.ac-mesh {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 100% 80% at 10% -10%, rgba(255, 77, 46, 0.18), transparent 50%),
    radial-gradient(ellipse 80% 60% at 90% 10%, rgba(34, 211, 238, 0.12), transparent 45%),
    radial-gradient(ellipse 60% 50% at 50% 100%, rgba(168, 85, 247, 0.1), transparent 40%),
    var(--ac-bg);
  z-index: -2;
}

.ac-grid-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
  z-index: -1;
}

.ac-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  border-bottom: 1px solid var(--ac-line);
  background: rgba(6, 8, 15, 0.75);
  backdrop-filter: blur(14px);
}

.ac-nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.ac-nav-brand img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(34, 211, 238, 0.35));
}

.ac-nav-brand span {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  background: linear-gradient(105deg, var(--ac-a1), var(--ac-a2), var(--ac-a3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.ac-nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ac-nav-links a {
  color: var(--ac-muted);
  text-decoration: none;
  font-size: 0.92rem;
  padding: 8px 14px;
  border-radius: 999px;
  transition: color 0.15s, background 0.15s;
}

.ac-nav-links a:hover {
  color: var(--ac-text);
  background: rgba(59, 130, 246, 0.1);
}

.ac-hero {
  max-width: 1120px;
  margin: 0 auto;
  padding: 72px 28px 56px;
  text-align: center;
}

.ac-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ac-a3);
  border: 1px solid rgba(34, 211, 238, 0.35);
  background: rgba(34, 211, 238, 0.06);
  margin-bottom: 22px;
}

.ac-hero h1 {
  margin: 0 0 20px;
  font-size: clamp(2.1rem, 5vw, 3.35rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.ac-hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--ac-a1), var(--ac-a2) 45%, var(--ac-a3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.ac-hero-lead {
  margin: 0 auto 32px;
  max-width: 560px;
  font-size: 1.08rem;
  line-height: 1.65;
  color: var(--ac-muted);
}

.ac-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.ac-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--ac-line);
  background: var(--ac-surface);
  color: var(--ac-text);
  text-decoration: none;
  transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s;
}

.ac-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(34, 211, 238, 0.35);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.ac-btn-primary {
  border: none;
  background: linear-gradient(135deg, rgba(255, 77, 46, 0.95), rgba(168, 85, 247, 0.85), rgba(34, 211, 238, 0.75));
  background-size: 160% 160%;
  box-shadow: 0 8px 32px rgba(168, 85, 247, 0.25);
}

.ac-btn-primary:hover {
  box-shadow: 0 14px 48px rgba(34, 211, 238, 0.2);
}

.ac-section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 56px 28px;
}

.ac-section h2 {
  margin: 0 0 10px;
  font-size: 1.65rem;
  letter-spacing: -0.02em;
}

.ac-section-desc {
  margin: 0 0 36px;
  color: var(--ac-muted);
  max-width: 560px;
  line-height: 1.6;
}

.ac-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.ac-card {
  padding: 24px;
  border-radius: var(--ac-radius);
  border: 1px solid var(--ac-line);
  background: var(--ac-surface);
  backdrop-filter: blur(10px);
  transition: border-color 0.15s;
}

.ac-card:hover {
  border-color: rgba(168, 85, 247, 0.35);
}

.ac-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 14px;
  background: linear-gradient(145deg, rgba(255, 77, 46, 0.2), rgba(34, 211, 238, 0.15));
}

.ac-card h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
}

.ac-card p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--ac-muted);
}

.ac-stats-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-top: 48px;
  padding: 28px;
  border-radius: var(--ac-radius);
  border: 1px solid var(--ac-line);
  background: rgba(12, 16, 28, 0.6);
}

.ac-stats-strip div {
  text-align: center;
}

.ac-stats-strip strong {
  display: block;
  font-size: 1.5rem;
  background: linear-gradient(90deg, var(--ac-a3), var(--ac-a4));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.ac-stats-strip span {
  font-size: 0.8rem;
  color: var(--ac-muted);
}

.ac-footer {
  margin-top: 40px;
  padding: 28px;
  border-top: 1px solid var(--ac-line);
  text-align: center;
  color: var(--ac-muted);
  font-size: 0.85rem;
}

.ac-login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.ac-login-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 380px;
  padding: 40px 32px;
  border-radius: var(--ac-radius);
  border: 1px solid var(--ac-line);
  background: var(--ac-surface);
  backdrop-filter: blur(12px);
  text-align: center;
}

.ac-login-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  margin-bottom: 16px;
}

.ac-login-title {
  margin: 0 0 6px;
  font-size: 1.5rem;
}

.ac-login-title-register {
  margin: 0 0 10px;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  background: linear-gradient(
    120deg,
    #fecdd3 0%,
    #fb923c 22%,
    #f472b6 48%,
    #a855f7 72%,
    #22d3ee 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 20px rgba(168, 85, 247, 0.22));
}

.ac-login-title-register::after {
  content: '';
  display: block;
  width: 56px;
  height: 3px;
  margin: 14px auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 77, 46, 0.95), rgba(168, 85, 247, 0.9), rgba(34, 211, 238, 0.85));
  opacity: 0.9;
}

.ac-login-sub {
  margin: 0 0 24px;
  color: var(--ac-muted);
  font-size: 0.92rem;
}

.ac-login-err {
  color: #f87171;
  font-size: 0.88rem;
  margin: 0 0 16px;
}

.ac-login-info {
  color: #93c5fd;
  font-size: 0.88rem;
  line-height: 1.45;
  margin: 0 0 16px;
  text-align: left;
}

.ac-btn-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 600;
  color: #1f2937;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.ac-btn-google:hover {
  background: #f8fafc;
  color: #111827;
}

.ac-btn-google::before {
  content: '';
  width: 18px;
  height: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath fill='%23FFC107' d='M43.611 20.083H42V20H24v8h11.303c-1.649 4.657-6.08 8-11.303 8-6.627 0-12-5.373-12-12s5.373-12 12-12c3.059 0 5.842 1.154 7.961 3.039l5.657-5.657C34.046 6.053 29.268 4 24 4 12.955 4 4 12.955 4 24s8.955 20 20 20 20-8.955 20-20c0-1.341-.138-2.65-.389-3.917z'/%3E%3Cpath fill='%23FF3D00' d='m6.306 14.691 6.571 4.819C14.655 15.108 18.961 12 24 12c3.059 0 5.842 1.154 7.961 3.039l5.657-5.657C34.046 6.053 29.268 4 24 4 16.318 4 9.656 8.337 6.306 14.691z'/%3E%3Cpath fill='%234CAF50' d='M24 44c5.166 0 9.86-1.977 13.409-5.192l-6.19-5.238A11.91 11.91 0 0 1 24 36c-5.202 0-9.619-3.317-11.283-7.946l-6.522 5.025C9.505 39.556 16.227 44 24 44z'/%3E%3Cpath fill='%231976D2' d='M43.611 20.083H42V20H24v8h11.303a12.04 12.04 0 0 1-4.087 5.571l.003-.002 6.19 5.238C36.971 39.205 44 34 44 24c0-1.341-.138-2.65-.389-3.917z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.ac-login-or {
  margin: 18px 0 6px;
  font-size: 0.8rem;
  color: var(--ac-muted);
  text-align: center;
  position: relative;
}

.ac-login-or span {
  position: relative;
  z-index: 1;
  padding: 0 10px;
  background: var(--ac-surface);
}

.ac-login-or::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.ac-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--ac-line);
  background: rgba(6, 8, 15, 0.6);
  color: var(--ac-text);
  font-family: inherit;
  font-size: 1rem;
  margin-bottom: 14px;
}

.ac-input:focus {
  outline: none;
  border-color: rgba(34, 211, 238, 0.5);
}

.ac-login-field-label {
  display: block;
  margin: 0 0 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ac-muted);
}

.ac-input-select {
  cursor: pointer;
}

.ac-btn-block { width: 100%; }

.ac-login-form { text-align: left; }

.ac-link-back {
  display: inline-block;
  margin-top: 20px;
  color: var(--ac-muted);
  font-size: 0.88rem;
}

.ac-link-back:hover { color: var(--ac-a3); }

.ac-login-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.9rem;
}

.ac-login-footer a {
  text-decoration: none;
  transition: color 0.15s ease, opacity 0.15s ease;
}

.ac-login-footer-primary {
  color: rgba(165, 243, 252, 0.92);
  font-weight: 600;
}

.ac-login-footer-primary:hover {
  color: #fff;
}

.ac-login-footer-secondary {
  color: var(--ac-muted);
  font-weight: 500;
}

.ac-login-footer-secondary:hover {
  color: rgba(226, 232, 240, 0.88);
}

.ac-login-footer-back {
  margin-right: 0.25em;
  opacity: 0.75;
}

.ac-login-footer-sep {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.45);
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .ac-nav {
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px max(16px, env(safe-area-inset-left)) 12px max(16px, env(safe-area-inset-right));
  }

  .ac-nav-links {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .ac-home {
    padding: max(28px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-left)) max(40px, env(safe-area-inset-bottom))
      max(18px, env(safe-area-inset-right));
  }

  .ac-home-cta {
    width: 100%;
    max-width: 320px;
    justify-content: center;
    min-height: 48px;
  }

  .ac-login-wrap {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    padding: max(24px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-left)) max(32px, env(safe-area-inset-bottom))
      max(18px, env(safe-area-inset-right));
    box-sizing: border-box;
  }

  .ac-login-form .ac-input,
  .ac-login-form .ac-btn-block {
    min-height: 48px;
    font-size: 16px;
  }

  .ac-theme-wrap--corner {
    top: max(12px, env(safe-area-inset-top));
    right: max(12px, env(safe-area-inset-right));
  }
}

/* —— Minimal home (index) —— */
.ac-page-home {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.ac-pointer-particles {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  display: block;
}

.ac-home {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px 56px;
  text-align: center;
}

.ac-home-logo {
  width: clamp(72px, 18vw, 104px);
  height: clamp(72px, 18vw, 104px);
  object-fit: contain;
  margin-bottom: 4px;
  opacity: 0;
  transform: translateY(22px) scale(0.9);
  filter: blur(10px);
  animation: ac-home-logo-in 1.05s cubic-bezier(0.22, 1, 0.36, 1) 0.06s forwards;
}

.ac-home-title {
  margin: 0 0 32px;
  font-size: clamp(1.85rem, 6vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.12;
  max-width: 20ch;
}

.ac-home-title-inner {
  display: inline-block;
  background: linear-gradient(115deg, #ffffff, #e0e7ff 32%, #f0abfc 58%, #22d3ee 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  opacity: 0;
  transform: translateY(32px) scale(0.94);
  filter: blur(14px);
  animation: ac-home-reveal 1.15s cubic-bezier(0.22, 1, 0.36, 1) 0.18s forwards;
}

.ac-home-cta {
  opacity: 0;
  transform: translateY(18px);
  filter: blur(8px);
  padding: 16px 36px;
  font-size: 1.02rem;
  font-weight: 600;
  border-radius: 999px;
  animation: ac-home-reveal 0.95s cubic-bezier(0.22, 1, 0.36, 1) 0.42s forwards;
}

.ac-home-footer {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  margin-top: auto;
  text-align: center;
  padding: 20px 16px 28px;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: rgba(148, 163, 184, 0.88);
}

@keyframes ac-home-reveal {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes ac-home-logo-in {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: drop-shadow(0 10px 32px rgba(168, 85, 247, 0.4));
  }
}

/* —— Ожидание назначения в отдел —— */
.ac-wait-dept-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px 16px;
}

.ac-wait-dept-shell {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}

.ac-wait-dept-card {
  position: relative;
  padding: 2rem 1.75rem 1.75rem;
  border-radius: var(--ac-radius);
  border: 1px solid var(--ac-line);
  background: var(--ac-wait-card-bg);
  box-shadow: var(--ac-wait-card-inset), var(--ac-wait-card-shade);
  text-align: center;
  overflow: hidden;
}

.ac-wait-dept-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--ac-a1), var(--ac-a4), var(--ac-a3));
  opacity: 0.95;
}

.ac-wait-dept-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  font-size: 1.85rem;
  background: var(--ac-wait-icon-bg);
  border: 1px solid var(--ac-wait-icon-border);
  color: var(--ac-wait-icon-color);
  box-shadow: var(--ac-wait-icon-shadow);
}

.ac-wait-dept-badge {
  display: inline-block;
  margin: 0 0 0.65rem;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ac-wait-badge-text);
  background: var(--ac-wait-badge-bg);
  border: 1px solid var(--ac-wait-badge-border);
}

.ac-wait-dept-title {
  margin: 0 0 0.85rem;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.2;
  color: var(--ac-text);
}

.ac-wait-dept-lead {
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ac-muted);
  text-align: left;
}

.ac-wait-dept-lead strong {
  color: var(--ac-text);
  font-weight: 600;
}

.ac-wait-dept-list {
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
  text-align: left;
}

.ac-wait-dept-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin-bottom: 0.65rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--ac-wait-list-muted);
}

.ac-wait-dept-list li:last-child {
  margin-bottom: 0;
}

.ac-wait-dept-list .fa-circle-check {
  margin-top: 0.15rem;
  flex-shrink: 0;
  color: var(--ac-wait-check);
  font-size: 0.85rem;
}

.ac-wait-dept-out {
  text-decoration: none;
  margin-top: 0.25rem;
  font-weight: 600;
}

.ac-wait-dept-foot {
  margin: 1.25rem 0 0;
  text-align: center;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--ac-wait-foot);
}

@media (prefers-reduced-motion: reduce) {
  .ac-home-logo {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: drop-shadow(0 10px 32px rgba(168, 85, 247, 0.4)) !important;
  }

  .ac-home-title-inner,
  .ac-home-cta {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}
