:root {
  --ink: #17251f;
  --muted: #617067;
  --line: #dce5df;
  --paper: #fbfdfb;
  --canvas: #f1f5f1;
  --mint: #d9f3e5;
  --mint-deep: #216c50;
  --sand: #fff4da;
  --blue: #e2efff;
  --danger: #a33e3e;
  --shadow: 0 18px 50px rgba(31, 59, 43, .10);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
* { box-sizing: border-box; }
body { min-width: 320px; min-height: 100vh; margin: 0; background: var(--canvas); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
input, select, textarea { width: 100%; color: var(--ink); background: #fff; border: 1px solid #cdd9d0; border-radius: 10px; padding: 11px 12px; outline: none; transition: border-color .18s ease, box-shadow .18s ease; }
input:focus, select:focus, textarea:focus { border-color: var(--mint-deep); box-shadow: 0 0 0 3px rgba(33,108,80,.14); }
textarea { min-height: 130px; resize: vertical; line-height: 1.5; }
label { display: grid; gap: 7px; color: #3a4a40; font-size: .88rem; font-weight: 650; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); letter-spacing: -.052em; line-height: 1.03; }
h2 { font-size: 1.45rem; letter-spacing: -.032em; }
h3 { font-size: 1rem; margin-bottom: 6px; }
.topbar { height: 73px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 max(24px, calc((100vw - 1180px) / 2)); border-bottom: 1px solid var(--line); background: rgba(251,253,251,.90); backdrop-filter: blur(14px); position: sticky; top: 0; z-index: 10; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-size: 1.05rem; font-weight: 780; letter-spacing: -.035em; }
.brand-mark { display: inline-grid; place-items: center; width: 27px; height: 27px; color: #fff; border-radius: 9px 9px 9px 3px; background: var(--ink); font-size: .78rem; font-weight: 800; }
.topnav { display: flex; align-items: center; gap: 17px; color: #435449; font-size: .88rem; }
.topnav a { padding: 8px 2px; border-bottom: 1px solid transparent; transition: color .16s ease, border-color .16s ease; }
.topnav a:hover { color: var(--mint-deep); border-color: var(--mint-deep); }
.page-shell { max-width: 1180px; margin: 0 auto; padding: 54px 24px 80px; animation: arrive .38s ease both; }
.admin-shell { max-width: 1260px; }
.flash { max-width: 1132px; margin: 16px auto -23px; padding: 12px 15px; border-radius: 11px; font-size: .92rem; position: relative; z-index: 2; }
.flash.success { background: var(--mint); color: #19543f; }
.flash.error { background: #fde8e6; color: #873333; }
.eyebrow { margin-bottom: 12px; color: var(--mint-deep); font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.muted, .subtle { color: var(--muted); }
.subtle { font-size: .91rem; line-height: 1.55; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 10px 15px; border: 1px solid transparent; border-radius: 10px; font-size: .9rem; font-weight: 740; transition: transform .16s ease, background .16s ease, box-shadow .16s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: #fff; background: #1f6d50; box-shadow: 0 8px 20px rgba(31,109,80,.18); }
.button-primary:hover { background: #175d43; }
.button-secondary { border-color: #bfd0c4; background: #fff; color: #254334; }
.button-danger { border-color: #ecc6c4; color: #923b38; background: #fffafa; }
.button-small { min-height: 34px; padding: 7px 10px; font-size: .82rem; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.hero { display: flex; justify-content: space-between; gap: 30px; align-items: end; margin-bottom: 38px; }
.hero h1 { margin-bottom: 13px; max-width: 700px; }
.hero p:not(.eyebrow) { max-width: 650px; margin-bottom: 0; color: var(--muted); line-height: 1.62; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; flex: none; }
.asset-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.asset-card { min-height: 230px; display: flex; flex-direction: column; padding: 23px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.83); box-shadow: 0 2px 0 rgba(36,71,51,.02); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; animation: arrive .4s ease both; }
.asset-card:hover { transform: translateY(-4px); border-color: #b5d2c0; box-shadow: var(--shadow); }
.asset-card:nth-child(2n) .asset-icon { background: var(--sand); }.asset-card:nth-child(3n) .asset-icon { background: var(--blue); }
.asset-icon { width: 43px; height: 43px; display: grid; place-items: center; border-radius: 13px; background: var(--mint); color: #24664d; font-weight: 800; text-transform: uppercase; font-size: .75rem; }
.asset-card h2 { margin: 19px 0 7px; font-size: 1.2rem; }
.asset-card .asset-meta { min-height: 46px; margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.5; }
.asset-card-footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: auto; padding-top: 20px; }
.asset-status, .tag, .status { display: inline-flex; align-items: center; width: fit-content; border-radius: 999px; padding: 5px 8px; font-size: .72rem; font-weight: 720; color: #2b664f; background: #e5f5eb; }
.status.open { color: #705916; background: #fff2cb; }.status.in_progress { color: #20587a; background: #e1f3ff; }.status.resolved, .status.closed { color: #406052; background: #e6ede8; }
.detail-hero { padding: 30px; margin-bottom: 22px; border: 1px solid #d9e5dc; border-radius: 20px; background: linear-gradient(120deg, #ffffff, #eef8f1); }
.back-link { display: inline-flex; gap: 7px; margin-bottom: 17px; color: #4a6254; font-size: .88rem; font-weight: 680; }
.back-link:hover { color: var(--mint-deep); }
.detail-title-row { display: flex; justify-content: space-between; gap: 20px; align-items: end; }
.detail-title-row h1 { margin: 6px 0 11px; font-size: clamp(2rem, 4vw, 3rem); }.detail-title-row p { margin-bottom: 0; color: var(--muted); }
.details-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .8fr); gap: 20px; }
.content-stack { display: grid; gap: 20px; }.card { padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }.card h2 { margin-bottom: 18px; }.card-header { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 15px; }.card-header h2 { margin-bottom: 3px; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: -3px 0; }.field { padding: 13px 12px; border-bottom: 1px solid #e9eeea; }.field:nth-last-child(-n+2) { border-bottom: 0; }.field-label { display: block; margin-bottom: 4px; color: #718078; font-size: .72rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }.field-value { font-size: .92rem; line-height: 1.45; }
.document-list, .timeline, .case-list, .plain-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }.document-row, .case-row, .plain-row { padding: 15px 0; border-top: 1px solid #e6ece7; }.document-row:first-child, .case-row:first-child, .plain-row:first-child { border-top: 0; padding-top: 0; }.document-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 13px; align-items: center; }.document-name { font-weight: 730; }.document-note { margin: 5px 0 0; color: var(--muted); font-size: .86rem; line-height: 1.46; }.document-date { margin-top: 6px; color: #849189; font-size: .77rem; }
.timeline-item { position: relative; padding: 0 0 24px 26px; border-left: 1px solid #cfdfd4; margin-left: 7px; }.timeline-item:last-child { padding-bottom: 0; }.timeline-item::before { content: ""; width: 10px; height: 10px; position: absolute; top: 3px; left: -6px; border: 2px solid #fff; border-radius: 50%; background: #5aa37e; box-shadow: 0 0 0 1px #b5d0be; }.timeline-date { color: #6d7c72; font-size: .78rem; }.timeline-item p { margin: 6px 0 0; color: #435349; line-height: 1.5; font-size: .9rem; }
.aside-card { background: #e6f5eb; border-color: #cde8d7; }.aside-card p { margin-bottom: 11px; color: #476255; line-height: 1.5; font-size: .9rem; }.aside-card .button { margin-top: 7px; }
.empty { padding: 27px; border: 1px dashed #c6d5cb; border-radius: 14px; color: var(--muted); text-align: center; background: rgba(255,255,255,.5); }.empty p { margin: 0; }
.access-page { display: grid; place-items: center; min-height: 100vh; padding: 24px; background: radial-gradient(circle at 12% 12%, #dff6e8, transparent 28%), radial-gradient(circle at 90% 94%, #fcefd2, transparent 25%), var(--canvas); }.access-wrap { width: min(100%, 440px); }.access-brand { margin: 0 0 36px 5px; }.access-card { padding: 32px; border: 1px solid #dbe6de; border-radius: 20px; background: rgba(255,255,255,.91); box-shadow: var(--shadow); animation: arrive .5s ease both; }.access-card h1 { font-size: 2.25rem; margin: 0 0 12px; }.access-copy { margin: 0 0 26px; color: var(--muted); line-height: 1.55; }.access-form, .form-stack { display: grid; gap: 17px; }.access-meta { display: flex; justify-content: space-between; gap: 12px; align-items: center; color: var(--muted); font-size: .81rem; }.locale-select { display: flex; align-items: center; gap: 7px; color: #617067; font-size: .82rem; }.locale-select select { width: auto; padding: 6px 25px 6px 8px; border: 0; background: transparent; }.text-link { color: #276d50; font-size: .87rem; font-weight: 700; }.text-link:hover { text-decoration: underline; }.access-foot { margin: 22px 5px 0; color: #718078; font-size: .82rem; line-height: 1.5; }
.form-card { max-width: 670px; }.form-section { display: grid; gap: 15px; }.form-section + .form-section { margin-top: 29px; padding-top: 27px; border-top: 1px solid #e5ece6; }.form-section h2 { margin-bottom: 1px; }.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; }.form-grid .full { grid-column: 1 / -1; }.form-actions { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 6px; }.checkbox { display: flex; align-items: center; gap: 9px; cursor: pointer; font-weight: 600; }.checkbox input { width: 17px; height: 17px; accent-color: var(--mint-deep); }
.case-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; }.case-row h3 { margin: 0 0 5px; }.case-row p { margin: 0; color: var(--muted); font-size: .84rem; }.case-thread { display: grid; gap: 13px; }.message { max-width: 80%; padding: 15px; border-radius: 14px 14px 14px 3px; background: #edf5ef; }.message.mine { margin-left: auto; border-radius: 14px 14px 3px 14px; color: #fff; background: #317958; }.message.internal { border-left: 3px solid #e2bd63; background: #fff7df; }.message-head { display: flex; gap: 10px; justify-content: space-between; margin-bottom: 7px; font-size: .77rem; font-weight: 750; }.message p { margin: 0; white-space: pre-wrap; font-size: .91rem; line-height: 1.52; }.message.mine .message-head { color: #dcefe4; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }.stat { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }.stat b { display: block; margin-bottom: 5px; font-size: 1.65rem; letter-spacing: -.04em; }.stat span { color: var(--muted); font-size: .84rem; }.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: #fff; }table { width: 100%; border-collapse: collapse; font-size: .89rem; }th, td { padding: 13px 15px; text-align: left; border-bottom: 1px solid #e7ede8; vertical-align: top; }th { color: #617067; background: #f8faf8; font-size: .74rem; letter-spacing: .05em; text-transform: uppercase; }tr:last-child td { border-bottom: 0; }.admin-section { margin-top: 25px; }.admin-section:first-child { margin-top: 0; }.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 13px; align-items: center; margin-bottom: 16px; }.toolbar h1, .toolbar h2 { margin: 0; }.filter-form { display: flex; gap: 8px; align-items: center; }.filter-form input { min-width: min(300px, 60vw); padding: 8px 10px; }
.notice { padding: 14px 15px; border-radius: 11px; background: #fff5db; color: #675419; font-size: .88rem; line-height: 1.5; }.danger { color: var(--danger); }.inline-form { display: inline; }.helper { display: block; margin-top: 6px; color: #718078; font-size: .78rem; font-weight: 450; line-height: 1.4; }
@keyframes arrive { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 760px) { .topbar { height: auto; min-height: 64px; padding: 12px 18px; align-items: flex-start; }.topnav { justify-content: flex-end; flex-wrap: wrap; gap: 3px 12px; font-size: .78rem; }.page-shell { padding: 34px 17px 64px; }.hero, .detail-title-row { display: grid; align-items: start; }.details-grid { grid-template-columns: 1fr; }.field-grid, .form-grid { grid-template-columns: 1fr; }.field:nth-last-child(2) { border-bottom: 1px solid #e9eeea; }.stats { grid-template-columns: repeat(2, 1fr); }.access-card { padding: 25px; }.document-row, .case-row { grid-template-columns: 1fr; }.message { max-width: 95%; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* The V1 development build is Chinese-only.  Locale fields stay in the data
   model but the associated switches are intentionally unavailable for now. */
.locale-select { display: none; }
label:has(select[name="default_locale"]), label:has(select[name="locale"]) { position: relative; }
label:has(select[name="default_locale"]) select, label:has(select[name="locale"]) select { display: none; }
label:has(select[name="default_locale"])::after, label:has(select[name="locale"])::after { content: "简体中文（当前开发阶段固定）"; color: #617067; font-size: .88rem; font-weight: 500; padding: 10px 0 2px; }
