/* ══════════════════════════════════════════════════════════
   Findrack Interiors — Login
   Light, contemporary, minimal
   ══════════════════════════════════════════════════════════ */

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

body.findrack-pm-login {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #FAF9F7;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: #1a1a1a;
}

/* ── Page layout ── */

.fl-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Top bar ── */

.fl-top {
    padding: 24px 32px;
    flex-shrink: 0;
}

.fl-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 400;
    color: #999;
    text-decoration: none;
    letter-spacing: 0.2px;
    transition: color 250ms ease;
}

.fl-back:hover {
    color: #6B2737;
}

/* ── Main — vertically centred ── */

.fl-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 24px 40px;
}

/* ── Card ── */

.fl-card {
    width: 100%;
    max-width: 360px;
    animation: fadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Logo ── */

.fl-logo {
    display: block;
    width: 280px;
    height: auto;
    margin: 0 auto 48px;
}

/* ── Form ── */

.fl-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 24px;
}

/* ── Field ── */

.fl-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fl-field label {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #888;
}

.fl-field input {
    width: 100%;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #E5E2DD;
    border-radius: 8px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 400;
    color: #1a1a1a;
    outline: none;
    transition: border-color 250ms ease, box-shadow 250ms ease;
}

.fl-field input:focus {
    border-color: #6B2737;
    box-shadow: 0 0 0 3px rgba(107, 39, 55, 0.06);
}

.fl-field input::placeholder {
    color: #ccc;
}

/* Autofill override */
.fl-field input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #fff inset;
    -webkit-text-fill-color: #1a1a1a;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
}

/* ── Error ── */

.fl-error {
    padding: 12px 16px;
    background: #FEF2F2;
    border: 1px solid #FCDCDC;
    border-radius: 8px;
    font-size: 13px;
    color: #9B1C1C;
    text-align: center;
}

/* ── Submit ── */

.fl-submit {
    width: 100%;
    padding: 14px;
    background: #6B2737;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: background 250ms ease, transform 150ms ease, box-shadow 250ms ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.fl-submit:hover {
    background: #572030;
    box-shadow: 0 4px 16px rgba(107, 39, 55, 0.18);
}

.fl-submit:active {
    transform: scale(0.985);
}

/* Loading state */
.fl-submit__loading {
    display: none;
    gap: 5px;
    align-items: center;
    justify-content: center;
}

.fl-submit__loading span {
    width: 5px;
    height: 5px;
    background: rgba(255,255,255,0.7);
    border-radius: 50%;
    animation: dotPulse 1s ease-in-out infinite;
}
.fl-submit__loading span:nth-child(2) { animation-delay: 0.12s; }
.fl-submit__loading span:nth-child(3) { animation-delay: 0.24s; }

@keyframes dotPulse {
    0%, 60%, 100% { opacity: 0.3; transform: scale(0.85); }
    30% { opacity: 1; transform: scale(1); }
}

.fl-submit:disabled {
    cursor: default;
    opacity: 0.8;
}
.fl-submit:disabled .fl-submit__text { display: none; }
.fl-submit:disabled .fl-submit__loading { display: flex; }

/* ── Forgot link ── */

.fl-forgot {
    display: block;
    text-align: center;
    font-size: 13px;
    color: #aaa;
    text-decoration: none;
    transition: color 250ms ease;
}

.fl-forgot:hover {
    color: #6B2737;
}

/* ── Footer ── */

.fl-bottom {
    padding: 24px 32px;
    text-align: center;
    flex-shrink: 0;
}

.fl-bottom span {
    font-size: 11px;
    color: #ccc;
    letter-spacing: 0.3px;
}

/* ── Responsive ── */

@media (max-width: 480px) {
    .fl-top { padding: 20px 20px; }
    .fl-main { padding: 0 20px 32px; }
    .fl-logo { width: 220px; margin-bottom: 40px; }
    .fl-bottom { padding: 20px; }
}

/* ── WP overrides ── */
body.findrack-pm-login #wpadminbar { display: none !important; }
