:root {
  color-scheme: light;
  font-family: "Microsoft YaHei UI", "Segoe UI", sans-serif;
  color: #1d2733;
  background: #f4f6f8;
  letter-spacing: 0;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 980px; background: #f4f6f8; }
button, input { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }

.login-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: #edf1f4;
}

.login-panel {
  width: 380px;
  padding: 34px;
  background: #fff;
  border: 1px solid #dce2e7;
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(27, 39, 51, .08);
}

h1, h2 { margin: 0; font-weight: 700; }
.login-panel h1 { margin-bottom: 28px; font-size: 24px; }
label { display: block; margin: 14px 0 7px; font-size: 14px; font-weight: 600; }
input {
  width: 100%;
  height: 40px;
  padding: 0 11px;
  color: #18222c;
  background: #fff;
  border: 1px solid #bcc6cf;
  border-radius: 4px;
  outline: none;
}
input:focus { border-color: #2471a8; box-shadow: 0 0 0 3px rgba(36, 113, 168, .12); }

button {
  min-height: 36px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-weight: 600;
}
.primary { color: #fff; background: #c93634; border-color: #c93634; }
.primary:hover { background: #ab2e2c; }
.secondary { color: #2a3744; background: #fff; border-color: #c7d0d8; }
.secondary:hover { background: #f3f5f7; }
.danger { color: #b22625; background: #fff; border-color: #e2b6b5; }
.wide { width: 100%; margin-top: 22px; }

.app-view { min-height: 100vh; }
.topbar {
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  color: #fff;
  background: #263642;
}
.topbar h1 { font-size: 22px; }
.topbar p { margin: 5px 0 0; color: #b8c7d1; font-size: 13px; }
.top-actions { display: flex; gap: 10px; }
.topbar .secondary { color: #eef4f7; background: transparent; border-color: #617380; }
.topbar .secondary:hover { background: #354956; }

.summary-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  border-bottom: 1px solid #dce2e7;
  background: #fff;
}
.summary-band div { padding: 20px 32px; border-right: 1px solid #e6eaed; }
.summary-band span { display: block; font-size: 26px; font-weight: 700; }
.summary-band small { color: #687681; }
.success-text { color: #16704b; }
.warning-text { color: #b06416; }

.toolbar { display: flex; gap: 10px; padding: 20px 32px; }
.search-wrap { flex: 1; max-width: 460px; }
.table-wrap { margin: 0 32px 32px; overflow: hidden; background: #fff; border: 1px solid #dce2e7; border-radius: 5px; }
table { width: 100%; border-collapse: collapse; table-layout: fixed; }
th, td { padding: 13px 14px; text-align: left; border-bottom: 1px solid #e6eaed; vertical-align: middle; overflow-wrap: anywhere; }
th { color: #54636f; background: #f8f9fa; font-size: 13px; }
td { font-size: 14px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafbfc; }
.actions-column { width: 340px; }
.row-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.row-actions button { min-height: 30px; padding: 0 10px; font-size: 12px; }
.status { display: inline-block; min-width: 58px; padding: 4px 8px; text-align: center; border-radius: 3px; font-size: 12px; font-weight: 700; }
.status-active { color: #11663f; background: #e2f3e9; }
.status-expired { color: #945113; background: #fff0db; }
.status-disabled { color: #65727d; background: #e9edf0; }
.empty { padding: 54px 20px; text-align: center; color: #778590; }
.error { min-height: 20px; margin: 10px 0 0; color: #b32625; font-size: 13px; }
.page-error { margin: -20px 32px 24px; }

dialog { width: 470px; padding: 0; border: 0; border-radius: 6px; box-shadow: 0 18px 60px rgba(18, 28, 36, .25); }
dialog::backdrop { background: rgba(24, 35, 44, .45); }
dialog form { padding: 24px; }
.dialog-title-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.dialog-title-row h2 { font-size: 20px; }
.icon-close { width: 34px; min-height: 34px; padding: 0; color: #63717d; background: transparent; border: 0; font-size: 25px; font-weight: 400; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.check-row { display: flex; align-items: center; gap: 9px; font-weight: 500; }
.check-row input { width: 17px; height: 17px; margin: 0; }
form small { color: #74818b; }
.muted { color: #7a8791; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
