:root {
  --bg: #f5f4f8;
  --panel: #ffffff;
  --ink: #181526;
  --muted: #6f6a7d;
  --line: #e7e3ec;
  --purple: #6f44e8;
  --purple-dark: #4e2bab;
  --purple-soft: #efe9ff;
  --teal: #0d9a8a;
  --danger: #b4233c;
  --sidebar-bg: #fdfdf8;
  --sidebar-ink: #102b4f;
  --sidebar-muted: #696b70;
  --sidebar-line: #e4dfd4;
  --sidebar-active: #eee8dc;
  --shadow: 0 16px 45px rgba(35, 25, 64, .09);
  --radius: 18px;
  font-size: 15px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.45; }
body.menu-open { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .58; transform: none !important; }
.hidden { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.eyebrow { margin: 0 0 4px; color: var(--purple); font-size: .72rem; font-weight: 800; letter-spacing: .12em; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(1.45rem, 2.2vw, 2rem); line-height: 1.15; }
h2 { margin-bottom: 0; font-size: 1.18rem; }
h3 { margin-bottom: 14px; font-size: 1rem; }
.lead { color: var(--muted); }
.app { min-height: 100vh; display: grid; grid-template-columns: 260px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 28px 20px; background: var(--sidebar-bg); color: var(--sidebar-ink); border-right: 1px solid var(--sidebar-line); box-shadow: 8px 0 28px rgba(21,35,55,.05); display: flex; flex-direction: column; z-index: 10; }
.brand { display: flex; align-items: center; justify-content: center; margin: 0 4px 30px; }
.brand strong, .brand span { display: block; }
.brand span { color: var(--sidebar-muted); font-size: .85rem; }
.brand-mark { width: 54px; height: 54px; border-radius: 16px; background: linear-gradient(135deg, #8b63f5, #5430bd); color: white; display: grid; place-items: center; font-weight: 900; box-shadow: 0 10px 25px rgba(111,68,232,.3); }
.brand-mark.small { width: 44px; height: 44px; border-radius: 13px; }
.sidebar-brand-logo { display: block; width: 142px; max-width: 100%; height: auto; border-radius: 14px; box-shadow: 0 8px 24px rgba(20,43,75,.1); }
.login-brand-logo { display: block; width: 210px; max-width: 78%; height: auto; margin-bottom: 22px; border-radius: 18px; box-shadow: 0 12px 30px rgba(35,25,64,.12); }
.nav-list { display: grid; gap: 8px; }
.nav-item { border: 0; background: transparent; color: var(--sidebar-muted); border-radius: 12px; padding: 13px 14px; display: flex; justify-content: space-between; text-align: left; }
.nav-item:hover, .nav-item.active { color: var(--sidebar-ink); background: var(--sidebar-active); }
.nav-item.active { box-shadow: inset 3px 0 0 #b99558; }
.nav-item span { color: var(--sidebar-ink); background: #e9e2d5; border-radius: 999px; padding: 1px 8px; font-size: .78rem; }
.sidebar-actions { margin-top: auto; display: grid; gap: 9px; }
.user-box { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-top: 1px solid var(--sidebar-line); margin-top: 18px; padding-top: 18px; color: var(--sidebar-muted); font-size: .82rem; }
.user-box button { border: 0; background: none; color: #86682f; font-weight: 750; }
.main { min-width: 0; padding: 34px clamp(20px, 4vw, 58px) 60px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin-bottom: 28px; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.search-form { position: relative; display: grid; grid-template-columns: minmax(190px, 340px) auto; align-items: center; gap: 8px; }
.search { width: 100%; padding-right: 38px; }
.search-clear { position: absolute; right: 84px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 1.25rem; line-height: 1; }
.search-clear:hover { background: #f0edf4; color: var(--ink); }
.search-button { min-height: 42px; padding: 9px 13px; color: var(--purple-dark); background: var(--purple-soft); border-color: #d8cafc; }
.search-result { min-height: 18px; margin: 4px 0 0; color: var(--muted); font-size: .75rem; }
.button { display: inline-flex; align-items: center; justify-content: center; height: 40px; min-height: 40px; box-sizing: border-box; padding: 10px 16px; border: 1px solid transparent; border-radius: 11px; text-decoration: none; font-weight: 750; transition: .15s ease; }
.button:hover { transform: translateY(-1px); }
[data-drop-zone] { transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease, transform .16s ease; }
[data-drop-zone].is-dragging { position: relative; border-color: var(--purple) !important; background: var(--purple-soft) !important; box-shadow: 0 0 0 4px rgba(111,68,232,.14) !important; }
[data-drop-zone].is-dragging::after { content: "Solte o arquivo aqui"; position: absolute; inset: 6px; z-index: 5; display: grid; place-items: center; border: 2px dashed var(--purple); border-radius: 10px; color: var(--purple-dark); background: rgba(248,245,255,.95); font-size: .78rem; font-weight: 850; text-align: center; pointer-events: none; }
.button.primary { background: var(--purple); color: #fff; box-shadow: 0 8px 20px rgba(111,68,232,.2); }
.button.primary:hover { background: var(--purple-dark); }
.button.ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.sidebar .button.ghost { background: #fff; color: var(--sidebar-ink); border-color: var(--sidebar-line); }
.sidebar .button.ghost:hover { background: var(--sidebar-active); }
.button.danger { color: var(--danger); border-color: #f0c8d0; background: #fff6f8; }
.wide { width: 100%; }
.icon-button, .mini-button, .menu-button { border: 1px solid var(--line); color: var(--ink); background: #fff; border-radius: 10px; min-width: 38px; height: 38px; }
.mini-button { padding: 0 10px; font-size: .82rem; }
.menu-button { display: none; }
.menu-backdrop { display: none; }
input, select, textarea { width: 100%; border: 1px solid #dcd7e4; border-radius: 10px; background: #fff; color: var(--ink); padding: 10px 12px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(111,68,232,.12); }
label { color: #4b4657; display: grid; gap: 6px; font-size: .84rem; font-weight: 700; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.metric { background: var(--panel); border: 1px solid var(--line); border-radius: 15px; padding: 18px; box-shadow: 0 8px 25px rgba(35,25,64,.045); }
.metric span { color: var(--muted); font-size: .8rem; }
.metric strong { display: block; margin-top: 3px; font-size: 1.65rem; }
.workspace-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(280px, .8fr); gap: 18px; margin-bottom: 18px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel-head { padding: 20px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.calendar-week, .calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.calendar-week { padding: 13px 14px 8px; color: var(--muted); font-size: .66rem; font-weight: 800; text-align: center; }
.calendar-grid { padding: 0 14px 16px; }
.calendar-day { min-height: 118px; padding: 8px; border-top: 1px solid var(--line); border-right: 1px solid var(--line); overflow: hidden; }
.calendar-day:nth-child(7n) { border-right: 0; }
.calendar-day.outside { opacity: .38; }
.calendar-day.today .day-number { color: #fff; background: var(--purple); }
.day-number { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; font-size: .76rem; font-weight: 800; }
.calendar-events { max-height: 88px; overflow-y: auto; padding-right: 2px; }
.calendar-events::-webkit-scrollbar { width: 5px; }
.calendar-events::-webkit-scrollbar-thumb { background: #d6cfdf; border-radius: 999px; }
.cal-event { width: 100%; margin-top: 5px; padding: 5px 6px; border: 0; border-radius: 7px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .65rem; font-weight: 700; }
.cal-event.focar { color: #174ea6; background: #e4efff; }
.cal-event.venda { color: #126b3a; background: #e0f5e8; }
.cal-event.recording { color: #76520f; background: #fff0c7; box-shadow: inset 3px 0 0 #c19238; padding-left: 9px; }
.legend { padding: 0 22px 17px; display: flex; gap: 16px; color: var(--muted); font-size: .72rem; }
.dot { display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 50%; }
.dot.focar { background: #2878d4; }.dot.venda { background: #20945a; }.dot.recording { background: #c19238; }
.recordings-list { padding: 8px 14px 16px; }
.recording-item { width: 100%; min-width: 0; padding: 10px 7px; border: 0; border-bottom: 1px solid var(--line); border-radius: 10px; background: transparent; color: inherit; text-align: left; }
.recording-item:last-child { border-bottom: 0; }
.recording-item:hover { background: #faf9fd; }
.recording-item time { display: block; overflow: hidden; color: var(--purple); font-size: .65rem; font-weight: 800; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.recording-item strong, .recording-item span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recording-item strong { margin-top: 3px; font-size: .78rem; line-height: 1.25; }
.recording-item span { margin-top: 3px; color: var(--muted); font-size: .68rem; line-height: 1.2; }
.empty { color: var(--muted); padding: 22px 0; text-align: center; }
.episodes-panel { overflow: hidden; }
.episodes-panel select { width: auto; }
.episode-list { display: grid; }
.episode-row { display: grid; grid-template-columns: 150px minmax(160px, 1.1fr) minmax(220px, 1.6fr) 120px 120px 32px; gap: 14px; align-items: center; min-height: 62px; padding: 10px 22px; border: 0; border-bottom: 1px solid var(--line); background: #fff; text-align: left; color: inherit; }
.episode-row > * { min-width: 0; }
.episode-row:hover { background: #faf9fd; }
.episode-row:last-child { border-bottom: 0; }
.podcast-label { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .72rem; color: var(--purple); font-weight: 850; }
.episode-guest strong, .episode-topic strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.episode-guest span, .episode-topic span, .episode-date { color: var(--muted); font-size: .77rem; }
.status-badge, .pill { display: inline-flex; width: fit-content; align-items: center; white-space: nowrap; border-radius: 999px; padding: 5px 9px; background: #f1eff5; color: #5e5868; font-size: .7rem; font-weight: 800; }
.status-badge.completed { color: #08786c; background: #dcf7f2; }
.modal { position: fixed; inset: 0; z-index: 50; display: grid; grid-template-columns: minmax(0, 1fr) min(760px, 92vw); }
.modal-backdrop { background: rgba(16, 12, 29, .55); backdrop-filter: blur(2px); }
.editor { height: 100vh; background: var(--sidebar-bg); overflow-y: auto; box-shadow: -20px 0 50px rgba(20,12,40,.2); }
.editor-head { position: sticky; top: 0; z-index: 2; background: rgba(253,253,248,.97); padding: 22px 28px 18px; border-bottom: 1px solid var(--sidebar-line); display: flex; justify-content: space-between; }
.save-state { position: sticky; top: 86px; z-index: 2; min-height: 30px; padding: 7px 28px; background: #f5f1e8; color: var(--muted); font-size: .72rem; }
.save-state.saving { color: var(--purple); }.save-state.error { color: var(--danger); }
.editor-section { padding: 24px 28px; border-bottom: 1px solid var(--line); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid .full, .form-grid .span-2 { grid-column: 1 / -1; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.tasks-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.task-item { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: .82rem; }
.task-item input { width: 18px; height: 18px; accent-color: var(--purple); }
.task-item.done span { color: var(--muted); text-decoration: line-through; }
.editing-checklist-section { font-size: .74rem; }
.editing-checklist-section h3 { font-size: .9rem; }
.editing-checklist-section .pill { font-size: .64rem; padding: 4px 8px; }
.editing-tasks-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.editing-task-item { display: flex; align-items: center; gap: 8px; min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; color: var(--muted); font-size: .72rem; line-height: 1.3; }
.editing-task-item input { flex: 0 0 auto; width: 15px; height: 15px; accent-color: var(--purple); }
.editing-task-item span { min-width: 0; }
.editing-task-item.done span { color: #707070; text-decoration: line-through; }
.helper { color: var(--muted); font-size: .76rem; margin: 12px 0 0; }
.cuts-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.cut-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: #faf9fc; }
.cut-card strong { display: block; margin-bottom: 8px; font-size: .78rem; }
.cut-card label { margin-top: 8px; font-size: .7rem; }
.cut-image { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.cut-image-preview { width: 100%; aspect-ratio: 16/9; margin-bottom: 9px; border: 1px dashed #cfc8d9; border-radius: 9px; display: grid; place-items: center; overflow: hidden; background: #f2f0f5; color: var(--muted); font-size: .7rem; }
.cut-image-preview img { width: 100%; height: 100%; object-fit: cover; }
.cut-image-preview span, .cut-file-preview > span:only-child { max-width: 120px; line-height: 1.35; }
.cut-image .button { width: 100%; height: 36px; min-height: 36px; box-sizing: border-box; padding: 7px 10px; font-size: .72rem; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cut-file { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.cut-file-preview { width: 100%; aspect-ratio: 16/9; margin-bottom: 9px; padding: 12px; border: 1px dashed #cfc8d9; border-radius: 9px; display: grid; place-content: center; justify-items: center; gap: 5px; overflow: hidden; background: #f2f0f5; color: var(--muted); text-align: center; font-size: .7rem; }
.cut-file-preview.has-file { border-style: solid; background: #f7f5fa; }
.cut-file-preview img { width: calc(100% + 24px); height: calc(100% + 24px); margin: -12px; object-fit: cover; }
.cut-file-type { display: inline-flex; align-items: center; justify-content: center; min-width: 58px; padding: 5px 8px; border-radius: 999px; color: var(--purple-dark); background: var(--purple-soft); font-size: .63rem; font-weight: 850; letter-spacing: .07em; }
.cut-file-preview-name { display: block; width: 100%; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-weight: 700; }
.cut-file-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; align-items: stretch; }
.cut-file-actions > :only-child { grid-column: 1 / -1; }
.cut-file-actions > .button { display: inline-flex; align-items: center; justify-content: center; margin-top: 0; vertical-align: top; }
.cut-file-actions .button { width: 100%; min-width: 0; height: 36px; min-height: 36px; padding: 7px 8px; font-size: .7rem; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.guest-images { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.guest-images h4 { margin: 0; font-size: .9rem; }
.guest-images-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.guest-image-field { min-width: 0; border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: #faf9fc; }
.guest-image-field > strong { display: block; margin-bottom: 8px; font-size: .76rem; }
.guest-image-preview { width: 100%; aspect-ratio: 4 / 3; border: 1px dashed #cfc8d9; border-radius: 9px; display: grid; place-items: center; overflow: hidden; background: #f2f0f5; color: var(--muted); font-size: .7rem; text-align: center; }
.guest-image-preview img { width: 100%; height: 100%; object-fit: cover; }
.guest-image-preview span { max-width: 120px; line-height: 1.35; }
.guest-image-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-top: 9px; }
.guest-image-actions > :only-child { grid-column: 1 / -1; }
.guest-image-actions > .button { display: inline-flex; align-items: center; justify-content: center; width: 100%; min-width: 0; height: 36px; min-height: 36px; margin-top: 0; box-sizing: border-box; padding: 7px 8px; font-size: .7rem; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.instagram-art-upload .guest-image-field { max-width: 360px; }
.episode-files { display: grid; gap: 12px; }
.episode-file-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #faf9fc; transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease; }
.episode-file-card.has-file { border-color: #5ba778; background: #f7fcf8; box-shadow: inset 4px 0 0 #368b59; }
.episode-file-card strong { display: block; margin-bottom: 4px; font-size: .82rem; }
.episode-file-card span { display: block; color: var(--muted); font-size: .72rem; max-width: 330px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.episode-file-card small { display: block; margin-top: 5px; color: #8a8494; font-size: .66rem; font-weight: 600; }
.episode-file-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.episode-file-actions .button { min-height: 36px; padding: 7px 11px; font-size: .72rem; }
.art-row { display: flex; align-items: center; gap: 18px; }
.art-preview { width: 150px; aspect-ratio: 16/9; border: 1px dashed #cfc8d9; border-radius: 12px; display: grid; place-items: center; overflow: hidden; color: var(--muted); font-size: .72rem; background: #f8f6fa; }
.art-preview img { width: 100%; height: 100%; object-fit: cover; }
.spotify-art-row { display: flex; align-items: center; gap: 18px; }
.spotify-art-preview { width: 150px; aspect-ratio: 1; border: 1px dashed #cfc8d9; border-radius: 12px; display: grid; place-items: center; overflow: hidden; color: var(--muted); font-size: .72rem; text-align: center; background: #f8f6fa; }
.spotify-art-preview img { width: 100%; height: 100%; object-fit: cover; }
.editor-footer { padding: 20px 28px 34px; display: flex; justify-content: space-between; }
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 100; transform: translateX(-50%); color: white; background: #211a33; padding: 12px 18px; border-radius: 11px; box-shadow: var(--shadow); }
.login-view, .install-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 20% 10%, #f0e9ff, transparent 35%), #f7f5fa; }
.login-card, .install-card { width: min(470px, 100%); background: white; border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); padding: 34px; }
.login-card .brand-mark, .install-card .brand-mark { margin-bottom: 20px; }
.login-card label { margin: 14px 0; }
.form-error { min-height: 22px; color: var(--danger); font-size: .8rem; }
.install-card { width: min(780px, 100%); }
.install-form { display: grid; gap: 18px; }
fieldset { border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
legend { padding: 0 8px; font-weight: 800; }
.notice { padding: 13px 15px; margin: 18px 0; border-radius: 11px; font-size: .85rem; }
.notice.error { color: #8e1830; background: #fff0f3; border: 1px solid #f2c2cd; }
.notice.success { color: #086e63; background: #e3f8f4; border: 1px solid #b8ebe3; }
code { background: #eeeaf3; padding: 2px 5px; border-radius: 5px; }

@media (max-width: 1080px) {
  .workspace-grid { grid-template-columns: 1fr; }
  .recordings-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .recording-item { border: 1px solid var(--line); background: #faf9fc; }
  .episode-row { grid-template-columns: 145px minmax(140px, 1fr) minmax(180px, 1fr) 110px 28px; gap: 12px; min-height: 58px; padding: 9px 16px; }
  .episode-date { display: none; }
}
@media (max-width: 850px) {
  :root { font-size: 15px; }
  .app { display: block; }
  .sidebar { position: fixed; left: -280px; width: min(280px, 84vw); padding-top: 22px; z-index: 40; transition: left .2s ease; }
  .sidebar.open { left: 0; }
  .menu-backdrop { position: fixed; inset: 0; z-index: 30; display: block; border: 0; background: rgba(16,12,29,.55); opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility .2s ease; }
  .menu-backdrop.open { opacity: 1; visibility: visible; }
  .menu-button { display: inline-block; }
  .topbar { align-items: flex-start; }
  .top-actions { flex-wrap: wrap; justify-content: flex-end; }
  .search-form { grid-template-columns: minmax(180px, 1fr) auto; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .modal { grid-template-columns: 1fr; }
  .modal-backdrop { display: none; }
  .editor { width: 100vw; }
  .cuts-grid { grid-template-columns: 1fr; }
  .guest-images-grid { grid-template-columns: 1fr; }
  .editing-tasks-list { grid-template-columns: 1fr; }
  input, select, textarea { font-size: 16px; }
}
@media (max-width: 620px) {
  .main { padding: 22px 14px 40px; }
  .topbar { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px 10px; }
  .topbar h1 { font-size: 1.45rem; }
  .top-actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr; width: 100%; }
  .search-form { width: 100%; grid-template-columns: minmax(0, 1fr) auto; }
  #newEpisodeButton { width: 100%; }
  .metrics { gap: 9px; }
  .metric { padding: 14px; }
  .metric strong { font-size: 1.4rem; }
  .panel-head { padding: 16px 14px; }
  .calendar-week { padding-left: 6px; padding-right: 6px; }
  .calendar-grid { padding-left: 6px; padding-right: 6px; }
  .calendar-day { min-height: 72px; padding: 4px 3px; }
  .day-number { width: 24px; height: 24px; }
  .calendar-events { max-height: 46px; }
  .cal-event { min-height: 13px; margin-top: 3px; padding: 0 3px; font-size: 0; }
  .legend { padding: 0 14px 15px; gap: 10px; flex-wrap: wrap; }
  .recordings-list { grid-template-columns: 1fr; }
  .episode-row { grid-template-columns: 145px minmax(0, 1fr) 20px; gap: 9px; min-height: 54px; padding: 9px 14px; }
  .episode-topic, .status-badge, .episode-date { display: none; }
  .episodes-panel .panel-head { align-items: flex-start; }
  .episodes-panel select { max-width: 145px; }
  .form-grid, .form-grid.three { grid-template-columns: 1fr; }
  .tasks-list { grid-template-columns: 1fr; }
  .episode-file-card { align-items: flex-start; flex-direction: column; }
  .episode-file-actions { justify-content: flex-start; }
  .editor-head { padding: 16px 18px 13px; }
  .save-state { top: 73px; padding-left: 18px; padding-right: 18px; }
  .editor-section { padding: 20px 18px; }
  .art-row { align-items: flex-start; flex-direction: column; }
  .art-preview { width: 100%; max-width: 260px; }
  .spotify-art-row { align-items: flex-start; flex-direction: column; }
  .spotify-art-preview { width: min(100%, 260px); }
  .editor-footer { position: sticky; bottom: 0; z-index: 2; padding: 14px 18px calc(14px + env(safe-area-inset-bottom)); gap: 10px; background: rgba(253,253,248,.97); border-top: 1px solid var(--sidebar-line); }
  .editor-footer .button { flex: 1; }
  .login-view { padding: 14px; }
  .login-card { padding: 26px 20px; }
  .toast { width: calc(100% - 28px); bottom: calc(14px + env(safe-area-inset-bottom)); text-align: center; }
}

@media (max-width: 390px) {
  .metrics { grid-template-columns: 1fr; }
  .search-button { padding-left: 10px; padding-right: 10px; }
  .search-clear { right: 76px; }
  .panel-head { flex-wrap: wrap; }
}

.art-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.youtube-link-card { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.youtube-link-card label { flex: 1 1 320px; }
.youtube-link-card .button { flex: 0 0 auto; }
.upload-status-pill { display: inline-flex; align-items: center; min-height: 24px; padding: 3px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: .68rem; font-weight: 800; white-space: nowrap; }
.upload-status-pill[data-state="done"] { border-color: #3f9f72; background: #1b3029; color: #69e6b7; }
.upload-status-pill[data-state="error"] { border-color: #6a3940; background: #342225; color: #ff8290; }
.upload-progress { flex-basis: 100%; width: 100%; margin-top: 7px; padding: 7px 9px; border: 1px solid #d8cafc; border-radius: 9px; background: #faf8ff; color: var(--purple-dark); }
.upload-progress-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 5px; font-size: .65rem; font-weight: 800; }
.upload-progress-track { width: 100%; height: 6px; overflow: hidden; border-radius: 999px; background: #e8e0fb; }
.upload-progress-track > span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--purple), #9c7af1); transition: width .12s ease; }
.upload-progress[data-state="done"] { border-color: #b9e3c7; background: #f2fbf5; color: #197142; }
.upload-progress[data-state="done"] .upload-progress-track { background: #d9f1df; }
.upload-progress[data-state="done"] .upload-progress-track > span { background: #42a568; }
.upload-progress[data-state="error"] { border-color: #f0c8d0; background: #fff6f8; color: var(--danger); }
.upload-progress[data-state="error"] .upload-progress-track { background: #f9dfe4; }
.upload-progress[data-state="error"] .upload-progress-track > span { background: var(--danger); width: 100% !important; }
.cut-file-actions .upload-progress, .guest-image-actions .upload-progress { grid-column: 1 / -1; }

/* Tema escuro inspirado na referência visual enviada */
:root {
  --bg: #1b1b1b;
  --panel: #232323;
  --ink: #f2f2f2;
  --muted: #a2a2a2;
  --line: #3b3b3b;
  --purple: #00d89a;
  --purple-dark: #00a875;
  --purple-soft: #123d32;
  --teal: #1e9ee8;
  --danger: #ff7180;
  --sidebar-bg: #181818;
  --sidebar-ink: #f4f4f4;
  --sidebar-muted: #a3a3a3;
  --sidebar-line: #353535;
  --sidebar-active: #263b35;
  --shadow: 0 18px 42px rgba(0, 0, 0, .28);
  --radius: 14px;
  font-size: 15px;
}
body { background: var(--bg); color: var(--ink); font-family: Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif; letter-spacing: -.01em; }
.sidebar { background: var(--sidebar-bg); color: var(--sidebar-ink); border-right-color: var(--sidebar-line); box-shadow: 8px 0 28px rgba(0,0,0,.2); }
.brand-mark { background: linear-gradient(135deg, #00d89a, #1e9ee8); box-shadow: 0 10px 25px rgba(0,216,154,.22); }
.sidebar-brand-logo, .login-brand-logo { box-shadow: 0 10px 28px rgba(0,0,0,.3); }
.brand span, .sidebar-muted, .user-box { color: var(--sidebar-muted); }
.nav-item { color: var(--sidebar-muted); }
.nav-item:hover, .nav-item.active { color: var(--sidebar-ink); background: var(--sidebar-active); }
.nav-item.active { box-shadow: inset 3px 0 0 var(--purple); }
.nav-item span { color: var(--purple); background: #203a33; }
.user-box button { color: var(--purple); }
.main { max-width: 1660px; width: 100%; margin: 0 auto; }
.eyebrow { color: var(--purple); letter-spacing: .14em; }
.lead, .search-result, .helper { color: var(--muted); }
.panel, .metric { background: var(--panel); border-color: var(--line); box-shadow: var(--shadow); }
.panel-head { border-bottom-color: var(--line); }
.calendar-week { color: var(--muted); }
.calendar-day { border-top-color: var(--line); border-right-color: var(--line); }
.calendar-day.today .day-number { color: #11241e; background: var(--purple); }
.calendar-events::-webkit-scrollbar-thumb { background: #555; }
.cal-event.focar { color: #67baff; background: #193247; }
.cal-event.venda { color: #64eabd; background: #16382e; }
.cal-event.recording { color: #f1be63; background: #42331d; box-shadow: inset 3px 0 0 #d29a3d; }
.dot.focar { background: #2d9de0; }.dot.venda { background: #00d89a; }.dot.recording { background: #d29a3d; }
.recording-item { border-bottom-color: var(--line); }
.recording-item:hover, .episode-row:hover { background: #2a2a2a; }
.recording-item time, .podcast-label { color: var(--purple); }
.episode-row { background: var(--panel); border-bottom-color: var(--line); }
.status-badge, .pill { background: #303030; color: #c4c4c4; }
.status-badge.completed { color: #5ce3b5; background: #153d32; }
.button.primary { background: var(--purple); color: #10221b; box-shadow: 0 8px 20px rgba(0,216,154,.16); }
.button.primary:hover { background: #16efae; }
.button.ghost, .sidebar .button.ghost, .icon-button, .mini-button, .menu-button { background: #292929; color: var(--purple); border-color: var(--line); }
.button.ghost:hover, .sidebar .button.ghost:hover, .icon-button:hover, .mini-button:hover, .menu-button:hover { background: #343434; }
.button.danger { color: #ff8290; border-color: #6a3940; background: #342225; }
.search-button { color: #66eabe; background: #153d32; border-color: #236a55; }
.episode-row > span:last-child { color: var(--purple); font-size: 1.25rem; font-weight: 800; }
.search-clear:hover { background: #333; color: var(--ink); }
input, select, textarea { border-color: #454545; background: #282828; color: var(--ink); }
input::placeholder, textarea::placeholder { color: #7f7f7f; }
input:focus, select:focus, textarea:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(0,216,154,.14); }
label { color: #d2d2d2; }
.modal-backdrop { background: rgba(0,0,0,.7); }
.editor { background: var(--sidebar-bg); box-shadow: -20px 0 50px rgba(0,0,0,.42); }
.editor-head { background: rgba(24,24,24,.97); border-bottom-color: var(--sidebar-line); }
.save-state { background: #202020; color: var(--muted); }
.save-state.saving { color: var(--purple); }
.editor-section { border-bottom-color: var(--line); }
.task-item, .cut-card, .guest-image-field, .episode-file-card { border-color: var(--line); background: #282828; }
.task-item input { accent-color: var(--purple); }
.cut-image, .cut-file, .guest-images { border-top-color: var(--line); }
.cut-image-preview, .cut-file-preview, .guest-image-preview, .art-preview, .spotify-art-preview { border-color: #555; background: #1f1f1f; color: var(--muted); }
.cut-file-preview.has-file { background: #252525; }
.cut-file-type { color: #65eabd; background: #153d32; }
.cut-file-preview-name { color: var(--ink); }
.episode-file-card.has-file { border-color: #3f9f72; background: #1b3029; box-shadow: inset 4px 0 0 #32b77c; }
.episode-file-card span { color: var(--muted); }
.episode-file-card small { color: #858585; }
.toast { background: #f0f0f0; color: #151515; }
.login-view, .install-page { background: radial-gradient(circle at 20% 10%, #213d35, transparent 35%), var(--bg); }
.login-card, .install-card { background: var(--panel); border-color: var(--line); box-shadow: var(--shadow); }
fieldset { border-color: var(--line); }
code { background: #303030; color: #d8d8d8; }
.upload-progress { border-color: #236a55; background: #15382f; color: #63e8ba; }
.upload-progress-track { background: #245347; }
.upload-progress-track > span { background: linear-gradient(90deg, #00d89a, #1e9ee8); }
.upload-progress[data-state="done"] { border-color: #3f9f72; background: #1b3029; color: #69e6b7; }
.upload-progress[data-state="done"] .upload-progress-track { background: #245347; }
.upload-progress[data-state="done"] .upload-progress-track > span { background: #42c98e; }
.upload-progress[data-state="error"] { border-color: #6a3940; background: #342225; color: #ff8290; }
.upload-progress[data-state="error"] .upload-progress-track { background: #4d292e; }
.editing-task-item { background: #282828; }
