:root {
  --bg: #07080c;
  --bg-soft: #0a0c12;
  --panel: rgba(255, 255, 255, 0.032);
  --panel-solid: #0d1017;
  --panel-hover: rgba(255, 255, 255, 0.052);
  --border: rgba(255, 255, 255, 0.075);
  --border-strong: rgba(255, 255, 255, 0.13);
  --text: #e9ecf3;
  --text-2: #aeb6c7;
  --muted: #7d8698;
  --accent: #8b96ff;
  --accent-2: #2dd4bf;
  --ok: #34d399;
  --warn: #fbbf24;
  --danger: #fb7185;
  --radius: 16px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 500px at 12% -8%, rgba(124, 140, 255, 0.16), transparent 62%),
    radial-gradient(760px 460px at 88% -4%, rgba(45, 212, 191, 0.10), transparent 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent 30%);
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 0%, black 0%, transparent 72%);
  z-index: 0;
}

a { color: var(--accent); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }

/* ---------- Login ---------- */
.login-wrap {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 400px;
  padding: 38px 34px 30px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(20, 23, 33, 0.92), rgba(10, 12, 18, 0.94));
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  animation: rise 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.brand { display: flex; align-items: center; gap: 12px; }

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(124, 140, 255, 0.28), rgba(45, 212, 191, 0.18));
  border: 1px solid rgba(139, 150, 255, 0.32);
  box-shadow: 0 0 26px rgba(124, 140, 255, 0.18);
}

.brand-mark svg { width: 22px; height: 22px; }

.brand-title { font-size: 18px; font-weight: 650; letter-spacing: 0.2px; }
.brand-sub { font-size: 12px; color: var(--muted); letter-spacing: 0.4px; }

.login-card h1 { margin: 26px 0 6px; font-size: 24px; font-weight: 640; letter-spacing: -0.3px; }
.login-card p.lead { margin: 0 0 24px; color: var(--text-2); font-size: 13px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 7px; letter-spacing: 0.2px; }
.field .hint { font-size: 11.5px; color: var(--muted); margin-top: 6px; }

.input, .select, .textarea {
  width: 100%;
  padding: 10px 13px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: rgba(0, 0, 0, 0.32);
  color: var(--text);
  outline: none;
  transition: border-color 0.16s, box-shadow 0.16s, background 0.16s;
}

.input:focus, .select:focus, .textarea:focus {
  border-color: rgba(139, 150, 255, 0.62);
  box-shadow: 0 0 0 3px rgba(124, 140, 255, 0.13);
  background: rgba(0, 0, 0, 0.42);
}

.input::placeholder, .textarea::placeholder { color: #5b6477; }
.textarea { min-height: 84px; resize: vertical; font-family: var(--mono); font-size: 12.5px; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #7d8698 50%), linear-gradient(135deg, #7d8698 50%, transparent 50%); background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 550;
  transition: background 0.16s, border-color 0.16s, transform 0.08s, box-shadow 0.16s;
  white-space: nowrap;
}

.btn:hover { background: rgba(255, 255, 255, 0.085); border-color: rgba(255, 255, 255, 0.2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  border: 1px solid rgba(139, 150, 255, 0.45);
  background: linear-gradient(135deg, rgba(124, 140, 255, 0.9), rgba(96, 118, 255, 0.82));
  color: #fff;
  box-shadow: 0 8px 26px rgba(90, 110, 255, 0.25);
}

.btn-primary:hover { background: linear-gradient(135deg, #95a0ff, #7e8dff); box-shadow: 0 10px 32px rgba(90, 110, 255, 0.34); }

.btn-ghost { background: transparent; border-color: var(--border); }
.btn-danger { border-color: rgba(251, 113, 133, 0.32); color: #ffb3bf; background: rgba(251, 113, 133, 0.08); }
.btn-danger:hover { background: rgba(251, 113, 133, 0.16); border-color: rgba(251, 113, 133, 0.5); }
.btn-sm { padding: 6px 11px; font-size: 12px; border-radius: 8px; }
.btn-block { width: 100%; }

.login-foot { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); }

/* ---------- Shell ---------- */
.shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 22px 16px 18px;
  border-right: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(12, 14, 21, 0.82), rgba(8, 10, 15, 0.9));
  backdrop-filter: blur(18px);
}

.sidebar .brand { padding: 0 8px 22px; }

.nav { display: flex; flex-direction: column; gap: 3px; margin-top: 6px; }
.nav-label { font-size: 10.5px; letter-spacing: 1.4px; color: #596174; text-transform: uppercase; padding: 12px 12px 6px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-radius: 9px;
  color: var(--text-2);
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.14s, color 0.14s, border-color 0.14s;
  font-size: 13.5px;
  user-select: none;
}

.nav-item svg { width: 17px; height: 17px; opacity: 0.78; }
.nav-item:hover { background: rgba(255, 255, 255, 0.045); color: var(--text); }
.nav-item.active {
  background: linear-gradient(90deg, rgba(124, 140, 255, 0.14), rgba(124, 140, 255, 0.03));
  border-color: rgba(139, 150, 255, 0.22);
  color: #dfe3ff;
}
.nav-item.active svg { opacity: 1; }

.sidebar-foot { margin-top: auto; padding: 14px 12px 0; border-top: 1px solid var(--border); font-size: 11px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.sidebar-foot .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px rgba(52, 211, 153, 0.7); margin-right: 6px; }

.main { min-width: 0; padding: 26px 34px 60px; }
.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.topbar h1 { margin: 0 0 4px; font-size: 23px; font-weight: 640; letter-spacing: -0.4px; }
.topbar .sub { color: var(--muted); font-size: 12.5px; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }

.view { animation: fade 0.24s ease; }
@keyframes fade { from { opacity: 0.4; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012));
  padding: 18px 20px;
  backdrop-filter: blur(12px);
}

.stat { position: relative; overflow: hidden; }
.stat::after {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  right: -46px;
  top: -52px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 140, 255, 0.18), transparent 68%);
}
.stat .label { color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 7px; }
.stat .value { font-size: 31px; font-weight: 640; letter-spacing: -0.6px; margin-top: 8px; font-variant-numeric: tabular-nums; }
.stat .value small { font-size: 13px; color: var(--muted); font-weight: 400; margin-left: 4px; }
.stat .foot { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.stat.ok .value { color: var(--ok); }
.stat.warn .value { color: var(--warn); }
.stat.bad .value { color: var(--danger); }
.stat.info .value { color: #aab4ff; }

.section-head { display: flex; align-items: center; justify-content: space-between; margin: 26px 2px 12px; }
.section-head h2 { margin: 0; font-size: 14.5px; font-weight: 600; letter-spacing: 0.1px; }
.section-head .aside { font-size: 12px; color: var(--muted); }

/* ---------- Table ---------- */
.table-card { padding: 0; overflow: hidden; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 780px; }
th, td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { font-size: 11.5px; font-weight: 550; color: var(--muted); letter-spacing: 0.4px; text-transform: uppercase; background: rgba(255, 255, 255, 0.018); }
tbody tr { transition: background 0.14s; }
tbody tr:hover { background: rgba(255, 255, 255, 0.022); }
tbody tr:last-child td { border-bottom: 0; }
td.mono, .mono { font-family: var(--mono); font-size: 12.5px; }
td .sub { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; }

.domain-name { display: flex; align-items: center; gap: 9px; }
.domain-name .ico { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: rgba(124, 140, 255, 0.1); border: 1px solid rgba(139, 150, 255, 0.2); flex: none; }
.domain-name .ico svg { width: 14px; height: 14px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 550;
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; box-shadow: 0 0 7px currentColor; }
.badge.ok { color: var(--ok); background: rgba(52, 211, 153, 0.09); border-color: rgba(52, 211, 153, 0.22); }
.badge.warn { color: var(--warn); background: rgba(251, 191, 36, 0.09); border-color: rgba(251, 191, 36, 0.22); }
.badge.bad { color: var(--danger); background: rgba(251, 113, 133, 0.09); border-color: rgba(251, 113, 133, 0.24); }
.badge.mute { color: #9aa3b6; background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.12); }
.badge.info { color: #aab4ff; background: rgba(124, 140, 255, 0.1); border-color: rgba(124, 140, 255, 0.24); }

.row-actions { display: flex; gap: 6px; justify-content: flex-end; }

.expiry { display: flex; flex-direction: column; gap: 2px; }
.expiry .days { font-size: 12.5px; color: var(--text-2); }
.expiry .days.ok { color: var(--ok); }
.expiry .days.warn { color: var(--warn); }
.expiry .days.bad { color: var(--danger); }

.cdn-tags { display: flex; flex-wrap: wrap; gap: 4px; max-width: 200px; white-space: normal; }
.cdn-tag { font-size: 11px; padding: 2px 7px; border-radius: 5px; background: rgba(45, 212, 191, 0.08); border: 1px solid rgba(45, 212, 191, 0.2); color: #7fe3d6; font-family: var(--mono); }

/* ---------- Switch ---------- */
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { width: 38px; height: 21px; border-radius: 999px; background: rgba(255, 255, 255, 0.11); border: 1px solid var(--border-strong); transition: background 0.18s, border-color 0.18s; position: relative; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; border-radius: 50%; background: #c8cddc; transition: transform 0.18s, background 0.18s; }
.switch input:checked + .track { background: linear-gradient(135deg, rgba(124, 140, 255, 0.85), rgba(45, 212, 191, 0.7)); border-color: rgba(139, 150, 255, 0.5); }
.switch input:checked + .track::after { transform: translateX(17px); background: #fff; }
.switch .switch-label { font-size: 12.5px; color: var(--text-2); }

/* ---------- Settings ---------- */
.panel-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 16px; }
.panel-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.panel-title h3 { margin: 0; font-size: 14px; font-weight: 600; }
.panel-title .desc { color: var(--muted); font-size: 11.5px; margin-top: 3px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-actions { display: flex; gap: 9px; margin-top: 18px; }
.divider { height: 1px; background: var(--border); margin: 20px 0; }
.kv { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed rgba(255, 255, 255, 0.07); font-size: 12.5px; }
.kv:last-child { border-bottom: 0; }
.kv span:first-child { color: var(--muted); }
.kv span:last-child { color: var(--text-2); font-family: var(--mono); font-size: 12px; }

/* ---------- Logs ---------- */
.log-box {
  margin: 0;
  padding: 18px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #080a0f;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.75;
  max-height: 62vh;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-all;
}
.log-line .lvl { color: var(--muted); }
.log-line.error { color: #ffa5b3; }
.log-line.warn { color: #fcd34d; }
.log-line.info { color: #a9b4c9; }
.log-time { color: #5d6779; }

/* ---------- Empty ---------- */
.empty { text-align: center; padding: 54px 24px; color: var(--muted); }
.empty svg { width: 40px; height: 40px; opacity: 0.35; margin-bottom: 12px; }
.empty h3 { color: var(--text-2); font-weight: 550; font-size: 14px; margin: 0 0 6px; }
.empty p { margin: 0 0 16px; font-size: 12.5px; }

/* ---------- Dialog ---------- */
dialog {
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  background: linear-gradient(180deg, #13161f, #0b0d14);
  color: var(--text);
  padding: 0;
  width: min(560px, calc(100vw - 32px));
  box-shadow: var(--shadow);
}
dialog::backdrop { background: rgba(3, 5, 9, 0.66); backdrop-filter: blur(4px); }
.dialog-head { padding: 20px 24px 0; }
.dialog-head h2 { margin: 0 0 4px; font-size: 17px; font-weight: 620; }
.dialog-head p { margin: 0; color: var(--muted); font-size: 12px; }
.dialog-body { padding: 18px 24px; max-height: 66vh; overflow: auto; }
.dialog-foot { padding: 0 24px 22px; display: flex; justify-content: flex-end; gap: 9px; }

.cdn-picker { display: flex; flex-direction: column; gap: 7px; max-height: 190px; overflow: auto; padding: 8px; border: 1px solid var(--border); border-radius: 10px; background: rgba(0, 0, 0, 0.22); }
.cdn-option { display: flex; align-items: center; gap: 9px; padding: 7px 9px; border-radius: 7px; cursor: pointer; font-size: 12.5px; }
.cdn-option:hover { background: rgba(255, 255, 255, 0.04); }
.cdn-option input { accent-color: #8b96ff; width: 14px; height: 14px; }
.cdn-option .name { font-family: var(--mono); }
.cdn-option .meta { margin-left: auto; color: var(--muted); font-size: 11px; }

/* ---------- Toast ---------- */
#toasts { position: fixed; right: 22px; bottom: 22px; z-index: 50; display: flex; flex-direction: column; gap: 9px; }
.toast {
  min-width: 240px;
  max-width: 380px;
  padding: 11px 15px;
  border-radius: 11px;
  background: rgba(18, 21, 30, 0.96);
  border: 1px solid var(--border-strong);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  font-size: 12.5px;
  animation: toastIn 0.24s ease;
  display: flex;
  gap: 9px;
  align-items: flex-start;
}
.toast.ok { border-color: rgba(52, 211, 153, 0.4); }
.toast.error { border-color: rgba(251, 113, 133, 0.45); }
.toast .bar { width: 3px; border-radius: 2px; align-self: stretch; background: var(--accent); }
.toast.ok .bar { background: var(--ok); }
.toast.error .bar { background: var(--danger); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.spin { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.mt-0 { margin-top: 0; }
.mt-16 { margin-top: 16px; }
.flex { display: flex; }
.between { justify-content: space-between; }
.center { align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }

.callout {
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid rgba(251, 191, 36, 0.24);
  background: rgba(251, 191, 36, 0.07);
  color: #fcd9a0;
  font-size: 12.5px;
  margin-bottom: 16px;
}
.callout.info { border-color: rgba(124, 140, 255, 0.26); background: rgba(124, 140, 255, 0.07); color: #c3caff; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; padding: 14px; border-right: 0; border-bottom: 1px solid var(--border); }
  .sidebar .brand { padding-bottom: 12px; }
  .nav { flex-direction: row; overflow-x: auto; gap: 4px; }
  .nav-label { display: none; }
  .nav-item { white-space: nowrap; padding: 7px 11px; }
  .sidebar-foot { display: none; }
  .main { padding: 20px 16px 50px; }
  .topbar { flex-direction: column; }
  .topbar-actions { width: 100%; overflow-x: auto; }
  .grid-4, .grid-3 { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .grid-4, .grid-3 { grid-template-columns: 1fr; }
  .stat .value { font-size: 26px; }
  .login-card { padding: 28px 22px 24px; }
}
/* ---------- v2: multi-user / logs / buttons ---------- */
.login-switch { margin-top: 14px; text-align: center; font-size: 12.5px; }
.login-switch a { color: var(--accent); }

.user-mini { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); overflow: hidden; }
.user-mini span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.state-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  background: transparent;
  transition: filter .15s, background .15s;
}
.state-btn::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.state-btn.on { color: #34d399; background: rgba(52, 211, 153, 0.1); border-color: rgba(52, 211, 153, 0.3); }
.state-btn.off { color: #9aa3b6; background: rgba(255, 255, 255, 0.045); border-color: rgba(255, 255, 255, 0.13); }
.state-btn:hover { filter: brightness(1.18); }
.state-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.check-line { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 12.5px; color: var(--text-2); }
.check-line input { width: 15px; height: 15px; accent-color: #8b96ff; }
.check-row { display: flex; flex-wrap: wrap; gap: 18px; padding: 8px 0; }

.notify-fields { border-left: 2px solid rgba(139, 150, 255, 0.25); padding-left: 12px; margin-bottom: 10px; }

.task-phase { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.phase-badge { padding: 3px 10px; border-radius: 999px; font-size: 11.5px; border: 1px solid; }
.phase-badge.info { color: #aab4ff; border-color: rgba(139, 150, 255, 0.35); background: rgba(124, 140, 255, 0.1); }
.phase-badge.ok { color: #34d399; border-color: rgba(52, 211, 153, 0.35); background: rgba(52, 211, 153, 0.1); }
.phase-badge.bad { color: #fb7185; border-color: rgba(251, 113, 133, 0.4); background: rgba(251, 113, 133, 0.1); }
.progress { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); overflow: hidden; margin-bottom: 14px; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, #8b96ff, #2dd4bf); transition: width 0.3s; }
.progress span.bad { background: linear-gradient(90deg, #fb7185, #f97066); }
.task-log-box { max-height: 46vh; }
.log-dialog { width: min(760px, calc(100vw - 32px)); }
.log-line.phase { color: #aab4ff; font-weight: 600; }
.log-line .log-time { color: #5d6779; }

@media (max-width: 860px) {
  .notify-fields { border-left: 0; padding-left: 0; }
}
/* ---------- v5: certificate download ---------- */
.cert-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
  font-size: 12.5px;
}
.cert-meta .k { color: var(--muted); margin-right: 8px; }
.cert-meta .v { color: var(--text); }

.cert-downloads { display: flex; flex-direction: column; gap: 8px; }
.cert-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  transition: border-color 0.15s, background 0.15s;
}
.cert-file:hover { border-color: rgba(139, 150, 255, 0.5); background: rgba(124, 140, 255, 0.08); }
.cert-file-name { display: block; font-size: 13px; font-weight: 550; }
.cert-file-desc { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.cert-file-dl { color: var(--accent); font-size: 12px; white-space: nowrap; }

.code-box {
  margin: 6px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: #080a0f;
  border: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
  color: #c9d2e6;
}

@media (max-width: 560px) {
  .cert-meta { grid-template-columns: 1fr; }
}