/* ===== 密码管家 - 设计系统 ===== */

:root {
  --primary: #5b6abf;
  --primary-hover: #4a56a8;
  --primary-light: #eef0ff;
  --danger: #dc3545;
  --danger-hover: #bb2d3b;
  --danger-light: #fde8ea;
  --success: #198754;
  --warn: #f0a500;

  --bg: #f5f6fa;
  --sidebar-bg: #ffffff;
  --card-bg: #ffffff;
  --hover-bg: #f0f1f5;
  --active-bg: #e8eaff;

  --text: #1a1d27;
  --text-sub: #6b7280;
  --text-light: #9ca3af;
  --border: #e4e7ee;
  --border-light: #f0f2f5;

  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 3px rgba(0,0,0,.04),0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,.06);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.1);

  --font: -apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;
  --mono: "SF Mono","Cascadia Code",Consolas,monospace;

  --sidebar-w: 260px;
}

html.dark {
  --primary: #7b8ce0;
  --primary-hover: #6a7dd4;
  --primary-light: #1e2245;
  --danger: #f87171;
  --danger-hover: #ef4444;
  --danger-light: #3b1f1f;

  --bg: #0d0f16;
  --sidebar-bg: #13151e;
  --card-bg: #181b26;
  --hover-bg: #1f2230;
  --active-bg: #1e2245;

  --text: #e5e7eb;
  --text-sub: #9ca3af;
  --text-light: #6b7280;
  --border: #1f2230;
  --border-light: #242836;

  --shadow: 0 1px 3px rgba(0,0,0,.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,.4);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.5);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%; font-family: var(--font);
  color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background .25s,color .25s;
}
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* ===== App Shell ===== */
#app { display: flex; height: 100vh; overflow: hidden; }
#app.auth-page { display: block; height: auto; overflow: visible; }

/* ===== Sidebar ===== */
.sidebar {
  width: var(--sidebar-w); height: 100%;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  flex-shrink: 0; z-index: 20;
  transition: transform .25s;
}
.sb-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 18px 12px;
}
.sb-logo { font-size: 22px; }
.sb-title { font-weight: 700; font-size: 17px; }

.sb-nav {
  display: flex; gap: 4px; padding: 4px 14px 12px;
  border-bottom: 1px solid var(--border);
}
.sb-nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 6px; border-radius: var(--radius-sm);
  border: none; background: none; color: var(--text-sub);
  font-size: 12px; transition: all .15s;
}
.sb-nav-item:hover { background: var(--hover-bg); color: var(--text); }
.sb-nav-item.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.sb-nav-item span { font-size: 18px; }

.sb-body {
  flex: 1; display: flex; flex-direction: column;
  min-height: 0; overflow: hidden;
}
.sb-search { padding: 10px 14px; }
.platform-list {
  flex: 1; overflow-y: auto; padding: 0 10px;
}
.platform-list::-webkit-scrollbar { width: 4px; }
.platform-list::-webkit-scrollbar-thumb { background: var(--text-light); border-radius: 2px; }

.plat-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: var(--radius-sm);
  cursor: pointer; margin-bottom: 2px; user-select: none;
  transition: all .12s; position: relative;
}
.plat-item:hover { background: var(--hover-bg); }
.plat-item.active { background: var(--primary); color: #fff; }
.plat-item.active .plat-badge { background: rgba(255,255,255,.2); color: #fff; }
.plat-icon { font-size: 18px; width: 24px; text-align: center; }
.plat-name { flex: 1; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plat-badge {
  font-size: 10px; background: var(--border); color: var(--text-sub);
  border-radius: 8px; padding: 1px 7px; min-width: 18px; text-align: center;
  font-weight: 500;
}
.plat-more {
  width: 24px; height: 24px; display: flex; align-items: center; justify-content: center;
  border-radius: 4px; cursor: pointer; font-size: 16px; color: var(--text-light);
  flex-shrink: 0; letter-spacing: 1px; font-weight: 700; position: relative;
}
.plat-more:hover { background: var(--hover-bg); color: var(--text); }

.ctx-menu {
  position: absolute; right: 0; top: 100%;
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-md);
  min-width: 120px; z-index: 50; overflow: hidden;
}
.ctx-item {
  padding: 8px 14px; font-size: 13px; cursor: pointer; white-space: nowrap;
  transition: background .12s; color: var(--text);
}
.ctx-item:hover { background: var(--hover-bg); }
.ctx-item.danger { color: var(--danger); }
.sb-add-btn {
  margin: 8px 14px 12px; padding: 8px;
  border: 1px dashed var(--border); border-radius: var(--radius-sm);
  background: none; color: var(--text-sub); font-size: 13px;
  transition: all .15s;
}
.sb-add-btn:hover { border-color: var(--primary); color: var(--primary); }

/* Sidebar Footer */
.sb-footer {
  padding: 10px 14px; border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.sb-user { display: flex; align-items: center; gap: 10px; position: relative; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600; flex-shrink: 0;
  transition: transform .2s;
}
.avatar.admin { background: linear-gradient(135deg,var(--primary),#8b5cf6); }
.sb-user-meta { flex: 1; min-width: 0; }
.sb-user-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-user-role { font-size: 11px; color: var(--text-light); }

/* Dropdown */
.dropdown-menu {
  position: absolute; bottom: 48px; right: 0;
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  min-width: 170px; z-index: 50; overflow: hidden;
}
.dm-item {
  padding: 10px 16px; font-size: 13px; cursor: pointer;
  transition: background .12s;
}
.dm-item:hover { background: var(--hover-bg); }
.dm-item.danger { color: var(--danger); }
.dm-sep { height: 1px; background: var(--border); margin: 4px 0; }

/* ===== Main Area ===== */
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
.main-hd {
  padding: 14px 24px; border-bottom: 1px solid var(--border);
  background: var(--card-bg); display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap; flex-shrink: 0;
}
.mh-emoji { font-size: 26px; }
.mh-info { min-width: 0; }
.mh-name { font-size: 18px; font-weight: 700; }
.mh-link { color: var(--primary); font-size: 12px; text-decoration: none; display: block; margin-top: 2px; }
.mh-acts { display: flex; gap: 8px; flex-wrap: wrap; }

.main-body {
  flex: 1; overflow-y: auto; padding: 24px;
}
.main-body::-webkit-scrollbar { width: 6px; }
.main-body::-webkit-scrollbar-thumb { background: var(--text-light); border-radius: 3px; }

/* Empty state */
.empty {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; height: 100%;
  color: var(--text-light); text-align: center;
}
.empty-icon { font-size: 48px; margin-bottom: 12px; }

/* ===== Password Cards ===== */
.pwd-card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px; margin-bottom: 12px;
  transition: box-shadow .15s;
}
.pwd-card:hover { box-shadow: var(--shadow); }
.pwd-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.pwd-name { font-weight: 600; font-size: 15px; }
.pwd-account { color: var(--text-sub); font-size: 13px; }
.pwd-acts { margin-left: auto; display: flex; gap: 4px; position: relative; }
.pwd-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg); border-radius: var(--radius-sm);
  padding: 10px 12px; margin-top: 8px;
}
.pwd-label { color: var(--text-sub); font-size: 11px; width: 40px; flex-shrink: 0; text-transform: uppercase; font-weight: 600; }
.pwd-val { flex: 1; font-size: 14px; }
.pwd-val-wrap {
  display: flex; align-items: center; gap: 4px;
}
.pwd-val-wrap .pwd-val { flex: 0 0 auto; }
.pwd-spacer { flex: 1; }
.pwd-val.mono { font-family: var(--mono); letter-spacing: .5px; }
.pwd-val.clickable { cursor: pointer; }
.pwd-val.clickable:hover { color: var(--primary); }
.eye-btn {
  cursor: pointer; font-size: 16px; flex-shrink: 0; user-select: none;
  opacity: .6; transition: opacity .15s; padding: 2px;
}
.eye-btn:hover { opacity: 1; }
.pwd-val.sub { color: var(--text-sub); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500; border: 1px solid transparent;
  transition: all .15s; white-space: nowrap;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover:not(:disabled) { background: var(--danger-hover); }
.btn-ghost { background: none; color: var(--text-sub); border-color: transparent; }
.btn-ghost:hover:not(:disabled) { background: var(--hover-bg); color: var(--text); }
.btn-ghost.danger:hover:not(:disabled) { background: var(--danger-light); color: var(--danger); }
.btn.sm { padding: 5px 10px; font-size: 12px; }
.btn.wide { width: 100%; }

.btn-icon {
  width: 34px; height: 34px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: none; color: var(--text-sub);
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.btn-icon:hover { background: var(--hover-bg); color: var(--text); }

/* ===== Input ===== */
.input {
  width: 100%; padding: 9px 12px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  font-size: 14px; transition: border-color .15s; outline: none;
}
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.input::placeholder { color: var(--text-light); }
.input:disabled { opacity: .5; }
textarea.input { resize: vertical; }

.input-row { display: flex; gap: 8px; }
.input-row .input { flex: 1; }
.input-row .btn { flex-shrink: 0; }

/* ===== Form Fields ===== */
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: 12px; font-weight: 600; color: var(--text-sub); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .5px; }

/* ===== Emoji Picker ===== */
.emoji-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.emoji-pick span {
  font-size: 20px; cursor: pointer; padding: 4px 6px;
  border-radius: 4px; border: 2px solid transparent; transition: all .12s;
}
.emoji-pick span:hover { background: var(--hover-bg); }
.emoji-pick span.picked { border-color: var(--primary); background: var(--primary-light); }

/* ===== Checkbox ===== */
.check-row { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.check-row input[type=checkbox] { accent-color: var(--primary); width: 16px; height: 16px; }
.checks { display: flex; gap: 16px; flex-wrap: wrap; }
.checks label { display: flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.checks input[type=checkbox] { accent-color: var(--primary); }

/* ===== Toggle ===== */
.toggle { display: inline-flex; align-items: center; cursor: pointer; }
.toggle input { display: none; }
.toggle-track {
  width: 40px; height: 22px; background: var(--border);
  border-radius: 11px; position: relative; transition: background .2s;
}
.toggle-track::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; background: #fff;
  border-radius: 50%; transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.toggle input:checked + .toggle-track { background: var(--primary); }
.toggle input:checked + .toggle-track::after { transform: translateX(18px); }

/* ===== Range ===== */
.range {
  width: 100%; height: 6px; -webkit-appearance: none;
  background: var(--border); border-radius: 3px; outline: none;
  margin: 8px 0;
}
.range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 18px; height: 18px;
  background: var(--primary); border-radius: 50%; cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
}

/* ===== Select ===== */
select.input { cursor: pointer; }

/* ===== Tag ===== */
.tag {
  display: inline-block; padding: 2px 10px; border-radius: 10px;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px;
}
.tag.admin { background: var(--primary-light); color: var(--primary); }
.tag.user { background: var(--hover-bg); color: var(--text-sub); }

/* ===== Table ===== */
.tbl-wrap { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th, .tbl td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border-light); font-size: 13px; }
.tbl th { color: var(--text-sub); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; }
.tbl tr:last-child td { border-bottom: none; }

/* ===== Stats ===== */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(170px,1fr)); gap: 14px; margin-bottom: 24px; }
.stat-card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px;
}
.stat-card.sm { padding: 12px 16px; }
.stat-label { color: var(--text-sub); font-size: 12px; margin-bottom: 6px; font-weight: 500; }
.stat-val { font-size: 28px; font-weight: 700; color: var(--primary); }
.stat-sub { color: var(--text-light); font-size: 11px; margin-top: 4px; }
.sec-title { font-size: 15px; font-weight: 700; margin: 8px 0 14px; }
.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.bar-icon { font-size: 16px; width: 22px; text-align: center; }
.bar-name { width: 90px; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { flex: 1; height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--primary); border-radius: 4px; display: block; transition: width .3s; }
.bar-num { font-size: 12px; color: var(--text-sub); width: 28px; text-align: right; }
.recent-grid { display: flex; flex-wrap: wrap; gap: 10px; }

/* ===== Password Generator ===== */
.gen-line {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 14px; background: var(--bg); border: 1px dashed var(--border);
  border-radius: var(--radius-sm); margin-bottom: 8px;
}
.gen-line code { font-family: var(--mono); font-size: 14px; letter-spacing: .5px; flex: 1; word-break: break-all; }

/* ===== Strength ===== */
.strength { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.strength-bar { flex: 1; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.strength-bar span { display: block; height: 100%; border-radius: 2px; transition: width .3s; }
.strength-weak .strength-bar span, .strength-weak { color: #dc3545; background: #dc3545; }
.strength-fair .strength-bar span, .strength-fair { color: #f0a500; background: #f0a500; }
.strength-strong .strength-bar span, .strength-strong { color: #5b6abf; background: #5b6abf; }
.strength-very_strong .strength-bar span, .strength-very_strong { color: #198754; background: #198754; }
.strength span:last-child { font-size: 12px; font-weight: 500; white-space: nowrap; }

/* ===== Separator ===== */
.sep { border: none; border-top: 1px solid var(--border); margin: 16px 0; }

/* ===== Modal ===== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.4);
  display: flex; align-items: center; justify-content: center;
  z-index: 100; padding: 20px;
  backdrop-filter: blur(2px);
}
.modal {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  width: 100%; max-width: 480px; max-height: 85vh;
  display: flex; flex-direction: column; overflow: hidden;
}
.modal.wide { max-width: 600px; }
.modal.sm { max-width: 380px; }
.modal-hd {
  padding: 18px 22px; font-size: 16px; font-weight: 700;
  border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.modal-body { padding: 22px; overflow-y: auto; flex: 1; }
.modal-ft {
  padding: 14px 22px; border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 10px; flex-shrink: 0;
}

/* ===== Toast ===== */
.toast-area {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%);
  z-index: 200; display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
.toast {
  padding: 12px 20px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500; box-shadow: var(--shadow-md);
  color: #fff;
  animation: slideIn .25s ease;
}
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.warning { background: var(--warn); }

@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ===== Transitions ===== */
.modal-enter-active { transition: all .2s ease; }
.modal-leave-active { transition: all .15s ease; }
.modal-enter-from { opacity: 0; }
.modal-enter-from .modal { transform: scale(.95) translateY(10px); }
.modal-leave-to { opacity: 0; }
.modal-leave-to .modal { transform: scale(.95) translateY(10px); }

@keyframes fadeIn { from { opacity: 0; transform: translate(-50%,-48%) scale(.95); } to { opacity: 1; transform: translate(-50%,-50%) scale(1); } }

.toast-enter-active { transition: all .2s ease; }
.toast-leave-active { transition: all .15s ease; }
.toast-enter-from { opacity: 0; transform: scale(.9); }
.toast-leave-to { opacity: 0; transform: scale(.9); }

/* ===== Empty hint ===== */
.empty-hint { text-align: center; color: var(--text-light); padding: 40px 0; font-size: 13px; }

/* ===== Loading (spinner) ===== */
[v-loading] { position: relative; min-height: 60px; }
[v-loading]::after {
  content: ''; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--spinner-bg, transparent);
}
[v-loading="true"]::before {
  content: ''; position: absolute; top: 50%; left: 50%;
  width: 24px; height: 24px; margin: -12px 0 0 -12px;
  border: 3px solid var(--border); border-top-color: var(--primary);
  border-radius: 50%; animation: spin .6s linear infinite; z-index: 2;
}
[v-loading="true"]::after { z-index: 1; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Topbar (mobile) ===== */
.topbar { display: none; }
.overlay { display: none; }
.topbar-title { font-weight: 700; }

/* ===== Auth page ===== */
.auth-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  padding: 24px;
}
.auth-card {
  width: 100%; max-width: 400px;
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 40px 36px;
}
.auth-logo { text-align: center; font-size: 44px; margin-bottom: 8px; }
.auth-title { text-align: center; font-size: 22px; font-weight: 700; margin: 0 0 4px; }
.auth-sub { text-align: center; color: var(--text-sub); font-size: 13px; margin: 0 0 28px; }
.auth-card .field { margin-bottom: 18px; }
.theme-fixed { position: fixed; top: 16px; right: 16px; z-index: 10; }

.input.large { padding: 12px 14px; font-size: 15px; }
.btn.lg { padding: 12px 20px; font-size: 15px; }

/* ===== 数字验证码 ===== */
.captcha-row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.captcha-input {
  flex: 1;
  letter-spacing: 4px;
  text-align: center;
  font-weight: 600;
}
.captcha-img {
  height: 48px;
  width: 130px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  flex-shrink: 0;
  user-select: none;
  -webkit-user-drag: none;
}
.captcha-img:hover {
  border-color: var(--primary);
}
.captcha-placeholder {
  height: 48px;
  width: 130px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--text-sub);
  cursor: pointer;
  flex-shrink: 0;
}

/* ===== 系统日志 ===== */
.log-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.log-filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
}
.log-count {
  font-size: 13px;
  color: var(--text-sub);
}
.log-detail {
  color: var(--text-sub);
  font-size: 12px;
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.log-path {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--primary);
}
.log-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-sub);
}
.tag.locked { background: #fff3cd; color: #856404; }
.tag.fail { background: var(--danger-light); color: var(--danger); }
.tag.method { font-family: var(--mono); font-size: 10px; }
.tag.method.GET { background: #e3f2fd; color: #1976d2; }
.tag.method.POST { background: #e8f5e9; color: #388e3c; }
.tag.method.PUT { background: #fff3e0; color: #f57c00; }
.tag.method.DELETE { background: #ffebee; color: #d32f2f; }
.btn-ghost.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}
.status-code { font-family: var(--mono); font-size: 12px; font-weight: 600; }
.status-code.2xx { color: var(--success); }
.status-code.4xx { color: var(--warn); }
.status-code.5xx { color: var(--danger); }

@media (max-width: 768px) {
  .sidebar {
    position: fixed; left: 0; top: 0; height: 100%; z-index: 40;
    transform: translateX(-100%); box-shadow: var(--shadow-lg);
  }
  .sidebar.show { transform: translateX(0); }
  .overlay {
    display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4);
    z-index: 30;
  }
  .overlay.show { display: block; }
  .topbar {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
  }
  .main-hd { padding: 12px 16px; }
  .main-hd .mh-acts { width: 100%; justify-content: flex-end; }
  .main-body { padding: 16px; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 14px; }
  .stat-val { font-size: 22px; }
  .modal { max-width: 100%; margin: 0; }
  .bar-name { width: 70px; }
}
