:root {
  --ink: #17212f;
  --muted: #627083;
  --line: #d9e2ea;
  --paper: #f5f8fa;
  --panel: #ffffff;
  --panel-soft: #f8fbfc;
  --accent: #0f766e;
  --accent-dark: #0a5f58;
  --accent-soft: #e4f6f3;
  --income: #0f766e;
  --expense: #b45309;
  --danger: #b42318;
  --warning: #9a5b00;
  --shadow: 0 18px 48px rgba(23, 33, 47, 0.08);
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}

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

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

button,
.primary-link,
.secondary-link {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 16px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 850;
}

button:hover,
.secondary-link:hover,
.nav-login:hover {
  border-color: var(--accent);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
}

.brand span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
}

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

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

h1 {
  margin-bottom: 0;
  max-width: 800px;
  font-size: clamp(42px, 6.4vw, 78px);
  line-height: 1.02;
}

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

.hero {
  min-height: 94vh;
  padding: 24px;
  background:
    linear-gradient(90deg, rgba(15, 118, 110, 0.06) 1px, transparent 1px),
    linear-gradient(180deg, #ffffff 0%, #eef8f6 100%);
  background-size: 42px 42px, auto;
}

.site-nav,
.hero-grid,
.workflow-section,
.operator-section,
.pricing-section {
  max-width: 1220px;
  margin: 0 auto;
}

.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-nav div {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-login {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 14px;
  background: #fff;
  font-weight: 850;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 520px;
  align-items: center;
  gap: 42px;
  padding: 88px 0 48px;
}

.hero-copy {
  max-width: 650px;
  margin: 22px 0;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.55;
}

.hero-actions,
.button-row,
.proof-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.primary-link,
form button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
}

.proof-row {
  margin-top: 24px;
}

.proof-row span,
.operator-list span {
  border: 1px solid #b8d8d3;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.72);
  color: #235953;
  font-size: 13px;
  font-weight: 850;
}

.product-preview,
.workflow-grid article,
.pricing article,
.login-card,
.login-screen,
.panel,
.kpi-grid article,
.workspace-header,
.sidebar {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.product-preview {
  padding: 18px;
}

.preview-top,
.panel-head,
.workspace-header,
.records-table article,
.category-list article,
.action-list article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.preview-top {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.preview-top span,
.kpi-grid span,
.preview-metrics span,
.records-table span,
.category-list span,
.login-preview span {
  color: var(--muted);
  font-size: 13px;
}

.preview-top strong {
  display: block;
  margin-top: 4px;
  font-size: 22px;
}

.preview-top em {
  border-radius: 999px;
  padding: 8px 10px;
  background: #fff4e6;
  color: var(--warning);
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
}

.preview-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 14px 0;
}

.preview-metrics article,
.work-item,
.login-preview article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--panel-soft);
}

.preview-metrics strong,
.login-preview strong {
  display: block;
  margin-top: 6px;
  font-size: 20px;
}

.preview-metrics .positive {
  background: var(--accent-soft);
  border-color: #b8d8d3;
}

.preview-work {
  display: grid;
  gap: 10px;
}

.work-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
  align-items: center;
}

.work-item span {
  color: var(--muted);
  font-size: 13px;
}

.work-item button {
  grid-row: span 2;
}

.work-item.urgent {
  border-color: #f0b7b2;
  background: #fff6f5;
}

.workflow-section,
.operator-section,
.pricing-section {
  padding: 54px 24px;
}

.section-title {
  max-width: 720px;
  margin-bottom: 18px;
}

.workflow-grid,
.pricing {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.workflow-grid article,
.pricing article {
  padding: 18px;
}

.workflow-grid span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 900;
}

.workflow-grid strong,
.pricing strong {
  display: block;
  margin: 14px 0 8px;
  font-size: 24px;
}

.workflow-grid p,
.pricing p,
.operator-section h2,
.login-story p,
.workspace-header p,
.upload-card p {
  color: var(--muted);
  line-height: 1.55;
}

.operator-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 26px;
}

.operator-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pricing article.featured {
  border-color: #82c8be;
  background: #f2fbf9;
}

.app-shell {
  min-height: 100vh;
}

.login-screen {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 32px;
  max-width: 1180px;
  margin: 56px auto;
  padding: 28px;
}

.login-story h1 {
  margin: 26px 0 16px;
  font-size: clamp(42px, 5vw, 72px);
}

.login-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 26px;
}

.login-card {
  align-self: start;
  padding: 20px;
}

form {
  display: grid;
  gap: 12px;
}

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

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: #fff;
  color: var(--ink);
}

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

.form-message {
  min-height: 22px;
  margin: 0;
  color: var(--danger);
}

.hidden {
  display: none !important;
}

.dashboard {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  border-radius: 0;
  padding: 22px;
  box-shadow: none;
}

.sidebar nav {
  display: grid;
  gap: 8px;
  margin: 34px 0;
}

.sidebar nav a,
.sidebar button {
  display: flex;
  align-items: center;
  min-height: 40px;
  border-radius: 8px;
  padding: 0 12px;
  background: var(--panel-soft);
  font-weight: 850;
}

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

.workspace-header {
  align-items: flex-start;
  padding: 20px;
  margin-bottom: 16px;
}

.workspace-header h1 {
  font-size: clamp(32px, 4vw, 52px);
}

.date-filter {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  align-items: end;
  min-width: 460px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.kpi-grid article,
.panel {
  padding: 18px;
}

.kpi-grid article.income {
  border-color: #b8d8d3;
  background: #f2fbf9;
}

.kpi-grid article.expense,
.kpi-grid article.warning {
  border-color: #efd18c;
  background: #fff9ec;
}

.kpi-grid strong {
  display: block;
  margin: 8px 0;
  font-size: 30px;
}

.ops-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
  gap: 16px;
  margin-bottom: 16px;
}

.action-list,
.category-list,
.records-table {
  display: grid;
  gap: 10px;
}

.action-list article,
.category-list article,
.records-table article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--panel-soft);
}

.action-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
}

.action-list article.overdue {
  border-color: #f0b7b2;
  background: #fff6f5;
}

.action-list article.income,
.action-list article.done {
  border-color: #b8d8d3;
  background: #f2fbf9;
}

.action-list article.expense {
  border-color: #efd18c;
  background: #fff9ec;
}

.action-list b,
.records-table b,
.category-list b {
  color: var(--accent-dark);
}

.action-list small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.upload-card {
  align-content: start;
}

.import-result {
  display: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--panel-soft);
  white-space: normal;
}

.import-result.is-loading,
.import-result.is-success {
  display: grid;
  gap: 4px;
}

.import-result.is-success {
  border-color: #b8d8d3;
  background: #f2fbf9;
}

.import-result strong,
.import-result b {
  color: var(--accent-dark);
}

.import-result span {
  color: var(--muted);
  font-size: 13px;
}

.entry-report-grid,
.report-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.form-grid textarea {
  grid-column: 1 / -1;
}

.bar-chart {
  display: flex;
  align-items: end;
  gap: 10px;
  min-height: 190px;
  overflow-x: auto;
}

.bar-chart > div {
  display: grid;
  grid-template-rows: 24px 1fr;
  align-items: end;
  justify-items: center;
}

.bar-chart i {
  display: inline-block;
  width: 22px;
  border-radius: 6px 6px 0 0;
}

.bar-chart .income {
  background: var(--income);
}

.bar-chart .expense {
  background: var(--expense);
}

.records-table article {
  grid-template-columns: 100px 1fr 100px 70px 110px auto;
}

pre {
  overflow: auto;
  max-height: 150px;
  white-space: pre-wrap;
  color: var(--muted);
}

@media (max-width: 1020px) {
  .hero-grid,
  .operator-section,
  .login-screen,
  .dashboard,
  .ops-grid,
  .entry-report-grid,
  .report-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .date-filter,
  .preview-metrics,
  .workflow-grid,
  .pricing,
  .kpi-grid,
  .login-preview {
    grid-template-columns: 1fr;
    min-width: 0;
  }
}

@media (max-width: 640px) {
  .hero,
  .workflow-section,
  .operator-section,
  .pricing-section,
  .dashboard-main {
    padding: 14px;
  }

  .site-nav,
  .workspace-header,
  .panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  h1 {
    font-size: 40px;
  }

  .form-grid,
  .records-table article,
  .action-list article {
    grid-template-columns: 1fr;
  }
}
