:root {
  font-family: "Segoe UI", Arial, sans-serif;
  color: #18334c;
  background: #f4f7fb;
  font-size: 15px;
  --nav: #142f4b;
  --blue: #1f638f;
  --line: #dce5ee;
  --muted: #64768a;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 3px;
}
button {
  cursor: pointer;
  padding: 10px 16px;
  border: 1px solid #d4e0eb;
  border-radius: 10px;
  background: white;
  color: #173c63;
  font-weight: 600;
}
button:hover {
  background: #edf4fa;
}
button:disabled {
  opacity: 0.6;
  cursor: wait;
}
.primary {
  background: #1c648d;
  color: #fff;
  border-color: #1c648d;
}
.primary:hover {
  background: #164e70;
}
.danger {
  color: #a32a35;
  background: #fff6f6;
}
.muted {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 1.5px;
  font-weight: 700;
  color: #688297;
  margin: 0 0 8px;
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  background: #e5b15a;
  color: #173c63;
  font-weight: 800;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}
.management-layout {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}
.management-sidebar {
  background: var(--nav);
  color: #eff6fd;
  padding: 26px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
}
.management-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  color: inherit;
  text-decoration: none;
  margin: 0 4px 26px;
}
.management-brand strong {
  font-size: 19px;
}
.management-brand small {
  display: block;
  font-size: 9px;
  letter-spacing: 1.4px;
  color: #a5bad0;
  margin-top: 5px;
}
.nav-label {
  font-size: 10px;
  letter-spacing: 1.8px;
  color: #91abc1;
  margin: 24px 12px 8px;
}
.management-sidebar nav a {
  display: block;
  color: #cbdceb;
  text-decoration: none;
  border-radius: 10px;
  padding: 11px 13px;
  margin: 3px 0;
  font-weight: 500;
  font-size: 14px;
}
.management-sidebar nav a:hover {
  background: #244565;
}
.management-sidebar nav a.active {
  color: #fff;
  background: #315675;
  border-left: 3px solid #e5b15a;
  padding-left: 10px;
}
.sidebar-caption {
  margin: 30px 12px 10px;
  font-size: 13px;
  color: #d0dfeb;
  line-height: 1.8;
}
.sidebar-caption span {
  font-size: 11px;
  color: #91abc1;
}
.management-main {
  min-width: 0;
  padding: 0 36px;
}
.management-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 30px 0 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 26px;
}
.management-header h1 {
  margin: 0;
  font-size: 27px;
  letter-spacing: -0.5px;
}
.header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 13px;
}
.header-actions form {
  margin: 0;
}
.menu-button {
  display: none;
}
.management-main footer {
  font-size: 12px;
  color: #7990a3;
  padding: 32px 0;
}
.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}
.card,
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 23px;
  box-shadow: 0 5px 20px #18334c04;
}
.card p {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 10px;
}
.card strong {
  font-size: 27px;
  line-height: 1.2;
}
.card small {
  display: block;
  color: var(--muted);
  margin-top: 10px;
  font-size: 12px;
}
.panel {
  margin-bottom: 20px;
}
.panel h2 {
  font-size: 19px;
  margin: 0 0 12px;
}
.panel h3 {
  font-size: 16px;
}
.panel > p {
  line-height: 1.7;
}
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}
.form-grid .wide {
  grid-column: 1/-1;
}
label {
  display: block;
  font-size: 13px;
  color: #45617a;
  font-weight: 600;
}
input,
select,
textarea {
  display: block;
  width: 100%;
  margin-top: 7px;
  padding: 11px 12px;
  border: 1px solid #cfdae5;
  border-radius: 9px;
  background: #fbfdff;
  color: #18334c;
  min-width: 0;
}
input:focus,
select:focus,
textarea:focus {
  border-color: #1f638f;
  outline: 2px solid #1f638f22;
}
input[type="checkbox"] {
  display: inline;
  width: auto;
  margin: 0 8px 0 0;
  vertical-align: middle;
}
textarea {
  resize: vertical;
  min-height: 110px;
}
.form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 19px;
}
.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.toolbar input {
  margin: 0;
  max-width: 340px;
}
.table-wrap {
  overflow: auto;
  max-width: 100%;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 620px;
  text-align: left;
}
th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #7690a5;
  background: #f4f8fb;
  white-space: nowrap;
}
th,
td {
  padding: 13px 12px;
  border-bottom: 1px solid #e7eef5;
  vertical-align: top;
}
td {
  line-height: 1.6;
  overflow-wrap: anywhere;
}
td button {
  font-size: 12px;
  padding: 6px 10px;
  margin: 2px 4px 2px 0;
}
.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 20px;
  background: #edf3f8;
  color: #526c83;
  font-size: 11px;
  font-weight: 700;
}
.badge.good {
  background: #e6f4ec;
  color: #267248;
}
.badge.warn {
  background: #fff2dc;
  color: #9c6716;
}
.badge.bad {
  background: #fce9e9;
  color: #a52a36;
}
.notice {
  padding: 14px 18px;
  border: 1px solid #c8dfed;
  background: #ecf6fc;
  border-radius: 12px;
  margin: 0 0 20px;
  line-height: 1.6;
}
.notice.error {
  background: #fff0f0;
  border-color: #edced1;
  color: #922b33;
}
.notice.error:empty {
  display: none;
}
.empty {
  padding: 24px;
  color: #7990a3;
  text-align: center;
}
.pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}
.code {
  font-family: Consolas, monospace;
  word-break: break-all;
  background: #f0f5fa;
  padding: 12px;
  border-radius: 8px;
  display: block;
  font-size: 13px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 25px;
  max-width: 650px;
  width: calc(100% - 32px);
  color: #18334c;
  box-shadow: 0 20px 80px #102e4966;
}
dialog::backdrop {
  background: #122b4666;
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}
.dialog-head h2 {
  margin: 0;
  font-size: 21px;
}
.login-body {
  display: grid;
  place-items: center;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 15% 20%, #dceafa, transparent 50%), #f4f7fb;
  padding: 24px;
}
.login-card {
  max-width: 440px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  padding: 38px;
  box-shadow: 0 20px 80px #19395412;
}
.login-card .brand-mark {
  margin-bottom: 25px;
}
.login-card h1 {
  font-size: 26px;
  margin: 10px 0;
}
.login-card p {
  line-height: 1.6;
}
.login-card label {
  margin: 17px 0;
}
.login-card .primary {
  width: 100%;
  margin: 9px 0 20px;
}
.login-card > a {
  color: #1f638f;
  font-size: 13px;
  text-decoration: none;
}
.login-card .muted {
  margin-top: 22px;
}
.status-line {
  display: flex;
  gap: 9px;
  align-items: center;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3d9971;
}
.status-dot.off {
  background: #d79736;
}
[hidden] {
  display: none !important;
}
@media (max-width: 1100px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .management-main {
    padding: 0 22px;
  }
  .split {
    grid-template-columns: 1fr;
  }
  .management-header {
    align-items: flex-start;
  }
  .header-actions {
    justify-content: flex-end;
  }
}
@media (max-width: 760px) {
  .management-layout {
    display: block;
  }
  .management-sidebar {
    position: relative;
    height: auto;
    padding: 16px;
  }
  .management-brand {
    margin: 0;
    display: inline-flex;
  }
  .menu-button {
    display: block;
    float: right;
    font-size: 12px;
    padding: 9px;
  }
  .management-sidebar nav {
    display: none;
    padding-top: 12px;
    clear: both;
  }
  .management-sidebar.open nav {
    display: block;
  }
  .sidebar-caption {
    display: none;
  }
  .management-main {
    padding: 0 16px;
  }
  .management-header {
    padding: 23px 0 19px;
    display: block;
  }
  .management-header h1 {
    font-size: 24px;
  }
  .header-actions {
    margin-top: 17px;
    justify-content: flex-start;
  }
  .card,
  .panel {
    padding: 18px;
  }
  .cards {
    gap: 10px;
  }
  .card strong {
    font-size: 23px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .wide {
    grid-column: auto;
  }
  .login-card {
    padding: 27px;
  }
  .management-header .eyebrow {
    font-size: 10px;
  }
}
