/* ── MyFLOWty Auth + Frames Stylesheet ───────────────────────────────────────
   Append this to myflowty-style.css or import separately.
   ─────────────────────────────────────────────────────────────────────────── */

/* ── USER PILL ──────────────────────────────────────────────── */
#user-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    position: relative;
}

.pill-signin, .pill-signup {
    font-size: 11px !important;
}

.pill-signup {
    background: var(--accent-dim) !important;
    color: var(--accent) !important;
    border: 1px solid rgba(232,160,32,0.3) !important;
}

.pill-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background .15s;
}

    .pill-wrap:hover {
        background: var(--surface3);
    }

.pill-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--accent);
    color: #111;
    font-weight: 700;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pill-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.pill-name {
    font-size: 11px;
    color: var(--text);
}

.pill-tier {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 1px 4px;
    border-radius: 2px;
}

.tier-free {
    background: rgba(80,144,224,.15);
    color: #5090e0;
}

.tier-pro {
    background: rgba(232,160,32,.15);
    color: #e8a020;
}

.tier-enterprise {
    background: rgba(144,96,208,.15);
    color: #9060d0;
}

.tier-none {
    background: var(--surface3);
    color: var(--text3);
}

.pill-caret {
    color: var(--text3);
    margin-left: 2px;
}

/* Pill dropdown */
.pill-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    background: var(--surface);
    border: 1px solid var(--border2);
    border-radius: 4px;
    min-width: 160px;
    padding: 4px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,.6);
    z-index: 500;
}

    .pill-menu.open {
        display: block;
    }

.pill-menu-item {
    padding: 7px 14px;
    font-size: 11px;
    color: var(--text2);
    cursor: pointer;
    transition: all .1s;
}

    .pill-menu-item:hover {
        background: var(--surface3);
        color: var(--text);
    }

    .pill-menu-item.highlight {
        color: var(--accent);
    }

    .pill-menu-item.danger {
        color: var(--red);
    }

.pill-menu-sep {
    height: 1px;
    background: var(--border);
    margin: 3px 0;
}

/* ── DEV TIER SWITCHER ───────────────────────────────────────── */
.dev-tier-switcher {
    display: flex;
    align-items: center;
    position: relative;
}

.dev-tier-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 9px;
    background: rgba(232,160,32,0.1);
    border: 1px solid rgba(232,160,32,0.3);
    border-radius: var(--r-sm);
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
}

    .dev-tier-btn svg {
        width: 12px;
        height: 12px;
    }

    .dev-tier-btn:hover {
        background: rgba(232,160,32,0.2);
        border-color: var(--accent);
    }

.dev-tier-label {
    letter-spacing: 0.5px;
}

.dev-tier-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    background: var(--surface);
    border: 1px solid var(--border2);
    border-radius: 4px;
    min-width: 140px;
    padding: 4px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,.6);
    z-index: 500;
}

    .dev-tier-menu.open {
        display: block;
    }

.dev-tier-menu-header {
    padding: 6px 12px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text3);
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
}

.dev-tier-menu-item {
    padding: 7px 14px;
    font-size: 11px;
    font-family: var(--font-mono);
    color: var(--text2);
    cursor: pointer;
    transition: all .1s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .dev-tier-menu-item:hover {
        background: var(--surface3);
        color: var(--text);
    }

    .dev-tier-menu-item.active {
        color: var(--accent);
        background: rgba(232,160,32,0.1);
    }

/* ── MODAL OVERLAY ───────────────────────────────────────────── */
#modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0,0,0,.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .2s;
    backdrop-filter: blur(3px);
}

    #modal-overlay.open {
        opacity: 1;
    }

.modal-box {
    background: var(--surface);
    border: 1px solid var(--border2);
    border-radius: 6px;
    width: 380px;
    max-width: 95vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 12px 48px rgba(0,0,0,.7);
}

    .modal-box.modal-wide {
        width: 900px;
    }

    .modal-box.modal-med {
        width: 500px;
    }

    .modal-box.modal-gate {
        width: 360px;
    }

.modal-header {
    display: flex;
    align-items: center;
    padding: 16px 18px 12px;
    border-bottom: 1px solid var(--border);
    gap: 10px;
}

.modal-logo {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 1.5px;
}

.modal-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    flex: 1;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text3);
    font-size: 14px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 3px;
    transition: color .15s;
}

    .modal-close:hover {
        color: var(--text);
    }

.modal-body {
    padding: 18px;
}

.modal-field {
    margin-bottom: 14px;
}

    .modal-field label {
        display: block;
        font-size: 10px;
        text-transform: uppercase;
        letter-spacing: .8px;
        color: var(--text3);
        margin-bottom: 5px;
    }

    .modal-field input {
        width: 100%;
        background: var(--surface2);
        border: 1px solid var(--border);
        color: var(--text);
        font-family: var(--font);
        font-size: 11px;
        padding: 7px 10px;
        border-radius: 3px;
        outline: none;
    }

        .modal-field input:focus {
            border-color: var(--accent);
        }

.modal-btn {
    display: block;
    width: 100%;
    padding: 9px;
    border-radius: 4px;
    font-family: var(--font);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .5px;
    cursor: pointer;
    border: 1px solid var(--border2);
    background: var(--surface3);
    color: var(--text2);
    transition: all .15s;
    text-align: center;
    margin-top: 8px;
}

    .modal-btn:hover {
        background: var(--border);
        color: var(--text);
    }

    .modal-btn.primary {
        background: var(--accent);
        color: #111;
        border-color: var(--accent);
    }

        .modal-btn.primary:hover {
            background: var(--accent2);
        }

    .modal-btn.danger {
        color: var(--red);
        border-color: rgba(224,80,80,.3);
    }

        .modal-btn.danger:hover {
            background: rgba(224,80,80,.1);
        }

    .modal-btn.small {
        width: auto;
        padding: 3px 8px;
        font-size: 10px;
        display: inline-block;
        margin: 0;
    }

    .modal-btn.active-btn {
        background: var(--accent-dim);
        color: var(--accent);
        border-color: var(--accent);
    }

    .modal-btn:disabled {
        opacity: .4;
        cursor: not-allowed;
    }

.modal-error {
    color: var(--red);
    font-size: 10px;
    min-height: 16px;
    margin: 6px 0;
}

.modal-alt {
    font-size: 10px;
    color: var(--text3);
    text-align: center;
    margin-top: 10px;
}

    .modal-alt a, .modal-note a {
        color: var(--accent);
        cursor: pointer;
        text-decoration: none;
    }

        .modal-alt a:hover, .modal-note a:hover {
            text-decoration: underline;
        }

.modal-note {
    font-size: 10px;
    color: var(--text3);
    line-height: 1.6;
    margin-top: 10px;
}

/* ── PRICING MODAL ───────────────────────────────────────────── */
/* ── PRICING MODAL ───────────────────────────────────────────── */
.pricing-subtitle {
    text-align: center;
    font-size: 13px;
    color: var(--text2);
    margin-bottom: 24px;
    font-weight: 400;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

@media (max-width: 900px) {
    .pricing-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

.pricing-card {
    background: var(--surface2);
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    transition: all .2s ease;
}

    .pricing-card:hover {
        border-color: var(--border2);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }

[data-theme="dark"] .pricing-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.pricing-card.featured {
    border-color: var(--accent);
    background: var(--surface1);
}

    .pricing-card.featured:hover {
        border-color: var(--accent);
        box-shadow: var(--accent-glow);
    }

[data-theme="dark"] .pricing-card.featured:hover {
    box-shadow: var(--accent-glow);
}

.pricing-card.current {
    border-color: var(--green);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 12px;
    background: var(--accent);
    color: #fff;
    white-space: nowrap;
}

.pricing-tier {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: var(--text);
}

.pricing-price {
    font-size: 36px;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
}

    .pricing-price .pricing-period {
        font-size: 16px;
        font-weight: 500;
        color: var(--text3);
        margin-left: 2px;
    }

.pricing-desc {
    font-size: 12px;
    color: var(--text3);
    font-weight: 400;
    min-height: 32px;
    line-height: 1.4;
}

.pricing-features {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    margin: 0;
    padding: 0;
    list-style: none;
}

    .pricing-features li {
        font-size: 13px;
        color: var(--text2);
        line-height: 1.4;
        display: flex;
        align-items: flex-start;
        gap: 10px;
    }

        .pricing-features li svg {
            width: 16px;
            height: 16px;
            flex-shrink: 0;
            margin-top: 1px;
        }

        .pricing-features li.feat-included svg {
            color: var(--green);
        }

        .pricing-features li.feat-excluded {
            color: var(--text3);
        }

            .pricing-features li.feat-excluded svg {
                color: var(--text3);
                opacity: 0.6;
            }

.pricing-btn {
    width: 100%;
    padding: 12px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all .15s ease;
    background: var(--surface3);
    color: var(--text);
    border: 1px solid var(--border);
}

    .pricing-btn:hover {
        background: var(--surface1);
        border-color: var(--border2);
    }

.pricing-btn-primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

    .pricing-btn-primary:hover {
        background: var(--accent2);
        border-color: var(--accent2);
        transform: translateY(-1px);
        box-shadow: var(--accent-glow);
    }

.pricing-current-badge {
    width: 100%;
    padding: 12px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    border-radius: 6px;
    background: rgba(80, 184, 120, 0.15);
    color: var(--green);
    border: 1px solid var(--green);
}

[data-theme="light"] .pricing-current-badge {
    background: rgba(80, 184, 120, 0.1);
}

.pricing-footer {
    text-align: center;
    font-size: 11px;
    color: var(--text3);
    padding-top: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

    .pricing-footer svg {
        width: 14px;
        height: 14px;
        opacity: 0.5;
    }

/* ── PAYMENT MODAL ───────────────────────────────────────────── */
.payment-summary {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 14px;
    margin-bottom: 16px;
    text-align: center;
}

.payment-plan {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 4px;
}

.payment-price {
    font-size: 28px;
    font-weight: 700;
}

    .payment-price span {
        font-size: 12px;
        color: var(--text3);
        font-weight: 400;
    }

.payment-features {
    font-size: 10px;
    color: var(--text3);
    margin-top: 6px;
}

.payment-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.payment-option-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--text3);
    margin-bottom: 2px;
}

/* ── FLOWS MODAL ────────────────────────────────────────────── */
.flows-meta {
    display: flex;
    align-items: center;
    font-size: 10px;
    color: var(--text3);
    margin-bottom: 12px;
}

.flows-list {
    min-height: 80px;
    max-height: 300px;
    overflow-y: auto;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 4px;
}

.flows-empty {
    padding: 24px;
    text-align: center;
    font-size: 11px;
    color: var(--text3);
    line-height: 1.7;
}

    .flows-empty kbd {
        background: var(--surface3);
        border: 1px solid var(--border2);
        border-radius: 2px;
        padding: 0 4px;
        font-family: var(--font);
    }

.flow-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    gap: 10px;
    transition: background .1s;
}

    .flow-item:last-child {
        border-bottom: none;
    }

    .flow-item:hover {
        background: var(--surface3);
    }

.flow-item-name {
    font-size: 11px;
    color: var(--text);
    flex: 1;
}

.flow-item-meta {
    font-size: 9px;
    color: var(--text3);
}

/* ── ACCOUNT MODAL ───────────────────────────────────────────── */
.account-info {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 20px;
}

.account-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent);
    color: #111;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.account-name {
    font-size: 13px;
    font-weight: 600;
}

.account-email {
    font-size: 10px;
    color: var(--text3);
    margin-top: 2px;
}

.account-section-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text3);
    margin-bottom: 8px;
}

.account-rolesets {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
}

.account-roleset {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 4px;
}

    .account-roleset.active {
        border-color: var(--accent);
        background: var(--accent-dim);
    }

.account-roleset-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.account-roleset-name {
    font-size: 11px;
    color: var(--text);
    flex: 1;
}

/* ── GATE MODAL ──────────────────────────────────────────────── */
.gate-reason {
    font-size: 13px;
    color: var(--text);
    line-height: 1.6;
    text-align: center;
    padding: 10px 0;
}

/* ── FRAME PANEL ─────────────────────────────────────────────── */
#frame-panel {
    border-top: 1px solid var(--border);
    padding: 8px 10px 10px;
}

.frame-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 10px;
    letter-spacing: 1.5px;
    color: var(--text3);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.frame-panel-btn {
    background: var(--surface3);
    border: 1px solid var(--border2);
    color: var(--text2);
    font-family: var(--font);
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 3px;
    cursor: pointer;
    transition: all .15s;
}

    .frame-panel-btn:hover {
        background: var(--border2);
        color: var(--text);
    }

    .frame-panel-btn.full {
        width: 100%;
        margin-top: 6px;
        text-align: center;
        display: block;
    }

    .frame-panel-btn.locked {
        color: var(--text3);
        cursor: pointer;
    }

    .frame-panel-btn.danger {
        color: var(--red);
        border-color: rgba(224,80,80,.3);
    }

.frame-panel-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.frame-empty {
    font-size: 10px;
    color: var(--text3);
    line-height: 1.6;
    text-align: center;
    padding: 8px 0;
}

.frame-hint {
    font-size: 10px;
    color: var(--text3);
    text-align: center;
    padding: 4px 0;
}

.frame-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 4px;
}

.frame-badge {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    background: var(--surface2);
    border: 1px solid var(--border2);
    color: var(--text3);
    font-size: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .15s;
}

    .frame-badge:hover {
        border-color: var(--accent);
        color: var(--accent);
    }

    .frame-badge.assigned {
        background: var(--accent-dim);
        border-color: var(--accent);
        color: var(--accent);
    }

.frame-assign-wrap {
    display: flex;
    gap: 6px;
    align-items: center;
}

.frame-num-input {
    width: 60px;
    background: var(--surface2);
    border: 1px solid var(--border);
    color: var(--text);
    font-family: var(--font);
    font-size: 11px;
    padding: 4px 6px;
    border-radius: 3px;
    outline: none;
}

    .frame-num-input:focus {
        border-color: var(--accent);
    }

.frame-assigned-list {
    font-size: 10px;
    color: var(--text3);
    line-height: 1.8;
}

.frame-tag {
    display: inline-block;
    background: var(--accent-dim);
    color: var(--accent);
    border-radius: 3px;
    padding: 1px 5px;
    margin: 2px;
    cursor: pointer;
    transition: background .1s;
}

    .frame-tag:hover {
        background: rgba(224,80,80,.15);
        color: var(--red);
    }

/* ── SLIDESHOW BAR ───────────────────────────────────────────── */
#slideshow-bar {
    position: absolute;
    bottom: 44px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--border2);
    border-radius: 6px;
    padding: 8px 14px;
    box-shadow: 0 4px 20px rgba(0,0,0,.6);
    z-index: 300;
}

.ss-btn {
    background: var(--surface3);
    border: 1px solid var(--border2);
    color: var(--text2);
    font-family: var(--font);
    font-size: 13px;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    transition: all .15s;
}

    .ss-btn:hover {
        background: var(--border2);
        color: var(--text);
    }

    .ss-btn.active {
        background: var(--accent-dim);
        color: var(--accent);
        border-color: var(--accent);
    }

    .ss-btn.ss-exit {
        font-size: 10px;
        padding: 5px 12px;
        margin-left: 8px;
    }

.ss-counter {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    min-width: 60px;
    text-align: center;
    letter-spacing: .5px;
}

.ss-current {
    color: var(--accent);
}

.ss-sep {
    color: var(--text3);
    margin: 0 2px;
}

.ss-speed {
    background: var(--surface3);
    border: 1px solid var(--border2);
    color: var(--text2);
    font-family: var(--font);
    font-size: 10px;
    padding: 4px 4px;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.ss-dots {
    display: flex;
    gap: 5px;
    align-items: center;
}

.ss-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--border2);
    cursor: pointer;
    transition: background .15s;
}

    .ss-dot.active {
        background: var(--accent);
    }

/* Slideshow canvas overlay hint */
#canvas-wrap.slideshow-mode::before {
    content: '▶ SLIDESHOW';
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--accent);
    background: var(--accent-dim);
    border: 1px solid rgba(232,160,32,.3);
    padding: 3px 8px;
    border-radius: 3px;
    pointer-events: none;
    z-index: 200;
}

/* ── PRO CHECKOUT MODAL ────────────────────────────────────── */
.modal-checkout {
    max-width: 500px;
}

.checkout-summary {
    text-align: center;
    padding: 24px;
    background: var(--surface2);
    border-radius: 8px;
    margin-bottom: 24px;
    position: relative;
}

.checkout-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: #111;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.checkout-summary h3 {
    font-size: 20px;
    margin: 0 0 12px 0;
    color: var(--text);
}

.checkout-price {
    font-size: 42px;
    font-weight: 700;
    color: var(--accent);
    margin: 16px 0;
    line-height: 1;
}

    .checkout-price span {
        font-size: 16px;
        font-weight: 400;
        color: var(--text3);
    }

.checkout-features {
    list-style: none;
    padding: 0;
    margin: 16px 0 0 0;
    text-align: left;
}

    .checkout-features li {
        padding: 6px 0;
        font-size: 13px;
        color: var(--text2);
    }

.checkout-divider {
    height: 1px;
    background: var(--border2);
    margin: 24px 0;
}

.checkout-payment h4 {
    font-size: 14px;
    margin: 0 0 16px 0;
    color: var(--text2);
    font-weight: 600;
}

.checkout-stripe-btn {
    width: 100%;
    padding: 14px;
    background: #635bff;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all .15s;
}

    .checkout-stripe-btn:hover {
        background: #7a73ff;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(99, 91, 255, 0.3);
    }

    .checkout-stripe-btn:active {
        transform: translateY(0);
    }

.checkout-secure {
    text-align: center;
    font-size: 11px;
    color: var(--text3);
    margin-top: 12px;
}

.checkout-terms {
    font-size: 11px;
    color: var(--text3);
    text-align: center;
    margin-top: 20px;
    line-height: 1.5;
}

    .checkout-terms a {
        color: var(--accent);
        text-decoration: none;
    }

        .checkout-terms a:hover {
            text-decoration: underline;
        }

/* ── ENTERPRISE CONTACT MODAL ──────────────────────────────── */
.modal-contact {
    max-width: 560px;
}

.contact-intro {
    font-size: 13px;
    color: var(--text2);
    margin-bottom: 20px;
    line-height: 1.5;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.form-group {
    margin-bottom: 16px;
}

    .form-group label {
        display: block;
        font-size: 12px;
        font-weight: 600;
        margin-bottom: 6px;
        color: var(--text2);
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        width: 100%;
        padding: 9px 12px;
        background: var(--surface2);
        border: 1px solid var(--border2);
        border-radius: 4px;
        color: var(--text);
        font-size: 13px;
        font-family: var(--font);
        transition: border-color .15s;
    }

        .form-group input:focus,
        .form-group select:focus,
        .form-group textarea:focus {
            outline: none;
            border-color: var(--accent);
        }

    .form-group textarea {
        resize: vertical;
        min-height: 80px;
    }

.form-error {
    font-size: 12px;
    color: var(--danger);
    margin: 12px 0;
    min-height: 18px;
}

.contact-footer {
    text-align: center;
    font-size: 12px;
    color: var(--text3);
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border2);
}

    .contact-footer a {
        color: var(--accent);
        text-decoration: none;
    }

        .contact-footer a:hover {
            text-decoration: underline;
        }

/* ── SUCCESS MODAL ─────────────────────────────────────────── */
.modal-success {
    max-width: 450px;
    text-align: center;
}

.success-icon {
    font-size: 64px;
    margin: 20px 0;
}

.modal-success h3 {
    font-size: 22px;
    margin: 0 0 12px 0;
    color: var(--text);
}

.modal-success p {
    font-size: 14px;
    color: var(--text2);
    margin-bottom: 20px;
}

.success-features {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
    text-align: left;
    display: inline-block;
}

    .success-features li {
        padding: 6px 0;
        font-size: 13px;
        color: var(--text2);
    }

/* ── TOAST NOTIFICATIONS ───────────────────────────────────── */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--surface2);
    border: 1px solid var(--border2);
    color: var(--text);
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 13px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 10000;
    opacity: 0;
    transform: translateY(20px);
    transition: all .3s ease;
    max-width: 400px;
}

    .toast.show {
        opacity: 1;
        transform: translateY(0);
    }

    .toast.toast-success {
        background: rgba(80,144,80,0.15);
        border-color: rgba(80,144,80,0.3);
        color: #6bc76b;
    }

/* ═══════════════════════════════════════════════════════
   SCHEMA SELECTOR & MODAL
   ═══════════════════════════════════════════════════════ */

.schema-selector-btn {
    display: flex;
    align-items: center;
    background: var(--surface2);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-family: var(--font);
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
}

    .schema-selector-btn:hover {
        background: var(--surface3);
        border-color: var(--border2);
    }

    .schema-selector-btn svg {
        flex-shrink: 0;
    }

.schema-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.schema-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: all .15s;
    gap: 10px;
}

    .schema-item:hover {
        background: var(--surface3);
        border-color: var(--border2);
    }

    .schema-item.active {
        background: var(--accent-dim);
        border-color: var(--accent);
    }

    .schema-item input[type="radio"] {
        margin: 0;
        cursor: pointer;
    }

.schema-name {
    flex: 1;
    font-size: 13px;
    color: var(--text);
    font-weight: 500;
}

.schema-item-count {
    font-size: 11px;
    color: var(--text3);
    background: var(--surface1);
    padding: 2px 8px;
    border-radius: 10px;
}

.schema-action-btn {
    background: transparent;
    border: none;
    font-size: 14px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity .15s;
    padding: 4px;
}

    .schema-action-btn:hover {
        opacity: 1;
    }

.modal-help-text {
    font-size: 13px;
    color: var(--text2);
    line-height: 1.5;
    margin: 0;
}

.tier-limit-note {
    font-size: 12px;
    color: var(--text3);
}

/* ── ACCOUNT MODAL ─────────────────────────────────────────────────────────── */

.acct-avatar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.acct-avatar-lg {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--accent);
    color: #111;
    font-weight: 700;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.acct-section {
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--border);
}

.acct-section-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text3);
    margin-bottom: 12px;
}

.acct-expand-btn {
    background: none;
    border: none;
    color: var(--accent);
    font-family: var(--font);
    font-size: 10px;
    cursor: pointer;
    padding: 0;
    letter-spacing: 0;
    text-transform: none;
    font-weight: 600;
    opacity: 0.85;
    transition: opacity .15s;
}

    .acct-expand-btn:hover {
        opacity: 1;
    }

.acct-inline-field {
    display: flex;
    gap: 8px;
    align-items: center;
}

    .acct-inline-field input {
        flex: 1;
    }

.acct-readonly {
    opacity: 0.6;
    cursor: default;
}

.acct-loading {
    display: flex;
    gap: 5px;
    align-items: center;
    padding: 8px 0;
}

.acct-loading-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--border2);
    animation: acct-pulse 1.2s ease-in-out infinite;
}

    .acct-loading-dot:nth-child(2) {
        animation-delay: .2s;
    }

    .acct-loading-dot:nth-child(3) {
        animation-delay: .4s;
    }

@keyframes acct-pulse {
    0%, 80%, 100% {
        opacity: 0.3;
        transform: scale(0.9);
    }

    40% {
        opacity: 1;
        transform: scale(1);
    }
}

.acct-tier-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
    margin-bottom: 14px;
}

    .acct-tier-badge.tier-free {
        background: rgba(80,144,224,.12);
        color: #5090e0;
        border: 1px solid rgba(80,144,224,.25);
    }

    .acct-tier-badge.tier-pro {
        background: rgba(232,160,32,.12);
        color: #e8a020;
        border: 1px solid rgba(232,160,32,.25);
    }

    .acct-tier-badge.tier-enterprise {
        background: rgba(144,96,208,.12);
        color: #9060d0;
        border: 1px solid rgba(144,96,208,.25);
    }

.acct-tier-icon {
    font-size: 13px;
}

.acct-stat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.acct-stat-label {
    font-size: 11px;
    color: var(--text3);
}

.acct-stat-value {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
}

.acct-usage-bar {
    height: 4px;
    background: var(--surface3);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 4px;
}

.acct-usage-fill {
    height: 100%;
    border-radius: 2px;
    transition: width .4s ease;
}

.acct-sub-note {
    font-size: 11px;
    color: var(--text3);
    line-height: 1.5;
    margin-top: 10px;
}

.acct-note {
    font-size: 11px;
    color: var(--text3);
    line-height: 1.5;
}


/* ── LEGAL MODAL CONTAINER ───────────────────────────────────────────────────── */
.modal-legal {
    width: min(640px, 96vw);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.legal-modal-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0; /* allow inner scroll */
}

.legal-intro {
    font-size: 12px;
    color: var(--text3);
    margin-bottom: 14px;
}


/* ── TAB BAR ─────────────────────────────────────────────────────────────────── */
.legal-tabs {
    display: flex;
    gap: 2px;
    border-bottom: 1px solid var(--border2);
    margin-bottom: 0;
    flex-shrink: 0;
}

.legal-tab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 7px 13px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text3);
    cursor: pointer;
    transition: color .15s, border-color .15s;
    white-space: nowrap;
    margin-bottom: -1px; /* overlap container border */
    border-radius: 4px 4px 0 0;
}

    .legal-tab:hover {
        color: var(--text);
        background: var(--surface2);
    }

    .legal-tab.active {
        color: var(--accent);
        border-bottom-color: var(--accent);
        background: var(--surface2);
    }


/* ── SCROLLABLE DOC AREA ─────────────────────────────────────────────────────── */
.legal-doc-area {
    border: 1px solid var(--border2);
    border-top: none;
    border-radius: 0 0 6px 6px;
    background: var(--surface2);
    height: 300px;
    overflow: hidden; /* clip; individual panes scroll */
    flex-shrink: 0;
    position: relative;
}

    /* fade hint at bottom so user knows it scrolls */
    .legal-doc-area::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 32px;
        background: linear-gradient(transparent, var(--surface2));
        pointer-events: none;
    }

.legal-pane {
    display: none;
    height: 100%;
    overflow-y: auto;
    padding: 18px 20px 28px;
    scrollbar-width: thin;
    scrollbar-color: var(--border2) transparent;
}

    .legal-pane.active {
        display: block;
    }

    /* Doc typography */
    .legal-pane h3 {
        font-size: 14px;
        font-weight: 700;
        color: var(--text);
        margin: 0 0 4px;
    }

    .legal-pane h4 {
        font-size: 11px;
        font-weight: 700;
        color: var(--text2);
        margin: 16px 0 5px;
        text-transform: uppercase;
        letter-spacing: .5px;
    }

    .legal-pane p {
        font-size: 12px;
        color: var(--text2);
        line-height: 1.65;
        margin: 0 0 8px;
    }

    .legal-pane ul {
        margin: 4px 0 10px 0;
        padding-left: 18px;
    }

        .legal-pane ul li {
            font-size: 12px;
            color: var(--text2);
            line-height: 1.65;
            margin-bottom: 4px;
        }

    .legal-pane strong {
        color: var(--text);
        font-weight: 600;
    }

.legal-effective {
    font-size: 11px !important;
    color: var(--text3) !important;
    margin-bottom: 14px !important;
}


/* ── AGREEMENT CHECKBOXES ────────────────────────────────────────────────────── */
.legal-checks {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 18px;
    padding: 14px 16px;
    background: var(--surface2);
    border: 1px solid var(--border2);
    border-radius: 6px;
    flex-shrink: 0;
}

.legal-check-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

    .legal-check-row input[type="checkbox"] {
        width: 15px;
        height: 15px;
        margin-top: 1px;
        flex-shrink: 0;
        accent-color: var(--accent);
        cursor: pointer;
    }

    .legal-check-row span {
        font-size: 12px;
        color: var(--text2);
        line-height: 1.5;
    }

        .legal-check-row span a {
            color: var(--accent);
            cursor: pointer;
            text-decoration: underline;
        }

            .legal-check-row span a:hover {
                color: var(--accent-hi, var(--accent));
            }


/* ── ACCEPT BUTTON ───────────────────────────────────────────────────────────── */
/* Reuses .modal-btn.primary — just ensure disabled state looks right */
.modal-btn.primary:disabled,
#legal-accept-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
    pointer-events: none;
}