:root {
  --navy: #081a3a;
  --navy-2: #102958;
  --ink: #10233f;
  --muted: #6f7d92;
  --line: #dce5f0;
  --surface: #ffffff;
  --canvas: #f4f7fb;
  --teal: #0d9488;
  --teal-soft: #e8faf7;
  --orange: #ea580c;
  --orange-soft: #fff1e9;
  --danger: #c2413b;
  --shadow: 0 16px 44px rgba(18, 47, 88, .08);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--canvas); }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 3px solid rgba(20,184,166,.45); outline-offset: 2px; }
.is-hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.eyebrow { margin: 0 0 8px; color: var(--teal); font-size: 10px; letter-spacing: .18em; font-weight: 800; }
.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at top right, #d8f7f2 0, transparent 33%), linear-gradient(145deg, #f3fbff, #edf5fb); }
.auth-card { width: min(100%, 430px); padding: 40px; border: 1px solid rgba(255,255,255,.85); border-radius: 24px; background: rgba(255,255,255,.92); box-shadow: 0 30px 80px rgba(16,53,86,.12); }
.brand-lockup, .sidebar-brand { display: flex; gap: 14px; align-items: center; }
.brand-lockup img { width: 48px; height: 48px; border-radius: 14px; box-shadow: 0 8px 18px rgba(12,54,121,.25); }
.brand-lockup h1 { margin: 0; font-size: 22px; letter-spacing: -.04em; }
.auth-copy { margin: 25px 0 20px; color: var(--muted); line-height: 1.6; }
.stack-form, .editor-form { display: grid; gap: 16px; }
label { display: grid; gap: 7px; color: #34465f; font-size: 13px; font-weight: 700; }
input, textarea, select { width: 100%; border: 1px solid var(--line); border-radius: 10px; outline: none; color: var(--ink); background: #fff; transition: border-color .18s ease, box-shadow .18s ease; }
input, select { height: 44px; padding: 0 13px; }
textarea { padding: 11px 13px; resize: vertical; line-height: 1.55; }
input:focus, textarea:focus, select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(13,148,136,.12); }
.button { min-height: 44px; border: 1px solid transparent; border-radius: 10px; padding: 0 16px; font-size: 13px; font-weight: 800; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.button:active { transform: translateY(1px); }
.button-primary { color: white; background: var(--orange); box-shadow: 0 8px 16px rgba(234,88,12,.18); }
.button-primary:hover { background: #d94e09; box-shadow: 0 10px 20px rgba(234,88,12,.24); }
.button-ghost { color: #466078; border-color: var(--line); background: #fff; }
.button-ghost:hover { border-color: #a9bacd; background: #f8fafc; }
.button-wide { width: 100%; margin-top: 4px; }
.form-hint { margin: 17px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
code { padding: 2px 5px; border-radius: 5px; color: var(--navy-2); background: #edf2f8; }
.app-shell { min-height: 100vh; display: flex; }
.sidebar { width: 238px; flex: 0 0 238px; display: flex; flex-direction: column; padding: 28px 16px 20px; color: #c7d5ef; background: var(--navy); }
.sidebar-brand img { width: 40px; height: 40px; border-radius: 12px; }
.sidebar-brand strong { display: block; color: #fff; font-size: 14px; }
.sidebar-brand span { display: block; margin-top: 4px; color: #91a8cb; font-size: 11px; }
.side-nav { display: grid; gap: 6px; margin-top: 40px; }
.nav-item { min-height: 44px; display: flex; align-items: center; gap: 11px; padding: 0 13px; border: 0; border-radius: 10px; color: #a9bbd9; background: transparent; text-decoration: none; font-size: 13px; font-weight: 750; text-align: left; }
.nav-item:hover, .nav-item.is-active { color: #fff; background: rgba(255,255,255,.1); }
.nav-glyph, .search-icon { width: 17px; height: 17px; display: inline-block; position: relative; opacity: .9; }
.glyph-grid::before { content: ""; position: absolute; inset: 1px; border: 1.5px solid currentColor; border-radius: 3px; box-shadow: inset 6px 0 0 -4.5px currentColor, inset -6px 0 0 -4.5px currentColor; }
.glyph-pulse::before { content: ""; position: absolute; left: 1px; right: 1px; top: 8px; height: 1.5px; background: currentColor; transform: rotate(-23deg); box-shadow: 4px -4px 0 -0.3px currentColor, 8px 3px 0 -0.3px currentColor; }
.glyph-github::before { content: "GH"; position: absolute; inset: -2px 0 0; color: currentColor; font-size: 9px; font-weight: 900; letter-spacing: -.08em; text-align: center; }
.glyph-clock::before { content: ""; position: absolute; inset: 1px; border: 1.5px solid currentColor; border-radius: 50%; }
.glyph-clock::after { content: ""; position: absolute; width: 1.5px; height: 5px; left: 8px; top: 3px; background: currentColor; transform-origin: bottom center; box-shadow: 3px 4px 0 -0.2px currentColor; }
.sidebar-foot { margin-top: auto; padding: 13px; color: #8197bc; font-size: 11px; }
.status-dot { width: 7px; height: 7px; display: inline-block; margin-right: 6px; border-radius: 50%; background: #42d7ae; box-shadow: 0 0 0 4px rgba(66,215,174,.12); }
.main-area { min-width: 0; flex: 1; padding: 32px clamp(20px, 4vw, 56px) 60px; }
.topbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 28px; }
.topbar h1 { margin: 0; color: var(--ink); font-size: clamp(26px, 3vw, 34px); letter-spacing: -.045em; }
.topbar-actions { display: flex; align-items: center; gap: 14px; }
.admin-name { color: var(--muted); font-size: 12px; }
.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat-card { min-height: 132px; display: grid; align-content: center; gap: 5px; padding: 22px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.stat-card strong { color: var(--navy); font-size: 32px; letter-spacing: -.05em; }
.stat-label { color: #556981; font-size: 12px; font-weight: 800; }
.stat-meta { color: #91a0b3; font-size: 11px; }
.stat-card-teal { border-top: 3px solid var(--teal); }
.stat-card-orange { border-top: 3px solid var(--orange); }
.content-card { overflow: hidden; border: 1px solid #e8eef5; border-radius: 18px; background: #fff; box-shadow: var(--shadow); }
.view-panel { min-width: 0; }
.standalone-head { padding: 0 0 22px; }
.standalone-head h2 { margin-bottom: 6px; font-size: 24px; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 24px 26px 18px; }
.section-head h2 { margin: 0 0 6px; font-size: 18px; letter-spacing: -.03em; }
.section-head p { margin: 0; color: var(--muted); font-size: 12px; }
.plus { margin-right: 6px; font-size: 18px; line-height: 0; vertical-align: -1px; }
.filter-bar { display: flex; gap: 10px; padding: 0 26px 18px; }
.search-field { flex: 1; display: flex; align-items: center; position: relative; }
.search-field input { padding-left: 38px; background: #f8fafc; }
.search-icon { position: absolute; left: 13px; z-index: 1; color: #8b9bb0; pointer-events: none; }
.search-icon::before { content: ""; position: absolute; width: 9px; height: 9px; top: 1px; left: 1px; border: 1.5px solid currentColor; border-radius: 50%; }
.search-icon::after { content: ""; position: absolute; width: 6px; height: 1.5px; top: 11px; left: 10px; background: currentColor; transform: rotate(45deg); border-radius: 2px; }
.filter-bar select { width: 140px; background: #f8fafc; }
.table-wrap { overflow-x: auto; }
table { width: 100%; min-width: 940px; border-collapse: collapse; }
th, td { padding: 15px 26px; border-top: 1px solid #edf1f6; text-align: left; vertical-align: middle; }
th { color: #8190a2; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
td { color: #445975; font-size: 12px; }
.resource-cell { display: flex; align-items: center; gap: 11px; min-width: 230px; }
.resource-thumb { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 10px; object-fit: cover; background: #edf5ff; }
.resource-cell strong { display: block; color: var(--ink); font-size: 13px; }
.resource-cell small { display: block; max-width: 280px; overflow: hidden; margin-top: 3px; color: #95a2b3; text-overflow: ellipsis; white-space: nowrap; }
.tag-count { color: #758aa2; }
.mount-cell { display: flex; align-items: center; gap: 8px; min-width: 230px; }
.mount-cell code { max-width: 220px; overflow: hidden; padding: 5px 7px; border-radius: 6px; color: #6f66bd; background: #f4f2ff; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 20px; font-size: 11px; font-weight: 800; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-published { color: var(--teal); background: var(--teal-soft); }
.status-draft { color: #9b6a2d; background: #fff5df; }
.row-actions { display: flex; justify-content: flex-end; gap: 7px; }
.row-action { min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; color: #57708a; background: #fff; font-size: 11px; font-weight: 800; }
.row-action:hover { border-color: #9eb3c8; background: #f8fafc; }
.row-action.danger:hover { color: var(--danger); border-color: #eebcb9; background: #fff7f6; }
.align-right { text-align: right; }
.empty-state { padding: 55px 20px; text-align: center; }
.empty-mark { color: #b8c4d3; font-size: 40px; }
.empty-state h3 { margin: 10px 0 5px; font-size: 15px; }
.empty-state p { margin: 0; color: var(--muted); font-size: 12px; }
.modal-backdrop { position: fixed; z-index: 50; inset: 0; display: grid; place-items: center; padding: 18px; background: rgba(3,16,38,.56); }
.modal-card { width: min(100%, 690px); max-height: min(92vh, 860px); overflow-y: auto; border-radius: 20px; background: #fff; box-shadow: 0 32px 90px rgba(2,12,32,.28); }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 24px 26px 18px; border-bottom: 1px solid #edf1f6; }
.modal-head h2 { margin: 0; font-size: 21px; letter-spacing: -.04em; }
.icon-button { width: 44px; height: 44px; border: 0; border-radius: 9px; color: #64778f; background: #f3f6fa; font-size: 23px; line-height: 1; }
.icon-button:hover { background: #eaf0f6; }
.editor-form { padding: 22px 26px 26px; }
.form-grid { display: grid; gap: 14px; }
.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field-with-action { position: relative; }
.field-with-action .button { position: absolute; right: 0; top: 0; }
.button-soft { color: #0f766e; border-color: #bce9df; background: #ecfbf7; box-shadow: none; }
.button-soft:hover { border-color: #8ad9ca; background: #ddf7f1; }
.field-note { margin: 7px 0 0; color: #8493a6; font-size: 11px; line-height: 1.5; font-weight: 500; }
.select-custom { margin-top: 8px; }
select[multiple] { height: 92px; padding: 7px 10px; line-height: 1.8; }
select[multiple] option { padding: 3px 2px; border-radius: 4px; }
.service-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.service-card { min-height: 150px; display: flex; align-items: flex-start; gap: 13px; padding: 22px; border: 1px solid #e8eef5; border-radius: 16px; background: #fff; box-shadow: var(--shadow); }
.service-card strong { display: block; margin-top: 5px; color: var(--navy); font-size: 20px; letter-spacing: -.03em; }
.service-card p { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.service-card-ok { border-top: 3px solid var(--teal); }
.service-card-error { border-top-color: var(--danger); }
.service-icon { width: 36px; height: 36px; position: relative; flex: 0 0 36px; display: inline-block; border-radius: 11px; color: var(--teal); background: var(--teal-soft); }
.service-note { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding: 14px 16px; border: 1px solid #e8eef5; border-radius: 13px; color: var(--muted); background: #fbfdff; }
.service-note strong { display: block; color: var(--ink); font-size: 12px; }
.service-note code { display: inline-block; margin-top: 4px; font-size: 11px; }
.github-toolbar { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.github-toolbar .search-field { max-width: 620px; }
.github-meta { color: #8493a6; font-size: 11px; white-space: nowrap; }
.github-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.github-card { min-width: 0; display: flex; flex-direction: column; gap: 14px; padding: 19px; border: 1px solid #e2eaf2; border-radius: 16px; background: #fff; box-shadow: var(--shadow); }
.github-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.github-card-title { min-width: 0; }
.github-card-title strong { display: block; overflow: hidden; color: var(--ink); font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.github-card-title span { display: block; margin-top: 4px; color: #8292a5; font-size: 11px; }
.github-stats { display: flex; flex: 0 0 auto; gap: 8px; color: #5b7088; font-size: 10px; }
.github-stats span { padding: 4px 7px; border-radius: 7px; background: #f1f6fa; }
.github-description { min-height: 42px; margin: 0; color: #5f7188; font-size: 12px; line-height: 1.55; }
.ai-hint { margin: 6px 0 0; color: #6E66C6; font-size: 11px; }
.github-ai-note { display: flex; align-items: center; gap: 7px; min-height: 27px; padding: 6px 8px; border: 1px solid rgba(116,106,204,.14); border-radius: 9px; color: #6d7290; background: linear-gradient(135deg, rgba(247,245,255,.8), rgba(239,252,249,.72)); font-size: 10px; }
.github-ai-mark { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 18px; border-radius: 6px; color: #fff; background: linear-gradient(135deg, #8B80E3, #6E67CC); font-size: 9px; font-weight: 900; letter-spacing: .03em; }
.github-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.github-tag { padding: 4px 7px; border-radius: 6px; color: #33746e; background: #eaf8f5; font-size: 10px; }
.github-release { padding: 11px 12px; border: 1px solid #e2eaf2; border-radius: 11px; background: #f9fbfd; }
.github-release-title { display: flex; justify-content: space-between; gap: 10px; color: #405670; font-size: 11px; font-weight: 800; }
.github-release-title a { color: #0d9488; text-decoration: none; }
.github-asset { margin-top: 9px; }
.github-asset select, .github-category { height: 38px; font-size: 11px; }
.github-actions { display: flex; align-items: center; gap: 9px; margin-top: auto; }
.github-actions .button { flex: 1; }
.github-actions a { min-height: 44px; display: inline-flex; align-items: center; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; color: #57708a; font-size: 11px; font-weight: 800; text-decoration: none; }
.github-empty { grid-column: 1 / -1; padding: 55px 20px; border: 1px dashed #d8e2ec; border-radius: 16px; text-align: center; background: rgba(255,255,255,.55); }
.github-empty h3 { margin: 10px 0 5px; color: var(--ink); font-size: 15px; }
.github-empty p { margin: 0; color: var(--muted); font-size: 12px; }
.inline-error { margin-bottom: 16px; padding: 12px 14px; border: 1px solid #f2c7c4; border-radius: 10px; color: var(--danger); background: #fff7f6; font-size: 12px; }
.link-config { padding: 16px; border: 1px solid #e1eee9; border-radius: 12px; background: #f7fcfb; }
.subsection-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.subsection-head h3 { margin: 0; font-size: 13px; }
.subsection-head span { color: #7e998f; font-size: 10px; }
.switch-row { display: flex; grid-template-columns: auto 1fr; align-items: center; gap: 10px; cursor: pointer; }
.switch-row input { position: absolute; opacity: 0; pointer-events: none; }
.fake-switch { width: 38px; height: 22px; position: relative; flex: 0 0 auto; border-radius: 20px; background: #cbd5e1; transition: background .18s ease; }
.fake-switch::after { content: ""; width: 16px; height: 16px; position: absolute; top: 3px; left: 3px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.15); transition: transform .18s ease; }
.switch-row input:checked + .fake-switch { background: var(--teal); }
.switch-row input:checked + .fake-switch::after { transform: translateX(16px); }
.switch-row small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; font-weight: 500; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; padding-top: 6px; }
.toast { position: fixed; z-index: 70; top: 20px; left: 50%; max-width: calc(100% - 30px); padding: 11px 16px; border-radius: 10px; color: #fff; background: var(--navy); box-shadow: 0 15px 35px rgba(2,12,32,.2); font-size: 12px; opacity: 0; pointer-events: none; transform: translate(-50%, -10px); transition: opacity .2s ease, transform .2s ease; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast.is-error { background: var(--danger); }
@media (max-width: 760px) {
  .sidebar { width: 66px; flex-basis: 66px; padding: 20px 10px; align-items: center; }
  .sidebar-brand div, .side-nav .nav-item:not(.is-active)::after, .nav-item { font-size: 0; }
  .sidebar-brand img { width: 42px; height: 42px; }
  .side-nav { width: 100%; }
  .nav-item { justify-content: center; padding: 0; }
  .nav-glyph { width: 18px; height: 18px; }
  .sidebar-foot { padding: 10px 0; font-size: 0; }
  .main-area { padding: 23px 14px 40px; }
  .topbar { align-items: center; margin-bottom: 20px; }
  .topbar-actions { gap: 8px; }
  .admin-name { display: none; }
  .stats-grid { gap: 9px; }
  .stat-card { min-height: 104px; padding: 14px; }
  .stat-card strong { font-size: 24px; }
  .stat-meta { font-size: 9px; }
  .section-head, .filter-bar { padding-left: 15px; padding-right: 15px; }
  .section-head { align-items: flex-start; }
  .section-head p { line-height: 1.45; }
  .filter-bar { flex-direction: column; }
  .filter-bar select { width: 100%; }
  .service-grid, .github-grid { grid-template-columns: 1fr; }
  .github-toolbar { align-items: stretch; flex-direction: column; gap: 9px; }
  .github-toolbar .search-field { max-width: none; }
  .github-meta { white-space: normal; }
  th, td { padding-left: 15px; padding-right: 15px; }
  .auth-card { padding: 28px 22px; }
  .two-col { grid-template-columns: 1fr; }
  .modal-head, .editor-form { padding-left: 18px; padding-right: 18px; }
  .field-with-action .button { position: static; margin-top: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
