/*
 * Экраны входа: кабинет, команда, приглашение, тестовая касса.
 * Слева — брендовая панель (свечение, сетка, зерно, стеклянные карточки),
 * справа — форма на стеклянной карточке с градиентной обводкой.
 * Палитра — ERP: почти чёрный, белая главная кнопка; бирюза из знака
 * WebStead — единственный цветной акцент.
 */
:root {
    --bg: #08090b;
    --bg-2: #0d0e11;
    --panel: rgba(22, 23, 27, .72);
    --field: rgba(9, 10, 12, .7);
    --line: rgba(255, 255, 255, .08);
    --line-2: rgba(255, 255, 255, .14);
    --text: #f5f5f6;
    --text-2: #a7a9b0;
    --text-3: #6f727a;
    --teal: #00fcd7;
    --indigo: #6366f1;
    --ok: #3fb27f;
    --bad: #f26363;
    --warn: #e0a33c;
    --display: 'Inter Tight', 'Inter', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body.auth {
    background: var(--bg); color: var(--text);
    font: 15px/1.55 'Inter', -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.material-icons-round { font-size: 20px; line-height: 1; }

/* Плёночное зерно поверх всего — убирает «пластик» с градиентов. */
body.auth::after {
    content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .05;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.auth-shell { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(460px, .92fr); min-height: 100vh; }

/* ═══ Левая панель ═══════════════════════════════════════════════════ */
.auth-art {
    position: relative; overflow: hidden; display: flex; flex-direction: column;
    padding: 44px 56px; border-right: 1px solid var(--line);
    background: radial-gradient(120% 90% at 0% 0%, #121318 0%, var(--bg) 60%);
}
.art-glow {
    position: absolute; inset: -25%; pointer-events: none; filter: blur(30px);
    background:
        radial-gradient(32% 28% at 28% 34%, rgba(0, 252, 215, .20), transparent 70%),
        radial-gradient(30% 26% at 72% 68%, rgba(99, 102, 241, .18), transparent 72%),
        radial-gradient(22% 20% at 80% 18%, rgba(0, 252, 215, .08), transparent 70%);
    animation: drift 22s ease-in-out infinite alternate;
}
.auth--console .art-glow {
    background:
        radial-gradient(30% 26% at 30% 60%, rgba(99, 102, 241, .22), transparent 70%),
        radial-gradient(26% 24% at 72% 28%, rgba(0, 252, 215, .12), transparent 70%);
}
@keyframes drift {
    0% { transform: translate3d(0, 0, 0) rotate(0deg); }
    100% { transform: translate3d(4%, -3%, 0) rotate(8deg); }
}
.art-grid {
    position: absolute; inset: 0; pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 75% 65% at 45% 50%, #000 20%, transparent 78%);
    -webkit-mask-image: radial-gradient(ellipse 75% 65% at 45% 50%, #000 20%, transparent 78%);
}
.art-brand, .auth-mobile-brand {
    position: relative; display: inline-flex; align-items: center; gap: 12px; text-decoration: none;
    font: 800 18px/1 var(--display); letter-spacing: .04em;
}
.art-brand svg, .auth-mobile-brand svg {
    width: 36px; height: 36px; border-radius: 10px; overflow: hidden; flex-shrink: 0;
    box-shadow: 0 0 0 1px var(--line-2), 0 8px 24px rgba(0, 0, 0, .5);
}
.art-body { position: relative; margin: auto 0; padding: 48px 0; max-width: 560px; }
.art-kicker {
    display: inline-flex; align-items: center; gap: 10px; margin-bottom: 22px;
    font: 500 12.5px/1 'JetBrains Mono', monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2);
}
.art-kicker::before { content: ''; width: 22px; height: 1px; background: var(--teal); box-shadow: 0 0 12px var(--teal); }
.art-title {
    font: 700 clamp(34px, 3.4vw, 50px)/1.06 var(--display); letter-spacing: -.035em;
    background: linear-gradient(180deg, #fff 30%, #9ea1a8 120%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.art-text { margin-top: 18px; color: var(--text-2); font-size: 16.5px; max-width: 470px; }
.art-stage { position: relative; margin-top: 44px; min-height: 230px; }
.art-foot { position: relative; display: flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 13px; }
.art-foot .material-icons-round { font-size: 16px; color: var(--teal); }

/* Стеклянные карточки */
.glass {
    position: absolute; padding: 18px 20px; border-radius: 16px; width: min(330px, 70%);
    background: linear-gradient(160deg, rgba(36, 37, 42, .72), rgba(18, 19, 22, .62));
    border: 1px solid var(--line-2);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .07);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.glass--sm { display: flex; align-items: center; gap: 14px; padding: 14px 16px; width: min(320px, 68%); }
.float-a { top: 0; left: 0; animation: float 7s ease-in-out infinite; }
.float-b { top: 118px; left: 34%; animation: float 8s ease-in-out -2s infinite; }
.float-c { top: 196px; left: 8%; animation: float 9s ease-in-out -4s infinite; }
@keyframes float { 50% { transform: translateY(-8px); } }
.g-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.g-title { font-weight: 600; font-size: 14px; }
.g-sub { color: var(--text-3); font-size: 12.5px; margin-top: 2px; }
.g-price { font: 700 26px/1 var(--display); letter-spacing: -.02em; margin-top: 16px; }
.g-price small { font: 500 13px 'Inter', sans-serif; color: var(--text-3); }
.g-pill {
    display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px;
    font-size: 12px; font-weight: 600; color: var(--ok); border: 1px solid rgba(63, 178, 127, .35); white-space: nowrap;
}
.g-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.g-ico {
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
    width: 38px; height: 38px; border-radius: 11px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line-2);
}
.g-ico.ok { color: var(--teal); border-color: rgba(0, 252, 215, .3); background: rgba(0, 252, 215, .06); }

/* Пульт команды — терминал */
.term { position: relative; width: min(470px, 100%); padding: 0; overflow: hidden; }
.term-bar { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: #2e2f35; }
.term-bar span { margin-left: 10px; font: 500 12px 'JetBrains Mono', monospace; color: var(--text-3); }
.term-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; font: 13px/1.5 'JetBrains Mono', monospace; color: var(--text-2); }
.t-dim { color: var(--text-3); }
.t-ok { color: var(--ok); text-shadow: 0 0 10px var(--ok); margin: 0 6px; }
.t-teal { color: var(--teal); text-shadow: 0 0 10px var(--teal); margin: 0 6px; }
.t-cursor i { display: inline-block; width: 8px; height: 15px; vertical-align: -2px; background: var(--text); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ═══ Правая часть: форма ═════════════════════════════════════════════ */
.auth-main {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 48px 40px; gap: 22px;
    background: radial-gradient(70% 50% at 50% 40%, rgba(255, 255, 255, .035), transparent 70%), var(--bg);
}
.auth-mobile-brand { display: none; }
.auth-card {
    position: relative; width: 100%; max-width: 430px; padding: 40px 38px 34px; border-radius: 24px;
    background: linear-gradient(180deg, rgba(25, 26, 30, .9), rgba(14, 15, 18, .92));
    box-shadow: 0 40px 100px rgba(0, 0, 0, .65), inset 0 1px 0 rgba(255, 255, 255, .06);
}
/* Обводка градиентом: светлая сверху, бирюзовая искра снизу справа. */
.auth-card::before {
    content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
    background: linear-gradient(155deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, .05) 38%, rgba(255, 255, 255, .03) 70%, rgba(0, 252, 215, .35));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
}
.auth--console .auth-card::before {
    background: linear-gradient(155deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, .05) 38%, rgba(99, 102, 241, .45));
}
.card-head { margin-bottom: 26px; }
.card-head h1 { font: 700 30px/1.15 var(--display); letter-spacing: -.03em; }
.card-head p { color: var(--text-2); margin-top: 8px; font-size: 14.5px; }
.card-head p b { color: var(--text); font-weight: 600; }
.badge-console {
    display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; margin-bottom: 16px;
    border-radius: 8px; border: 1px solid rgba(99, 102, 241, .4); background: rgba(99, 102, 241, .08);
    font: 500 12px 'JetBrains Mono', monospace; color: #b4b6ff; letter-spacing: .02em;
}
.badge-console .material-icons-round { font-size: 15px; }

.notice {
    display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; margin-bottom: 18px; border-radius: 12px;
    font-size: 13.5px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .03);
}
.notice .material-icons-round { font-size: 18px; margin-top: 1px; }
.notice--error { border-color: rgba(242, 99, 99, .35); background: rgba(242, 99, 99, .07); color: #ffc9c9; }
.notice--error .material-icons-round { color: var(--bad); }
.notice--success .material-icons-round { color: var(--ok); }

.auth-form { display: flex; flex-direction: column; gap: 18px; }
.field label { display: block; font-size: 13px; font-weight: 500; color: var(--text-2); margin-bottom: 8px; }
.control {
    position: relative; display: flex; align-items: center; height: 52px; border-radius: 14px;
    background: var(--field); border: 1px solid var(--line-2);
    transition: border-color .18s, box-shadow .18s, background .18s;
}
.control:hover { border-color: rgba(255, 255, 255, .22); }
.control:focus-within {
    border-color: rgba(0, 252, 215, .55); background: rgba(9, 10, 12, .9);
    box-shadow: 0 0 0 4px rgba(0, 252, 215, .09), 0 0 24px rgba(0, 252, 215, .08);
}
.auth--console .control:focus-within { border-color: rgba(129, 132, 255, .6); box-shadow: 0 0 0 4px rgba(99, 102, 241, .12); }
.control > .material-icons-round { position: absolute; left: 16px; color: var(--text-3); font-size: 19px; pointer-events: none; transition: color .18s; }
.control:focus-within > .material-icons-round { color: var(--text); }
.control input {
    width: 100%; height: 100%; padding: 0 48px 0 46px; border: 0; outline: 0; background: transparent;
    color: var(--text); font: 15px 'Inter', sans-serif; border-radius: inherit;
}
.control input::placeholder { color: #50535a; }
.control input:-webkit-autofill {
    -webkit-text-fill-color: var(--text); caret-color: var(--text);
    -webkit-box-shadow: 0 0 0 100px #0c0d10 inset; transition: background-color 9999s;
}
.reveal, .match {
    position: absolute; right: 8px; display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 10px; border: 0; background: none; color: var(--text-3); cursor: pointer;
}
.reveal:hover { background: rgba(255, 255, 255, .06); color: var(--text); }
.match { cursor: default; color: var(--ok); }
.caps { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 12.5px; color: var(--warn); }
.caps .material-icons-round { font-size: 16px; }
.caps[hidden], .match[hidden] { display: none; }
.field-error { margin-top: 8px; font-size: 12.5px; color: var(--bad); }

/* Индикатор надёжности пароля */
.meter { display: grid; grid-template-columns: repeat(4, 1fr) auto; gap: 6px; align-items: center; margin-top: 10px; }
.meter i { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .08); transition: background .25s; }
.meter span { font-size: 12px; color: var(--text-3); min-width: 74px; text-align: right; }
.meter[data-level="1"] i:nth-child(-n+1) { background: var(--bad); }
.meter[data-level="2"] i:nth-child(-n+2) { background: var(--warn); }
.meter[data-level="3"] i:nth-child(-n+3) { background: #7fd1a6; }
.meter[data-level="4"] i:nth-child(-n+4) { background: var(--teal); box-shadow: 0 0 10px rgba(0, 252, 215, .4); }

/* Главная кнопка: белая, с бликом, который проходит при наведении. */
.submit {
    position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    height: 54px; margin-top: 6px; border: 0; border-radius: 14px; cursor: pointer; text-decoration: none;
    background: linear-gradient(180deg, #ffffff, #e6e7ea); color: #0c0d10;
    font: 600 15.5px 'Inter', sans-serif;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 12px 30px rgba(255, 255, 255, .08), 0 2px 6px rgba(0, 0, 0, .4);
    transition: transform .18s, box-shadow .18s;
}
.submit::after {
    content: ''; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%;
    background: linear-gradient(100deg, transparent, rgba(0, 252, 215, .28), transparent);
    transform: skewX(-18deg); transition: left .6s ease;
}
.submit:hover { transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 16px 40px rgba(255, 255, 255, .12), 0 2px 6px rgba(0, 0, 0, .4); }
.submit:hover::after { left: 120%; }
.submit:active { transform: translateY(0); }
.submit-arrow { font-size: 19px; transition: transform .18s; }
.submit:hover .submit-arrow { transform: translateX(3px); }
.submit .spinner {
    display: none; width: 18px; height: 18px; border-radius: 50%;
    border: 2px solid rgba(12, 13, 16, .2); border-top-color: #0c0d10; animation: spin .7s linear infinite;
}
.submit.is-loading { pointer-events: none; }
.submit.is-loading .spinner { display: inline-block; }
.submit.is-loading .submit-arrow { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.submit--link { width: 100%; margin-top: 22px; }
.ghost {
    height: 50px; border-radius: 14px; border: 1px solid var(--line-2); background: transparent; color: var(--text-2);
    font: 500 15px 'Inter', sans-serif; cursor: pointer;
}
.ghost:hover { color: var(--text); background: rgba(255, 255, 255, .04); }

.card-foot {
    display: flex; gap: 10px; align-items: flex-start; margin-top: 26px; padding-top: 20px;
    border-top: 1px solid var(--line); font-size: 13px; color: var(--text-3); line-height: 1.5;
}
.card-foot .material-icons-round { font-size: 18px; color: var(--text-2); }

.card-state { text-align: center; }
.state-ico {
    display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; margin-bottom: 20px;
    border-radius: 20px; border: 1px solid rgba(242, 99, 99, .3); background: rgba(242, 99, 99, .07); color: var(--bad);
}
.state-ico .material-icons-round { font-size: 30px; }
.card-state h1 { font: 700 26px/1.2 var(--display); letter-spacing: -.02em; }
.card-state p { color: var(--text-2); margin-top: 10px; }

.pay-sum {
    display: flex; justify-content: space-between; align-items: baseline; padding: 18px 20px; margin-bottom: 20px;
    border-radius: 14px; border: 1px solid var(--line-2); background: var(--field);
}
.pay-sum span { color: var(--text-2); font-size: 14px; }
.pay-sum b { font: 700 28px var(--display); letter-spacing: -.02em; }

.auth-meta { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; font-size: 13.5px; color: var(--text-3); }
.auth-meta a { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); text-decoration: none; }
.auth-meta a:hover { color: var(--text); }
.auth-meta .material-icons-round { font-size: 16px; }
.auth-meta span a { color: var(--teal); }

/* Появление: карточка поднимается, левая панель проявляется. */
.auth-card { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
.art-body { animation: fade 1s ease .1s both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ═══ Адаптив ═════════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
    .auth-shell { grid-template-columns: minmax(0, 1fr) minmax(440px, 1fr); }
    .auth-art { padding: 40px; }
}
@media (max-width: 900px) {
    .auth-shell { grid-template-columns: 1fr; }
    .auth-art { display: none; }
    .auth-main {
        justify-content: flex-start; padding: 28px 16px 40px;
        background:
            radial-gradient(60% 40% at 20% 0%, rgba(0, 252, 215, .14), transparent 70%),
            radial-gradient(50% 35% at 90% 10%, rgba(99, 102, 241, .14), transparent 70%), var(--bg);
    }
    .auth-mobile-brand { display: inline-flex; align-self: flex-start; margin-bottom: 18px; }
    .auth-card { padding: 30px 22px 26px; border-radius: 20px; }
    .card-head h1 { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
    .art-glow, .float-a, .float-b, .float-c, .t-cursor i, .auth-card, .art-body { animation: none; }
    .submit, .submit::after, .submit-arrow { transition: none; }
}
