/* ============================================================
   assets/auth.css
   Shared styling for public-facing auth pages.
   ============================================================ */

* { box-sizing: border-box; }

body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(160deg, #1a1d24 0%, #23272f 100%);
    color: #e8eaee;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 16px;
}

.auth-card {
    width: 100%;
    max-width: 460px;
    background: #2b3038;
    border-radius: 14px;
    padding: 36px 32px 30px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    border: 1px solid #353b45;
}

.auth-logo {
    display: block;
    margin: 0 auto 22px;
    max-width: 260px;
    width: 100%;
    height: auto;
}

.auth-card h1 {
    margin: 0 0 6px 0;
    font-size: 1.35em;
    font-weight: 700;
    text-align: center;
    color: #fff;
    letter-spacing: 0.01em;
}

.auth-card .auth-sub {
    margin: 0 0 26px 0;
    font-size: 0.9em;
    color: #8a95a1;
    text-align: center;
    line-height: 1.5;
}

.auth-field {
    margin-bottom: 16px;
}
.auth-field label {
    display: block;
    font-size: 0.8em;
    font-weight: 600;
    color: #b6c0cb;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.auth-field input[type="email"],
.auth-field input[type="password"],
.auth-field input[type="text"],
.auth-field select {
    width: 100%;
    padding: 12px 14px;
    font-size: 0.95em;
    border: 1px solid #3d444e;
    border-radius: 8px;
    background: #1f242b;
    color: #e8eaee;
    font-family: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.auth-field input:focus,
.auth-field select:focus {
    outline: none;
    border-color: #d4a24a;
    box-shadow: 0 0 0 3px rgba(212, 162, 74, 0.15);
}

/* Password field with reveal toggle */
.password-wrap {
    position: relative;
}
.password-wrap input {
    padding-right: 70px;
}
.password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #8a95a1;
    font-size: 0.82em;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
    font-family: inherit;
    width: auto;
}
.password-toggle:hover {
    color: #d4a24a;
    background: rgba(212, 162, 74, 0.08);
}

/* Buttons */
.auth-btn {
    display: block;
    width: 100%;
    padding: 13px 20px;
    font-size: 1em;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    letter-spacing: 0.02em;
    transition: background 0.15s ease, transform 0.05s ease;
}
.auth-btn-primary {
    background: linear-gradient(180deg, #e0b05c 0%, #c78b2a 100%);
    color: #1a1d24;
    margin-top: 8px;
}
.auth-btn-primary:hover {
    background: linear-gradient(180deg, #ebbf6b 0%, #d4993a 100%);
}
.auth-btn-primary:active {
    transform: translateY(1px);
}

/* Links */
.auth-links {
    margin-top: 22px;
    text-align: center;
    font-size: 0.88em;
    color: #8a95a1;
    line-height: 1.7;
}
.auth-links a {
    color: #d4a24a;
    text-decoration: none;
    font-weight: 600;
}
.auth-links a:hover {
    text-decoration: underline;
}

/* Status messages */
.auth-alert {
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 0.9em;
    line-height: 1.5;
    margin-bottom: 18px;
}
.auth-alert-success {
    background: rgba(40, 167, 69, 0.12);
    border: 1px solid rgba(40, 167, 69, 0.35);
    color: #7ed8a0;
}
.auth-alert-error {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.35);
    color: #f28b96;
}
.auth-alert-info {
    background: rgba(23, 162, 184, 0.1);
    border: 1px solid rgba(23, 162, 184, 0.35);
    color: #7fd8e6;
}

/* Divider with text */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0 20px;
    font-size: 0.78em;
    color: #6b7783;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #353b45;
}

/* Footer under the card */
.auth-footer {
    margin-top: 22px;
    text-align: center;
    font-size: 0.78em;
    color: #6b7783;
}
.auth-footer a {
    color: #8a95a1;
    text-decoration: none;
}
.auth-footer a:hover { color: #d4a24a; }

@media (max-width: 480px) {
    .auth-card { padding: 28px 22px 24px; border-radius: 12px; }
    .auth-logo { max-width: 200px; }
    .auth-card h1 { font-size: 1.2em; }
}
/* Field hint (small helper text under inputs) */
.auth-field .field-hint {
    font-size: 0.75em;
    color: #8a95a1;
    margin-top: 5px;
}

/* Red outline when the field has a live validation error */
.auth-field.has-error input {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15);
}

/* Auto-scroll target for the error alert — center it nicely */
.auth-alert:focus,
.auth-alert-error {
    /* existing rule untouched, this just keeps the scrollIntoView centered */
}
.auth-lang {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
}
.auth-lang-link {
    padding: 3px 10px;
    font-size: 0.8em;
    color: #8a95a1;
    text-decoration: none;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 500;
}
.auth-lang-link:hover {
    color: #d4a24a;
    border-color: rgba(212, 162, 74, 0.4);
}
.auth-lang-link.auth-lang-active {
    color: #d4a24a;
    border-color: #d4a24a;
    background: rgba(212, 162, 74, 0.08);
}
.auth-copy { font-size: 0.78em; }