/* ZETA Stream dashboard */
:root { --bg: #05070D; --panel: #0C111C; --panel2: #111827; --line: rgba(255,255,255,.08); --ink: #F3F6FC; --mute: #8D97AB; --gold: #FFCA43; --cyan: #00E5FF; --ok: #3DDC97; --warn: #FFB547; --bad: #FF6B6B; --r: 14px; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.5 system-ui, "Segoe UI", Tahoma, "Cairo", sans-serif; }
a { color: var(--gold); }
code, .sd-code { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; }
.sd-app { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.sd-boot, .sd-loading { padding: 40px; color: var(--mute); }
.sd-side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 10px; padding: 18px 12px; background: linear-gradient(180deg, #0A0F1A, #070A12); border-inline-end: 1px solid var(--line); }
.sd-brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 10px; font-size: 16px; }
.sd-mark { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-size: 30px; font-weight: 900; color: #05070D; background: linear-gradient(135deg, #FFE7A0, var(--gold) 50%, var(--cyan)); margin: 0 auto 14px; }
.sd-mark.small { width: 32px; height: 32px; font-size: 18px; border-radius: 10px; margin: 0; }
.sd-nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; }
.sd-nav a { display: flex; align-items: center; gap: 10px; color: #C8D0DF; text-decoration: none; padding: 9px 10px; border-radius: 10px; }
.sd-nav a:hover { background: rgba(255,255,255,.04); color: #fff; }
.sd-nav a[aria-current] { background: rgba(255,202,67,.12); color: var(--gold); }
.sd-nav .ic { width: 20px; text-align: center; }
.sd-me { display: flex; align-items: center; gap: 10px; padding: 10px 6px 0; border-top: 1px solid var(--line); }
.sd-me img, .sd-av { width: 34px; height: 34px; border-radius: 50%; background: var(--panel2); display: grid; place-items: center; }
.sd-me div { flex: 1; min-width: 0; display: grid; } .sd-me b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sd-body { min-width: 0; }
.sd-top { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 24px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: rgba(5,7,13,.85); backdrop-filter: blur(10px); z-index: 5; }
.sd-main { padding: 22px 24px 60px; max-width: 1300px; }
.sd-h1 { margin: 0 0 16px; font-size: 24px; }
h2 { margin: 0 0 12px; font-size: 15px; color: #DDE3EE; } h3 { margin: 18px 0 8px; font-size: 14px; color: #C8D0DF; }
.sd-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; margin-bottom: 16px; min-width: 0; }
.sd-card.bad { border-color: rgba(255,107,107,.45); } .sd-card.warn { border-color: rgba(255,181,71,.4); } .sd-card.muted { opacity: .8; }
.sd-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.sd-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.align-start { align-items: start; }
.sd-row { display: flex; gap: 8px; align-items: center; } .sd-row.wrap { flex-wrap: wrap; } .sd-row.end { justify-content: flex-end; margin-top: 16px; }
.sd-btn { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; border: 1px solid var(--line); background: var(--panel2); color: var(--ink); border-radius: 10px; padding: 8px 14px; font: inherit; text-decoration: none; white-space: nowrap; }
.sd-btn:hover { border-color: rgba(255,255,255,.22); } .sd-btn:disabled { opacity: .45; cursor: not-allowed; }
.sd-btn.sd-primary { background: var(--gold); color: #05070D; border-color: var(--gold); font-weight: 700; }
.sd-btn.sd-danger { color: var(--bad); border-color: rgba(255,107,107,.4); }
.sd-btn.ghost { background: transparent; } .sd-btn.small { padding: 5px 10px; font-size: 13px; } .sd-btn.tiny { padding: 2px 8px; font-size: 12px; margin-inline-start: 6px; }
.sd-input, .sd-field select, textarea.sd-input { width: 100%; min-width: 0; background: #070B14; color: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font: inherit; }
.sd-row .sd-input { width: auto; flex: 1 1 160px; }
.sd-input:focus { outline: 2px solid rgba(255,202,67,.6); outline-offset: 0; }
.sd-color { width: 52px; height: 34px; border: 1px solid var(--line); border-radius: 8px; background: none; padding: 2px; }
.sd-range { width: 100%; }
.sd-field { display: grid; gap: 5px; min-width: 0; } .sd-field > span { color: var(--mute); font-size: 12.5px; }
.sd-form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin: 10px 0; }
.sd-check { display: flex; align-items: center; gap: 8px; margin: 8px 0; } .sd-check.big { font-size: 15px; font-weight: 600; }
.sd-toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; margin: 4px 0; } .sd-toggle input { position: absolute; opacity: 0; }
.sd-switch { width: 36px; height: 20px; border-radius: 20px; background: #263042; position: relative; transition: .2s; flex: none; }
.sd-switch::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: .2s; }
.sd-toggle input:checked + .sd-switch { background: var(--gold); } .sd-toggle input:checked + .sd-switch::after { inset-inline-start: 19px; }
.sd-toggle input:focus-visible + .sd-switch { outline: 2px solid var(--gold); }
.sd-chip { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.04); margin-inline-end: 4px; color: #C8D0DF; white-space: nowrap; }
.sd-chip.ok, .sd-chip.completed, .sd-chip.played, .sd-chip.published { color: var(--ok); border-color: rgba(61,220,151,.35); }
.sd-chip.warn, .sd-chip.pending, .sd-chip.held, .sd-chip.partially_refunded, .sd-chip.queued, .sd-chip.draft { color: var(--warn); border-color: rgba(255,181,71,.35); }
.sd-chip.bad, .sd-chip.failed, .sd-chip.refunded, .sd-chip.disputed { color: var(--bad); border-color: rgba(255,107,107,.35); }
.sd-chip.muted, .sd-chip.skipped, .sd-chip.archived, .sd-chip.cancelled { color: var(--mute); }
.sd-chip.playing { color: var(--cyan); border-color: rgba(0,229,255,.35); }
.sd-mute { color: var(--mute); } .sd-ok { color: var(--ok); } .sd-bad { color: var(--bad); } .sd-warn { color: var(--warn); }
.sd-list { margin: 0; padding-inline-start: 18px; display: grid; gap: 6px; } .sd-list.compact { gap: 3px; font-size: 13px; max-height: 420px; overflow: auto; }
.sd-totals { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 12px; } .sd-totals div { display: grid; } .sd-totals b { font-size: 22px; color: var(--gold); }
.sd-table-wrap { overflow-x: auto; } .sd-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sd-table th { text-align: start; color: var(--mute); font-weight: 500; padding: 8px; border-bottom: 1px solid var(--line); }
.sd-table td { padding: 8px; border-bottom: 1px solid rgba(255,255,255,.04); vertical-align: top; }
.sd-msg { max-width: 320px; overflow-wrap: anywhere; }
.sd-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.sd-tab { cursor: pointer; border: 1px solid var(--line); background: var(--panel); color: #C8D0DF; padding: 8px 14px; border-radius: 10px; font: inherit; text-transform: capitalize; }
.sd-tab[aria-selected="true"] { background: rgba(255,202,67,.14); color: var(--gold); border-color: rgba(255,202,67,.45); }
.sd-preview { background: repeating-conic-gradient(#0E1420 0 25%, #121a28 0 50%) 0 0/24px 24px; border-radius: 12px; min-height: 260px; display: grid; padding: 16px; overflow: hidden; }
.sd-stage { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; overflow-wrap: anywhere; }
.sd-stage.pos-top { align-self: start; } .sd-stage.pos-center { align-self: center; } .sd-stage.pos-bottom { align-self: end; }
.sd-stage img, .sd-stage video { max-width: 70%; max-height: 160px; }
.sd-variation { border: 1px dashed var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px; }
.sd-widget { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; display: grid; gap: 8px; }
.sd-url { display: block; overflow-wrap: anywhere; background: #070B14; padding: 6px 8px; border-radius: 8px; color: #C8D0DF; }
.sd-details summary { cursor: pointer; color: var(--mute); margin: 6px 0; }
.sd-code { white-space: pre-wrap; background: #070B14; padding: 12px; border-radius: 10px; overflow-x: auto; }
.sd-progress { color: var(--cyan); min-height: 1.5em; margin: 8px 0; }
.sd-tree { list-style: none; margin: 0; padding: 0; max-height: 520px; overflow: auto; font-size: 13px; }
.sd-tree li { padding: 3px 0; border-bottom: 1px solid rgba(255,255,255,.03); overflow-wrap: anywhere; } .sd-tree li.dir { color: var(--mute); padding-top: 8px; } .sd-tree li.in { padding-inline-start: 20px; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 14px; margin: 10px 0; } .kv > span:nth-child(odd) { color: var(--mute); } .kv code { overflow-wrap: anywhere; }
.sd-media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.sd-media { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: grid; gap: 6px; min-width: 0; }
.sd-media img, .sd-media video { width: 100%; height: 120px; object-fit: contain; background: #070B14; border-radius: 8px; } .sd-media audio { width: 100%; }
.sd-media b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .sd-font { height: 120px; display: grid; place-items: center; font-size: 42px; background: #070B14; border-radius: 8px; }
.sd-modal-wrap { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: grid; place-items: center; z-index: 50; padding: 16px; }
.sd-modal { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 20px; width: min(460px, 100%); max-height: 90vh; overflow: auto; }
.sd-modal.wide { width: min(980px, 100%); } .sd-modal h3 { margin-top: 0; overflow-wrap: anywhere; } .sd-modal textarea { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; }
.sd-toast { position: fixed; bottom: 20px; inset-inline-start: 50%; transform: translate(-50%, 30px); opacity: 0; background: #1B2436; border: 1px solid var(--line); padding: 10px 16px; border-radius: 12px; transition: .25s; z-index: 60; max-width: calc(100vw - 32px); }
[dir="rtl"] .sd-toast { transform: translate(50%, 30px); }
.sd-toast.show { opacity: 1; transform: translate(-50%, 0); } [dir="rtl"] .sd-toast.show { transform: translate(50%, 0); } .sd-toast.bad { border-color: var(--bad); color: #FFD0D0; }
body.sd-solo { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: radial-gradient(800px 400px at 50% -10%, rgba(255,202,67,.12), transparent), var(--bg); }
.sd-login { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 32px; width: min(420px, 100%); text-align: center; }
.sd-login h1 { margin: 0 0 6px; } .sd-login p { color: var(--mute); }
@media (max-width: 900px) {
  .sd-app { grid-template-columns: minmax(0, 1fr); }
  .sd-side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 10px 16px; min-width: 0; }
  .sd-nav { flex-direction: row; overflow-x: auto; flex-basis: 100%; order: 3; min-width: 0; max-width: 100%; scrollbar-width: thin; }
  .sd-nav a { white-space: nowrap; }
  .sd-me { border: 0; padding: 0; margin-inline-start: auto; }
  .sd-brand { padding: 0; }
  .sd-main { padding: 16px; } .sd-top { padding: 10px 16px; }
  .sd-grid2, .sd-grid3 { grid-template-columns: 1fr; }
}
.sd-accounts { display: grid; gap: 12px; }
.sd-account { display: grid; gap: 6px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.04); }
.sd-ltr { direction: ltr; }
.sd-prefix { color: var(--mute); font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; white-space: nowrap; }
.sd-account code { overflow-wrap: anywhere; }
