:root {
  --bg: #f3f5ef;
  --paper: #fbfcf7;
  --ink: #1a2a2f;
  --ink-soft: #485c5f;
  --line: #d7ddd1;
  --brand: #0f7c78;
  --brand-strong: #0a5f5c;
  --accent: #ec9f3c;
  --accent-soft: #f5e5bf;
  --danger: #cb4e4e;
  --success: #2d8a56;
  --warning: #a46a1e;
  --card-shadow: 0 14px 30px rgba(15, 53, 60, 0.12);
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --max-width: 1200px;
  --sidebar: 280px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: "Space Grotesk", "Avenir Next", "Segoe UI", sans-serif;
  background: radial-gradient(circle at top right, #e5efe6 0%, #f3f5ef 38%, #f5f3ed 100%);
  color: var(--ink);
  line-height: 1.45;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-family: "Fraunces", "Georgia", serif;
  font-weight: 600;
  line-height: 1.1;
}

p {
  margin: 0;
}

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

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(var(--max-width), 92vw);
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.06rem;
  font-weight: 700;
}

.brand img {
  width: 34px;
  height: 34px;
}

.glass-card {
  background: rgba(251, 252, 247, 0.92);
  border: 1px solid rgba(215, 221, 209, 0.9);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  background: #e3f2ef;
  border: 1px solid #b8dcd6;
  color: #0f5350;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 700;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.78rem 1.15rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 700;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(140deg, var(--brand), var(--brand-strong));
  color: #f3fcfb;
  box-shadow: 0 10px 24px rgba(9, 83, 82, 0.22);
}

.btn-secondary {
  background: #fcf6e8;
  color: #6f4c1f;
  border-color: #e8d3ab;
}

.btn-ghost {
  background: rgba(251, 252, 247, 0.7);
  border-color: var(--line);
  color: var(--ink);
}

.input,
.select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.68rem 0.78rem;
  font-size: 0.95rem;
  font-family: inherit;
  background: #fcfdfa;
}

.input:focus,
.select:focus,
textarea:focus {
  outline: 2px solid rgba(15, 124, 120, 0.22);
  border-color: rgba(15, 124, 120, 0.35);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.9rem;
}

.kpi-card {
  padding: 0.95rem;
  border-radius: var(--radius-md);
  background: #fbfcf7;
  border: 1px solid var(--line);
}

.kpi-card h4 {
  font-size: 0.9rem;
  color: var(--ink-soft);
  font-family: "Space Grotesk", "Avenir Next", sans-serif;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.kpi-card strong {
  font-size: 1.34rem;
  font-family: "Fraunces", serif;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pill {
  font-size: 0.78rem;
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  background: #ecefe7;
  border: 1px solid #d5dacd;
}

.status-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  display: inline-block;
}

.dot-success {
  background: var(--success);
}

.dot-warning {
  background: var(--warning);
}

.dot-danger {
  background: var(--danger);
}

.table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #fcfdfa;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 0.75rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}

th {
  background: #f0f4ed;
  color: #2d4144;
  font-weight: 700;
}

tbody tr:last-child td {
  border-bottom: none;
}

.progress {
  position: relative;
  width: 100%;
  height: 0.5rem;
  border-radius: 999px;
  background: #d9ded2;
  overflow: hidden;
}

.progress > span {
  position: absolute;
  inset: 0;
  width: 0;
  background: linear-gradient(90deg, #ec9f3c, #d5781e);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.55rem;
  border-radius: 7px;
  border: 1px solid transparent;
}

.badge-success {
  color: #1e6a41;
  border-color: #9fd0b5;
  background: #e6f5eb;
}

.badge-warning {
  color: #7a4d14;
  border-color: #dfc292;
  background: #fcf0dc;
}

.badge-danger {
  color: #8f3232;
  border-color: #e2a2a2;
  background: #fae6e6;
}

.chart {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #fcfdfa 0%, #f5f7f1 100%);
  padding: 1rem;
}

.spark {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: end;
  gap: 0.25rem;
  min-height: 100px;
}

.spark span {
  background: linear-gradient(180deg, #2d8a56, #1d6640);
  border-radius: 5px 5px 0 0;
}

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

.section-title h2 {
  font-size: clamp(1.35rem, 2.7vw, 2rem);
}

.section-title p {
  color: var(--ink-soft);
  max-width: 620px;
}

.hidden {
  display: none !important;
}

@media (max-width: 980px) {
  :root {
    --sidebar: 100%;
  }
}

@media (max-width: 720px) {
  .container {
    width: min(var(--max-width), 94vw);
  }

  .btn {
    width: 100%;
  }
}
