body {
    background: var(--page-bg);
    color: var(--text-primary);
    font: 400 15px/1.6 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    min-height: 100vh;
    padding: 24px;
}
body.form-page {
    padding: 0;
    background: var(--tp-body-bg);
}

/* Shared page container, matching the bridge layout */
.page-container {
    margin: 0 auto;
    max-width: 1280px;
}

/* Form card: centered, modest max-width like bridge cards */
.wrap {
    margin: 0 auto 24px;
    max-width: 1020px;
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, .6) inset,
        0 10px 40px rgba(17, 24, 39, .06);
    overflow: hidden;
}

.brand-header {
    background: var(--surface);
    border-bottom: 4px solid var(--accent-subtle);
    padding: 28px 26px 24px;
    text-align: center;
    color: var(--text-primary);
    position: relative;
}

.brand-header::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--accent);
    border-radius: 4px 4px 0 0;
}

.theme-logo {
    display: block;
    width: 56px;
    height: 56px;
    object-fit: contain;
    margin: 0 auto 12px;
    filter: none;
    position: relative;
    z-index: 1;
}

h1 {
    margin: 0;
    font-weight: 800;
    font-size: 26px;
    letter-spacing: -0.03em;
    line-height: 1.15;
    position: relative;
    z-index: 1;
}

.lead {
    margin: 6px 0 0;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
    position: relative;
    z-index: 1;
}

.body {
    padding: 28px 26px 24px;
}

label {
    display: block;
    text-align: left;
    margin: 0 0 7px;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
}

.field {
    margin-bottom: 20px;
}

input,
textarea,
select {
    width: 100%;
    background: var(--surface-tint);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font: inherit;
    padding: 12px 14px;
    transition: background .15s ease-out, border-color .15s ease-out, box-shadow .15s ease-out;
}

input::placeholder,
textarea::placeholder {
    color: var(--text-tertiary);
}

input:hover,
textarea:hover,
select:hover {
    border-color: var(--border-strong);
}

input:focus,
textarea:focus,
select:focus {
    background: var(--surface);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-subtle);
    outline: none;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

button,
.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
    padding: 13px 16px;
    transition: background .15s ease-out, transform .1s ease-out, box-shadow .15s ease-out, border-color .15s ease-out;
    text-decoration: none;
}

form button { width: 100%; }
form .btn-primary,
form .btn-secondary { width: 100%; }

button:disabled,
.btn-primary:disabled,
.btn-secondary:disabled {
    cursor: not-allowed;
    opacity: .55;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 1px 2px rgba(30, 64, 175, .15);
}

.btn-primary:hover:not(:disabled) {
    background: var(--accent-hover);
    box-shadow: 0 4px 12px rgba(30, 64, 175, .18);
}

.btn-primary:active:not(:disabled) {
    transform: scale(0.98);
}

.btn-secondary {
    background: var(--surface-subtle);
    border: 1px solid var(--border);
    color: var(--text-primary);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--surface-tint);
    border-color: var(--border-strong);
}

button:focus-visible,
.btn-primary:focus-visible,
.btn-secondary:focus-visible {
    outline: 3px solid var(--accent-subtle);
    outline-offset: 2px;
}

.footer {
    padding: 16px 26px;
    color: var(--text-secondary);
    font-size: 13px;
    text-align: center;
    border-top: 1px solid var(--border);
    background: var(--surface-subtle);
}

.status-message {
    text-align: left;
    border: 1px solid;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
}

.status-message.success {
    background: var(--success-subtle);
    border-color: #86efac;
    color: #14532d;
}

.status-message.error {
    background: var(--error-subtle);
    border-color: #fca5a5;
    color: #7f1d1d;
}

.status-message h2 {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 700;
}

.status-message p {
    margin: 0;
}

.seed-summary {
    align-items: center;
    background: var(--surface-subtle);
    border: 1px solid var(--border);
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 14px 16px;
}

.seed-summary__label {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
}

.seed-summary strong {
    color: var(--tp-pink);
    font-size: 24px;
    letter-spacing: -0.03em;
    line-height: 1;
}

.actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.actions .btn-primary,
.actions .btn-secondary,
.actions button {
    flex: 1 1 auto;
    min-width: 160px;
}

.hint {
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-tertiary);
}

.char-counter {
    text-align: right;
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 4px;
}
/* ══════════════════════════════════════════════
   .form-page scoped styles (TP contact-form)
   ══════════════════════════════════════════════ */

.form-page {
    --font: var(--tp-font);
    background: var(--tp-body-bg);
    color: var(--tp-text);
    font-family: var(--font);
    font-size: 20px;
    min-height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* ── Cancel shared .body padding on form-page ── */
.form-page .body {
    padding: 0;
}

/* ── Page container ── */
.form-page .page-container {
    flex: 1 1 auto;
    padding: var(--space-md) var(--space-xl);
    max-width: 1440px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    align-items: center;
}

/* ── Two-column split ── */
.form-page .form-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
    width: 100%;
}

@media (max-width: 1023px) {
    .form-page .form-split {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    .form-page .page-container {
        padding: var(--space-lg);
        align-items: start;
    }
    .form-page {
        min-height: 100vh;
        overflow-y: auto;
    }
}

/* ── Left intro ── */
.form-page .form-intro {
    padding: 0;
}

.form-page .form-intro h2 {
    font-size: 58px;
    font-weight: 200;
    line-height: 1.1;
    letter-spacing: -0.02em;
    font-family: var(--tp-hero-font);
    color: #fff;
    margin: 0 0 var(--space-md);
}

.form-page .form-intro p {
    font-size: 20px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

/* ── Form panel ── */
.form-page .form-panel {
    background: var(--tp-surface);
    border: 1px solid var(--tp-border);
    border-radius: 10px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(17, 24, 39, 0.08);
}

.form-page .form-panel > form {
    padding: 22px 28px;
}

/* ── Brand header (inside panel) ── */
.form-page .brand-header {
    text-align: left;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0 0 var(--space-sm);
    background: transparent;
    border-bottom: none;
}

.form-page .brand-header::after {
    display: none;
}

.form-page .theme-logo {
    width: 50px;
    height: 50px;
    margin: 0;
}

.form-page .brand-header__titles {
    display: flex;
    flex-direction: column;
}

.form-page .brand-header__titles h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--tp-text);
    margin: 0;
}

.form-page .brand-header__titles .lead {
    font-size: 16px;
    color: var(--tp-text-secondary);
    margin: 5px 0 0;
    line-height: 1.4;
}

/* ── Gradient divider ── */
.form-page .form-divider {
    height: 3px;
    width: 100%;
    border-radius: 999px;
    background: var(--tp-gradient-divider);
    margin: var(--space-sm) 0;
}

/* ── Form panel header override ── */
.form-page .form-panel__header {
    border-bottom: none;
    padding: 0 0 var(--space-sm);
    margin-bottom: 0;
}

/* ── Fields ── */
.form-page .field {
    margin-bottom: 12px;
}

.form-page .field label {
    color: var(--tp-text);
    font-weight: 500;
    font-size: 17px;
    margin-bottom: 6px;
}

.form-page input,
.form-page textarea,
.form-page select {
    background: var(--tp-input-bg);
    border: 1px solid var(--tp-input-border);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 18px;
    font-family: var(--font);
    color: var(--tp-text);
    transition: border-color 150ms ease-out, box-shadow 150ms ease-out;
}

.form-page input::placeholder,
.form-page textarea::placeholder {
    color: var(--tp-text-secondary);
}

.form-page input:hover,
.form-page textarea:hover,
.form-page select:hover {
    border-color: var(--tp-border-strong);
}

.form-page input:focus,
.form-page textarea:focus,
.form-page select:focus {
    border-color: var(--tp-input-focus);
    box-shadow: 0 0 0 3px rgba(255, 0, 130, 0.12);
    outline: none;
}

.form-page textarea {
    min-height: 68px;
    resize: vertical;
}

/* ── Submit button ── */
.form-page button[type="submit"] {
    background: var(--tp-pink);
    color: #fff;
    font-weight: 700;
    font-family: var(--font);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-radius: 999px;
    width: 100%;
    padding: 12px 32px;
    border: none;
    cursor: pointer;
    font-size: 18px;
    transition: background 150ms ease-out, transform 100ms ease-out;
    margin-top: 8px;
}

.form-page button[type="submit"]:hover:not(:disabled) {
    background: var(--tp-pink-hover);
}

.form-page button[type="submit"]:active:not(:disabled) {
    transform: scale(0.98);
}

.form-page button[type="submit"]:focus-visible {
    outline: 3px solid rgba(255, 0, 130, 0.3);
    outline-offset: 2px;
}

/* ── Status messages ── */
.form-page .status-message.success {
    background: var(--tp-pink-subtle);
    border-color: #f9bbd3;
    color: #831043;
}

.form-page .status-message.error {
    background: var(--error-subtle);
    border-color: #fecaca;
    color: #7f1d1d;
}

/* ── Hints & counters ── */
.form-page .hint {
    font-size: 15px;
    color: var(--tp-text-secondary);
    margin-top: 4px;
}

.form-page .char-counter {
    font-size: 15px;
    color: var(--tp-text-secondary);
}

/* ── Footer (full-width, dark) ── */
.form-page .footer {
    background: var(--tp-footer-bg);
    color: var(--tp-footer-text);
    border-top: 1px solid #444;
    padding: 12px 26px;
    text-align: center;
    font-size: 16px;
    width: 100%;
    flex-shrink: 0;
}

/* ── Wrap override (reset for form-page) ── */
.form-page .wrap {
    box-shadow: none;
    border: none;
    border-radius: 0;
    background: transparent;
    max-width: none;
}

/* ── Responsive: tablet/mobile ── */
@media (max-width: 768px) {
    .form-page .brand-header {
        padding: 12px 16px;
    }
    .form-page .form-intro h2 {
        font-size: 48px;
    }
    .form-page .form-panel > form {
        padding: 18px 20px;
    }
    .form-page .page-container {
        padding: var(--space-lg) var(--space-md);
    }
}

@media (max-width: 480px) {
    .form-page .form-intro h2 {
        font-size: 42px;
    }
    .form-page .form-panel > form {
        padding: 16px 18px;
    }
}
/* ══════════════════════════════════════════════
   Four-section complaint form extras
   ══════════════════════════════════════════════ */

.form-section {
    margin-bottom: 8px;
}

.form-section__title {
    font-size: 20px;
    font-weight: 700;
    color: var(--tp-text);
    margin: 0 0 14px;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.form-divider--section {
    margin: 18px 0;
    opacity: 0.7;
}

/* Multi-column field rows */
.field-row {
    display: grid;
    gap: 12px;
    align-items: start;
}

.field-row--2 {
    grid-template-columns: repeat(2, 1fr);
}

.field-row--4 {
    grid-template-columns: repeat(4, 1fr);
}

.field-row--5 {
    grid-template-columns: 1.5fr repeat(4, 1fr);
}

.field-row .field {
    margin-bottom: 0;
    min-width: 0;
}


/* Reported person block */
.reported-person {
    border: 1px solid var(--tp-border);
    border-radius: 10px;
    padding: 18px 20px 20px;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.02);
    position: relative;
    transition: border-color 150ms ease-out, box-shadow 150ms ease-out;
}

.reported-person:hover {
    border-color: var(--tp-border-strong);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.reported-person__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--tp-border);
}

.reported-person__title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.reported-person__title h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    color: var(--tp-text);
    letter-spacing: -0.01em;
}

.reported-person__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--tp-pink-subtle);
    color: #831043;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.reported-person__label {
    font-weight: 600;
    font-size: 15px;
    color: var(--tp-text);
}

.btn-remove-person {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    transition: background 150ms ease-out, color 150ms ease-out, border-color 150ms ease-out;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    flex-shrink: 0;
}

.btn-remove-person svg {
    width: 16px;
    height: 16px;
    pointer-events: none;
}

.btn-remove-person:hover {
    background: var(--error-subtle);
    color: var(--error);
    border-color: #fca5a5;
}

.btn-remove-person:focus-visible {
    outline: 3px solid rgba(185, 28, 28, 0.25);
    outline-offset: 1px;
}

.btn-add-person {
    background: var(--tp-input-bg);
    border: 1px dashed var(--tp-border);
    color: var(--tp-text);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    padding: 10px 14px;
    border-radius: 8px;
    width: 100%;
    margin-bottom: 18px;
    transition: background 150ms ease-out, border-color 150ms ease-out;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-add-person:hover {
    background: var(--tp-surface);
    border-color: var(--tp-border-strong);
}

/* Sub-category reveal transition handled by [hidden] */

/* Sub-category reveal transition handled by [hidden] */
.field--subcategory[hidden] {
    display: none;
}

/* Textarea fields keep consistent spacing */
.field--textarea {
    margin-top: 4px;
}


/* Responsive: collapse multi-column rows on smaller viewports */
@media (max-width: 1100px) {
    .field-row--4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .field-row--5 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .form-section__title {
        font-size: 18px;
    }

    .field-row--2,
    .field-row--4,
    .field-row--5 {
        grid-template-columns: 1fr;
    }
    .reported-person {
        padding: 14px 16px 16px;
    }

    .reported-person__header {
        margin-bottom: 14px;
        padding-bottom: 10px;
    }

    .btn-remove-person {
        width: 32px;
        height: 32px;
    }
}

/* ══════════════════════════════════════════════
   Success modal overlay
   ══════════════════════════════════════════════ */

.success-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(17, 24, 39, 0.55);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 200ms ease-out, visibility 200ms ease-out;
}

.success-modal-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

.success-modal {
    background: var(--tp-surface);
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(17, 24, 39, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.04);
    padding: var(--space-2xl) var(--space-2xl) var(--space-xl);
    max-width: 420px;
    width: calc(100% - var(--space-2xl) * 2);
    text-align: center;
    transform: scale(0.95) translateY(8px);
    transition: transform 200ms ease-out;
    position: relative;
}

.success-modal-overlay.is-visible .success-modal {
    transform: scale(1) translateY(0);
}

.success-modal__icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--success-subtle);
    color: var(--success);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-lg);
}

.success-modal__icon svg {
    width: 28px;
    height: 28px;
}

.success-modal__title {
    font-size: 22px;
    font-weight: 700;
    color: var(--tp-text);
    margin: 0 0 var(--space-sm);
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.success-modal__message {
    font-size: 16px;
    color: var(--tp-text-secondary);
    line-height: 1.5;
    margin: 0 0 var(--space-xl);
}

.success-modal__close {
    background: var(--tp-pink);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 11px 32px;
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    font-family: var(--tp-font);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: background 150ms ease-out, transform 100ms ease-out;
}

.success-modal__close:hover {
    background: var(--tp-pink-hover);
}

.success-modal__close:active {
    transform: scale(0.97);
}

.success-modal__close:focus-visible {
    outline: 3px solid rgba(255, 0, 130, 0.3);
    outline-offset: 2px;
}

/* ══════════════════════════════════════════════
   Inline validation error states
   ══════════════════════════════════════════════ */

.field--error input,
.field--error select,
.field--error textarea {
    border-color: var(--error);
}

.field--error input:focus,
.field--error select:focus,
.field--error textarea:focus {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.12);
}

.field-error {
    margin: 4px 0 0;
    font-size: 13px;
    line-height: 1.4;
    color: var(--error);
    font-weight: 600;
}

