/* ========== StudioControl ========== */

.stu-root {
    display: grid;
    gap: 16px;
}

/* ── Toolbar ── */
.stu-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.stu-title {
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--text);
    margin-right: auto;
}

.stu-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s;
    white-space: nowrap;
}
.stu-btn:hover { background: var(--bg-card); border-color: var(--text-dim, #888); }

.stu-btn-primary {
    background: var(--accent, #6c63ff);
    color: #fff;
    border-color: var(--accent, #6c63ff);
}
.stu-btn-primary:hover {
    filter: brightness(1.15);
    background: var(--accent, #6c63ff);
}

/* ── Card List ── */
.stu-card-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stu-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent, #6c63ff);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color 0.12s, box-shadow 0.12s, background 0.12s;
}

.stu-card:nth-child(odd) {
    background: color-mix(in srgb, var(--bg-card) 85%, var(--bg));
}

.stu-card:hover {
    background: color-mix(in srgb, var(--accent, #6c63ff) 8%, var(--bg-card));
    border-color: color-mix(in srgb, var(--accent, #6c63ff) 35%, var(--border));
    box-shadow: 0 2px 12px rgba(108, 99, 255, 0.08);
}

/* ── Card Info ── */
.stu-card-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.stu-card-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stu-card-meta {
    font-size: 0.78rem;
    color: var(--text-dim, #888);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Card Actions ── */
.stu-card-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

/* ── Icon buttons ── */
.stu-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.08);
    color: var(--text-dim, #888);
    cursor: pointer;
    transition: color 0.12s, background 0.12s, border-color 0.12s, transform 0.12s;
    vertical-align: middle;
}
.stu-icon-btn:hover {
    color: var(--text);
    background: var(--bg);
    border-color: var(--text-dim, #888);
    transform: translateY(-1px);
}

.stu-delete-btn:hover { color: #e74c3c; border-color: #e74c3c; }
.stu-delete-btn.stu-confirm {
    color: #fff;
    background: #e74c3c;
    border-color: #e74c3c;
    width: auto;
    padding: 0 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ── Empty state ── */
.stu-empty {
    text-align: center;
    padding: 32px 16px;
    color: var(--text-dim, #888);
    font-size: 0.9rem;
}

/* ── Pagination ── */
.stu-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 8px 0;
}

.stu-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text);
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s;
}

.stu-page-btn:hover:not(:disabled) {
    background: var(--accent, #6c63ff);
    border-color: var(--accent, #6c63ff);
    color: #fff;
}

.stu-page-btn:disabled {
    opacity: 0.3;
    cursor: default;
}

.stu-page-info {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-dim, #888);
    min-width: 50px;
    text-align: center;
}

/* ── List view ── */
.stu-list-view {
    display: grid;
    gap: 16px;
}

/* ── Editor view ── */
.stu-editor-view {
    display: grid;
    gap: 16px;
}

.stu-editor-bar {
    --sc-accent: var(--accent, #6c63ff);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 18px;
    background: color-mix(in srgb, var(--sc-accent) 12%, var(--bg-card));
    border: 1px solid color-mix(in srgb, var(--sc-accent) 30%, var(--border));
    border-left: 3px solid var(--sc-accent);
    border-radius: var(--radius);
}

.stu-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.stu-back-btn svg { flex-shrink: 0; }

.stu-editor-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.stu-editor-mount {
    min-height: 200px;
}
