:root {
  --bg: #f1f3ef;
  --paper: #fff;
  --ink: #182b27;
  --muted: #65736c;
  --line: #d9e1da;
  --accent: #c9ee8a;
  --green: #236349;
  --red: #ae3535;
  --radius: 12px;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  outline-offset: 4px;
}
button {
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 12px 18px;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
button:hover {
  background: #2b4b40;
}
button:disabled {
  opacity: 0.45;
  cursor: wait;
}
.secondary {
  color: var(--ink);
  background: transparent;
  border-color: var(--line);
}
.secondary:hover,
.quiet:hover {
  background: #e7ece5;
}
.quiet {
  color: var(--muted);
  background: transparent;
  padding: 9px;
}
.rail {
  position: fixed;
  inset: 0 auto 0 0;
  width: 230px;
  background: #172e27;
  color: #fff;
  padding: 42px 26px;
  display: flex;
  flex-direction: column;
}
.brand {
  font-size: 43px;
  letter-spacing: -3px;
  line-height: 1;
  font-weight: 800;
  color: var(--accent);
  text-decoration: none;
}
.brand span {
  color: #fff;
}
.brand small {
  display: block;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 1.7px;
  line-height: 3.5;
  color: #c5d3c8;
}
nav {
  margin-top: 58px;
  display: grid;
  gap: 7px;
}
nav button {
  background: none;
  color: #8fa79a;
  display: flex;
  gap: 16px;
  align-items: center;
  text-align: left;
  padding: 15px 13px;
  font-size: 12px;
}
nav button span {
  font-size: 14px;
}
nav button.active {
  background: #314b3d;
  color: var(--accent);
}
nav button:hover {
  background: #263e33;
}
.rail-note {
  margin-top: auto;
  font-size: 11px;
  color: #bacdbd;
  letter-spacing: 1px;
}
.rail-note b {
  float: right;
  color: var(--accent);
}
.rail-note p {
  font-size: 12px;
  line-height: 1.8;
  letter-spacing: 0;
  color: #8fa79a;
}
.signal {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 6px;
}
main {
  margin-left: 230px;
  padding: 42px clamp(24px, 4vw, 68px);
  max-width: 1750px;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 36px;
}
.eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.8px;
  color: var(--green);
  margin: 0 0 12px;
}
h1 {
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -1.3px;
  margin: 0;
}
h2 {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.5px;
  margin: 0 0 16px;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.header-actions span {
  color: var(--muted);
  font-size: 11px;
}
.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 22px;
}
.access {
  max-width: 720px;
  margin: 64px auto;
}
.access h2 {
  font-size: 30px;
}
.access p {
  line-height: 1.7;
}
.access form {
  margin: 30px 0;
}
.access input {
  min-width: 0;
  flex: 1;
}
.inline {
  display: flex;
  gap: 12px;
  align-items: end;
}
.muted,
small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 12px 0 25px;
}
.section-heading h2 {
  font-size: 25px;
}
.metrics {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr;
  border: 1px solid var(--line);
  background: #e7eddf;
  border-radius: var(--radius);
  margin-bottom: 26px;
}
.metrics article {
  padding: 24px 26px;
  border-right: 1px solid #cdd8c7;
  display: grid;
  gap: 12px;
}
.metrics article:last-child {
  border: 0;
}
.metrics span {
  font-size: 12px;
  color: var(--muted);
}
.metrics strong {
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -0.6px;
}
.metrics small {
  line-height: 1.4;
}
.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 15px;
}
.panel-heading > .muted {
  font-size: 9px;
  letter-spacing: 1px;
}
.empty {
  padding: 35px 0;
  color: var(--muted);
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  font-size: 13px;
}
th {
  padding: 14px 12px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  font-weight: 600;
}
td {
  padding: 18px 12px;
  border-bottom: 1px solid #ecf0e9;
  vertical-align: top;
}
td small {
  display: block;
  max-width: 280px;
  overflow-wrap: anywhere;
}
tr:last-child td {
  border-bottom: 0;
}
.table-wrap {
  overflow: auto;
}
.badge {
  display: inline-block;
  white-space: nowrap;
  padding: 5px 9px;
  border-radius: 5px;
  background: #e9eeea;
  color: #466052;
  font-size: 11px;
}
.badge.completed,
.badge.confirmed {
  background: #e3efd6;
  color: #315625;
}
.badge.failed,
.badge.uncertain,
.badge.blocked {
  background: #f9e4df;
  color: #9e3b2b;
}
.badge.partial,
.badge.pending,
.badge.missed {
  background: #fbf0d4;
  color: #876422;
}
label {
  display: grid;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
}
input,
textarea,
select {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid #cdd6cc;
  border-radius: 6px;
  color: var(--ink);
  background: #fcfdfb;
}
textarea {
  resize: vertical;
}
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid #81a764;
}
input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--green);
}
.check {
  display: flex;
  align-items: center;
  gap: 9px;
}
.fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
.config-form {
  max-width: 950px;
}
.config-form > label {
  margin: 25px 0;
}
fieldset {
  border: 0;
  border-top: 1px solid var(--line);
  padding: 24px 0 0;
  margin: 28px 0;
}
legend {
  font-size: 13px;
  font-weight: 700;
  padding: 0 12px 0 0;
}
label small {
  font-weight: 400;
}
.form-footer {
  border-top: 1px solid var(--line);
  margin-top: 28px;
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
}
.form-footer p {
  max-width: 500px;
  margin: 0;
}
.run-form {
  display: flex;
  align-items: center;
  gap: 22px;
}
.run-form label {
  min-width: 280px;
}
.weekdays {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.weekdays label {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 12px;
  background: var(--bg);
  border-radius: 6px;
}
.events {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 17px;
}
.toggles {
  margin: 20px 0;
  gap: 35px;
}
.qr-area {
  min-height: 100px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.qr-area img {
  width: 240px;
  max-width: 100%;
}
#notice {
  padding: 15px 20px;
  background: #e2efd4;
  border: 1px solid #b3cda0;
  border-radius: 8px;
  margin-bottom: 25px;
  overflow-wrap: anywhere;
}
#notice.error {
  background: #f8e7e2;
  border-color: #e6b4a6;
  color: #883b2c;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 20px 0;
}
.detail-grid strong {
  display: block;
  margin-top: 7px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
}
.actions button,
td button {
  font-size: 11px;
  padding: 8px 11px;
}
.detail-error {
  background: #fbf0e9;
  color: #8c462c;
  padding: 16px;
  border-radius: 6px;
  overflow-wrap: anywhere;
}
pre {
  font-size: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.7;
}
summary {
  cursor: pointer;
  font-weight: 600;
}
.audit-row {
  font-size: 11px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  overflow-wrap: anywhere;
}
footer {
  display: flex;
  justify-content: space-between;
  color: #7c8b7e;
  font-size: 9px;
  letter-spacing: 1px;
  padding-top: 30px;
  margin-top: 35px;
  border-top: 1px solid var(--line);
}
footer span {
  letter-spacing: 0;
  font-size: 11px;
}
[hidden] {
  display: none !important;
}
@media (max-width: 1050px) {
  .rail {
    width: 190px;
    padding: 30px 18px;
  }
  main {
    margin-left: 190px;
    padding: 30px 25px;
  }
  .header-actions span {
    display: none;
  }
  .metrics article {
    padding: 20px 16px;
  }
  .metrics strong {
    font-size: 19px;
  }
}
@media (max-width: 750px) {
  .rail {
    position: static;
    width: 100%;
    padding: 20px;
  }
  .brand {
    font-size: 27px;
  }
  .brand small,
  .rail-note {
    display: none;
  }
  nav {
    margin-top: 18px;
    display: flex;
    overflow: auto;
    gap: 4px;
  }
  nav button {
    padding: 10px;
    gap: 0;
    white-space: nowrap;
    font-size: 0;
  }
  nav button span {
    font-size: 12px;
  }
  main {
    margin: 0;
    padding: 25px 18px;
  }
  h1 {
    font-size: 28px;
  }
  header {
    padding-bottom: 24px;
    margin-bottom: 25px;
  }
  .panel {
    padding: 21px;
  }
  .metrics {
    grid-template-columns: 1fr;
  }
  .metrics article {
    border-right: 0;
    border-bottom: 1px solid #cdd8c7;
  }
  .section-heading {
    align-items: start;
    gap: 10px;
  }
  .section-heading h2 {
    font-size: 21px;
  }
  .fields,
  .events,
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .inline,
  .form-footer,
  .run-form {
    flex-direction: column;
    align-items: stretch;
  }
  .run-form label {
    min-width: 0;
  }
  .toggles {
    gap: 15px;
  }
  .access {
    margin: 25px 0;
  }
  .panel-heading > .muted,
  footer span {
    display: none;
  }
  .panel-heading {
    align-items: center;
  }
  th,
  td {
    padding: 13px 8px;
  }
  .header-actions {
    gap: 4px;
  }
  .header-actions button {
    padding: 9px;
  }
  .qr-area {
    flex-direction: column;
    align-items: start;
  }
  button {
    min-height: 40px;
  }
}
