/* 
  Aqui são definidas as "variáveis" do CSS. 
  Pense nisso como um estoque de cores e tamanhos que você reaproveita em todo o código. 
  Ex: Toda vez que usar var(--accent), o navegador pintará com a cor verde #0f8b73.
*/
:root {
  --bg: #ecf2f7;
  --bg-2: #dde7f0;
  --ink: #132234;
  --muted: #627487;
  --accent: #0f8b73;
  --accent-2: #0c223d;
  --surface: #ffffff;
  --surface-strong: #f5f8fb;
  --surface-soft: #edf3f7;
  --stroke: rgba(12, 34, 61, 0.1);
  --stroke-strong: rgba(12, 34, 61, 0.16);
  --shadow: 0 24px 56px rgba(12, 34, 61, 0.12);
  --shadow-soft: 0 16px 36px rgba(12, 34, 61, 0.08);
  --radius: 22px;
  --radius-sm: 14px;
  --font-display: "IBM Plex Serif", serif;
  --font-body: "IBM Plex Sans", sans-serif;
}

/* Reset global básico para que todos os navegadores lidem melhor com tamanhos */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Configurações da página inteira (fundo, fonte padrão) */
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background: linear-gradient(180deg, #eef3f8 0%, #e5ebf3 48%, #f4f7fb 100%);
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(
      rgba(12, 34, 61, 0.06) 1px,
      transparent 0
    ),
    radial-gradient(rgba(15, 139, 115, 0.12), transparent 58%);
  background-size: 110px 110px, 540px 540px;
  background-position: 0 0, 92% -8%;
  opacity: 0.42;
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  inset: auto auto -180px -160px;
  width: 460px;
  height: 460px;
  background: radial-gradient(
    circle,
    rgba(12, 34, 61, 0.12) 0%,
    rgba(12, 34, 61, 0.02) 58%,
    transparent 72%
  );
  pointer-events: none;
  z-index: 0;
}

/* A estrutura principal que segura tanto o menu lateral quanto a área do conteúdo da direita */
.app-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 300px 1fr;
}

/* Menu lateral escuro na esquerda */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 26px 22px 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, transparent 14%),
    linear-gradient(180deg, #0b1d35 0%, #102746 52%, #143054 100%);
  color: #d5deea;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 24px;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.04);
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, #0f8b73 0%, rgba(15, 139, 115, 0.15) 72%, transparent 100%);
}

.brand {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.brand-logo {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #11866f 0%, #0f6f60 100%);
  color: #ffffff;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.brand-copy strong {
  display: block;
  font-size: 1.02rem;
  color: #ffffff;
}

.brand-copy > span {
  display: block;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.45;
}

.sidebar-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.46);
  font-weight: 600;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nav-item {
  appearance: none;
  text-decoration: none;
  color: rgba(213, 222, 234, 0.84);
  padding: 14px 15px 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.03);
  font-weight: 500;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease,
    border-color 0.2s ease;
  text-align: left;
  cursor: pointer;
  font: inherit;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item:hover {
  background: rgba(15, 139, 115, 0.14);
  color: #ffffff;
  border-color: rgba(15, 139, 115, 0.22);
  transform: translateY(-1px);
}

.nav-item.is-active {
  background: linear-gradient(135deg, rgba(15, 139, 115, 0.28) 0%, rgba(15, 139, 115, 0.08) 100%);
  color: #ffffff;
  border-color: rgba(15, 139, 115, 0.32);
  box-shadow: 0 18px 34px rgba(6, 18, 33, 0.28);
}

.nav-title {
  font-size: 0.96rem;
  font-weight: 600;
}

.nav-meta {
  font-size: 0.78rem;
  line-height: 1.4;
  color: rgba(213, 222, 234, 0.66);
}

.nav-item.is-active .nav-meta,
.nav-item:hover .nav-meta {
  color: rgba(255, 255, 255, 0.82);
}

.sidebar-history {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 18px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.78);
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.sidebar-history p {
  margin: 0;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.7);
}

.history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 160px;
  overflow: auto;
}

.history-item {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(12, 34, 61, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.82rem;
  line-height: 1.45;
}

.history-empty {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.55);
}

.sidebar-card {
  margin-top: auto;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.04) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 18px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Área central "Main" - A tela onde os cálculos do sistema acontecem */
.page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 34px 34px 72px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.tab-panel {
  display: none;
  flex-direction: column;
  gap: 22px;
}

.tab-panel.is-active {
  display: flex;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 24px;
  align-items: stretch;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 250, 252, 0.98) 100%);
  border: 1px solid rgba(12, 34, 61, 0.08);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-soft);
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 24px;
  padding: 30px;
  border-radius: var(--radius);
  border: 1px solid rgba(12, 34, 61, 0.08);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(241, 247, 249, 0.98) 56%, rgba(248, 250, 252, 0.99) 100%);
  box-shadow: var(--shadow-soft);
}

.topbar,
.home-hero,
.panel {
  position: relative;
  overflow: hidden;
}

.topbar::before,
.home-hero::before,
.panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent) 0%, rgba(15, 139, 115, 0.22) 70%, transparent 100%);
}

.hero-signal {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(15, 139, 115, 0.1);
  border: 1px solid rgba(15, 139, 115, 0.18);
  color: var(--accent-2);
  font-size: 0.84rem;
  font-weight: 600;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #14a57f;
  box-shadow: 0 0 0 6px rgba(20, 165, 127, 0.14);
}

.home-hero-text h1 {
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 2vw + 1.55rem, 3.15rem);
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

.welcome-user {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}

.user-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(15, 139, 115, 0.2);
  box-shadow: 0 10px 20px rgba(12, 34, 61, 0.1);
  background-color: var(--surface-soft);
}

.user-greeting {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.user-message {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.home-hero-text p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 1.02rem;
  max-width: 60ch;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 18px 0 22px;
}

.hero-actions--stack {
  flex-direction: column;
  align-items: stretch;
  margin-top: 16px;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.metric-card {
  padding: 16px 16px 15px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(12, 34, 61, 0.08);
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--muted);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.metric-card strong {
  font-size: 1.02rem;
  color: var(--accent-2);
}

.hero-card {
  background: linear-gradient(165deg, #0b1f39 0%, #113054 54%, #173b62 100%);
  border-radius: var(--radius);
  padding: 24px;
  color: #e9f1fb;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 0 22px 42px rgba(12, 34, 61, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-card h2 {
  margin: 6px 0 8px;
  font-size: 1.3rem;
  font-family: var(--font-display);
}

.hero-card p {
  margin: 0;
  color: rgba(233, 241, 251, 0.78);
  font-size: 0.95rem;
}

.suggestion-panel {
  margin-top: 24px;
}

.suggestion-box {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}

.suggestion-alert {
  padding: 12px 16px;
  border-radius: 12px;
  background-color: rgba(230, 244, 250, 0.8);
  border: 1px solid rgba(17, 134, 111, 0.2);
  color: var(--accent-2);
  font-size: 0.9rem;
}

.suggestion-alert strong {
  color: var(--accent);
}

.suggestion-textarea {
  width: 100%;
  min-height: 100px;
  background-color: #f7fafc !important;
  cursor: not-allowed;
  opacity: 0.8;
}

.hero-card .btn {
  box-shadow: 0 14px 24px rgba(17, 134, 111, 0.3);
}

.hero-card .btn-ghost {
  color: rgba(233, 241, 251, 0.92);
  border-color: rgba(233, 241, 251, 0.4);
}

.hero-card .btn-ghost:hover {
  background: rgba(233, 241, 251, 0.12);
}

.hero-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.92rem;
  color: rgba(233, 241, 251, 0.88);
}

.hero-list li {
  position: relative;
  padding-left: 18px;
}

.hero-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #18a689;
  box-shadow: 0 0 0 4px rgba(24, 166, 137, 0.2);
}

.topbar-text h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 2vw + 1.6rem, 2.7rem);
  margin: 12px 0 10px;
  letter-spacing: -0.01em;
}

.topbar-text p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 1rem;
  max-width: 58ch;
  line-height: 1.65;
}

.eyebrow {
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  color: var(--accent);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(15, 139, 115, 0.2);
  background: rgba(15, 139, 115, 0.08);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-2);
}

.summary-card {
  background: linear-gradient(180deg, #ffffff 0%, #f1f8f5 100%);
  border: 1px solid rgba(15, 139, 115, 0.14);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.summary-head h2 {
  margin: 6px 0 0;
  font-size: 1.15rem;
}

.summary-total {
  font-family: var(--font-display);
  font-size: 1.9rem;
  color: var(--accent-2);
}

.summary-total--text {
  font-size: clamp(1.5rem, 1.2vw + 1.2rem, 2.05rem);
  line-height: 1.2;
}

.summary-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  row-gap: 10px;
  column-gap: 12px;
  font-size: 0.93rem;
  color: var(--muted);
}

.summary-grid--panel {
  margin-top: 6px;
}

.summary-grid--panel div:nth-child(even) {
  font-weight: 600;
  color: var(--accent-2);
  font-variant-numeric: tabular-nums;
}

.summary-grid--panel div:last-child {
  color: var(--accent);
}

.panel {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid rgba(12, 34, 61, 0.08);
  box-shadow: var(--shadow-soft);
}

.feature-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.feature-card {
  padding: 20px;
  border-radius: 18px;
  border: 1px solid rgba(12, 34, 61, 0.08);
  background: linear-gradient(180deg, #ffffff 0%, #f6f9fc 100%);
  box-shadow: 0 12px 26px rgba(12, 34, 61, 0.05);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feature-tag {
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(17, 134, 111, 0.25);
  background: rgba(17, 134, 111, 0.08);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.feature-card h3 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--accent-2);
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.55;
}

.feature-meta {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(12, 34, 61, 0.08);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
}

.step-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.step-card {
  padding: 20px;
  border-radius: 18px;
  border: 1px solid rgba(12, 34, 61, 0.08);
  background: linear-gradient(180deg, #ffffff 0%, #f6f9fc 100%);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.step-index {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(17, 134, 111, 0.15);
  color: var(--accent-2);
  font-weight: 600;
  font-size: 0.9rem;
}

.step-card h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--accent-2);
}

.step-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.panel-head {
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.panel-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.panel-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.panel-head--row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.form-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.field--full {
  grid-column: 1 / -1;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.95rem;
  color: var(--accent-2);
  font-weight: 600;
}

.field span,
.field label {
  font-weight: 600;
}

.section-kicker {
  display: inline-flex;
  align-self: flex-start;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(15, 139, 115, 0.09);
  border: 1px solid rgba(15, 139, 115, 0.16);
  color: var(--accent);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.formula {
  padding: 13px 14px;
  border-radius: var(--radius-sm);
  border: 1px dashed rgba(12, 34, 61, 0.18);
  background: var(--surface-strong);
  color: var(--accent-2);
  font-size: 0.92rem;
  line-height: 1.5;
}

.result {
  padding: 13px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(15, 139, 115, 0.22);
  background: rgba(15, 139, 115, 0.08);
  color: var(--accent-2);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

input[type="text"],
input[type="number"],
input[type="date"],
select,
textarea {
  padding: 12px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(12, 34, 61, 0.14);
  font-size: 0.97rem;
  font-family: var(--font-body);
  background: linear-gradient(180deg, #fbfdff 0%, #f4f8fb 100%);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, outline 0.2s ease;
}

textarea {
  min-height: 132px;
  resize: vertical;
  line-height: 1.55;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(15, 139, 115, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.field--static .formula,
.field--static .result {
  min-height: 48px;
  display: flex;
  align-items: center;
}

.field-help {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.field-hint {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--muted);
  margin-top: -4px;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  padding: 11px 16px;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: linear-gradient(135deg, #0f8b73 0%, #0b705d 100%);
  color: #ffffff;
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
  box-shadow: 0 14px 28px rgba(15, 139, 115, 0.24);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 30px rgba(15, 139, 115, 0.28);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(12, 34, 61, 0.12);
  color: var(--accent-2);
  box-shadow: none;
}

.btn-ghost:hover {
  background: rgba(12, 34, 61, 0.04);
}

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid rgba(12, 34, 61, 0.12);
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.calc-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
  font-size: 0.92rem;
}

.calc-table thead th {
  background: #0d223d;
  color: #f2f6fb;
  text-align: left;
  padding: 13px 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  position: sticky;
  top: 0;
}

.calc-table tbody td {
  padding: 12px;
  border-bottom: 1px solid rgba(12, 34, 61, 0.08);
  vertical-align: middle;
}

.calc-table tbody tr:hover {
  background: rgba(15, 139, 115, 0.05);
}

.calc-table input {
  width: 100%;
  min-width: 120px;
}

.calc-table .index {
  font-weight: 600;
  color: var(--accent-2);
}

.calc-table .numeric {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.calc-table .remove-btn {
  border: none;
  background: transparent;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
}

.summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.note-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 22px;
  align-items: start;
}

.note-config,
.note-preview-card {
  padding: 20px;
  border-radius: 18px;
  border: 1px solid rgba(12, 34, 61, 0.08);
  background: linear-gradient(180deg, #ffffff 0%, #f7fafc 100%);
  box-shadow: 0 12px 24px rgba(12, 34, 61, 0.05);
}

.note-preview-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}

.note-preview-head h3 {
  margin: 6px 0 0;
  font-family: var(--font-display);
  font-size: 1.18rem;
  color: var(--accent-2);
}

.note-preview-badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(15, 139, 115, 0.1);
  border: 1px solid rgba(15, 139, 115, 0.18);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.note-sheet {
  padding: 24px;
  border-radius: 20px;
  border: 1px solid rgba(12, 34, 61, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 251, 253, 0.98) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.note-sheet-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding-bottom: 16px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(12, 34, 61, 0.08);
}

.note-sheet-header h3 {
  margin: 8px 0 0;
  font-family: var(--font-display);
  font-size: 1.45rem;
  color: var(--accent-2);
}

.note-kicker {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 139, 115, 0.08);
  border: 1px solid rgba(15, 139, 115, 0.14);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.note-sheet-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: right;
}

.note-sheet-brand strong {
  font-size: 1rem;
  color: var(--accent-2);
}

.note-sheet-brand span {
  font-size: 0.82rem;
  color: var(--muted);
}

.note-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.note-meta-item {
  padding: 14px;
  border-radius: 14px;
  background: var(--surface-soft);
  border: 1px solid rgba(12, 34, 61, 0.07);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.note-meta-item span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.note-meta-item strong {
  color: var(--accent-2);
  font-size: 0.97rem;
}

.note-copy {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.65;
}

.note-table-wrap {
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid rgba(12, 34, 61, 0.08);
  margin-bottom: 18px;
}

.note-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.note-table thead th {
  padding: 12px;
  background: #edf4f7;
  color: var(--accent-2);
  text-align: left;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.note-table tbody td {
  padding: 12px;
  border-top: 1px solid rgba(12, 34, 61, 0.08);
  color: var(--ink);
  vertical-align: top;
}

.note-empty {
  text-align: center;
  color: var(--muted);
  font-style: italic;
}

.note-total-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.note-total-grid div {
  padding: 14px;
  border-radius: 14px;
  background: rgba(15, 139, 115, 0.08);
  border: 1px solid rgba(15, 139, 115, 0.16);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.note-total-grid span {
  color: var(--muted);
  font-size: 0.78rem;
}

.note-total-grid strong {
  color: var(--accent-2);
  font-size: 1rem;
}

.note-observation {
  padding: 16px;
  border-radius: 16px;
  background: #f8fbfd;
  border: 1px solid rgba(12, 34, 61, 0.08);
}

.note-observation span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.note-observation p {
  margin: 0;
  color: var(--ink);
  line-height: 1.6;
  white-space: pre-wrap;
}

.mini-card {
  padding: 20px;
  border-radius: 18px;
  border: 1px solid rgba(12, 34, 61, 0.08);
  background: linear-gradient(180deg, #ffffff 0%, #f6f9fc 100%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 12px 24px rgba(12, 34, 61, 0.05);
}

.mini-label {
  font-size: 0.85rem;
  color: var(--muted);
}

.mini-card strong {
  font-size: 1.3rem;
  color: var(--accent-2);
  font-variant-numeric: tabular-nums;
}

.text-result {
  font-size: 1rem;
  line-height: 1.4;
  font-variant-numeric: normal;
}

.muted {
  color: var(--muted);
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  animation: reveal 0.6s ease forwards;
}

.topbar {
  animation-delay: 0.05s;
}

.home-hero {
  animation-delay: 0.05s;
}

.tab-panel .panel:nth-of-type(1) {
  animation-delay: 0.1s;
}

.tab-panel .panel:nth-of-type(2) {
  animation-delay: 0.18s;
}

.tab-panel .panel:nth-of-type(3) {
  animation-delay: 0.26s;
}

.tab-panel .panel:nth-of-type(4) {
  animation-delay: 0.34s;
}

@keyframes reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
    border-right: none;
    border-bottom: 1px solid rgba(11, 31, 58, 0.12);
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
  }

  .nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }

  .sidebar-history {
    width: 100%;
  }

  .sidebar-card {
    width: 100%;
    margin-top: 12px;
  }
}

@media (max-width: 960px) {
  .topbar {
    grid-template-columns: 1fr;
  }

  .home-hero {
    grid-template-columns: 1fr;
  }

  .note-layout {
    grid-template-columns: 1fr;
  }

  .note-total-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .actions {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .page {
    padding: 24px 16px 48px;
  }

  .home-hero {
    padding: 20px;
  }

  .panel,
  .topbar {
    padding: 18px;
  }

  .nav {
    flex-direction: column;
    width: 100%;
  }

  .nav-item {
    width: 100%;
    min-width: unset;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn,
  .hero-actions .btn-ghost {
    width: 100%;
    text-align: center;
  }

  .note-sheet,
  .note-config,
  .note-preview-card {
    padding: 18px;
  }

  .note-meta-grid,
  .note-total-grid {
    grid-template-columns: 1fr;
  }

  .summary-total {
    font-size: 1.6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .btn,
  .nav-item {
    transition: none;
  }
}
