/* ============================================================================
   AUTH — SACCO PRO Design System v4
   Clean centered card login page.
   ============================================================================ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: #f8fafc;
    color: #0f172a;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding: 24px 16px;
}

/* ── Card ── */
.auth-card {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(15,23,42,0.06), 0 8px 32px rgba(15,23,42,0.08);
    padding: 40px 36px 32px;
    border: 1px solid #e2e8f0;
}

/* ── Logo block ── */
.auth-logo-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 28px;
    text-align: center;
}

.auth-logo-img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    margin-bottom: 14px;
}

.auth-logo-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 14px;
}

.auth-logo-name {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.auth-logo-tag {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 3px;
}

/* ── Form header ── */
.auth-form-header {
    text-align: center;
    margin-bottom: 28px;
}

.auth-form-title {
    font-size: 1.375rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: #0f172a;
    margin-bottom: 6px;
}

.auth-form-subtitle {
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.5;
}

/* ── Fields ── */
.auth-field { margin-bottom: 16px; }

.auth-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
    letter-spacing: -0.005em;
}

.auth-input {
    width: 100%;
    padding: 10px 14px;
    font-size: 0.9375rem;
    font-family: inherit;
    background: #f9fafb;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    color: #0f172a;
    transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
    outline: none;
}

.auth-input::placeholder { color: #94a3b8; }

.auth-input:focus {
    border-color: #94a3b8;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
    background: #fff;
}

.auth-input.is-invalid { border-color: #ef4444; }
.auth-input.is-invalid:focus { box-shadow: 0 0 0 3px rgba(239,68,68,0.12); }

/* ── Errors ── */
.auth-field-error {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
    font-size: 0.8125rem;
    color: #dc2626;
    font-weight: 500;
}

/* ── Remember row ── */
.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.auth-checkbox-wrap {
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
}

.auth-checkbox {
    width: 15px;
    height: 15px;
    border-radius: 4px;
    border: 1.5px solid #d1d5db;
    cursor: pointer;
    accent-color: #0f172a;
}

.auth-checkbox-label {
    font-size: 0.8125rem;
    color: #64748b;
    font-weight: 500;
    -webkit-user-select: none;
    user-select: none;
}

/* ── Submit button ── */
.auth-submit {
    width: 100%;
    padding: 11px 20px;
    font-size: 0.9375rem;
    font-weight: 700;
    font-family: inherit;
    background: #0f172a;
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.18s, box-shadow 0.18s, transform 0.18s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: -0.01em;
}

.auth-submit:hover {
    background: #1e293b;
    box-shadow: 0 4px 16px rgba(15,23,42,0.22);
    transform: translateY(-1px);
}

.auth-submit:active { transform: translateY(0); }

.auth-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

@keyframes auth-spin {
    from { rotate: 0deg; }
    to   { rotate: 360deg; }
}

.auth-submit-spinner { animation: auth-spin 0.8s linear infinite; }

/* ── Alert ── */
.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.875rem;
    border: 1px solid transparent;
}

.auth-alert-danger {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.auth-alert-icon { font-size: 0.9375rem; flex-shrink: 0; margin-top: 1px; }
.auth-alert-body { flex: 1; }
.auth-alert-title { font-weight: 700; margin-bottom: 2px; }
.auth-alert-msg   { opacity: 0.85; }

/* ── Footer ── */
.auth-card-footer {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.auth-mail-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    transition: color 0.15s;
}

.auth-mail-link:hover { color: #0f172a; }

.auth-sysnav { font-size: 0.75rem; color: #94a3b8; }
.auth-sysnav a { color: #64748b; text-decoration: none; font-weight: 500; }
.auth-sysnav a:hover { color: #0f172a; }

/* ── Responsive ── */
@media (max-width: 480px) {
    body { padding: 16px 12px; align-items: flex-start; padding-top: 40px; }
    .auth-card { padding: 32px 22px 28px; }
    .auth-form-title { font-size: 1.25rem; }
}
