:root {
  color-scheme: light;
  --navy: #0d2f49;
  --navy-2: #153f5d;
  --blue: #2f72a8;
  --teal: #2c9b91;
  --ink: #17364d;
  --muted: #6f8493;
  --line: #d8e2e9;
  --soft: #eef3f7;
  --paper: #ffffff;
  --canvas: #e9eff4;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; font-family: "Microsoft YaHei", "Microsoft YaHei UI", sans-serif; color: var(--ink); background: var(--canvas); }
button, select, a { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }

.app-shell.is-locked { display: none; }
.access-gate { position: fixed; inset: 0; z-index: 9999; min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 78% 18%, rgba(57,145,160,.35), transparent 31%), linear-gradient(145deg, #071f32 0%, #0d3550 56%, #174f64 100%); }
.access-gate.is-hidden { display: none; }
.access-card { width: min(430px, 100%); padding: 42px 42px 36px; border: 1px solid rgba(255,255,255,.24); border-radius: 20px; background: rgba(255,255,255,.96); box-shadow: 0 30px 80px rgba(0,0,0,.3); }
.access-mark { width: 56px; height: 56px; display: grid; place-items: center; margin-bottom: 24px; border-radius: 15px; background: linear-gradient(145deg, #2f72a8, #2c9b91); color: #fff; font-size: 18px; font-weight: 800; letter-spacing: 1px; box-shadow: 0 12px 28px rgba(32,105,135,.24); }
.access-card > p { margin: 0 0 7px; color: var(--teal); font-size: 13px; font-weight: 800; letter-spacing: .8px; }
.access-card h1 { margin: 0 0 27px; color: var(--navy); font-size: 28px; line-height: 1.3; }
.access-card label { display: block; margin-bottom: 8px; color: #526c7e; font-size: 13px; font-weight: 700; }
.access-card input { width: 100%; height: 50px; padding: 0 15px; border: 1px solid #bdccd6; border-radius: 10px; outline: none; background: #fff; color: var(--ink); font: inherit; transition: .18s ease; }
.access-card input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(47,114,168,.12); }
.access-card button { width: 100%; height: 50px; margin-top: 15px; border: 0; border-radius: 10px; background: var(--navy); color: #fff; font-weight: 800; cursor: pointer; transition: .18s ease; }
.access-card button:hover { background: #174765; transform: translateY(-1px); }
.access-error { min-height: 20px; margin-top: 10px; color: #c53838; font-size: 12px; }
.access-card > small { display: block; margin-top: 7px; color: #8798a4; font-size: 11px; text-align: center; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 296px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 26px 22px 18px; background: linear-gradient(180deg, #0c2d46 0%, #123c58 68%, #0d3049 100%); color: #fff; display: flex; flex-direction: column; overflow: hidden; }
.brand { display: flex; align-items: center; gap: 13px; padding: 0 4px 24px; border-bottom: 1px solid rgba(255,255,255,.14); }
.brand-logo { width: 62px; height: 62px; flex: 0 0 62px; display: grid; place-items: center; border-radius: 12px; padding: 5px; background: #fff; box-shadow: 0 10px 24px rgba(0,0,0,.2); overflow: hidden; }
.brand-logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.brand-logo { width: 62px; height: 62px; flex: 0 0 62px; display: grid; place-items: center; border-radius: 12px; padding: 5px; background: #fff; box-shadow: 0 10px 24px rgba(0,0,0,.2); overflow: hidden; }
.brand-logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.brand-mark { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(145deg, #3d83b7, #2fa397); font-weight: 800; letter-spacing: 1px; box-shadow: 0 10px 24px rgba(0,0,0,.2); }
.brand strong { display: block; font-size: 17px; line-height: 1.4; }
.brand span { display: block; margin-top: 4px; color: #9fc0d2; font-size: 10px; letter-spacing: 1.7px; }
.side-section { margin-top: 22px; }
.side-section > label, .side-heading { display: flex; align-items: center; justify-content: space-between; margin: 0 4px 9px; color: #acc6d6; font-size: 13px; }
.side-heading em { min-width: 24px; padding: 2px 7px; border-radius: 999px; background: rgba(255,255,255,.11); color: #fff; font-style: normal; text-align: center; }
#dateSelect { width: 100%; height: 43px; border: 1px solid rgba(255,255,255,.18); border-radius: 9px; padding: 0 12px; color: #fff; background: #194966; outline: none; cursor: pointer; }
#dateSelect option { color: #16354b; background: #fff; }
.mode-nav { display: grid; gap: 9px; margin-top: 18px; }
.mode-button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 13px 12px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: #d7e7f0; text-align: left; cursor: pointer; transition: .18s ease; }
.mode-button:hover { background: rgba(255,255,255,.07); }
.mode-button.active { background: #fff; color: var(--navy); box-shadow: 0 10px 28px rgba(0,0,0,.18); }
.mode-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; background: rgba(255,255,255,.1); font-size: 12px; font-weight: 800; }
.mode-button.active .mode-icon { background: #e8f2f7; color: var(--blue); }
.mode-button b, .mode-button small { display: block; }
.mode-button b { font-size: 14px; }
.mode-button small { margin-top: 3px; color: #9fbdcf; font-size: 11px; }
.mode-button.active small { color: #708797; }
.report-list-section { min-height: 0; flex: 1; display: flex; flex-direction: column; }
.report-list { min-height: 0; overflow-y: auto; padding-right: 4px; scrollbar-color: rgba(255,255,255,.25) transparent; }
.report-item { width: 100%; margin-bottom: 6px; padding: 11px 12px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: #d6e5ee; text-align: left; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.report-item:hover { background: rgba(255,255,255,.07); }
.report-item.active { background: rgba(72,168,156,.2); border-color: rgba(91,194,181,.45); color: #fff; }
.report-item span { font-size: 13px; font-weight: 700; }
.report-item small { color: #9ebccc; font-size: 10px; }
.report-empty { color: #9eb7c6; padding: 16px 8px; font-size: 13px; line-height: 1.7; }
.sidebar-foot { padding: 15px 4px 0; border-top: 1px solid rgba(255,255,255,.12); display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 5px 8px; color: #c9dbe5; font-size: 12px; }
.sidebar-foot small { grid-column: 2; color: #87a9bb; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #48b9a7; box-shadow: 0 0 0 4px rgba(72,185,167,.12); }

.workspace { min-width: 0; padding: 28px 30px 34px; }
.topbar { min-height: 94px; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 0 3px 22px; }
.topbar p { margin: 0 0 7px; color: var(--teal); font-size: 12px; font-weight: 800; letter-spacing: 1.2px; }
.topbar h1 { margin: 0; color: var(--navy); font-size: clamp(24px, 2vw, 34px); line-height: 1.25; }
.meta-line { display: flex; align-items: center; gap: 9px; margin-top: 8px; color: var(--muted); font-size: 13px; }
.meta-line i { width: 3px; height: 3px; border-radius: 50%; background: #9badb8; }
.top-actions { display: flex; align-items: center; gap: 12px; }
.zoom-tools { display: flex; align-items: center; border: 1px solid #cbd7df; border-radius: 9px; overflow: hidden; background: #fff; }
.zoom-tools button { height: 40px; min-width: 40px; border: 0; border-right: 1px solid #dce4e9; background: #fff; color: var(--ink); cursor: pointer; }
.zoom-tools button:hover { background: #f0f5f8; }
.zoom-tools button:last-child { border-right: 0; padding: 0 13px; font-size: 12px; }
.zoom-tools span { min-width: 60px; text-align: center; color: var(--muted); font-size: 12px; }
.primary-action { height: 42px; display: inline-flex; align-items: center; padding: 0 18px; border-radius: 9px; background: var(--navy); color: #fff; text-decoration: none; font-size: 13px; font-weight: 700; }
.primary-action:hover { background: #174765; }
.viewer-shell { min-height: calc(100vh - 156px); border: 1px solid #ced9e1; border-radius: 12px; background: #fff; box-shadow: 0 14px 35px rgba(20,53,75,.09); overflow: hidden; }
.viewer-toolbar { height: 48px; display: flex; justify-content: space-between; align-items: center; padding: 0 17px; border-bottom: 1px solid #d9e3e9; background: #f8fafb; color: #708392; font-size: 12px; }
.viewer-state { display: flex; align-items: center; gap: 8px; }
.viewer-state span { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }
.viewer-state b { color: var(--ink); font-size: 12px; }
.viewer { height: calc(100vh - 206px); min-height: 620px; overflow: auto; background: #dfe7ed; position: relative; }
.report-frame { width: 100%; height: 100%; border: 0; background: #fff; }
.image-stage { min-height: 100%; padding: 24px; display: flex; justify-content: center; align-items: flex-start; overflow: auto; }
.image-stage img { display: block; max-width: none; height: auto; background: #fff; box-shadow: 0 8px 26px rgba(14,47,71,.15); transform-origin: top center; }
.empty-state { min-height: 620px; display: grid; place-content: center; text-align: center; color: #768b9a; }
.empty-icon { width: 64px; height: 64px; margin: 0 auto 15px; border-radius: 18px; display: grid; place-items: center; background: #eef4f7; color: var(--blue); font-size: 30px; }
.empty-state h2 { margin: 0; color: var(--ink); font-size: 20px; }
.empty-state p { margin: 8px 0 0; font-size: 14px; }

@media (max-width: 900px) {
  .app-shell { display: block; }
  .sidebar { position: relative; width: 100%; height: auto; padding: 18px; }
  .brand { padding-bottom: 16px; }
  .mode-nav { grid-template-columns: 1fr 1fr; }
  .report-list-section { max-height: 260px; }
  .sidebar-foot { margin-top: 15px; }
  .workspace { padding: 18px 14px; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .top-actions { width: 100%; justify-content: space-between; flex-wrap: wrap; }
  .viewer { height: 72vh; }
  .hint { display: none; }
}
