* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  background: #f4f6f8;
  color: #1f2937;
}

a {
  color: inherit;
}

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), transparent 36%),
    linear-gradient(135deg, #eef2ff 0%, #f8fafc 52%, #eef2ff 100%);
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border-radius: 24px;
  padding: 36px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.14);
}

.login-title {
  margin-bottom: 28px;
}

.login-title h1 {
  margin: 0;
  font-size: 28px;
}

.login-title p {
  margin: 8px 0 0;
  color: #6b7280;
}

.login-hint {
  margin-top: 22px;
  padding: 14px;
  border-radius: 14px;
  background: #f8fafc;
  color: #64748b;
  font-size: 14px;
  line-height: 1.7;
}

.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 248px;
  background: #111827;
  color: #ffffff;
  padding: 24px 18px;
  flex-shrink: 0;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 0 8px 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 20px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 20px;
}

.brand-title {
  font-weight: 700;
  font-size: 18px;
}

.brand-subtitle {
  color: #9ca3af;
  font-size: 12px;
  margin-top: 2px;
}

.menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.menu a {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-radius: 14px;
  color: #d1d5db;
  text-decoration: none;
  transition: 0.18s ease;
}

.menu a:hover,
.menu a.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.main {
  flex: 1;
  min-width: 0;
}

.topbar {
  height: 76px;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
}

.topbar h2 {
  margin: 0;
  font-size: 20px;
}

.user-area {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #4b5563;
}

.role-label {
  display: inline-block;
  margin-left: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 12px;
}

.logout-btn {
  padding: 9px 14px;
  background: #f3f4f6;
  color: #111827;
  text-decoration: none;
  border-radius: 999px;
  font-size: 14px;
}

.logout-btn:hover {
  background: #e5e7eb;
}

.content {
  padding: 32px;
}

.welcome-card,
.form-card,
.table-card,
.search-card {
  background: #ffffff;
  border-radius: 22px;
  padding: 28px;
  box-shadow: 0 14px 42px rgba(15, 23, 42, 0.06);
}

.welcome-card h1,
.page-header h1 {
  margin: 0;
  font-size: 28px;
}

.welcome-card p,
.page-header p {
  color: #6b7280;
  margin: 10px 0 0;
  line-height: 1.7;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.stat-card {
  background: #ffffff;
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 14px 42px rgba(15, 23, 42, 0.06);
}

.stat-card span {
  color: #6b7280;
  font-size: 14px;
}

.stat-card strong {
  display: block;
  font-size: 36px;
  margin-top: 8px;
}

.page-header {
  margin-bottom: 22px;
}

.row-between {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
}

.form-card {
  max-width: 760px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
}

.form-group input,
.form-group textarea,
.form-group select,
.search-card input {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 14px;
  padding: 13px 14px;
  font-size: 15px;
  outline: none;
  background: #ffffff;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus,
.search-card input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.search-card {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 18px;
  margin-bottom: 18px;
}

.primary-btn,
.secondary-btn,
.primary-link-btn,
.secondary-link-btn,
.text-btn,
.small-btn {
  border: 0;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  white-space: nowrap;
}

.primary-btn,
.primary-link-btn {
  background: #2563eb;
  color: #ffffff;
  padding: 13px 22px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 14px;
}

.primary-btn:hover,
.primary-link-btn:hover {
  background: #1d4ed8;
}

.primary-btn.full {
  width: 100%;
}

.secondary-btn,
.secondary-link-btn {
  background: #f3f4f6;
  color: #111827;
  padding: 13px 18px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 14px;
}

.text-btn {
  color: #2563eb;
  font-size: 14px;
}

.form-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.alert {
  padding: 14px 16px;
  border-radius: 14px;
  margin-bottom: 18px;
  font-size: 15px;
}

.alert-error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.alert-success {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.table-card {
  overflow-x: auto;
  padding: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

th,
td {
  padding: 16px 18px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
  font-size: 14px;
}

th {
  background: #f9fafb;
  color: #374151;
  font-weight: 800;
}

td {
  color: #4b5563;
}

.empty {
  text-align: center;
  color: #9ca3af;
  padding: 40px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.badge.active {
  background: #ecfdf5;
  color: #047857;
}

.badge.inactive {
  background: #f3f4f6;
  color: #6b7280;
}

.badge.admin {
  background: #fff7ed;
  color: #c2410c;
}

.badge.member {
  background: #eff6ff;
  color: #1d4ed8;
}

.actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.actions form {
  margin: 0;
}

.small-btn {
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
  background: #f3f4f6;
  color: #111827;
}

.small-btn.danger {
  background: #fef2f2;
  color: #b91c1c;
}

@media (max-width: 900px) {
  .layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
  }

  .menu {
    flex-direction: row;
    overflow-x: auto;
  }

  .menu a {
    white-space: nowrap;
  }

  .topbar {
    padding: 0 20px;
  }

  .content {
    padding: 20px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .row-between,
  .search-card {
    flex-direction: column;
    align-items: stretch;
  }
}


.role-label.member-login {
  background: #eff6ff;
  color: #1d4ed8;
}

.role-label.system-login {
  background: #f3f4f6;
  color: #374151;
}


/* v5 首頁案件搜尋 */
.case-page-header {
  margin-bottom: 18px;
}

.case-page-header h1 {
  margin: 0;
  font-size: 28px;
}

.case-page-header p {
  color: #6b7280;
  margin: 8px 0 0;
}

.case-search-card {
  background: #ffffff;
  border-radius: 22px;
  padding: 20px;
  box-shadow: 0 14px 42px rgba(15, 23, 42, 0.06);
  margin-bottom: 18px;
}

.main-search-row {
  display: grid;
  grid-template-columns: 180px minmax(260px, 1fr) 48px 110px 90px;
  gap: 12px;
  align-items: center;
}

.filter-select,
.case-search-input,
.filter-row input {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 14px;
  padding: 13px 14px;
  font-size: 15px;
  outline: none;
  background: #ffffff;
}

.filter-select:focus,
.case-search-input:focus,
.filter-row input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.add-filter-btn {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 14px;
  background: #111827;
  color: #ffffff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.add-filter-btn:hover {
  background: #374151;
}

.extra-filters {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.filter-row {
  display: grid;
  grid-template-columns: 180px minmax(260px, 1fr) 90px;
  gap: 12px;
}

.remove-filter-btn {
  border: 0;
  border-radius: 14px;
  padding: 13px 14px;
  background: #fef2f2;
  color: #b91c1c;
  font-weight: 700;
  cursor: pointer;
}

.table-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #4b5563;
  font-size: 14px;
  margin: 14px 0;
}

.case-table-card table {
  min-width: 1280px;
}

.case-table-card th,
.case-table-card td {
  vertical-align: top;
}

.pagination {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
}

.pagination a {
  min-width: 40px;
  padding: 10px 14px;
  border-radius: 12px;
  text-decoration: none;
  background: #ffffff;
  color: #374151;
  border: 1px solid #e5e7eb;
  text-align: center;
}

.pagination a.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

@media (max-width: 1100px) {
  .main-search-row {
    grid-template-columns: 1fr;
  }

  .filter-row {
    grid-template-columns: 1fr;
  }

  .add-filter-btn {
    width: 100%;
  }
}


/* v8：保留 v5 UI，補上案件檔案與修改頁需要的樣式 */
.download-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
}

.download-link:hover {
  background: #dbeafe;
}

.muted-text {
  color: #9ca3af;
  font-size: 13px;
}

.action-th {
  width: 120px;
}

.wide-form-card {
  max-width: 980px;
}

.form-grid {
  display: grid;
  gap: 18px;
}

.form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.file-upload-box {
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 18px;
  background: #f9fafb;
  margin-bottom: 20px;
}

.file-upload-box label {
  display: block;
  font-weight: 800;
  margin-bottom: 10px;
}

.current-file {
  margin-bottom: 12px;
}

.file-upload-box input[type="file"] {
  width: 100%;
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  padding: 14px;
}

.file-upload-box small {
  display: block;
  color: #64748b;
  margin-top: 10px;
  line-height: 1.6;
}

@media (max-width: 900px) {
  .form-grid.two,
  .form-grid.three {
    grid-template-columns: 1fr;
  }
}


/* v9 clean search layout fix */
.clean-page-title {
  background: #ffffff;
  border-radius: 22px;
  padding: 26px 28px;
  box-shadow: 0 14px 42px rgba(15, 23, 42, 0.06);
  margin-bottom: 20px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.clean-page-title .eyebrow {
  color: #2563eb;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.clean-page-title h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.15;
}

.clean-page-title p {
  margin: 10px 0 0;
  color: #6b7280;
  font-size: 15px;
}

.clean-stats {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

.clean-stats div {
  min-width: 88px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 12px 14px;
}

.clean-stats span {
  display: block;
  color: #6b7280;
  font-size: 12px;
  margin-bottom: 4px;
}

.clean-stats strong {
  display: block;
  font-size: 22px;
}

.clean-search-card {
  background: #ffffff;
  border-radius: 22px;
  padding: 20px;
  box-shadow: 0 14px 42px rgba(15, 23, 42, 0.06);
  margin-bottom: 20px;
}

.clean-search-row {
  display: grid;
  grid-template-columns: 180px minmax(280px, 1fr) 110px 96px 96px;
  gap: 12px;
  align-items: end;
}

.search-field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #4b5563;
  margin-bottom: 8px;
}

.filter-select,
.case-search-input,
.clean-filter-row input {
  width: 100%;
  height: 46px;
  border: 1px solid #d1d5db;
  border-radius: 14px;
  padding: 0 14px;
  font-size: 15px;
  outline: none;
  background: #ffffff;
}

.filter-select:focus,
.case-search-input:focus,
.clean-filter-row input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.primary-btn.compact,
.secondary-link-btn.compact,
.add-filter-btn.compact {
  height: 46px;
  border-radius: 14px;
  padding: 0 16px;
  font-size: 15px;
  font-weight: 800;
  box-shadow: none;
  margin: 0;
}

.add-filter-btn.compact {
  width: 100%;
  border: 0;
  background: #111827;
  color: #ffffff;
  cursor: pointer;
}

.add-filter-btn.compact:hover {
  background: #374151;
}

.clean-extra-filters {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.clean-filter-row {
  display: grid !important;
  grid-template-columns: 180px minmax(260px, 1fr) 86px !important;
  gap: 10px;
  align-items: center;
}

.remove-filter-btn {
  height: 46px;
  border: 0;
  border-radius: 14px;
  background: #fef2f2;
  color: #b91c1c;
  font-weight: 800;
  cursor: pointer;
}

.clean-table-section {
  margin-top: 20px;
}

.table-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  margin-bottom: 12px;
}

.table-section-header h3 {
  margin: 0;
  font-size: 22px;
}

.table-section-header p {
  margin: 6px 0 0;
  color: #6b7280;
  font-size: 14px;
}

.table-summary {
  background: #ffffff;
  border-radius: 999px;
  padding: 10px 16px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.download-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
}

.muted-text {
  color: #9ca3af;
  font-size: 13px;
}

@media (max-width: 1100px) {
  .clean-page-title,
  .table-section-header {
    flex-direction: column;
    align-items: stretch;
  }

  .clean-stats {
    width: 100%;
  }

  .clean-stats div {
    flex: 1;
  }

  .clean-search-row {
    grid-template-columns: 1fr;
  }

  .clean-filter-row {
    grid-template-columns: 1fr !important;
  }

  .primary-btn.compact,
  .secondary-link-btn.compact,
  .add-filter-btn.compact {
    width: 100%;
  }
}


/* v10 強制修正首頁搜尋區排版 */
.case-hero-v10 {
  width: 100% !important;
  background: #ffffff !important;
  border-radius: 22px !important;
  padding: 28px !important;
  box-shadow: 0 14px 42px rgba(15, 23, 42, 0.06) !important;
  margin-bottom: 20px !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: flex-end !important;
  gap: 24px !important;
}

.case-hero-label {
  color: #2563eb !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  margin-bottom: 8px !important;
}

.case-hero-v10 h1 {
  margin: 0 !important;
  font-size: 34px !important;
  line-height: 1.15 !important;
}

.case-hero-v10 p {
  margin: 10px 0 0 !important;
  color: #6b7280 !important;
  font-size: 15px !important;
}

.case-stats-v10 {
  display: flex !important;
  gap: 12px !important;
  flex-shrink: 0 !important;
}

.case-stat-v10 {
  min-width: 90px !important;
  background: #f8fafc !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 16px !important;
  padding: 12px 14px !important;
}

.case-stat-v10 span {
  display: block !important;
  color: #6b7280 !important;
  font-size: 12px !important;
  margin-bottom: 4px !important;
}

.case-stat-v10 strong {
  display: block !important;
  font-size: 22px !important;
}

.case-search-v10 {
  width: 100% !important;
  background: #ffffff !important;
  border-radius: 22px !important;
  padding: 20px !important;
  box-shadow: 0 14px 42px rgba(15, 23, 42, 0.06) !important;
  margin-bottom: 22px !important;
}

.case-search-main-v10 {
  display: grid !important;
  grid-template-columns: 180px minmax(320px, 1fr) 108px 92px 92px !important;
  gap: 12px !important;
  align-items: end !important;
  width: 100% !important;
}

.case-field-v10 {
  display: block !important;
  min-width: 0 !important;
}

.case-field-v10 label {
  display: block !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #4b5563 !important;
  margin-bottom: 8px !important;
  line-height: 1 !important;
}

.case-field-v10 select,
.case-field-v10 input,
.case-filter-row-v10 select,
.case-filter-row-v10 input {
  width: 100% !important;
  height: 46px !important;
  border: 1px solid #d1d5db !important;
  border-radius: 14px !important;
  padding: 0 14px !important;
  font-size: 15px !important;
  outline: none !important;
  background: #ffffff !important;
  margin: 0 !important;
}

.case-add-btn-v10,
.case-search-btn-v10,
.case-reset-btn-v10 {
  height: 46px !important;
  border-radius: 14px !important;
  padding: 0 14px !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  margin: 0 !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.case-add-btn-v10 {
  background: #111827 !important;
  color: #ffffff !important;
}

.case-search-btn-v10 {
  background: #2563eb !important;
  color: #ffffff !important;
}

.case-reset-btn-v10 {
  background: #f3f4f6 !important;
  color: #111827 !important;
}

.case-extra-v10 {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  margin-top: 14px !important;
}

.case-filter-row-v10 {
  display: grid !important;
  grid-template-columns: 180px minmax(320px, 1fr) 86px !important;
  gap: 10px !important;
  align-items: center !important;
  width: 100% !important;
}

.case-remove-btn-v10 {
  height: 46px !important;
  border: 0 !important;
  border-radius: 14px !important;
  background: #fef2f2 !important;
  color: #b91c1c !important;
  font-weight: 800 !important;
  cursor: pointer !important;
}

.case-table-section-v10 {
  margin-top: 22px !important;
}

.case-table-title-v10 {
  display: flex !important;
  align-items: flex-end !important;
  justify-content: space-between !important;
  gap: 18px !important;
  margin-bottom: 12px !important;
}

.case-table-title-v10 h3 {
  margin: 0 !important;
  font-size: 22px !important;
}

.case-table-title-v10 p {
  margin: 6px 0 0 !important;
  color: #6b7280 !important;
  font-size: 14px !important;
}

.case-count-v10 {
  background: #ffffff !important;
  border-radius: 999px !important;
  padding: 10px 16px !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05) !important;
}

.download-link {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 6px 10px !important;
  border-radius: 999px !important;
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  text-decoration: none !important;
}

.muted-text {
  color: #9ca3af !important;
  font-size: 13px !important;
}

@media (max-width: 1100px) {
  .case-hero-v10,
  .case-table-title-v10 {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .case-stats-v10 {
    width: 100% !important;
  }

  .case-stat-v10 {
    flex: 1 !important;
  }

  .case-search-main-v10 {
    grid-template-columns: 1fr !important;
  }

  .case-filter-row-v10 {
    grid-template-columns: 1fr !important;
  }

  .case-add-btn-v10,
  .case-search-btn-v10,
  .case-reset-btn-v10 {
    width: 100% !important;
  }
}


/* v11 新增園區批次上傳與解析確認 */
.upload-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 8px 0 24px;
}

.drop-zone label {
  display: block;
  font-weight: 800;
  margin-bottom: 10px;
}

.drop-box {
  position: relative;
  min-height: 190px;
  border: 2px dashed #cbd5e1;
  border-radius: 22px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: 0.18s ease;
  overflow: hidden;
}

.drop-box:hover,
.drop-box.drag-over {
  border-color: #2563eb;
  background: #eff6ff;
}

.drop-box input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.drop-content strong {
  display: block;
  font-size: 18px;
  margin-bottom: 8px;
}

.drop-content span {
  color: #64748b;
  font-size: 14px;
}

.park-summary-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.park-summary-card > div {
  background: #ffffff;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.park-summary-card span {
  display: block;
  color: #64748b;
  font-size: 13px;
  margin-bottom: 6px;
}

.park-summary-card strong {
  font-size: 22px;
}

.review-table-card {
  background: #ffffff;
  border-radius: 22px;
  box-shadow: 0 14px 42px rgba(15, 23, 42, 0.06);
  overflow-x: auto;
}

.review-table {
  min-width: 1480px;
}

.review-table input {
  width: 100%;
  min-width: 110px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 10px 11px;
  font-size: 14px;
}

.review-table td:nth-child(3) input {
  min-width: 260px;
}

.review-table td:nth-child(10) input {
  min-width: 160px;
}

.share-inputs {
  display: flex;
  gap: 6px;
  align-items: center;
}

.share-inputs input {
  min-width: 80px;
}

.review-actions {
  margin-top: 20px;
}

.form-grid {
  display: grid;
  gap: 18px;
}

.form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.wide-form-card {
  max-width: 1100px;
}

.file-upload-box {
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 18px;
  background: #f8fafc;
  margin-bottom: 20px;
}

.file-upload-box label {
  display: block;
  font-weight: 800;
  margin-bottom: 10px;
}

.current-file {
  margin-bottom: 12px;
}

.file-upload-box input[type="file"] {
  width: 100%;
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  padding: 14px;
}

.file-upload-box small {
  display: block;
  color: #64748b;
  margin-top: 10px;
  line-height: 1.6;
}

@media (max-width: 900px) {
  .upload-grid,
  .park-summary-card,
  .form-grid.two,
  .form-grid.three {
    grid-template-columns: 1fr;
  }
}


/* v12 台坪欄位提示 */
.formula-note {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 700;
  line-height: 1.6;
}

.review-table .area-ping-input,
.review-table .ping-input {
  background: #fff;
}


/* v14 PDF parser debug */
.parser-debug-box {
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #fed7aa;
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 18px;
}

.parser-debug-box strong {
  display: block;
  margin-bottom: 8px;
}

.parser-debug-box ul {
  margin: 0;
  padding-left: 20px;
  line-height: 1.7;
}


/* v15 duplicate building_no */
.duplicate-row {
  background: #fff7ed !important;
}

.duplicate-row td {
  background: #fff7ed !important;
}

.badge.duplicate {
  background: #ffedd5;
  color: #c2410c;
}


/* v16 delete rows */
.inline-delete-form {
  display: inline;
  margin: 0;
}

.review-delete-row-btn {
  white-space: nowrap;
}

.small-btn.danger {
  background: #fef2f2 !important;
  color: #b91c1c !important;
  border: 1px solid #fecaca !important;
}

.small-btn.danger:hover {
  background: #fee2e2 !important;
}


/* v17 review delete fix */
.review-delete-row-btn {
  white-space: nowrap;
}

.review-table .row-number {
  white-space: nowrap;
}


/* v18 working search */
.search-active-note {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  padding: 12px 14px;
  margin: 14px 0 18px;
  font-size: 14px;
}

.search-active-note strong {
  font-weight: 800;
}


/* v22 */
.v22-review-table {
  min-width: 1800px;
}

.v22-review-table textarea {
  width: 180px;
  min-height: 72px;
  border: 1px solid #d9e2ef;
  border-radius: 10px;
  padding: 9px 10px;
  resize: vertical;
}

.mini-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.mini-row input {
  min-width: 64px;
}

.mini-row input[type="text"] {
  min-width: 90px;
}

.mini-btn {
  border: 1px solid #d9e2ef;
  background: #fff;
  border-radius: 10px;
  padding: 6px 8px;
  cursor: pointer;
  white-space: nowrap;
}

.mini-btn:hover {
  background: #f4f7fb;
}

.review-table input[type="file"] {
  max-width: 150px;
  font-size: 12px;
}

.current-file {
  margin-bottom: 6px;
  white-space: nowrap;
}

.badge.duplicate {
  background: #ffedd5;
  color: #c2410c;
}

.inline-delete-form {
  display: inline;
  margin: 0;
}

.small-btn.danger {
  background: #fef2f2 !important;
  color: #b91c1c !important;
  border: 1px solid #fecaca !important;
}

.small-btn.danger:hover {
  background: #fee2e2 !important;
}


/* v23 multi common rights */
.mini-row .common-label {
  min-width: 130px;
}


/* v25 dashboard only shows final total ping */
.total-ping-cell {
  font-weight: 800;
  color: #334155;
  white-space: nowrap;
}

.case-table-card th:nth-child(5),
.case-table-card td:nth-child(5) {
  text-align: center;
}


/* v26 case edit other ping */
.edit-detail-section {
  margin: 22px 0;
  padding: 18px;
  border: 1px solid #e5eaf2;
  border-radius: 18px;
  background: #f8fafc;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.section-title-row h3 {
  margin: 0;
  font-size: 18px;
  color: #334155;
}

.edit-detail-section .mini-row {
  margin-bottom: 8px;
}

.edit-detail-section .mini-row input[type="text"] {
  min-width: 180px;
}

.edit-detail-section .mini-row input[type="number"] {
  min-width: 92px;
}

.form-group textarea {
  width: 100%;
  border: 1px solid #d9e2ef;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 15px;
  resize: vertical;
}

.field-help {
  display: block;
  margin-top: 6px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}


/* v27 dashboard sections */
.dashboard-section-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

.dashboard-category-section {
  margin-top: 0;
}

.dashboard-category-section .case-table-title-v10 h3 {
  font-size: 26px;
  letter-spacing: .02em;
}

.dashboard-category-section:nth-child(1) .case-table-title-v10 h3 {
  color: #1d4ed8;
}

.dashboard-category-section:nth-child(2) .case-table-title-v10 h3 {
  color: #047857;
}

.dashboard-category-section:nth-child(3) .case-table-title-v10 h3 {
  color: #9a3412;
}

.case-table-card table {
  min-width: 1280px;
}

.total-ping-cell {
  font-weight: 800;
  color: #334155;
  white-space: nowrap;
  text-align: center;
}


/* v28 always show pagination */
.section-pagination {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.section-pagination .disabled {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #94a3b8;
  font-weight: 700;
}


/* v29 multiple case files */
.multi-downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.multi-downloads .download-link {
  display: inline-flex;
  margin-right: 0;
  white-space: nowrap;
}

.form-group input[type="file"][multiple] {
  padding: 10px;
  background: #f8fafc;
}


/* v30 download route */
.multi-downloads .download-link {
  text-decoration: none;
}
