:root {
  --bg: #f3efe7;
  --bg-accent: #e7f2ee;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-solid: #ffffff;
  --ink: #1f2a2a;
  --muted: #66757a;
  --line: rgba(31, 42, 42, 0.08);
  --brand: #0f766e;
  --brand-strong: #0b5d57;
  --warn: #c75b39;
  --good: #2f855a;
  --shadow: 0 24px 60px rgba(31, 42, 42, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "DM Sans", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.14), transparent 24rem),
    radial-gradient(circle at bottom right, rgba(199, 91, 57, 0.08), transparent 18rem),
    linear-gradient(180deg, var(--bg) 0%, #f8f6f1 100%);
}

h1,
h2,
strong {
  font-family: "Space Grotesk", sans-serif;
  margin: 0;
}

p {
  margin: 0;
}

.eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand);
  font-weight: 700;
}

.landing-shell,
.dashboard-shell {
  width: min(1160px, calc(100% - 2rem));
  margin: 0 auto;
}

.landing-body {
  display: grid;
  place-items: center;
  padding: 2rem 0;
}

.landing-shell {
  display: grid;
  place-items: center;
}

.login-card,
.panel,
.summary-card {
  backdrop-filter: blur(18px);
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.login-panel {
  display: grid;
  align-items: center;
  width: 100%;
}

.login-card {
  padding: 2rem;
  width: min(760px, 100%);
}

.login-card h2 {
  margin-top: 0.5rem;
  font-size: 2rem;
}

.login-copy,
.dashboard-subtitle,
.panel-note {
  margin-top: 0.75rem;
  color: var(--muted);
  line-height: 1.6;
}

.login-form {
  display: grid;
  gap: 1rem;
  margin-top: 1.75rem;
}

.login-form label {
  display: grid;
  gap: 0.45rem;
}

.login-form span {
  font-size: 0.95rem;
  font-weight: 500;
}

input {
  width: 100%;
  border: 1px solid rgba(31, 42, 42, 0.12);
  border-radius: 16px;
  padding: 0.95rem 1rem;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font: inherit;
}

input:focus {
  outline: 2px solid rgba(15, 118, 110, 0.22);
  border-color: rgba(15, 118, 110, 0.5);
}

.primary-button,
.ghost-button {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 0.95rem 1.35rem;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.primary-button {
  background: linear-gradient(135deg, var(--brand), #14958a);
  color: #fff;
  box-shadow: 0 16px 30px rgba(15, 118, 110, 0.24);
}

.ghost-button {
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink);
  border: 1px solid var(--line);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
}

.form-message {
  min-height: 1.2rem;
  font-size: 0.95rem;
  color: var(--warn);
}

.dashboard-body {
  padding: 1.25rem 0 3rem;
}

.dashboard-header,
.panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}

.dashboard-header {
  margin-bottom: 1.5rem;
}

.dashboard-header h1 {
  margin-top: 0.45rem;
  font-size: clamp(2rem, 4vw, 3.75rem);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1rem;
}

.summary-card {
  padding: 1.15rem;
}

.summary-card__icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.9rem;
  display: grid;
  place-items: center;
  background: rgba(15, 118, 110, 0.1);
  color: var(--brand-strong);
  font-size: 1.2rem;
}

.summary-card__label {
  margin-top: 0.9rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.summary-card__value {
  margin-top: 0.35rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.45rem;
}

.panel {
  margin-top: 1rem;
  padding: 1.4rem;
}

.chart {
  display: grid;
  grid-template-columns: repeat(30, minmax(0, 1fr));
  gap: 0.45rem;
  align-items: end;
  height: 300px;
  margin-top: 1.25rem;
  overflow: hidden;
}

.chart-bar {
  position: relative;
  min-height: 2rem;
  border-radius: 999px 999px 12px 12px;
  background: linear-gradient(180deg, #7dd3c8 0%, var(--brand) 100%);
}

.chart-bar--nap {
  background: linear-gradient(180deg, #f3c57c 0%, #d88a47 100%);
}

.chart-bar::after {
  content: attr(data-label);
  position: absolute;
  bottom: -1.55rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.66rem;
  color: var(--muted);
}

.chart-bar:hover::before {
  content: attr(data-value);
  position: absolute;
  top: -2rem;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 0.72rem;
}

.data-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 1rem;
}

.insights {
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
}

.insight {
  border-radius: 20px;
  background: rgba(243, 239, 231, 0.72);
  border: 1px solid var(--line);
  padding: 1rem;
}

.insight strong {
  font-size: 1rem;
}

.insight p {
  margin-top: 0.35rem;
  color: var(--muted);
  line-height: 1.5;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 1rem;
}

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

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

th {
  color: var(--muted);
  font-weight: 500;
}

@media (max-width: 1024px) {
  .landing-shell,
  .data-grid,
  .summary-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  .landing-shell,
  .dashboard-shell {
    width: min(100% - 1rem, 1160px);
  }

  .brand-panel,
  .login-card,
  .panel,
  .summary-card {
    border-radius: 22px;
  }

  .brand-panel,
  .login-card,
  .panel {
    padding: 1.25rem;
  }

  .dashboard-header,
  .panel-heading {
    flex-direction: column;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .chart {
    gap: 0.3rem;
    height: 240px;
  }

  .chart-bar::after {
    display: none;
  }
}
