/* T-Pulse Forms — design/T-PULSE-STYLE.md */
.tp-forms-shell {
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #05040a;
}

.tp-forms-head {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .65rem 1rem;
    border-bottom: 1px solid rgba(59, 28, 113, .32);
    background: rgba(11, 9, 18, .92);
}

.tp-forms-head-title {
    font-size: 14px;
    font-weight: 700;
    color: #f1f5f9;
}

.tp-forms-head-sub {
    font-size: 11px;
    color: #64748b;
}

.tp-forms-section-title {
    font-size: 12px;
    font-weight: 700;
    color: #a5f3fc;
}

.tp-forms-scroll {
    min-height: 0;
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.tp-forms-card {
    border: 1px solid rgba(59, 28, 113, .32);
    border-radius: .65rem;
    background: rgba(11, 9, 18, .9);
    padding: .75rem 1rem;
    transition: border-color .15s, box-shadow .15s;
}

.tp-forms-card:hover {
    border-color: rgba(34, 211, 238, .28);
    box-shadow: 0 4px 18px rgba(0, 0, 0, .28);
}

.tp-forms-status {
    display: inline-flex;
    align-items: center;
    padding: .15rem .5rem;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, .06);
}

.tp-forms-status.is-draft {
    color: #94a3b8;
    background: rgba(100, 116, 139, .12);
}

.tp-forms-status.is-published {
    color: #6ee7b7;
    background: rgba(52, 211, 153, .1);
}

.tp-forms-status.is-unpublished {
    color: #fcd34d;
    background: rgba(250, 204, 21, .1);
}

.tp-forms-editor-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: .75rem;
    min-height: 0;
    flex: 1;
    overflow: hidden;
    padding: .75rem;
}

@media (max-width: 900px) {
    .tp-forms-editor-layout {
        grid-template-columns: 1fr;
        overflow-y: auto;
    }
}

.tp-forms-question-block {
    border: 1px solid rgba(59, 28, 113, .32);
    border-radius: .5rem;
    background: #13101f;
    padding: .65rem .75rem;
    margin-bottom: .5rem;
}

.tp-forms-question-block.is-dragging {
    opacity: .45;
    border-color: rgba(34, 211, 238, .55);
    box-shadow: 0 0 22px rgba(34, 211, 238, .12);
}

.tp-forms-page-tab {
    padding: .3rem .65rem;
    border-radius: .45rem;
    border: 1px solid rgba(59, 28, 113, .35);
    background: rgba(11, 9, 18, .85);
    color: #94a3b8;
    font-size: 11px;
    cursor: pointer;
    transition: border-color .15s, color .15s;
}

.tp-forms-page-tab.is-active {
    border-color: rgba(34, 211, 238, .45);
    color: #a5f3fc;
}

.tp-forms-page-tab.is-add {
    border-style: dashed;
    color: #64748b;
}

.tp-forms-page-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--tp-form-accent, #a5f3fc);
}

.tp-forms-fill-shell {
    min-height: 100dvh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 1.5rem 1rem 3rem;
}

.tp-forms-fill-card {
    width: 100%;
    max-width: 36rem;
    border: 1px solid var(--tp-form-card-border, rgba(88, 28, 135, .4));
    border-radius: .85rem;
    background: var(--tp-form-card-bg, rgba(12, 8, 22, .98));
    padding: 1.25rem 1.5rem;
    box-shadow: 0 0 38px rgba(168, 85, 247, .18);
}

.tp-forms-fill-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--tp-form-title, #f1f5f9);
}

.tp-forms-fill-desc {
    font-size: 12px;
    color: var(--tp-form-muted, #94a3b8);
}

.tp-forms-progress-wrap {
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .06);
    overflow: hidden;
}

.tp-forms-progress-bar {
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: var(--tp-form-accent, #22d3ee);
    transition: width .25s ease;
}

.tp-forms-nav {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
}

.tp-forms-btn-ghost {
    padding: .55rem 1rem;
    border-radius: .75rem;
    border: 1px solid var(--tp-form-input-border, rgba(59, 28, 113, .4));
    background: transparent;
    color: var(--tp-form-text, #e2e8f0);
    font-size: 13px;
    cursor: pointer;
}

.tp-forms-required {
    color: var(--tp-form-accent, #22d3ee);
}

.tp-forms-choice {
    color: var(--tp-form-text, #e2e8f0);
}

.tp-forms-field {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    margin-bottom: .85rem;
}

.tp-forms-field label {
    font-size: 12px;
    font-weight: 600;
    color: var(--tp-form-text, #e2e8f0);
}

.tp-forms-field .tp-forms-hint {
    font-size: 10px;
    color: var(--tp-form-muted, #64748b);
}

.tp-forms-input,
.tp-forms-textarea,
.tp-forms-select {
    width: 100%;
    padding: .45rem .65rem;
    border-radius: .5rem;
    border: 1px solid var(--tp-form-input-border, rgba(59, 28, 113, .4));
    background: var(--tp-form-input-bg, rgba(0, 0, 0, .35));
    color: var(--tp-form-text, #e2e8f0);
    font-size: 13px;
}

.tp-forms-input:focus,
.tp-forms-textarea:focus,
.tp-forms-select:focus {
    outline: none;
    border-color: rgba(34, 211, 238, .55);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, .12);
}

.tp-forms-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .55rem 1.1rem;
    border: none;
    border-radius: .75rem;
    font-size: 13px;
    font-weight: 700;
    color: #f8fafc;
    background: var(--tp-form-btn, linear-gradient(135deg, #7c3aed, #0891b2));
    box-shadow: 0 0 28px rgba(34, 211, 238, .2);
    cursor: pointer;
    transition: opacity .15s;
}

.tp-forms-submit:hover {
    opacity: .92;
}

.tp-forms-save-indicator {
    font-size: 10px;
    color: #64748b;
}

.tp-forms-save-indicator.is-saved {
    color: #6ee7b7;
}

.tp-forms-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}

.tp-forms-table th,
.tp-forms-table td {
    border: 1px solid rgba(59, 28, 113, .28);
    padding: .4rem .5rem;
    text-align: left;
    color: #cbd5e1;
}

.tp-forms-table th {
    color: #a5f3fc;
    font-weight: 700;
    background: rgba(11, 9, 18, .8);
}

.tp-forms-error {
    color: #fca5a5;
    font-size: 11px;
    margin-bottom: .5rem;
}
