/* =========================================================================
   LOGIN PAGE STYLESHEET (login.css)
   ========================================================================= */

body {
    background-color: var(--bg-dark-matrix);
    color: var(--bg-surface);
    font-family: var(--font-sans);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 1.25rem;
    position: relative;
    overflow-x: hidden;
}

/* Background Ambient Glows utilizing Brand Colors */
body::before {
    content: '';
    position: absolute;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(255, 191, 17, 0.12) 0%, rgba(0, 0, 0, 0) 70%);
    top: -50px;
    left: -50px;
    border-radius: var(--radius-full);
    z-index: 0;
}

body::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(190, 6, 4, 0.12) 0%, rgba(0, 0, 0, 0) 70%);
    bottom: -80px;
    right: -80px;
    border-radius: var(--radius-full);
    z-index: 0;
}

.login-wrapper {
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* ---------- Header Controls (Back Button Left, Lang Right) ---------- */
.login-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.login-header a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.9rem;
    color: var(--bg-surface);
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-sm, 6px);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-snappy, all 0.2s ease);
    backdrop-filter: blur(4px);
}

.login-header a i {
    font-size: 0.85rem;
    transition: transform 0.2s ease;
}

.login-header a:hover {
    background-color: rgba(255, 255, 255, 0.18);
    border-color: var(--brand-primary, #ffbf11);
    color: var(--brand-primary, #ffbf11);
}

.login-header a:hover i {
    transform: translateX(-3px);
}

/* ---------- Login Card Container ---------- */
.login-card {
    background-color: var(--bg-surface);
    border: 1px solid rgba(47, 53, 66, 0.08);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-overlay);
}

.card-header {
    text-align: center;
    margin-bottom: 2rem;
}

.brand-logo {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--brand-primary) 0%, #be0604 100%);
    border-radius: var(--radius-md);
    display: grid;
    place-items: center;
    margin: 0 auto 1rem;
    color: var(--bg-surface);
    font-size: 1.5rem;
    box-shadow: 0 8px 20px rgba(255, 191, 17, 0.25);
}

.card-header h1 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--brand-secondary);
    margin-bottom: 0.35rem;
    letter-spacing: -0.5px;
}

.card-header p {
    font-size: 0.9rem;
    color: var(--ink-secondary);
}

/* ---------- Form Elements ---------- */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--ink-primary);
}

.input-field {
    position: relative;
    display: flex;
    align-items: center;
}

.input-field input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    background-color: var(--bg-base);
    border: 1.5px solid rgba(47, 53, 66, 0.1);
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    color: var(--ink-primary);
    outline: none;
    transition: var(--transition-snappy);
}

.input-field input::placeholder {
    color: var(--ink-muted);
}

.input-field input:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 4px rgba(255, 191, 17, 0.15);
    background-color: var(--bg-surface);
}

.field-icon {
    position: absolute;
    left: 1rem;
    color: var(--ink-muted);
    font-size: 1rem;
    pointer-events: none;
    transition: var(--transition-snappy);
}

.input-field input:focus ~ .field-icon {
    color: var(--brand-primary);
}

.toggle-password {
    position: absolute;
    right: 1rem;
    color: var(--ink-muted);
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition-snappy);
}

.toggle-password:hover {
    color: var(--ink-primary);
}

/* ---------- Form Options ---------- */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-top: -0.25rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: var(--ink-secondary);
    user-select: none;
}

.remember-me input {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 1.5px solid rgba(47, 53, 66, 0.2);
    border-radius: 5px;
    background-color: var(--bg-base);
    display: grid;
    place-items: center;
    transition: var(--transition-snappy);
}

.remember-me input:checked ~ .checkmark {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
}

.remember-me input:checked ~ .checkmark::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.65rem;
    color: #000000;
}

.forgot-password {
    color: #be0604;
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition-snappy);
}

.forgot-password:hover {
    opacity: 0.85;
    text-decoration: underline;
}

/* ---------- Action Button ---------- */
.btn-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.875rem;
    background: linear-gradient(135deg, var(--brand-primary) 0%, #be0604 100%);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.98rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-snappy);
    box-shadow: var(--shadow-raised);
    margin-top: 0.5rem;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-overlay);
    opacity: 0.95;
}

.btn-login:active {
    transform: translateY(0);
}

/* ---------- Card Footer ---------- */
.card-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(47, 53, 66, 0.08);
}

.card-footer p {
    font-size: 0.88rem;
    color: var(--ink-secondary);
}

.card-footer a {
    color: #be0604;
    font-weight: 700;
    text-decoration: none;
}

.card-footer a:hover {
    text-decoration: underline;
}

/* ---------- Responsive Adjustments ---------- */
@media (max-width: 480px) {
    .login-card {
        padding: 1.75rem 1.25rem;
        border-radius: var(--radius-md);
    }
}

/* ---------- Dropdown (<select>) Styles ---------- */
.input-field select.input-select {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    background-color: var(--bg-base);
    border: 1.5px solid rgba(47, 53, 66, 0.1);
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    color: var(--ink-primary);
    outline: none;
    transition: var(--transition-snappy);
    appearance: none;
    cursor: pointer;
}

.input-field select.input-select:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 4px rgba(255, 191, 17, 0.15);
    background-color: var(--bg-surface);
}

/* Custom arrow for dropdown */
.select-wrapper {
    position: relative;
    width: 100%;
}

.select-wrapper::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ink-muted);
    pointer-events: none;
    font-size: 0.8rem;
}

/* ---------- File Input Styles ---------- */
.input-field input[type="file"] {
    width: 100%;
    padding: 0.6rem 1rem 0.6rem 2.75rem;
    background-color: var(--bg-base);
    border: 1.5px solid rgba(47, 53, 66, 0.1);
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.85rem;
    color: var(--ink-secondary);
    cursor: pointer;
}

.input-field input[type="file"]::file-selector-button {
    background: var(--brand-secondary);
    color: #ffffff;
    border: none;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-sm);
    margin-right: 0.75rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.8rem;
    transition: var(--transition-snappy);
}

.input-field input[type="file"]::file-selector-button:hover {
    background: var(--brand-primary);
    color: #000000;
}