/* ── Skill Creator layout ─────────────────────────────────────── */
.sc-root {
    display: flex;
    height: calc(100vh - 60px);
    overflow: hidden;
    background: var(--itx-bg-0, #0f172a);
}

/* SIDEBAR */
.sc-sidebar {
    width: 240px;
    min-width: 200px;
    background: var(--itx-surface, #1e293b);
    border-right: 1px solid var(--itx-border, #334155);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 12px 0;
}

.sc-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px 8px;
}

.sc-sidebar-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--itx-muted, #94a3b8);
}

.sc-sessions { overflow-y: auto; }

.sc-session-item {
    padding: 8px 12px;
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: background .15s;
}
.sc-session-item:hover { background: var(--itx-bg-1, #1e293b); }
.sc-session-item.active {
    border-left-color: var(--itx-cyan, #22d3ee);
    background: var(--itx-bg-1, #1e293b);
}
.sc-session-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--itx-text, #f1f5f9);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sc-session-meta {
    font-size: 11px;
    color: var(--itx-muted, #94a3b8);
    margin-top: 2px;
}
.sc-empty {
    padding: 8px 12px;
    font-size: 12px;
    color: var(--itx-muted, #94a3b8);
    font-style: italic;
}

/* MAIN */
.sc-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* WORKSPACE (chat + preview) */
.sc-workspace {
    display: flex;
    flex: 1;
    overflow: hidden;
    gap: 0;
}

/* CHAT PANEL */
.sc-chat-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-right: 1px solid var(--itx-border, #334155);
}
.sc-chat-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--itx-border, #334155);
    background: var(--itx-surface, #1e293b);
}
.sc-chat-title {
    font-weight: 700;
    font-size: 15px;
    color: var(--itx-text, #f1f5f9);
}
.sc-session-name-input {
    width: 100%;
    border: none;
    border-bottom: 1px solid var(--itx-border, #334155);
    font-size: 15px;
    font-weight: 700;
    color: var(--itx-text, #f1f5f9);
    outline: none;
    background: transparent;
    padding: 2px 0;
}
.sc-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--itx-bg-0, #0f172a);
}
.sc-msg { display: flex; }
.sc-msg-user { justify-content: flex-end; }
.sc-msg-assistant { justify-content: flex-start; }
.sc-msg-bubble {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
}
.sc-msg-user .sc-msg-bubble {
    background: var(--itx-cyan, #22d3ee);
    color: #0f172a;
    font-weight: 600;
    border-bottom-right-radius: 3px;
}
.sc-msg-assistant .sc-msg-bubble {
    background: var(--itx-surface, #1e293b);
    color: var(--itx-text, #f1f5f9);
    border: 1px solid var(--itx-border, #334155);
    border-bottom-left-radius: 3px;
}
.sc-thinking {
    opacity: .6;
    font-style: italic;
}

.sc-input-row {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--itx-border, #334155);
    background: var(--itx-surface, #1e293b);
}
.sc-input {
    flex: 1;
    resize: none;
    border: 1px solid var(--itx-border, #334155);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    background: var(--itx-bg-0, #0f172a);
    color: var(--itx-text, #f1f5f9);
    transition: border-color .15s;
}
.sc-input:focus {
    border-color: var(--itx-cyan, #22d3ee);
}
.sc-send-btn {
    align-self: flex-end;
    white-space: nowrap;
}
.sc-error {
    padding: 8px 16px;
    color: var(--itx-danger, #fca5a5);
    font-size: 12px;
}

/* PREVIEW PANEL */
.sc-preview-panel {
    width: 420px;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    background: var(--itx-surface, #1e293b);
    overflow: hidden;
}
.sc-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--itx-border, #334155);
}
.sc-preview-title {
    font-weight: 700;
    font-size: 14px;
    color: var(--itx-text, #f1f5f9);
}
.sc-preview-actions {
    display: flex;
    gap: 8px;
}
.sc-preview-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--itx-muted, #94a3b8);
    font-size: 13px;
    text-align: center;
    padding: 24px;
    gap: 8px;
}
.sc-draft-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    margin: 0;
    font-size: 12px;
    font-family: 'Consolas', 'Fira Code', monospace;
    white-space: pre-wrap;
    color: var(--itx-text, #f1f5f9);
    background: var(--itx-bg-0, #0f172a);
    line-height: 1.6;
}
.sc-saved-badge {
    padding: 8px 16px;
    background: rgba(134, 239, 172, 0.1);
    color: var(--itx-success, #86efac);
    font-size: 12px;
    border-top: 1px solid rgba(134, 239, 172, 0.2);
}

/* FILE VIEWER */
.sc-viewer {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.sc-viewer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--itx-surface, #1e293b);
    border-bottom: 1px solid var(--itx-border, #334155);
}
.sc-viewer-title {
    font-weight: 700;
    font-size: 15px;
    color: var(--itx-text, #f1f5f9);
}
.sc-file-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    margin: 0;
    font-size: 13px;
    font-family: 'Consolas', 'Fira Code', monospace;
    white-space: pre-wrap;
    color: var(--itx-text, #f1f5f9);
    background: var(--itx-bg-0, #0f172a);
    line-height: 1.6;
}

/* Shared buttons */
.sc-btn {
    padding: 6px 14px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .15s;
}
.sc-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}
.sc-btn-primary {
    background: var(--itx-cyan, #22d3ee);
    color: #0f172a;
}
.sc-btn-primary:hover:not(:disabled) {
    opacity: .85;
}
.sc-btn-success {
    background: var(--itx-success, #86efac);
    color: #0f172a;
}
.sc-btn-success:hover:not(:disabled) {
    opacity: .85;
}
.sc-btn-ghost {
    background: transparent;
    color: var(--itx-muted, #94a3b8);
    border: 1px solid var(--itx-border, #334155);
}
.sc-btn-ghost:hover:not(:disabled) {
    background: var(--itx-bg-1, #1e293b);
}
.sc-btn-sm {
    padding: 3px 10px;
    font-size: 12px;
}
