:root {
  color-scheme: light;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #142038;
  background: #f5f7fb;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 0; min-height: 100vh; background: #f5f7fb; }
button, input { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
.hidden { display: none !important; }

.login-view { min-height: 100vh; display: grid; place-items: center; padding: 32px; }
.login-panel { width: min(100%, 380px); padding: 30px; border: 1px solid #dce3ee; border-radius: 8px; background: #fff; box-shadow: 0 16px 48px rgba(39, 58, 88, .09); }
.login-brand, .console-brand { display: flex; align-items: center; gap: 12px; }
.login-brand { margin-bottom: 28px; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 auto; overflow: hidden; border-radius: 8px; }
.brand-mark img { width: 100%; height: 100%; display: block; object-fit: contain; }
.login-brand h1 { margin: 0; font-size: 23px; }
.login-brand p { margin: 3px 0 0; color: #78859a; font-size: 13px; }
.login-panel label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 650; }
.login-panel input { width: 100%; height: 44px; padding: 0 12px; border: 1px solid #cdd6e4; border-radius: 6px; outline: none; }
.login-panel input:focus { border-color: #176cf0; box-shadow: 0 0 0 3px rgba(23, 108, 240, .1); }
.form-error { min-height: 20px; margin: 7px 0; color: #d9363e; font-size: 12px; }

.primary, .secondary, .danger, .approve { min-height: 36px; padding: 0 15px; border-radius: 6px; border: 1px solid transparent; }
.primary { background: #176cf0; color: #fff; }
.login-panel .primary { width: 100%; height: 42px; }
.secondary { border-color: #ccd6e4; background: #fff; color: #26334b; }
.danger { border-color: #f2b6b9; background: #fff; color: #d9363e; }
.approve { border-color: #a9dec6; background: #f0fbf5; color: #078a4c; }

.console { min-height: 100vh; display: grid; grid-template-columns: 210px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 22px 14px 16px; border-right: 1px solid #dde4ef; background: #fff; }
.console-brand { padding: 0 8px 25px; }
.console-brand strong, .console-brand span { display: block; }
.console-brand strong { font-size: 17px; }
.console-brand div span { margin-top: 2px; color: #8a95a8; font-size: 11px; }
#nav { display: grid; gap: 5px; }
.nav-button { width: 100%; min-height: 43px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: #445169; text-align: left; }
.nav-button.selected { border-color: #d7e5ff; background: #edf4ff; color: #176cf0; font-weight: 650; }
.nav-button b { min-width: 21px; height: 21px; display: grid; place-items: center; border-radius: 11px; background: #eaf0fa; font-size: 11px; }
.nav-button.selected b { background: #176cf0; color: #fff; }
.logout-button { margin-top: auto; height: 40px; border: 1px solid #d7dfeb; border-radius: 6px; background: #fff; color: #5a667b; }

.workspace { min-width: 0; }
.topbar { height: 82px; display: flex; align-items: center; justify-content: space-between; padding: 0 28px; border-bottom: 1px solid #dde4ef; background: #fff; }
.topbar h1 { margin: 0; font-size: 21px; }
.topbar p { margin: 4px 0 0; color: #8490a3; font-size: 12px; }
.service-live { display: flex; align-items: center; gap: 8px; color: #168850; font-size: 13px; }
.service-live i { width: 8px; height: 8px; border-radius: 50%; background: #13ad66; }
.page { padding: 24px 28px 40px; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 14px; margin-bottom: 18px; }
.metric-grid article { min-height: 104px; padding: 18px; border: 1px solid #dce3ee; border-radius: 7px; background: #fff; }
.metric-grid span { display: block; color: #728097; font-size: 13px; }
.metric-grid strong { display: block; margin-top: 12px; font-size: 28px; }
.section-block { border: 1px solid #dce3ee; border-radius: 7px; background: #fff; }
.section-heading { min-height: 73px; display: flex; align-items: center; justify-content: space-between; padding: 13px 17px; border-bottom: 1px solid #e4e9f1; }
.section-heading h2 { margin: 0; font-size: 16px; }
.section-heading p { margin: 4px 0 0; color: #8994a6; font-size: 12px; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { padding: 11px 12px; background: #f8fafc; color: #66748b; font-weight: 650; text-align: left; white-space: nowrap; }
td { padding: 12px; border-top: 1px solid #edf0f5; vertical-align: middle; }
tbody tr:hover { background: #fbfcfe; }
.empty { padding: 42px 20px; color: #8792a4; text-align: center; }
.status-tag { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; border-radius: 4px; background: #eef2f7; color: #59667b; }
.status-approved { background: #eaf8f1; color: #07894c; }
.status-pending { background: #fff6df; color: #a66800; }
.status-rejected, .status-revoked { background: #fff0f0; color: #c7353d; }
.online-dot { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #14ad67; }
.muted { color: #8a95a6; }
.mac-list { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; white-space: nowrap; }
.request-note { display: block; min-width: 120px; max-width: 260px; white-space: normal; line-height: 1.55; }
.actions { display: flex; gap: 7px; white-space: nowrap; }

.settings-block { max-width: 800px; }
.setting-row { min-height: 82px; display: flex; align-items: center; justify-content: space-between; padding: 15px 18px; border-bottom: 1px solid #e7ebf2; }
.setting-row strong, .setting-row small { display: block; }
.setting-row strong { font-size: 14px; }
.setting-row small { margin-top: 5px; color: #8490a3; }
.setting-row input { width: 42px; height: 22px; accent-color: #176cf0; }
.settings-actions { min-height: 68px; display: flex; align-items: center; justify-content: flex-end; gap: 15px; padding: 12px 18px; }
.settings-actions span { color: #158650; font-size: 12px; }

@media (max-width: 1100px) {
  .console { grid-template-columns: 178px minmax(0, 1fr); }
  .metric-grid { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
}

@media (max-width: 720px) {
  .login-view { padding: 18px; }
  .login-panel { padding: 24px; }
  .console { display: block; }
  .sidebar { position: static; height: auto; padding: 14px; border-right: 0; border-bottom: 1px solid #dde4ef; }
  .console-brand { padding: 0 4px 14px; }
  #nav { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 3px; }
  .nav-button { width: auto; min-width: max-content; min-height: 38px; flex: 0 0 auto; }
  .logout-button { position: absolute; top: 15px; right: 14px; width: 72px; height: 36px; margin: 0; }
  .topbar { height: auto; min-height: 72px; gap: 12px; padding: 14px 16px; }
  .topbar h1 { font-size: 19px; }
  .service-live { flex: 0 0 auto; }
  .page { padding: 16px 14px 28px; }
  .metric-grid { gap: 10px; }
  .metric-grid article { min-height: 92px; padding: 15px; }
  .metric-grid strong { margin-top: 8px; font-size: 25px; }
  .section-heading { min-height: 66px; gap: 10px; padding: 12px 14px; }
  table { min-width: 720px; }
  .setting-row { min-height: 76px; gap: 16px; padding: 14px; }
}

@media (max-width: 430px) {
  .login-brand { padding-right: 70px; }
  .console-brand { padding-right: 78px; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .metric-grid article { min-width: 0; }
  .topbar p { display: none; }
  .service-live { font-size: 12px; }
}
