/* NEKO 风格 · 浅色玫红主题 */
:root {
  --bg: #f7f5f6;
  --card: #ffffff;
  --pink: #d94f6e;
  --pink-dark: #c43f5d;
  --pink-soft: #fdf1f3;
  --text: #3a3336;
  --muted: #9a8f94;
  --line: #f0e4e7;
  --ok: #3f9e6e;
  --warn: #d98b2b;
  --radius: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
}
a { color: var(--pink); text-decoration: none; }
a:hover { color: var(--pink-dark); }

.layout { display: flex; min-height: 100vh; }

/* ===== 侧栏 ===== */
.sidebar {
  width: 232px; flex: 0 0 232px;
  background: var(--card);
  border-right: 1px solid var(--line);
  padding: 20px 14px;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.brand-logo {
  width: 38px; height: 38px; border-radius: 12px;
  background: linear-gradient(135deg, var(--pink), #e88aa1);
  color: #fff; font-weight: 700; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { color: var(--text); font-size: 16px; }
.brand-text em { font-style: normal; color: var(--muted); font-size: 12px; }

.nav { flex: 1; overflow-y: auto; }
.nav-group { font-size: 12.5px; color: var(--muted); padding: 14px 10px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; margin: 2px 0;
  border-radius: 10px; color: var(--text); font-size: 15px;
  cursor: pointer;
}
.nav-item:hover { background: var(--pink-soft); }
.nav-item.active { background: var(--pink-soft); color: var(--pink); font-weight: 600; }
.nav-item.disabled { color: #c9bfc3; cursor: not-allowed; }
.nav-item.disabled small { margin-left: auto; font-size: 11px; background: var(--line); padding: 1px 6px; border-radius: 8px; }

.sidebar-foot { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.mascot { background: var(--pink-soft); border-radius: 12px; padding: 10px 12px; }
.mascot strong { display: block; font-size: 14px; color: var(--pink); }
.mascot em { font-style: normal; font-size: 12.5px; color: var(--muted); }
.ver { margin-top: 10px; font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; }

/* ===== 主区 ===== */
.main-wrap { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  background: var(--card); border-bottom: 1px solid var(--line);
  padding: 12px 28px; display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 5;
}
.crumb { color: var(--muted); display: flex; gap: 8px; align-items: center; font-size: 15px; }
.crumb b { color: var(--text); font-weight: 600; }
.crumb i { font-style: normal; color: var(--line); }
.topbar-right { display: flex; gap: 12px; align-items: center; }
.userchip {
  background: var(--pink-soft); color: var(--pink);
  padding: 6px 14px; border-radius: 999px; font-size: 14px; font-weight: 600;
}
.main { flex: 1; padding: 26px 28px; max-width: 1200px; width: 100%; margin: 0 auto; }
.page-title { font-size: 24px; font-weight: 700; }
.page-sub { color: var(--muted); font-size: 14.5px; margin: 4px 0 18px; }

/* ===== 卡片 ===== */
.card {
  background: var(--card); border-radius: var(--radius);
  border: 1px solid var(--line);
  padding: 20px 22px; margin-bottom: 18px;
}
.card h2 { font-size: 17px; font-weight: 700; margin-bottom: 12px; }
.card h2 .right { float: right; font-size: 13.5px; font-weight: 400; color: var(--muted); }

/* 横幅 */
.banner {
  background: linear-gradient(120deg, #e0536f 0%, #e97a92 60%, #f0a2b4 100%);
  border-radius: var(--radius); color: #fff;
  padding: 26px 28px; margin-bottom: 18px;
}
.banner .tag {
  display: inline-block; font-size: 12px; letter-spacing: 1px;
  background: rgba(255,255,255,.22); padding: 3px 12px; border-radius: 999px; margin-bottom: 10px;
}
.banner h2 { font-size: 24px; font-weight: 700; margin-bottom: 6px; }
.banner p { opacity: .92; font-size: 15px; margin-bottom: 14px; }
.banner .acts { display: flex; gap: 10px; flex-wrap: wrap; }
.banner .acts a {
  background: rgba(255,255,255,.2); color: #fff;
  padding: 7px 16px; border-radius: 10px; font-size: 14.5px;
}
.banner .acts a:hover { background: rgba(255,255,255,.32); }

/* 提示条 */
.notice-bar {
  background: #eef6f1; border: 1px solid #d8ece0; color: #3c7d5c;
  border-radius: 10px; padding: 10px 16px; font-size: 14.5px; margin-bottom: 18px;
}
.flash-ok { background: #eef6f1; border: 1px solid #d8ece0; color: #3c7d5c; border-radius: 10px; padding: 10px 16px; margin-bottom: 16px; }
.flash-err { background: #fdeeee; border: 1px solid #f3d3d3; color: #b4434a; border-radius: 10px; padding: 10px 16px; margin-bottom: 16px; }

/* ===== 状态环 ===== */
.status-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.stat { text-align: center; padding: 8px 0; }
.ring { --p: 0; --c: var(--pink);
  width: 84px; height: 84px; border-radius: 50%;
  background: conic-gradient(var(--c) calc(var(--p)*1%), var(--line) 0);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 8px; position: relative;
}
.ring::before { content: ""; position: absolute; width: 64px; height: 64px; border-radius: 50%; background: var(--card); }
.ring b { position: relative; font-size: 15px; color: var(--text); }
.stat .label { color: var(--muted); font-size: 13.5px; }
.stat .sub { font-size: 14px; font-weight: 600; margin-top: 2px; }

/* ===== 配额 ===== */
.quota-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-bottom: 18px; }
.quota h3 { font-size: 15.5px; margin-bottom: 10px; }
.bar { height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; margin: 8px 0 6px; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--pink), #e88aa1); border-radius: 999px; }
.quota .nums { font-size: 13.5px; color: var(--muted); display: flex; justify-content: space-between; }

/* ===== 表格 ===== */
table.tb { width: 100%; border-collapse: collapse; font-size: 15px; }
.tb th { text-align: left; color: var(--muted); font-weight: 500; font-size: 13.5px; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tb td { padding: 10px; border-bottom: 1px solid var(--line); word-break: break-all; }
.tb tr:last-child td { border-bottom: none; }

/* ===== 描述列表 ===== */
.dl { display: grid; grid-template-columns: 160px 1fr; row-gap: 10px; font-size: 15px; }
.dl dt { color: var(--muted); }
.dl dd { color: var(--text); }
.badge { display: inline-block; font-size: 12px; padding: 2px 10px; border-radius: 999px; background: var(--pink-soft); color: var(--pink); margin-left: 8px; }
.badge.gray { background: var(--line); color: var(--muted); }
.badge.ok { background: #e7f4ec; color: var(--ok); }

/* ===== 表单 ===== */
label.f { display: block; font-size: 14.5px; font-weight: 600; margin: 14px 0 6px; }
label.f small { color: #c94f4f; }
.input, select, textarea {
  width: 100%; padding: 10px 14px; font-size: 15px;
  border: 1.5px solid var(--line); border-radius: 10px; background: #fff;
  color: var(--text); outline: none; font-family: inherit;
}
.input:focus, select:focus, textarea:focus { border-color: var(--pink); }
textarea { min-height: 220px; font-family: ui-monospace, Consolas, monospace; font-size: 14px; }
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--pink); color: #fff; border: none; cursor: pointer;
  padding: 10px 22px; border-radius: 10px; font-size: 15px; font-weight: 600;
}
.btn:hover { background: var(--pink-dark); color: #fff; }
.btn.ghost { background: transparent; color: var(--pink); border: 1.5px solid var(--pink); }
.btn.ghost:hover { background: var(--pink-soft); }
.btn.sm { padding: 6px 14px; font-size: 13.5px; border-radius: 8px; }
.btn.gray { background: var(--line); color: var(--muted); }
.btn.danger { background: #e35d5d; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.inline-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.inline-form .input { flex: 1; min-width: 200px; }

/* 快捷功能 */
.quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.quick a {
  background: var(--pink-soft); color: var(--pink); text-align: center;
  padding: 12px 8px; border-radius: 10px; font-size: 14.5px; font-weight: 600;
}
.quick a:hover { background: #fbdfE5; }

/* 域名解析自检结果 */
.dns-res { font-size: 12.5px; margin-left: 6px; }
.dns-res.ok { color: var(--ok); }
.dns-res.bad { color: #b4434a; }

/* ===== 后台弹窗 ===== */
.np-modal {
  display: none;
  position: fixed; inset: 0; z-index: 90;
  background: rgba(58, 51, 54, .45);
  align-items: center; justify-content: center;
  padding: 16px;
}
.np-modal.show { display: flex; }
.np-modal-card {
  background: var(--card); border-radius: var(--radius);
  border: 1px solid var(--line);
  padding: 20px; width: 100%; max-width: 440px;
  max-height: 88vh; overflow-y: auto;
  box-shadow: 0 18px 50px rgba(58, 51, 54, .22);
}
.np-modal-card h3 { font-size: 17px; margin-bottom: 4px; }
.np-modal-card .inline-form .input { flex: 0 1 auto; }
.np-pass-meter {
  height: 6px; background: var(--line); border-radius: 999px;
  overflow: hidden; margin-top: 8px;
}
.np-pass-meter i { display: block; height: 100%; width: 0; background: var(--line); transition: width .2s, background .2s; }

/* 后台表格里的复选框 */
.tb input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--pink); cursor: pointer; }

/* 登录页 */
.login-wrap { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; }
.login-left { background: linear-gradient(160deg, #fce8ec, #f7f5f6); padding: 6vh 6vw; display: flex; flex-direction: column; justify-content: center; }
.login-left h2 { font-size: 30px; line-height: 1.4; margin-bottom: 14px; }
.login-left p { color: var(--muted); max-width: 420px; margin-bottom: 22px; }
.login-left ul { list-style: none; }
.login-left li { color: var(--pink); font-size: 15px; margin: 8px 0; }
.login-left li::before { content: "✓ "; font-weight: 700; }
.login-right { display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.login-card { width: 100%; max-width: 400px; }
.login-card h1 { font-size: 26px; margin-bottom: 4px; }
.login-card .sub { color: var(--muted); margin-bottom: 22px; }
.captcha-row { display: flex; gap: 10px; align-items: center; }
.captcha-row .input { flex: 1; }
.captcha-row img { height: 44px; border-radius: 8px; cursor: pointer; border: 1px solid var(--line); }
.login-foot { margin-top: 18px; display: flex; justify-content: space-between; color: var(--muted); font-size: 14px; }
/* ===== 汉堡按钮（仅移动端显示）===== */
.menu-btn {
  display: none;
  width: 38px; height: 38px; flex: 0 0 38px;
  align-items: center; justify-content: center;
  border: 1.5px solid var(--line); border-radius: 10px;
  background: var(--card); color: var(--text); font-size: 19px;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.menu-btn:active { background: var(--pink-soft); }
.sidebar-mask {
  display: none;
  position: fixed; inset: 0; z-index: 55;
  background: rgba(58, 51, 54, .42);
  opacity: 0; pointer-events: none; transition: opacity .25s ease;
}

/* ===== 表格横向滚动容器 ===== */
.tb-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tb-wrap table.tb { min-width: 560px; }

@media (max-width: 900px) {
  /* 登录页：单列并压缩留白 */
  .login-wrap { grid-template-columns: 1fr; }
  .login-left { display: none; }
  .login-right { padding: 24px 16px; }
  .login-card h1 { font-size: 23px; }

  /* 侧边栏 → 抽屉 */
  .menu-btn { display: inline-flex; }
  .sidebar {
    display: flex;
    position: fixed; left: 0; top: 0; bottom: 0;
    width: 250px; flex: 0 0 250px;
    height: 100vh; z-index: 60;
    transform: translateX(-100%);
    transition: transform .25s ease;
    box-shadow: 0 0 44px rgba(58, 51, 54, .16);
    overflow-y: auto;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-mask { display: block; }
  body.nav-open .sidebar-mask { opacity: 1; pointer-events: auto; }
  body.nav-open { overflow: hidden; }

  /* 顶栏 */
  .topbar { padding: 10px 12px; gap: 8px; }
  .crumb { font-size: 15px; white-space: nowrap; }
  .crumb b { overflow: hidden; text-overflow: ellipsis; }
  .hide-m { display: none; }
  .topbar-right { gap: 8px; flex: 0 0 auto; }
  .topbar-right .btn { padding: 8px 12px; white-space: nowrap; }
  .userchip { padding: 5px 10px; font-size: 13px; max-width: 38vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  /* 主区 */
  .main { padding: 16px 14px; }
  .page-title { font-size: 20px; }
  .page-sub { font-size: 13.5px; }
  .foot { padding: 16px 14px; }

  /* 卡片与横幅 */
  .card { padding: 16px 14px; border-radius: 12px; margin-bottom: 14px; }
  .card h2 { font-size: 16px; }
  .card h2 .right { float: none; display: block; font-size: 12.5px; margin-top: 2px; }
  .banner { padding: 20px 16px; margin-bottom: 14px; }
  .banner h2 { font-size: 20px; }
  .banner p { font-size: 14px; }
  .banner .acts a { padding: 8px 14px; font-size: 14px; }

  /* 状态环 / 配额 */
  .status-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .ring { width: 72px; height: 72px; }
  .ring::before { width: 55px; height: 55px; }
  .quota-grid { grid-template-columns: 1fr; gap: 10px; }
  .quota .nums { flex-direction: column; gap: 2px; }

  /* 描述列表 → 单列 */
  .dl { grid-template-columns: 1fr; row-gap: 2px; font-size: 14.5px; }
  .dl dt { margin-top: 8px; font-size: 13px; }
  .dl dd { margin-bottom: 4px; }

  /* 表单：避免输入框被 min-width 撑破 */
  .inline-form { gap: 8px; }
  .inline-form .input { min-width: 0; flex: 1 1 100%; }
  .input, select, textarea { font-size: 16px; padding: 10px 12px; }
  label.f { font-size: 14px; margin: 12px 0 6px; }
  .btn { padding: 10px 18px; }
  .btn.sm { padding: 8px 12px; }
  .captcha-row { gap: 8px; }
  .captcha-row img { height: 42px; }

  /* 快捷功能 */
  .quick { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .quick a { padding: 12px 6px; font-size: 14px; }

  /* 表格：允许横向滚动，避免单元格内强制断词 */
  .tb-wrap table.tb { min-width: 640px; }
  .tb td { word-break: normal; overflow-wrap: anywhere; }
  .tb td:first-child { white-space: nowrap; overflow-wrap: normal; word-break: keep-all; }

  /* 管理后台 */
  .admin-wrap { padding: 14px !important; }
  .admin-wrap .card { padding: 14px 12px; }
  .admin-wrap .inline-form .input { flex: 1 1 100%; }
  .admin-wrap h1 { font-size: 19px; }
  .admin-wrap > div:first-child { flex-wrap: wrap; gap: 8px; }
  .admin-wrap .tb-wrap table.tb { min-width: 920px; }
  .admin-wrap .tb td { overflow-wrap: break-word; }
}

@media (max-width: 420px) {
  .quick { grid-template-columns: 1fr 1fr; }
  .tb-wrap table.tb { min-width: 560px; }
}

.foot { padding: 18px 28px; color: var(--muted); font-size: 13.5px; text-align: center; }
.tag2 { display:inline-block; font-size:12px; background:var(--pink-soft); color:var(--pink); border-radius:8px; padding:2px 10px; margin: 0 4px 4px 0; }
