/* Reusable admin · Apple-inspired compact operations UI
   DESIGN (1).md의 색상, 타이포그래피, 절제된 표면과 넉넉한 클릭 영역을
   영업용 고밀도 관리자 화면에 맞게 조정한다. */

:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --sidebar: #111113;
  --sidebar-soft: #2c2c2e;
  --text: #1d1d1f;
  --body-text: #515154;
  --muted: #6e6e73;
  --line: #d9d9de;
  --accent: #0071e3;
  --accent-strong: #0066cc;
  --accent-weak: #eaf4ff;
  --accent-weak-text: #0066cc;
  --danger: #ff3b30;
  --danger-weak: #fff0ef;
  --success: #218739;
  --success-weak: #edf8ef;
  --shadow: none;
}

html.adm-theme-dark {
  --bg: #1c1c1e;
  --surface: #2c2c2e;
  --sidebar: #111113;
  --sidebar-soft: #3a3a3c;
  --text: #f5f5f7;
  --body-text: #d1d1d6;
  --muted: #98989d;
  --line: #48484a;
  --accent-weak: #173a5f;
  --accent-weak-text: #64a8ff;
}

html { background: var(--bg); }
body {
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", Pretendard, "Segoe UI", sans-serif;
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: -.012em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input, select, textarea { font: inherit; }
button, a, input, select, textarea {
  transition: background-color .14s ease, border-color .14s ease, color .14s ease, opacity .14s ease;
}
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(0, 113, 227, .25);
  outline-offset: 2px;
}

input, select, textarea {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
}
textarea { padding-block: 10px; line-height: 1.55; }
input::placeholder, textarea::placeholder { color: #98989d; }
input:hover, select:hover, textarea:hover { border-color: #b8b8bd; background: var(--surface); }
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, .1);
}

.adm-shell { grid-template-columns: 244px minmax(0, 1fr); }
.adm-sidebar {
  padding: 16px 13px;
  border-right: 0;
  background: var(--sidebar);
  color: #f5f5f7;
}
.adm-brand { gap: 10px; padding: 4px 7px 17px; }
.adm-brand-mark {
  width: 38px;
  height: 38px;
  flex-basis: 38px;
  border-radius: 11px;
  background: var(--accent);
  color: #fff;
  font-size: 18px;
}
.adm-brand-copy { gap: 0; }
.adm-brand-copy strong { color: #fff; font-size: 18px; font-weight: 700; letter-spacing: -.025em; }
.adm-brand-copy small { color: #98989d; font-size: 11px; }
.adm-sidebar-toggle {
  width: 32px;
  height: 32px;
  border: 1px solid #38383a;
  border-radius: 9px;
  background: #222224;
  color: #d1d1d6;
}
.adm-sidebar-toggle:hover { background: var(--sidebar-soft); color: #fff; }
.adm-nav { gap: 2px; }
.adm-nav > a, .adm-nav-parent {
  min-height: 40px;
  gap: 9px;
  padding: 0 10px;
  border-radius: 10px;
  color: #b9b9bf;
  font-size: 13.5px;
  font-weight: 600;
}
.adm-nav > a:hover, .adm-nav-parent:hover { background: #222224; color: #fff; }
.adm-nav > a.active {
  background: var(--sidebar-soft);
  color: #fff;
  font-weight: 700;
}
.adm-nav-icon {
  width: 28px;
  height: 28px;
  flex-basis: 28px;
  border-radius: 8px;
  background: #272729;
  color: #b9b9bf;
}
.adm-nav > a.active .adm-nav-icon { background: var(--accent); color: #fff; }
.adm-nav-section { margin: 12px 0 4px; color: #77777d; font-size: 10.5px; }
.adm-nav-section::after { background: #343436; }
.nav-caret { color: #77777d; }
.adm-subnav { gap: 1px; padding: 2px 0 3px 45px; }
.adm-subnav a {
  padding: 7px 9px;
  border-radius: 8px;
  color: #98989d;
  font-size: 12px;
  font-weight: 600;
}
.adm-subnav a:hover, .adm-subnav a.active { background: #29292b; color: #fff; }

html.adm-sidebar-collapsed .adm-shell { grid-template-columns: 76px minmax(0, 1fr); }
html.adm-sidebar-collapsed .adm-sidebar { padding-inline: 10px; }

.adm-main { padding: 15px 22px 28px; }
.adm-top-menu-bar {
  height: 44px;
  margin-bottom: 12px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.adm-top-profile {
  height: 36px;
  padding: 0 11px 0 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}
.adm-top-profile strong { font-size: 12px; font-weight: 700; }
.adm-top-profile small { color: var(--muted); font-size: 10px; }
.profile-dot { width: 27px; height: 27px; background: var(--accent); color: #fff; }
.adm-theme-toggle {
  width: 66px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}
.adm-theme-toggle i { width: 28px; height: 28px; background: var(--bg); box-shadow: none; }
.adm-theme-dark .adm-theme-toggle i { transform: translateX(30px); }
.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--body-text);
  border: 1px solid var(--line);
}
.icon-btn:hover { background: var(--accent-weak); color: var(--accent); }
.icon-btn.logout { border-color: transparent; background: var(--danger-weak); color: var(--danger); }
.logout-form { display: contents; }

.adm-page-head { margin-bottom: 10px; }
.adm-eyebrow {
  margin-bottom: 1px;
  color: var(--accent);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .01em;
}
.adm-page-head h1 {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", Pretendard, sans-serif;
  font-size: 26px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -.035em;
}
.head-actions { gap: 7px; margin: -42px 0 10px; }

.primary-btn, .secondary-btn, .small-btn, .toolbar button, .distribution-trigger, .add-group-bottom {
  min-height: 36px;
  padding: 0 15px;
  border: 0;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
}
.primary-btn, .toolbar button, .distribution-trigger, .add-group-bottom {
  background: var(--accent);
  color: #fff;
}
.primary-btn:hover, .toolbar button:hover, .distribution-trigger:hover, .add-group-bottom:hover {
  background: var(--accent-strong);
}
.secondary-btn, .small-btn {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
}
.secondary-btn:hover, .small-btn:hover { background: var(--bg); }

.adm-stats { gap: 10px; margin-bottom: 11px; }
.adm-stat-card, .adm-panel {
  padding: 14px 17px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}
.adm-stat-card { min-height: 84px; }
.adm-stat-card p { margin-bottom: 6px; color: var(--muted); font-size: 11.5px; font-weight: 600; }
.adm-stat-card strong { font-size: 26px; line-height: 1.05; font-weight: 700; letter-spacing: -.035em; }
.dashboard-summary-grid { gap: 10px; }
.panel-head { margin-bottom: 10px; }
.panel-head h2, .memo-list h2 { font-size: 17px; line-height: 1.3; font-weight: 700; }
.recent-list li { min-height: 48px; padding: 9px 1px; }

.toolbar {
  gap: 7px;
  margin-bottom: 10px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.toolbar input[type=search] { min-width: 220px; }
.toolbar .page-size-control { padding-left: 2px; color: var(--muted); font-size: 11.5px; }
.page-size-control select { min-width: 84px; }

.table-area {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: none;
  scrollbar-width: thin;
}
.table-area table { border-collapse: separate; border-spacing: 0; }
th, td { height: 44px; padding: 7px 9px; }
th {
  background: #fafafa;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}
td { color: var(--body-text); font-size: 12.5px; }
tbody tr:hover td { background: #f8f8fa; }
.table-area tbody tr.assigned-row > td { background: #fff9df; }
.table-area tbody tr.assigned-row:hover > td { background: #fff3bf; }
.table-area tbody tr.assigned-row > td:first-child { box-shadow: inset 3px 0 0 #e5bb22; }
html.adm-theme-dark .table-area tbody tr.assigned-row > td { background: #3a341f; }
html.adm-theme-dark .table-area tbody tr.assigned-row:hover > td { background: #463d20; }
.table-area input[type=checkbox], .menu-check-list input, .distribution-member-list input {
  width: 20px;
  height: 20px;
  min-height: 20px;
  accent-color: var(--accent);
}
.badge { padding: 4px 7px; background: var(--accent-weak); color: var(--accent-weak-text); font-size: 10.5px; }
.pagination { margin-top: 10px; }
.pagination a { min-height: 34px; border-radius: 999px; }

.modal { background: rgba(0, 0, 0, .48); backdrop-filter: blur(3px); }
.modal-panel, .message-panel {
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .18);
}
.modal-panel h2, .message-panel h2 { font-size: 24px; letter-spacing: -.03em; }
.modal-close, .message-close { border-radius: 999px; background: var(--bg); }
.menu-check-list label, .distribution-member-list label { border-color: var(--line); border-radius: 12px; }
.menu-check-list label:hover, .distribution-member-list label:hover { border-color: #b8b8bd; background: var(--bg); }
.menu-check-list label:has(input:checked), .distribution-member-list label:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-weak);
}

.db-board-list { gap: 10px; }
.board-head-actions { align-items: center; flex-wrap: wrap; }
.db-head-message-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 3px 8px 3px 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}
.db-head-message-button:hover:not(:disabled) { background: var(--bg); }
.db-head-message-button:disabled { opacity: .42; cursor: default; }
.db-head-message-button img {
  width: 29px;
  height: 29px;
  border-radius: 9px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .1);
}
.db-head-message-button strong {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  line-height: 1;
}
.db-head-message-button.is-kakao strong { background: #191919; }
.db-board-group {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: none;
}
.db-board-group-head {
  min-height: 50px;
  padding: 8px 13px;
  border-left-width: 5px;
  background: #fafafa;
}
.db-group-mark { width: 8px; height: 8px; }
.db-group-heading { min-width: 0; flex: 1 1 auto; }
.db-group-title-line { display: flex; align-items: center; gap: 7px; }
.db-group-title-line h2 {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.db-board-group-head h2 { font-size: 15px; font-weight: 700; }
.db-board-group-head p { margin-top: 1px; font-size: 10.5px; }
.db-group-edit-button {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex: 0 0 auto;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1;
}
.db-group-edit-button:hover,
.db-group-edit-button:focus-visible {
  border-color: var(--group-color);
  color: var(--group-color);
}
.db-group-toggle-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex: 0 0 auto;
  min-width: 82px;
  min-height: 30px;
  margin-left: auto;
  padding: 0 9px 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1;
}
.db-group-toggle-button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .18s ease;
}
.db-group-toggle-button[aria-expanded="true"] svg { transform: rotate(180deg); }
.db-group-toggle-button:hover,
.db-group-toggle-button:focus-visible {
  border-color: var(--group-color);
  color: var(--group-color);
}
.db-board-group.is-collapsed .db-board-group-head { background: var(--surface); }
.db-board-group [data-db-group-content][hidden] { display: none; }
.db-groups-toggle-all { white-space: nowrap; }
.group-edit-modal h2 { margin-bottom: 8px; }
.group-edit-help {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.group-edit-color-control {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
}
.group-edit-color-control input[type="color"] {
  flex: 0 0 64px;
  width: 64px;
  height: 42px;
  min-height: 42px;
  padding: 4px;
  border-radius: 8px;
  cursor: pointer;
}
.group-edit-color-control output {
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}
.group-edit-order-note {
  margin: -2px 0 2px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--bg);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.db-board-table { border-top-color: var(--line); border-radius: 0; }
.db-board-table th, .db-board-table td { height: 40px; padding: 4px 7px; }
.db-board-table th { font-size: 11.5px; }
.db-board-table td { font-size: 12px; }
.db-board-table .empty-cell {
  height: 48px;
  padding: 12px !important;
}
.db-board-table td input:not([type=checkbox]) {
  min-height: 31px;
  padding-inline: 8px;
  border-radius: 7px;
  background: var(--surface);
  font-size: 12px;
}
.db-eye-btn, .db-save-btn, .db-delete-btn {
  width: 31px;
  height: 31px;
  flex-basis: 31px;
  border-radius: 999px;
  font-size: 14px;
}
.db-eye-btn { background: var(--surface); }
.db-save-btn { background: var(--accent); }
.db-delete-btn { background: var(--danger); }
.db-board-table.is-new table {
  min-width: 900px;
  table-layout: fixed;
}
.db-board-table.is-new th:nth-child(1) { width: 44px; }
.db-board-table.is-new th:nth-child(2) { width: 118px; }
.db-board-table.is-new th:nth-child(3) { width: 150px; }
.db-board-table.is-new th:nth-child(4) { width: 190px; }
.db-board-table.is-new th:nth-child(5) { width: auto; }
.db-board-table.is-new th:nth-child(6) { width: 126px; }
.db-quick-memo {
  display: block;
  width: 100%;
  min-height: 31px;
  max-height: 92px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  line-height: 1.4;
  resize: vertical;
}
.db-quick-memo:focus {
  border-color: var(--accent);
  outline: 2px solid color-mix(in srgb, var(--accent) 16%, transparent);
  outline-offset: 0;
}
.db-board-table .db-save-btn {
  width: auto;
  min-width: 48px;
  padding-inline: 10px;
  flex-basis: auto;
  border-radius: 8px;
  font-size: 11.5px;
}
.db-board-table .db-save-btn.is-saved { background: var(--success); }
.db-board-table .db-save-btn.is-error { background: var(--danger); }
.db-board-table .db-delete-btn {
  border-radius: 8px;
}
.db-board-table .db-delete-btn svg {
  display: block;
  width: 15px;
  height: 15px;
  margin: auto;
  fill: currentColor;
}
.add-group-bottom { min-height: 36px; margin-top: 10px; }
.db-board-table.is-meeting table { min-width: 1030px; }
.db-board-table.is-meeting th:nth-child(1) { width: 50px; }
.db-board-table.is-meeting th:nth-child(2) { width: 155px; }
.db-board-table.is-meeting th:nth-child(3) { width: 145px; }
.db-board-table.is-meeting th:nth-child(4) { width: 180px; }
.db-board-table.is-meeting th:nth-child(5) { width: 245px; }
.db-board-table.is-meeting th:nth-child(6) { width: 145px; }
.db-board-table.is-meeting th:nth-child(7) { width: 110px; }
.db-board-table tr:target td {
  background: color-mix(in srgb, var(--accent) 9%, var(--surface));
  animation: meeting-row-focus 1.4s ease;
}
@keyframes meeting-row-focus {
  0%, 35% { background: color-mix(in srgb, var(--accent) 22%, var(--surface)); }
}
.db-board-list.has-bulk-actions { padding-bottom: 62px; }
.db-bulk-bar {
  position: fixed;
  left: calc(50% + 122px);
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 78;
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 50px;
  max-width: calc(100vw - 280px);
  padding: 6px 7px 6px 15px;
  overflow-x: auto;
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: 0 14px 42px rgba(0, 0, 0, .16);
  backdrop-filter: blur(18px);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 14px) scale(.98);
  transition: opacity .16s ease, transform .16s ease;
  scrollbar-width: none;
}
.db-bulk-bar::-webkit-scrollbar { display: none; }
.db-bulk-bar.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0) scale(1);
}
.db-bulk-bar strong {
  padding-right: 7px;
  color: var(--muted);
  font-size: 11.5px;
  white-space: nowrap;
}
.db-bulk-bar button {
  min-height: 36px;
  padding: 0 13px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}
.db-bulk-bar button:hover { background: var(--accent-strong); }
.db-bulk-bar .db-bulk-category {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
}
.db-bulk-bar .db-bulk-category:hover { background: var(--bg); }
.db-bulk-bar button:disabled { opacity: .45; cursor: default; }
html.adm-sidebar-collapsed .db-bulk-bar { left: calc(50% + 38px); }
.modal-panel.db-move-modal { width: min(600px, 100%); }
.db-move-modal h2 { margin-bottom: 8px; }
.db-move-modal [data-db-bulk-inputs] { display: none; }
.db-move-description {
  margin: 0 42px 18px 0;
  color: var(--body-text);
  font-size: 13px;
}
.db-move-description strong { color: var(--accent); }
.db-move-note {
  margin: -2px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg);
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.5;
}
.meeting-date-control {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  gap: 6px;
}
.meeting-date-trigger {
  display: inline-grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  min-height: 34px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--body-text);
  text-align: left;
}
.meeting-date-trigger:hover { border-color: var(--accent); background: var(--accent-weak); }
.meeting-date-trigger span {
  display: flex;
  align-items: center;
  min-height: 18px;
  overflow: hidden;
  font-size: 11px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.meeting-date-trigger strong {
  display: flex;
  align-items: center;
  min-height: 18px;
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 750;
  line-height: 1.2;
  white-space: nowrap;
}
.meeting-date-trigger:disabled { opacity: .55; }
.meeting-date-clear {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 0 7px;
  border: 1px solid color-mix(in srgb, var(--danger) 26%, var(--line));
  border-radius: 7px;
  background: var(--danger-weak);
  color: var(--danger);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.meeting-date-clear:hover { border-color: var(--danger); }
.meeting-date-clear:disabled { opacity: .5; }
.meeting-schedule-modal { width: min(520px, 100%); }
.meeting-schedule-modal h2 { margin-bottom: 15px; }
.meeting-schedule-form { display: grid; gap: 14px; }
.meeting-move-option {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  text-align: left;
  cursor: pointer;
}
.meeting-move-option input {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  accent-color: var(--accent);
}
.meeting-move-option span { display: grid; min-width: 0; gap: 3px; }
.meeting-move-option strong { color: var(--text); font-size: 12.5px; line-height: 1.35; }
.meeting-move-option small { color: var(--muted); font-size: 10.5px; font-weight: 500; line-height: 1.4; }
.meeting-schedule-form fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.meeting-schedule-form legend,
.meeting-schedule-date {
  display: grid;
  gap: 7px;
  width: 100%;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
}
.meeting-schedule-date input { width: 100%; }
.meeting-period-control {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: var(--bg);
}
.form-grid .meeting-period-control label,
.form-grid .meeting-hour-grid label,
.meeting-period-control label,
.meeting-hour-grid label {
  display: block;
  min-width: 0;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  cursor: pointer;
}
.meeting-period-control input,
.meeting-hour-grid input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.meeting-period-control span {
  display: grid;
  place-items: center;
  min-height: 38px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.meeting-period-control input:checked + span {
  background: var(--surface);
  color: var(--accent);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .1);
}
.meeting-period-control input:focus-visible + span,
.meeting-hour-grid input:focus-visible + span {
  outline: 3px solid rgba(0, 113, 227, .25);
  outline-offset: 2px;
}
.meeting-hour-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 5px;
  margin-top: 7px;
}
.meeting-hour-grid span {
  display: grid;
  place-items: center;
  min-height: 35px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--body-text);
  font-size: 12px;
  font-weight: 650;
}
.meeting-hour-grid input:checked + span {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
.meeting-schedule-preview {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 2px 10px;
  padding: 11px 12px;
  border-radius: 11px;
  background: var(--accent-weak);
}
.meeting-schedule-preview span {
  grid-row: 1 / 3;
  color: var(--accent-weak-text);
  font-size: 10.5px;
  font-weight: 700;
}
.meeting-schedule-preview strong {
  color: var(--text);
  font-size: 15px;
  letter-spacing: -.02em;
}
.meeting-schedule-preview small { color: var(--muted); font-size: 10px; }
.meeting-move-schedule {
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--bg) 70%, var(--surface));
}
.meeting-move-schedule-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.meeting-move-schedule-heading strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 750;
}
.meeting-move-schedule-heading span {
  color: var(--muted);
  font-size: 10.5px;
}
.meeting-move-schedule .meeting-period-control { background: var(--surface); }
.meeting-move-schedule .meeting-period-control input:checked + span {
  background: var(--accent-weak);
  box-shadow: none;
}

.db-save-toast {
  position: fixed;
  top: max(18px, env(safe-area-inset-top));
  left: 50%;
  z-index: 2400;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px 0 11px;
  border: 1px solid color-mix(in srgb, var(--success) 30%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  color: var(--text);
  box-shadow: 0 14px 38px rgba(0, 0, 0, .18);
  backdrop-filter: blur(16px);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -10px) scale(.97);
  transition: opacity .18s ease, transform .18s ease;
}
.db-save-toast[hidden] { display: none; }
.db-save-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}
.db-save-toast > span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--success);
  color: #fff;
  font-size: 13px;
  font-weight: 850;
}
.db-save-toast strong { font-size: 12.5px; font-weight: 750; white-space: nowrap; }

.meeting-calendar-card {
  overflow: hidden;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.meeting-calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 54px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
}
.meeting-calendar-head .adm-eyebrow { margin-bottom: 0; }
.meeting-calendar-head h2 {
  display: inline;
  margin-right: 8px;
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: -.03em;
}
.meeting-calendar-head > div > span { color: var(--muted); font-size: 11px; }
.meeting-calendar-controls { display: flex; align-items: center; gap: 5px; }
.meeting-calendar-controls a {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 32px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  font-weight: 750;
}
.meeting-calendar-controls a:hover { border-color: #b8b8bd; background: var(--surface); }
.meeting-calendar-controls .today { min-width: 48px; font-size: 11.5px; }
.meeting-calendar-scroll { min-width: 0; }
.meeting-calendar-weekdays,
.meeting-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.meeting-calendar-weekdays {
  height: 26px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.meeting-calendar-weekdays span {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
}
.meeting-calendar-weekdays span:first-child { color: #ff3b30; }
.meeting-calendar-weekdays span:last-child { color: #007aff; }
.meeting-calendar-grid { gap: 1px; background: var(--line); }
.meeting-calendar-day {
  min-width: 0;
  min-height: 54px;
  padding: 3px 5px 4px;
  background: var(--surface);
}
.meeting-calendar-day.outside-month { background: color-mix(in srgb, var(--bg) 78%, var(--surface)); }
.meeting-calendar-day > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 16px;
  margin-bottom: 1px;
}
.meeting-calendar-day > header time {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  color: var(--text);
  font-size: 10.5px;
  font-weight: 750;
}
.meeting-calendar-day.outside-month > header time { color: #aeaeb2; }
.meeting-calendar-day.is-today > header time { background: #007aff; color: #fff; }
.meeting-calendar-day > header button {
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  opacity: 0;
}
.meeting-calendar-day:hover > header button,
.meeting-calendar-day > header button:focus-visible { background: var(--bg); opacity: 1; }
.meeting-calendar-events { display: grid; gap: 2px; min-width: 0; }
.meeting-calendar-events a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 4px;
  min-width: 0;
  height: 16px;
  padding: 1px 4px;
  border-left: 3px solid var(--event-color, #007aff);
  border-radius: 4px;
  background: color-mix(in srgb, var(--event-color, #007aff) 10%, var(--surface));
  color: var(--text);
  font-size: 9px;
}
.meeting-calendar-events > a:nth-of-type(n+3) { display: none; }
.meeting-calendar-events a:hover { background: color-mix(in srgb, var(--event-color, #007aff) 18%, var(--surface)); }
.meeting-calendar-events a time { color: var(--muted); font-size: 8px; font-variant-numeric: tabular-nums; }
.meeting-calendar-events a span { overflow: hidden; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.meeting-calendar-more { padding-left: 5px; color: var(--muted); font-size: 9px; }
.meeting-calendar-foot {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  min-height: 28px;
  padding: 5px 12px;
  border-top: 1px solid var(--line);
  background: var(--bg);
  color: var(--muted);
  font-size: 10.5px;
}
.meeting-calendar-foot strong { color: var(--text); }

.db-detail-modal {
  max-height: 94dvh;
  padding: 18px 20px;
}
.db-detail-title {
  min-height: 48px;
  margin-bottom: 8px;
}
.db-detail-title .adm-eyebrow { margin-bottom: 1px; }
.db-detail-title h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}
.db-original-fields {
  min-height: 0;
  max-height: calc(94dvh - 112px);
  gap: 3px;
  overflow-y: auto;
  padding-right: 3px;
  scrollbar-width: thin;
}
.db-original-fields > [data-original-fields] { gap: 3px; }
.db-original-field-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg);
}
.db-original-field-row > strong {
  min-width: 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.db-original-field-row input,
.db-original-field-row textarea {
  width: 100%;
  min-width: 0;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 8px;
  background: var(--surface);
  font-size: 12px;
}
.db-original-field-row textarea {
  min-height: 44px;
  padding-block: 6px;
  resize: vertical;
}
.db-original-field-row .db-field-label-input {
  padding-inline: 7px;
  color: var(--text);
  font-size: 11.5px;
  font-weight: 700;
}
.db-original-field-row.is-custom {
  border-color: color-mix(in srgb, var(--accent) 24%, var(--line));
  background: color-mix(in srgb, var(--accent) 5%, var(--bg));
}
.db-field-actions {
  display: grid;
  grid-template-columns: 39px 28px;
  align-items: center;
  gap: 4px;
}
.db-field-save {
  width: 39px;
  height: 28px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
}
.db-field-delete {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid color-mix(in srgb, var(--danger) 22%, var(--line));
  border-radius: 999px;
  background: var(--danger-weak);
  color: var(--danger);
}
.db-field-delete svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}
.db-field-delete:hover { background: var(--danger); color: #fff; }
.db-field-manager {
  display: grid;
  gap: 5px;
  padding: 5px 6px;
  border: 1px dashed var(--line);
  border-radius: 9px;
  background: var(--surface);
}
.db-field-add-toggle {
  justify-self: start;
  min-height: 28px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--accent);
  font-size: 11px;
  font-weight: 750;
}
.db-field-add-form {
  display: grid;
  grid-template-columns: minmax(90px, .8fr) minmax(130px, 1.2fr) auto auto;
  gap: 6px;
}
.db-field-add-form[hidden], .db-field-restore[hidden] { display: none; }
.db-field-add-form input,
.db-field-restore select {
  min-width: 0;
  min-height: 30px;
  background: var(--bg);
  font-size: 11.5px;
}
.db-field-add-form button,
.db-field-restore button {
  min-height: 30px;
  padding-inline: 9px;
  font-size: 11px;
  white-space: nowrap;
}
.db-field-restore {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}
.db-field-restore > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.db-field-manager-status {
  min-height: 12px;
  color: var(--success);
  font-size: 10px;
  line-height: 1.35;
}
.db-field-manager-status:empty { display: none; }
.db-field-manager-status.error { color: var(--danger); }
.db-message-shortcuts {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-right: 52px;
}
.db-message-action {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 3px 4px 3px 9px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
}
.db-message-action:hover {
  border-color: var(--line);
  background: var(--bg);
}
.db-message-action-label {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}
.db-message-action .db-message-icon {
  display: block;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  overflow: hidden;
  border-radius: 10px;
  background: transparent;
  box-shadow: 0 2px 7px rgba(0, 0, 0, .12);
}
.db-message-action .db-message-icon img {
  display: block;
  width: 100%;
  height: 100%;
}
.message-bulk-note {
  margin-top: 7px;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--accent-weak);
  color: var(--accent-weak-text);
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1.45;
}
.kakao-variables input.is-auto-variable {
  background: var(--accent-weak);
  color: var(--accent-weak-text);
  font-weight: 700;
}
.sms-panel { width: min(790px, 94vw); }
.sms-image-attachment { margin-top: 12px; }
.sms-image-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.sms-image-picker {
  display: flex !important;
  align-items: center;
  gap: 12px !important;
  min-height: 62px;
  margin: 0 !important;
  padding: 10px 12px;
  border: 1px dashed #b8b8bd;
  border-radius: 12px;
  background: var(--bg);
  color: var(--muted) !important;
  cursor: pointer;
}
.sms-image-picker:hover { border-color: var(--accent); background: var(--accent-weak); }
.sms-image-picker-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.sms-image-picker > span:last-child { font-size: 11.5px; font-weight: 600; }
.sms-image-preview {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-height: 74px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
}
.sms-image-preview[hidden] { display: none; }
.sms-image-preview img {
  width: 58px;
  height: 58px;
  border-radius: 9px;
  object-fit: cover;
  background: #e5e5ea;
}
.sms-image-preview > div { display: grid; gap: 3px; min-width: 0; }
.sms-image-preview strong { overflow: hidden; font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.sms-image-preview span { color: var(--muted); font-size: 10.5px; }
.sms-image-preview button {
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid #ffc7c3;
  border-radius: 999px;
  background: var(--danger-weak);
  color: var(--danger);
  font-size: 11px;
  font-weight: 700;
}
.sms-image-status {
  min-height: 15px;
  margin-top: 5px;
  color: var(--success);
  font-size: 10.5px;
  font-weight: 600;
}
.sms-image-status:empty { display: none; }
.sms-image-status.error { color: var(--danger); }
.db-original-save {
  min-height: 32px;
  margin-top: 0;
  font-size: 11.5px;
}
.db-note-panel {
  min-width: 0;
  min-height: 0;
}
.db-memo-form {
  display: grid;
  min-width: 0;
}
.db-memo-editor-shell {
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--line));
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 5px 18px rgba(15, 23, 42, .055);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.db-memo-editor-shell:focus-within {
  border-color: color-mix(in srgb, var(--accent) 58%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 11%, transparent), 0 8px 24px rgba(15, 23, 42, .07);
}
.db-note-panel .ql-toolbar {
  min-height: 43px;
  padding: 6px 9px;
  border: 0 !important;
  border-bottom: 1px solid var(--line) !important;
  border-radius: 0;
  background: color-mix(in srgb, var(--bg) 76%, var(--surface));
}
.db-note-panel .quill-editor,
.db-note-panel .ql-container {
  height: 226px !important;
  min-height: 226px !important;
  max-height: 226px !important;
  border: 0 !important;
  border-radius: 0;
  background: var(--surface);
}
.db-note-panel .ql-editor {
  height: 100%;
  min-height: 0;
  padding: 16px 17px;
  overflow-y: auto;
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.68;
}
.db-note-panel .ql-editor.ql-blank::before {
  left: 17px;
  right: 17px;
  color: color-mix(in srgb, var(--muted) 82%, transparent);
  font-style: normal;
}
.db-memo-save-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-height: 42px;
  padding: 7px 2px 0;
}
.db-memo-save-row .primary-btn {
  min-height: 34px;
  padding-inline: 15px;
  font-size: 11.5px;
}
.db-memo-save-row .primary-btn:disabled {
  cursor: wait;
  opacity: .62;
}
.db-memo-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  color: var(--success);
  font-size: 10.5px;
  font-weight: 750;
  opacity: 0;
  transform: translateY(2px);
  transition: opacity .16s ease, transform .16s ease;
}
.db-memo-status.visible {
  opacity: 1;
  transform: translateY(0);
}
.db-memo-status.visible::before {
  content: '✓';
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--success) 12%, transparent);
  font-size: 10px;
}
.db-memo-status.error { color: var(--danger); }
.db-memo-status.error::before { content: '!'; background: color-mix(in srgb, var(--danger) 12%, transparent); }
.db-memo-form[aria-busy="true"] .db-memo-editor-shell { opacity: .78; }
.db-comments {
  margin-top: 7px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent) 14%, var(--line));
  border-radius: 12px;
  background: var(--surface);
}
.db-comments > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  padding: 8px 11px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--accent) 4%, var(--bg));
}
.db-comments > header > div {
  display: grid;
  gap: 1px;
}
.db-comments > header span {
  color: var(--accent);
  font-size: 9.5px;
  font-weight: 800;
}
.db-comments > header h3 {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.35;
}
.db-comments > header p {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}
.db-comments > header > strong {
  flex: 0 0 auto;
  min-width: 42px;
  padding: 5px 8px;
  border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--line));
  border-radius: 999px;
  background: var(--surface);
  color: var(--accent);
  font-size: 10.5px;
  text-align: center;
}
.db-comment-list {
  display: grid;
  gap: 6px;
  min-height: 86px;
  max-height: 156px;
  overflow-y: auto;
  padding: 7px 8px;
  background: var(--bg);
  scrollbar-width: thin;
  scroll-behavior: smooth;
}
.db-comments article.db-comment-card {
  position: relative;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 4px 7px;
  padding: 9px 10px 9px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 2px 7px rgba(15, 23, 42, .035);
}
.db-comments article.db-comment-card.is-latest {
  border-color: color-mix(in srgb, var(--accent) 34%, var(--line));
  background: color-mix(in srgb, var(--accent) 4%, var(--surface));
  box-shadow: 0 3px 10px color-mix(in srgb, var(--accent) 9%, transparent);
}
.db-comment-marker {
  grid-row: 1 / span 2;
  align-self: start;
  width: 9px;
  height: 9px;
  margin: 4px auto 0;
  border: 2px solid var(--surface);
  border-radius: 999px;
  background: var(--muted);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--muted) 22%, transparent);
}
.db-comment-card.is-latest .db-comment-marker {
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}
.db-comment-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.db-comment-meta > strong {
  overflow: hidden;
  color: var(--text);
  font-size: 11.5px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.db-comment-meta time {
  margin-left: auto;
  color: var(--muted);
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.db-comment-actions {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 2px;
}
.db-comment-actions button {
  min-height: 23px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  line-height: 1;
}
.db-comment-actions button:hover,
.db-comment-actions button:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 32%, var(--line));
  color: var(--accent);
}
.db-comment-actions button.danger:hover,
.db-comment-actions button.danger:focus-visible {
  border-color: color-mix(in srgb, var(--danger) 35%, var(--line));
  color: var(--danger);
}
.db-comment-actions button:disabled { cursor: wait; opacity: .48; }
.db-comment-latest {
  flex: 0 0 auto;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff !important;
  font-size: 8.5px !important;
  font-weight: 750 !important;
}
.db-comments article .comment-content {
  grid-column: 2;
  color: var(--text);
  font-size: 12.5px;
  line-height: 1.58;
  overflow-wrap: anywhere;
}
.db-comments article .comment-content p { margin: 0; }
.comment-empty {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  min-height: 72px;
  padding: 10px;
  color: var(--muted);
  text-align: center;
}
.comment-empty > span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--accent-weak);
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}
.comment-empty > strong { color: var(--text); font-size: 11.5px; }
.comment-empty > p { font-size: 9.5px; }
.comment-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 86px;
  gap: 5px 7px;
  padding: 7px 8px 6px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.comment-form-heading {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  gap: 7px;
}
.comment-form-heading strong { font-size: 11px; font-weight: 800; }
.comment-form-heading span { color: var(--muted); font-size: 9.5px; }
.comment-editor-shell {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
  overflow: hidden;
  border-radius: 9px;
}
.comment-form .ql-toolbar {
  min-height: 31px;
  padding: 2px 4px;
}
.comment-form .ql-container {
  height: 58px !important;
  min-height: 58px !important;
  max-height: 58px !important;
}
.comment-form .ql-editor {
  height: 56px;
  min-height: 56px;
  padding: 7px 9px;
  font-size: 11.5px;
  line-height: 1.45;
}
.comment-form-actions {
  grid-column: 2;
  grid-row: 2;
  display: grid;
  align-self: stretch;
  gap: 4px;
  min-width: 0;
}
.comment-form-actions button {
  width: 100%;
  min-width: 0;
  min-height: 0;
  border-radius: 9px;
  font-size: 11px;
}
.comment-form-actions [hidden] { display: none !important; }
.comment-form-actions .primary-btn { flex: 1; }
.comment-form-actions .secondary-btn {
  min-height: 25px;
  padding: 4px 6px;
  font-size: 9.5px;
}
.comment-form-actions button:disabled {
  cursor: wait;
  opacity: .62;
}
.comment-form-status {
  grid-column: 1 / -1;
  min-height: 13px;
  color: var(--success);
  font-size: 9.5px;
  font-weight: 650;
  line-height: 1.3;
}
.comment-form-status:empty { display: none; }
.comment-form-status.error { color: var(--danger); }
.comment-form[aria-busy="true"] .comment-editor-shell {
  opacity: .78;
}

.db-detail-tabs {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 38px;
  margin-bottom: 7px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
}
.db-detail-tabs button {
  min-height: 30px;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 750;
}
.db-detail-tabs button.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--accent) 28%, transparent);
}
.db-detail-tabs button span {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  margin-left: 3px;
  padding-inline: 5px;
  border-radius: 999px;
  background: color-mix(in srgb, currentColor 11%, transparent);
  font-size: 9.5px;
}
.db-detail-pane[hidden] { display: none; }
.db-pane-title { margin-bottom: 5px; font-size: 14px; }
.db-file-pane {
  min-height: 420px;
  max-height: calc(94dvh - 165px);
  overflow-y: auto;
  padding-right: 3px;
  scrollbar-width: thin;
}
.db-fund-pane {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: min(620px, calc(94dvh - 165px));
  height: calc(94dvh - 165px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.db-fund-pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 62px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--accent-weak) 44%, var(--surface));
}
.db-fund-pane-head > div { min-width: 0; }
.db-fund-pane-head span {
  display: block;
  margin-bottom: 2px;
  color: var(--accent);
  font-size: 8.5px;
  font-weight: 800;
}
.db-fund-pane-head h3 { margin: 0; font-size: 14px; }
.db-fund-pane-head p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.4;
}
.db-fund-pane-head > a { flex: 0 0 auto; min-height: 31px; padding-inline: 11px; font-size: 10px; }
.db-fund-frame-shell {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--bg);
}
.db-fund-frame-shell iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  background: var(--bg);
}
.db-fund-frame-status {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.db-fund-frame-status[hidden] { display: none; }
.db-file-pane-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 8px;
}
.db-file-pane-head h3 { margin: 0 0 3px; font-size: 15px; }
.db-file-pane-head p { color: var(--muted); font-size: 10.5px; line-height: 1.45; }
.db-file-pane-head > strong {
  flex: 0 0 auto;
  min-width: 40px;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--accent-weak);
  color: var(--accent-weak-text);
  font-size: 10.5px;
  text-align: center;
}
.db-file-upload {
  display: grid;
  gap: 6px;
  margin-bottom: 9px;
}
.db-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.db-file-dropzone {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  column-gap: 10px;
  min-height: 74px;
  padding: 10px 13px;
  border: 1px dashed #b8b8bd;
  border-radius: 12px;
  background: var(--bg);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.db-file-dropzone:hover,
.db-file-dropzone.dragging {
  border-color: var(--accent);
  background: var(--accent-weak);
}
.db-file-dropzone.dragging { transform: scale(.997); }
.db-file-drop-icon {
  grid-row: 1 / 4;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 20px;
  font-weight: 400;
}
.db-file-dropzone strong { color: var(--text); font-size: 12px; }
.db-file-dropzone > span:not(.db-file-drop-icon) { color: var(--body-text); font-size: 10.5px; }
.db-file-dropzone small { color: var(--muted); font-size: 9.5px; }
.db-file-upload-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
}
.db-file-upload-actions p {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.db-file-upload-actions .primary-btn {
  flex: 0 0 auto;
  min-height: 32px;
  padding-inline: 13px;
  font-size: 11px;
}
.db-file-upload-actions .primary-btn:disabled { opacity: .42; cursor: not-allowed; }
.db-file-status {
  min-height: 14px;
  color: var(--success);
  font-size: 10.5px;
  font-weight: 650;
}
.db-file-status:empty { display: none; }
.db-file-status.error { color: var(--danger); }
.db-file-list { display: grid; gap: 6px; }
.db-file-empty {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  min-height: 170px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--muted);
  text-align: center;
}
.db-file-empty strong { color: var(--body-text); font-size: 13px; }
.db-file-empty span { font-size: 10.5px; }
.db-file-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 64px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.db-file-card:hover { background: var(--bg); }
.db-file-thumb {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg);
}
.db-file-thumb img { width: 100%; height: 100%; object-fit: cover; }
.db-file-thumb span { color: var(--accent); font-size: 10px; font-weight: 800; }
.db-file-card-info { display: grid; gap: 4px; min-width: 0; }
.db-file-card-info strong {
  overflow: hidden;
  color: var(--text);
  font-size: 11.5px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.db-file-card-info span {
  overflow: hidden;
  color: var(--muted);
  font-size: 9.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.db-file-card-actions { display: flex; align-items: center; gap: 4px; }
.db-file-card-actions button,
.db-file-card-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 29px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--body-text);
  font-size: 9.5px;
  font-weight: 700;
  white-space: nowrap;
}
.db-file-card-actions .db-file-preview-button { border-color: var(--accent); background: var(--accent); color: #fff; }
.db-file-card-actions .db-file-download-button { background: var(--text); color: var(--surface); }
.db-file-card-actions .db-file-remove-button { border-color: #ffc7c3; background: var(--danger-weak); color: var(--danger); }
.db-file-card-actions button:disabled { opacity: .5; }

.db-file-preview-layer {
  position: fixed;
  inset: 0;
  z-index: 1550;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, .62);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}
.db-file-preview-layer[hidden] { display: none; }
.db-file-preview-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  width: min(1180px, 96vw);
  height: min(850px, 94dvh);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 32px 100px rgba(0, 0, 0, .35);
}
.db-file-preview-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 74px;
  padding: 12px 15px 10px 20px;
  border-bottom: 1px solid var(--line);
}
.db-file-preview-panel > header .adm-eyebrow { margin-bottom: 2px; }
.db-file-preview-panel > header h2 {
  max-width: min(660px, 58vw);
  overflow: hidden;
  font-size: 19px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.db-file-preview-actions { display: flex; align-items: center; gap: 6px; }
.db-file-preview-actions a { min-height: 34px; padding-inline: 12px; font-size: 10.5px; }
.db-file-preview-close {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  font-size: 21px;
  font-weight: 500;
}
.db-file-preview-meta {
  min-height: 31px;
  padding: 8px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  color: var(--muted);
  font-size: 10.5px;
}
.db-file-preview-body {
  min-height: 0;
  overflow: auto;
  padding: 18px;
  background: #f2f2f4;
}
.db-file-preview-body.loading { display: grid; place-items: center; }
.db-file-preview-loading { color: var(--muted); font-size: 12px; }
.db-file-preview-body.is-image { display: grid; place-items: center; }
.db-file-preview-body.is-image > img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  border-radius: 10px;
  object-fit: contain;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .12);
}
.db-file-preview-body.is-pdf { padding: 0; }
.db-file-preview-body.is-pdf iframe { width: 100%; height: 100%; min-height: 600px; border: 0; background: #fff; }
.db-file-preview-body.is-audio { display: grid; place-items: center; }
.db-file-preview-body.is-audio audio { width: min(720px, 92%); }
.db-file-preview-body.is-video { display: grid; place-items: center; background: #111; }
.db-file-preview-body.is-video video { max-width: 100%; max-height: 100%; }
.db-file-preview-body pre {
  min-height: 100%;
  margin: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font: 12px/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.db-file-preview-notice {
  margin-bottom: 8px;
  padding: 8px 10px;
  border-radius: 9px;
  background: #fff4cc;
  color: #705800;
  font-size: 10.5px;
}
.db-file-sheet-preview,
.db-file-document-preview,
.db-file-package-section {
  margin: 0 auto 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.db-file-sheet-preview h3,
.db-file-package-section h3 { margin-bottom: 10px; font-size: 14px; }
.db-file-sheet-preview > div { overflow: auto; }
.db-file-sheet-preview table { width: max-content; min-width: 100%; border-collapse: collapse; }
.db-file-sheet-preview th,
.db-file-sheet-preview td {
  min-width: 90px;
  height: 31px;
  padding: 5px 7px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 10.5px;
  text-align: left;
}
.db-file-sheet-preview th { position: sticky; top: 0; z-index: 1; background: var(--bg); }
.db-file-document-preview { min-height: 90%; max-width: 850px; color: var(--text); font-size: 13px; line-height: 1.7; }
.db-file-document-preview img { max-width: 100%; height: auto; }
.db-file-package-section { max-width: 900px; }
.db-file-package-section p { color: var(--body-text); font-size: 12px; line-height: 1.7; white-space: pre-wrap; }
.db-file-archive-list {
  max-width: 900px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.db-file-archive-list li { padding: 8px 12px; border-top: 1px solid var(--line); color: var(--body-text); font-size: 11px; }
.db-file-archive-list li:first-child { border-top: 0; }
.db-file-generic-preview {
  display: grid;
  place-items: center;
  min-height: 100%;
  padding: 40px;
  color: var(--muted);
  text-align: center;
}
.db-file-generic-preview > span {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  margin-bottom: 16px;
  border-radius: 20px;
  background: var(--surface);
  color: var(--accent);
  font-size: 17px;
  font-weight: 800;
  box-shadow: 0 7px 24px rgba(0, 0, 0, .08);
}
.db-file-generic-preview h3 { color: var(--text); font-size: 16px; }
.db-file-generic-preview p { max-width: 580px; margin-top: 7px; font-size: 11.5px; line-height: 1.6; }

.sheet-sync-status > .compact + .compact { margin-left: 0; }
.sheet-source-intro,
.sheet-source-editor,
.sheet-source-list {
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}
.sheet-source-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  padding: 22px 24px;
  background:
    linear-gradient(135deg, rgba(0, 113, 227, .08), rgba(0, 113, 227, 0) 58%),
    var(--surface);
}
.sheet-source-intro h2,
.sheet-source-editor h2,
.sheet-source-list h2 {
  font-size: 20px;
  line-height: 1.25;
  font-weight: 750;
  letter-spacing: -.025em;
}
.sheet-source-intro p:not(.adm-eyebrow) {
  max-width: 720px;
  margin-top: 5px;
  color: var(--body-text);
  font-size: 12.5px;
  line-height: 1.6;
}
.sheet-source-intro ol { display: flex; align-items: center; gap: 8px; }
.sheet-source-intro li {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 6px 11px 6px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--body-text);
  font-size: 11.5px;
  font-weight: 650;
  white-space: nowrap;
}
.sheet-source-intro li strong {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
}
.sheet-sharing-note {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  margin-bottom: 12px;
  padding: 10px 15px;
  border: 1px solid #b9d9fb;
  border-radius: 14px;
  background: var(--accent-weak);
  color: var(--accent-weak-text);
}
.sheet-sharing-note strong { flex: 0 0 auto; font-size: 12.5px; }
.sheet-sharing-note span { color: var(--body-text); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.sheet-sharing-note code {
  padding: 3px 6px;
  border-radius: 6px;
  background: rgba(0, 113, 227, .08);
  color: var(--accent-weak-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
}
.sheet-source-editor { padding: 20px; }
.sheet-source-editor-head,
.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 15px;
}
.sheet-source-setup-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
}
.sheet-source-setup-grid label,
.sheet-mapping-grid label {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
}
.sheet-source-setup-grid label > span,
.sheet-mapping-grid label > span {
  color: var(--text);
  font-size: 11.5px;
  font-weight: 700;
}
.sheet-source-setup-grid input,
.sheet-source-setup-grid select,
.sheet-mapping-grid select { width: 100%; }
.sheet-source-setup-grid small,
.sheet-mapping-grid small,
.sheet-inspect-actions span {
  min-height: 17px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.45;
}
.sheet-source-setup-grid .field-error { color: var(--danger); }
.sheet-inspect-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 55px;
  margin-top: 13px;
  padding: 9px 11px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: var(--bg);
}
.sheet-inspect-actions span { min-height: 0; }
.sheet-mapping-section {
  margin-top: 14px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
}
.sheet-mapping-section > div:first-child { margin-bottom: 13px; }
.sheet-mapping-section h3 { font-size: 16px; line-height: 1.3; font-weight: 750; }
.sheet-mapping-section > div:first-child > p:last-child {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}
.sheet-mapping-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}
.sheet-mapping-grid label {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
}
.sheet-mapping-grid label.is-key-field {
  grid-column: 1 / -1;
  border-color: #b9d9fb;
  background: var(--accent-weak);
}
.sheet-mapping-grid label span i {
  color: var(--accent);
  font-size: 9.5px;
  font-style: normal;
}
.sheet-source-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}
.sheet-enabled-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--body-text);
  font-size: 12px;
  font-weight: 650;
}
.sheet-enabled-check input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  accent-color: var(--accent);
}
.sheet-source-list { padding: 20px; }
.sheet-source-empty {
  display: grid;
  place-items: center;
  min-height: 150px;
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  color: var(--muted);
  text-align: center;
}
.sheet-source-empty strong { margin-bottom: 5px; color: var(--text); font-size: 14px; }
.sheet-source-empty span { font-size: 11.5px; }
.sheet-source-cards { display: grid; gap: 10px; }
.sheet-source-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.sheet-source-card.is-paused { opacity: .68; }
.sheet-source-card.has-error { border-color: #ffc4c0; background: var(--danger-weak); }
.sheet-source-card-main {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 11px;
  min-width: 0;
}
.sheet-source-status-dot {
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 50%;
  background: #30d158;
  box-shadow: 0 0 0 4px rgba(48, 209, 88, .12);
}
.sheet-source-card.is-paused .sheet-source-status-dot { background: var(--muted); box-shadow: none; }
.sheet-source-card.has-error .sheet-source-status-dot { background: var(--danger); box-shadow: 0 0 0 4px rgba(255, 59, 48, .1); }
.sheet-source-title-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sheet-source-title-line h3 { font-size: 14px; line-height: 1.35; font-weight: 750; }
.sheet-source-card-main > div > p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11.5px;
  overflow-wrap: anywhere;
}
.sheet-source-card dl {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 18px;
  margin-top: 10px;
}
.sheet-source-card dl > div { display: flex; align-items: baseline; gap: 5px; }
.sheet-source-card dt { color: var(--muted); font-size: 10px; }
.sheet-source-card dd { color: var(--body-text); font-size: 11px; font-weight: 650; }
.sheet-source-card .sheet-source-error { margin-top: 8px; color: var(--danger); font-weight: 650; }
.sheet-source-mapped-fields { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.sheet-source-mapped-fields span {
  padding: 4px 7px;
  border-radius: 7px;
  background: var(--bg);
  color: var(--body-text);
  font-size: 9.5px;
}
.sheet-source-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
  max-width: 430px;
}
.sheet-source-card-actions form { display: contents; }
.sheet-source-card-actions .text-btn,
.sheet-source-card-actions .danger-link { white-space: nowrap; }

@media (min-width: 1001px) {
  .db-detail-modal { width: min(1500px, 96vw); }
  .db-detail-layout {
    grid-template-columns: minmax(350px, .6fr) minmax(0, 1.75fr);
    align-items: start;
    gap: 16px;
  }
}

.login-page { background: var(--bg); }
.login-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: none;
}
.login-logo { width: 54px; height: 54px; border-radius: 14px; background: var(--accent); color: #fff; }
.login-tit { color: var(--text); font-size: 28px; line-height: 1.25; font-weight: 700; }
.login-sub { color: var(--muted); }
.login-card label { color: var(--body-text); font-size: 12.5px; }
.login-card input { height: 48px; border: 1px solid var(--line); background: var(--surface); }
.login-card .submit-btn { height: 48px; border-radius: 999px; background: var(--accent); color: #fff; }
.login-card .submit-btn:hover { background: var(--accent-strong); }
.login-error { border-radius: 12px; background: var(--danger-weak); color: var(--danger); }

.flash.send-success[data-auto-toast] {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  left: 50%;
  right: auto;
  z-index: 1800;
  display: flex;
  align-items: center;
  width: max-content;
  max-width: calc(100vw - 32px);
  min-height: 40px;
  margin: 0;
  padding: 9px 14px 9px 42px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 13px;
  background: rgba(29, 29, 31, .96);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .24);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -.012em;
  text-align: center;
  pointer-events: none;
  animation: adm-send-toast 2s ease both;
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}
.flash.send-success[data-auto-toast]::before {
  content: "✓";
  position: absolute;
  left: 13px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #30d158;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}
@keyframes adm-send-toast {
  0% { opacity: 0; transform: translate(-50%, -8px) scale(.97); }
  10%, 82% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -5px) scale(.985); }
}

/* 신규DB 배정 성과: 목록 공간을 침범하지 않는 소형 코호트 요약 */
.db-assignment-summary {
  margin-bottom: 9px;
  padding: 8px 10px 7px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
}
.db-assignment-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.db-assignment-summary-copy {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 3px 8px;
  flex-wrap: wrap;
}
.db-assignment-summary-copy h2 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 760;
  line-height: 1.2;
  letter-spacing: -.03em;
}
.db-assignment-summary-copy > span {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.db-assignment-periods {
  display: inline-grid;
  flex: 0 0 auto;
  grid-template-columns: repeat(2, 36px);
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg);
}
.db-assignment-periods a {
  display: grid;
  min-height: 25px;
  place-items: center;
  border-radius: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1;
  text-decoration: none;
}
.db-assignment-periods a:hover {
  color: var(--text);
  background: var(--surface);
}
.db-assignment-periods a.is-active {
  background: var(--accent);
  box-shadow: 0 2px 6px rgba(0, 122, 255, .2);
  color: #fff;
}
.db-assignment-metric-viewport {
  overflow-x: auto;
  scrollbar-width: thin;
}
.db-assignment-metrics {
  display: grid;
  grid-template-columns: 1.15fr repeat(4, minmax(0, 1fr));
  gap: 5px;
  min-width: 570px;
}
.db-assignment-metric {
  position: relative;
  min-height: 52px;
  overflow: hidden;
  padding: 7px 8px 6px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg);
}
.db-assignment-metric::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--metric-color);
  content: "";
}
.db-assignment-metric.is-total {
  background: var(--accent-weak);
}
.db-assignment-metric > span {
  display: block;
  color: var(--body-text);
  font-size: 10px;
  font-weight: 750;
  line-height: 1.2;
}
.db-assignment-metric strong {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  margin-top: 3px;
  color: var(--text);
  font-size: 18px;
  font-weight: 780;
  line-height: 1;
  letter-spacing: -.035em;
}
.db-assignment-metric strong small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}
.db-assignment-metric em {
  float: right;
  margin-top: 3px;
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--metric-color);
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.25;
}
.db-assignment-summary-note {
  margin: 4px 1px 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.3;
  text-align: right;
}

/* 대시보드 DB 현황: 최고관리자는 전체와 담당자별 수치를 함께 확인한다. */
.dashboard-db-assignment {
  margin-bottom: 16px;
  padding: 12px 14px 10px;
}
.dashboard-db-assignment .db-assignment-summary-head { margin-bottom: 9px; }
.dashboard-db-assignment .db-assignment-metric { min-height: 62px; padding: 9px 11px 8px 13px; }
.dashboard-db-assignment .db-assignment-metric > span { font-size: 11px; }
.dashboard-db-assignment .db-assignment-metric strong { margin-top: 5px; font-size: 22px; }
.dashboard-db-members { margin-bottom: 16px; }
.dashboard-db-members .panel-head > div p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}
.dashboard-db-member-table table {
  min-width: 780px;
  table-layout: fixed;
}
.dashboard-db-member-table th,
.dashboard-db-member-table td { text-align: center; }
.dashboard-db-member-table th:first-child,
.dashboard-db-member-table td:first-child { width: 210px; text-align: left; }
.dashboard-db-member-table td > strong {
  color: var(--text);
  font-size: 16px;
  font-weight: 780;
}
.dashboard-db-member-table td > small {
  margin-left: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}
.dashboard-db-member-table td > small span { color: var(--accent); font-weight: 800; }
.dashboard-db-member-link {
  display: inline-flex;
  max-width: 100%;
  flex-direction: column;
  gap: 3px;
  color: var(--text);
  text-decoration: none;
}
.dashboard-db-member-link strong { overflow: hidden; text-overflow: ellipsis; }
.dashboard-db-member-link small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
}
.dashboard-db-member-link:hover strong { color: var(--accent); }
.dashboard-private-empty { max-width: 720px; }

@media (min-width: 1200px) and (max-height: 900px) {
  .adm-main { padding-top: 12px; padding-bottom: 20px; }
  .adm-top-menu-bar { height: 40px; margin-bottom: 8px; }
  .adm-page-head { margin-bottom: 8px; }
  .adm-page-head h1 { font-size: 24px; }
  .head-actions { margin-top: -39px; margin-bottom: 8px; }
  .adm-stat-card { min-height: 74px; padding: 11px 15px; }
  .adm-stat-card p { margin-bottom: 4px; }
  .adm-stat-card strong { font-size: 23px; }
  .db-board-group-head { min-height: 44px; padding-block: 6px; }
  .db-board-table th, .db-board-table td { height: 37px; padding-block: 3px; }
  .db-board-table .empty-cell { height: 42px; padding: 9px !important; }
  .db-board-table td input:not([type=checkbox]) { min-height: 29px; }
  .db-eye-btn, .db-save-btn, .db-delete-btn { width: 29px; height: 29px; flex-basis: 29px; }
  .db-assignment-summary { padding: 7px 9px 6px; }
  .db-assignment-summary-head { margin-bottom: 5px; }
  .db-assignment-metric { min-height: 48px; padding-block: 6px 5px; }
  .db-assignment-metric strong { margin-top: 2px; font-size: 17px; }
  .db-assignment-summary-note { margin-top: 3px; }
}

@media (max-width: 1180px) {
  .adm-shell { grid-template-columns: 218px minmax(0, 1fr); }
  .adm-main { padding-inline: 16px; }
  .adm-stat-card { min-height: 80px; padding: 13px 15px; }
}

@media (max-width: 900px) {
  .adm-shell, .adm-sidebar-collapsed .adm-shell { display: block; }
  .db-bulk-bar,
  html.adm-sidebar-collapsed .db-bulk-bar {
    left: 50%;
    max-width: calc(100vw - 24px);
  }
  .adm-sidebar {
    position: relative;
    height: auto;
    min-height: 0;
    padding: 12px;
    border-bottom: 0;
  }
  .adm-brand { padding: 0 3px 10px; }
  .adm-sidebar-toggle { display: none; }
  .adm-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
  .adm-nav > a, .adm-nav-parent { justify-content: center; min-width: 0; padding: 0 7px; }
  .adm-nav-section, .adm-nav-group { grid-column: 1 / -1; }
  .adm-nav-group .adm-nav-parent { justify-content: flex-start; }
  .adm-subnav { display: grid; grid-template-columns: repeat(3, 1fr); padding: 3px 0 5px 38px; }
  .adm-main { padding: 14px 12px 36px; }
  .adm-top-menu-bar { margin-bottom: 12px; }
  .dashboard-summary-grid, .db-detail-layout { grid-template-columns: 1fr; }
  .db-assignment-summary-head { align-items: flex-start; }
  .db-assignment-summary-copy > span { flex-basis: 100%; }
  .db-file-card {
    grid-template-columns: 46px minmax(0, 1fr);
  }
  .db-file-thumb { width: 46px; height: 46px; }
  .db-file-card-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
  .db-file-preview-layer { padding: 8px; }
  .db-file-preview-panel { width: 100%; height: calc(100dvh - 16px); border-radius: 15px; }
  .sheet-source-intro { grid-template-columns: 1fr; gap: 16px; }
  .sheet-source-intro ol { flex-wrap: wrap; }
  .sheet-source-setup-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sheet-source-card { grid-template-columns: 1fr; }
  .sheet-source-card-actions { max-width: none; justify-content: flex-start; padding-left: 21px; }
}

@media (max-width: 760px) {
  body { font-size: 13px; }
  .adm-brand-mark { width: 36px; height: 36px; flex-basis: 36px; border-radius: 10px; }
  .adm-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .adm-nav > a, .adm-nav-parent { justify-content: flex-start; min-height: 40px; }
  .adm-subnav { grid-template-columns: 1fr; padding-left: 39px; }
  .adm-main { padding: 13px 10px 32px; }
  .adm-top-menu-bar { height: 40px; margin-bottom: 10px; }
  .adm-theme-toggle { width: 62px; height: 34px; }
  .icon-btn { width: 34px; height: 34px; }
  .adm-page-head h1 { font-size: 23px; }
  .head-actions { margin: 0 0 10px; flex-wrap: wrap; }
  .adm-stats, .adm-stats.three { grid-template-columns: 1fr; }
  .adm-stat-card { min-height: 72px; }
  .db-assignment-summary { padding: 10px; }
  .db-assignment-summary-head { flex-wrap: wrap; }
  .db-assignment-summary-copy { width: 100%; }
  .db-assignment-periods { width: 100%; grid-template-columns: repeat(2, 1fr); }
  .db-assignment-metrics { min-width: 560px; }
  .meeting-calendar-head { align-items: flex-start; padding: 10px 11px; }
  .meeting-calendar-head > div > span { display: none; }
  .meeting-calendar-scroll { overflow-x: auto; }
  .meeting-calendar-weekdays,
  .meeting-calendar-grid { min-width: 680px; }
  .meeting-calendar-day > header button { opacity: 1; }
  .meeting-calendar-foot { justify-content: flex-start; }
  .toolbar { align-items: stretch; padding: 7px; }
  .toolbar input, .toolbar select, .toolbar button, .toolbar .distribution-trigger { width: 100% !important; }
  .page-size-control { justify-content: space-between; }
  .table-area { border-radius: 12px; }
  th, td { height: 44px; padding: 7px 9px; }
  .modal { padding: 8px; }
  .modal-panel, .message-panel { padding: 20px 14px; border-radius: 16px; }
  .meeting-move-schedule { padding: 11px; }
  .meeting-move-schedule-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions button, .modal-actions a { width: 100%; }
  .form-grid, .kakao-template-layout, .kakao-variables { grid-template-columns: 1fr; }
  .db-original-field-row { grid-template-columns: 76px minmax(0, 1fr); }
  .db-field-actions { grid-column: 2; justify-self: end; }
  .db-field-add-form { grid-template-columns: 1fr; }
  .db-field-restore { grid-template-columns: 1fr auto; }
  .db-field-restore > span { grid-column: 1 / -1; }
  .db-message-shortcuts { gap: 4px; padding-right: 34px; }
  .db-message-action { gap: 4px; padding-left: 5px; }
  .db-message-action-label { font-size: 9.5px; }
  .comment-form { grid-template-columns: 1fr; }
  .comment-form-heading,
  .comment-editor-shell,
  .comment-form-actions,
  .comment-form-status {
    grid-column: 1;
    grid-row: auto;
  }
  .comment-form-actions { grid-template-columns: minmax(0, 1fr) auto; }
  .comment-form-actions .primary-btn { min-height: 38px; }
  .db-detail-tabs { display: flex; width: 100%; }
  .db-detail-tabs button { flex: 1; padding-inline: 10px; }
  .db-file-pane { min-height: 360px; max-height: none; }
  .db-fund-pane { min-height: min(600px, 68dvh); height: 68dvh; }
  .db-fund-pane-head { align-items: flex-start; }
  .db-fund-pane-head p { display: none; }
  .db-file-dropzone { grid-template-columns: 32px minmax(0, 1fr); padding: 9px 10px; }
  .db-file-drop-icon { width: 32px; height: 32px; }
  .db-file-upload-actions { align-items: stretch; flex-direction: column; }
  .db-file-upload-actions .primary-btn { width: 100%; }
  .db-file-card-actions { display: grid; grid-template-columns: repeat(4, 1fr); }
  .db-file-card-actions button,
  .db-file-card-actions a { min-width: 0; padding-inline: 5px; }
  .db-file-preview-panel > header {
    align-items: flex-start;
    min-height: 106px;
    padding: 12px;
  }
  .db-file-preview-panel > header h2 { max-width: calc(100vw - 48px); font-size: 16px; }
  .db-file-preview-actions {
    position: absolute;
    top: 58px;
    right: 20px;
  }
  .db-file-preview-actions a { min-height: 31px; padding-inline: 9px; }
  .db-file-preview-close { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; }
  .db-file-preview-meta { padding-inline: 12px; }
  .db-file-preview-body { padding: 10px; }
  .db-file-preview-body.is-pdf iframe { min-height: 520px; }
  .sheet-sync-status > .compact,
  .sheet-sync-status > .compact + .compact { width: 100%; margin-left: 0; }
  .sheet-source-intro,
  .sheet-source-editor,
  .sheet-source-list { border-radius: 14px; }
  .sheet-source-intro,
  .sheet-source-editor,
  .sheet-source-list { padding: 15px; }
  .sheet-source-intro ol { display: grid; grid-template-columns: 1fr; width: 100%; }
  .sheet-source-intro li { width: 100%; }
  .sheet-sharing-note { align-items: flex-start; flex-direction: column; gap: 5px; }
  .sheet-source-setup-grid,
  .sheet-mapping-grid { grid-template-columns: 1fr; }
  .sheet-mapping-grid label.is-key-field { grid-column: auto; }
  .sheet-inspect-actions,
  .sheet-source-form-actions { align-items: stretch; flex-direction: column; }
  .sheet-inspect-actions button,
  .sheet-source-form-actions > button { width: 100%; }
  .sheet-source-card-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding-left: 0; }
  .sheet-source-card-actions > *,
  .sheet-source-card-actions button,
  .sheet-source-card-actions a { width: 100%; }
  .login-card { padding: 28px 20px; }
  .meeting-hour-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .meeting-date-trigger { min-width: 155px; }
  .db-bulk-bar {
    bottom: max(10px, env(safe-area-inset-bottom));
    width: calc(100vw - 20px);
    justify-content: flex-start;
    border-radius: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* Keep text actions consistent across new, meeting, and company boards. */
.db-board-table th:last-child,
.db-board-table.is-meeting th:last-child { width: 126px; }
.db-board-table .db-save-btn,
.db-board-table .db-delete-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 48px;
  height: 31px;
  padding-inline: 9px;
  flex-basis: auto;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.db-board-table .db-delete-btn {
  width: auto !important;
  min-width: 50px !important;
  padding: 0 10px !important;
  flex: 0 0 auto !important;
  color: #fff !important;
  font-size: 11.5px !important;
  text-indent: 0 !important;
  overflow: visible;
}
.db-board-table .db-delete-label {
  display: inline !important;
  visibility: visible !important;
  opacity: 1 !important;
  color: inherit !important;
  font: inherit !important;
  line-height: inherit !important;
}
.db-board-table .db-row-actions form { margin: 0; }

/*
 * All modal-style layers are viewport overlays. Keeping them as direct body
 * children (see admin.js) prevents a scrolled or transformed page container
 * from becoming the containing block for position: fixed on some browsers.
 */
.modal,
.message-layer,
.db-file-preview-layer {
  box-sizing: border-box;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  overscroll-behavior: contain;
  padding: 16px;
}

.modal { z-index: 2000; }
.message-layer { z-index: 2100; }
.db-file-preview-layer { z-index: 2200; }

.modal > .modal-panel,
.message-layer > .message-panel,
.db-file-preview-layer > .db-file-preview-panel {
  flex: 0 1 auto;
  max-width: 100%;
  max-height: 90vh;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

@media (max-width: 760px) {
  .modal,
  .message-layer,
  .db-file-preview-layer { padding: 8px; }
}
