/* ============================================================
   M3 Components — Tabulator 테마 오버라이드
   ============================================================ */

.tabulator {
  border: none;
  border-radius: var(--md-sys-shape-lg);
  background: var(--md-sys-color-surface-container-lowest);
  box-shadow: var(--md-sys-elevation-1);
  font-family: var(--md-sys-typescale-font-plain);
}
.tabulator .tabulator-header {
  background: var(--md-sys-color-surface-container-low);
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
}
.tabulator .tabulator-header .tabulator-col {
  background: transparent;
  border-right: none;
  font: var(--md-sys-typescale-label-medium);
  color: var(--md-sys-color-on-surface-variant);
}
.tabulator .tabulator-row {
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
  font: var(--md-sys-typescale-body-medium);
  color: var(--md-sys-color-on-surface);
}
.tabulator .tabulator-row:hover {
  background: var(--md-sys-color-surface-container-low);
}
.tabulator .tabulator-row.tabulator-selected {
  background: color-mix(in srgb, var(--md-sys-color-primary) 8%, transparent);
}

/* === 원우회 Tabulator 엑셀 스타일 === */
.tabulator-cell.tabulator-cell-editable:hover {
  outline: 2px solid var(--md-sys-color-primary);
  outline-offset: -2px;
  cursor: text;
}
.tabulator-cell.tabulator-editing {
  outline: 2px solid var(--md-sys-color-primary) !important;
  background: var(--md-sys-color-surface-container-lowest) !important;
  padding: 0 !important;
}
.tabulator-cell.tabulator-editing input {
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
  height: 100%;
  padding: 0 8px;
  font-size: 13px;
}
.tabulator-row.tabulator-selected {
  background-color: color-mix(in srgb, var(--md-sys-color-primary) 8%, transparent) !important;
}
.tabulator-row .tabulator-cell input[type="checkbox"] {
  accent-color: var(--md-sys-color-primary);
  width: 16px;
  height: 16px;
}
.tabulator .tabulator-row { min-height: 34px; font-size: 13px; }
.tabulator .tabulator-header .tabulator-col {
  font-size: 12px;
  font-weight: 500;
  background: var(--md-sys-color-surface-container-low);
  border-right: 1px solid var(--md-sys-color-outline-variant);
}
.tabulator .tabulator-cell {
  border-right: 1px solid var(--md-sys-color-outline-variant);
}

/* ── 스큐어모픽 업무종목 탭 (시안 .biztabs) ── */
.biztabs {
  display: flex; gap: 2px; align-items: stretch; padding: 4px;
  overflow-x: auto; flex-shrink: 0;
  background: linear-gradient(180deg, #fafbfc, #eef1f4);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: 10px 10px 0 0;
  box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 1px 3px rgba(0,0,0,.06);
}
.biztab {
  display: flex; align-items: center; gap: 5px;
  padding: 8px 14px; border-radius: 8px 8px 0 0;
  font-size: 12.5px; font-weight: 600;
  color: var(--md-sys-color-on-surface-variant);
  white-space: nowrap; cursor: pointer;
  border: 1px solid transparent; border-bottom: none;
  transition: .15s;
  text-decoration: none;
}
.biztab:hover {
  color: var(--md-sys-color-on-surface);
  background: var(--md-sys-color-surface-container-low);
}
.biztab.active {
  color: var(--md-sys-color-primary);
  background: var(--md-sys-color-surface-container-lowest, #fff);
  border-color: var(--md-sys-color-outline-variant);
  box-shadow: 0 -2px 4px rgba(0,0,0,.04);
}
.biztab .material-symbols-outlined { font-size: 16px; }

/* ── 하위 메뉴 ── */
.submenu {
  display: flex; gap: 4px; padding: 6px 8px; flex-shrink: 0;
  align-items: center;
  background: var(--md-sys-color-surface-container-lowest, #fff);
  border-radius: .5rem;
  box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 1px 3px rgba(0,0,0,.06);
}
.submenu .mi {
  padding: 5px 11px; border-radius: 7px; font-size: 12px;
  color: var(--md-sys-color-on-surface-variant); cursor: pointer;
  text-decoration: none;
}
.submenu .mi.active {
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary); font-weight: 600;
}
.submenu .mi:not(.active):hover {
  background: var(--md-sys-color-surface-container);
}

/* ── 카테고리 탭 (시안 .cattabs) ── */
.cattabs {
  display: flex; gap: 3px;
  background: var(--md-sys-color-surface-container);
  border-radius: 10px; padding: 4px; align-self: flex-start;
}
.cat {
  padding: 6px 14px; border-radius: 7px; font-size: 12px;
  color: var(--md-sys-color-on-surface-variant);
  cursor: pointer; font-weight: 500; transition: .15s;
}
.cat.active {
  background: var(--md-sys-color-surface-container-lowest, #fff);
  color: var(--md-sys-color-on-surface); font-weight: 700;
  box-shadow: 0 1px 2px rgba(0,0,0,.1);
}

/* ── ATT 패널 속성그룹 ── */
.att-group {
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: 9px; overflow: hidden;
}
.att-group-header {
  padding: 8px 11px;
  background: var(--md-sys-color-surface-container-low);
  font-size: 11.5px; font-weight: 700;
  display: flex; align-items: center; gap: 6px;
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
}
.att-kv {
  display: flex; justify-content: space-between;
  padding: 6px 11px; font-size: 12px;
  border-bottom: 1px solid var(--md-sys-color-surface-container);
}
.att-kv:last-child { border-bottom: none; }

/* ── 스큐어모픽 칩 버튼 (print_setup 등) ── */
.att-chip-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--md-sys-color-outline-variant);
  background: linear-gradient(180deg, var(--md-sys-color-surface-container-lowest, #fff) 0%, var(--md-sys-color-surface-container-low) 100%);
  box-shadow: 0 1px 0 rgba(255,255,255,0.95) inset, 0 1px 2px rgba(0,0,0,.08);
  min-height: 30px;
  padding: 0 10px;
  transition: all 0.14s ease;
  white-space: nowrap;
  cursor: pointer;
}
.att-chip-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.95) inset, 0 6px 12px rgba(0,0,0,.10);
}
.att-chip-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0,0,0,.10) inset;
}
.att-chip-btn[data-selected="true"] {
  color: var(--md-sys-color-on-primary);
  border-color: var(--md-sys-color-primary);
  background: linear-gradient(180deg, color-mix(in srgb, var(--md-sys-color-primary) 80%, white) 0%, var(--md-sys-color-primary) 100%);
  box-shadow: 0 1px 0 rgba(255,255,255,0.28) inset, 0 4px 10px color-mix(in srgb, var(--md-sys-color-primary) 32%, transparent);
}

/* ── 매물장 출력 설정 (print_setup) ── */
.print-setup-sidebar {
  background: linear-gradient(180deg, var(--md-sys-color-surface-container-lowest, #fff) 0%, var(--md-sys-color-surface-container-low) 100%);
  border-right: 1px solid var(--md-sys-color-outline-variant);
}
.print-setup-header {
  background: linear-gradient(180deg, var(--md-sys-color-surface-container-low) 0%, var(--md-sys-color-surface-container) 100%);
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
}
.print-setup-section {
  background: var(--md-sys-color-surface-container-lowest, #fff);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.print-setup-section-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--md-sys-color-on-surface-variant);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.print-setup-section-label .material-symbols-outlined {
  font-size: 14px;
}
.print-setup-att-group {
  background: var(--md-sys-color-surface-container-low);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: 10px;
  padding: 10px;
}
.print-setup-att-group-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--md-sys-color-on-surface-variant);
  letter-spacing: 0.3px;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
  display: flex;
  align-items: center;
  gap: 5px;
}
.print-setup-att-group-label .material-symbols-outlined {
  font-size: 13px;
}
.print-setup-footer {
  background: linear-gradient(180deg, var(--md-sys-color-surface-container-low) 0%, var(--md-sys-color-surface-container) 100%);
  border-top: 1px solid var(--md-sys-color-outline-variant);
  box-shadow: 0 -1px 2px rgba(0,0,0,.04);
}
.print-setup-print-btn {
  background: linear-gradient(180deg, color-mix(in srgb, var(--md-sys-color-primary) 90%, white) 0%, var(--md-sys-color-primary) 100%);
  color: var(--md-sys-color-on-primary);
  border: none;
  border-radius: 10px;
  padding: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  box-shadow: 0 1px 0 rgba(255,255,255,0.2) inset, 0 2px 6px color-mix(in srgb, var(--md-sys-color-primary) 24%, transparent);
  transition: all 0.14s ease;
}
.print-setup-print-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.2) inset, 0 4px 12px color-mix(in srgb, var(--md-sys-color-primary) 32%, transparent);
}
.print-setup-print-btn:active {
  transform: translateY(0);
}
