:root {
  color-scheme: dark;
  --bg: #05070b;
  --bg-2: #090d14;
  --surface: #0d131d;
  --surface-2: #121a27;
  --surface-3: #172233;
  --text: #f4f7fb;
  --muted: #8d9bb0;
  --line: #263346;
  --green: #20d489;
  --red: #ff5f6d;
  --blue: #4ca1ff;
  --amber: #f6c453;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(32, 212, 137, 0.11), transparent 32%),
    linear-gradient(180deg, #070a10, var(--bg));
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.hidden {
  display: none !important;
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
  background:
    linear-gradient(120deg, rgba(5, 7, 11, 0.94), rgba(5, 7, 11, 0.68)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 84px);
}

.market-tape {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 26px;
  overflow: hidden;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  color: var(--green);
  font-weight: 800;
  font-size: 12px;
  background: #020409;
}

.auth-panel {
  width: min(1120px, calc(100vw - 36px));
  margin: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 420px;
  gap: 28px;
  align-items: center;
}

.auth-copy {
  padding: 32px 0;
}

.auth-copy h1 {
  font-size: clamp(44px, 7vw, 82px);
  line-height: 0.95;
  margin: 0 0 20px;
  letter-spacing: 0;
}

.auth-copy p {
  max-width: 620px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.auth-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.auth-stats div,
.login-card,
.panel,
.metric-card,
.bank-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
  box-shadow: var(--shadow);
}

.auth-stats div {
  border-radius: 8px;
  padding: 18px;
}

.auth-stats strong,
.auth-stats span {
  display: block;
}

.auth-stats strong {
  font-size: 28px;
}

.auth-stats span {
  color: var(--muted);
  margin-top: 6px;
}

.login-card {
  border-radius: 8px;
  padding: 28px;
  display: grid;
  gap: 16px;
  background-color: rgba(13, 19, 29, 0.88);
  backdrop-filter: blur(18px);
}

.form-head span {
  display: block;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.form-head strong {
  display: block;
  margin-top: 6px;
  font-size: 24px;
}

.auth-message {
  min-height: 20px;
  color: var(--amber);
  margin: 0;
  font-size: 13px;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 26px 18px;
  background: #020409;
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 30px;
  border-right: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #20d489, #4ca1ff);
  color: #04100b;
  font-weight: 900;
}

.brand strong,
.brand span {
  display: block;
}

.brand span {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav-item {
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #a9b6c7;
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 46px;
  padding: 0 12px;
  text-align: left;
  font-weight: 700;
}

.nav-item svg,
button svg,
.metric-card svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.nav-item.active,
.nav-item:hover {
  background: rgba(32, 212, 137, 0.1);
  border-color: rgba(32, 212, 137, 0.25);
  color: #ffffff;
}

.sidebar-card {
  margin-top: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 18px;
  background: linear-gradient(135deg, rgba(32, 212, 137, 0.11), rgba(76, 161, 255, 0.07));
}

.sidebar-card span,
.sidebar-card small {
  display: block;
  color: var(--muted);
}

.sidebar-card strong {
  display: block;
  margin: 8px 0;
  font-size: 24px;
}

.main {
  padding: 26px;
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.eyebrow {
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
  margin: 0 0 6px;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 34px;
}

h2 {
  margin-bottom: 0;
  font-size: 18px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.primary-btn,
.ghost-btn,
.icon-btn,
.text-btn,
.danger-btn,
.row-delete {
  border: 0;
  border-radius: 8px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  font-weight: 800;
}

.primary-btn {
  background: linear-gradient(135deg, #20d489, #12a86a);
  color: #03100b;
}

.ghost-btn,
.icon-btn {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--line);
}

.danger-btn,
.row-delete {
  background: rgba(255, 95, 109, 0.1);
  color: #ff9ca5;
  border: 1px solid rgba(255, 95, 109, 0.32);
}

.row-delete {
  width: 36px;
  min-height: 34px;
  padding: 0;
}

.text-btn {
  background: transparent;
  color: var(--green);
  padding: 0;
  min-height: 28px;
}

.icon-btn {
  width: 42px;
  padding: 0;
}

.full {
  width: 100%;
}

.user-chip,
.save-badge {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 800;
}

.save-badge {
  color: var(--green);
  text-transform: uppercase;
  font-size: 11px;
}

.content-section {
  display: none;
}

.content-section.active {
  display: block;
}

.terminal-strip {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: auto;
  margin-bottom: 16px;
}

.terminal-strip span {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--muted);
  background: #080c13;
  font-size: 12px;
  font-weight: 800;
}

.attention-banner {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid rgba(246, 196, 83, 0.34);
  background:
    linear-gradient(135deg, rgba(246, 196, 83, 0.14), rgba(255, 95, 109, 0.07)),
    #0a1019;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.34);
}

.attention-banner.critical {
  border-color: rgba(255, 95, 109, 0.52);
  background:
    linear-gradient(135deg, rgba(255, 95, 109, 0.16), rgba(246, 196, 83, 0.08)),
    #0a1019;
}

.attention-banner.healthy {
  border-color: rgba(32, 212, 137, 0.34);
  background:
    linear-gradient(135deg, rgba(32, 212, 137, 0.13), rgba(76, 161, 255, 0.06)),
    #0a1019;
}

.attention-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #06110c;
  background: var(--amber);
}

.attention-banner.critical .attention-icon {
  background: var(--red);
  color: #ffffff;
}

.attention-banner.healthy .attention-icon {
  background: var(--green);
  color: #03100b;
}

.attention-banner strong,
.attention-banner span {
  display: block;
}

.attention-banner strong {
  margin-bottom: 5px;
}

.attention-banner span {
  color: var(--muted);
  line-height: 1.45;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.metric-card,
.panel,
.bank-card {
  border-radius: 8px;
}

.metric-card {
  padding: 20px;
  min-height: 138px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-left: 4px solid transparent;
}

.metric-card span,
.metric-card small {
  color: var(--muted);
}

.metric-card strong {
  font-size: clamp(22px, 2vw, 30px);
}

.metric-card small {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
}

.accent-green {
  border-left-color: var(--green);
}

.accent-red {
  border-left-color: var(--red);
}

.accent-blue {
  border-left-color: var(--blue);
}

.accent-amber {
  border-left-color: var(--amber);
}

.dashboard-grid,
.goal-layout,
.news-layout,
.insights-layout,
.education-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.9fr);
  gap: 14px;
}

.panel {
  padding: 20px;
  min-width: 0;
  background-color: rgba(13, 19, 29, 0.92);
}

.market-panel {
  background:
    linear-gradient(180deg, rgba(32, 212, 137, 0.07), rgba(13, 19, 29, 0.92)),
    var(--surface);
}

.wide {
  min-width: 0;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin-bottom: 18px;
}

select,
input {
  width: 100%;
  border: 1px solid var(--line);
  background: #0a1019;
  color: var(--text);
  border-radius: 8px;
  min-height: 42px;
  padding: 0 12px;
  outline: none;
}

select option {
  background: #ffffff;
  color: #111827;
}

input:focus,
select:focus {
  border-color: rgba(32, 212, 137, 0.68);
  box-shadow: 0 0 0 3px rgba(32, 212, 137, 0.1);
}

.panel-header select {
  width: 130px;
}

.chart-wrap {
  height: 340px;
}

.donut-wrap {
  height: 280px;
}

.daily-list,
.pace-list,
.source-list {
  display: grid;
  gap: 12px;
}

.daily-list div,
.pace-list div,
.source-list a,
.source-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px;
  background: #0a1019;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.source-list button {
  width: 100%;
  color: var(--text);
  text-align: left;
  font-weight: 800;
}

.source-list a:hover,
.source-list button:hover {
  border-color: rgba(32, 212, 137, 0.55);
  color: var(--green);
}

.daily-list span,
.pace-list span {
  color: var(--muted);
  font-weight: 700;
}

.table-wrap {
  overflow: auto;
}

.table-wrap.tall {
  max-height: 560px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 13px 10px;
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
}

td {
  color: #d9e3f2;
}

td.amount-income {
  color: var(--green);
  font-weight: 900;
}

td.amount-expense {
  color: var(--red);
  font-weight: 900;
}

.transactions-layout {
  display: grid;
  gap: 14px;
}

.quick-entry {
  background:
    linear-gradient(135deg, rgba(32, 212, 137, 0.11), rgba(76, 161, 255, 0.07)),
    var(--surface);
}

.transaction-form {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) repeat(5, minmax(130px, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

.transaction-form .primary-btn {
  min-width: 132px;
  height: 42px;
}

.transactions-board {
  min-height: 560px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.bank-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.bank-card {
  min-height: 280px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
}

.bank-card::after {
  content: "";
  position: absolute;
  inset: auto -40px -55px auto;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  opacity: 0.12;
  background: currentColor;
}

.bank-card p,
.bank-card small {
  color: var(--muted);
  margin-bottom: 8px;
}

.bank-card strong {
  font-size: 30px;
  color: var(--text);
}

.real-logo {
  width: 128px;
  height: 58px;
  object-fit: contain;
  object-position: left center;
  padding: 10px;
  border-radius: 8px;
  background: #ffffff;
}

.caixa {
  color: #0a67b1;
}

.picpay {
  color: #16a05d;
}

.xp {
  color: #f4c542;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.news-card {
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border-radius: 8px;
  background: #0a1019;
  border: 1px solid var(--line);
  color: var(--text);
  text-align: left;
}

.news-card:hover {
  border-color: rgba(32, 212, 137, 0.55);
  transform: translateY(-1px);
}

.news-card strong {
  line-height: 1.35;
}

.news-card p {
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

.news-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.insight-feed,
.action-plan,
.lesson-list,
.alert-list {
  display: grid;
  gap: 12px;
}

.insight-feed.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.insight-card {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #0a1019;
}

.insight-icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(32, 212, 137, 0.1);
  color: var(--green);
}

.insight-card strong {
  display: block;
  margin-bottom: 5px;
}

.insight-card p {
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

.action-plan div {
  padding: 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(32, 212, 137, 0.1), rgba(76, 161, 255, 0.05));
}

.action-plan span {
  display: block;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 7px;
}

.action-plan p {
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

.alert-card {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #0a1019;
}

.alert-card.warning {
  border-color: rgba(246, 196, 83, 0.35);
}

.alert-card.critical {
  border-color: rgba(255, 95, 109, 0.42);
}

.alert-card.healthy {
  border-color: rgba(32, 212, 137, 0.3);
}

.alert-level {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #03100b;
  background: var(--amber);
}

.alert-card.critical .alert-level {
  color: #ffffff;
  background: var(--red);
}

.alert-card.healthy .alert-level {
  background: var(--green);
}

.alert-card strong {
  display: block;
  margin-bottom: 5px;
}

.alert-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.lesson-panel {
  min-height: 650px;
}

.lesson-controls {
  display: flex;
  gap: 8px;
}

.reel-stage {
  display: grid;
  grid-template-columns: minmax(260px, 360px) 1fr;
  align-items: center;
  gap: 26px;
}

.reel-phone {
  position: relative;
  min-height: 560px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 14px;
  overflow: hidden;
  border-radius: 26px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, transparent 0 32%, rgba(0, 0, 0, 0.84)),
    radial-gradient(circle at 30% 18%, rgba(32, 212, 137, 0.38), transparent 28%),
    radial-gradient(circle at 80% 12%, rgba(76, 161, 255, 0.28), transparent 26%),
    linear-gradient(135deg, #121a27, #05070b);
  box-shadow: inset 0 0 0 8px rgba(0, 0, 0, 0.28), var(--shadow);
}

.reel-visual {
  position: absolute;
  inset: 54px 22px auto 22px;
  height: 210px;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 16px;
  opacity: 0.9;
}

.reel-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 18px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 100% 42px, 42px 100%;
  mask-image: linear-gradient(to bottom, black, transparent);
}

.reel-visual span {
  position: relative;
  width: 24px;
  min-height: 42px;
  border-radius: 999px 999px 6px 6px;
  background: linear-gradient(180deg, var(--green), rgba(32, 212, 137, 0.18));
  box-shadow: 0 0 22px rgba(32, 212, 137, 0.28);
  animation: reelBars 1.8s ease-in-out infinite;
}

.reel-visual span:nth-child(1) { height: 88px; animation-delay: 0s; }
.reel-visual span:nth-child(2) { height: 142px; animation-delay: 0.16s; background: linear-gradient(180deg, var(--blue), rgba(76, 161, 255, 0.18)); }
.reel-visual span:nth-child(3) { height: 116px; animation-delay: 0.32s; }
.reel-visual span:nth-child(4) { height: 172px; animation-delay: 0.48s; background: linear-gradient(180deg, var(--amber), rgba(246, 196, 83, 0.18)); }
.reel-visual span:nth-child(5) { height: 126px; animation-delay: 0.64s; }

@keyframes reelBars {
  0%, 100% { transform: scaleY(0.88); filter: brightness(0.9); }
  50% { transform: scaleY(1.08); filter: brightness(1.25); }
}

.reel-phone::before {
  content: "";
  position: absolute;
  inset: 18px auto auto 50%;
  width: 92px;
  height: 6px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
}

.reel-progress {
  position: absolute;
  top: 8px;
  left: 18px;
  right: 18px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green) var(--lesson-progress), rgba(255, 255, 255, 0.16) 0);
}

.reel-counter {
  position: absolute;
  top: 20px;
  right: 24px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 12px;
  font-weight: 900;
}

.reel-tag {
  width: fit-content;
  border-radius: 999px;
  padding: 7px 10px;
  color: #03100b;
  background: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.reel-phone h3 {
  margin: 0;
  font-size: 32px;
  line-height: 1.08;
}

.reel-phone p {
  color: #dbe7f5;
  line-height: 1.55;
  margin: 0;
}

.reel-metric {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 13px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.reel-metric span {
  color: var(--muted);
  font-weight: 800;
}

.reel-metric strong {
  color: var(--green);
  font-size: 20px;
}

.lesson-copy {
  display: grid;
  gap: 14px;
}

.lesson-copy p {
  color: var(--muted);
  line-height: 1.7;
  max-width: 620px;
}

.lesson-item {
  width: 100%;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  padding: 13px;
  text-align: left;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #0a1019;
  color: var(--text);
}

.lesson-item:hover,
.lesson-item.active {
  border-color: rgba(32, 212, 137, 0.55);
  background: rgba(32, 212, 137, 0.08);
}

.lesson-number {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--green);
  font-weight: 900;
}

.lesson-item strong,
.lesson-item span {
  display: block;
}

.lesson-item span {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.4;
}

.goal-meter {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  align-items: center;
}

.goal-ring {
  width: 210px;
  height: 210px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--green) var(--progress), #162131 0);
  position: relative;
}

.goal-ring::after {
  content: "";
  position: absolute;
  width: 154px;
  height: 154px;
  border-radius: 50%;
  background: var(--surface);
}

.goal-ring span {
  position: relative;
  z-index: 1;
  font-size: 34px;
  font-weight: 900;
}

.goal-copy {
  display: grid;
  gap: 14px;
}

.goal-copy strong {
  font-size: 24px;
}

.goal-copy p {
  color: var(--muted);
  margin: 0;
}

.theater-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(2, 4, 9, 0.82);
  backdrop-filter: blur(14px);
}

.toast-stack {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  display: grid;
  gap: 10px;
  width: min(380px, calc(100vw - 32px));
}

.motivation-toast {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(32, 212, 137, 0.32);
  background: rgba(8, 12, 19, 0.94);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.48);
  animation: toastIn 0.28s ease both;
}

.motivation-toast div:first-child {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--green), var(--blue));
  color: #03100b;
}

.motivation-toast strong,
.motivation-toast span {
  display: block;
}

.motivation-toast span {
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.45;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.notify-pulse {
  position: relative;
}

.notify-pulse span {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  padding: 0 5px;
  border-radius: 999px;
  color: #03100b;
  background: var(--green);
  font-size: 11px;
  font-weight: 900;
}

.notification-center {
  position: fixed;
  top: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 35;
  width: min(420px, calc(100vw - 32px));
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(8, 12, 19, 0.96);
  backdrop-filter: blur(18px);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.58);
}

.notification-head,
.notification-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.notification-list {
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 10px;
}

.notification-item {
  padding: 13px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0a1019;
}

.notification-item strong,
.notification-item span {
  display: block;
}

.notification-item span {
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.45;
}

.notes-app {
  min-height: calc(100vh - 126px);
  display: grid;
  grid-template-columns: 330px 1fr;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: #090d14;
  box-shadow: var(--shadow);
}

.notes-sidebar {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 14px;
  padding: 18px;
  border-right: 1px solid var(--line);
  background: rgba(13, 19, 29, 0.92);
}

.notes-head,
.notes-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.notes-search {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  min-height: 40px;
  border-radius: 12px;
  background: #161f2d;
  color: var(--muted);
}

.notes-search input {
  border: 0;
  min-height: 38px;
  padding: 0;
  background: transparent;
}

.notes-list {
  display: grid;
  align-content: start;
  gap: 8px;
  overflow: auto;
}

.note-list-item {
  width: 100%;
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.note-list-item:hover,
.note-list-item.active {
  background: rgba(246, 196, 83, 0.14);
}

.note-list-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.note-list-item span {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notes-editor {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 12px;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(246, 196, 83, 0.06), transparent 24%),
    #0d131d;
}

.notes-toolbar {
  color: var(--muted);
  font-size: 13px;
}

.notes-toolbar strong {
  display: block;
  color: var(--green);
  margin-top: 3px;
}

.note-title-input,
.note-body-input {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  outline: none;
}

.note-title-input {
  min-height: 54px;
  padding: 0;
  font-size: clamp(28px, 5vw, 46px);
  font-weight: 900;
}

.note-body-input {
  min-height: 520px;
  resize: none;
  padding: 0;
  line-height: 1.7;
  font-size: 18px;
}

.theater-panel {
  width: min(1320px, 100%);
  height: min(820px, calc(100vh - 44px));
  display: grid;
  grid-template-rows: auto 1fr;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.62);
}

.theater-bar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  background: #070b12;
  border-bottom: 1px solid var(--line);
}

.theater-bar strong {
  display: block;
  max-width: min(760px, 58vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.theater-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

#theaterFrame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #ffffff;
}

@media (max-width: 1120px) {
  .metrics-grid,
  .bank-grid,
  .news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-grid,
  .goal-layout,
  .news-layout,
  .insights-layout,
  .education-shell,
  .notes-app,
  .auth-panel {
    grid-template-columns: 1fr;
  }

  .transaction-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .transaction-form .primary-btn {
    grid-column: 1 / -1;
  }
}

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

  .sidebar {
    position: static;
    height: auto;
    padding: 18px;
  }

  .nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar-card {
    display: none;
  }

  .main {
    padding: 18px;
  }

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

  .top-actions {
    justify-content: space-between;
  }

  .metrics-grid,
  .bank-grid,
  .news-grid,
  .insight-feed.compact,
  .attention-banner,
  .transaction-form,
  .auth-stats {
    grid-template-columns: 1fr;
  }

  .reel-stage {
    grid-template-columns: 1fr;
  }

  .reel-phone {
    min-height: 500px;
  }

  .goal-meter {
    grid-template-columns: 1fr;
  }

  .goal-ring {
    width: 180px;
    height: 180px;
  }

  .goal-ring::after {
    width: 130px;
    height: 130px;
  }

  .notes-app {
    min-height: auto;
  }

  .notes-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .notification-center {
    inset: 12px;
    width: auto;
  }
}
