:root {
    --accent: #a855f7;
    --accent2: #7c3aed;
    --bg1: #0b0223;
    --bg2: #120530;
    --text: #f4f1ff;
    --muted: #b7a8dd;
    --weak: #ef4444;
    --medium: #f59e0b;
    --strong: #10b981;
}


.card h1 {
    font-size: 26px;
    margin-bottom: 6px;
}


.card p.lead {
    color: var(--muted);
    margin-bottom: 18px;
    font-size: 15px;
}


.card .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}


.card .logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--accent2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    color: #fff;
    box-shadow: 0 0 15px rgba(124,58,237,0.5);
}


.card label {
    font-size: 13px;
    color: var(--muted);
    display: block;
    margin-bottom: 2px;
}


.card .input-wrapper {
    position: relative;
    width: 100%;
    box-sizing: border-box;
}


.card input {
    width: 100%;
    padding: 12px 1px 12px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.02);
    color: var(--text);
    margin-top: 6px;
    box-sizing: border-box;
    max-width: 234px;
    font-size: 14px;
}


.card input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.3);
}


.card input.invalid {
    border-color: #ff5c5c;
    box-shadow: 0 0 0 2px rgba(255, 92, 92, 0.3);
}


.card .toggle-password {
    position: absolute;
    top: 50%;
    right: 1%;
    /* ❗ без отступов */
    transform: translateY(-30%);
    background: none;
    border: none;
    padding: 0;               /* ❗ убираем padding */
    margin: 0;                /* ❗ убираем margin */
    color: var(--muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    z-index: 2;
}


.toggle-password:hover {
    opacity: 1;
    color: var(--accent);
}


.toggle-password svg {
    width: 25px;
    height: 25px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    display: block;
}


.row {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
    margin-top: 12px;
}


@media (min-width: 600px) {
    .card  .row {
        flex-direction: row;
        gap: 12px;
    }
    .card   .col {
        flex: 1;
        min-width: 0;
        box-sizing: border-box;
    }
}


.card .field-error {
    color: #ff9a9a;
    font-size: 13px;
    margin-top: 4px;
    min-height: 16px;
}


.card .strength-meter {
    height: 4px;
    border-radius: 2px;
    background: rgba(255,255,255,0.1);
    overflow: hidden;
}


.card .strength-fill {
    height: 100%;
    width: 0%;
    border-radius: 2px;
    transition: width 0.3s, background-color 0.3s;
}


.card .strength-text {
    font-size: 12px;
    margin-top: 4px;
    color: var(--muted);
    min-height: 16px;
}


/* captcha */


.captcha {
    margin-top: 18px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 14px;
    box-sizing: border-box;
}


.captcha-title {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}


.captcha-instruction {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 8px;
    text-align: center;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.03);
    border-radius: 6px;
    padding: 6px;
    border: 1px solid rgba(255,255,255,0.05);
}


.captcha-track {
    position: relative;
    height: 42px;
    background: rgba(255,255,255,0.06);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
}


.captcha-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent2), var(--accent));
    transition: width 0.15s;
}


.captcha-cubes {
    position: absolute;
    inset: 0;
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}


.cube {
    width: 18px;
    height: 18px;
    background: #dc2626;
    border-radius: 4px;
    transition: background 0.2s, transform 0.2s;
    position: relative;
}


.cube.completed {
    background: #22c55e;
    transform: scale(1.1);
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
}


.cube::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background: rgba(255,255,255,0.8);
    border-radius: 50%;
    opacity: 0.5;
}


.captcha-slider {
    width: 100%;
    height: 10px;
    margin-top: 10px;
    -webkit-appearance: none;
    -moz-appearance: none;
         appearance: none;
    background: rgba(255,255,255,0.1);
    border-radius: 5px;
    outline: none;
    box-sizing: border-box;
}


.captcha-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    cursor: grab;
    border: 2px solid var(--text);
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.5);
    -webkit-transition: all 0.2s;
    transition: all 0.2s;
}


.captcha-slider::-webkit-slider-thumb:active {
    cursor: grabbing;
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.8);
}


.captcha-slider::-moz-range-thumb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    cursor: grab;
    border: 2px solid var(--text);
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.5);
}


.captcha-slider::-moz-range-thumb:active {
    cursor: grabbing;
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.8);
}


.captcha-hint {
    font-size: 11px;
    color: var(--muted);
    margin-top: 4px;
    text-align: center;
    opacity: 0.7;
}


.captcha-ok {
    margin-top: 8px;
    color: #22c55e;
    font-size: 13px;
    display: none;
    text-align: center;
    font-weight: 500;
}


.captcha-ok.show {
    display: block;
    animation: fadeIn 0.3s ease-in;
}


.captcha-error {
    margin-top: 8px;
    color: #ef4444;
    font-size: 13px;
    display: none;
    text-align: center;
    font-weight: 500;
}


.captcha-error.show {
    display: block;
    animation: shake 0.5s ease-in-out;
}


.captcha-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    z-index: 2;
}


.reset-captcha {
    background: none;
    border: none;
    color: var(--muted);
    font-size: 12px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color 0.2s, background-color 0.2s;
}


.reset-captcha:hover {
    color: var(--accent);
    background: rgba(255,255,255,0.05);
}


.error {
    background: rgba(255,0,0,0.1);
    padding: 10px;
    border-radius: 8px;
    color: #ffb4b4;
    font-size: 14px;
    margin-top: 12px;
}


.help {
    color: var(--muted);
    font-size: 13px;
    margin-top: 8px;
    text-align: center;
}


.actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
    width: 100%;
    box-sizing: border-box;
}


@media (min-width: 480px) {
    .actions {
        flex-direction: row;
        justify-content: space-between;
    }
}


.card .btn-primary {
    background: linear-gradient(90deg, var(--accent2), var(--accent));
    border: none;
    padding: 12px 16px;
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    font-weight: 600;
    transition: 0.25s;
    width: 100%;
    box-sizing: border-box;
}


@media (min-width: 480px) {
    .btn-primary {
        width: auto;
    }
}


.card .btn-primary:hover {
    opacity: 0.9;
}


.card .btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


.card .btn-ghost {
    border: 1px solid rgba(255,255,255,0.15);
    background: transparent;
    color: var(--muted);
    border-radius: 10px;
    padding: 12px 16px;
    text-decoration: none;
    transition: 0.3s;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
}


@media (min-width: 480px) {
    .btn-ghost {
        width: auto;
    }
}


.card .btn-ghost:hover {
    border-color: var(--accent2);
    color: var(--accent);
}


@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}


@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

