:root {
  --ink: #28231e;
  --muted: #756b61;
  --line: #e5ded5;
  --paper: #fffdf9;
  --cream: #f6f1ea;
  --cream-dark: #ece3d8;
  --forest: #355644;
  --forest-dark: #233e30;
  --gold: #b77c38;
  --red: #ad5d52;
  --shadow: 0 18px 46px rgba(63, 45, 24, .08);
}
* { box-sizing: border-box; }
html { color: var(--ink); background: var(--cream); font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif; }
body { margin: 0; min-width: 320px; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.app-shell { display: flex; min-height: 100vh; }
.sidebar { display: flex; flex: 0 0 236px; flex-direction: column; min-height: 100vh; padding: 26px 18px 18px; color: #f7f0e6; background: var(--forest-dark); }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 10px 42px; color: #fffaf3; font-weight: 700; letter-spacing: .04em; }
.brand-mark { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 9px; color: var(--forest-dark); background: #edc27f; font-family: Georgia, serif; font-size: 18px; }
.primary-nav { display: grid; gap: 6px; }
.primary-nav a { display: flex; align-items: center; gap: 11px; padding: 12px 13px; border-radius: 10px; color: #b9c7bd; font-size: 14px; transition: .2s ease; }
.primary-nav a:hover, .primary-nav a.active { color: #fff; background: rgba(255,255,255,.1); }
.nav-icon { display: inline-grid; width: 18px; place-items: center; color: #edc27f; font-size: 13px; }
.sidebar-footer { display: flex; align-items: center; gap: 8px; margin-top: auto; padding: 12px 13px; color: #9fb3a4; font-size: 12px; }
.connection-dot { width: 7px; height: 7px; border-radius: 50%; background: #d59b51; }
.connection-dot.online { background: #72c18e; }
.connection-dot.offline { background: #c66d63; }
.main-content { flex: 1; min-width: 0; padding: 34px clamp(22px, 4vw, 64px) 60px; }
.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 40px; }
.topbar h1, h2, h3, p { margin: 0; }
.topbar h1 { font-family: Georgia, "Songti SC", serif; font-size: clamp(25px, 3vw, 34px); font-weight: 700; }
.eyebrow { margin-bottom: 8px; color: var(--gold); font-size: 10px; font-weight: 700; letter-spacing: .19em; text-transform: uppercase; }
.topbar-actions { display: flex; align-items: center; gap: 14px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 0 15px; border: 1px solid transparent; border-radius: 8px; font-size: 13px; font-weight: 600; }
.button-primary { color: #fff; background: var(--forest); }
.button-primary:hover { background: #2a4938; }
.button-ghost { color: var(--ink); border-color: var(--line); background: var(--paper); }
.button-ghost:hover { background: #f4ece3; }
.user-chip { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.avatar { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; color: #684b26; background: #e9c98f; font-family: Georgia, serif; }
.view { animation: fade-in .25s ease; }
@keyframes fade-in { from { opacity: .3; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.section-heading-row { align-items: center; }
.section-heading h2 { font-family: Georgia, "Songti SC", serif; font-size: 25px; }
.last-updated { color: var(--muted); font-size: 12px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 24px; }
.metric-card { min-height: 132px; padding: 20px; border: 1px solid var(--line); border-radius: 13px; background: var(--paper); box-shadow: var(--shadow); }
.metric-label { color: var(--muted); font-size: 12px; }
.metric-value { margin: 12px 0 8px; color: var(--forest-dark); font-family: Georgia, serif; font-size: 30px; font-weight: 700; }
.metric-note { color: var(--muted); font-size: 11px; }
.skeleton-card { position: relative; overflow: hidden; background: #f9f4ed; }
.skeleton-card::after { position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.7), transparent); animation: shimmer 1.25s infinite; content: ""; }
@keyframes shimmer { to { transform: translateX(100%); } }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 18px; }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: 13px; background: var(--paper); box-shadow: var(--shadow); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 22px 15px; }
.panel-heading h3 { font-family: Georgia, "Songti SC", serif; font-size: 18px; }
.text-link { color: var(--forest); font-size: 12px; font-weight: 600; }
.status-list, .activity-list { padding: 0 22px 18px; }
.status-row, .activity-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 0; border-top: 1px solid var(--line); font-size: 13px; }
.status-row:first-child, .activity-row:first-child { border-top: 0; }
.status-page { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-page strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.status-page span, .activity-row time { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.badge { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 999px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.badge-published { color: #286040; background: #e1f0e4; }
.badge-draft, .badge-processing { color: #8a622d; background: #f7ead2; }
.badge-offline, .badge-failed { color: #8c4039; background: #f8e4e0; }
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.search-field { display: flex; align-items: center; flex: 1; max-width: 360px; height: 40px; gap: 8px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--muted); }
.search-field input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 13px; }
.toolbar select { height: 40px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: var(--paper); font-size: 13px; }
.status-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: -3px 0 16px; }
.status-filter { display: flex; align-items: center; gap: 9px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: var(--paper); font-size: 11px; }
.status-filter strong { color: var(--ink); font-size: 12px; }
.status-filter.active { border-color: var(--forest); color: var(--forest); background: #edf4ed; }
.table-panel { overflow: hidden; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { padding: 15px 22px; border-bottom: 1px solid var(--line); text-align: left; font-size: 12px; vertical-align: middle; }
th { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbf7f1; }
.page-cell strong { display: block; font-size: 13px; }
.page-cell span { display: block; margin-top: 5px; color: var(--muted); font: 11px ui-monospace, SFMono-Regular, Menlo, monospace; }
.table-action { color: var(--forest); font-size: 12px; font-weight: 700; }
.pagination { display: flex; justify-content: flex-end; gap: 6px; padding: 13px 18px; border-top: 1px solid var(--line); }
.pagination button { min-width: 29px; height: 29px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); background: var(--paper); font-size: 11px; }
.pagination button.active { color: #fff; border-color: var(--forest); background: var(--forest); }
.empty-state { padding: 30px 20px; color: var(--muted); text-align: center; }
.range-switcher { display: flex; padding: 3px; border-radius: 8px; background: var(--cream-dark); }
.range-switcher button { padding: 7px 11px; border: 0; border-radius: 6px; color: var(--muted); background: transparent; font-size: 11px; }
.range-switcher button.active { color: var(--ink); background: var(--paper); box-shadow: 0 2px 5px rgba(0,0,0,.08); }
.chart-panel { margin-bottom: 18px; }
.chart-legend { color: var(--muted); font-size: 11px; }
.chart-legend i { display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 50%; background: var(--gold); }
.chart { display: flex; align-items: flex-end; height: 230px; gap: 9px; padding: 18px 22px 24px; border-top: 1px solid var(--line); }
.chart-bar { display: flex; flex: 1; height: 100%; flex-direction: column; justify-content: flex-end; gap: 7px; min-width: 18px; }
.chart-bar i { display: block; min-height: 2px; border-radius: 4px 4px 2px 2px; background: linear-gradient(180deg, #d49a52, #b77c38); }
.chart-bar span { color: var(--muted); font-size: 9px; text-align: center; }
.flash { margin: -20px 0 20px; padding: 10px 13px; border: 1px solid #d8b97c; border-radius: 8px; color: #74531e; background: #fff6df; font-size: 12px; }
.drawer, .modal { width: min(620px, calc(100% - 28px)); max-height: calc(100vh - 28px); padding: 0; border: 1px solid var(--line); border-radius: 15px; color: var(--ink); background: var(--paper); box-shadow: 0 24px 80px rgba(34, 26, 18, .24); }
.drawer::backdrop, .modal::backdrop { background: rgba(25, 35, 28, .35); backdrop-filter: blur(3px); }
.drawer-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px; border-bottom: 1px solid var(--line); }
.drawer-header h2 { font-family: Georgia, serif; font-size: 23px; }
.icon-button { width: 30px; height: 30px; border: 0; border-radius: 50%; color: var(--muted); background: var(--cream); font-size: 20px; line-height: 1; }
.drawer-body { max-height: calc(100vh - 115px); overflow: auto; padding: 22px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 24px; }
.detail-item { padding: 13px; border: 1px solid var(--line); border-radius: 9px; background: #fbf7f1; }
.detail-item span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 10px; }
.detail-item strong { font-size: 14px; }
.drawer-section { margin-top: 22px; }
.drawer-section h3 { margin-bottom: 12px; font-family: Georgia, serif; font-size: 17px; }
.section-inline-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-inline-heading h3 { margin-bottom: 0; }
.muted-note { color: var(--muted); font-size: 10px; }
.count-pill { display: inline-grid; min-width: 22px; height: 20px; padding: 0 6px; place-items: center; border-radius: 999px; color: var(--forest); background: #e6f0e6; font: 11px Inter, sans-serif; vertical-align: 2px; }
.button-small { min-height: 30px; padding: 0 10px; font-size: 11px; }
.editor-form { display: grid; gap: 12px; padding: 15px; border: 1px solid var(--line); border-radius: 10px; background: #fbf7f1; }
.editor-form.compact { margin-top: 13px; }
.editor-form label { display: grid; gap: 6px; color: var(--muted); font-size: 11px; }
.editor-form input, .editor-form textarea { width: 100%; padding: 9px 10px; border: 1px solid #d9cfc4; border-radius: 7px; outline: 0; color: var(--ink); background: var(--paper); font-size: 12px; }
.editor-form textarea { resize: vertical; line-height: 1.55; }
.editor-form input:focus, .editor-form textarea:focus { border-color: var(--forest); box-shadow: 0 0 0 3px rgba(53,86,68,.1); }
.form-row-end { display: flex; justify-content: flex-end; gap: 8px; }
.checkbox-label { display: flex !important; grid-template-columns: auto 1fr; align-items: center; display: flex !important; flex-direction: row; gap: 8px !important; }
.checkbox-label input { width: auto; }
.entry-row, .build-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 12px; }
.entry-row:first-child, .build-row:first-child { border-top: 0; }
.entry-meta, .build-meta { min-width: 0; }
.entry-meta strong, .build-meta strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entry-meta span, .build-meta span { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.entry-meta small { display: block; max-width: 370px; margin-top: 5px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.entry-actions { display: flex; align-items: center; gap: 10px; }
.entry-row-editable { align-items: flex-start; }
.file-editor { display: grid; grid-template-columns: minmax(150px, .8fr) minmax(0, 1.7fr); min-height: 310px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #fbf7f1; }
.file-list { max-height: 360px; overflow: auto; border-right: 1px solid var(--line); }
.file-item { display: flex; width: 100%; flex-direction: column; gap: 4px; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--line); color: var(--ink); background: transparent; text-align: left; }
.file-item:hover { background: #f0e9df; }
.file-item span { overflow: hidden; font: 11px ui-monospace, SFMono-Regular, Menlo, monospace; text-overflow: ellipsis; white-space: nowrap; }
.file-item small { color: var(--muted); font-size: 9px; }
.file-item.binary { color: var(--muted); }
.file-workspace { display: flex; min-width: 0; flex-direction: column; }
.file-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 11px; border-bottom: 1px solid var(--line); }
.file-toolbar code { min-width: 0; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.file-workspace textarea { flex: 1; min-height: 260px; padding: 12px; border: 0; outline: 0; resize: vertical; color: #33433a; background: #fffefa; font: 11px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; }
.mini-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.mini-metrics span { display: grid; gap: 4px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: #fbf7f1; font-size: 10px; }
.mini-metrics strong { color: var(--forest-dark); font: 700 18px Georgia, serif; }
.detail-events { max-height: 250px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.detail-events table { min-width: 500px; }
.detail-events th, .detail-events td { padding: 9px 11px; font-size: 10px; }
.detail-events code { color: var(--forest); font-size: 10px; }
.activity-row small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.drawer-actions { display: flex; gap: 8px; margin-bottom: 22px; }
.modal-card { padding: 0; }
.modal-card > label { display: block; padding: 22px 22px 0; font-size: 12px; font-weight: 600; }
.modal-card input[type="file"] { display: block; width: 100%; margin-top: 8px; padding: 10px; border: 1px dashed #c4b7a7; border-radius: 8px; background: #fbf7f1; font-size: 12px; }
.form-help { padding: 0 22px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 20px 22px; }
@media (max-width: 900px) { .sidebar { flex-basis: 190px; } .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .overview-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .app-shell { display: block; } .sidebar { position: sticky; top: 0; z-index: 5; display: flex; min-height: auto; flex-direction: row; align-items: center; padding: 10px 13px; } .brand { padding: 0; } .brand > span:last-child { display: none; } .primary-nav { display: flex; flex: 1; justify-content: flex-end; gap: 2px; } .primary-nav a { padding: 9px 10px; font-size: 11px; } .primary-nav a .nav-icon { display: none; } .sidebar-footer { display: none; } .main-content { padding: 24px 14px 46px; } .topbar { margin-bottom: 28px; } .topbar-actions .button { display: none; } .topbar h1 { font-size: 26px; } .metric-grid { gap: 9px; } .metric-card { min-height: 112px; padding: 14px; } .metric-value { margin: 8px 0 5px; font-size: 24px; } .section-heading h2 { font-size: 22px; } .toolbar { align-items: stretch; flex-direction: column; } .search-field { max-width: none; } .toolbar select { width: 100%; } .detail-grid { grid-template-columns: 1fr; } .file-editor { grid-template-columns: 1fr; } .file-list { max-height: 160px; border-right: 0; border-bottom: 1px solid var(--line); } .mini-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } .entry-row { flex-direction: column; } .entry-actions { width: 100%; justify-content: flex-end; } }
