/* Viciei · visual inspirado no design de apps da Apple.
   Fonte: a do sistema (SF no Mac/iPhone) com Inter como alternativa no Windows/Android.
   Tema: segue o sistema; [data-theme="light|dark"] força um dos dois. */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  color-scheme: light;
  --bg: #f5f5f7;
  --panel: #ffffff;
  --panel-2: #fbfbfd;
  --fill: #e8e8ed;
  --fill-2: #f2f2f7;
  --line: #e5e5ea;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --sub: #86868b;
  --hover: rgba(0, 0, 0, .05);
  --sidebar: rgba(246, 246, 248, .78);
  --accent: #0a84ff;
  --accent-ink: #0068d6;
  --pink: #ff2d55;
  --green: #30d158;
  --green-ink: #248a3d;
  --orange: #ff9f0a;
  --purple: #bf5af2;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px rgba(0, 0, 0, .06);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, .22);
  --radius: 18px;
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', 'Segoe UI', system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #000000; --panel: #1c1c1e; --panel-2: #2c2c2e; --fill: #2c2c2e; --fill-2: #1c1c1e; --line: #38383a;
    --text: #f5f5f7; --muted: #a1a1a6; --sub: #8e8e93; --hover: rgba(255, 255, 255, .07); --sidebar: rgba(28, 28, 30, .78);
    --accent-ink: #64b5ff; --green-ink: #30d158;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35); --shadow-lg: 0 30px 80px rgba(0, 0, 0, .6);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000; --panel: #1c1c1e; --panel-2: #2c2c2e; --fill: #2c2c2e; --fill-2: #1c1c1e; --line: #38383a;
  --text: #f5f5f7; --muted: #a1a1a6; --sub: #8e8e93; --hover: rgba(255, 255, 255, .07); --sidebar: rgba(28, 28, 30, .78);
  --accent-ink: #64b5ff; --green-ink: #30d158;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35); --shadow-lg: 0 30px 80px rgba(0, 0, 0, .6);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.4 var(--font); -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font-family: inherit; }
.hidden { display: none !important; }

.icon { width: 18px; height: 18px; flex: 0 0 auto; stroke-width: 1.8; }
.icon.small { width: 15px; height: 15px; }

/* Estrutura */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 248px; position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; padding: 22px 14px 18px;
  background: var(--sidebar); border-right: 1px solid var(--line);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); z-index: 10;
}
.brand-lockup { display: flex; align-items: center; gap: 11px; padding: 0 8px; margin-bottom: 26px; }
.brand-mark { width: 30px; height: 30px; border-radius: 7px; }
.brand-lockup strong { display: block; font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.brand-lockup span { display: block; color: var(--sub); font-size: 11px; margin-top: 1px; }

.primary-nav { display: grid; gap: 2px; }
.nav-item, .settings-link {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px;
  background: none; color: var(--text); font-size: 13px; font-weight: 500; text-align: left; cursor: pointer;
}
.nav-item .icon, .settings-link .icon { color: var(--accent); }
.nav-item:hover, .settings-link:hover { background: var(--hover); }
.nav-item.active { background: var(--accent); color: #fff; }
.nav-item.active .icon { color: #fff; }
.nav-count { margin-left: auto; min-width: 20px; padding: 1px 7px; border-radius: 99px; background: var(--fill); color: var(--muted); font-size: 11px; font-weight: 600; text-align: center; }
.nav-item.active .nav-count { background: rgba(255, 255, 255, .25); color: #fff; }

.sidebar-bottom { margin-top: auto; display: grid; gap: 6px; }
.flow-status { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 12px; background: var(--panel); box-shadow: var(--shadow); }
.flow-status small { display: block; color: var(--sub); font-size: 11px; }
.flow-status strong { display: block; font-size: 13px; font-weight: 600; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(48, 209, 88, .2); }
.status-dot.live { background: var(--orange); box-shadow: 0 0 0 3px rgba(255, 159, 10, .25); }

.main-content { margin-left: 248px; width: calc(100% - 248px); padding: 0 48px 72px; }
.topbar { height: 64px; display: flex; align-items: center; justify-content: space-between; }
.breadcrumb { display: flex; align-items: center; gap: 8px; color: var(--sub); font-size: 13px; }
.breadcrumb i { font-style: normal; color: var(--line); }
.breadcrumb strong { color: var(--text); font-weight: 600; }
.top-actions { display: flex; align-items: center; gap: 14px; }
.icon-button {
  position: relative; display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 50%;
  background: transparent; color: var(--muted); cursor: pointer;
}
.icon-button:hover { background: var(--hover); color: var(--text); }
.icon-button em { position: absolute; top: 6px; right: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--pink); border: 1.5px solid var(--bg); }
#theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] #theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] #theme-toggle .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) #theme-toggle .icon-sun { display: none; }
  :root:not([data-theme="light"]) #theme-toggle .icon-moon { display: block; }
}
.profile { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--text); }
.profile .icon { color: var(--sub); }
.avatar { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(180deg, #a1a1a6, #6e6e73); color: #fff; font-size: 11px; font-weight: 700; }

/* Títulos e botões */
.view { padding-top: 28px; }
.eyebrow { margin: 0 0 4px; color: var(--sub); font-size: 13px; font-weight: 500; }
.hero-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding: 12px 0 28px; }
.hero-row h1, .view-header h1 { margin: 0; font-size: 34px; line-height: 1.1; letter-spacing: -.02em; font-weight: 700; }
.hero-copy { margin: 6px 0 0; color: var(--muted); font-size: 15px; }
.primary-cta {
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px 10px 14px; border: 0; border-radius: 99px;
  background: var(--accent); color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; transition: filter .15s, transform .15s;
}
.primary-cta:hover { filter: brightness(1.1); }
.primary-cta:active { transform: scale(.98); }
.text-button { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; color: var(--accent-ink); font-size: 14px; font-weight: 500; cursor: pointer; }
.date-chip, .filter-button { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 0; border-radius: 99px; background: var(--fill); color: var(--text); font-size: 12px; font-weight: 500; }
.filter-button { cursor: pointer; }

/* Cartões */
.metric-card, .panel, .table-panel, .catalog-card, .character-card, .export-card, .job-card {
  background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow);
}
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.metric-card { padding: 16px 18px; }
.metric-label { display: block; color: var(--muted); font-size: 13px; }
.metric-card > strong { display: block; margin-top: 4px; font-size: 28px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

.content-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; }
.panel { padding: 22px 24px; }
.pipeline-panel { margin-top: 16px; }
.panel-heading { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.panel-heading .eyebrow { margin-bottom: 2px; }
.panel-heading h2 { margin: 0; font-size: 17px; font-weight: 600; }

/* Listas agrupadas (estilo Ajustes) */
.series-list, .activity-list { display: grid; }
.series-row, .activity-item { border-top: 1px solid var(--line); }
.series-row:first-child, .activity-item:first-child { border-top: 0; }
.series-row { display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center; padding: 12px 0; }
.series-thumb { display: grid; place-items: center; width: 40px; height: 52px; border-radius: 8px; color: rgba(255, 255, 255, .9); font-size: 16px; font-weight: 600; }
.thumb-dawn, .art-a, .char-a { background: #8e6b5a; }
.thumb-night, .art-b, .char-b { background: #4a6178; }
.thumb-red, .art-c, .char-c { background: #6f7a5a; }
.char-d { background: #75657f; }
.series-row strong, .activity-item p { display: block; margin: 0; font-size: 14px; font-weight: 600; }
.series-row small, .activity-item small { display: block; margin-top: 2px; color: var(--sub); font-size: 12px; }
.progress-copy { color: var(--muted); font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; }
.mini-progress, .pipeline-bar { display: block; height: 4px; border-radius: 99px; background: var(--fill); overflow: hidden; }
.mini-progress { width: 90px; margin-top: 6px; }
.mini-progress i, .pipeline-bar i { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.activity-item { display: flex; gap: 12px; align-items: center; padding: 11px 0; }
.activity-icon { display: grid; place-items: center; width: 28px; height: 28px; color: var(--sub); flex: 0 0 auto; }
.activity-icon .icon { width: 16px; height: 16px; }

.pipeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.pipeline-item { padding: 14px; border-radius: 14px; background: var(--fill-2); }
.pipeline-index { display: block; margin-bottom: 10px; color: var(--sub); font-size: 12px; font-weight: 600; }
.pipeline-item.done .pipeline-index { color: var(--green-ink); }
.pipeline-item.current .pipeline-index { color: var(--accent-ink); }
.pipeline-item strong { display: block; font-size: 14px; }
.pipeline-item small { display: block; margin-top: 3px; color: var(--sub); font-size: 12px; }
.pipeline-bar { margin-top: 14px; }
.pipeline-item.done .pipeline-bar i { background: var(--green); }

/* Telas */
.view-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 28px; }
.view-header h1 { font-size: 34px; }
.view-header p:last-child { margin: 6px 0 0; color: var(--muted); font-size: 15px; }

.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 22px; }
.catalog-card { overflow: hidden; transition: transform .2s, box-shadow .2s; }

.catalog-art { display: flex; align-items: flex-end; aspect-ratio: 3 / 4; padding: 16px; color: rgba(255, 255, 255, .92); font-size: 19px; font-weight: 600; line-height: 1.15; }
.catalog-info { padding: 14px 16px 16px; }
.catalog-info strong { font-size: 15px; font-weight: 600; }
.catalog-info small { display: block; margin-top: 2px; color: var(--sub); font-size: 13px; }
.card-meta { display: flex; justify-content: space-between; margin-top: 12px; color: var(--sub); font-size: 12px; }

.table-panel { overflow: hidden; }
.table-head, .episode-row { display: grid; grid-template-columns: 2fr .9fr 1.1fr auto; gap: 14px; align-items: center; padding: 14px 20px; }
.table-head { border-bottom: 1px solid var(--line); color: var(--sub); font-size: 12px; font-weight: 600; }
.episode-row { border-bottom: 1px solid var(--line); font-size: 13px; }
.episode-row:last-child { border-bottom: 0; }
.episode-row:hover { background: var(--panel-2); }
.episode-row strong { display: block; font-weight: 600; }
.episode-row small { color: var(--sub); font-size: 13px; }
.episode-row > span:nth-child(4) { color: var(--muted); font-variant-numeric: tabular-nums; }
.status-pill { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 99px; background: rgba(48, 209, 88, .15); color: var(--green-ink); font-size: 12px; font-weight: 600; }
.status-pill.processing { background: rgba(10, 132, 255, .14); color: var(--accent-ink); }
.status-pill.draft { background: var(--fill); color: var(--muted); }
.row-actions { display: flex; justify-content: flex-end; gap: 6px; }
.row-action { padding: 6px 12px; border: 0; border-radius: 99px; background: var(--fill); color: var(--accent-ink); font-size: 12px; font-weight: 600; cursor: pointer; }
.row-action:hover { filter: brightness(.96); }
.primary-row-action { background: var(--accent); color: #fff; }

.character-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.character-card { overflow: hidden; }
.character-art { display: grid; place-items: center; height: 140px; color: rgba(255, 255, 255, .9); font-size: 36px; font-weight: 600; }
.character-info { padding: 12px 14px 14px; }
.character-info strong { font-size: 14px; font-weight: 600; }
.character-info small { display: block; margin-top: 2px; color: var(--sub); font-size: 12px; }

.jobs-stack { display: grid; gap: 12px; }
.job-card { display: grid; grid-template-columns: 40px 1fr auto; gap: 14px; align-items: center; padding: 16px 20px; }
.job-symbol { display: grid; place-items: center; width: 40px; height: 40px; color: var(--sub); }
.job-symbol.done { color: var(--green); }
.job-symbol.running .icon { animation: spin 1.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.job-card strong { font-size: 14px; font-weight: 600; }
.job-card small { display: block; margin-top: 2px; color: var(--sub); font-size: 12px; }
.job-status { color: var(--accent-ink); font-size: 12px; font-weight: 600; text-align: right; }
.job-status.done { color: var(--green-ink); }
.job-status.queued { color: var(--sub); }
.job-status b { display: block; margin-top: 2px; color: var(--text); font-size: 15px; font-variant-numeric: tabular-nums; }

.export-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.export-card { padding: 18px; }
.export-top { display: flex; justify-content: space-between; align-items: center; }
.platforms { display: flex; gap: 6px; }
.platforms span { display: grid; place-items: center; height: 26px; padding: 0 8px; border-radius: 99px; background: var(--fill-2); color: var(--muted); font-size: 11px; font-weight: 600; }
.export-card strong { display: block; margin-top: 16px; font-size: 15px; font-weight: 600; }
.export-card small { display: block; margin-top: 3px; color: var(--sub); font-size: 12px; }
.export-card button { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; padding: 7px 14px; border: 0; border-radius: 99px; background: var(--fill); color: var(--accent-ink); font-size: 13px; font-weight: 600; cursor: pointer; }

.toast {
  position: fixed; left: 50%; bottom: 28px; max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 14px;
  background: rgba(29, 29, 31, .92); color: #fff; font-size: 13px; font-weight: 500; box-shadow: var(--shadow-lg);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  opacity: 0; transform: translate(-50%, 12px); transition: .25s; pointer-events: none; z-index: 60;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 20px;
  background: rgba(0, 0, 0, .28); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); animation: modal-fade .18s ease-out;
}
.app-modal {
  position: relative; width: min(500px, 100%); padding: 28px 28px 24px; border-radius: 22px;
  background: var(--panel); box-shadow: var(--shadow-lg); animation: modal-rise .26s cubic-bezier(.22, 1, .36, 1);
}
.modal-close { position: absolute; top: 16px; right: 16px; display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 50%; background: var(--fill); color: var(--muted); cursor: pointer; }
.modal-close:hover { color: var(--text); }
.modal-kicker { display: none; }
.app-modal h2 { margin: 4px 40px 6px 0; font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.app-modal > p { margin: 0 0 20px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.modal-fields { display: grid; gap: 14px; }
.modal-field { display: grid; gap: 6px; }
.modal-field span { color: var(--muted); font-size: 13px; font-weight: 600; }
.modal-field input, .modal-field textarea, .modal-field select {
  width: 100%; padding: 11px 13px; border: 0; border-radius: 11px; outline: none;
  background: var(--fill-2); color: var(--text); font-size: 15px; transition: box-shadow .15s, background .15s;
}
:root[data-theme="dark"] .modal-field :is(input, textarea, select) { background: var(--panel-2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .modal-field :is(input, textarea, select) { background: var(--panel-2); } }
.modal-field textarea { min-height: 104px; resize: vertical; line-height: 1.45; }
.modal-field select {
  appearance: none; padding-right: 36px;
  background-image: linear-gradient(45deg, transparent 50%, var(--sub) 50%), linear-gradient(135deg, var(--sub) 50%, transparent 50%);
  background-position: calc(100% - 19px) 50%, calc(100% - 14px) 50%; background-size: 5px 5px; background-repeat: no-repeat;
}
.modal-field input::placeholder, .modal-field textarea::placeholder { color: var(--sub); }
.modal-field :is(input, textarea, select):focus { box-shadow: 0 0 0 3.5px rgba(10, 132, 255, .4); }
.modal-details { display: grid; margin: 0; border-radius: 12px; overflow: hidden; background: var(--fill-2); }
:root[data-theme="dark"] .modal-details { background: var(--panel-2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .modal-details { background: var(--panel-2); } }
.modal-details div { display: grid; grid-template-columns: 90px 1fr; gap: 12px; padding: 11px 14px; border-top: 1px solid var(--line); }
.modal-details div:first-child { border-top: 0; }
.modal-details dt { color: var(--sub); font-size: 13px; }
.modal-details dd { margin: 0; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.modal-button { padding: 10px 20px; border: 0; border-radius: 99px; font-size: 14px; font-weight: 600; cursor: pointer; transition: filter .15s, transform .15s; }
.modal-button:active { transform: scale(.98); }
.modal-button.secondary { background: var(--fill); color: var(--text); }
.modal-button.primary { background: var(--accent); color: #fff; }
.modal-button:hover { filter: brightness(1.06); }
.modal-backdrop[data-tone="warning"] .modal-kicker { color: var(--orange); }
.modal-backdrop[data-tone="warning"] .modal-button.primary { background: var(--pink); }
:is(button, input, textarea, select):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.modal-field :is(input, textarea, select):focus-visible { outline: 0; }
@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-rise { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Responsivo */
@media (max-width: 1100px) {
  .sidebar { width: 216px; }
  .main-content { margin-left: 216px; width: calc(100% - 216px); padding: 0 28px 56px; }
  .metric-grid, .pipeline, .character-grid { grid-template-columns: repeat(2, 1fr); }
  .content-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .app-shell { display: block; }
  .sidebar { position: sticky; top: 0; width: 100%; padding: 12px 16px 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand-lockup { margin-bottom: 10px; padding: 0; }
  .primary-nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
  .primary-nav::-webkit-scrollbar { display: none; }
  .nav-item { width: auto; white-space: nowrap; }
  .sidebar-bottom { display: none; }
  .main-content { margin-left: 0; width: 100%; padding: 0 16px 48px; }
  .topbar { height: 56px; }
  .profile span { display: none; }
  .view { padding-top: 16px; }
  .hero-row { padding: 12px 0 28px; }
  .hero-row { display: block; }
  .hero-row .primary-cta { margin-top: 16px; }
  .hero-row h1 { font-size: 30px; }
  .view-header { display: block; }
  .view-header h1 { font-size: 30px; }
  .view-header .primary-cta, .filter-button { margin-top: 16px; }
  .metric-grid { gap: 12px; }
  .metric-card { padding: 14px 16px; }
  .metric-card > strong { font-size: 24px; }
  .catalog-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .catalog-art { font-size: 18px; padding: 14px; }
  .pipeline, .export-grid { grid-template-columns: 1fr; }
  .panel { padding: 18px; }
  .table-panel { overflow-x: auto; }
  .table-head, .episode-row { min-width: 640px; }
  .modal-backdrop { place-items: end center; padding: 10px; }
  .app-modal { max-height: calc(100vh - 20px); overflow-y: auto; padding: 24px 20px 20px; border-radius: 22px; }
  .modal-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .modal-details div { grid-template-columns: 1fr; gap: 2px; }
  .toast { bottom: 16px; }
}

/* Login */
.login-page { display: grid; place-items: center; min-height: 100vh; padding: 16px; }
.login-card { width: min(380px, 100%); padding: 36px 28px 28px; border-radius: 22px; background: var(--panel); box-shadow: var(--shadow); text-align: center; }
.login-logo { border-radius: 13px; }
.login-card h1 { margin: 14px 0 4px; font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.login-card > p { margin: 0 0 24px; color: var(--muted); }
.login-card form { text-align: left; }
.login-error { min-height: 18px; margin: 0; color: var(--pink); font-size: 13px; }
.login-submit { width: 100%; padding: 12px; }
.login-submit:disabled { opacity: .6; cursor: default; }
#logout-button { display: none; }
.auth-on #logout-button { display: grid; }

/* Estados vazios */
.empty-state { grid-column: 1 / -1; display: grid; justify-items: center; gap: 6px; padding: 40px 20px; text-align: center; }
.empty-state strong { font-size: 15px; font-weight: 600; }
.empty-state p { max-width: 360px; margin: 0 0 8px; color: var(--sub); font-size: 13px; }
.series-list .empty-state { padding: 24px 12px; }
.catalog-grid > .empty-state, .character-grid > .empty-state, .export-grid > .empty-state, .jobs-stack > .empty-state { border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); }
.table-panel:has(.empty-state) .table-head { display: none; }
.status-dot.offline { background: var(--sub); box-shadow: 0 0 0 3px rgba(142, 142, 147, .2); }
.status-pill.error { background: rgba(255, 45, 85, .14); color: var(--pink); }
.job-symbol.error, .job-status.error { color: var(--pink); }
.job-status .row-action { display: inline-block; margin-top: 8px; }
.job-symbol.cancelled, .job-status.cancelled { color: var(--sub); }

/* Notificações, filtro e configurações */
.notify-wrap { position: relative; }
.dropdown { position: absolute; right: 0; top: 42px; width: min(360px, calc(100vw - 32px)); padding: 10px; border-radius: 16px; background: var(--panel); box-shadow: var(--shadow-lg); z-index: 30; }
.dropdown-head { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px 8px; font-size: 13px; }
.notify-item { display: flex; gap: 10px; align-items: flex-start; padding: 9px 6px; border-top: 1px solid var(--line); font-size: 13px; }
.notify-item .icon { flex: 0 0 auto; margin-top: 2px; }
.notify-item.done .icon { color: var(--green); } .notify-item.error .icon { color: var(--pink); } .notify-item.running .icon { color: var(--accent); }
.notify-item small { display: block; color: var(--sub); font-size: 12px; margin-top: 2px; }
.notify-empty { padding: 16px 6px; color: var(--sub); font-size: 13px; text-align: center; }
.filter-select { position: relative; cursor: pointer; }
.filter-select select { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.settings-card { padding: 18px 20px; border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); }
.settings-card h2 { margin: 0 0 12px; font-size: 16px; font-weight: 600; }
.settings-card dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 0; font-size: 13px; }
.settings-card dt { color: var(--sub); } .settings-card dd { margin: 0; overflow-wrap: anywhere; }
.settings-card .row-action { margin-top: 12px; }
.profile[role="button"] { cursor: pointer; }
.export-card .caption { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--fill-2); color: var(--text); font-size: 12px; line-height: 1.5; white-space: pre-wrap; max-height: 140px; overflow: auto; }
.export-card .export-actions { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.export-card .path { margin: 8px 0 0; color: var(--sub); font-size: 12px; overflow-wrap: anywhere; }

/* Página da série e ações de edição */
.back-link { margin: 4px 0 10px; }
.back-link .icon { transform: rotate(180deg); }
.header-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row-action.danger { color: var(--pink); }
.row-action.subtle { background: transparent; color: var(--muted); }
.table-panel.flat { box-shadow: none; background: transparent; }
.table-panel.flat .table-head, .table-panel.flat .episode-row { padding-left: 0; padding-right: 0; }
#series-detail-view .panel { margin-bottom: 16px; }
.episode-row .row-actions { gap: 4px; }
.character-card { position: relative; }
.character-actions { display: flex; gap: 6px; padding: 0 14px 12px; }
.character-info p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
.character-grid.compact { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.character-grid.compact .character-art { height: 96px; font-size: 30px; }
@media (max-width: 700px) {
  .header-actions { margin-top: 12px; }
  #series-detail-view .table-head, #series-detail-view .episode-row { min-width: 560px; }
}
