:root { color-scheme: light; font-family: Inter, "Microsoft YaHei", "PingFang SC", system-ui, sans-serif; --ink: #17233c; --muted: #64748b; --line: #dce4ef; --brand: #1b63d9; --brand-deep: #124ba9; --soft: #f3f7fd; --danger: #c23b45; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: #eef3f9; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.topbar { color: white; background: linear-gradient(120deg, #122647, #1b63d9); box-shadow: 0 8px 30px #16345a24; }
.topbar-inner { width: min(1180px, calc(100% - 40px)); min-height: 78px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 13px; }
.brand-mark { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: #ffffff1e; border: 1px solid #ffffff30; font-weight: 800; letter-spacing: -2px; }
.brand strong { display: block; font-size: 19px; }
.brand span { display: block; margin-top: 3px; font-size: 12px; opacity: .72; }
.topbar a, .topbar button { color: white; text-decoration: none; background: #ffffff18; border: 1px solid #ffffff2d; border-radius: 9px; padding: 9px 14px; }
.hero { background: white; border-bottom: 1px solid var(--line); }
.hero-inner { width: min(1180px, calc(100% - 40px)); margin: auto; padding: 48px 0 40px; display: grid; grid-template-columns: 1.5fr .8fr; gap: 60px; align-items: center; }
.eyebrow { color: var(--brand); font-size: 12px; font-weight: 800; letter-spacing: .18em; }
h1 { margin: 12px 0; font-size: clamp(31px, 4vw, 48px); line-height: 1.13; letter-spacing: -.04em; }
.hero p { margin: 0; max-width: 650px; color: var(--muted); font-size: 16px; line-height: 1.8; }
.hero-stat { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hero-stat div { min-height: 92px; padding: 17px; border-radius: 14px; background: var(--soft); border: 1px solid #e5edf8; }
.hero-stat strong { display: block; font-size: 26px; color: var(--brand-deep); }
.hero-stat span { color: var(--muted); font-size: 12px; }
.page { width: min(1180px, calc(100% - 40px)); margin: 28px auto 60px; }
.toolbar { display: grid; grid-template-columns: minmax(230px, 1fr) 160px 160px auto; gap: 10px; padding: 15px; background: white; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 7px 25px #2343690b; }
.toolbar input, .toolbar select, .form-grid input, .form-grid select, .form-grid textarea, .login-card input { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; outline: none; background: white; color: var(--ink); }
input:focus, select:focus, textarea:focus { border-color: #7aabef; box-shadow: 0 0 0 3px #2c77df17; }
.button, button.primary { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 8px 15px; border-radius: 8px; border: 1px solid var(--line); color: var(--ink); background: white; text-decoration: none; font-weight: 650; }
.button.primary, button.primary { color: white; background: var(--brand); border-color: var(--brand); }
.button.primary:hover, button.primary:hover { background: var(--brand-deep); }
.resource-summary { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin: 26px 2px 14px; color: var(--muted); font-size: 13px; }
.resource-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.resource-card { min-height: 248px; display: flex; flex-direction: column; padding: 20px; background: white; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 8px 26px #2343690a; transition: .16s ease; }
.resource-card:hover { transform: translateY(-2px); box-shadow: 0 14px 34px #23436916; border-color: #b9cbe2; }
.resource-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.kind { display: inline-flex; padding: 5px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; color: #1858b5; background: #eaf2ff; }
.kind.attachment { color: #9f3d26; background: #fff0e8; }
.version { color: var(--muted); font: 12px ui-monospace, monospace; }
.resource-card h2 { margin: 17px 0 8px; font-size: 17px; line-height: 1.45; }
.resource-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.meta { display: flex; flex-wrap: wrap; gap: 7px; margin: 15px 0; }
.meta span { padding: 4px 7px; font-size: 11px; color: #526174; background: #f5f7fa; border-radius: 5px; }
.resource-card footer { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 10px; color: var(--muted); font-size: 11px; }
.empty { grid-column: 1 / -1; padding: 70px 20px; text-align: center; background: white; border: 1px dashed #bdc9d9; border-radius: 14px; color: var(--muted); }
.notice { margin-top: 16px; padding: 12px 14px; border-radius: 8px; color: #15633d; background: #eaf8f1; font-size: 13px; }
.notice.error { color: #9e2933; background: #fff0f1; }
.hidden { display: none !important; }
.login-shell { min-height: calc(100vh - 78px); display: grid; place-items: center; padding: 30px; }
.login-card { width: min(430px, 100%); padding: 34px; background: white; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 22px 60px #152a4820; }
.login-card h1 { margin: 0 0 8px; font-size: 27px; }
.login-card p { margin: 0 0 24px; color: var(--muted); font-size: 13px; }
.login-card label { display: block; margin: 13px 0; color: #475569; font-size: 12px; font-weight: 700; }
.login-card label span { display: block; margin-bottom: 7px; }
.login-card button { width: 100%; margin-top: 9px; }
.admin-page { width: min(1240px, calc(100% - 40px)); margin: 24px auto 60px; }
.admin-overview { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 18px; }
.admin-overview div { padding: 17px; background: white; border: 1px solid var(--line); border-radius: 12px; }
.admin-overview strong { display: block; font-size: 24px; color: var(--brand); }
.admin-overview span { color: var(--muted); font-size: 12px; }
.admin-layout { display: grid; grid-template-columns: 350px 1fr; gap: 16px; align-items: start; }
.update-publish-panel { margin-bottom: 16px; }
.update-publish-panel > header > div small { display: block; margin-top: 5px; color: var(--muted); }
.update-publish-panel > header a { color: var(--brand); font-size: 12px; text-decoration: none; }
.update-form-grid { grid-template-columns: 180px minmax(240px, 1fr) minmax(280px, 1.4fr); }
.update-form-grid label.wide { grid-column: auto; }
.panel { background: white; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; }
.panel > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.panel > header h2 { margin: 0; font-size: 16px; }
.panel-body { padding: 18px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid label { color: #475569; font-size: 12px; font-weight: 700; }
.form-grid label span { display: block; margin-bottom: 6px; }
.form-grid .wide { grid-column: 1 / -1; }
.form-grid textarea { resize: vertical; }
.form-grid input[type="checkbox"] { width: auto; min-height: auto; margin: 0 7px 0 0; padding: 0; accent-color: var(--brand); box-shadow: none; vertical-align: middle; }
.file-drop { padding: 18px; text-align: center; border: 1px dashed #aabbd1; border-radius: 9px; background: #f8fafd; }
.file-drop input { min-height: auto; border: 0; padding: 0; box-shadow: none; }
.form-actions { display: flex; justify-content: flex-end; margin-top: 15px; }
.admin-table-wrap { overflow: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th { padding: 11px 12px; color: var(--muted); text-align: left; white-space: nowrap; background: #f8fafc; border-bottom: 1px solid var(--line); }
.admin-table td { padding: 12px; border-bottom: 1px solid #edf1f6; vertical-align: middle; }
.admin-table td:first-child strong { display: block; max-width: 260px; }
.admin-table td:first-child small { color: var(--muted); }
.status { display: inline-flex; padding: 4px 8px; border-radius: 999px; color: #18724a; background: #e8f7f0; font-size: 11px; font-weight: 800; }
.status.off { color: #8a5360; background: #f4eef0; }
.row-actions { display: flex; gap: 6px; }
.row-actions button { padding: 6px 9px; border: 1px solid var(--line); border-radius: 6px; background: white; color: #34435a; }
.row-actions button.danger { color: var(--danger); }
.admin-filter { width: min(260px, 45vw); min-height: 35px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 7px; }
.modal { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; padding: 24px; background: #12233b85; }
.modal-card { width: min(540px, 100%); max-height: calc(100vh - 48px); overflow: auto; padding: 24px; background: white; border-radius: 14px; box-shadow: 0 22px 70px #0d1b2e55; }
.modal-card h2 { margin: 0 0 18px; font-size: 19px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
@media (max-width: 900px) { .hero-inner { grid-template-columns: 1fr; gap: 28px; } .resource-grid { grid-template-columns: repeat(2, 1fr); } .admin-layout { grid-template-columns: 1fr; } .admin-overview { grid-template-columns: 1fr 1fr; } .update-form-grid { grid-template-columns: 1fr 1fr; } .update-form-grid label.wide { grid-column: 1 / -1; } }
@media (max-width: 620px) { .topbar-inner, .page, .hero-inner, .admin-page { width: min(100% - 24px, 1180px); } .toolbar { grid-template-columns: 1fr 1fr; } .toolbar input { grid-column: 1 / -1; } .resource-grid { grid-template-columns: 1fr; } .hero-stat { grid-template-columns: 1fr 1fr; } .form-grid { grid-template-columns: 1fr; } .form-grid .wide { grid-column: auto; } }
