@font-face {
  font-family: "Akrobat";
  src: url("../fonts/Akrobat-Regular.otf") format("opentype");
  font-weight: 400;
}

@font-face {
  font-family: "Akrobat";
  src: url("../fonts/Akrobat-SemiBold.otf") format("opentype");
  font-weight: 600;
}

@font-face {
  font-family: "Akrobat";
  src: url("../fonts/Akrobat-Bold.otf") format("opentype");
  font-weight: 700;
}

:root {
  --acfc-black: #050505;
  --acfc-ink: #171717;
  --acfc-line: #dedede;
  --acfc-muted: #6f6f6f;
  --acfc-bg: #f4f4f1;
  --acfc-panel: #ffffff;
  --acfc-red: #d71920;
  --acfc-green: #0f8a4b;
  --acfc-amber: #b86f00;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--acfc-bg);
  color: var(--acfc-ink);
  font-family: "Akrobat", Arial, sans-serif;
  font-size: 17px;
  letter-spacing: 0;
}

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

.acfc-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #050505;
}

.acfc-login section {
  width: min(440px, 100%);
  padding: 28px;
  color: #fff;
  border: 1px solid #303030;
  background: #101010;
}

.acfc-login img {
  width: 220px;
  max-width: 100%;
}

.acfc-login h1,
.acfc-hero h1,
.acfc-section-head h2 {
  margin: 0;
  line-height: 0.95;
  text-transform: uppercase;
}

.acfc-login label,
.acfc-adjustment label,
.acfc-filters label {
  display: grid;
  gap: 6px;
  color: inherit;
  font-weight: 600;
}

.acfc-login input,
.acfc-adjustment input,
.acfc-adjustment select,
.acfc-adjustment textarea,
.acfc-filters input,
.acfc-filters select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--acfc-line);
  background: #fff;
  color: #111;
  padding: 9px 11px;
  border-radius: 0;
}

.acfc-login form,
.acfc-adjustment form {
  display: grid;
  gap: 14px;
}

.acfc-login button,
.acfc-adjustment button,
.acfc-sync-form button {
  border: 0;
  background: var(--acfc-red);
  color: #fff;
  padding: 11px 18px;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
}

.acfc-login-error {
  margin: 14px 0;
  padding: 10px 12px;
  background: #3a0d0f;
  color: #fff;
}

.acfc-datahub {
  min-height: 100vh;
}

.acfc-hero {
  display: grid;
  grid-template-columns: minmax(170px, 320px) 1fr auto;
  gap: 26px;
  align-items: center;
  padding: 28px clamp(18px, 4vw, 54px);
  background: var(--acfc-black);
  color: #fff;
}

.acfc-hero img {
  width: 100%;
  max-width: 310px;
}

.acfc-hero p {
  margin: 0 0 4px;
  color: #d8d8d8;
  text-transform: uppercase;
}

.acfc-hero h1 {
  font-size: clamp(36px, 6vw, 72px);
}

.acfc-tabs,
.acfc-filters,
.acfc-kpis,
.acfc-view,
.acfc-footer {
  width: min(1480px, calc(100% - 36px));
  margin-inline: auto;
}

.acfc-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 18px 0 8px;
}

.acfc-tabs button {
  border: 1px solid var(--acfc-line);
  background: #fff;
  color: #111;
  padding: 10px 14px;
  white-space: nowrap;
  cursor: pointer;
}

.acfc-tabs button.is-active {
  background: var(--acfc-black);
  color: #fff;
  border-color: var(--acfc-black);
}

.acfc-filters {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 12px;
  padding: 8px 0 16px;
}

.acfc-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.acfc-kpis article,
.acfc-goal,
.acfc-alert,
.acfc-insight,
.acfc-adjustment,
.acfc-analysis-grid section {
  background: var(--acfc-panel);
  border: 1px solid var(--acfc-line);
}

.acfc-kpis article {
  padding: 18px;
}

.acfc-kpis span,
.acfc-kpis small,
.acfc-table small,
.acfc-goal small,
.acfc-muted {
  color: var(--acfc-muted);
}

.acfc-kpis strong {
  display: block;
  margin-top: 6px;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 0.95;
}

.acfc-view {
  display: none;
  padding-bottom: 36px;
}

.acfc-view.is-active {
  display: block;
}

.acfc-section-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  padding: 12px 0;
}

.acfc-section-head h2 {
  font-size: clamp(30px, 4vw, 46px);
}

.acfc-section-head p {
  max-width: 620px;
  margin: 0;
  color: var(--acfc-muted);
}

.acfc-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--acfc-line);
  background: #fff;
}

.acfc-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

.acfc-table th,
.acfc-table td {
  padding: 13px 14px;
  text-align: left;
  border-bottom: 1px solid #e9e9e9;
  vertical-align: top;
}

.acfc-table th {
  background: #111;
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
}

.acfc-table td strong,
.acfc-table td small {
  display: block;
}

.acfc-pill {
  display: inline-flex;
  min-width: 92px;
  justify-content: center;
  padding: 5px 8px;
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
}

.acfc-ok {
  background: var(--acfc-green);
}

.acfc-watch {
  background: var(--acfc-amber);
}

.acfc-risk {
  background: var(--acfc-red);
}

.acfc-goal-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.acfc-goal {
  padding: 16px;
}

.acfc-goal h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.05;
}

.acfc-goal p {
  min-height: 38px;
  color: var(--acfc-muted);
}

.acfc-progress {
  height: 8px;
  background: #e7e7e7;
  overflow: hidden;
}

.acfc-progress span {
  display: block;
  height: 100%;
  background: var(--acfc-red);
}

.acfc-goal strong {
  display: block;
  margin-top: 10px;
  font-size: 32px;
}

.acfc-analysis-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.acfc-analysis-grid section,
.acfc-adjustment {
  padding: 18px;
}

.acfc-alert,
.acfc-insight {
  padding: 14px;
  margin-bottom: 10px;
}

.acfc-alert-warning {
  border-left: 6px solid var(--acfc-amber);
}

.acfc-alert-critical {
  border-left: 6px solid var(--acfc-red);
}

.acfc-adjustment {
  margin-top: 12px;
}

.acfc-adjustment form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.acfc-adjustment label:has(textarea),
.acfc-adjustment button {
  grid-column: span 4;
}

.acfc-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 0 28px;
  color: var(--acfc-muted);
}

.acfc-footer a {
  color: var(--acfc-red);
  font-weight: 700;
}

@media (max-width: 980px) {
  .acfc-hero,
  .acfc-filters,
  .acfc-kpis,
  .acfc-goal-grid,
  .acfc-analysis-grid,
  .acfc-adjustment form {
    grid-template-columns: 1fr;
  }

  .acfc-hero {
    align-items: start;
  }

  .acfc-section-head {
    display: block;
  }

  .acfc-adjustment label:has(textarea),
  .acfc-adjustment button {
    grid-column: span 1;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }

  .acfc-tabs,
  .acfc-filters,
  .acfc-kpis,
  .acfc-view,
  .acfc-footer {
    width: min(100% - 20px, 1480px);
  }

  .acfc-hero {
    padding: 22px 14px;
  }
}
