/**
 * Agufy Unified Auth — Styles
 * Neutral branding (no green/blue service tint).
 */

/* ── Reset & base ──────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --brand:      #1e3a5f;
    --brand-light:#2d5f8a;
    --accent:     #16a34a;
    --white:      #ffffff;
    --gray-100:   #f3f4f6;
    --gray-200:   #e5e7eb;
    --gray-300:   #d1d5db;
    --gray-500:   #6b7280;
    --gray-600:   #4b5563;
    --gray-800:   #1f2937;
    --red-100:    #fee2e2;
    --red-700:    #b91c1c;
    --green-100:  #dcfce7;
    --green-700:  #15803d;
    --blue-100:   #dbeafe;
    --blue-700:   #1d4ed8;
    --radius:     8px;
    --radius-lg:  16px;
    --shadow:     0 4px 12px rgba(0,0,0,.08);
    --shadow-lg:  0 8px 32px rgba(0,0,0,.12);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.5;
    color: var(--gray-800);
    -webkit-font-smoothing: antialiased;
}

/* ── Login layout ──────────────────────────── */
.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5f8a 50%, #16a34a 100%);
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 40px 36px;
    box-shadow: var(--shadow-lg);
}

/* ── Header ────────────────────────────────── */
.login-header {
    text-align: center;
    margin-bottom: 8px;
}

.login-logo {
    height: 48px;
    width: auto;
    margin-bottom: 8px;
}

.login-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--brand);
    margin-bottom: 4px;
    letter-spacing: .02em;
}

.page-subtitle {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 8px;
}

.page-desc {
    text-align: center;
    font-size: .85rem;
    color: var(--gray-500);
    margin-bottom: 16px;
}

/* ── Language switcher ─────────────────────── */
.login-lang {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 20px;
}

.lang-form { display: inline; }

.lang-btn {
    background: none;
    border: 1px solid var(--gray-300);
    color: var(--gray-600);
    padding: 3px 10px;
    border-radius: 4px;
    font-size: .78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
}

.lang-btn:hover {
    border-color: var(--brand);
    color: var(--brand);
}

/* ── Alerts ────────────────────────────────── */
.alert {
    padding: 10px 14px;
    border-radius: var(--radius);
    margin-bottom: 14px;
    font-size: .9rem;
}

.alert-error   { background: var(--red-100);   color: var(--red-700); }
.alert-success { background: var(--green-100); color: var(--green-700); }
.alert-info    { background: var(--blue-100);  color: var(--blue-700); }
.alert-warning { background: #fef3c7;         color: #92400e; }

/* ── Form ──────────────────────────────────── */
.login-form {
    margin-top: 16px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 4px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: .95rem;
    background: var(--white);
    color: var(--gray-800);
    transition: border-color .15s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(30,58,95,.12);
}

/* ── Remember me ───────────────────────────── */
.remember-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.remember-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--brand);
    cursor: pointer;
}

.remember-row label {
    font-size: .85rem;
    color: var(--gray-600);
    cursor: pointer;
    margin: 0;
    font-weight: 400;
}

/* ── Buttons ───────────────────────────────── */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all .15s;
}

.btn-primary {
    width: 100%;
    background: var(--brand);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--brand-light);
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--brand);
    border: 1px solid var(--gray-200);
    font-size: .85rem;
    padding: 8px 16px;
}

.btn-secondary:hover {
    background: var(--gray-200);
}

/* ── Links ─────────────────────────────────── */
.forgot-link {
    text-align: center;
    margin-top: 14px;
    font-size: .85rem;
}

.forgot-link a {
    color: var(--brand);
    text-decoration: none;
}

.forgot-link a:hover {
    text-decoration: underline;
}

.signup-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--gray-200);
}

.signup-footer p {
    font-size: .85rem;
    color: var(--gray-600);
    margin: 0 0 8px;
}

.privacy-link {
    text-align: center;
    margin-top: 14px;
    font-size: .78rem;
}

.privacy-link a {
    color: var(--gray-500);
    text-decoration: none;
}

.privacy-link a:hover {
    text-decoration: underline;
}

/* ── Responsive ────────────────────────────── */
@media (max-width: 480px) {
    .login-card {
        padding: 28px 20px;
    }
}
