:root {
  color-scheme: light;
  font-family: Inter, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: #312b23;
  background: #f6f1e8;
  --forest: #285b43;
  --forest-dark: #173d2c;
  --clay: #b7653c;
  --cream: #fffaf1;
  --line: #e6dac8;
  --muted: #796f63;
  --danger: #a84032;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  background: #f6f1e8;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
a {
  color: inherit;
  text-decoration: none;
}
[hidden] {
  display: none !important;
}
.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 18% 15%, #f2d9b9 0, transparent 32%),
    linear-gradient(145deg, #fffaf2, #e9efe7);
}
.login-card {
  width: min(460px, 100%);
  padding: 38px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(255, 250, 241, 0.96);
  box-shadow: 0 24px 70px rgba(62, 45, 26, 0.14);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.brand span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--forest);
  color: white;
  font-weight: 900;
}
.brand strong {
  font-size: 18px;
}
.eyebrow {
  margin: 26px 0 8px;
  color: var(--clay);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.18em;
}
h1,
h2,
p {
  margin-top: 0;
}
.login-card h1 {
  margin-bottom: 10px;
  font-size: 34px;
  letter-spacing: -0.04em;
}
.login-card > p:not(.eyebrow),
.panel-heading p {
  color: var(--muted);
  line-height: 1.65;
}
form {
  display: grid;
  gap: 15px;
  margin-top: 24px;
}
label {
  display: grid;
  gap: 7px;
  color: #5c5247;
  font-size: 13px;
  font-weight: 800;
}
input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: #312b23;
  background: white;
  outline: none;
}
textarea {
  resize: vertical;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(40, 91, 67, 0.1);
}
.code-row {
  display: grid;
  grid-template-columns: 1fr 124px;
  gap: 10px;
  align-items: end;
}
button {
  border: 0;
  cursor: pointer;
}
.code-row button,
.primary,
.danger {
  min-height: 46px;
  border-radius: 11px;
  font-weight: 900;
}
.code-row button {
  border: 1px solid var(--line);
  color: var(--forest);
  background: #edf3ec;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}
.primary {
  background: var(--forest);
  color: white;
}
.danger {
  background: var(--danger);
  color: white;
}
.form-message {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.form-message.error {
  color: var(--danger);
}
.login-links {
  display: flex;
  justify-content: space-between;
  margin-top: 22px;
  color: var(--forest);
  font-size: 13px;
  font-weight: 800;
}
.shell {
  height: 100vh;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  overflow: hidden;
}
aside {
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 26px 20px;
  color: white;
  background: var(--forest-dark);
}
.brand.inverse span {
  color: var(--forest-dark);
  background: #efc68e;
}
.station-scope {
  display: grid;
  gap: 8px;
  margin: 30px 0 22px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.06);
}
.station-scope label {
  color: #dbe8df;
}
.station-scope select {
  color: #25382c;
}
.station-scope small {
  color: #b9c9bf;
  line-height: 1.5;
}
nav {
  display: grid;
  gap: 7px;
}
nav button {
  padding: 12px 14px;
  border-radius: 11px;
  color: #c9d7cf;
  text-align: left;
  background: transparent;
  font-weight: 800;
}
nav button:hover,
nav button.active {
  color: white;
  background: rgba(255, 255, 255, 0.12);
}
.side-footer {
  display: grid;
  gap: 10px;
  margin-top: auto;
  color: #b9c9bf;
  font-size: 12px;
}
.side-footer button {
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  color: white;
  background: transparent;
}
.workspace {
  min-width: 0;
  overflow: auto;
  padding: 28px clamp(20px, 4vw, 54px) 60px;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
header .eyebrow {
  margin-top: 0;
}
header h1 {
  margin-bottom: 0;
  font-size: clamp(28px, 3vw, 40px);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.header-actions button {
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--forest);
  background: var(--cream);
  font-weight: 800;
}
.health {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.health i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #42a96f;
  box-shadow: 0 0 0 4px rgba(66, 169, 111, 0.12);
}
.summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 12px;
  margin: 26px 0 20px;
}
.summary-grid article,
.panel {
  border: 1px solid var(--line);
  background: rgba(255, 250, 241, 0.9);
  box-shadow: 0 9px 26px rgba(80, 59, 34, 0.05);
}
.summary-grid article {
  display: grid;
  gap: 5px;
  padding: 17px;
  border-radius: 16px;
}
.summary-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.summary-grid strong {
  font-size: 30px;
  color: var(--forest-dark);
}
.summary-grid small {
  color: #9b8c7a;
}
.view {
  display: none;
  gap: 18px;
}
.view.active {
  display: grid;
}
.two-column {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(420px, 1.2fr);
  gap: 18px;
}
.panel {
  padding: 22px;
  border-radius: 18px;
}
.panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}
.panel-heading span {
  color: var(--clay);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.16em;
}
.panel-heading h2 {
  margin: 5px 0 0;
  font-size: 21px;
}
.panel-heading p {
  max-width: 660px;
  margin: 7px 0 0;
  font-size: 13px;
}
.panel-heading b {
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--forest);
  background: #e5efe7;
  font-size: 12px;
}
.compact-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.compact-form .full {
  grid-column: 1 / -1;
}
.record-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}
.record {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid #eadfce;
  border-radius: 13px;
  background: white;
}
.record-head,
.record-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.record strong {
  color: #3c342b;
}
.record small,
.record p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}
.record-meta {
  display: flex;
  gap: 8px 14px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}
.badge {
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--forest);
  background: #e6f0e8;
  font-size: 11px;
  font-weight: 900;
}
.badge.alert {
  color: var(--danger);
  background: #f8e3dd;
}
.record-actions {
  justify-content: flex-start;
}
.record-actions button {
  padding: 7px 10px;
  border-radius: 8px;
  color: var(--forest);
  background: #e8f0e9;
  font-size: 12px;
  font-weight: 900;
}
.record-actions button.danger-link {
  color: var(--danger);
  background: #f8e8e2;
}
.empty {
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
  text-align: center;
}
.warning-panel {
  border-color: #e6c8bb;
}
.toast {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: var(--v19-z-toast, 80);
  max-width: 360px;
  padding: 13px 18px;
  border-radius: 12px;
  color: white;
  background: var(--forest-dark);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.18);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: 0.2s ease;
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
}
@media (max-width: 980px) {
  .shell {
    grid-template-columns: 210px minmax(0, 1fr);
  }
  .summary-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .two-column {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 700px) {
  .shell {
    height: auto;
    display: block;
    overflow: visible;
  }
  aside {
    height: auto;
    padding: 16px;
  }
  aside .brand,
  .station-scope small,
  .side-footer span {
    display: none;
  }
  .station-scope {
    margin: 0 0 12px;
    padding: 0;
    border: 0;
    background: transparent;
  }
  nav {
    grid-template-columns: repeat(5, max-content);
    overflow-x: auto;
  }
  nav button {
    white-space: nowrap;
  }
  .side-footer {
    margin-top: 10px;
  }
  .workspace {
    padding: 20px 14px 50px;
  }
  header {
    align-items: flex-start;
  }
  .health {
    display: none;
  }
  .summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .compact-form {
    grid-template-columns: 1fr;
  }
  .compact-form .full {
    grid-column: auto;
  }
}
