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

/* ── Root tokens ──────────────────────────────────── */
:root {
    --fpi-navy:      #0d2246;
    --fpi-input-bg:  #173570;
    --fpi-input-border: #1e4080;
    --fpi-orange:    #e84e1b;
    --fpi-white:     #ffffff;
    --fpi-placeholder: #7494c4;
    --fpi-btn-text:  #0d2246;
    --fpi-error-red: #ff7b5c;
    --fpi-success-green: #4ade80;
    --radius-input:  8px;
    --radius-btn:    50px;
    --font-main:     'DM Sans', sans-serif;
}

/* ── Full-page background ─────────────────────────── */
html, body {
    height: 100%;
    font-family: var(--font-main);
    background-color: var(--fpi-navy);
    color: var(--fpi-white);
}

.fpi-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    background:
        radial-gradient(ellipse 80% 60% at 110% 110%, #0a1d3f 0%, transparent 65%),
        radial-gradient(ellipse 70% 50% at -10% -10%, #1a3a6e 0%, transparent 60%),
        var(--fpi-navy);
}

/* ── Content wrapper ─────────────────────────────── */
.fpi-content {
    width: 100%;
    max-width: 480px;
}

.fpi-content--wide {
    max-width: 580px;
}

/* ── Two-column row ──────────────────────────────── */
.fpi-row {
    display: flex;
    gap: 16px;
}

.fpi-col {
    flex: 1;
    min-width: 0;
}

@media (max-width: 480px) {
    .fpi-row {
        flex-direction: column;
        gap: 0;
    }
}

/* ── Logo ─────────────────────────────────────────── */
.fpi-logo-wrap {
    margin-bottom: 40px;
}

.fpi-logo-wrap svg {
    width: 200px;
    height: auto;
    display: block;
}

/* ── Heading ──────────────────────────────────────── */
.fpi-heading {
    font-size: clamp(26px, 6vw, 32px);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.3px;
    color: var(--fpi-white);
    margin-bottom: 36px;
}

/* ── Field wrapper ───────────────────────────────── */
.fpi-field {
    margin-bottom: 4px;
}

/* ── Input ────────────────────────────────────────── */
.fpi-input {
    display: block;
    width: 100%;
    background: var(--fpi-input-bg);
    border: 1.5px solid var(--fpi-input-border);
    border-radius: var(--radius-input);
    padding: 15px 18px;
    font-family: var(--font-main);
    font-size: 15px;
    font-weight: 400;
    color: var(--fpi-white);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 0;
}

.fpi-input::placeholder {
    color: var(--fpi-placeholder);
    font-weight: 400;
}

.fpi-input:focus {
    border-color: rgba(255, 255, 255, 0.45);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}

/* ── Input error state ───────────────────────────── */
.fpi-input--error {
    border-color: var(--fpi-error-red);
}

.fpi-input--error:focus {
    border-color: var(--fpi-error-red);
    box-shadow: 0 0 0 3px rgba(255, 123, 92, 0.15);
}

/* ── Field-level error text ──────────────────────── */
.fpi-field-error {
    color: var(--fpi-error-red);
    font-size: 13px;
    min-height: 20px;
    padding: 2px 0 0;
}

/* ── Select dropdown ─────────────────────────────── */
.fpi-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%237494c4' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    cursor: pointer;
}

.fpi-select option {
    background: var(--fpi-navy);
    color: var(--fpi-white);
}

/* placeholder-style for unselected */
.fpi-select:invalid,
.fpi-select option[value=""] {
    color: var(--fpi-placeholder);
}

/* ── Checkbox ────────────────────────────────────── */
.fpi-checkbox-wrap {
    margin-bottom: 8px;
}

.fpi-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: var(--fpi-placeholder);
    cursor: pointer;
    line-height: 1.4;
}

.fpi-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--fpi-orange);
    flex-shrink: 0;
    cursor: pointer;
}

/* ── Submit button ────────────────────────────────── */
.fpi-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--fpi-white);
    color: var(--fpi-btn-text);
    border: none;
    border-radius: var(--radius-btn);
    padding: 13px 36px;
    font-family: var(--font-main);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.2);
    min-width: 140px;
    min-height: 48px;
}

.fpi-btn:hover:not(:disabled) {
    background: #e8edf5;
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.28);
}

.fpi-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.fpi-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ── Spinner ─────────────────────────────────────── */
.fpi-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(13, 34, 70, 0.2);
    border-top-color: var(--fpi-btn-text);
    border-radius: 50%;
    animation: fpi-spin 0.6s linear infinite;
}

@keyframes fpi-spin {
    to { transform: rotate(360deg); }
}

/* ── Toast notification ──────────────────────────── */
.fpi-toast {
    border-radius: var(--radius-input);
    padding: 12px 16px;
    font-size: 14px;
    margin-bottom: 20px;
    animation: fpi-fade-in 0.3s ease;
}

.fpi-toast--error {
    background: rgba(255, 123, 92, 0.15);
    border: 1px solid rgba(255, 123, 92, 0.4);
    color: #ffb49c;
}

.fpi-toast--success {
    background: rgba(74, 222, 128, 0.15);
    border: 1px solid rgba(74, 222, 128, 0.4);
    color: var(--fpi-success-green);
}

@keyframes fpi-fade-in {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Success state ───────────────────────────────── */
.fpi-success {
    text-align: center;
    padding: 24px 0;
    animation: fpi-fade-in 0.4s ease;
}

.fpi-success-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(74, 222, 128, 0.15);
    color: var(--fpi-success-green);
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.fpi-success h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
}

.fpi-success p {
    font-size: 15px;
    color: var(--fpi-placeholder);
    margin-bottom: 8px;
}

.fpi-success strong {
    color: var(--fpi-white);
}

.fpi-success-sub {
    font-size: 13px !important;
    opacity: 0.7;
}

/* ── Links ───────────────────────────────────────── */
.fpi-link {
    color: var(--fpi-white);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: opacity 0.2s ease;
}

.fpi-link:hover {
    opacity: 0.8;
}

.fpi-link-text {
    margin-top: 28px;
    font-size: 14px;
    color: var(--fpi-placeholder);
}

/* ── Error / validation (legacy) ─────────────────── */
.fpi-error {
    color: var(--fpi-error-red);
    font-size: 13px;
    margin-top: -18px;
    margin-bottom: 16px;
}

/* ── Alert (Laravel session flash) ───────────────── */
.fpi-alert {
    background: rgba(232, 78, 27, 0.15);
    border: 1px solid rgba(232, 78, 27, 0.4);
    border-radius: var(--radius-input);
    padding: 12px 16px;
    font-size: 14px;
    color: #ffb49c;
    margin-bottom: 20px;
}

/* ── Responsive ──────────────────────────────────── */
@media (min-width: 576px) {
    .fpi-page {
        padding: 48px 40px;
    }
}

@media (min-width: 992px) {
    .fpi-heading {
        font-size: 36px;
    }
}
