/*!*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/.pnpm/next@15.5.20_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!./node_modules/.pnpm/next@15.5.20_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./src/app/globals.css ***!
  \*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --panel-2: #eef3f6;
  --line: #d7dde3;
  --text: #17212b;
  --muted: #65727f;
  --accent: #236d77;
  --danger: #c43b35;
  --warn: #b86d16;
  --ok: #237047;
  --blue: #315fbd;
  --shadow: 0 10px 30px rgba(23, 33, 43, .08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", sans-serif;
}

button, input, select, textarea { font: inherit; }
button { min-height: 40px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--text); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
button:disabled { opacity: .65; cursor: wait; }
input, select, textarea { width: 100%; min-height: 42px; border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: #fff; color: var(--text); }
textarea { min-height: 86px; resize: vertical; }
a { color: var(--accent); }

.app-loading { min-height: 100vh; display: grid; place-items: center; align-content: center; grid-gap: 8px; gap: 8px; background: var(--bg); color: var(--text); }
.app-loading strong { font-size: 22px; letter-spacing: 0; }
.app-loading span { color: var(--muted); font-size: 14px; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--bg); }
.login-panel { width: min(420px, 100%); display: grid; grid-gap: 14px; gap: 14px; padding: 24px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
.login-icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 8px; background: #e7f1f2; color: var(--accent); }
.login-panel h1 { margin: 0; font-size: 24px; letter-spacing: 0; }
.login-panel p { margin: 0; color: var(--muted); }
.login-panel label { display: grid; grid-gap: 7px; gap: 7px; color: #344250; font-size: 13px; font-weight: 650; }
.login-error { padding: 10px 12px; border-radius: 8px; background: #fde8e6; color: var(--danger); font-size: 14px; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 280px 1fr; }
.sidebar { background: #17212b; color: #f8fbfd; padding: 24px 18px; display: flex; flex-direction: column; gap: 22px; }
.brand { display: grid; grid-gap: 5px; gap: 5px; }
.brand h1 { margin: 0; font-size: 22px; line-height: 1.2; letter-spacing: 0; }
.brand span { color: #b8c4cf; font-size: 14px; }
.nav { display: grid; grid-gap: 8px; gap: 8px; }
.nav button { width: 100%; justify-content: flex-start; background: transparent; color: #dbe4ec; border-color: transparent; padding: 10px 12px; }
.nav button.active { background: #263744; color: #fff; border-color: #385365; }
.side-summary { margin-top: auto; border-top: 1px solid #344656; padding-top: 18px; display: grid; grid-gap: 10px; gap: 10px; color: #dbe4ec; font-size: 14px; }

.main { padding: 22px; display: grid; grid-gap: 18px; gap: 18px; align-content: start; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.topbar h2 { margin: 0; font-size: 24px; letter-spacing: 0; }
.top-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.primary { background: var(--accent); color: #fff; border-color: var(--accent); padding: 0 14px; }
.secondary { background: #fff; padding: 0 14px; }
.danger-button { color: #fff; background: var(--danger); border-color: var(--danger); padding: 0 14px; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-gap: 12px; gap: 12px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 14px; box-shadow: var(--shadow); display: grid; grid-gap: 5px; gap: 5px; }
.stat strong { font-size: 28px; letter-spacing: 0; }
.stat span, .hint { color: var(--muted); font-size: 13px; line-height: 1.5; }

.workspace { display: grid; grid-template-columns: minmax(360px, 1.15fr) minmax(320px, .85fr); grid-gap: 16px; gap: 16px; align-items: start; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); overflow: hidden; }
.panel-header { padding: 14px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.panel-header h3 { margin: 0; font-size: 17px; letter-spacing: 0; }
.filters { padding: 12px; display: grid; grid-template-columns: 1.3fr repeat(3, minmax(130px, 1fr)); grid-gap: 10px; gap: 10px; border-bottom: 1px solid var(--line); background: var(--panel-2); }
.search-field { position: relative; display: flex; align-items: center; }
.search-field svg { position: absolute; left: 11px; color: var(--muted); }
.search-field input { padding-left: 38px; }
.table-wrap { overflow: auto; max-height: 560px; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: 14px; }
th { position: -webkit-sticky; position: sticky; top: 0; background: #f9fbfc; z-index: 1; color: #344250; font-weight: 650; }
tr:hover td { background: #fafcfd; }
.empty { padding: 28px; text-align: center; color: var(--muted); }
.badge { display: inline-flex; align-items: center; min-height: 26px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.badge.immediate { background: #fde8e6; color: var(--danger); }
.badge.year { background: #fff0d9; color: var(--warn); }
.badge.next { background: #e7eefc; color: var(--blue); }
.badge.done { background: #e2f4e9; color: var(--ok); }
.badge.neutral { background: #e9eef2; color: #465562; }

.map-shell { position: relative; min-height: 430px; background: #ecf2f3; }
.real-map { width: 100%; height: 430px; z-index: 0; }
.map-note { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 1; padding: 8px 10px; border-radius: 8px; background: rgba(255, 255, 255, .92); color: var(--muted); font-size: 13px; box-shadow: var(--shadow); }
.map-marker { display: grid; place-items: center; width: 34px; height: 34px; border: 2px solid #fff; border-radius: 50% 50% 50% 6px; box-shadow: 0 6px 16px rgba(23, 33, 43, .28); transform: rotate(-45deg); }
.map-marker span { display: grid; place-items: center; width: 24px; height: 24px; color: #fff; font-size: 11px; font-weight: 750; transform: rotate(45deg); white-space: nowrap; }
.map-marker.immediate { background: var(--danger); }
.map-marker.year { background: var(--warn); }
.map-marker.next { background: var(--blue); }
.map-marker.done { background: var(--ok); }
.map-marker.neutral { background: #65727f; }
.leaflet-container { font-family: inherit; }

.modal-backdrop { position: fixed; inset: 0; z-index: 10; background: rgba(23, 33, 43, .46); display: grid; place-items: center; padding: 14px; }
.modal { width: min(940px, calc(100vw - 28px)); max-height: min(88vh, 860px); background: #fff; border-radius: 8px; box-shadow: 0 24px 80px rgba(23, 33, 43, .32); display: flex; flex-direction: column; overflow: hidden; }
.modal-header { padding: 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal-header h3 { margin: 0; font-size: 20px; letter-spacing: 0; }
.modal-body { padding: 16px; display: grid; grid-gap: 16px; gap: 16px; overflow: auto; }
.modal-footer { padding: 14px 16px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-gap: 12px; gap: 12px; }
.field { display: grid; grid-gap: 6px; gap: 6px; font-size: 13px; color: #344250; font-weight: 650; }
.field.full, .photo-strip.full { grid-column: 1 / -1; }
.coordinate-picker { display: grid; grid-gap: 8px; gap: 8px; }
.coordinate-map { width: 100%; height: 320px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #ecf2f3; }
.coordinate-empty { padding: 12px; border: 1px dashed var(--line); border-radius: 8px; background: #fbfcfd; color: var(--muted); font-size: 13px; line-height: 1.5; }
.photo-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); grid-gap: 10px; gap: 10px; }
.photo-preview { position: relative; min-height: 0; padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #f4f6f8; aspect-ratio: 4 / 3; cursor: zoom-in; }
.photo-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-preview span { position: absolute; left: 6px; right: 6px; bottom: 6px; min-height: 22px; padding: 2px 6px; border-radius: 6px; background: rgba(23, 33, 43, .72); color: #fff; font-size: 11px; text-align: center; }
.lightbox { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 58px 12px 24px; background: rgba(0, 0, 0, .9); }
.lightbox img { max-width: 100%; max-height: calc(100vh - 110px); object-fit: contain; border-radius: 8px; }
.lightbox-close { position: fixed; top: 14px; right: 14px; z-index: 31; min-height: 42px; padding: 0 14px; background: rgba(255, 255, 255, .94); }
.lightbox-caption { position: fixed; left: 14px; right: 14px; bottom: 14px; color: #fff; text-align: center; font-size: 13px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; grid-gap: 12px; gap: 12px; }
.detail-item { border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: #fbfcfd; display: grid; grid-gap: 4px; gap: 4px; }
.detail-item span { color: var(--muted); font-size: 12px; font-weight: 650; }
.detail-item strong { font-size: 15px; word-break: break-word; }
.map-link { display: inline-flex; align-items: center; gap: 8px; width: -moz-fit-content; width: fit-content; }

@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: -webkit-sticky; position: sticky; top: 0; z-index: 3; padding: 14px; gap: 12px; }
  .nav { grid-template-columns: repeat(3, 1fr); }
  .nav button { justify-content: center; }
  .side-summary { display: none; }
  .workspace { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .main { padding: 14px; }
  .topbar { align-items: stretch; flex-direction: column; }
  .top-actions { justify-content: stretch; }
  .top-actions button { flex: 1 1 140px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat strong { font-size: 24px; }
  .filters { grid-template-columns: 1fr; }
  .form-grid, .detail-grid { grid-template-columns: 1fr; }
  .map-shell { min-height: 340px; }
  .real-map { height: 340px; }
  .coordinate-map { height: 280px; }
}

