:root {
  color-scheme: light;
  --bg: #f6f7f4;
  --surface: #ffffff;
  --ink: #171a1f;
  --muted: #687076;
  --line: #dfe3dd;
  --accent: #097f5f;
  --accent-dark: #056047;
  --accent-soft: #e5f4ef;
  --danger: #9f1d1d;
  --shadow: 0 24px 70px rgba(20, 27, 31, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.topbar {
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(246, 247, 244, 0.88);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 5;
}

.brand {
  font-size: 22px;
  font-weight: 750;
  letter-spacing: 0;
}

.subtle,
p {
  color: var(--muted);
}

.status {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 9px 13px;
  font-size: 13px;
  color: var(--accent-dark);
}

.nav,
.dash-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav a {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 9px 13px;
  color: #30383f;
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}

.nav a.active {
  background: var(--ink);
  border-color: var(--ink);
  color: white;
}

.shell {
  display: grid;
  grid-template-columns: minmax(520px, 1fr) minmax(420px, 0.72fr);
  gap: 24px;
  padding: 24px;
  max-width: 1480px;
  margin: 0 auto;
}

.single {
  padding: 24px;
  max-width: 1120px;
  margin: 0 auto;
}

.dashboard-page {
  max-width: 980px;
}

.workspace,
.dashboard {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  min-height: calc(100vh - 122px);
}

.workspace {
  padding: 30px;
}

.dashboard {
  padding: 24px;
}

.wide {
  width: 100%;
}

.revenue-board {
  min-height: auto;
  padding: 30px;
}

.section-head,
.dash-head,
.block-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 34px;
  line-height: 1.08;
}

h2 {
  font-size: 25px;
}

p {
  margin: 8px 0 0;
  line-height: 1.5;
}

.form {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

.grid {
  display: grid;
  gap: 16px;
}

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

label {
  display: grid;
  gap: 8px;
  font-size: 13px;
  font-weight: 650;
  color: #293036;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  line-height: 1.3;
  padding: 12px 13px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(9, 127, 95, 0.12);
  background: #fff;
}

.upload input {
  padding: 10px;
}

.coordinator-block {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  background: #fbfcfa;
}

.block-title {
  align-items: center;
  margin-bottom: 14px;
  font-weight: 750;
}

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

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

.group h3 {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.check:hover {
  transform: translateY(-1px);
  border-color: #b9c3bc;
}

.check input {
  width: 16px;
  height: 16px;
  padding: 0;
  accent-color: var(--accent);
}

.check small {
  display: block;
  color: var(--muted);
  font-weight: 500;
  overflow-wrap: anywhere;
}

button {
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.primary {
  min-height: 48px;
  background: var(--accent);
  color: white;
  padding: 0 18px;
  transition: transform 140ms ease, background 140ms ease;
}

.primary:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.ghost {
  border: 1px solid var(--line);
  background: white;
  color: #30383f;
  min-height: 34px;
  padding: 0 12px;
}

.message {
  min-height: 22px;
  color: var(--muted);
  font-size: 14px;
}

.message.error {
  color: var(--danger);
}

.signed-in {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  padding: 11px 13px;
}

.signed-in span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.signed-in strong {
  display: block;
  margin-top: 6px;
  font-size: 15px;
}

.login-page {
  min-height: 100vh;
  background: #101418;
  color: white;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 0.92fr) minmax(360px, 1.08fr);
}

.login-hero {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 54px;
  background: radial-gradient(circle at 20% 20%, rgba(9, 127, 95, 0.34), transparent 38%), #11161b;
}

.login-mark {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: 0;
}

.login-tag {
  margin-top: 18px;
  color: #8ee0c7;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.login-copy {
  max-width: 460px;
  color: #c8d0d5;
  font-size: 17px;
}

.login-footer {
  color: #84909a;
}

.login-panel {
  display: grid;
  place-items: center;
  padding: 28px;
  background: #f6f7f4;
}

.login-card {
  width: min(440px, 100%);
  display: grid;
  gap: 18px;
  background: white;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 30px;
}

.login-header h1 {
  font-size: 32px;
}

.login-error {
  border: 1px solid #f0b6b6;
  background: #fff1f1;
  color: var(--danger);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 650;
}

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

.metrics div {
  border-top: 2px solid var(--ink);
  padding-top: 12px;
}

.metrics span,
.panel-title {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.metrics strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
  line-height: 1.05;
}

.panel {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 22px;
}

.hero-panel {
  border-top-color: #c9d0ca;
  padding-top: 22px;
}

.rep-bars {
  display: grid;
  gap: 13px;
  margin-top: 14px;
}

.bar-row {
  display: grid;
  gap: 7px;
}

.bar-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.bar-track {
  height: 9px;
  background: #edf0eb;
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: inherit;
  min-width: 2px;
  transition: width 260ms ease;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 13px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px 6px;
  text-align: right;
}

th:first-child,
td:first-child {
  text-align: left;
}

th {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

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

  .workspace,
  .dashboard {
    min-height: auto;
  }
}

@media (max-width: 720px) {
  .topbar {
    height: auto;
    padding: 18px;
    align-items: flex-start;
    gap: 12px;
  }

  .nav,
  .dash-actions {
    flex-wrap: wrap;
  }

  .shell,
  .single {
    padding: 14px;
  }

  .workspace,
  .dashboard {
    padding: 18px;
  }

  .two,
  .coordinator-options,
  .metrics {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 28px;
  }
}
