.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);
}

.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;
}

.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;
}

.legal-intro {
    font-size: 12px;
    color: var(--text3);
    margin-bottom: 14px;
}

.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;
    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);
    }

.legal-doc-area {
    border: 1px solid var(--border2);
    border-top: none;
    border-radius: 0 0 6px 6px;
    background: var(--surface2);
    height: 300px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}

    .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;
    }

    .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;
}

.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));
            }

.modal-btn.primary:disabled,
#legal-accept-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
    pointer-events: none;
}
