/* ============================================================
   АСП-1 — Страница входа
   ============================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
}

html, body {
    width: 100%;
    height: 100%;
    background: #0e1213;
    color: #e2e6db;
    font-family: "Manrope", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
    -webkit-text-size-adjust: 100%;
    overflow: hidden;
}

/* === ФОН === */

.login-bg {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #14191a;
    overflow: hidden;
    z-index: 0;
}

.login-bg-grid {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    opacity: 0.04;
    background-image:
        -webkit-linear-gradient(0deg, #ffffff 1px, transparent 1px),
        -webkit-linear-gradient(90deg, #ffffff 1px, transparent 1px);
    background-image:
        linear-gradient(0deg, #ffffff 1px, transparent 1px),
        linear-gradient(90deg, #ffffff 1px, transparent 1px);
    background-size: 40px 40px;
}

.login-bg-glow {
    position: absolute;
    top: 50%; left: 50%;
    width: 800px; height: 800px;
    -webkit-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
    background:
        -webkit-radial-gradient(ellipse, rgba(255,182,72,0.06) 0%, rgba(95,211,95,0.04) 30%, transparent 60%);
    background:
        radial-gradient(ellipse, rgba(255,182,72,0.06) 0%, rgba(95,211,95,0.04) 30%, transparent 60%);
    pointer-events: none;
}

/* === КОНТЕЙНЕР === */

.login-wrap {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.login-box {
    width: 100%;
    max-width: 420px;
    background: #1c2421;
    border: 1px solid #2a3231;
    border-radius: 6px;
    padding: 32px 32px 24px;
    box-shadow:
        0 20px 60px rgba(0,0,0,0.5),
        inset 0 1px 0 rgba(255,255,255,0.03);
}

/* === БРЕНД === */

.login-brand {
    text-align: center;
    padding-bottom: 24px;
    border-bottom: 1px dashed #2e3633;
    margin-bottom: 24px;
}

.brand-mark {
    font-family: "JetBrains Mono", "Menlo", "Consolas", monospace;
    font-size: 42px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 1px;
    color: #ffb648;
    margin-bottom: 8px;
    text-shadow:
        0 0 20px rgba(255,182,72,0.4),
        0 0 40px rgba(255,182,72,0.2);
}

.brand-mark-num {
    color: #5fd35f;
    margin-left: 2px;
    text-shadow:
        0 0 20px rgba(95,211,95,0.4),
        0 0 40px rgba(95,211,95,0.2);
}

.brand-sub {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
    color: #8a9087;
}

/* === ЗАГОЛОВОК === */

.login-title {
    margin-bottom: 24px;
}

.login-title-main {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 2.5px;
    color: #c8ccc2;
    margin-bottom: 4px;
}

.login-title-sub {
    font-size: 11px;
    color: #6a7068;
    letter-spacing: 0.3px;
}

/* === ALERT === */

.alert {
    border-radius: 4px;
    padding: 12px 14px;
    margin-bottom: 16px;
    border: 1px solid;
    border-left-width: 4px;
}

.alert-error {
    background: rgba(255,107,90,0.08);
    border-color: #6b3530;
}

.alert-locked {
    background: rgba(255,182,72,0.08);
    border-color: #6b5530;
}

.alert-title {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
    margin-bottom: 6px;
    color: #ff9585;
}

.alert-locked .alert-title { color: #ffb648; }

.alert-text {
    font-size: 13px;
    color: #c8ccc2;
    line-height: 1.5;
}

.alert-text b { color: #ffb648; font-weight: 700; font-family: "JetBrains Mono", monospace; }

.alert-meta {
    font-size: 11px;
    color: #8a9087;
    font-family: "JetBrains Mono", monospace;
}

/* === ФОРМА === */

.login-form {}

.field {
    margin-bottom: 14px;
}

.field-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #8a9087;
    margin-bottom: 6px;
}

.field-input {
    width: 100%;
    background: #0e1213;
    border: 1px solid #3d4845;
    border-radius: 3px;
    color: #e2e6db;
    font-family: "JetBrains Mono", "Menlo", "Consolas", monospace;
    font-size: 15px;
    padding: 12px 14px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    -webkit-transition: border-color 0.15s ease, background 0.15s ease;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.field-input:focus {
    border-color: #ffb648;
    background: #14191a;
    box-shadow: 0 0 0 1px rgba(255,182,72,0.2);
}

.btn-login {
    width: 100%;
    background: #5fd35f;
    color: #14191a;
    border: 1px solid #5fd35f;
    border-radius: 3px;
    padding: 14px 20px;
    font-family: "Manrope", sans-serif;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 2px;
    cursor: pointer;
    margin-top: 8px;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
    -webkit-transition: all 0.15s ease;
    transition: all 0.15s ease;
    -ms-touch-action: manipulation;
    touch-action: manipulation;
    box-shadow: 0 4px 16px rgba(95,211,95,0.2);
}

.btn-login:hover { background: #4ab84a; }

.btn-login:active {
    -webkit-transform: scale(0.98);
    transform: scale(0.98);
    background: #4ab84a;
}

.btn-login-arrow {
    margin-left: 10px;
    font-size: 16px;
    -webkit-transition: -webkit-transform 0.15s ease;
    transition: transform 0.15s ease;
}

.btn-login:hover .btn-login-arrow {
    -webkit-transform: translateX(3px);
    transform: translateX(3px);
}

/* === ПОДВАЛ === */

.login-footer {
    margin-top: 28px;
    padding-top: 16px;
    border-top: 1px solid #2a3231;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-pack: justify;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
}

.footer-led {
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
}

.footer-text {
    margin-left: 8px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #5fd35f;
}

.footer-version {
    font-family: "JetBrains Mono", monospace;
    font-size: 10px;
    color: #6a7068;
    letter-spacing: 0.5px;
}

/* === LED === */

.led {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #2a3330;
}

.led-green {
    background: #5fd35f;
    box-shadow:
        0 0 6px rgba(95,211,95,0.8),
        0 0 14px rgba(95,211,95,0.4);
    -webkit-animation: pulseGreen 2s ease-in-out infinite;
    animation: pulseGreen 2s ease-in-out infinite;
}

@-webkit-keyframes pulseGreen {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.45; }
}
@keyframes pulseGreen {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.45; }
}

/* === АДАПТИВ === */

@media (max-width: 480px) {
    .login-box {
        padding: 24px 22px 20px;
    }
    .brand-mark { font-size: 36px; }
    .brand-sub { font-size: 10px; letter-spacing: 2px; }
    .login-title-main { font-size: 13px; }
    .field-input { font-size: 14px; padding: 11px 12px; }
    .btn-login { padding: 13px 16px; font-size: 12px; }
}

@media (max-height: 600px) {
    .login-wrap { -webkit-box-align: start; -webkit-align-items: flex-start; align-items: flex-start; padding-top: 20px; }
    .login-brand { padding-bottom: 18px; margin-bottom: 18px; }
    .login-title { margin-bottom: 18px; }
    .brand-mark { font-size: 32px; }
}
