* {
  box-sizing: border-box;
}

:root {
  --aco-red: #cc0000;
  --aco-red-dark: #a80000;
  --aco-blue: #415f77;
  --aco-mid-blue: #9db5c3;
  --aco-light-blue: #e3ecf1;
  --aco-light-blue-2: #f4f8fa;
  --aco-white: #ffffff;
  --aco-text: #24394a;
  --aco-muted: #60788a;
  --aco-border: #c7d7df;
  --aco-success: #2f7458;
  --aco-success-bg: #e4f2ec;
  --aco-danger-bg: #fae6e6;
  --aco-shadow: 0 16px 36px rgba(31, 52, 67, 0.12);
}

body {
  margin: 0;
  color: var(--aco-text);
  background: var(--aco-light-blue-2);
  font-family: "Stone Sans II ITC Com", "Segoe UI", system-ui, -apple-system, sans-serif;
}

a {
  color: var(--aco-red);
  font-weight: 700;
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  background: var(--aco-white);
  border-bottom: 1px solid var(--aco-border);
  box-shadow: 0 8px 24px rgba(65, 95, 119, 0.08);
}

.topbar::before {
  display: block;
  height: 4px;
  background: var(--aco-red);
  content: "";
}

.topbar .shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--aco-blue);
  font-weight: 800;
  text-decoration: none;
}

.brand .aco-logo {
  width: 40px;
  height: auto;
  flex: 0 0 auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.nav a {
  color: var(--aco-blue);
  text-decoration: none;
}

.nav a:hover {
  color: var(--aco-red);
}

.page {
  padding: 32px 0 56px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.panel {
  background: var(--aco-white);
  border: 1px solid var(--aco-border);
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 8px 24px rgba(65, 95, 119, 0.06);
}

.panel h1,
.panel h2,
.panel h3 {
  color: var(--aco-blue);
  line-height: 1.25;
}

.panel h2,
.panel h3 {
  margin-top: 0;
}

.muted {
  color: var(--aco-muted);
}

.flash {
  margin-bottom: 18px;
  padding: 12px 14px;
  color: var(--aco-blue);
  background: var(--aco-white);
  border: 1px solid var(--aco-mid-blue);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(65, 95, 119, 0.08);
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 4px;
  font-weight: 700;
}

.status.is-open {
  color: var(--aco-success);
  background: var(--aco-success-bg);
}

.status.is-closed {
  color: var(--aco-red-dark);
  background: var(--aco-danger-bg);
}

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

label {
  display: grid;
  gap: 6px;
  color: var(--aco-blue);
  font-weight: 700;
}

input,
select,
button {
  min-height: 40px;
  border-radius: 4px;
  font: inherit;
}

input,
select {
  width: 100%;
  color: var(--aco-text);
  border: 1px solid var(--aco-mid-blue);
  padding: 8px 10px;
  background: var(--aco-light-blue);
}

input:focus,
select:focus {
  outline: 2px solid rgba(65, 95, 119, 0.28);
  outline-offset: 2px;
  border-color: var(--aco-blue);
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 8px 12px;
  color: var(--aco-white);
  background: var(--aco-red);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

button:hover,
.button:hover {
  background: var(--aco-red-dark);
}

button.secondary,
.button.secondary {
  color: var(--aco-blue);
  background: var(--aco-light-blue);
  border: 1px solid var(--aco-mid-blue);
}

button.secondary:hover,
.button.secondary:hover {
  color: var(--aco-white);
  background: var(--aco-blue);
}

button.danger {
  background: var(--aco-red-dark);
}

.inline-form {
  display: flex;
  align-items: end;
  gap: 8px;
  flex-wrap: wrap;
}

.inline-form label {
  min-width: 150px;
}

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

th,
td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--aco-light-blue);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--aco-blue);
  background: var(--aco-light-blue-2);
  font-size: 0.9rem;
}

tbody tr:hover {
  background: var(--aco-light-blue-2);
}

.score {
  color: var(--aco-red);
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1;
  font-weight: 900;
}

.stack {
  display: grid;
  gap: 18px;
}

.auth-box {
  width: min(420px, calc(100% - 32px));
  margin: 48px auto;
}

.auth-page {
  min-height: 100vh;
  background: var(--aco-mid-blue);
}

.auth-layout {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  min-height: 100vh;
  padding: 0;
}

.auth-layout .flash {
  position: fixed;
  top: 24px;
  left: 50%;
  z-index: 5;
  width: min(520px, calc(100% - 32px));
  margin: 0;
  transform: translateX(-50%);
  color: var(--aco-blue);
  background: var(--aco-white);
  border: 1px solid var(--aco-light-blue);
  box-shadow: 0 16px 40px rgba(31, 52, 67, 0.16);
}

.auth-brand-panel {
  display: grid;
  min-height: 100vh;
  place-items: center;
  background: var(--aco-white);
}

.auth-brand-lockup {
  display: grid;
  justify-items: center;
  gap: 32px;
  width: 228px;
}

.auth-brand-lockup h1 {
  margin: 0;
  color: var(--aco-blue);
  font-size: 24px;
  font-weight: 700;
  line-height: 32px;
  text-align: center;
}

.aco-logo {
  width: 80px;
  height: 61px;
  display: block;
}

.auth-form-panel {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 48px 24px;
  background: var(--aco-mid-blue);
}

.auth-form-card {
  width: 280px;
}

.auth-form {
  display: grid;
  gap: 20px;
  width: 100%;
}

.auth-field {
  display: grid;
  gap: 4px;
  width: 100%;
  color: var(--aco-blue);
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
}

.auth-field span {
  min-height: 16px;
}

.auth-field input {
  width: 100%;
  min-height: 32px;
  padding: 4px 12px 4px 16px;
  color: var(--aco-text);
  background: var(--aco-light-blue);
  border: 1px solid var(--aco-mid-blue);
  border-radius: 4px;
  font-size: 14px;
  line-height: 20px;
}

.auth-field input:focus {
  outline: 2px solid rgba(65, 95, 119, 0.34);
  outline-offset: 2px;
  border-color: var(--aco-blue);
}

.auth-primary-button {
  width: 100%;
  min-height: 28px;
  padding: 8px 20px;
  color: var(--aco-white);
  background: var(--aco-red);
  border: 0;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  line-height: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.auth-primary-button:hover,
.auth-primary-button:focus-visible {
  background: var(--aco-red-dark);
}

.auth-small-link,
.auth-switch a {
  color: var(--aco-red);
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-decoration: none;
}

.auth-small-link {
  justify-self: end;
  margin-top: -12px;
}

.auth-small-link:hover,
.auth-switch a:hover {
  text-decoration: underline;
}

.auth-switch {
  margin: 16px 0 0;
  color: var(--aco-blue);
  font-size: 10px;
  line-height: 16px;
  text-align: center;
}

@media (max-width: 760px) {
  .auth-layout {
    grid-template-columns: 1fr;
    min-height: 100vh;
  }

  .auth-brand-panel {
    min-height: 34vh;
    padding: 40px 24px 28px;
  }

  .auth-form-panel {
    min-height: 66vh;
    align-items: start;
    padding-top: 48px;
  }
}
