:root {
  --color-primary: #1f6feb;
  --color-text: #1f2937;
  --color-muted: #667085;
  --color-border: #dbe0e8;
  --color-surface: #ffffff;
  --color-background: #f5f7fb;
  --radius-control: 6px;
  --radius-panel: 9px;
  font-family: Inter, "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  color: #1f2937;
  background: #f5f7fb;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 360px; background: var(--color-background); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.login-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, #f7f9fc 0%, #eef3f9 100%);
}
.login-card {
  width: 420px;
  padding: 40px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, .08);
}
.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: #1f6feb;
  font-size: 22px;
  font-weight: 700;
}
.brand-mark.small { width: 36px; height: 36px; border-radius: 9px; font-size: 17px; }
.login-card h1 { margin: 22px 0 6px; font-size: 24px; }
.login-card > p { margin: 0 0 28px; color: #7b8494; }
.login-card label { display: block; margin-bottom: 16px; font-size: 14px; color: #4b5563; }
.login-card input {
  width: 100%; margin-top: 8px; padding: 11px 12px; border: 1px solid #d9dee8; border-radius: 7px;
  outline: none; transition: border .15s, box-shadow .15s;
}
.login-card input:focus { border-color: #1f6feb; box-shadow: 0 0 0 3px rgba(31,111,235,.1); }
.primary-button, .secondary-button, .danger-button, .success-button, .primary-action {
  min-height: 34px; border-radius: 7px; padding: 7px 14px; font-weight: 500; line-height: 1.2;
}
.primary-button { width: auto; border: 1px solid #1f6feb; background: #1f6feb; color: #fff; }
.login-card .primary-button { width: 100%; }
.primary-action { border: 1px solid #1f6feb; background: #1f6feb; color: #fff; font-weight: 500; }
.primary-action:hover { border-color: #155dcc; background: #155dcc; }
.primary-action:disabled { cursor: not-allowed; opacity: .45; }
.secondary-button { background: #fff; color: #374151; border: 1px solid #d9dee8; }
.success-button { background: #eaf8ef; color: #18864b; }
.danger-button { background: #fff0f0; color: #c83838; }
.text-button { border: 0; background: transparent; color: #667085; padding: 4px 6px; }
.form-error { min-height: 20px; margin-top: 12px; color: #d14343; font-size: 13px; }

.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 232px; background: #fff; border-right: 1px solid #e5e8ef;
  display: flex; flex-direction: column; z-index: 20;
}
.sidebar-brand { height: 68px; display: flex; align-items: center; gap: 12px; padding: 0 18px; border-bottom: 1px solid #eef0f4; }
.sidebar-brand strong { display: block; font-size: 16px; }
.sidebar-brand span { display: block; margin-top: 2px; font-size: 12px; color: #8b94a3; }
#sidebarNav { flex: 1; overflow: auto; padding: 14px 10px; }
.nav-group { margin-top: 6px; }
.nav-group-toggle {
  width: 100%; min-height: 36px; border: 0; background: transparent; padding: 8px 10px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  color: #7b8494; font-size: 12px; text-align: left; border-radius: 6px;
}
.nav-group-toggle:hover { background: #f7f8fa; color: #4b5563; }
.nav-chevron {
  width: 16px; height: 16px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; transition: transform .16s ease;
}
.nav-group.collapsed .nav-chevron { transform: rotate(-90deg); }
.nav-submenu { display: grid; gap: 2px; padding: 1px 0 4px 8px; }
.nav-group.collapsed .nav-submenu { display: none; }
.nav-item {
  width: 100%; border: 0; background: transparent; text-align: left; padding: 9px 12px; margin: 0;
  border-radius: 6px; color: #4b5563; font-size: 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.nav-root { margin-bottom: 8px; }
.nav-group-label { min-width: 0; display: inline-flex; align-items: center; gap: 7px; }
.nav-count {
  flex: 0 0 auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #e5484d; color: #fff; font-size: 11px; font-weight: 700; line-height: 1;
}
.nav-submenu .nav-item { padding-left: 18px; }
.nav-item:hover { background: #f4f6fa; color: #1f2937; }
.nav-item.active { background: #edf4ff; color: #155dcc; font-weight: 600; }
.nav-item:disabled { cursor: default; color: #b3bac5; background: transparent; }
.sidebar-footer { border-top: 1px solid #eef0f4; padding: 14px 16px; display: flex; justify-content: space-between; color: #667085; font-size: 13px; }
.main-area { margin-left: 232px; width: calc(100% - 232px); min-width: 0; }
.page-heading { padding: 24px 28px 0; }
.page-heading h1 { margin: 0; color: var(--color-text); font-size: 22px; font-weight: 650; line-height: 1.4; }
.page-heading p { margin: 7px 0 0; color: var(--color-muted); font-size: 13px; line-height: 1.6; }
.page-content { padding: 18px 28px 40px; }
.page-content > .panel:first-child { margin-top: 0; }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(180px, 1fr)); gap: 16px; }
.stat-card { background: #fff; border: 1px solid #e6e9ef; border-radius: 9px; padding: 20px; }
.stat-label { color: #7b8494; font-size: 13px; }
.stat-value { margin-top: 9px; font-size: 29px; font-weight: 650; letter-spacing: -.5px; }
.stat-note { margin-top: 6px; color: #a0a7b2; font-size: 12px; }
.dashboard-stat-card { min-height: 116px; }
.dashboard-grid { display: grid; gap: 16px; margin-top: 16px; }
.dashboard-grid-main { grid-template-columns: minmax(0, 2fr) minmax(300px, .9fr); }
.dashboard-grid-secondary { grid-template-columns: minmax(0, 1.4fr) minmax(320px, 1fr); }
.chart-card { min-width: 0; background: #fff; border: 1px solid #e6e9ef; border-radius: 9px; padding: 18px 20px; }
.chart-card-header { min-height: 42px; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.dashboard-trend-header { align-items: center; }
.dashboard-trend-tools { display: flex; align-items: center; gap: 10px; }
.dashboard-filter-group { display: inline-flex; padding: 2px; border: 1px solid #e1e5ec; border-radius: 7px; background: #f8f9fb; }
.dashboard-filter-button { border: 0; background: transparent; color: #7b8494; min-width: 44px; height: 26px; padding: 0 9px; border-radius: 5px; font-size: 11px; }
.dashboard-filter-button:hover { color: #42506a; }
.dashboard-filter-button.active { background: #fff; color: #2468c9; box-shadow: 0 1px 3px rgba(15, 23, 42, .08); font-weight: 600; }
.breakdown-header { min-height: 48px; }
.breakdown-tabs .dashboard-filter-button { min-width: 70px; }
.chart-title { font-size: 15px; font-weight: 600; color: #253041; }
.chart-subtitle { margin-top: 5px; color: #98a0ad; font-size: 12px; }
.chart-summary { text-align: right; white-space: nowrap; }
.chart-summary strong { display: block; font-size: 21px; line-height: 1; color: #253041; }
.chart-summary span { display: block; margin-top: 5px; color: #98a0ad; font-size: 11px; }
.trend-chart { min-height: 235px; margin-top: 10px; }
.trend-chart svg { display: block; width: 100%; height: 235px; overflow: visible; }
.trend-grid-line { stroke: #edf0f4; stroke-width: 1; }
.trend-area { fill: rgba(47, 111, 214, .08); }
.trend-line { fill: none; stroke: #2f6fd6; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.trend-point { fill: #fff; stroke: #2f6fd6; stroke-width: 2.5; }
.trend-value { fill: #596273; font-size: 11px; font-weight: 600; }
.trend-x-label, .trend-y-label { fill: #9aa2af; font-size: 10px; }
.chart-empty { height: 220px; display: grid; place-items: center; color: #98a0ad; font-size: 13px; }
.identity-content { display: grid; justify-items: center; gap: 20px; padding: 18px 0 6px; }
.donut-chart { position: relative; width: 154px; height: 154px; border-radius: 50%; display: grid; place-items: center; }
.donut-chart::after { content: ""; position: absolute; width: 96px; height: 96px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgba(230, 233, 239, .55); }
.donut-center { position: relative; z-index: 1; text-align: center; }
.donut-center strong { display: block; font-size: 24px; color: #273142; }
.donut-center span { display: block; margin-top: 3px; color: #98a0ad; font-size: 11px; }
.donut-legend { width: 100%; display: grid; gap: 10px; }
.donut-legend > div { display: grid; grid-template-columns: 10px 1fr auto 36px; align-items: center; gap: 8px; color: #626c7d; font-size: 12px; }
.donut-legend strong { color: #374151; font-weight: 600; }
.donut-legend em { color: #98a0ad; font-style: normal; text-align: right; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: 0 0 auto; }
.legend-dot.normal { background: #cbd5e1; }
.legend-dot.member { background: #2f6fd6; }
.legend-dot.enterprise { background: #36a269; }
.legend-dot.pending { background: #e0a22f; }
.legend-dot.approved { background: #36a269; }
.legend-dot.rejected { background: #d65b5b; }
.application-review-list { display: grid; gap: 14px; padding-top: 16px; }
.application-review-item { border: 1px solid #edf0f4; border-radius: 8px; padding: 16px; background: #fbfcfe; }
.application-review-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.application-review-head > div:first-child strong { display: block; color: #303a4a; font-size: 13px; }
.application-review-head > div:first-child span { display: block; margin-top: 5px; color: #98a0ad; font-size: 11px; }
.application-pending-count { min-width: 82px; text-align: right; }
.application-pending-count span { display: block; color: #9b6c08; font-size: 11px; }
.application-pending-count strong { display: block; margin-top: 2px; color: #c58710; font-size: 24px; line-height: 1; }
.application-rate-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; color: #687385; font-size: 11px; }
.application-rate-meta strong { color: #465165; font-weight: 600; }
.application-rate-track { display: flex; width: 100%; height: 8px; margin-top: 8px; overflow: hidden; border-radius: 999px; background: #edf0f4; }
.application-rate-approved { height: 100%; background: #36a269; }
.application-rate-rejected { height: 100%; background: #d65b5b; }
.application-rate-empty { width: 100%; height: 100%; background: #edf0f4; }
.application-review-foot { display: flex; align-items: center; gap: 18px; margin-top: 10px; color: #7b8494; font-size: 11px; }
.application-review-foot span { display: inline-flex; align-items: center; gap: 6px; }
.progress-list { display: grid; gap: 24px; padding: 24px 2px 8px; }
.progress-item { position: relative; padding-right: 46px; }
.progress-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px; font-size: 12px; }
.progress-meta span { color: #4f5969; }
.progress-meta strong { color: #687385; font-weight: 500; }
.progress-track { height: 7px; overflow: hidden; border-radius: 999px; background: #eef1f5; }
.progress-fill { height: 100%; border-radius: inherit; background: #2f6fd6; }
.progress-percent { position: absolute; right: 0; bottom: -3px; width: 38px; text-align: right; color: #8b94a3; font-size: 11px; }
.panel { margin-top: 18px; background: #fff; border: 1px solid #e6e9ef; border-radius: 9px; overflow: hidden; }
.panel-header { min-height: 57px; padding: 12px 16px; border-bottom: 1px solid #edf0f4; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.panel-title { font-size: 15px; font-weight: 600; }
.filters { display: flex; gap: 8px; align-items: center; justify-content: flex-end; flex-wrap: wrap; max-width: 82%; }
.list-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; }
.list-toolbar-title { white-space: nowrap; }
.list-toolbar-filters { grid-column: 1 / -1; grid-row: 2; min-width: 0; max-width: none; justify-content: flex-start; flex-wrap: wrap; }
.list-toolbar-filters::-webkit-scrollbar { display: none; }
.list-toolbar-actions { grid-column: 2; grid-row: 1; display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.filters input, .filters select {
  height: 34px; flex: 0 0 auto; border: 1px solid var(--color-border); background: var(--color-surface); border-radius: var(--radius-control); padding: 0 10px; color: #374151; font-size: 13px;
}
.filters input { width: 160px; }
.filters input[data-table-search] { width: 190px; }
.filters select { width: auto; min-width: 150px; max-width: 100%; padding-right: 28px; }
.region-cascade { display: inline-flex; align-items: center; gap: 6px; }
.region-cascade input { width: 96px; }
.region-fallback-input { width: 160px !important; }
.filter-note { color: #98a0ad; font-size: 12px; white-space: nowrap; }
.compact-filter-button { height: 34px; padding: 0 11px; white-space: nowrap; }
.table-wrap { overflow: auto; }
.cell-nowrap { white-space: nowrap; }
.cell-wrap { min-width: 180px; overflow-wrap: anywhere; }
.cell-summary { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.6; white-space: pre-wrap; }
.list-scope-note { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid #edf0f4; background: #f5f9ff; color: var(--color-muted); font-size: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; background: #fff; }
th { position: sticky; top: 0; background: #fafbfc; color: #667085; text-align: left; font-weight: 500; padding: 11px 12px; border-bottom: 1px solid #e7eaf0; white-space: nowrap; }
.sort-header { border: 0; background: transparent; color: inherit; padding: 0; font: inherit; display: inline-flex; align-items: center; gap: 4px; }
.sort-header span { color: #a1a8b3; font-size: 11px; }
.sort-header.active { color: #2468c9; font-weight: 600; }
.sort-header.active span { color: #2468c9; }
td { padding: 11px 12px; border-bottom: 1px solid #eef0f4; vertical-align: top; max-width: 300px; }
tr:hover td { background: #fbfcfe; }
.cell-muted { color: #8b94a3; }
.cell-wrap { white-space: normal; line-height: 1.55; }
.code-label-list { display:flex; flex-wrap:wrap; gap:6px; }
.code-label { display:inline-flex; align-items:baseline; gap:5px; padding:4px 8px; border:1px solid #e7eaf0; border-radius:6px; background:#fafbfc; }
.code-label strong { font-size:13px; font-weight:600; color:#273247; }
.code-label small { font-size:11px; color:#8a93a3; }
.ai-knowledge-source { margin-top:16px; }
.ai-knowledge-source summary { cursor:pointer; font-weight:600; color:#273247; }
.ai-knowledge-source-content { margin-top:12px; display:grid; gap:12px; }
.ai-knowledge-table { max-height:360px; }
.table-actions { display: flex; gap: 6px; white-space: nowrap; }
.table-wrap tbody td:last-child > button,
.table-actions button {
  min-height: 30px;
  border: 1px solid #d8dee8;
  border-radius: 6px;
  background: #fff;
  padding: 4px 10px;
  color: #2468c9;
  line-height: 1.2;
  white-space: nowrap;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.table-wrap tbody td:last-child > button:hover,
.table-actions button:hover { border-color: #aebdd2; background: #f7faff; color: #155dcc; }
.table-wrap tbody td:last-child > button:disabled,
.table-actions button:disabled { cursor: not-allowed; opacity: .45; background: #f7f8fa; }
.table-wrap tbody td:last-child > button.danger-link,
.table-actions button.danger-link { border-color: #f0d6d6; color: #c64040; }
.table-wrap tbody td:last-child > button.danger-link:hover,
.table-actions button.danger-link:hover { background: #fff6f6; border-color: #e7bcbc; }
.empty-state { padding: 54px; text-align: center; color: #98a0ad; }
.table-pagination { min-height: 58px; padding: 10px 16px; border-top: 1px solid #edf0f4; display: flex; align-items: center; justify-content: space-between; gap: 16px; background: #fff; }
.pagination-total { color: #7b8494; font-size: 12px; white-space: nowrap; }
.pagination-total strong { color: #374151; }
.pagination-controls { display: flex; align-items: center; gap: 6px; }
.pagination-controls select { height: 32px; border: 1px solid #dbe0e8; border-radius: 6px; background: #fff; color: #4b5563; padding: 0 8px; }
.pager-button { height: 32px; padding: 0 10px; }
.pager-button:disabled { cursor: not-allowed; opacity: .45; }
.pager-number { min-width: 32px; height: 32px; border: 1px solid #dbe0e8; border-radius: 6px; background: #fff; color: #566174; }
.pager-number:hover { border-color: #b8c6da; }
.pager-number.active { border-color: #2468c9; background: #edf4ff; color: #155dcc; font-weight: 600; }
.pager-ellipsis { width: 22px; text-align: center; color: #98a0ad; }

.badge { display: inline-block; padding: 3px 8px; border-radius: 999px; font-size: 12px; line-height: 1.4; white-space: nowrap; }
.badge.green { background: #eaf8ef; color: #18864b; }
.badge.yellow { background: #fff7df; color: #9b6c08; }
.badge.red { background: #fff0f0; color: #c83c3c; }
.badge.blue { background: #edf4ff; color: #155dcc; }
.badge.gray { background: #f0f2f5; color: #667085; }

.drawer { position: fixed; inset: 0; z-index: 50; }
.drawer-mask { position: absolute; inset: 0; background: rgba(15, 23, 42, .22); }
.drawer-panel { position: absolute; top: 0; right: 0; width: min(560px, 100vw); height: 100%; background: #fff; box-shadow: -12px 0 36px rgba(15,23,42,.12); display: flex; flex-direction: column; }
.drawer.drawer-wide .drawer-panel { width:min(720px, calc(100vw - 32px)); }
.drawer-header { height: 64px; border-bottom: 1px solid #e8ebf0; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; }
.drawer-header h3 { margin: 0; font-size: 17px; }
.drawer-content { flex: 1; overflow: auto; padding: 20px; }
.detail-grid { display: grid; grid-template-columns: 140px 1fr; gap: 0; border: 1px solid #e7eaf0; border-radius: 8px; overflow: hidden; }
.detail-key, .detail-value { padding: 10px 12px; border-bottom: 1px solid #edf0f4; line-height: 1.55; }
.detail-key { background: #fafbfc; color: #667085; }
.detail-value { overflow-wrap: anywhere; white-space: pre-wrap; line-height: 1.65; }
.detail-grid > :nth-last-child(-n+2) { border-bottom: 0; }
.drawer-actions { display: flex; gap: 8px; margin-top: 18px; }
.drawer-actions .primary-button { width: auto; }
.admin-action-bar { justify-content: flex-end; align-items: center; }
.admin-detail-stack { display: grid; gap: 16px; }
.admin-detail-section { border: 1px solid #e6e9ef; border-radius: 9px; background: #fff; overflow: hidden; }
.admin-detail-section-title { min-height: 44px; padding: 12px 16px; border-bottom: 1px solid #edf0f4; background: #fafbfc; color: #273247; font-size: 14px; font-weight: 600; }
.admin-detail-section > .detail-grid { border: 0; border-radius: 0; }
.standard-form { display: grid; gap: 14px; padding: 16px; }
.standard-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.standard-form label { min-width: 0; display: grid; gap: 6px; color: #4b5563; font-size: 13px; }
.standard-form .edit-field { margin-top: 0; }
.form-span-2 { grid-column: 1 / -1; }
.readonly-field { min-width: 0; padding: 10px 12px; border: 1px solid #e7eaf0; border-radius: 7px; background: #fafbfc; }
.readonly-field span, .readonly-field strong { display: block; }
.readonly-field span { color: #8a93a3; font-size: 11px; }
.readonly-field strong { margin-top: 5px; color: #344054; font-size: 13px; overflow-wrap: anywhere; }
.field-help { margin-left: 6px; color: #98a0ad; font-size: 11px; font-weight: 400; }

.admin-card-preview { padding: 18px; border: 1px solid #dfe5ee; border-radius: 10px; background: #f8fafc; display: grid; gap: 14px; }
.admin-card-preview-head { display: grid; grid-template-columns: 52px minmax(0,1fr) auto; gap: 12px; align-items: center; }
.admin-card-avatar { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; background: #eef2f7; }
.admin-card-avatar-placeholder { display: grid; place-items: center; color: #4567a8; font-size: 20px; font-weight: 700; }
.admin-card-preview-title { min-width: 0; }
.admin-card-preview-title strong, .admin-card-preview-title span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-card-preview-title strong { color: #253041; font-size: 16px; }
.admin-card-preview-title span { margin-top: 5px; color: #7b8494; font-size: 12px; }
.admin-card-preview-intro { margin: 0; color: #566174; font-size: 13px; line-height: 1.7; white-space: pre-wrap; }
.admin-card-preview-row { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 10px; align-items: start; }
.admin-card-preview-row b { color: #667085; font-size: 12px; font-weight: 600; padding-top: 4px; }
.admin-card-preview-row > div { display: flex; flex-wrap: wrap; gap: 6px; }
.card-preview-chip { display: inline-flex; padding: 4px 8px; border: 1px solid #dbe3ef; border-radius: 999px; background: #fff; color: #4f5f77; font-size: 11px; }
.card-preview-empty { color: #a0a7b2; font-size: 12px; }

textarea.edit-field, input.edit-field, select.edit-field {
  width: 100%; border: 1px solid #dbe0e8; border-radius: 6px; padding: 9px 10px; margin-top: 5px; background: #fff;
}
textarea.edit-field { min-height: 90px; resize: vertical; }
.drawer-region-editor { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.drawer-region-editor .edit-field { margin-top: 0; min-width: 0; }
.drawer-region-editor select:disabled { background: #f5f6f8; color: #a1a8b3; }
.settings-grid { display: grid; grid-template-columns: repeat(3, minmax(260px, 1fr)); gap: 16px; }
.settings-single-column { max-width: 620px; }
.settings-panel { margin-top: 0; }
.settings-form { display: grid; gap: 14px; padding: 18px; }
.settings-form label { color: #4b5563; font-size: 13px; }
.settings-check { display: flex; align-items: center; gap: 7px; }
.muted-code { margin-top:2px; color:#9299a8; font-size:11px; }
.form-section { display:grid; gap:12px; padding:0 0 18px; border-bottom:1px solid #edf0f4; }
.form-section + .form-section { padding-top:18px; }
.form-section h4 { margin:0; font-size:14px; color:#273247; }
.settings-inline-checks { display:flex; flex-wrap:wrap; gap:16px; }
.profile-option-list { display:grid; gap:8px; }
.profile-option-row { display:grid; grid-template-columns:minmax(0, 1fr) 92px auto; gap:8px; align-items:center; padding:10px; border:1px solid #e7eaf0; border-radius:8px; }
.profile-option-main { min-width:0; display:grid; gap:8px; }
.profile-option-main .edit-field { width:100%; min-width:0; }
.profile-option-create { display:grid; grid-template-columns:minmax(0, 1fr) minmax(0, 1fr) 92px auto; gap:8px; align-items:end; margin-top:10px; }
.profile-option-create .edit-field { min-width:0; }
.activity-region-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.activity-region-fields .edit-field { min-width: 0; }
.settings-note { color: #8b94a3; font-size: 12px; line-height: 1.5; }
.settings-metric { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 12px; border: 1px solid #e7eaf0; border-radius: 7px; background: #fafbfc; font-size: 13px; color: #5f6979; }
.settings-metric strong { color: #253041; font-size: 18px; font-weight: 650; }
.dashboard-map-card { margin-top: 16px; }
.dashboard-map-empty { min-height: 120px; display: flex; align-items: center; justify-content: center; padding: 32px; text-align: center; color: #8b94a3; }
.dashboard-map-room-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 14px 18px 18px; border-top: 1px solid #edf0f4; }
.dashboard-map-room-list > div { min-width: 0; padding: 10px 12px; border: 1px solid #e7eaf0; border-radius: 7px; background: #fafbfc; }
.dashboard-map-room-list strong, .dashboard-map-room-list span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-map-room-list strong { color: #253041; font-size: 13px; }
.dashboard-map-room-list span { margin-top: 5px; color: #7b8492; font-size: 12px; }
.log-detail { margin-top: 16px; }
.log-detail pre { margin: 0; padding: 14px; overflow: auto; border: 1px solid #e7eaf0; border-radius: 7px; background: #f8f9fb; color: #4b5563; font-size: 12px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.fixed-import-form { display: grid; gap: 16px; }
.fixed-import-intro { display: grid; gap: 6px; padding: 14px; border: 1px solid #e7eaf0; border-radius: 8px; background: #fafbfc; }
.fixed-import-intro strong { color: #253041; font-size: 14px; }
.fixed-import-intro span { color: #7b8494; font-size: 12px; line-height: 1.6; }
.fixed-import-actions { display: flex; align-items: center; gap: 8px; }
.fixed-import-form label { display: grid; gap: 7px; color: #4b5563; font-size: 13px; }
.import-file-input { width: 100%; min-width: 0; padding: 9px 10px; border: 1px solid #dbe0e8; border-radius: 7px; background: #fff; }
.import-preview { display: grid; gap: 18px; }
.import-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.import-summary-grid > div { min-width: 0; padding: 12px; border: 1px solid #e7eaf0; border-radius: 7px; background: #fafbfc; }
.import-summary-grid span, .import-summary-grid strong { display: block; }
.import-summary-grid span { color: #7b8494; font-size: 11px; }
.import-summary-grid strong { margin-top: 5px; overflow: hidden; text-overflow: ellipsis; color: #253041; font-size: 14px; white-space: nowrap; }
.import-section { padding-top: 2px; }
.import-section > .panel-title { margin-bottom: 8px; }
.import-target-label { display: grid; grid-template-columns: 82px minmax(0, 240px); align-items: center; gap: 10px; color: #4b5563; font-size: 13px; }
.import-target-label .edit-field { margin-top: 0; }
.import-mapping-table { max-height: 320px; margin-top: 10px; border: 1px solid #e7eaf0; border-radius: 7px; }
.import-map-select { min-width: 220px; margin: 0 !important; }
.import-preview-table { max-height: 360px; margin-top: 10px; border: 1px solid #e7eaf0; border-radius: 7px; }
.import-preview-table td { min-width: 110px; }
.import-invalid-row td { background: #fff9f9; }
.import-error-text { color: #c83c3c; }
.import-warning-text { color: #a66a00; }
.import-ok-text { color: #18864b; }
.import-completed-note { padding: 12px 14px; border: 1px solid #cfe8d8; border-radius: 7px; background: #f1faf4; color: #26734a; font-size: 13px; }
.media-thumb { display: block; width: 54px; height: 54px; border-radius: 7px; object-fit: cover; background: #f2f4f7; }
.media-video-tag { display: inline-flex; align-items: center; justify-content: center; width: 54px; height: 54px; border-radius: 7px; background: #f1f3f6; color: #697386; font-size: 12px; }
.media-detail-image, .media-detail-video { display: block; width: 100%; max-height: 360px; margin-bottom: 16px; border: 1px solid #e6e9ef; border-radius: 9px; background: #0f172a; object-fit: contain; }
.media-preview-unavailable { margin-bottom: 16px; padding: 34px 20px; border: 1px dashed #d9dee7; border-radius: 8px; background: #fafbfc; color: #8b94a3; text-align: center; }

.toast { position: fixed; right: 22px; bottom: 22px; z-index: 80; min-width: 220px; max-width: 420px; background: #1f2937; color: #fff; border-radius: 7px; padding: 11px 14px; box-shadow: 0 8px 28px rgba(15,23,42,.18); font-size: 13px; }
.engagement-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.engagement-actions { display: flex; align-items: center; gap: 10px; margin: 12px 0; }
.engagement-actions .edit-field { flex: 1; min-width: 0; margin: 0; }
.settings-form fieldset { border: 1px solid #e5e9f1; padding: 16px; border-radius: 8px; min-width: 0; margin: 10px 0; }
.settings-form fieldset label { margin-top: 10px; }
.settings-form legend { font-weight: 600; font-size: 14px; color: #3e4c66; padding: 0 6px; }
.form-hint { color: #778298; font-size: 12px; line-height: 1.8; }
.engagement-settings { max-width: 580px; }
.engagement-notice { color: #536794; background: #eef3ff; border: 1px solid #dce5fa; border-radius: 8px; padding: 16px; font-size: 13px; margin-bottom: 18px; line-height: 1.7; }
.content-media-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.content-media-item { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.content-media-item img, .content-media-item video { width: 100%; height: 130px; object-fit: contain; background: #f3f5f9; border-radius: 7px; }
.content-media-item span { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-label { display: block; padding: 12px; border: 1px dashed #cbd5e4; border-radius: 8px; font-size: 13px; }
.upload-label input { display: block; margin-top: 10px; max-width: 100%; }
.selection-results { display: grid; max-height: 240px; overflow-y: auto; gap: 6px; font-size: 12px; }
.selection-results button { text-align: left; padding: 10px 12px; border: 1px solid #dbe0e8; border-radius: 7px; background: #fff; color: #374151; }
.selection-results button:hover { border-color: #b8c6da; background: #f7faff; }
.selection-results small { display: block; color: #7b879a; margin-top: 5px; }
.selected-members { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.selected-members button { border: 1px solid #d8e1f5; border-radius: 999px; padding: 6px 10px; color: #405cc7; background: #eef2ff; }
.compact-action-button { width: auto; min-height: 30px; padding: 4px 10px; font-size: 12px; }
.settings-form .form-error { white-space: pre-wrap; font-size: 13px; color: #bb4343; }
.activity-workspace { width:100%; max-width:1180px; margin:0 auto; display:grid; gap:16px; }
.workspace-header { display:flex; align-items:flex-start; gap:14px; min-width:0; }
.workspace-heading { min-width:0; }
.workspace-heading h2 { margin:0; color:#273247; font-size:20px; }
.workspace-heading p { margin:4px 0 0; color:#8a93a3; font-size:12px; }
.activity-workspace-body, .activity-editor-page { min-width:0; display:grid; gap:16px; }
.workspace-card { min-width:0; padding:20px; background:#fff; border:1px solid #e8ebf0; border-radius:10px; display:grid; gap:14px; }
.workspace-card h3 { margin:0; color:#273247; font-size:15px; }
.workspace-card label { min-width:0; display:grid; gap:7px; color:#4b5563; font-size:13px; }
.field-label { color:#4b5563; font-size:13px; }
.field-label small { margin-left:5px; color:#8a93a3; font-weight:400; }
.activity-form-grid { min-width:0; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.activity-type-options { display:flex; flex-wrap:wrap; gap:8px; }
.activity-type-option { min-width:0; display:inline-flex !important; grid-template-columns:none; align-items:center; gap:7px !important; padding:8px 10px; border:1px solid #e7eaf0; border-radius:8px; background:#fafbfc; cursor:pointer; }
.activity-type-option:has(input:checked) { border-color:#9aaee8; background:#f2f5ff; }
.activity-type-option input { margin:0; }
.activity-type-option span { min-width:0; color:#344054; }
.activity-type-option small { margin-left:4px; color:#9299a8; font-size:11px; }
.activity-place-card { min-width:0; padding:12px; border:1px solid #e7eaf0; border-radius:8px; background:#fafbfc; display:grid; gap:4px; color:#4b5563; }
.activity-place-card strong { color:#273247; }
.activity-place-card small { color:#8a93a3; overflow-wrap:anywhere; }
.activity-map-preview { margin-top:10px; width:100%; height:320px; overflow:hidden; border:1px solid #dfe5ee; border-radius:8px; background:#eef2f7; }
.activity-map-preview img { display:block; width:100%; height:100%; object-fit:cover; }
.activity-map-loading, .activity-map-unavailable { min-height:110px; display:flex; align-items:center; justify-content:center; padding:18px; color:#8a93a3; text-align:center; }
.activity-map-preview .activity-map-loading, .activity-map-preview .activity-map-unavailable { height:100%; min-height:0; }
.activity-tabs { display:flex; flex-wrap:wrap; gap:8px; padding:4px 0; }
.activity-tabs button { padding:8px 13px; border:1px solid #e1e6ee; background:#fff; color:#667085; }
.activity-tabs button.active { border-color:#b8c5e9; background:#f1f4ff; color:#334ca5; font-weight:700; }
.workspace-footer { display:flex; justify-content:flex-end; }
.activity-post-composer textarea { min-height:100px; }
.notify-mode-group { display:flex; flex-wrap:wrap; gap:14px; }
.notify-mode-group label { display:inline-flex; align-items:center; gap:6px; }
.activity-post-list { display:grid; gap:12px; }
.activity-post-item { min-width:0; padding:14px; border:1px solid #e7eaf0; border-radius:9px; background:#fafbfc; }
.activity-post-item.is-disabled { opacity:.62; background:#f4f5f7; }
.activity-post-item p { margin:10px 0 0; line-height:1.7; white-space:pre-wrap; overflow-wrap:anywhere; }
.activity-post-meta { display:flex; align-items:center; justify-content:space-between; gap:12px; color:#8a93a3; font-size:12px; }
.activity-post-meta strong { color:#344054; font-size:13px; }
.activity-post-media { margin-top:10px; display:grid; grid-template-columns:repeat(auto-fill,minmax(140px,1fr)); gap:8px; }
.activity-post-media img, .activity-post-media video { width:100%; height:150px; object-fit:contain; border-radius:7px; background:#f1f3f6; }
.loading { padding: 54px; text-align: center; color: #8b94a3; }

@media (max-width: 1300px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-map-room-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .activity-form-grid { grid-template-columns:1fr; }
  .workspace-header { flex-direction:column; }
  .engagement-actions { align-items:stretch; flex-direction:column; }
}

@media (max-width: 760px) {
  .profile-option-row, .profile-option-create { grid-template-columns:1fr; }
}

.points-admin-tabs { display: flex; gap: 8px; margin: 0; padding: 14px 16px; border-bottom: 1px solid #edf0f4; }
.points-admin-tabs button { width: auto; flex: 0 0 auto; font-size: 13px; }
.points-admin-search { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0; padding: 12px 16px; border-bottom: 1px solid #edf0f4; }
.points-admin-search .edit-field { width: 150px; min-width: 0; height: 34px; margin: 0; padding: 0 10px; font-size: 13px; }
.points-admin-search input[name="keyword"] { width: 190px; }
.points-admin-search .primary-button { width: auto; height: 34px; padding: 0 14px; font-size: 13px; flex: 0 0 auto; }
.points-admin-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; margin-bottom: 18px; }
.points-admin-metrics .panel { margin: 0; padding: 20px; }
.points-admin-metrics small { color: #7b8494; font-size: 13px; }
.points-admin-metrics h2 { margin: 9px 0 0; font-size: 29px; font-weight: 650; letter-spacing: -.5px; }
.points-admin-pager { display: flex; gap: 10px; align-items: center; justify-content: flex-end; padding: 12px 16px; color: #667085; font-size: 13px; }
.points-admin-pager button { height: 32px; padding: 0 12px; font-size: 13px; }
.points-setting-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px; border-bottom: 1px solid #edf0f4; }
.points-setting-row:last-child { border-bottom: 0; }
.points-setting-row .form-hint { margin: 8px 0 0; }
.points-setting-row button { flex: 0 0 auto; width: auto; font-size: 13px; }
.points-detail { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; }
@media(max-width:800px) { .points-admin-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); } }

/* Shared states and responsive layouts across all administration pages. */
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--color-primary); outline-offset: 2px;
}
button:disabled { cursor: not-allowed; opacity: .55; }
.primary-button, .primary-action { border: 1px solid var(--color-primary); background: var(--color-primary); color: #fff; }
.primary-button, .secondary-button, .danger-button, .success-button, .primary-action { font-size: 13px; border-radius: var(--radius-control); }
input.edit-field, select.edit-field, textarea.edit-field { font-size: 13px; line-height: 1.5; color: var(--color-text); border-color: var(--color-border); }
input.edit-field, select.edit-field { min-height: 36px; }
.settings-form > label:not(.settings-check) { display: grid; gap: 6px; }
.settings-form > label .edit-field { margin-top: 0; }
.form-hint { color: var(--color-muted); font-size: 12px; line-height: 1.6; margin: 0; }
.form-error:empty { display: none; }
.pending-panel { margin-bottom: 20px; padding: 18px; background: var(--color-surface); border: 1px solid #e6e9ef; border-radius: var(--radius-panel); }
.pending-header { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.pending-header h2 { margin: 0; font-size: 15px; font-weight: 600; }
.pending-header > span { color: var(--color-muted); font-size: 12px; }
.pending-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.pending-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 14px; border: 1px solid #e6e9ef; border-radius: var(--radius-control); background: #fafbfc; color: var(--color-text); text-align: left; }
.pending-card span { font-size: 13px; }
.pending-card strong { font-size: 22px; font-weight: 650; }
.pending-card small { grid-column: 1 / -1; color: var(--color-muted); font-size: 11px; line-height: 1.5; }
.pending-card.has-pending { background: #f5f9ff; border-color: #d5e3fa; }
.pending-card.has-pending strong { color: var(--color-primary); }
.pending-card:hover { border-color: var(--color-primary); }
.pending-error { margin: 12px 0 0; color: #a56520; font-size: 12px; }
@media (max-width: 1100px) {
  .pending-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid-main, .dashboard-grid-secondary { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-heading { padding: 20px 20px 0; }
  .page-content { padding: 16px 20px 32px; }
}
@media (max-width: 760px) {
  .sidebar { width: 172px; }
  .sidebar-brand { padding: 0 12px; }
  .main-area { margin-left: 172px; width: calc(100% - 172px); }
  .page-heading { padding: 16px 12px 0; }
  .page-content { padding: 14px 12px 24px; }
  .list-toolbar { grid-template-columns: 1fr; }
  .list-toolbar-actions { grid-column: 1; grid-row: 3; justify-content: flex-start; }
  .table-pagination { flex-wrap: wrap; }
  .pagination-controls { flex-wrap: wrap; }
  .settings-grid, .standard-form-grid { grid-template-columns: 1fr; }
  .form-span-2 { grid-column: 1; }
  .chart-card-header, .dashboard-trend-tools { flex-wrap: wrap; }
  .points-setting-row { flex-wrap: wrap; gap: 12px; }
  .drawer-panel, .drawer-wide .drawer-panel { max-width: 100vw; }
}
@media (max-width: 520px) {
  .sidebar { position: static; width: 100%; height: auto; }
  .app-shell { display: block; }
  .sidebar-brand, .sidebar-footer { height: auto; padding: 12px; }
  .sidebar nav { max-height: 230px; overflow: auto; }
  .main-area { margin-left: 0; width: 100%; }
  .pending-grid, .stat-grid, .points-admin-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .login-card { width: calc(100% - 32px); padding: 28px; }
  .detail-grid { grid-template-columns: 96px minmax(0, 1fr); }
}

/* Exchange tabs share the same card and controls as other admin lists. */
.points-admin-tabs { margin: 0; padding: 12px 16px; background: #fff; border-radius: var(--radius-panel, 10px) var(--radius-panel, 10px) 0 0; }
.points-admin-tabs button { border: 1px solid var(--border, #dce2ec); border-radius: 6px; padding: 7px 14px; background: #fff; color: #64748b; }
.points-admin-tabs button.active { background: #edf4ff; border-color: #b8d0ff; color: #1765da; }
.exchange-search { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.exchange-search input { width: 220px; }
.points-admin-pager { border-top: 1px solid #edf0f5; padding: 12px 16px; gap: 8px; flex-wrap: wrap; }

.workflow-confirm { width: min(420px, calc(100vw - 32px)); padding: 24px; border: 1px solid #e1e6ee; border-radius: 10px; color: #1e293b; box-shadow: 0 16px 48px #18243d26; }
.workflow-confirm::backdrop { background: #18243d55; }
.workflow-confirm h2 { margin: 0 0 16px; font-size: 18px; }
.workflow-confirm p { line-height: 1.7; margin: 0 0 24px; }
/* Unified editor surfaces and business forms. */
.activity-workspace { max-width: none; gap: 16px; }
.workspace-header { align-items: center; padding: 16px 20px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-panel); }
.workspace-heading h2 { font-size: 18px; }
.activity-workspace > .activity-tabs { padding: 10px 16px; background: white; border: 1px solid var(--color-border); border-radius: var(--radius-panel); }
.activity-tabs button { border-radius: var(--radius-control); }
.activity-editor-page { grid-template-columns: minmax(0, 3fr) minmax(280px, 2fr); align-items: start; }
.activity-editor-page > .workspace-card:nth-of-type(n+3), .activity-editor-page > .workspace-footer, .activity-editor-page > .form-error { grid-column: 1 / -1; }
.workspace-card { padding: 20px 24px; border-color: var(--color-border); border-radius: var(--radius-panel); gap: 16px; }
.workspace-card h3 { padding-bottom: 12px; border-bottom: 1px solid #edf0f5; color: var(--color-text); font-size: 16px; }
.workspace-card > .form-hint { margin: -6px 0 0; }
.workspace-card .edit-field { width: 100%; min-width: 0; border: 1px solid var(--color-border); border-radius: var(--radius-control); padding: 9px 11px; font-size: 14px; background: #fff; }
.workspace-card textarea.edit-field { min-height: 110px; resize: vertical; line-height: 1.6; }
.workspace-card label.settings-check { display: flex; align-items: center; flex-direction: row; gap: 8px; }
.workspace-card input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--color-primary); }
.activity-type-options { gap: 8px; }
.activity-type-option { border-radius: 6px; background: #fff; padding: 7px 10px; }
.activity-type-option:has(input:checked) { background: #edf4ff; border-color: #98bafb; }
.activity-editor-page .workspace-footer { position: sticky; bottom: 0; z-index: 8; padding: 14px 20px; background: #fff; border: 1px solid var(--color-border); border-radius: 8px; box-shadow: 0 -4px 20px #18243d08; }
#activity-place-fields { display: grid; gap: 16px; min-width: 0; }
#activity-place-fields[hidden], #field-options[hidden] { display: none; }
.activity-place-search { display: grid; grid-template-columns: minmax(0,1fr) auto auto; }
.activity-place-picker-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(260px, 1fr); gap: 12px; align-items: stretch; }
.activity-place-candidates { min-width: 0; border: 1px solid var(--color-border); border-radius: 8px; padding: 14px; background: #fff; }
.activity-place-candidates h4 { margin: 0 0 12px; font-size: 14px; }
.activity-place-candidates .selection-results { grid-template-columns: minmax(0,1fr); max-height: 380px; }
.engagement-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.engagement-actions .edit-field { flex: 1 1 240px; width: auto; }
.selection-results { max-height: 350px; overflow-y: auto; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.selection-results button { text-align: left; display: grid; gap: 5px; padding: 12px; border: 1px solid var(--color-border); border-radius: 6px; background: #fff; }
.selection-results small, .selection-results span { color: var(--color-muted); font-size: 12px; }
.activity-place-card { background: #fff; gap: 10px; padding: 16px; }
.place-details { display: grid; gap: 6px; }
.interactive-map { position: relative; height: 380px; cursor: grab; touch-action: none; margin: 0; isolation: isolate; background: #edf1f6; }
.interactive-map.is-dragging { cursor: grabbing; }
.interactive-map:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.map-image-layer { position: absolute; inset: 0; overflow: hidden; }
.map-image-layer img { width: 100%; height: 100%; object-fit: fill; user-select: none; pointer-events: none; will-change: transform; transform: translateZ(0); }
.map-center-pin { position: absolute; z-index: 4; top: 50%; left: 50%; width: 30px; height: 42px; transform: translate(-50%,-100%); pointer-events: none; filter: drop-shadow(0 3px 4px #0f172a38); }
.map-center-pin::before { content: ''; position: absolute; left: 4px; top: 0; width: 22px; height: 22px; border-radius: 50% 50% 50% 0; background: var(--color-primary); border: 3px solid #fff; transform: rotate(-45deg); box-sizing: border-box; }
.map-center-pin span { position: absolute; z-index: 1; left: 12px; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: #fff; }
.map-center-pin::after { content: ''; position: absolute; left: 11px; bottom: 0; width: 8px; height: 3px; border-radius: 50%; background: #0f172a35; }
.map-zoom-controls { position: absolute; z-index: 5; right: 14px; top: 14px; display: grid; overflow: hidden; border: 1px solid #d7dee9; border-radius: 8px; background: #fff; box-shadow: 0 2px 10px #1720331a; }
.map-zoom-controls button { width: 38px; height: 36px; border: 0; background: #fff; color: #26364d; font-size: 22px; line-height: 1; cursor: pointer; }
.map-zoom-controls button + button { border-top: 1px solid #e4e9f0; }
.map-zoom-controls button:hover { background: #f5f8fc; color: var(--color-primary); }
.map-loading { position: absolute; z-index: 6; left: 50%; bottom: 14px; transform: translateX(-50%); width: max-content; max-width: calc(100% - 28px); background: #fffffff2; color: #475569; padding: 7px 12px; border: 1px solid #e1e7ef; border-radius: 18px; box-shadow: 0 2px 8px #17203316; cursor: default; pointer-events: none; font-size: 12px; }
.venue-save-fields { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,2fr) auto; gap: 12px; align-items: end; }
.venue-save-fields .form-error { grid-column: 1 / -1; margin: 0; }
.field-options-list { display: grid; gap: 10px; margin-bottom: 16px; }
.field-option { display: grid; grid-template-columns: minmax(0,1fr) auto 70px; gap: 10px; align-items: center; }
.field-option input.option-sort { width: 70px; }
.log-technical { padding: 18px; border: 1px solid var(--color-border); border-radius: 8px; margin-top: 20px; }
.log-technical pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; color: var(--color-muted); }
.media-load-error { display: flex; align-items: center; gap: 8px; padding: 8px; font-size: 12px; color: #b42318; background: #fff4f2; flex-wrap: wrap; }
@media(max-width:1050px) { .activity-editor-page { grid-template-columns: minmax(0,1fr); } .venue-save-fields { grid-template-columns: minmax(0,1fr); } }
@media(max-width:760px) { .activity-place-picker-layout { grid-template-columns: minmax(0,1fr); } .activity-place-candidates .selection-results { max-height: 240px; } }
@media(max-width:620px) { .workspace-header { flex-wrap: wrap; } .workspace-card { padding: 16px; } .selection-results { grid-template-columns: minmax(0,1fr); } .interactive-map { height: 300px; } .activity-place-search { grid-template-columns: minmax(0,1fr) auto; } .activity-place-search input { grid-column: 1 / -1; } }

@media(min-width:1051px) {
  .activity-editor-page > .workspace-card:nth-of-type(1) { grid-column: 1; grid-row: 1 / span 2; }
  .activity-editor-page > .workspace-card:nth-of-type(2) { grid-column: 2; grid-row: 1; }
  .activity-editor-page > .workspace-card:nth-of-type(3) { grid-column: 1 / -1; grid-row: 3; }
  .activity-editor-page > .workspace-card:nth-of-type(4) { grid-column: 2; grid-row: 2; }
  .activity-editor-page > .workspace-card:nth-of-type(4) .activity-form-grid { grid-template-columns: minmax(0,1fr); }
}


.card-template-page { display: grid; gap: 16px; }
.card-template-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px; }
.card-template-toolbar .panel-title { margin: 0; }
.card-template-page-note { margin: 6px 0 0; color: var(--color-muted); font-size: 13px; line-height: 1.6; }
.card-template-toolbar-actions, .card-template-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.card-template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.card-template-item { min-width: 0; padding: 14px; border: 1px solid var(--color-border); border-radius: 10px; background: #fff; display: grid; gap: 12px; }
.card-template-preview {
  --card-primary:#17284A;
  --card-secondary:#697997;
  --card-accent:#405CC7;
  --card-badge-bg:#405CC7;
  --card-badge-text:#FFFFFF;
  --card-tag-bg:#EDF2FF;
  --card-tag-text:#3653B9;
  --card-ticker-bg:rgba(226,233,255,.82);
  --card-ticker-text:#314B9F;
  --card-panel-bg:rgba(255,255,255,.62);
  --card-panel-border:rgba(64,92,199,.14);
  position: relative;
  min-height: 318px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 16px;
  color: var(--card-primary);
  box-shadow: 0 12px 32px rgba(30,45,82,.10);
}
.card-template-preview.compact { min-height: 280px; }
.card-template-decoration { position: absolute; pointer-events: none; border-radius: 999px; }
.card-template-decoration-one { top: -60px; right: -36px; width: 130px; height: 130px; background: var(--card-accent); opacity: .08; }
.card-template-decoration-two { right: 30px; bottom: -75px; width: 105px; height: 105px; border: 1px solid var(--card-accent); opacity: .09; }
.card-template-layout-accent { display: none; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--card-accent); z-index: 2; }
.card-template-layout-minimal { box-shadow: 0 4px 14px rgba(30,45,82,.06); }
.card-template-layout-minimal .card-template-decoration { display: none; }
.card-template-layout-split { padding-left: 21px; }
.card-template-layout-split .card-template-layout-accent { display: block; }

.card-template-real-header { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; }
.card-template-real-avatar {
  flex: none;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.20);
  border-radius: 13px;
  background: rgba(255,255,255,.16);
  color: var(--card-primary);
  font-size: 16px;
  font-weight: 700;
}
.card-template-real-title-wrap { min-width: 0; flex: 1; }
.card-template-real-title-wrap strong,
.card-template-real-title-wrap span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-template-real-title-wrap strong { color: var(--card-primary); font-size: 17px; line-height: 1.28; }
.card-template-real-title-wrap span { margin-top: 3px; color: var(--card-secondary); font-size: 12px; line-height: 1.35; }
.card-template-real-identity {
  flex: none;
  align-self: flex-start;
  margin-top: 1px;
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--card-badge-bg);
  color: var(--card-badge-text);
  font-size: 10px;
  line-height: 1;
  font-weight: 650;
}
.card-template-real-meta { position: relative; z-index: 1; display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-top: 11px; color: var(--card-secondary); font-size: 11px; }
.card-template-real-meta i { width: 3px; height: 3px; border-radius: 50%; background: var(--card-accent); opacity: .72; }
.card-template-real-intro { position: relative; z-index: 1; margin: 12px 0 0; color: var(--card-primary); font-size: 13px; line-height: 1.65; }
.card-template-real-section { position: relative; z-index: 1; margin-top: 14px; }
.card-template-real-section > b { display: block; margin-bottom: 7px; color: var(--card-secondary); font-size: 11px; font-weight: 650; }
.card-template-real-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.card-template-real-tags span { box-sizing: border-box; padding: 5px 8px; border-radius: 999px; background: var(--card-tag-bg); color: var(--card-tag-text); font-size: 10.5px; white-space: nowrap; }
.card-template-real-resource-grid { position: relative; z-index: 1; display: flex; gap: 7px; margin-top: 14px; }
.card-template-real-resource-panel {
  min-width: 0;
  flex: 1;
  padding: 10px;
  border: 1px solid var(--card-panel-border);
  border-radius: 11px;
  background: var(--card-panel-bg);
}
.card-template-real-resource-panel > b { display: flex; align-items: center; gap: 5px; margin-bottom: 7px; color: var(--card-secondary); font-size: 10.5px; font-weight: 650; }
.card-template-real-resource-panel > b i { width: 5px; height: 5px; border-radius: 50%; }
.card-template-real-resource-panel > b i.provide { background: #59A987; }
.card-template-real-resource-panel > b i.seeking { background: #D28A5F; }
.card-template-real-ticker {
  position: relative;
  z-index: 1;
  min-height: 36px;
  margin: 15px -16px -16px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  border-top: 1px solid rgba(255,255,255,.14);
  background: var(--card-ticker-bg);
  color: var(--card-ticker-text);
  font-size: 11px;
  line-height: 1.4;
}
.card-template-meta { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.card-template-meta > div { min-width: 0; display: grid; gap: 3px; }
.card-template-meta strong { color: var(--color-text); font-size: 15px; overflow-wrap: anywhere; }
.card-template-number { color: var(--color-muted); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; }
.card-template-submeta { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; color: var(--color-muted); font-size: 12px; }
.card-template-actions { justify-content: flex-end; padding-top: 2px; }
.card-template-editor { display: grid; gap: 20px; }
.card-template-editor-preview { max-width: 560px; width: 100%; margin: 0 auto; }
.card-template-editor-form { display: grid; gap: 18px; }
.card-template-identity-fields { margin: 0; padding: 14px; border: 1px solid var(--color-border); border-radius: 8px; display: flex; gap: 18px; flex-wrap: wrap; }
.card-template-identity-fields legend { padding: 0 6px; color: #667085; font-size: 12px; font-weight: 600; }
.card-template-identity-fields label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.card-template-style-field { display: grid; gap: 6px; }
.card-template-style-label { color: #344054; font-size: 13px; font-weight: 600; }
.card-template-style-control { display: grid; grid-template-columns: 46px minmax(0,1fr); gap: 8px; align-items: stretch; }
.card-template-style-field.is-background .card-template-style-control { grid-template-columns: 88px minmax(0,1fr); }
.card-template-color-swatch {
  position: relative;
  min-height: 42px;
  overflow: hidden;
  border: 1px solid #D0D5DD;
  border-radius: 8px;
  background-color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.35);
  cursor: pointer;
}
.card-template-color-swatch::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(45deg, rgba(152,162,179,.14) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(152,162,179,.14) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(152,162,179,.14) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(152,162,179,.14) 75%);
  background-size: 12px 12px;
  background-position: 0 0, 0 6px, 6px -6px, -6px 0;
  mix-blend-mode: multiply;
  opacity: .28;
}
.card-template-color-swatch input[type="color"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}
.card-template-style-text { min-width: 0; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.card-template-style-field small { display: block; color: var(--color-muted); font-size: 11px; line-height: 1.4; }

@media(max-width:720px) {
  .card-template-toolbar { align-items: stretch; flex-direction: column; }
  .card-template-toolbar-actions { justify-content: flex-end; }
  .card-template-grid { grid-template-columns: minmax(0,1fr); }
  .card-template-preview { min-height: 300px; padding: 14px; }
  .card-template-layout-split { padding-left: 19px; }
  .card-template-real-resource-grid { flex-direction: column; }
  .card-template-real-ticker { margin: 15px -14px -14px; padding: 0 14px; }
}

[hidden] { display: none !important; }

.workflow-confirm { z-index: 10000; }
