/* ═══════════════════════════════════════════════════════════════
   admin.css — labetter 管理后台样式
   复用主站 :root 变量体系
   ═══════════════════════════════════════════════════════════════ */

/* ── Reset & Variables ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green-900: #14532d;
  --green-800: #166534;
  --green-700: #15803d;
  --green-600: #16a34a;
  --green-500: #22c55e;
  --green-100: #dcfce7;
  --green-50: #f0fdf4;
  --gray-900: #111827;
  --gray-800: #1f2937;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-400: #9ca3af;
  --gray-300: #d1d5db;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --gray-50: #f9fafb;
  --white: #ffffff;
  --red-500: #ef4444;
  --red-600: #dc2626;
  --red-100: #fee2e2;
  --red-50: #fef2f2;
  --amber-500: #f59e0b;
  --amber-100: #fef3c7;
  --amber-50: #fffbeb;
  --blue-600: #2563eb;
  --blue-100: #dbeafe;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);
  --radius: 8px;
  --radius-sm: 6px;
  --radius-lg: 12px;
}

html { font-size: 16px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  background: var(--gray-100);
  color: var(--gray-900);
  line-height: 1.6;
  min-height: 100vh;
}

/* ── 登录页 ── */
.login-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #0f172a 0%, #1e293b 40%, #0c4a6e 100%);
  padding: 20px;
}
.login-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 40px 36px;
  width: 100%; max-width: 400px;
  animation: fadeInUp .4s ease-out;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}
.login-card.shake { animation: shake .3s ease; }

.login-header { text-align: center; margin-bottom: 28px; }
.login-logo { margin-bottom: 8px; }
.login-logo svg { display: block; margin: 0 auto; }
.login-header h1 { font-size: 1.5rem; font-weight: 700; color: var(--gray-900); }
.login-sub { font-size: .85rem; color: var(--gray-500); margin-top: 4px; }

.form-group { margin-bottom: 18px; }
.form-group label {
  display: block; font-size: .85rem; font-weight: 600;
  color: var(--gray-700); margin-bottom: 6px;
}
.form-group input {
  width: 100%; padding: 11px 14px; font-size: .95rem;
  border: 1.5px solid var(--gray-300); border-radius: var(--radius);
  outline: none; transition: border-color .15s; background: var(--gray-50);
}
.form-group input:focus { border-color: var(--green-600); background: var(--white); }

.login-error {
  padding: 10px 14px; background: var(--red-50); color: var(--red-600);
  border-radius: var(--radius-sm); font-size: .85rem; margin-bottom: 16px;
  text-align: center;
}

.btn-login {
  width: 100%; padding: 12px; font-size: 1rem; font-weight: 700;
  background: linear-gradient(135deg, var(--green-700), var(--green-600));
  color: var(--white); border: none; border-radius: var(--radius);
  cursor: pointer; transition: opacity .15s, transform .1s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-login:hover { opacity: .92; transform: translateY(-1px); }
.btn-login:active { transform: translateY(0); }
.btn-login:disabled { opacity: .6; cursor: not-allowed; }

.login-back {
  display: block; text-align: center; margin-top: 20px;
  color: var(--gray-500); font-size: .85rem; text-decoration: none;
}
.login-back:hover { color: var(--gray-700); }

/* ── 顶部栏 ── */
.dash-header {
  background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-800) 100%);
  color: var(--white); position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow-md);
}
.dash-header-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  height: 54px; display: flex; align-items: center; justify-content: space-between;
}
.dash-brand {
  display: flex; align-items: center; gap: 10px;
}
.dash-brand-icon { font-size: 1.3rem; }
.dash-brand-icon-svg { flex-shrink: 0; }
.dash-brand { font-size: .95rem; }
.dash-brand strong { font-weight: 700; }
.dash-badge {
  background: rgba(255,255,255,.12); padding: 2px 10px;
  border-radius: 12px; font-size: .75rem; font-weight: 600;
}
.dash-header-actions { display: flex; align-items: center; gap: 12px; }
.dash-time { font-size: .8rem; color: rgba(255,255,255,.6); }
.btn-header {
  background: rgba(255,255,255,.1); color: var(--white); border: none;
  padding: 5px 14px; border-radius: var(--radius-sm); font-size: .82rem;
  cursor: pointer; text-decoration: none; transition: background .15s;
}
.btn-header:hover { background: rgba(255,255,255,.18); }
.btn-logout { background: rgba(239,68,68,.25); }
.btn-logout:hover { background: rgba(239,68,68,.4); }

/* ── 主体 ── */
.dash-main { max-width: 1200px; margin: 0 auto; padding: 24px 20px 40px; }

/* ── 状态概览行 ── */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: var(--white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: 18px 20px;
  display: flex; align-items: center; gap: 14px; transition: box-shadow .15s;
}
.stat-card:hover { box-shadow: var(--shadow-md); }
.stat-icon { font-size: 1.8rem; flex-shrink: 0; }
.stat-body { flex: 1; min-width: 0; }
.stat-label { font-size: .78rem; color: var(--gray-500); font-weight: 600; margin-bottom: 2px; }
.stat-value { font-size: 1.2rem; font-weight: 700; color: var(--gray-900); }

.stat-card.status-valid { border-left: 3px solid var(--green-500); }
.stat-card.status-expiring { border-left: 3px solid var(--amber-500); }
.stat-card.status-expired,
.stat-card.status-error { border-left: 3px solid var(--red-500); }
.stat-card.status-missing { border-left: 3px solid var(--gray-400); }

/* ── 2 列网格 ── */
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.dash-col { display: flex; flex-direction: column; gap: 20px; }

/* ── 卡片 ── */
.card {
  background: var(--white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); overflow: hidden;
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--gray-200);
}
.card-header h2 { font-size: .95rem; font-weight: 700; color: var(--gray-800); }
.card-badge {
  font-size: .72rem; font-weight: 700; padding: 3px 10px; border-radius: 12px;
}
.card-badge.valid { background: var(--green-100); color: var(--green-700); }
.card-badge.expiring { background: var(--amber-100); color: var(--amber-500); }
.card-badge.expired,
.card-badge.error { background: var(--red-100); color: var(--red-600); }
.card-badge.missing { background: var(--gray-200); color: var(--gray-600); }
.card-badge.active { background: var(--green-100); color: var(--green-700); }
.card-badge.inactive { background: var(--red-100); color: var(--red-600); }
.card-body { padding: 16px 20px; }

/* ── 证书进度条 ── */
.cert-progress-wrap { margin-bottom: 18px; }
.cert-progress-bar {
  height: 10px; background: var(--gray-200); border-radius: 5px;
  overflow: hidden; margin-bottom: 6px;
}
.cert-progress-fill {
  height: 100%; border-radius: 5px; transition: width .4s ease, background .4s ease;
}
.cert-progress-fill.green { background: linear-gradient(90deg, var(--green-500), var(--green-400)); }
.cert-progress-fill.amber { background: linear-gradient(90deg, var(--amber-500), #fbbf24); }
.cert-progress-fill.red   { background: linear-gradient(90deg, var(--red-500), #f87171); }
.cert-progress-labels {
  display: flex; justify-content: space-between; font-size: .75rem; color: var(--gray-500);
}

/* ── 证书列表 (多域名) ── */
.cert-list { display: flex; flex-direction: column; gap: 12px; }
.cert-list-empty { text-align: center; color: var(--gray-400); padding: 20px; font-size: .85rem; }

.cert-item {
  border: 1px solid var(--gray-200); border-radius: var(--radius);
  padding: 14px 16px; transition: box-shadow .15s;
}
.cert-item:hover { box-shadow: var(--shadow-sm); }
.cert-item.status-valid { border-left: 3px solid var(--green-500); }
.cert-item.status-expiring { border-left: 3px solid var(--amber-500); }
.cert-item.status-expired { border-left: 3px solid var(--red-500); }
.cert-item.status-missing,
.cert-item.status-error { border-left: 3px solid var(--gray-400); }

.cert-item-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px;
}
.cert-item-domain {
  font-size: .95rem; font-weight: 700; color: var(--gray-900);
  display: flex; align-items: center; gap: 8px;
}
.cert-item-badge {
  font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 10px;
}
.cert-item-badge.valid { background: var(--green-100); color: var(--green-700); }
.cert-item-badge.expiring { background: var(--amber-100); color: var(--amber-500); }
.cert-item-badge.expired,
.cert-item-badge.error { background: var(--red-100); color: var(--red-600); }
.cert-item-badge.missing { background: var(--gray-200); color: var(--gray-600); }

.cert-item-meta {
  display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .78rem; color: var(--gray-500);
  margin-bottom: 8px;
}
.cert-item-meta span { white-space: nowrap; }
.cert-item-actions { display: flex; gap: 8px; }
.cert-item-actions .btn { font-size: .78rem; padding: 4px 12px; }
.cert-item-pbar {
  height: 4px; background: var(--gray-200); border-radius: 2px; margin-top: 8px; overflow: hidden;
}
.cert-item-pbar-fill { height: 100%; border-radius: 2px; transition: width .4s; }
.cert-item-pbar-fill.green { background: var(--green-500); }
.cert-item-pbar-fill.amber { background: var(--amber-500); }
.cert-item-pbar-fill.red   { background: var(--red-500); }

/* ── 新建证书表单 ── */
.cert-request-form {
  margin-top: 16px; padding: 16px 18px;
  background: var(--gray-50); border: 1.5px dashed var(--gray-300);
  border-radius: var(--radius);
}
.cert-request-form h3 {
  font-size: .88rem; font-weight: 700; color: var(--gray-800); margin-bottom: 4px;
}
.cert-request-hint { font-size: .8rem; color: var(--gray-500); margin-bottom: 12px; }
.cert-request-hint code { background: var(--gray-200); padding: 1px 5px; border-radius: 3px; font-size: .8rem; }
.cert-request-row {
  display: flex; align-items: center; gap: 4px; margin-bottom: 12px;
}
.cert-request-input {
  padding: 8px 12px; border: 1.5px solid var(--gray-300); border-radius: var(--radius-sm);
  font-size: .9rem; flex: 1; max-width: 240px; outline: none;
}
.cert-request-input:focus { border-color: var(--green-600); }
.cert-request-suffix { font-size: .88rem; color: var(--gray-600); font-weight: 600; }
.cert-request-actions { display: flex; gap: 8px; }

/* ── 信息列表 ── */
.info-list { display: flex; flex-direction: column; gap: 0; }
.info-row {
  display: flex; padding: 7px 0; border-bottom: 1px solid var(--gray-100);
  font-size: .85rem;
}
.info-row:last-child { border-bottom: none; }
.info-row dt { width: 80px; flex-shrink: 0; color: var(--gray-500); font-weight: 500; }
.info-row dd { flex: 1; color: var(--gray-800); word-break: break-all; }

/* ── 操作按钮 ── */
.cert-actions { display: flex; gap: 10px; margin-top: 16px; }
.btn {
  padding: 9px 18px; font-size: .85rem; font-weight: 600;
  border: none; border-radius: var(--radius-sm); cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  transition: opacity .15s, transform .1s;
}
.btn:hover { opacity: .9; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-renew { background: var(--green-600); color: var(--white); }
.btn-check  {
  background: var(--white); color: var(--gray-700);
  border: 1.5px solid var(--gray-300);
}
.btn-check:hover { background: var(--gray-50); }

/* Spinner */
.btn-spinner {
  width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.3);
  border-top-color: var(--white); border-radius: 50%;
  animation: spin .6s linear infinite;
  display: inline-block;
}
.btn-check .btn-spinner {
  border-color: var(--gray-300);
  border-top-color: var(--gray-600);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 续期输出 */
.cert-renew-output {
  margin-top: 14px; padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: .8rem; font-family: "SF Mono", "Cascadia Code", monospace;
  white-space: pre-wrap; word-break: break-all; max-height: 200px; overflow-y: auto;
  line-height: 1.5;
}
.cert-renew-output.success { background: var(--green-50); color: var(--green-800); border: 1px solid var(--green-100); }
.cert-renew-output.error   { background: var(--red-50); color: var(--red-600); border: 1px solid var(--red-100); }

/* ── 操作历史表格 ── */
.history-table-wrap { max-height: 280px; overflow-y: auto; }
.history-table { width: 100%; font-size: .82rem; border-collapse: collapse; }
.history-table th {
  text-align: left; padding: 8px 12px; background: var(--gray-50);
  color: var(--gray-600); font-weight: 600; font-size: .78rem;
  position: sticky; top: 0;
}
.history-table td {
  padding: 8px 12px; border-bottom: 1px solid var(--gray-100);
  color: var(--gray-700);
}
.history-table tr:hover td { background: var(--gray-50); }
.empty-cell { text-align: center; color: var(--gray-400); padding: 24px !important; }

/* ── 自动刷新 ── */
.refresh-desc { font-size: .82rem; color: var(--gray-500); margin-bottom: 12px; }
.refresh-controls { display: flex; align-items: center; gap: 12px; }
.refresh-select {
  padding: 7px 10px; border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm); font-size: .85rem;
  background: var(--white); cursor: pointer;
}
.refresh-status { font-size: .82rem; color: var(--gray-500); }
.refresh-status.active { color: var(--green-600); font-weight: 600; }

/* ── Toast ── */
.toast-container {
  position: fixed; top: 64px; right: 20px; z-index: 9999;
  display: flex; flex-direction: column; gap: 8px; max-width: 380px;
}
.toast {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 12px 16px;
  display: flex; align-items: flex-start; gap: 10px;
  animation: slideIn .25s ease-out;
  font-size: .85rem;
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(60px); }
  to   { opacity: 1; transform: translateX(0); }
}
.toast.success { border-left: 3px solid var(--green-500); }
.toast.error   { border-left: 3px solid var(--red-500); }
.toast.info    { border-left: 3px solid var(--blue-600); }
.toast-icon  { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }
.toast-body { flex: 1; }
.toast-msg  { font-weight: 600; margin-bottom: 2px; }
.toast-detail { font-size: .78rem; color: var(--gray-500); }

/* ═══════════════════════════════════════════════════════════════
   侧边栏布局 (新)
   ═══════════════════════════════════════════════════════════════ */
.app-shell {
  display: flex; min-height: 100vh; background: var(--gray-100);
}

/* ── 侧边栏 ── */
.sidebar {
  width: 240px; flex-shrink: 0; background: var(--gray-900); color: var(--white);
  display: flex; flex-direction: column; position: fixed; top: 0; left: 0;
  height: 100vh; z-index: 200; overflow-y: auto;
  box-shadow: 2px 0 12px rgba(0,0,0,.15);
}
.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 20px; border-bottom: 1px solid var(--gray-700);
}
.sidebar-brand-text { font-size: .92rem; }
.sidebar-brand-text strong { font-weight: 700; color: var(--green-500); }

/* 侧边栏导航 */
.sidebar-nav { flex: 1; padding: 12px 0; overflow-y: auto; }
.nav-category { margin-bottom: 4px; }
.nav-category-title {
  width: 100%; display: flex; align-items: center; gap: 8px;
  padding: 10px 20px; background: none; border: none;
  color: var(--gray-400); font-size: .82rem; font-weight: 600;
  cursor: pointer; text-align: left; font-family: inherit;
  transition: color .12s;
}
.nav-category-title:hover { color: var(--white); }
.nav-cat-arrow { font-size: .7rem; margin-left: auto; transition: transform .2s; }
.nav-category:not(.open) .nav-cat-arrow { transform: rotate(-90deg); }
.nav-category:not(.open) .nav-category-items { display: none; }
.nav-category-items { display: flex; flex-direction: column; gap: 2px; padding: 2px 0 8px; }

.nav-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 20px 7px 28px; background: none; border: none;
  color: var(--gray-400); font-size: .84rem; cursor: pointer;
  font-family: inherit; text-align: left; width: 100%;
  transition: background .12s, color .12s;
  border-left: 3px solid transparent;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: var(--white); }
.nav-item.active {
  background: rgba(34,197,94,.12); color: var(--green-500);
  border-left-color: var(--green-500);
}
.nav-item-icon { font-size: .9rem; width: 20px; text-align: center; flex-shrink: 0; }

/* 侧边栏底部 */
.sidebar-footer {
  padding: 14px 20px; border-top: 1px solid var(--gray-700);
  display: flex; flex-direction: column; gap: 8px;
}
.sidebar-clock {
  font-size: .78rem; color: var(--gray-500); font-variant-numeric: tabular-nums;
}
.sidebar-link {
  color: var(--gray-400); font-size: .8rem; text-decoration: none;
  background: none; border: none; cursor: pointer; padding: 0;
  font-family: inherit; text-align: left;
}
.sidebar-link:hover { color: var(--white); }
.sidebar-logout { color: var(--red-500); }
.sidebar-logout:hover { color: #f87171; }

/* ── 主内容区 ── */
.main-content {
  flex: 1; margin-left: 240px; min-width: 0;
  display: flex; flex-direction: column;
}

/* ── 移动端顶栏 ── */
.mobile-topbar {
  display: none; align-items: center; gap: 12px;
  padding: 10px 16px; background: var(--gray-900); color: var(--white);
  position: sticky; top: 0; z-index: 150;
}
.mobile-menu-btn {
  background: none; border: none; color: var(--white);
  font-size: 1.3rem; cursor: pointer; padding: 4px;
}
.mobile-brand { font-size: .95rem; font-weight: 700; }

/* 侧边栏遮罩 */
.sidebar-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4);
  z-index: 199;
}

/* ── 面板 ── */
.panel { display: none; flex: 1; }
.panel.active { display: block; }
.panel-header {
  padding: 28px 32px 20px; border-bottom: 1px solid var(--gray-200);
  background: var(--white);
}
.panel-header h1 { font-size: 1.3rem; font-weight: 700; color: var(--gray-900); }
.panel-desc { font-size: .85rem; color: var(--gray-500); margin-top: 4px; }
.panel-body { padding: 24px 32px 40px; max-width: 1100px; }

/* ── SSL 2 列网格 ── */
.ssl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.ssl-col { display: flex; flex-direction: column; gap: 20px; }

/* ── 代码编辑器 ── */
.editor-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; background: var(--gray-100);
  border: 1px solid var(--gray-200); border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
  font-size: .82rem;
}
.editor-filepath { font-weight: 600; color: var(--gray-700); }
.editor-status { color: var(--gray-500); font-size: .78rem; }

.code-editor {
  width: 100%; min-height: 420px; padding: 14px 16px;
  border: 1px solid var(--gray-200); border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  font-family: "SF Mono", "Fira Code", "Cascadia Code", monospace;
  font-size: .85rem; line-height: 1.6; resize: vertical;
  background: var(--gray-50); color: var(--gray-900);
  outline: none; tab-size: 2;
}
.code-editor:focus { border-color: var(--blue-600); background: var(--white); }
.code-editor::placeholder { color: var(--gray-400); }

.editor-actions {
  display: flex; gap: 10px; margin-top: 12px;
}

.file-select {
  padding: 6px 10px; border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm); font-size: .82rem;
  background: var(--white); cursor: pointer; font-family: inherit;
}

/* ── 页面文件网格 ── */
.page-file-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.page-file-item {
  background: var(--gray-50); border: 1px solid var(--gray-200);
  border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 8px;
  transition: box-shadow .15s;
}
.page-file-item:hover { box-shadow: var(--shadow-sm); }
.page-file-icon { font-size: 1.4rem; }
.page-file-name { font-size: .82rem; font-weight: 600; color: var(--gray-800); word-break: break-all; }
.page-file-meta { font-size: .75rem; color: var(--gray-500); }
.btn-sm { font-size: .75rem; padding: 4px 10px; }

/* ── 模块步骤 ── */
.module-steps { display: flex; flex-direction: column; gap: 0; }
.step-item {
  display: flex; gap: 14px; padding: 14px 0;
  border-bottom: 1px solid var(--gray-100);
}
.step-item:last-child { border-bottom: none; }
.step-num {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--gray-200); color: var(--gray-600);
  font-weight: 700; font-size: .85rem;
}
.step-item.done .step-num {
  background: var(--green-100); color: var(--green-700);
}
.step-content { flex: 1; }
.step-title { font-weight: 600; font-size: .88rem; color: var(--gray-800); margin-bottom: 2px; }
.step-desc { font-size: .8rem; color: var(--gray-500); line-height: 1.5; }
.step-desc code {
  background: var(--gray-100); padding: 1px 5px; border-radius: 3px;
  font-size: .78rem;
}

/* ── 模块列表/行 ── */
.module-list { display: flex; flex-direction: column; gap: 8px; }
.module-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; background: var(--gray-50);
  border: 1px solid var(--gray-200); border-radius: var(--radius);
  transition: box-shadow .15s;
}
.module-row:hover { box-shadow: var(--shadow-sm); }
.module-row-icon { font-size: 1.5rem; flex-shrink: 0; }
.module-row-info { flex: 1; min-width: 0; }
.module-row-name { font-weight: 600; font-size: .88rem; color: var(--gray-800); }
.module-row-domain { font-size: .75rem; color: var(--gray-500); margin-top: 1px; font-family: monospace; }
.module-row-desc { font-size: .78rem; color: var(--gray-500); margin-top: 2px; }
.module-row-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* ── 响应式 ── */
@media (max-width: 900px) {
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .ssl-grid { grid-template-columns: 1fr; }
  .dash-grid { grid-template-columns: 1fr; }

  /* 侧边栏折叠为抽屉 */
  .sidebar {
    transform: translateX(-100%); transition: transform .25s ease;
    position: fixed; z-index: 200;
  }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .mobile-topbar { display: flex; }
  .panel-header { padding: 20px 20px 16px; }
  .panel-body { padding: 16px; }
}
@media (max-width: 540px) {
  .stat-row { grid-template-columns: 1fr; }
  .dash-header-inner { padding: 0 12px; }
  .dash-time { display: none; }
  .login-card { padding: 28px 20px; }
  .page-file-grid { grid-template-columns: 1fr; }
  .module-row { flex-direction: column; align-items: flex-start; }
  .module-row-actions { align-self: flex-end; }
}
@media (max-width: 380px) {
  .dash-header-inner { padding: 0 8px; }
  .dash-header-logo { font-size: .8rem; }
  .login-card { padding: 20px 14px; }
  .login-card h1 { font-size: 1.3rem; }
  .stat-card { padding: 12px 14px; }
  .ssl-card { padding: 14px; }
  .panel-body { padding: 14px; }
  .btn { padding: 10px 16px; font-size: .85rem; }
}
