/* =============================================
   AUTH.CSS — Brushed Metal + Blue Accent
   ProxiTask Technology — Brand Design
   ============================================= */

/* === Body — subtle gray === */
.auth-body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #e4e4e7;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    margin: 0;
}

/* === Containers === */
.login-container,
.reset-container {
    width: 100%;
    max-width: 440px;
}

.reset-container {
    max-width: 480px;
}

/* === Logo === */
.logo {
    text-align: center;
    margin-bottom: 36px;
}

.logo-img {
    max-width: 280px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.logo-text {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

/* "proxi" — blue metallic */
.logo-text .logo-blue {
    background: linear-gradient(180deg, #4b8ff7 0%, #2563eb 40%, #1d4ed8 60%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* "Task" — silver metallic */
.logo-text .logo-silver {
    background: linear-gradient(180deg, #c0c0c8 0%, #9a9aa6 30%, #b8b8c4 50%, #8a8a96 70%, #a8a8b4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-subtitle {
    font-size: 12px;
    color: #71717a;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-top: 4px;
    font-weight: 500;
}

/* === Card — BRUSHED METAL 3D === */
.login-card,
.reset-card {
    /* Layered brushed metal — diagonal 50° scratches */
    background:
        /* Fine diagonal scratches — main texture */
        repeating-linear-gradient(
            50deg,
            transparent 0px,
            rgba(255,255,255,0.035) 1px,
            transparent 2px,
            rgba(0,0,0,0.014) 4px,
            transparent 5px
        ),
        /* Secondary scratches — slightly offset angle */
        repeating-linear-gradient(
            48deg,
            transparent 0px,
            rgba(255,255,255,0.02) 2px,
            transparent 4px,
            rgba(0,0,0,0.01) 7px,
            transparent 8px
        ),
        /* Wide soft scratches */
        repeating-linear-gradient(
            52deg,
            transparent 0px,
            rgba(255,255,255,0.025) 1px,
            transparent 3px,
            transparent 12px,
            rgba(0,0,0,0.01) 13px,
            transparent 15px
        ),
        /* Metal base gradient — shine sweep */
        linear-gradient(
            165deg,
            #c8c8d0 0%,
            #b0b0bc 10%,
            #d2d2da 20%,
            #b8b8c4 35%,
            #c8c8d2 48%,
            #d8d8e0 52%,
            #b4b4c0 65%,
            #ccccD6 78%,
            #b8b8c2 90%,
            #c4c4ce 100%
        );
    border-radius: 16px;
    padding: 42px 36px;

    /* 3D depth — raised metal plate */
    border-top: 1px solid rgba(255, 255, 255, 0.5);
    border-left: 1px solid rgba(255, 255, 255, 0.3);
    border-right: 1px solid rgba(0, 0, 0, 0.08);
    border-bottom: 2px solid rgba(0, 0, 0, 0.12);
    box-shadow:
        /* Outer shadow — 3D lift */
        0 12px 40px rgba(0, 0, 0, 0.15),
        0 4px 12px rgba(0, 0, 0, 0.08),
        /* Top highlight — metal reflection */
        inset 0 2px 1px rgba(255, 255, 255, 0.4),
        /* Bottom edge — depth */
        inset 0 -2px 4px rgba(0, 0, 0, 0.06);
}

/* === Titles === */
.login-title,
.reset-title {
    font-size: 24px;
    font-weight: 700;
    color: #3f3f46;
    margin-bottom: 8px;
    text-align: center;
}

.login-subtitle,
.reset-subtitle {
    font-size: 14px;
    color: #71717a;
    margin-bottom: 32px;
    text-align: center;
    line-height: 1.5;
}

/* === Inputs — inset metal groove === */
.auth-body .form-group {
    margin-bottom: 22px;
}

.auth-body .form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #52525b;
    margin-bottom: 8px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.auth-body .form-control {
    width: 100%;
    padding: 14px 18px;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    color: #27272a;
    background:
        /* Brushed scratches on input */
        repeating-linear-gradient(
            50deg,
            transparent 0px,
            rgba(255,255,255,0.04) 1px,
            transparent 2px,
            rgba(0,0,0,0.014) 4px,
            transparent 5px
        ),
        repeating-linear-gradient(
            48deg,
            transparent 0px,
            rgba(255,255,255,0.02) 2px,
            transparent 5px,
            rgba(0,0,0,0.007) 7px,
            transparent 8px
        ),
        linear-gradient(180deg, #e4e4e8 0%, #ececf0 100%);
    border: 1px solid #a1a1aa;
    border-top-color: #8a8a94;
    border-radius: 12px;
    transition: all 0.3s ease;
    outline: none;
    box-sizing: border-box;
    box-shadow:
        inset 0 2px 6px rgba(0, 0, 0, 0.1),
        inset 0 1px 2px rgba(0, 0, 0, 0.06),
        0 1px 0 rgba(255, 255, 255, 0.5);
}

.auth-body .form-control:focus {
    border-color: #3b82f6;
    box-shadow:
        inset 0 2px 6px rgba(0, 0, 0, 0.1),
        0 0 0 3px rgba(59, 130, 246, 0.15),
        0 1px 0 rgba(255, 255, 255, 0.5);
}

.auth-body .form-control::placeholder {
    color: #a1a1aa;
}

/* === Button — blue metal with scratches === */
.btn-login,
.btn-submit {
    width: 100%;
    padding: 15px 24px;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    color: #ffffff;
    background:
        /* Brushed scratches on button — REVERSE direction */
        repeating-linear-gradient(
            130deg,
            transparent 0px,
            rgba(255,255,255,0.04) 1px,
            transparent 2px,
            rgba(0,0,0,0.02) 4px,
            transparent 5px
        ),
        repeating-linear-gradient(
            128deg,
            transparent 0px,
            rgba(255,255,255,0.025) 2px,
            transparent 5px,
            rgba(0,0,0,0.012) 7px,
            transparent 8px
        ),
        linear-gradient(
            165deg,
            #4a87e0 0%,
            #3570c8 30%,
            #2d63b8 50%,
            #3570c8 70%,
            #4a87e0 100%
        );
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 28px;
    text-transform: none;
    display: block;
    text-align: center;
    text-decoration: none;
    letter-spacing: 0.5px;
    box-shadow:
        0 4px 12px rgba(45, 99, 184, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 -1px 0 rgba(0, 0, 0, 0.15);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-submit {
    margin-top: 8px;
}

.btn-login:hover,
.btn-submit:hover {
    background: linear-gradient(
        165deg,
        #5a97f0 0%,
        #4580d8 30%,
        #3d73c8 50%,
        #4580d8 70%,
        #5a97f0 100%
    );
    transform: translateY(-1px);
    box-shadow:
        0 6px 20px rgba(45, 99, 184, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-login:active,
.btn-submit:active {
    transform: translateY(1px);
    box-shadow:
        0 2px 6px rgba(45, 99, 184, 0.15),
        inset 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* === Errors === */
.auth-body .error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
}

.auth-body .error-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.auth-body .field-error {
    border-color: #ef4444 !important;
}

.auth-body .field-error:focus {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

.auth-body .field-error-text--lg {
    color: #dc2626;
    font-size: 13px;
    margin-top: 6px;
}

/* === Alerts === */
.auth-body .alert {
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 14px;
}

.auth-body .alert-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.auth-body .alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* === Links === */
.forgot-password-link {
    text-align: center;
    margin-top: 24px;
}

.forgot-password-link a {
    color: #71717a;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
}

.forgot-password-link a:hover {
    color: #3b82f6;
}

.auth-back-link {
    display: block;
    text-align: center;
    margin-top: 24px;
    color: #71717a;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
}

.auth-back-link:hover {
    color: #3b82f6;
}

/* === Error box === */
.error-box {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 12px;
    padding: 28px;
    text-align: center;
}

.error-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.error-title {
    font-size: 20px;
    font-weight: 600;
    color: #991b1b;
    margin-bottom: 8px;
}

.error-text {
    font-size: 15px;
    color: #71717a;
    margin-bottom: 24px;
    line-height: 1.5;
}

.auth-body .text-muted {
    color: #a1a1aa;
}

/* === Responsive === */
@media (max-width: 480px) {
    .login-card,
    .reset-card {
        padding: 32px 24px;
        border-radius: 14px;
    }

    .logo-text {
        font-size: 28px;
    }

    .login-title,
    .reset-title {
        font-size: 22px;
    }

    .auth-body .form-control {
        font-size: 16px;
    }
}

@media (max-width: 360px) {
    .auth-body {
        padding: 12px;
    }

    .login-card,
    .reset-card {
        padding: 24px 20px;
    }
}

/* === Language Selector — top RIGHT === */
.lang-selector {
    position: fixed;
    top: 20px;
    right: 20px;
    left: auto;
    z-index: 100;
}

.lang-btn {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #52525b;
    padding: 10px 18px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-bottom-color: rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    background:
        repeating-linear-gradient(
            50deg,
            transparent 0px,
            rgba(255,255,255,0.035) 1px,
            transparent 2px,
            rgba(0,0,0,0.014) 4px,
            transparent 5px
        ),
        repeating-linear-gradient(
            48deg,
            transparent 0px,
            rgba(255,255,255,0.02) 2px,
            transparent 4px,
            rgba(0,0,0,0.01) 7px,
            transparent 8px
        ),
        linear-gradient(165deg, #d0d0d8 0%, #c0c0c8 50%, #ccccD4 100%);
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.lang-btn:hover {
    color: #3b82f6;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: auto;
    min-width: 180px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    border-radius: 14px;
    background:
        repeating-linear-gradient(
            50deg,
            transparent 0px,
            rgba(255,255,255,0.03) 1px,
            transparent 2px,
            rgba(0,0,0,0.012) 4px,
            transparent 5px
        ),
        linear-gradient(165deg, #c8c8d0 0%, #b8b8c2 50%, #c4c4ce 100%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-bottom-color: rgba(0, 0, 0, 0.1);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    /* Custom scrollbar — синяя */
    scrollbar-width: thin;
    scrollbar-color: #3b82f6 rgba(0,0,0,0.1);
}

.lang-dropdown::-webkit-scrollbar {
    width: 4px;
}

.lang-dropdown::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.06);
    border-radius: 4px;
}

.lang-dropdown::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #4a87e0 0%, #2d63b8 100%);
    border-radius: 4px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}

.lang-dropdown::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #60a5fa 0%, #3b82f6 100%);
}

.lang-selector.open .lang-dropdown {
    max-height: 400px;
    opacity: 1;
    overflow-y: auto;
}

.lang-option {
    display: block;
    padding: 10px 16px;
    color: #3f3f46;
    text-decoration: none;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    transition: all 0.15s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.lang-option:hover {
    background: rgba(59, 130, 246, 0.08);
    color: #2563eb;
}

.lang-option--active {
    color: #2563eb;
    font-weight: 600;
}

.lang-option:last-child {
    border-bottom: none;
}
