/* Voice Agent Studio — mirrors the CRM studio's dark, violet-accented look */
.studio { --s-accent: #8b5cf6; --s-accent-2: #6d28d9; --s-card: #141a2b; display: flex; flex-direction: column; gap: 14px; }
.studio-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 18px; border-radius: 12px; border: 1px solid var(--border); background: linear-gradient(120deg, #1a1740, #171e2e 60%); }
.studio-title { display: flex; gap: 12px; align-items: center; }
.studio-logo { font-size: 26px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 10px; background: var(--s-accent-2); }
.studio-title h2 { font-size: 17px; }
.studio-title p { color: var(--muted); font-size: 12.5px; }
.studio-pill { background: var(--s-accent-2); color: #fff; font-size: 10.5px; padding: 2px 8px; border-radius: 10px; text-transform: uppercase; letter-spacing: 0.6px; }
.studio-muted { color: var(--muted); font-size: 12px; }
.studio-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.studio-actions .project-pick { margin-bottom: 0; }
.studio-actions .btn.ghost { background: transparent; border: 1px solid var(--border); color: var(--text); }
.studio-actions .btn.small { background: var(--s-accent); }
.studio-actions .btn:disabled { opacity: 0.45; cursor: not-allowed; }
.studio-error { border: 1px solid var(--red); background: #2a1620; color: #ffb4b4; padding: 10px 14px; border-radius: 10px; font-size: 13px; white-space: pre-wrap; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.studio-error[hidden] { display: none; }
.studio-body { display: grid; grid-template-columns: 260px 1fr; gap: 14px; min-height: 60vh; }
.studio-nav { display: flex; flex-direction: column; gap: 4px; padding: 10px; border-radius: 12px; border: 1px solid var(--border); background: var(--panel); align-self: start; position: sticky; top: 12px; }
.studio-nav button { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 10px 12px; border-radius: 9px; border: 0; background: transparent; color: var(--text); font-size: 13px; cursor: pointer; }
.studio-nav button:hover { background: var(--panel-2); }
.studio-nav button.active { background: linear-gradient(90deg, var(--s-accent-2), var(--s-accent)); }
.studio-nav .badge { font-size: 10.5px; padding: 2px 8px; border-radius: 10px; background: #0f1420; color: #c4b5fd; text-transform: uppercase; letter-spacing: 0.5px; white-space: nowrap; }
.studio-nav .badge.error { background: var(--red); color: #fff; }
.studio-nav button.dirty::before { content: "●"; color: var(--amber); font-size: 9px; margin-right: 6px; }
.studio-pane { padding: 18px; border-radius: 12px; border: 1px solid var(--border); background: var(--panel); overflow-x: auto; }
.studio-pane-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.studio-pane-head h3 { font-size: 15px; }
.studio-pane-head .hint { display: inline; margin-left: 6px; }
.studio-toggle { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.studio-toggle button { border: 0; background: transparent; color: var(--muted); padding: 6px 12px; font-size: 12px; cursor: pointer; }
.studio-toggle button.active { background: var(--s-accent); color: #fff; }
.s-group { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; background: var(--s-card); }
.s-group > legend, .s-group-title { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.8px; color: #c4b5fd; font-weight: 600; margin-bottom: 8px; }
.s-field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.s-field label { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 0; }
.s-field input[type="text"], .s-field textarea, .s-json { width: 100%; background: #0f1420; border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 9px 11px; font-size: 13px; font-family: inherit; }
.s-field textarea { min-height: 64px; resize: vertical; }
.s-json { min-height: 320px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.s-list { display: flex; flex-direction: column; gap: 6px; }
.s-list-row { display: flex; gap: 6px; }
.s-list-row input { flex: 1; background: #0f1420; border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 7px 10px; font-size: 13px; font-family: inherit; }
.s-mini { border: 1px solid var(--border); background: transparent; color: var(--muted); border-radius: 7px; padding: 4px 9px; font-size: 12px; cursor: pointer; }
.s-mini:hover { color: var(--text); border-color: var(--s-accent); }
.s-check { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 8px; }
.s-preview { color: #a5b4fc; font-size: 12px; padding: 4px 2px 0; }
.s-preview::before { content: "▸ "; }
.s-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.s-chip { border: 1px dashed var(--s-accent); color: #c4b5fd; background: transparent; border-radius: 12px; padding: 2px 9px; font-size: 11.5px; cursor: pointer; }
.s-card { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; background: var(--s-card); }
.s-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.s-step { background: var(--s-accent-2); color: #fff; font-size: 11px; padding: 3px 10px; border-radius: 10px; letter-spacing: 0.8px; text-transform: uppercase; }
.s-readonly { opacity: 0.7; }
.s-note { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.s-errors { color: #ffb4b4; font-size: 12.5px; white-space: pre-wrap; margin-bottom: 10px; }
/* A choice that IS stored but does not do what it looks like it does (a
   language voice equal to the English one, a Rumik voice that cannot read
   Gurmukhi) — louder than .s-note, not an error. */
.s-warn { color: #fcd34d; background: rgba(252, 211, 77, 0.08); border-left: 3px solid #fcd34d; border-radius: 6px; padding: 8px 10px; font-size: 12.5px; margin-bottom: 8px; }
/* One voice per language: identical rows, English included — the wall of
   repeated description text now lives behind each row's Details toggle. */
.s-lang-voice { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; background: var(--s-card); }
.s-lang-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.s-lang-voice > select { width: 100%; margin-bottom: 8px; }
.s-summary { font-size: 12.5px; color: var(--muted); margin: 8px 0; }
.s-details { border-top: 1px solid var(--border); margin-top: 8px; padding-top: 8px; }
.studio-modal { position: fixed; inset: 0; background: rgba(5, 8, 16, 0.7); display: grid; place-items: center; z-index: 50; }
.studio-modal[hidden] { display: none; }
.studio-modal-card { width: min(900px, 92vw); max-height: 86vh; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; }
.studio-modal-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.studio-modal-body { padding: 14px 16px; overflow: auto; }
.studio-modal-body pre { white-space: pre-wrap; font-size: 12.5px; line-height: 1.5; font-family: ui-monospace, Menlo, monospace; }
.s-table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-bottom: 8px; }
.s-table th, .s-table td { border: 1px solid var(--border); padding: 4px 6px; }
.s-table input { width: 100%; background: transparent; border: 0; color: var(--text); font-size: 12.5px; }
@media (max-width: 900px) { .studio-body { grid-template-columns: 1fr; } .studio-nav { position: static; flex-direction: row; flex-wrap: wrap; } }
