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

/* ── Body ────────────────────────────────────────────────────────────────── */
.mp-login-body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #fff;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px 80px;
    color: #1a1a2e;
    -webkit-font-smoothing: antialiased;
}

.mp-login-main {
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 20px 0;
}

/* ── Card ────────────────────────────────────────────────────────────────── */
.mp-login-card {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: relative;
}

/* ── Views ───────────────────────────────────────────────────────────────── */
.mp-view { display: none; flex-direction: column; align-items: stretch; }
.mp-view--active { display: flex; }

/* ── Logo ────────────────────────────────────────────────────────────────── */
.mp-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 32px;
}
.mp-logo-img { max-height: 20px; width: auto; object-fit: contain; }
.mp-logo-text {
    font-size: 30px;
    font-weight: 800;
    color: #1a1a2e;
    letter-spacing: -.03em;
    line-height: 1;
}
.mp-logo-dot { color: #4cbb17; }
.mp-logo-label {
    font-size: 11px;
    font-weight: 700;
    color: #2D3748;
    margin-top: 6px;
    text-transform: uppercase;
}

/* ── Typography ─────────────────────────────────────────────────────────── */
.mp-heading {
    font-size: 22px;
    font-weight: 600;
    color: #1a1a2e;
    letter-spacing: -.02em;
    text-align: center;
    margin-bottom: 10px;
}
.mp-subheading {
    font-size: 14px;
    color: #6b7280;
    text-align: center;
    line-height: 1.5;
    margin-bottom: 28px;
}

/* ── Form fields ─────────────────────────────────────────────────────────── */
.mp-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.mp-field-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}
.mp-field label {
    font-size: 13px;
    font-weight: 600;
    color: #4b5563;
}
.mp-field input[type="text"],
.mp-field input[type="email"],
.mp-field input[type="password"],
.mp-field textarea {
    width: 100%;
    height: 46px;
    border: 1.5px solid #E4E4E4;
    border-radius: 10px;
    padding: 0 14px;
    font-size: 16px; /* min. 16px zapobiega zoom na iOS */
    color: #1a1a2e;
    background: #fff;
    font-family: inherit;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.mp-field textarea {
    height: auto;
    min-height: 90px;
    padding: 12px 14px;
    resize: vertical;
    line-height: 1.5;
}
.mp-field input:focus,
.mp-field textarea:focus {
    border-color: #4cbb17;
    box-shadow: 0 0 0 3px rgba(76,187,23,.12);
}
.mp-field input::placeholder,
.mp-field textarea::placeholder { color: #9ca3af; }

.mp-help-text { font-size: 12px; color: #9ca3af; line-height: 1.4; margin-top: 2px; }

/* ── Checkbox ────────────────────────────────────────────────────────────── */
.mp-field--checkbox .mp-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 13.5px;
    color: #4b5563;
    font-weight: 400;
}
.mp-field--checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 2px;
    accent-color: #4cbb17;
    cursor: pointer;
}
.mp-field--checkbox a { color: #4cbb17; text-decoration: underline; text-underline-offset: 2px; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.mp-btn-primary {
    width: 100%;
    height: 48px;
    background: #4cbb17;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, transform .1s;
    font-family: inherit;
    margin-top: 6px;
}
.mp-btn-primary:hover { background: #3da312; }
.mp-btn-primary:active { transform: scale(.98); }
.mp-btn-primary:disabled { background: #9ca3af; cursor: not-allowed; }

.mp-btn-outline {
    width: 100%;
    height: 48px;
    background: transparent;
    color: #1a1a2e;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .15s, color .15s;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.mp-btn-outline:hover { border-color: #4cbb17; color: #4cbb17; }

.mp-link-btn {
    background: none;
    border: none;
    padding: 0;
    font-size: 12.5px;
    color: #6b7280;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
}
.mp-link-btn:hover { color: #4cbb17; }

/* ── Back link ───────────────────────────────────────────────────────────── */
.mp-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    margin-bottom: 24px;
    align-self: flex-start;
    font-family: inherit;
}
.mp-back-link:hover { color: #4cbb17; }

/* ── Divider ─────────────────────────────────────────────────────────────── */
.mp-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0 18px;
}
.mp-divider::before, .mp-divider::after {
    content: ''; flex: 1; height: 1px; background: #e8eaed;
}
.mp-divider span { font-size: 12px; color: #9ca3af; font-weight: 500; }

/* ── Alerts ──────────────────────────────────────────────────────────────── */
.mp-alert {
    padding: .75rem 1rem;
    border-radius: 8px;
    font-size: 13.5px;
    line-height: 1.4;
    margin-bottom: 16px;
}
.mp-alert--error   { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.mp-alert--success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; text-align: center; margin-bottom: 30px; }

/* ── Success state ───────────────────────────────────────────────────────── */
.mp-success { text-align: center; padding: 20px 0; }
.mp-success-icon {
    width: 64px; height: 64px; border-radius: 50%;
    background: #f0fdf4; color: #4cbb17;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 32px; font-weight: 700; margin-bottom: 18px;
}

/* ── Footer text ─────────────────────────────────────────────────────────── */
.mp-footer-text {
    margin-top: 24px;
    font-size: 12px;
    color: #9ca3af;
    text-align: center;
    line-height: 1.5;
}
.mp-footer-text a { color: #6b7280; text-decoration: underline; text-underline-offset: 3px; }

/* ── Turnstile ───────────────────────────────────────────────────────────── */
.mp-turnstile-wrap { margin-bottom: 12px; min-height: 0; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .mp-login-body { padding: 24px 20px 60px; }
    .mp-heading { font-size: 20px; }
    .mp-logo-text, .mp-logo-dot { font-size: 26px; }
}