:root {
  color: #172026;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f4f7f6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

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

button {
  cursor: pointer;
}

svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 83% 15%, rgba(18, 168, 147, .24), transparent 30%),
    radial-gradient(circle at 18% 58%, rgba(25, 114, 189, .22), transparent 30%),
    linear-gradient(112deg, #071f3c 0%, #082540 42%, #086c66 100%);
}

.login-screen::before,
.login-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.login-screen::before {
  display: none;
}

.login-screen::after {
  top: auto;
  height: 150px;
  background:
    repeating-radial-gradient(ellipse at 78% 100%, rgba(33, 185, 210, .28) 0 1px, transparent 1px 9px),
    repeating-radial-gradient(ellipse at 20% 100%, rgba(33, 185, 210, .2) 0 1px, transparent 1px 10px);
  mask-image: linear-gradient(to top, #000, transparent);
}

.login-stage {
  width: min(980px, 100%);
  min-height: min(570px, calc(100vh - 48px));
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: center;
  gap: 20px;
  position: relative;
  z-index: 1;
}

.login-title {
  text-align: center;
  color: #f8fbfb;
}

.login-title h1 {
  margin: 0;
  font-size: clamp(30px, 3vw, 42px);
  line-height: 1;
}

.login-title p {
  margin: 6px 0 0;
  color: #23d0c6;
  font-size: clamp(17px, 1.9vw, 24px);
}

.login-composition {
  display: grid;
  grid-template-columns: 230px 372px 230px;
  align-items: center;
  justify-content: center;
  gap: 44px;
}

.login-panel,
.panel,
.metric-grid article,
.system-card,
.record-list article,
.empty-state {
  background: #fff;
  border: 1px solid #dce5e4;
  border-radius: 8px;
}

.login-panel {
  width: min(372px, 100%);
  padding: 26px;
  display: grid;
  gap: 16px;
  border-radius: 10px;
  box-shadow: 0 20px 58px rgba(4, 18, 31, .36);
}

.sign-in-panel {
  background: rgba(255, 255, 255, .96);
  border-color: rgba(255, 255, 255, .76);
  backdrop-filter: blur(8px);
}

.login-panel .primary,
.login-panel .secondary-button {
  min-height: 43px;
}

.login-panel .primary {
  font-weight: 700;
}

.login-panel .secondary-button {
  font-weight: 400;
}

.login-panel .primary {
  background: linear-gradient(135deg, #14a78f, #087d6e);
}

.login-panel label {
  gap: 8px;
  font-weight: 700;
  color: #15283f;
  font-size: 13px;
}

.signin-mark {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #0e2b31;
  overflow: hidden;
}

.signin-mark img {
  width: 88%;
  height: 88%;
  object-fit: contain;
  display: block;
}

.sign-in-panel .brand-lockup {
  gap: 14px;
  margin-bottom: 4px;
  justify-content: center;
}

.sign-in-panel .brand-lockup strong {
  color: #14253d;
  font-size: 17px;
}

.input-frame {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #cfd9df;
  border-radius: 5px;
  background: #fbfdfe;
  color: #6a7f92;
  padding: 0 10px;
}

.input-frame svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.input-frame input {
  min-height: 36px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #172026;
  font-size: 13px;
  font-weight: 400;
}

.input-frame input::placeholder {
  color: #8797a8;
  font-weight: 400;
}

.password-toggle {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #6a7f92;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.password-toggle.active,
.password-toggle:hover {
  color: #0b7d72;
}

.password-toggle svg {
  width: 17px;
  height: 17px;
}

.vendor-left {
  justify-self: start;
}

.vendor-stack {
  justify-self: end;
}

.vendor-stack {
  display: grid;
  gap: 52px;
  justify-items: center;
}

.vendor-callout {
  width: 160px;
  min-height: 160px;
  border: 1px solid rgba(38, 198, 214, .2);
  border-radius: 50%;
  color: #f7fbfb;
  display: grid;
  place-content: center;
  gap: 8px;
  text-align: center;
  padding: 18px;
  position: relative;
  background: radial-gradient(circle, rgba(14, 68, 78, .44), rgba(8, 31, 55, .15));
  box-shadow: inset 0 0 0 14px rgba(36, 196, 214, .03), 0 0 40px rgba(33, 185, 210, .08);
}

.vendor-callout::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: inherit;
  border: 1px dashed rgba(40, 205, 219, .22);
}

.vendor-callout strong {
  font-size: 24px;
  line-height: 1;
  display: block;
}

.vendor-left strong {
  color: #ff394f;
}

.vendor-stack .vendor-callout:first-child strong {
  font-size: 22px;
}

.vendor-stack .vendor-callout:last-child strong {
  color: #23c875;
}

.vendor-callout span {
  font-size: 12px;
  line-height: 1.35;
  color: rgba(255, 255, 255, .9);
  display: block;
}

.login-foot {
  justify-self: center;
  color: rgba(255, 255, 255, .78);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #0e2b31;
  overflow: hidden;
}

.brand-mark img {
  width: 88%;
  height: 88%;
  object-fit: contain;
  display: block;
}

.brand-lockup strong,
.brand-lockup span {
  display: block;
}

.brand-lockup span,
.topbar p,
.system-card p,
.record-list span,
.hint {
  color: #637578;
}

label {
  display: grid;
  gap: 6px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #c8d5d3;
  border-radius: 6px;
  padding: 10px 11px;
  background: #fff;
}

textarea {
  min-height: 82px;
}

.primary,
.actions button,
.launch-panel button {
  border: 0;
  background: #137c6b;
  color: #fff;
  border-radius: 6px;
  padding: 10px 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.secondary-button {
  border: 1px solid #c8d5d3;
  background: #fff;
  color: #172026;
  border-radius: 6px;
  padding: 10px 13px;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
}

.sidebar {
  background: #0d1f24;
  color: #f7fbfb;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar .brand-lockup {
  margin-bottom: 18px;
}

.sidebar button {
  border: 0;
  color: inherit;
  background: transparent;
  border-radius: 8px;
  padding: 11px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.nav-count {
  margin-left: auto;
  min-width: 24px;
  height: 22px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: #ffe8e8;
  color: #9f1d1d;
  font-size: 12px;
  font-weight: 800;
}

.sidebar button.active,
.sidebar button:hover {
  background: #18373d;
}

.logout {
  margin-top: auto;
}

.topbar {
  min-height: 82px;
  padding: 18px 28px;
  background: #fff;
  border-bottom: 1px solid #dce5e4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

h1,
h2,
p,
dl {
  margin: 0;
}

h1 {
  font-size: 24px;
}

h2 {
  font-size: 17px;
}

.workspace {
  padding: 24px 28px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.chart-control-panel,
.chart-filter-panel {
  padding: 14px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.chart-control-panel p {
  color: #637578;
  margin-top: 4px;
  font-size: 13px;
}

.chart-control-panel select {
  max-width: 260px;
}

.chart-filter-panel {
  align-items: end;
  justify-content: flex-start;
}

.chart-filter-panel label {
  width: min(320px, 100%);
}

.chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.chart-card {
  background: #fff;
  border: 1px solid #dce5e4;
  border-radius: 8px;
  padding: 14px 16px;
  min-height: 0;
}

.chart-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.chart-card-head strong {
  color: #0d4f44;
  font-size: 22px;
}

.wide-chart {
  grid-column: auto;
}

.bar-chart-card {
  max-width: 720px;
  align-self: start;
}

.donut-wrap {
  display: grid;
  grid-template-columns: 190px 1fr;
  align-items: center;
  gap: 18px;
}

.donut {
  width: 176px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
}

.donut::after {
  content: "";
  position: absolute;
  inset: 32px;
  border-radius: 50%;
  background: #fff;
}

.donut span {
  position: relative;
  z-index: 1;
  color: #172026;
  font-weight: 800;
  text-align: center;
}

.legend {
  display: grid;
  gap: 10px;
}

.legend span,
.stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #172026;
}

.legend i {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
  margin-right: 8px;
}

.stat-stack {
  display: grid;
  align-content: start;
  gap: 10px;
}

.stat-row {
  border: 1px solid #e7eeee;
  border-left-width: 6px;
  border-radius: 8px;
  padding: 10px 12px;
}

.stat-row.clear {
  border-left-color: #0b6b49;
}

.stat-row.warning {
  border-left-color: #1d4ed8;
}

.stat-row.major {
  border-left-color: #b42318;
}

.stacked-row {
  display: grid;
  grid-template-columns: minmax(170px, 280px) minmax(180px, 1fr);
  gap: 16px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #edf2f1;
}

.stacked-row:last-child {
  border-bottom: 0;
}

.stacked-row strong,
.stacked-row span {
  display: block;
}

.stacked-row > div:first-child span {
  color: #637578;
  margin-top: 3px;
  font-size: 13px;
}

.stacked-bar {
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: #e7eeee;
  display: flex;
  width: 100%;
  max-width: 400px;
}

.stacked-bar span {
  min-width: 0;
}

.stacked-bar .clear {
  background: #0b6b49;
}

.stacked-bar .warning {
  background: #1d4ed8;
}

.stacked-bar .major {
  background: #b42318;
}

.table-panel {
  background: #fff;
  border: 1px solid #dce5e4;
  border-radius: 8px;
  overflow: hidden;
  max-width: 100%;
}

.table-panel .section-head {
  margin: 0;
  padding: 16px;
  border-bottom: 1px solid #e7eeee;
}

table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid #edf2f1;
  vertical-align: middle;
  font-size: 14px;
}

.table-panel table {
  display: table;
}

.table-panel {
  overflow-x: auto;
}

th {
  color: #5c6d70;
  font-weight: 700;
}

td strong,
td span {
  display: block;
}

td span {
  color: #637578;
  margin-top: 2px;
}

.status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin: 0 8px 0 0;
  background: #0b6b49;
}

.status-dot.maintenance {
  background: #d79b00;
}

.status-dot.offline,
.status-dot.down {
  background: #b42318;
}

.table-action {
  border: 1px solid #c8d5d3;
  background: #fff;
  color: #172026;
  border-radius: 6px;
  padding: 8px 10px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.table-action.danger {
  border-color: #f0b4b4;
  color: #9f1d1d;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.alarm-total,
.alarm-pill {
  min-width: auto;
  min-height: auto;
  border-radius: 0;
  display: inline;
  background: transparent;
  color: #172026;
  font-weight: 800;
}

.active-alarm-row.clear {
  background: #b7e4c7;
}

.active-alarm-row.warning {
  background: #b9d8ff;
}

.active-alarm-row.major {
  background: #ffc9c9;
}

.alarm-pill {
  min-width: auto;
  min-height: auto;
  border-radius: 0;
  display: inline;
  background: transparent;
  color: #172026;
}

.alarm-pill.clear {
  background: transparent;
  color: #172026;
}

.alarm-pill.warning {
  background: transparent;
  color: #172026;
}

.alarm-pill.major {
  background: transparent;
  color: #172026;
}

.alarm-summary {
  display: inline;
  border-radius: 0;
  padding: 0;
  line-height: 1.35;
  background: transparent;
  color: #172026;
}

.alarm-summary.clear {
  background: transparent;
  color: #172026;
}

.alarm-summary.warning {
  background: transparent;
  color: #172026;
}

.alarm-summary.major {
  background: transparent;
  color: #172026;
}

.event-row.clear {
  background: #b7e4c7;
}

.event-row.warning {
  background: #b9d8ff;
}

.event-row.major {
  background: #ffc9c9;
}

.change-pill {
  display: inline;
  align-items: center;
  border-radius: 0;
  padding: 0;
  font-weight: 700;
  width: auto;
  background: transparent;
  color: #172026;
}

.change-pill.clear {
  background: transparent;
  color: #172026;
}

.change-pill.warning {
  background: transparent;
  color: #172026;
}

.change-pill.major {
  background: transparent;
  color: #172026;
}

.notifications-panel {
  max-width: none;
}

.event-history {
  margin-top: 18px;
}

.metric-grid article {
  padding: 16px;
  display: grid;
  gap: 8px;
}

.metric-grid strong {
  font-size: 30px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-note {
  color: #637578;
  margin-top: 4px;
  font-size: 13px;
}

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

.system-card {
  padding: 16px;
  display: grid;
  gap: 13px;
  min-height: 260px;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.system-icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #eef7f4;
  color: #0d4f44;
}

.system-link {
  border: 0;
  background: transparent;
  color: #0d4f44;
  padding: 0;
  text-align: left;
  font-size: 20px;
  font-weight: 800;
}

.system-link:hover {
  text-decoration: underline;
}

.badge {
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  background: #ddf7ed;
  color: #0b6b49;
}

.badge.maintenance {
  background: #fff4d7;
  color: #7a5600;
}

.badge.offline {
  background: #ffe8e8;
  color: #9f1d1d;
}

.badge.down {
  background: #ffe8e8;
  color: #9f1d1d;
}

.system-card dl {
  display: grid;
  gap: 9px;
}

.system-card dt {
  color: #5c6d70;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.system-card dd {
  color: #637578;
  overflow-wrap: anywhere;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.actions button:not(.primary) {
  border: 1px solid #c8d5d3;
  background: #fff;
  color: #172026;
}

.system-form,
.user-form {
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.system-form textarea,
.form-help,
.form-section,
.assignment-box,
.system-form .actions,
.user-form .actions {
  grid-column: 1 / -1;
}

.form-section {
  border: 1px solid #dce5e4;
  border-radius: 8px;
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  background: #f8fbfa;
}

.form-section h3,
.form-section textarea,
.inline-check {
  grid-column: 1 / -1;
}

.form-section h3 {
  margin: 0;
  font-size: 15px;
}

.inline-check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #172026;
}

.inline-check input {
  width: auto;
}

.form-help {
  margin: -4px 0 0;
  color: #637578;
  font-size: 13px;
}

.assignment-box {
  border: 1px solid #dce5e4;
  border-radius: 8px;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.assignment-box label {
  grid-template-columns: 18px 1fr;
  align-items: center;
  color: #637578;
}

.access-form {
  margin-bottom: 16px;
}

.access-notice {
  padding: 12px 14px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff4d7;
  border-color: #e7c873;
}

.access-notice span {
  font-weight: 800;
}

.access-matrix {
  grid-column: 1 / -1;
  border: 1px solid #dce5e4;
  border-radius: 8px;
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
  background: #f8fbfa;
}

.access-matrix > div {
  grid-column: 1 / -1;
}

.access-matrix h3 {
  margin: 0;
  font-size: 15px;
}

.access-matrix p {
  color: #637578;
  margin-top: 4px;
  font-size: 13px;
}

.access-matrix label {
  grid-template-columns: 18px 1fr;
  align-items: center;
  border: 1px solid #dce5e4;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.access-matrix input {
  width: auto;
}

.access-matrix strong,
.access-matrix span {
  display: block;
}

.access-matrix span {
  color: #637578;
  margin-top: 2px;
  font-size: 13px;
}

.role-badge {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 9px;
  background: #eef7f4;
  color: #0d4f44;
  font-size: 12px;
  font-weight: 800;
}

.role-badge.viewer {
  background: #eef7f4;
  color: #0d4f44;
}

.role-badge.admin {
  background: #e8f0ff;
  color: #1d4ed8;
}

.role-badge.manager {
  background: #fff4d7;
  color: #7a5600;
}

.record-list {
  display: grid;
  gap: 10px;
}

.record-list article {
  padding: 14px 16px;
  display: grid;
  gap: 4px;
}

.empty-state {
  min-height: 220px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  text-align: center;
  padding: 24px;
}

.empty-state.compact {
  min-height: 180px;
  border: 0;
  border-radius: 0;
}

.launch-panel {
  position: sticky;
  bottom: 18px;
  z-index: 3;
  margin-top: 18px;
  background: #0d1f24;
  color: #fff;
  border-radius: 8px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 16px 44px rgba(13, 31, 36, .22);
}

.launch-panel div {
  display: grid;
  gap: 3px;
  margin-right: auto;
}

.launch-panel span {
  color: #b9cac7;
}

.launch-panel button {
  background: #18373d;
  border: 1px solid #5f7b80;
}

.toast {
  border: 1px solid #b9cac7;
  background: #eef7f4;
  color: #0d4f44;
  border-radius: 999px;
  padding: 9px 14px;
}

.notify-button {
  border: 1px solid #c8d5d3;
  background: #fff;
  color: #172026;
  border-radius: 999px;
  padding: 9px 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.notify-button.active {
  background: #ddf7ed;
  border-color: #a4dac7;
  color: #0b6b49;
  cursor: default;
}

@media (max-width: 860px) {
  .login-screen {
    padding: 22px;
  }

  .login-stage {
    min-height: calc(100vh - 44px);
  }

  .login-composition {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 18px;
  }

  .vendor-left,
  .vendor-stack {
    display: none;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 5;
    flex-direction: row;
    overflow-x: auto;
    padding: 10px;
  }

  .sidebar .brand-lockup {
    display: none;
  }

  .logout {
    margin-top: 0;
    margin-left: auto;
  }

  .workspace,
  .topbar {
    padding: 14px;
  }

  .system-form,
  .user-form,
  .form-section,
  .system-grid,
  .dashboard-grid,
  .chart-grid,
  .donut-wrap,
  .stacked-row {
    grid-template-columns: 1fr;
  }

  .chart-control-panel,
  .chart-filter-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .chart-control-panel select {
    max-width: none;
  }

  .launch-panel {
    align-items: stretch;
    flex-wrap: wrap;
  }
}

@media (max-width: 640px) {
  body {
    background: #f4f7f6;
  }

  .login-screen {
    padding: 18px;
    align-items: start;
  }

  .login-stage {
    min-height: calc(100vh - 36px);
    gap: 20px;
  }

  .login-title h1 {
    font-size: 34px;
  }

  .login-title p {
    font-size: 20px;
  }

  .login-panel {
    padding: 22px;
  }

  .login-foot {
    font-size: 13px;
    text-align: center;
  }

  .app-shell {
    padding-bottom: 76px;
  }

  .sidebar {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 20;
    min-height: 68px;
    padding: 8px;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(74px, 1fr);
    gap: 6px;
    overflow-x: auto;
    border-top: 1px solid #254a51;
  }

  .sidebar button {
    min-width: 72px;
    min-height: 52px;
    padding: 7px 6px;
    border-radius: 8px;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    font-size: 11px;
    line-height: 1.1;
    text-align: center;
    white-space: normal;
    position: relative;
  }

  .sidebar button svg {
    width: 19px;
    height: 19px;
  }

  .nav-count {
    position: absolute;
    margin-left: 0;
    transform: translate(18px, -18px);
  }

  .logout {
    margin-left: 0;
  }

  .topbar {
    min-height: 68px;
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
  }

  .notify-button {
    width: 100%;
    justify-content: center;
    border-radius: 8px;
  }

  h1 {
    font-size: 20px;
  }

  h2 {
    font-size: 16px;
  }

  .topbar p,
  .section-note,
  .chart-control-panel p {
    font-size: 12px;
    line-height: 1.35;
  }

  .workspace {
    padding: 12px;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
  }

  .metric-grid article {
    padding: 11px;
    gap: 4px;
  }

  .metric-grid article span {
    font-size: 12px;
  }

  .metric-grid strong {
    font-size: 24px;
  }

  .chart-control-panel,
  .chart-filter-panel,
  .chart-card,
  .system-card,
  .system-form,
  .user-form {
    padding: 12px;
  }

  .section-head {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .section-head .primary {
    width: 100%;
  }

  .chart-grid {
    gap: 10px;
    margin-bottom: 12px;
  }

  .donut-wrap {
    justify-items: center;
    gap: 12px;
  }

  .donut {
    width: 148px;
  }

  .donut::after {
    inset: 27px;
  }

  .legend {
    width: 100%;
  }

  .stacked-row {
    gap: 8px;
  }

  .stacked-bar {
    max-width: none;
  }

  .table-panel {
    overflow: visible;
  }

  table {
    min-width: 0;
  }

  thead {
    display: none;
  }

  tbody,
  tr,
  td {
    display: block;
    width: 100%;
  }

  tr {
    padding: 10px 12px;
    border-bottom: 1px solid #edf2f1;
  }

  td {
    border-bottom: 0;
    padding: 6px 0;
    overflow-wrap: anywhere;
  }

  td:first-child {
    padding-top: 0;
  }

  td:last-child {
    padding-bottom: 0;
  }

  .status-row {
    min-height: 154px;
    padding-right: 128px;
  }

  .status-row td:last-child {
    position: absolute;
    top: 14px;
    right: 12px;
    width: auto;
    padding: 0;
  }

  .status-row .table-action {
    background: #fff;
    box-shadow: 0 1px 0 rgba(13, 31, 36, .08);
  }

  .table-action,
  .row-actions .table-action,
  .actions button,
  .primary,
  .secondary-button {
    min-height: 42px;
    font-size: 14px;
  }

  .row-actions,
  .actions {
    width: 100%;
  }

  .row-actions .table-action,
  .actions button {
    flex: 1 1 120px;
    justify-content: center;
  }

  .system-grid {
    gap: 10px;
  }

  .system-card {
    min-height: 0;
  }

  .system-card,
  .status-row {
    position: relative;
    border-left: 7px solid #137c6b;
  }

  .system-card.site-tone-1,
  .status-row.site-tone-1 {
    border-left-color: #1d4ed8;
  }

  .system-card.site-tone-2,
  .status-row.site-tone-2 {
    border-left-color: #7a5600;
  }

  .system-card.site-tone-3,
  .status-row.site-tone-3 {
    border-left-color: #5b5f97;
  }

  .system-card.system-status-active,
  .status-row.system-status-active {
    background: #f0fbf6;
  }

  .system-card.system-status-maintenance,
  .status-row.system-status-maintenance {
    background: #fff8e5;
  }

  .system-card.system-status-down,
  .system-card.system-status-offline,
  .status-row.system-status-down,
  .status-row.system-status-offline {
    background: #fff0f0;
  }

  .system-card .card-top {
    align-items: start;
  }

  .system-link {
    font-size: 18px;
  }

  .form-section,
  .access-matrix,
  .assignment-box {
    padding: 10px;
  }

  input,
  select,
  textarea {
    min-height: 42px;
    font-size: 16px;
  }

  .launch-panel {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 84px;
    max-height: 55vh;
    overflow-y: auto;
  }

  .login-screen {
    align-items: start;
    padding: 14px;
  }

  .login-panel {
    margin-top: 8vh;
    padding: 18px;
  }
}

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

  .sidebar button {
    min-width: 66px;
    font-size: 10px;
  }
}
