:root {
  --bg: #f4f7fb;
  --bg-soft: #edf2f9;
  --surface: #ffffff;
  --surface-strong: #f9fbff;
  --ink: #0f1a2b;
  --ink-soft: #566179;
  --primary: #0e7490;
  --primary-strong: #0b5f76;
  --accent: #f59e0b;
  --accent-soft: #fff4dc;
  --border: #d7e2ef;
  --danger: #b42318;
  --success: #116149;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 10px 28px rgba(17, 32, 64, 0.08);
  --shadow-lg: 0 24px 60px rgba(17, 32, 64, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Sora", "Segoe UI", sans-serif;
  color: var(--ink);
  background: linear-gradient(155deg, #f5f8fd 0%, #eef3fb 42%, #e8f1f8 100%);
  position: relative;
  overflow-x: hidden;
}

.ambient {
  position: fixed;
  border-radius: 999px;
  filter: blur(0.5px);
  z-index: -1;
  opacity: 0.45;
}

.ambient-one {
  width: 420px;
  height: 420px;
  top: -160px;
  right: -80px;
  background: radial-gradient(circle, #90cdf4 0%, rgba(144, 205, 244, 0) 70%);
}

.ambient-two {
  width: 360px;
  height: 360px;
  bottom: -160px;
  left: -120px;
  background: radial-gradient(circle, #fbd38d 0%, rgba(251, 211, 141, 0) 72%);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-strong);
}

.layout-app {
  background: linear-gradient(175deg, #f6f9fe 0%, #eef4fc 48%, #e8f1f9 100%);
}

.app-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--border);
  background: linear-gradient(180deg, #ffffff 0%, #f6f9ff 100%);
  padding: 1.2rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.35rem 0.35rem 0.8rem;
  border-bottom: 1px solid var(--border);
}

.brand-badge {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(145deg, #0e7490 0%, #0f95a8 100%);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: "Space Grotesk", "Sora", sans-serif;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.brand-name {
  margin: 0;
  font-family: "Space Grotesk", "Sora", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}

.brand-meta {
  margin: 0.12rem 0 0;
  font-size: 0.73rem;
  color: var(--ink-soft);
}

.sidebar-nav {
  display: grid;
  gap: 0.36rem;
}

.sidebar-nav a {
  border: 1px solid transparent;
  color: #33445f;
  border-radius: 12px;
  padding: 0.68rem 0.82rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.sidebar-nav a:hover {
  background: #eef4ff;
  border-color: #d7e5ff;
}

.sidebar-nav a.active {
  background: linear-gradient(130deg, #0e7490 0%, #127f9b 100%);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(14, 116, 144, 0.32);
}

.sidebar-account {
  margin-top: auto;
  border: 1px solid var(--border);
  background: linear-gradient(140deg, #ffffff 0%, #f8fbff 100%);
  border-radius: var(--radius-md);
  padding: 0.82rem;
  box-shadow: var(--shadow-sm);
}

.sidebar-account-label {
  margin: 0;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #73819a;
}

.sidebar-account-email {
  margin: 0.36rem 0 0.68rem;
  font-size: 0.84rem;
  color: #1f2b41;
  word-break: break-word;
}

.sidebar-exit {
  width: 100%;
}

.workspace {
  padding: 1.2rem 1.3rem 1.6rem;
}

.workspace-topbar {
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  background: linear-gradient(130deg, #ffffff 0%, #f8fbff 100%);
  border-radius: var(--radius-lg);
  padding: 0.8rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  box-shadow: var(--shadow-sm);
}

.workspace-kicker {
  margin: 0;
  font-size: 0.7rem;
  color: #6b7890;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workspace-title {
  margin: 0.2rem 0 0;
  font-family: "Space Grotesk", "Sora", sans-serif;
  font-weight: 700;
  font-size: 0.96rem;
  color: #1f2d49;
}

.workspace-status {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  border-radius: 999px;
  padding: 0.4rem 0.7rem;
  background: #eff9f2;
  border: 1px solid #b8e7c6;
  font-size: 0.76rem;
  color: #1f6845;
  white-space: nowrap;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1dbf73;
}

.main {
  animation: enterUp 0.45s ease;
}

.container {
  width: min(1200px, 100%);
  margin: 0 auto;
}

.layout-public .main {
  padding: 2rem 0 1.6rem;
}

.layout-app .main {
  padding: 0.2rem 0 0.8rem;
}

.page-title {
  margin: 0;
  font-family: "Space Grotesk", "Sora", sans-serif;
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  line-height: 1.12;
  color: #0d1f3b;
}

.page-subtitle {
  margin: 0.35rem 0 1.18rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
  max-width: 880px;
}

.card {
  background: linear-gradient(145deg, #ffffff 0%, #fbfdff 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
}

.grid {
  display: grid;
  gap: 1rem;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.metric-value {
  font-family: "Space Grotesk", "Sora", sans-serif;
  font-size: 1.95rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #10264a;
}

.metric-label {
  color: #65748d;
  font-size: 0.84rem;
  margin-top: 0.22rem;
}

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.9rem;
}

.table th,
.table td {
  text-align: left;
  padding: 0.75rem 0.72rem;
  border-bottom: 1px solid #e8eff7;
  vertical-align: top;
}

.table thead th {
  position: sticky;
  top: 0;
  background: #f7faff;
  color: #4d5f7e;
  font-weight: 600;
  z-index: 1;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.24rem 0.58rem;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.badge-draft {
  background: #fff3d8;
  border-color: #f2d08a;
  color: #7d5511;
}

.badge-published {
  background: #e6f7ef;
  border-color: #a9e3c5;
  color: #186044;
}

.badge-archived {
  background: #edf1f6;
  border-color: #cfd8e4;
  color: #4a5668;
}

.badge-task-pendente {
  background: #fff0ef;
  border-color: #f3b6b2;
  color: #8f1f19;
}

.badge-task-concluida {
  background: #e8f8ec;
  border-color: #a6dfb4;
  color: #1a5e32;
}

form {
  display: grid;
  gap: 0.8rem;
}

label {
  display: grid;
  gap: 0.32rem;
  font-size: 0.88rem;
  color: #425269;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  background: #ffffff;
  border: 1px solid #cfdded;
  border-radius: 12px;
  padding: 0.66rem 0.74rem;
  color: #1c2942;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #59a4bf;
  box-shadow: 0 0 0 3px rgba(89, 164, 191, 0.2);
  outline: none;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  padding: 0.62rem 0.95rem;
  background: linear-gradient(145deg, #0e7490 0%, #1283a0 100%);
  color: #ffffff;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.2s ease;
  box-shadow: 0 8px 20px rgba(14, 116, 144, 0.28);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(14, 116, 144, 0.34);
}

.btn-secondary {
  background: #eef3fb;
  color: #2e3e5a;
  box-shadow: none;
  border: 1px solid #d2dfef;
}

.btn-secondary:hover {
  box-shadow: none;
  background: #e4edf8;
}

.btn-danger {
  background: linear-gradient(145deg, #bf2b21 0%, #d6453b 100%);
}

.btn-sm {
  padding: 0.42rem 0.7rem;
  font-size: 0.8rem;
}

.actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.9rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
  flex-wrap: wrap;
}

.section-spaced {
  margin-bottom: 1rem;
}

.stack-list > article:not(.card) {
  padding: 0.72rem 0;
  border-bottom: 1px solid #e8eff7;
}

.stack-list > article:not(.card):last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.stack-list p {
  margin: 0 0 0.2rem;
}

.stack-list > .card {
  margin-top: 0.65rem;
  box-shadow: none;
}

.text-soft {
  color: var(--ink-soft);
}

.mt-sm {
  margin-top: 0.9rem;
}

.section-title {
  margin: 0 0 0.7rem;
  font-family: "Space Grotesk", "Sora", sans-serif;
  font-size: 1.03rem;
  color: #193055;
}

.kbd {
  display: inline-flex;
  align-items: center;
  padding: 0.16rem 0.44rem;
  border-radius: 8px;
  background: #edf4ff;
  border: 1px solid #d5e3f8;
  color: #385782;
  font-size: 0.74rem;
}

.empty {
  border: 1px dashed #bfd1e6;
  border-radius: var(--radius-md);
  padding: 0.95rem;
  color: #5c6e8a;
  background: #f8fbff;
}

.progress-track {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: #e6eef7;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #0e7490 0%, #1ea2b9 100%);
}

.stepper-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.55rem;
}

.stepper-item {
  border: 1px solid #d6e4f5;
  border-radius: 12px;
  padding: 0.58rem 0.66rem;
  background: #f8fbff;
  display: grid;
  gap: 0.12rem;
}

.stepper-item.active {
  border-color: #79b7d1;
  background: #eaf7fc;
}

.stepper-item.done {
  border-color: #95d8b4;
  background: #ebfbf1;
}

.stepper-index {
  font-size: 0.72rem;
  color: #607491;
}

.stepper-label {
  font-size: 0.84rem;
  color: #1b3258;
  font-weight: 600;
}

.quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.6rem;
}

.quick-link {
  border: 1px solid #cfe0f1;
  border-radius: 12px;
  padding: 0.62rem 0.75rem;
  background: #f4f9ff;
  color: #204066;
  font-weight: 600;
  font-size: 0.87rem;
}

.quick-link:hover {
  background: #eaf3ff;
}

.wizard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.75rem;
}

.ad-card {
  border: 1px solid #d9e6f5;
  border-radius: 14px;
  background: #ffffff;
  padding: 0.82rem;
}

.ad-card p {
  margin: 0 0 0.42rem;
}

.ad-media-wrap {
  margin: 0.6rem 0;
}

.ad-media {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #d3e2f3;
}

.plan-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.8rem;
}

.transcription-box {
  border: 1px solid #d7e5f5;
  border-radius: 12px;
  padding: 0.85rem;
  background: #f6fbff;
  margin-bottom: 0.9rem;
}

.transcriber-meta {
  border: 1px solid #d4e3f4;
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
  background: #ffffff;
  display: grid;
  gap: 0.35rem;
}

.transcriber-meta p {
  margin: 0;
  font-size: 0.86rem;
  color: #2e4568;
}

.js-transcription-status {
  color: #355b85;
}

.audio-player {
  width: 100%;
  margin-top: 0.45rem;
}

.auth-shell {
  width: min(980px, calc(100% - 2rem));
  margin: 2.5rem auto;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 460px);
  gap: 1rem;
  align-items: stretch;
}

.auth-brand {
  border-radius: 24px;
  padding: 1.2rem;
  background: linear-gradient(145deg, #0c4f68 0%, #0e7490 55%, #1293ab 100%);
  color: #f2fbff;
  box-shadow: var(--shadow-lg);
}

.auth-brand p {
  margin: 0;
}

.auth-kicker {
  font-size: 0.73rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.85;
}

.auth-title {
  margin: 0.6rem 0 0.56rem;
  font-family: "Space Grotesk", "Sora", sans-serif;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  line-height: 1.15;
}

.auth-description {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  opacity: 0.95;
}

.auth-points {
  margin: 1rem 0 0;
  padding-left: 1.05rem;
}

.auth-points li {
  margin-bottom: 0.48rem;
  font-size: 0.86rem;
}

.auth-card {
  align-self: stretch;
  padding: 1.3rem;
}

.auth-card .page-title {
  font-size: 1.5rem;
}

.error-text {
  margin: 0;
  font-size: 0.87rem;
  color: var(--danger);
}

.footer {
  margin-top: 1.6rem;
  border-top: 1px solid #d7e3f3;
  padding-top: 0.8rem;
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  color: #6a7c98;
  font-size: 0.78rem;
}

.footer span:first-child {
  font-weight: 600;
  color: #36547b;
}

@keyframes enterUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1024px) {
  .app-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .sidebar-nav {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }

  .workspace {
    padding-top: 1rem;
  }

  .workspace-topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .container {
    width: min(1200px, calc(100% - 0.2rem));
  }
}

@media (max-width: 780px) {
  .workspace {
    padding: 0.9rem;
  }

  .card {
    border-radius: 16px;
  }

  .auth-shell {
    margin-top: 1.2rem;
    grid-template-columns: 1fr;
  }

  .auth-brand,
  .auth-card {
    border-radius: 18px;
  }

  .footer {
    flex-direction: column;
    gap: 0.3rem;
  }
}
