/* =========================================
   PORTAL - Вход в систему
   ========================================= */

.portal-body { background: linear-gradient(180deg, var(--production-surface-muted) 0, var(--production-canvas) 360px); }

.portal-shell {
  display: flex;
  flex-direction: column;
  gap: 40px;
  min-height: 100vh;
  max-width: 1440px;
  margin: 0 auto;
  padding: 64px var(--production-gutter) 48px;
}
.portal-main { display: grid; gap: 40px; }

.portal-hero { max-width: 760px; }

.portal-brand { display: flex; align-items: center; gap: var(--production-space-2); margin-bottom: var(--production-space-5); color: var(--production-ink); font-size: var(--production-text-sm); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.portal-brand__mark { width: 28px; height: 28px; border-radius: var(--production-radius-sm); }
.portal-title { max-width: 22ch; font-size: var(--production-text-3xl); font-weight: 650; letter-spacing: -0.02em; line-height: 1.25; }
.portal-lead { max-width: 56ch; margin-top: var(--production-space-4); color: var(--production-muted); font-size: var(--production-text-md); line-height: 1.55; }

.portal-roles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--production-space-4); }

.portal-role {
  display: flex;
  flex-direction: column;
  gap: var(--production-space-3);
  min-height: 196px;
  padding: var(--production-space-5);
  color: var(--production-ink);
  text-decoration: none;
  background: var(--production-panel);
  border: 1px solid var(--production-line);
  border-radius: var(--production-radius-md);
  box-shadow: var(--production-shadow);
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.portal-role::before { content: ""; width: var(--production-space-6); height: 2px; background: var(--production-accent-line-strong); transition: background 0.15s ease; }
.portal-role:not(.portal-role--disabled):hover { transform: translateY(-2px); background: var(--production-surface-sunken); border-color: var(--production-accent-line-strong); }
.portal-role:not(.portal-role--disabled):hover::before { background: var(--production-accent); }
.portal-role:focus-visible { outline: 2px solid var(--production-accent); outline-offset: 2px; }

.portal-role__top { display: flex; align-items: baseline; justify-content: space-between; gap: var(--production-space-3); }
.portal-role__number { color: var(--production-muted); font-size: var(--production-text-2xl); font-weight: 650; font-variant-numeric: tabular-nums; line-height: 1; }
.portal-role__purpose { color: var(--production-muted); font-size: var(--production-text-xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.portal-role__title { font-size: var(--production-text-xl); font-weight: 650; letter-spacing: -0.01em; line-height: 1.25; }
.portal-role__description { max-width: 40ch; color: var(--production-muted); font-size: var(--production-text-base); line-height: 1.55; }
.portal-role__foot { display: flex; align-items: center; gap: var(--production-space-2); margin-top: auto; color: var(--production-accent); font-size: var(--production-text-sm); font-weight: 600; }
.portal-role__arrow { transition: transform 0.15s ease; }
.portal-role:not(.portal-role--disabled):hover .portal-role__arrow { transform: translateX(var(--production-space-1)); }

.portal-role--disabled { background: var(--production-surface-sunken); border-color: var(--production-line-strong); box-shadow: none; }
.portal-role--disabled:hover { transform: none; background: var(--production-surface-sunken); border-color: var(--production-line-strong); }
.portal-role--disabled::before { background: var(--production-line-strong); }
.portal-role--disabled .portal-role__title { color: var(--production-muted); }

.portal-footnote { max-width: 72ch; padding-top: var(--production-space-5); border-top: 1px solid var(--production-line); color: var(--production-muted); font-size: var(--production-text-sm); line-height: 1.55; }

@media (max-width: 900px) {
  .portal-shell { padding-top: var(--production-space-6); }
  .portal-roles { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .portal-role { min-height: 0; padding: var(--production-space-4); }
  .portal-title { max-width: none; font-size: var(--production-text-2xl); }
}
@media (max-width: 520px) {
  .portal-shell { gap: var(--production-space-5); padding: var(--production-space-5) var(--production-space-4) var(--production-space-6); }
  .portal-role { padding: var(--production-space-4); }
  .portal-role__description { max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  .portal-role, .portal-role::before, .portal-role__arrow { transition: none; }
}