:root {
  --bg: #07130f;
  --surface: #0d1d17;
  --surface-2: #12271f;
  --surface-3: #173128;
  --line: rgba(231,255,242,.12);
  --line-strong: rgba(231,255,242,.2);
  --text: #edf7f2;
  --muted: #9eb5aa;
  --accent: #8ce0ae;
  --accent-strong: #c2ffda;
  --danger: #ff9b97;
  --warning: #f0d18a;
  --radius: 20px;
  --shadow: 0 20px 60px rgba(0,0,0,.28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", sans-serif; line-height: 1.65; }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
img { max-width: 100%; }
.shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

.site-header { position: sticky; top: 0; z-index: 1000; border-bottom: 1px solid var(--line); background: rgba(7,19,15,.88); backdrop-filter: blur(18px); }
.header-inner { min-height: 70px; display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid rgba(140,224,174,.35); border-radius: 12px; background: rgba(140,224,174,.08); color: var(--accent-strong); font-weight: 900; letter-spacing: -.04em; }
.brand strong, .brand small { display: block; line-height: 1.2; }
.brand small { margin-top: 3px; color: var(--muted); font-size: .72rem; }
.site-nav { display: flex; align-items: center; gap: 6px; }
.site-nav > a, .nav-button { border: 0; background: transparent; padding: 8px 11px; color: var(--muted); text-decoration: none; cursor: pointer; border-radius: 10px; }
.site-nav > a:hover, .nav-button:hover { color: var(--text); background: rgba(255,255,255,.045); }
.site-nav .nav-primary { color: #082014; background: var(--accent); font-weight: 800; }
.site-nav .nav-primary:hover { color: #082014; background: var(--accent-strong); }
.inline-form { display: inline; margin: 0; }

.hero { position: relative; overflow: hidden; padding: 92px 0 76px; border-bottom: 1px solid var(--line); background: radial-gradient(circle at 80% 0%, rgba(97,224,151,.16), transparent 32%), linear-gradient(180deg, #0b1b15 0%, #07130f 100%); }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px); background-size: 42px 42px; mask-image: linear-gradient(to bottom, black, transparent 88%); }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0,1.4fr) minmax(320px,.7fr); align-items: center; gap: 64px; }
.eyebrow { margin: 0 0 11px; color: var(--accent); font-size: .76rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
h1,h2,h3,p { margin-top: 0; }
h1 { margin-bottom: 16px; font-size: clamp(2.25rem, 5.3vw, 5rem); line-height: 1.02; letter-spacing: -.048em; }
h2 { margin-bottom: 8px; font-size: clamp(1.55rem, 3vw, 2.55rem); line-height: 1.15; letter-spacing: -.025em; }
h3 { margin-bottom: 9px; }
.hero-copy { max-width: 760px; margin-bottom: 26px; color: #bfd0c7; font-size: 1.08rem; }
.hero-actions, .heading-actions, .form-actions, .review-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.button { appearance: none; display: inline-flex; justify-content: center; align-items: center; min-height: 44px; padding: 9px 15px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.035); color: var(--text); text-decoration: none; font-weight: 800; cursor: pointer; }
.button:hover { border-color: var(--line-strong); background: rgba(255,255,255,.065); }
.button-primary { border-color: transparent; background: var(--accent); color: #082014; }
.button-primary:hover { background: var(--accent-strong); color: #082014; }
.button-ghost { background: transparent; }
.button-danger { border-color: rgba(255,155,151,.28); color: var(--danger); background: rgba(255,155,151,.06); }
.button-danger:hover { background: rgba(255,155,151,.12); }
.button-small { min-height: 36px; padding: 6px 10px; font-size: .82rem; }
.button-block { width: 100%; }
.hero-panel, .feature-card, .form-card, .auth-card, .table-card, .note-card, .review-panel, .side-note, .empty-card, .photo-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.hero-panel { padding: 24px; }
.hero-panel-label { margin-bottom: 18px; color: var(--muted); font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.flow-list { list-style: none; display: grid; gap: 15px; margin: 0; padding: 0; }
.flow-list li { display: grid; grid-template-columns: 42px 1fr; gap: 13px; align-items: start; }
.flow-list > li > span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(140,224,174,.28); color: var(--accent); font-size: .75rem; font-weight: 900; }
.flow-list strong, .flow-list small { display: block; }
.flow-list small { margin-top: 3px; color: var(--muted); }

.stats-section { padding: 18px 0; border-bottom: 1px solid var(--line); background: #091711; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat { min-height: 108px; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.025); }
.stat strong { display: block; margin-bottom: 9px; color: var(--accent-strong); font-size: 2rem; line-height: 1; }
.stat span { color: var(--muted); font-size: .88rem; }
.admin-stats { margin-bottom: 56px; }

.section { padding: 72px 0; }
.section-alt { border-block: 1px solid var(--line); background: #0a1813; }
.section-heading, .page-heading { display: flex; justify-content: space-between; gap: 24px; align-items: flex-end; margin-bottom: 24px; }
.section-heading p, .page-heading p { margin-bottom: 0; color: var(--muted); }
.section-heading.simple { align-items: center; margin-top: 10px; }
.page-heading h1 { margin-bottom: 7px; font-size: clamp(2rem, 4vw, 3.4rem); }
.page-heading.compact { align-items: center; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: .82rem; }
.dot { display: inline-block; width: 9px; height: 9px; margin-right: 4px; border-radius: 50%; background: var(--accent); }
.dot-sensitive { background: var(--warning); }
.map-shell { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #15231d; box-shadow: var(--shadow); }
#map { height: 540px; width: 100%; }
.map-empty { position: absolute; z-index: 500; left: 50%; bottom: 22px; transform: translateX(-50%); padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(7,19,15,.92); color: var(--muted); font-size: .86rem; }
.map-marker-wrap { background: transparent; border: 0; }
.map-marker { display: block; width: 19px; height: 19px; border: 3px solid #fff; border-radius: 50%; background: #2f9a66; box-shadow: 0 4px 12px rgba(0,0,0,.35); }
.map-marker-sensitive { background: #d5ad50; }
.fine-print { margin: 12px 0 0; color: var(--muted); font-size: .82rem; }
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature-card { padding: 27px; }
.feature-card p { margin-bottom: 0; color: var(--muted); }
.feature-index { color: var(--accent); font-size: .76rem; font-weight: 900; letter-spacing: .12em; }

.auth-page { min-height: calc(100vh - 145px); display: grid; place-items: center; padding: 64px 20px; background: radial-gradient(circle at 50% 10%, rgba(140,224,174,.08), transparent 32%); }
.auth-card { width: min(100%, 480px); padding: 32px; }
.auth-card h1 { font-size: 2.15rem; }
.auth-foot { margin: 22px 0 0; color: var(--muted); text-align: center; }
.auth-foot a, .text-link { color: var(--accent-strong); }
.muted { color: var(--muted); }
.alert { padding: 11px 13px; margin-bottom: 16px; border-radius: 11px; }
.alert-error { border: 1px solid rgba(255,155,151,.25); color: #ffc0bd; background: rgba(255,155,151,.07); }

.form-stack { display: grid; gap: 16px; }
.form-stack label { display: grid; gap: 7px; color: #d9e8e0; font-weight: 750; }
.form-stack label small { color: var(--muted); font-weight: 500; }
input, textarea, select { width: 100%; border: 1px solid var(--line-strong); border-radius: 11px; padding: 11px 12px; outline: none; background: #091712; color: var(--text); }
input:focus, textarea:focus, select:focus { border-color: rgba(140,224,174,.55); box-shadow: 0 0 0 3px rgba(140,224,174,.08); }
input[type="file"] { padding: 9px; }
textarea { resize: vertical; }
.form-card { padding: 26px; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.side-note { position: sticky; top: 94px; padding: 22px; color: var(--muted); }
.side-note h3 { color: var(--text); }
.side-note ul { margin-bottom: 0; padding-left: 1.2rem; }
.coordinate-panel { padding: 17px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.02); }
.coordinate-head { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 13px; }
.coordinate-head strong, .coordinate-head small { display: block; }
.coordinate-head small { margin-top: 2px; color: var(--muted); font-weight: 500; }
.preview-wrap { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #06100d; }
.preview-wrap img { display: block; width: 100%; max-height: 430px; object-fit: contain; }

.table-card { overflow: hidden; box-shadow: none; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 14px 15px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { color: var(--muted); font-size: .76rem; letter-spacing: .06em; text-transform: uppercase; }
td { color: #d9e5df; }
td strong, td small { display: block; }
td small { margin-top: 2px; color: var(--muted); }
tbody tr:hover { background: rgba(255,255,255,.02); }
tbody tr:last-child td { border-bottom: 0; }
.table-empty { padding: 36px; color: var(--muted); text-align: center; }
.status { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; padding: 5px 9px; font-size: .76rem; font-weight: 800; white-space: nowrap; }
.status-pending { color: var(--warning); border-color: rgba(240,209,138,.25); background: rgba(240,209,138,.06); }
.status-approved { color: var(--accent-strong); border-color: rgba(140,224,174,.25); background: rgba(140,224,174,.06); }
.status-rejected { color: var(--danger); border-color: rgba(255,155,151,.25); background: rgba(255,155,151,.06); }
.filter-tabs { display: flex; gap: 7px; margin-bottom: 15px; overflow-x: auto; }
.filter-tabs a { flex: 0 0 auto; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); text-decoration: none; }
.filter-tabs a.active { color: var(--accent-strong); border-color: rgba(140,224,174,.3); background: rgba(140,224,174,.07); }
.text-button { border: 0; background: transparent; color: var(--accent-strong); cursor: pointer; padding: 0; text-decoration: underline; }

.detail-layout { max-width: 900px; }
.review-layout { display: grid; grid-template-columns: minmax(0,1fr) 370px; gap: 24px; align-items: start; }
.review-panel { position: sticky; top: 94px; padding: 24px; }
.review-panel h2 { font-size: 1.7rem; }
.review-actions { align-items: stretch; }
.review-actions .button { flex: 1 1 140px; }
.back-link { display: inline-block; margin-top: 18px; }
.photo-card { overflow: hidden; display: grid; place-items: center; min-height: 320px; background: #050d0a; }
.photo-card img { display: block; width: 100%; max-height: 680px; object-fit: contain; }
.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; margin-top: 16px; overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: var(--line); }
.detail-grid > div { padding: 16px; background: var(--surface); }
.detail-grid small, .detail-grid strong, .detail-grid span { display: block; }
.detail-grid small { margin-bottom: 5px; color: var(--muted); }
.detail-grid span { margin-top: 3px; color: var(--muted); font-size: .84rem; }
.note-card { margin-top: 16px; padding: 20px; box-shadow: none; }
.note-card p { margin-bottom: 0; white-space: pre-wrap; color: var(--muted); }
.review-note { border-color: rgba(140,224,174,.2); }
.latin { color: var(--muted); font-style: italic; }
.check-row { grid-template-columns: auto 1fr !important; align-items: start; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.02); }
.check-row input { width: auto; margin-top: 4px; }
.check-row strong, .check-row small { display: block; }
.empty-card { padding: 40px; text-align: center; box-shadow: none; }
.empty-card p { color: var(--muted); }

.site-footer { border-top: 1px solid var(--line); color: var(--muted); }
.footer-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; font-size: .8rem; }

@media (max-width: 980px) {
  .hero-grid, .review-layout, .form-layout { grid-template-columns: 1fr; }
  .hero-grid { gap: 30px; }
  .review-panel, .side-note { position: static; }
  .cards-3 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .shell { width: min(100% - 24px, 1180px); }
  .header-inner { min-height: 64px; }
  .brand small { display: none; }
  .site-nav > a:not(.nav-primary) { display: none; }
  .site-nav { gap: 2px; }
  .hero { padding: 62px 0 50px; }
  .section { padding: 52px 0; }
  .section-heading, .page-heading { align-items: flex-start; flex-direction: column; }
  #map { height: 440px; }
  .form-grid-2, .detail-grid { grid-template-columns: 1fr; }
  .coordinate-head, .footer-inner { align-items: flex-start; flex-direction: column; }
  .auth-card, .form-card, .review-panel { padding: 20px; }
  .stats-grid { gap: 8px; }
  .stat { min-height: 95px; padding: 16px; }
  .stat strong { font-size: 1.65rem; }
}
