/* 大猫猫·软件中心 — 白底橙强调（品牌对齐 #FA7C20 / #191511） */
:root {
  --orange: #FA7C20;
  --orange-soft: #FFF4EB;
  --orange-mid: #FF9A4D;
  --ink: #191511;
  --muted: #666;
  --line: #eee;
  --card: #fff;
  --radius: 14px;
  --shadow: 0 8px 28px rgba(17,17,17,.06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: #fff;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--orange); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { width: min(1080px, calc(100% - 32px)); margin: 0 auto; }

/* top nav */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 14px 0;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; min-width: 0; flex: 1 1 auto; }
.brand:hover { text-decoration: none; }
.logo {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--orange), var(--orange-mid));
  color: #fff; display: grid; place-items: center;
  font-weight: 900; font-size: 1.15rem; border: 1.5px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
}
.logo-img {
  width: 36px; height: 36px; border-radius: 10px;
  border: 1.5px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  object-fit: cover; background: var(--orange);
  display: block; flex-shrink: 0;
}
.nav { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
.nav a {
  color: #333; font-weight: 600; font-size: .95rem;
  padding: 6px 2px; border-bottom: 2px solid transparent;
}
.nav a:hover, .nav a.active { color: var(--orange); text-decoration: none; border-bottom-color: var(--orange); }
.nav .pill {
  background: var(--orange); color: #fff !important; border: 1.5px solid var(--ink);
  border-radius: 999px; padding: 6px 14px; border-bottom: none !important;
  box-shadow: 2px 2px 0 var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  white-space: nowrap;
}
.nav .pill:hover { filter: brightness(1.05); text-decoration: none; }

.nav-toggle {
  display: none;
  align-items: center; justify-content: center;
  width: 42px; height: 42px; padding: 0;
  border-radius: 12px; border: 1.5px solid var(--ink);
  background: #fff; cursor: pointer;
  box-shadow: 2px 2px 0 var(--ink);
  flex-shrink: 0;
}
.nav-toggle:hover { background: var(--orange-soft); }
.nav-toggle-bars {
  display: block; width: 18px; height: 2px;
  background: var(--ink); position: relative;
  box-shadow: 0 -6px 0 var(--ink), 0 6px 0 var(--ink);
}
.topbar.is-open .nav-toggle-bars { background: transparent; box-shadow: none; }
.topbar.is-open .nav-toggle-bars::before,
.topbar.is-open .nav-toggle-bars::after {
  content: ""; position: absolute; left: 0; top: 0;
  width: 18px; height: 2px; background: var(--ink);
}
.topbar.is-open .nav-toggle-bars::before { transform: rotate(45deg); }
.topbar.is-open .nav-toggle-bars::after { transform: rotate(-45deg); }
.brand { min-width: 0; flex: 1 1 auto; }
.brand span {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-size: clamp(.9rem, 3.5vw, 1rem);
}

/* Mobile: collapse nav behind hamburger so it never covers page copy */
@media (max-width: 760px) {
  .topbar-inner {
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 0;
  }
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 4px 0 8px;
    border-top: 1px solid var(--line);
  }
  .topbar.is-open .nav { display: flex; }
  .nav a {
    font-size: .95rem;
    padding: 12px 10px;
    border-bottom: none;
    border-radius: 10px;
  }
  .nav a:hover, .nav a.active {
    background: var(--orange-soft);
    border-bottom-color: transparent;
  }
  .nav .pill {
    text-align: center;
    margin-top: 4px;
    width: 100%;
    padding: 10px 14px;
    box-shadow: 2px 2px 0 var(--ink);
  }
  .brand span { max-width: calc(100vw - 120px); }
}

main { flex: 1; }

/* hero */
.hero {
  padding: 56px 0 40px;
  background:
    radial-gradient(900px 320px at 85% -10%, rgba(255,106,0,.18), transparent 60%),
    linear-gradient(180deg, #fffaf5 0%, #fff 70%);
}
.hero-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 28px; align-items: center; }
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero { padding: 36px 0 28px; }
}
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.25; margin: 0 0 12px; }
.hero h1 em { font-style: normal; color: var(--orange); }
.hero p.lead { font-size: 1.08rem; color: #444; margin: 0 0 22px; max-width: 36em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; padding: 11px 20px; font-weight: 700;
  border: 1.5px solid var(--ink); cursor: pointer; text-decoration: none;
  transition: transform .08s ease, filter .15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--orange); color: #fff; box-shadow: 3px 3px 0 #111; }
.btn-ghost { background: #fff; color: #111; }
.hero-card {
  background: #fff; border: 2px solid #111; border-radius: 18px;
  padding: 22px; box-shadow: 6px 6px 0 rgba(255,106,0,.25);
}
.badge {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-weight: 700; font-size: .82rem; border: 1.5px solid var(--ink);
  background: #ffe8cc;
}
.badge.live { background: #d4f5d4; }
.badge.mock { background: #ffe8cc; }
.muted { color: var(--muted); font-size: .92rem; }
.section { padding: 40px 0; }
@media (max-width: 760px) { .section { padding: 28px 0; } }
.section h2 {
  font-size: 1.35rem; margin: 0 0 16px;
  border-bottom: 2px solid var(--orange); display: inline-block; padding-bottom: 4px;
}
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.card {
  background: var(--card); border: 1.5px solid #e8e8e8; border-radius: var(--radius);
  padding: 18px 18px 16px; box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 8px; font-size: 1.05rem; }
.card p { margin: 0; color: #555; font-size: .95rem; }
.warn {
  background: #fff3cd; border: 1px solid #ffc107; border-radius: 10px;
  padding: 12px 14px; margin: 12px 0;
}
.danger {
  background: #ffe8e8; border: 1px solid #f5a3a3; border-radius: 10px;
  padding: 12px 14px; margin: 12px 0; color: #8a1f1f; font-weight: 600;
}
footer {
  border-top: 1px solid var(--line); padding: 28px 0 36px; margin-top: 24px;
  background: #fafafa; color: #555; font-size: .92rem;
}
.foot-grid { display: flex; flex-wrap: wrap; gap: 16px 28px; justify-content: space-between; }
.foot-links { display: flex; flex-wrap: wrap; gap: 14px; }
.foot-links a { color: #444; font-weight: 600; }
.foot-links a:hover { color: var(--orange); }

/* forms (admin) */
.form-card {
  border: 2px solid #111; border-radius: 16px; padding: 20px;
  background: #fffaf5; box-shadow: 4px 4px 0 rgba(255,106,0,.2);
  max-width: 720px;
}
label { display: block; font-weight: 700; margin: 14px 0 6px; font-size: .92rem; }
input, select {
  width: 100%; padding: 10px 12px; border-radius: 10px;
  border: 1.5px solid #ddd; font: inherit; background: #fff;
}
input:focus, select:focus { outline: 2px solid rgba(255,106,0,.35); border-color: var(--orange); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .row2 { grid-template-columns: 1fr; } }
.hint { font-size: .82rem; color: #777; margin-top: 4px; }
.field-status { font-size: .82rem; color: #2a7a2a; font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; align-items: center; }
.chk { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.chk input { width: auto; }
.msg { margin-top: 12px; padding: 10px 12px; border-radius: 8px; display: none; }
.msg.ok { display: block; background: #e8f8e8; border: 1px solid #8fd18f; }
.msg.err { display: block; background: #ffe8e8; border: 1px solid #f5a3a3; }
code, pre { background: #f5f5f5; border-radius: 6px; font-size: .9em; }
code { padding: .1em .35em; }
pre { padding: 12px 14px; overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th, td { border: 1px solid #ddd; padding: 8px 10px; text-align: left; }
th { background: var(--orange-soft); }

/* download / card polish */
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 6px;
}
.card-head h3 { margin: 0; }
.card:hover { border-color: #f0c9a0; box-shadow: 0 10px 32px rgba(255,106,0,.08); }
a.card:hover { text-decoration: none; transform: translateY(-2px); transition: transform .12s ease; }
.btn-disabled,
.btn[aria-disabled="true"] {
  background: #f0f0f0 !important; color: #999 !important;
  border-color: #ccc !important; box-shadow: none !important;
  pointer-events: none; cursor: not-allowed; transform: none !important;
}
.stat-row {
  display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center;
  margin: 0;
}
.admin-layout {
  display: grid; gap: 18px;
  grid-template-columns: minmax(0, 1fr);
}
.admin-side {
  display: grid; gap: 14px;
}
@media (min-width: 960px) {
  .admin-layout {
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, .7fr);
    align-items: start;
  }
}
.panel-title {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; flex-wrap: wrap; margin-bottom: 4px;
}
.kvs { display: grid; gap: 8px; font-size: .92rem; }
.kvs div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed #eee; }
.kvs span:first-child { color: #666; font-weight: 600; }
.section-lead { color: #555; margin: 0 0 18px; max-width: 40em; }
.card-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }

/* status dashboard */
.status-hero { padding-bottom: 20px; }
.status-hero-head {
  display: flex; flex-wrap: wrap; align-items: flex-end;
  justify-content: space-between; gap: 16px;
}
.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}
.status-card {
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: 4px 4px 0 rgba(250, 124, 32, 0.22);
}
.status-card--main {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #fffaf5, #fff);
  box-shadow: 5px 5px 0 var(--ink);
}
.status-card--wide { grid-column: 1 / -1; }
@media (min-width: 720px) {
  .status-card--wide { grid-column: span 2; }
}
.status-card-label {
  font-size: .82rem; font-weight: 700; color: #666;
  letter-spacing: .02em; margin-bottom: 10px;
}
.status-card-value { font-size: 1.15rem; font-weight: 800; color: var(--ink); }
.status-card-value.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1rem; font-weight: 600; }
.pill-status {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 6px 14px; border-radius: 999px;
  border: 1.5px solid var(--ink);
  font-weight: 800; font-size: .95rem;
  box-shadow: 2px 2px 0 var(--ink);
}
.pill-ok { background: #c8f0c8; color: #145214; }
.pill-bad { background: #ffc9c9; color: #8a1f1f; }
.pill-warn { background: #ffe8cc; color: #7a4a00; }
.pill-pending { background: #f0f0f0; color: #666; }
.provider-chip {
  display: inline-block; margin: 2px 4px 2px 0;
  padding: 4px 10px; border-radius: 999px;
  border: 1.5px solid var(--ink); background: var(--orange-soft);
  font-size: .88rem; font-weight: 700;
}
