/* auth.css — Login and signup page styles */

body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    overflow-x: hidden;
}

.auth-container {
    width: 100%;
    max-width: 480px;
}

.auth-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(15, 61, 46, 0.08);
    box-shadow: 0 20px 60px -32px rgba(10, 42, 32, 0.25);
    overflow: hidden;
}

/* Header */
.auth-header {
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 48px 40px 40px;
    text-align: center;
    border-bottom: 1px solid var(--border-light);
}

.auth-header h1 {
    font-size: 26px;
    font-weight: var(--w-semibold);
    color: var(--adl-green);
    letter-spacing: -0.01em;
    margin: 16px 0 6px;
}

.auth-header .ministry-name {
    font-size: 0.92rem;
    font-weight: var(--w-regular);
    color: var(--neutral-700);
    margin: 4px 0 10px;
    line-height: 1.5;
}

.auth-header .auth-subtitle {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--civic-gold);
    margin: 8px 0 12px;
}

/* Official emblem / logo */
.official-emblem {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}

.emblem-img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    color: var(--adl-green);
}

/* Security badge */
.security-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(15, 61, 46, 0.06);
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    margin-top: 8px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--forest-600);
    font-weight: var(--w-medium);
}

/* Nav bar (language selector + back button) */
.auth-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}

[dir="rtl"] .auth-nav {
    flex-direction: row-reverse;
}

.auth-nav .lang-selector {
    padding: 10px 16px;
    border: 1px solid var(--border-default);
    border-radius: 4px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.2s;
    font-family: inherit;
}

.auth-nav .lang-selector:hover {
    border-color: var(--primary);
    background: var(--bg-section);
}

.auth-nav .lang-selector:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.btn-back-home {
    color: var(--white);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 20px;
    border: 2px solid var(--primary);
    border-radius: 6px;
    background: var(--primary);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 107, 60, 0.15);
}

.btn-back-home:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    box-shadow: 0 2px 6px rgba(0, 107, 60, 0.25);
    transform: translateY(-1px);
}

/* Form area */
.auth-form {
    padding: 40px;
}

.auth-form h2 {
    font-size: 1.4rem;
    color: var(--primary);
    margin-bottom: 24px;
    text-align: center;
    font-weight: 600;
}

/* Alert placement inside card */
.auth-alert-wrap {
    padding: 0 32px;
}

/* Checkbox */
.checkbox-group {
    display: flex;
    align-items: center;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    margin-bottom: 0;
    cursor: pointer;
    font-weight: 400;
}

.checkbox-group input[type="checkbox"] {
    margin-left: 8px;
    margin-right: 8px;
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

/* Submit button full width */
.auth-form .btn {
    width: 100%;
    margin-top: 8px;
}

/* Toggle link (switch login/signup) */
.auth-toggle {
    margin-top: 28px;
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
}

.auth-toggle p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
}

.auth-toggle a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    margin-left: 4px;
    transition: color 0.2s;
}

.auth-toggle a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Password hint */
.password-hint {
    display: block;
    margin-top: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 640px) {
    body {
        padding: 24px;
    }

    .auth-header {
        padding: 32px 24px 28px;
    }

    .auth-header h1 {
        font-size: 22px;
    }

    .auth-form {
        padding: 32px 24px;
    }
}
