/* ===== base.css ===== */
* { box-sizing: border-box; margin: 0; padding: 0; font-family: "Malgun Gothic", Arial, sans-serif; }
body { background: #f3f5f8; color: #222; }
.blue { color: #2563eb; } .red { color: #dc2626; } .green { color: #059669; } .orange { color: #ea580c; } .gray { color: #6b7280; }
.small { color: #6b7280; font-size: 13px; }
/* ===== layout.css ===== */
.layout { display: flex; min-height: 100vh; align-items: flex-start; }
.sidebar { color: #fff; flex-shrink: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.logo { font-size: 22px; font-weight: 800; margin-bottom: 28px; }
.menu-title { font-size: 12px; color: #9ca3af; margin-bottom: 10px; }
.menu a { display: block; text-decoration: none; font-size: 15px; }
.main { flex: 1; padding: 24px; min-width: 0; }
.page { display: none; }
.page.active { display: block; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; gap: 16px; }
.topbar h1 { font-size: 28px; font-weight: 800; }
.sub { color: #6b7280; font-size: 14px; margin-top: 5px; }
.user { background: #fff; padding: 10px 16px; border-radius: 999px; box-shadow: 0 2px 10px rgba(0,0,0,.05); font-size: 14px; white-space: nowrap; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.grid-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; margin-bottom: 20px; }
.detail-header { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; margin-bottom:18px; }
.detail-header h1 { font-size:28px; font-weight:800; margin-bottom:6px; }
.detail-actions { display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.detail-summary { display:grid; grid-template-columns:repeat(5, 1fr); gap:12px; margin-bottom:18px; }
.mini-card { background:#fff; border:1px solid #e5e7eb; border-radius:14px; padding:14px; }
.mini-card span { display:block; color:#6b7280; font-size:12px; margin-bottom:6px; }
.mini-card strong { font-size:16px; }
.detail-section { display:none; }
.detail-section.active { display:block; }
/* ===== components.css ===== */
.card { background: #fff; border: 1px solid #e5e7eb; border-radius: 18px; padding: 20px; box-shadow: 0 4px 18px rgba(15,23,42,.06); overflow: hidden; }
.card-title { color: #6b7280; font-size: 14px; margin-bottom: 10px; }
.card-value { font-size: 24px; font-weight: 800; }
.card-sub { color: #6b7280; font-size: 13px; margin-top: 8px; }
.section-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 10px; }
.section-title h2 { font-size: 18px; font-weight: 800; }
.btn { border: 0; background: #2563eb; color: #fff; padding: 9px 14px; border-radius: 10px; cursor: pointer; font-size: 14px; }
.btn:hover { filter: brightness(.97); }
a.btn { display:inline-flex; align-items:center; justify-content:center; vertical-align:middle; text-decoration:none; }
a.btn:hover, a.btn:focus, a.btn:active { text-decoration:none; }
.btn.light { background: #eef2ff; color: #2563eb; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 12px 10px; border-bottom: 1px solid #e5e7eb; text-align: left; white-space: nowrap; }
th { color: #6b7280; background: #f9fafb; font-weight: 700; }
.table-wrap { overflow-x: auto; }
.status { display: inline-block; padding: 5px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.status.blue { background: #dbeafe; color: #1d4ed8; }
.status.red { background: #fee2e2; color: #b91c1c; }
.status.green { background: #dcfce7; color: #15803d; }
.status.orange { background: #ffedd5; color: #c2410c; }
.status.pale { background: #f3f4f6; color: #9ca3af; }
.alert-list { list-style: none; }
.alert-list li { padding: 13px 0; border-bottom: 1px solid #e5e7eb; display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.alert-list strong { display: block; margin-bottom: 4px; }
.tabs { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.tab { border: 1px solid #d1d5db; background: #fff; color: #374151; padding: 8px 12px; border-radius: 999px; cursor: pointer; font-size: 13px; }
.tab.active { background: #2563eb; color: #fff; border-color: #2563eb; }
.form-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.form-grid.two-col { grid-template-columns: repeat(2, 1fr); }
.form-field label { display: block; color: #6b7280; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.form-field input, .form-field select, .form-field textarea { width: 100%; border: 1px solid #d1d5db; border-radius: 10px; padding: 10px; font-size: 14px; background: #fff; }
.form-field textarea { min-height: 82px; resize: vertical; }
.span-2 { grid-column: span 2; }
.readonly-box { border: 1px solid #e5e7eb; border-radius: 10px; padding: 10px; font-size: 14px; background: #f9fafb; color: #111827; min-height: 40px; display: flex; align-items: center; }
.memo-box { background: #f9fafb; border: 1px dashed #d1d5db; border-radius: 14px; padding: 14px; margin-top: 12px; }
.toolbar { display:flex; align-items:center; gap:14px; margin-bottom:16px; width:100%; }
.toolbar-inner { display:flex; align-items:center; gap:14px; width:100%; }
.search-box { display:flex; gap:10px; flex:1; width:100%; align-items:center; }
.search-box input, .search-box select { border:1px solid #d1d5db; border-radius:10px; padding:10px 11px; font-size:14px; background:#fff; }
.search-box input { flex:1; width:100%; }
.pagination { display:flex; justify-content:flex-end; align-items:center; gap:8px; margin-top:14px; }
.page-btn { border:1px solid #d1d5db; background:#fff; padding:8px 12px; border-radius:9px; cursor:pointer; }
.page-btn.active { background:#2563eb; color:#fff; border-color:#2563eb; }
/* JH shared UI patterns: reusable visual/interaction primitives.
   Keep these classes opt-in; migrate existing screens gradually to avoid cross-menu regressions. */

/* Accent card: dark surface + mobile-sidebar-like curved red edge + extended red glow. */
.jh-accent-card {
  --jh-accent-card-radius: 15px;
  --jh-accent-band-width: 6px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: var(--jh-accent-card-radius);
  background:
    linear-gradient(100deg, rgba(185,28,28,.34) 0%, rgba(153,27,27,.20) 27%, rgba(127,29,29,.095) 51%, rgba(127,29,29,.035) 70%, transparent 86%),
    linear-gradient(145deg, #17191e 0%, #0e1014 58%, #0a0b0e 100%);
  box-shadow: 0 5px 14px rgba(15,23,42,.085);
}
.jh-accent-card::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  border-radius: inherit;
  box-shadow:
    inset var(--jh-accent-band-width) 0 0 #ef1d2f,
    inset 16px 0 18px -18px rgba(239,29,47,.72);
  pointer-events: none;
}
.jh-accent-card > * { position: relative; z-index: 1; }

/* Pill menu: education/learning top navigation language for first/second-level menus. */
.jh-menu-pill {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(220,38,38,.18);
  border-radius: 999px;
  background: linear-gradient(180deg, #fff 0%, #fffdfd 100%);
  color: #4b5563;
  font: inherit;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease, background .16s ease;
}
.jh-menu-pill:hover,
.jh-menu-pill:focus-visible {
  color: #7f1d1d;
  border-color: rgba(220,38,38,.34);
  background: #fffafa;
  box-shadow: 0 7px 18px rgba(127,29,29,.07);
  outline: none;
  transform: translateY(-1px);
}
.jh-menu-pill.active,
.jh-menu-pill[aria-current="page"],
.jh-menu-pill[aria-pressed="true"] {
  color: #991b1b;
  border-color: rgba(220,38,38,.46);
  background: linear-gradient(180deg, #fffdfd 0%, #fff8f7 100%);
  box-shadow: 0 8px 20px rgba(127,29,29,.09), inset 0 0 0 1px rgba(220,38,38,.035);
}

/* Rounded field: one reusable shape for search/input/select/textarea controls. */
.jh-control,
.jh-control-scope input[type="text"],
.jh-control-scope input[type="search"],
.jh-control-scope input[type="password"],
.jh-control-scope input[type="email"],
.jh-control-scope input[type="tel"],
.jh-control-scope input[type="url"],
.jh-control-scope input[type="number"],
.jh-control-scope input[type="date"],
.jh-control-scope input[type="datetime-local"],
.jh-control-scope input[type="time"],
.jh-control-scope select,
.jh-control-scope textarea {
  box-sizing: border-box;
  min-width: 0;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  background: #fff;
  color: #111827;
  padding: 9px 11px;
  font: inherit;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.jh-control:hover,
.jh-control-scope input[type="text"]:hover,
.jh-control-scope input[type="search"]:hover,
.jh-control-scope input[type="password"]:hover,
.jh-control-scope input[type="email"]:hover,
.jh-control-scope input[type="tel"]:hover,
.jh-control-scope input[type="url"]:hover,
.jh-control-scope input[type="number"]:hover,
.jh-control-scope input[type="date"]:hover,
.jh-control-scope input[type="datetime-local"]:hover,
.jh-control-scope input[type="time"]:hover,
.jh-control-scope select:hover,
.jh-control-scope textarea:hover { border-color: #c3c9d2; }
.jh-control:focus,
.jh-control:focus-visible,
.jh-control-scope input[type="text"]:focus,
.jh-control-scope input[type="search"]:focus,
.jh-control-scope input[type="password"]:focus,
.jh-control-scope input[type="email"]:focus,
.jh-control-scope input[type="tel"]:focus,
.jh-control-scope input[type="url"]:focus,
.jh-control-scope input[type="number"]:focus,
.jh-control-scope input[type="date"]:focus,
.jh-control-scope input[type="datetime-local"]:focus,
.jh-control-scope input[type="time"]:focus,
.jh-control-scope select:focus,
.jh-control-scope textarea:focus {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(220,38,38,.10);
}
.jh-control:disabled,
.jh-control-scope input:disabled,
.jh-control-scope select:disabled,
.jh-control-scope textarea:disabled { background: #f8fafc; color: #94a3b8; cursor: default; }


/* Toolbar button: shared height/radius for list/search action rows. */
.jh-toolbar-btn {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  height: 36px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 11px;
  line-height: 1;
  white-space: nowrap;
}


/* Work island: opt-in rounded main workspace used below menu/category layers. */
.jh-work-island {
  box-sizing: border-box;
  border: 1px solid rgba(226,232,240,.92);
  border-radius: 18px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 2px 8px rgba(15,23,42,.028);
}

/* Contained list: keep actions/header outside while the lower rounded region scrolls internally. */
.jh-contained-view {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.jh-scroll-region {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
}

@media (max-width: 760px) {
  .jh-accent-card {
    --jh-accent-card-radius: 13px;
    --jh-accent-band-width: 4px;
  }
  .jh-control { border-radius: 11px; }
  .jh-scroll-region { border-radius: 13px; }
}

/* JH status card: compact edge-accent summary used for system/feature state.
   Domains own grid count, card size overrides, labels, values, and business behavior. */
.jh-status-card {
  --jh-status-accent: #b91c1c;
  --jh-status-tint: rgba(185,28,28,.055);
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 8px;
  min-height: 68px;
  padding: 9px 12px;
  overflow: hidden;
  border: 1px solid rgba(148,163,184,.24);
  border-radius: 15px;
  background: linear-gradient(100deg, var(--jh-status-tint) 0%, rgba(255,255,255,.94) 42%, rgba(255,255,255,.96) 100%);
}
.jh-status-card::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  border-radius: inherit;
  box-shadow:
    inset 5px 0 0 var(--jh-status-accent),
    inset 15px 0 18px -20px var(--jh-status-accent);
  pointer-events: none;
}
.jh-status-card > * { position: relative; z-index: 1; }
.jh-status-card > span {
  min-width: 0;
  overflow: hidden;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.jh-status-card > strong {
  justify-self: end;
  color: #111827;
  font-size: 16px;
  font-weight: 900;
  white-space: nowrap;
}
.jh-status-card > small {
  grid-column: 1 / -1;
  min-width: 0;
  margin-top: 2px;
  overflow: hidden;
  color: #94a3b8;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.jh-status-card.is-warning {
  --jh-status-accent: #d97706;
  --jh-status-tint: rgba(217,119,6,.075);
}
.jh-status-card.is-danger,
.jh-status-card.is-error {
  --jh-status-accent: #dc2626;
  --jh-status-tint: rgba(220,38,38,.085);
}

/* JH management navigation card: shared visual language for 3rd-level/admin target cards.
   Layout density is controlled by local CSS variables so each menu can size the same component independently. */
.jh-management-grid {
  --jh-management-columns: 4;
  --jh-management-gap: 7px;
  display: grid;
  grid-template-columns: repeat(var(--jh-management-columns), minmax(0, 1fr));
  gap: var(--jh-management-gap);
  margin: 0;
}
.jh-management-card {
  --jh-management-card-min-height: 68px;
  --jh-management-card-padding: 10px 27px 9px 15px;
  --jh-management-card-title-size: 13px;
  --jh-management-card-desc-size: 9px;
  position: relative;
  display: grid;
  min-width: 0;
  min-height: var(--jh-management-card-min-height);
  padding: var(--jh-management-card-padding);
  color: #f8fafc;
  text-align: left;
  cursor: pointer;
  appearance: none;
  box-shadow: 0 1px 5px rgba(15,23,42,.045);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.jh-management-card:hover,
.jh-management-card:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(248,113,113,.42);
  box-shadow: 0 3px 10px rgba(15,23,42,.085), 0 0 0 1px rgba(220,38,38,.08);
  outline: none;
}
.jh-management-card:active { transform: translateY(0); }
.jh-management-card.active,
.jh-management-card[aria-current="page"],
.jh-management-card[aria-pressed="true"] {
  --jh-accent-band-width: 7px;
  border-color: rgba(248,113,113,.88);
  background:
    linear-gradient(100deg, rgba(220,38,38,.46) 0%, rgba(153,27,27,.27) 28%, rgba(127,29,29,.12) 52%, rgba(127,29,29,.045) 72%, transparent 88%),
    linear-gradient(145deg, #191a1f 0%, #0e1014 58%, #0a0b0e 100%);
  box-shadow: 0 0 0 1px rgba(220,38,38,.24), 0 3px 9px rgba(15,23,42,.09);
}
.jh-management-card::after {
  content: "";
  position: absolute;
  z-index: 2;
  right: 11px;
  top: 50%;
  width: 13px;
  height: 4px;
  border-radius: 999px;
  background: #ef4444;
  box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 0 8px rgba(239,68,68,.2);
  opacity: 0;
  transform: translateY(-50%) scaleX(.55);
  transform-origin: center right;
  transition: opacity .16s ease, transform .16s ease;
  pointer-events: none;
}
.jh-management-card.active::after,
.jh-management-card[aria-current="page"]::after,
.jh-management-card[aria-pressed="true"]::after {
  opacity: 1;
  transform: translateY(-50%) scaleX(1);
}
.jh-management-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.jh-management-card-head > strong {
  min-width: 0;
  overflow: hidden;
  color: #fff;
  font-size: var(--jh-management-card-title-size);
  font-weight: 850;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.jh-management-card-desc {
  align-self: end;
  min-width: 0;
  margin-top: 6px;
  overflow: hidden;
  color: #aeb7c5;
  font-size: var(--jh-management-card-desc-size);
  font-weight: 700;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* JH compact card list: dense record tiles for data/question/member-style browsers.
   Domains control min width, row height, row template, column count overrides, and business content. */
.jh-compact-grid {
  --jh-compact-min-width: 210px;
  --jh-compact-row-height: 92px;
  --jh-compact-gap: 8px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--jh-compact-min-width), 1fr));
  grid-auto-rows: var(--jh-compact-row-height);
  align-content: start;
  gap: var(--jh-compact-gap);
  padding: 8px;
  border: 1px solid #e5e7eb;
  border-radius: 13px;
  background: rgba(248,250,252,.72);
}
.jh-compact-card {
  --jh-compact-card-height: var(--jh-compact-row-height, 92px);
  --jh-compact-card-rows: 18px 18px 15px 14px;
  position: relative;
  box-sizing: border-box;
  display: grid;
  grid-template-rows: var(--jh-compact-card-rows);
  gap: 3px;
  min-width: 0;
  height: var(--jh-compact-card-height);
  padding: 8px 9px 7px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(15,23,42,.025);
  transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease, background .14s ease;
}
.jh-compact-card:hover {
  transform: translateY(-1px);
  border-color: #cbd5e1;
  box-shadow: 0 4px 11px rgba(15,23,42,.055);
}
.jh-compact-card.is-selected,
.jh-compact-card[aria-selected="true"],
.jh-compact-card[aria-pressed="true"] {
  border-color: rgba(220,38,38,.46);
  background: linear-gradient(145deg, #fff 18%, #fff8f8 100%);
  box-shadow: inset 3px 0 0 #dc2626, 0 4px 12px rgba(127,29,29,.055);
}
.jh-compact-card-top {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}
.jh-compact-card input[type="checkbox"],
.jh-compact-card input[type="radio"] {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: #dc2626;
}
.jh-compact-card-spacer { flex: 1 1 auto; min-width: 0; }
.jh-compact-card-type,
.jh-compact-card-badge {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  min-height: 18px;
  overflow: hidden;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 8px;
  font-style: normal;
  font-weight: 850;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.jh-compact-card-type {
  flex: 0 1 auto;
  background: #f1f5f9;
  color: #475569;
}
.jh-compact-card-badge {
  flex: 0 1 auto;
  max-width: 92px;
  margin-left: auto;
  background: #fef2f2;
  color: #b91c1c;
}
.jh-compact-card-title,
.jh-compact-card-sub,
.jh-compact-card-meta {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.jh-compact-card-title {
  color: #111827;
  font-size: 11px;
  font-weight: 900;
  line-height: 18px;
}
.jh-compact-card-sub {
  color: #64748b;
  font-size: 9px;
  font-weight: 750;
  line-height: 15px;
}
.jh-compact-card-meta {
  color: #94a3b8;
  font-size: 8px;
  font-weight: 700;
  line-height: 14px;
}

/* JH floating work overlay: visual shell only.
   Owning domains decide anchoring, size, vertical placement, trigger mapping, and business behavior. */
.jh-work-overlay {
  --jh-work-overlay-accent: #dc2626;
  box-sizing: border-box;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(148,163,184,.34);
  border-radius: 15px;
  background: rgba(255,255,255,.992);
  box-shadow: 0 18px 42px rgba(15,23,42,.18), 0 0 0 1px rgba(15,23,42,.025);
}
.jh-work-overlay[hidden] { display: none !important; }
.jh-work-overlay::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  border-radius: 15px 0 0 15px;
  background: var(--jh-work-overlay-accent);
  content: "";
  pointer-events: none;
}
.jh-work-overlay-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  padding: 10px 10px 9px 15px;
  border-bottom: 1px solid #edf1f5;
  background: linear-gradient(180deg,#fff 0%,#fbfcfe 100%);
}
.jh-work-overlay-heading {
  display: grid;
  gap: 1px;
  min-width: 0;
}
.jh-work-overlay-heading > strong {
  overflow: hidden;
  color: #111827;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.jh-work-overlay-heading > small {
  overflow: hidden;
  color: #64748b;
  font-size: 9px;
  font-weight: 750;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.jh-work-overlay-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: #f8fafc;
  color: #64748b;
  font-size: 20px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
}
.jh-work-overlay-close:hover,
.jh-work-overlay-close:focus-visible {
  background: #f1f5f9;
  color: #991b1b;
  outline: none;
}
.jh-work-overlay-body {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px 12px 13px 15px;
  overflow: hidden;
}

/* JH persistent ON/OFF switch: shared by settings and learning features.
   Business behavior remains owned by each feature; this component only defines the stable interaction shape. */
.jh-toggle-switch {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 76px;
  min-height: 29px;
  padding: 3px 7px 3px 9px;
  border: 1px solid #d8e0e8;
  border-radius: 999px;
  background: #f8fafc;
  color: #64748b;
  font: inherit;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, color .16s ease, opacity .16s ease;
}
.jh-toggle-switch-label {
  min-width: 21px;
  color: inherit;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: .01em;
  text-align: center;
}
.jh-toggle-switch-track {
  position: relative;
  width: 31px;
  height: 17px;
  flex: 0 0 31px;
  border-radius: 999px;
  background: #cbd5e1;
  box-shadow: inset 0 0 0 1px rgba(71,85,105,.08);
  transition: background .16s ease;
}
.jh-toggle-switch-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15,23,42,.28);
  transition: transform .16s ease;
}
.jh-toggle-switch.is-active {
  border-color: rgba(5,150,105,.26);
  background: rgba(236,253,245,.95);
  color: #047857;
}
.jh-toggle-switch.is-active .jh-toggle-switch-track { background: #10b981; }
.jh-toggle-switch.is-active .jh-toggle-switch-knob { transform: translateX(14px); }
.jh-toggle-switch:hover:not(:disabled) { border-color: color-mix(in srgb, currentColor 32%, #d8e0e8); }
.jh-toggle-switch:focus-visible {
  outline: 2px solid rgba(220,38,38,.22);
  outline-offset: 2px;
}
.jh-toggle-switch:disabled { cursor: default; opacity: .58; }
.jh-toggle-switch.is-busy { opacity: .68; }
.site-row { cursor:pointer; }
.site-row:hover, .site-row.selected { background:#f8fbff; }
.site-row.selected { outline: 2px solid #bfdbfe; outline-offset: -2px; }
.closed-row { opacity:.58; }
.closed-row td { background:#fafafa; }
.detail-expand-row { animation:fadeDown .18s ease; }
@keyframes fadeDown { from { opacity:0; transform:translateY(-4px); } to { opacity:1; transform:translateY(0); } }
.modal-backdrop { position:fixed; inset:0; background:rgba(15,23,42,.45); display:none; align-items:center; justify-content:center; z-index:50; }
.modal { width:min(860px, 92vw); background:#fff; border-radius:18px; padding:20px; box-shadow:0 20px 60px rgba(0,0,0,.25); max-height: 90vh; overflow:auto; }
.modal.small-modal { width:min(680px, 92vw); }
.modal-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; }
.modal-header h2 { font-size:20px; }
.modal-search { display:flex; gap:10px; margin-bottom:14px; }
.modal-search input { flex:1; border:1px solid #d1d5db; border-radius:10px; padding:10px; font-size:14px; }
.modal-close { border:0; background:#f3f4f6; border-radius:10px; padding:8px 12px; cursor:pointer; }
.modal-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:14px; }
.input-button { display:flex; gap:8px; }
.input-button input { flex:1; }
.modal.wide-modal { width:min(1180px, 96vw); }
.bulk-toolbar { display:flex; justify-content:flex-end; gap:8px; margin:14px 0; }
.bulk-table input, .bulk-table select { width:100%; min-width:110px; border:1px solid #d1d5db; border-radius:9px; padding:8px; font-size:13px; background:#fff; }
.bulk-table .bulk-location-rule { min-width:150px; }
.bulk-preview-title { margin-top:18px; }
.preview-wrap { max-height:260px; overflow:auto; border:1px solid #e5e7eb; border-radius:12px; }
.device-actions { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.bulk-panel { margin-top:18px; border:1px solid #bfdbfe; background:#f8fbff; border-radius:18px; padding:18px; }
.bulk-panel .memo-box { background:#fff; }
.bulk-ip-settings { margin-top:12px; }
.bulk-ip-settings summary, .bulk-row-detail summary { cursor:pointer; color:#2563eb; font-weight:700; }
.bulk-detail-grid { display:grid; grid-template-columns: repeat(3, minmax(80px, 1fr)); gap:8px; margin-top:10px; padding:10px; background:#fff; border:1px solid #e5e7eb; border-radius:12px; }
.bulk-detail-grid label { display:flex; flex-direction:column; gap:5px; color:#6b7280; font-size:12px; font-weight:700; }
.bulk-detail-grid input { min-width:80px; }
.bulk-table .bulk-location-prefix { min-width:140px; }

.select-col { display:none; width:54px; text-align:center; }
.device-select-enabled .select-col { display:table-cell; }
.device-edit-only { display:none; }
.device-select-enabled .device-edit-only { display:inline-flex; }
.danger-text { color:#dc2626; border-color:#fecaca; background:#fff7f7; }
.inline-check { display:inline-flex; align-items:center; gap:6px; font-size:13px; color:#475569; background:#f9fafb; border:1px solid #e5e7eb; border-radius:999px; padding:8px 12px; }
.inline-check input { width:auto; height:16px; }

/* v4: 장비목록 입력 가독성 조정 */
.status-select { border:0; border-radius:999px; padding:5px 10px; font-size:12px; font-weight:800; cursor:pointer; }
.status-select.green { background:#dcfce7; color:#166534; }
.status-select.orange { background:#ffedd5; color:#9a3412; }
.status-select.blue { background:#dbeafe; color:#1d4ed8; }
.status-select.gray { background:#f3f4f6; color:#4b5563; }
.device-model-cell { min-width:190px; max-width:280px; white-space:nowrap; }
.bulk-table { table-layout:auto; }
.bulk-table .bulk-model-cell { width:260px; min-width:230px; }
.bulk-table .bulk-count-cell { width:72px; min-width:64px; }
.bulk-table .bulk-ip-cell { width:160px; min-width:150px; }
.bulk-table .bulk-count { text-align:center; min-width:58px; }
.bulk-detail-grid { grid-template-columns: repeat(4, minmax(100px, 1fr)); }
.small-modal .wide-field { grid-column:span 2; }
.bulk-table .bulk-zone-cell { width:110px; min-width:100px; }
.bulk-table .bulk-category-cell { width:120px; min-width:110px; }
.bulk-table .bulk-model-cell { width:320px; min-width:280px; }
.bulk-table .bulk-count-cell { width:64px; min-width:58px; }
.bulk-table .bulk-ip-cell { width:160px; min-width:145px; }
.bulk-table .bulk-mac-cell { width:150px; min-width:135px; }
.bulk-table .bulk-count-cell input { text-align:center; }

button:disabled,
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.2);
}

.device-mode-notice {
  margin: 12px 0;
}


/* v7: 대규모 장비 추가 행 비율 재정리 */
.bulk-table { table-layout: fixed; width:100%; }
.bulk-table input, .bulk-table select { min-width:0; }
.bulk-table .bulk-zone-cell { width:10%; min-width:92px; }
.bulk-table .bulk-category-cell { width:12%; min-width:105px; }
.bulk-table .bulk-model-cell { width:26%; min-width:260px; }
.bulk-table .bulk-count-cell { width:88px; min-width:82px; }
.bulk-table .bulk-ip-cell { width:15%; min-width:145px; }
.bulk-table .bulk-mac-cell { width:15%; min-width:145px; }
.bulk-table .bulk-count { text-align:center; min-width:72px; }
.bulk-detail-grid { grid-template-columns: 1.4fr 1fr .8fr; gap:10px; width:100%; box-sizing:border-box; }
.bulk-detail-grid input { min-width:0; }
.bulk-table .bulk-location-prefix { min-width:0; }
@media (max-width: 1280px) {
  .bulk-table { table-layout:auto; }
  .bulk-table .bulk-model-cell { min-width:240px; }
  .bulk-row-detail { min-width:260px; }
}
/* 로그인/권한 1차 패치 */
.sidebar-auth-box {
  border: 1px solid #e5e7eb;
  background: #ffffff;
  display: grid;
}
.login-card { max-width: 520px; }
.login-message { min-height: 20px; color: #b91c1c; margin-top: 8px; }

/* v22: JH 로고 기반 로그인/사이드바 정리 */
.brand-logo {
  display:flex;
  align-items:center;
  text-decoration:none;
}
.brand-logo img { max-width:100%; max-height:44px; object-fit:contain; display:block; }
.sidebar { display:flex; flex-direction:column; background:#111827; }
.menu { flex:1; }
.menu a { color:#d7dce5; border-radius:12px; }
.menu a.active, .menu a:hover { background:rgba(255,255,255,.10); color:#fff; }
.menu a.active { box-shadow:inset 3px 0 0 #ef1d2f; }
.sidebar-auth-box {
  margin:22px 2px 0;
  padding:14px;
  border:1px solid rgba(255,255,255,.10);
  border-radius:16px;
  background:rgba(255,255,255,.06);
  color:#fff;
  display:grid;
  gap:6px;
}
.sidebar-auth-box .small { color:#aeb6c4; }
.sidebar-auth-box .btn.light { background:#ffffff; color:#111827; }
.login-page.active {
  display:flex;
  min-height:calc(100vh - 48px);
  align-items:center;
  justify-content:center;
}
.login-shell {
  width:min(1040px, 100%);
  display:grid;
  grid-template-columns:1.05fr .95fr;
  align-items:stretch;
}
.login-visual {
  position:relative;
  overflow:hidden;
  color:#fff;
  background:
    radial-gradient(circle at 14% 20%, rgba(239,29,47,.95) 0 0, rgba(239,29,47,.95) 88px, transparent 89px),
    linear-gradient(135deg, #151923 0%, #202633 54%, #111827 100%);
  box-shadow:0 24px 60px rgba(17,24,39,.18);
  display:flex;
  flex-direction:column;
  justify-content:space-between;
}
.login-visual::after {
  content:"";
  position:absolute;
  border:42px solid rgba(239,29,47,.42);
  border-radius:50%;
}
.login-mark-wrap {
  width:128px;
  height:128px;
  border-radius:32px;
  background:rgba(255,255,255,.96);
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 18px 38px rgba(0,0,0,.18);
  z-index:1;
}
.login-mark-wrap img { width:112px; height:112px; object-fit:contain; }
.login-visual-text { position:relative; z-index:1; max-width:420px; }
.login-visual-text span { display:block; color:#cbd5e1; font-size:13px; letter-spacing:.08em; text-transform:uppercase; margin-bottom:10px; }
.login-visual-text strong { display:block; font-size:26px; line-height:1.35; margin-bottom:14px; }
.login-visual-text p { color:#dbe2ee; line-height:1.65; font-size:15px; }
.login-card {
  max-width:none;
  display:flex;
  flex-direction:column;
  justify-content:center;
  box-shadow:0 24px 60px rgba(17,24,39,.12);
}
.login-card-head { text-align:center; margin-bottom:28px; }
.login-card-head img { max-width:280px; width:76%; height:auto; margin-bottom:22px; }
.login-card-head h1 { font-size:26px; margin-bottom:8px; }
.login-form-grid { grid-template-columns:1fr; gap:14px; margin-bottom:10px; }
.login-form-grid .form-field input { height:48px; border-radius:14px; }
.login-submit { width:100%; height:48px; border-radius:14px; font-weight:800; background:#ef1d2f; margin-top:10px; }
.login-guide { font-size:13px; line-height:1.55; }
@media (max-width: 980px) {
  .login-shell { grid-template-columns:1fr; min-height:auto; }
  .login-visual { min-height:280px; }
}
@media (max-width: 820px) {
  .login-page.active { min-height:auto; }
  .login-card { padding:26px; }
  .login-visual { padding:28px; border-radius:22px; }
}
.sidebar-auth-box { margin-top:auto; }
@media (max-width: 760px) { .sidebar { position:relative; height:auto; } .sidebar-auth-box { margin-top:16px; } }

/* v23: GPT 스타일 좌측 하단 계정 메뉴 */
.sidebar-account {
  position: relative;
  margin: 18px 2px 0;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.account-toggle {
  width: 100%;
  border: 0;
  outline: 0;
  cursor: pointer;
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 9px;
  border-radius: 14px;
  color: #f9fafb;
  background: transparent;
  text-align: left;
}
.account-toggle:hover,
.account-toggle[aria-expanded="true"] { background: rgba(255,255,255,.09); }
.account-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ef1d2f;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -.02em;
  flex-shrink: 0;
}
.account-text { min-width: 0; display: grid; gap: 1px; }
.account-text strong {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-text small {
  font-size: 11px;
  color: #aeb6c4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-caret { color: #aeb6c4; font-size: 14px; transform: rotate(180deg); }
.account-menu {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  padding: 7px;
  border-radius: 16px;
  background: #1f2937;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 18px 45px rgba(0,0,0,.35);
  z-index: 30;
}
.account-menu button {
  width: 100%;
  border: 0;
  background: transparent;
  color: #f9fafb;
  text-align: left;
  border-radius: 11px;
  padding: 10px 11px;
  font-size: 13px;
  cursor: pointer;
}
.account-menu button:hover { background: rgba(255,255,255,.09); }
.account-menu button:last-child { color: #fecaca; }
.small-modal { max-width: 420px; }
.account-info-list { display: grid; gap: 10px; margin: 8px 0 18px; }
.account-info-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 12px;
  background: #f9fafb;
  border: 1px solid #eef0f3;
}
.account-info-list span { color: #6b7280; font-size: 13px; }
.account-info-list strong { color: #111827; font-size: 13px; }


/* v26: 사용자 지정 JH 브랜드/여성기업 인증 로고 반영 */
.brand-logo {
  justify-content:flex-start;
  background:transparent;
  border:0;
  border-radius:0;
}
.brand-logo img {
  object-fit:contain;
  display:block;
}
.login-page.active {
  min-height:calc(100vh - 48px);
  padding:40px 24px;
  background:#f7f8fb;
}
.login-shell {
  width:min(1180px, 100%);
  min-height:620px;
  grid-template-columns:1.04fr .96fr;
  gap:0;
  border-radius:32px;
  overflow:hidden;
  box-shadow:0 28px 80px rgba(17,24,39,.14);
  background:#fff;
}
.login-visual {
  border-radius:0;
  padding:42px;
  background:linear-gradient(135deg,#080c14 0%,#121824 52%,#060910 100%);
  box-shadow:none;
}
.login-visual::after {
  right:-120px;
  bottom:-145px;
  width:510px;
  height:510px;
  border:46px solid rgba(239,29,47,.76);
}
.women-cert-wrap {
  position:relative;
  z-index:2;
  width:180px;
  height:70px;
  padding:10px 16px;
  border-radius:22px;
  background:rgba(255,255,255,.96);
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 14px 34px rgba(0,0,0,.20);
}
.women-cert-wrap img {
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
}
.login-mark-wrap { display:none; }
.login-visual-watermark {
  position:absolute;
  z-index:1;
  pointer-events:none;
}
.login-visual-text {
  z-index:2;
  max-width:460px;
  margin-top:auto;
}
.login-visual-text span {
  color:#ef3b48;
  font-size:15px;
  letter-spacing:0;
  text-transform:none;
  font-weight:800;
}
.login-visual-text strong { font-size:34px; margin-bottom:12px; }
.login-visual-text p { color:#ffffff; font-size:17px; }
.login-card {
  position:relative;
  border-radius:0;
  padding:76px 58px 52px;
  box-shadow:none;
  justify-content:center;
}
.login-card-logo {
  position:absolute;
  top:44px;
  right:58px;
  width:112px;
  height:auto;
}
.login-card-head {
  text-align:left;
  margin:64px 0 34px;
}
.login-card-head > img { display:none; }
.login-card-head h1 {
  font-size:30px;
  letter-spacing:-.04em;
  color:#111827;
}
.login-card-head .sub { font-size:15px; color:#6b7280; }
.login-form-grid { gap:18px; }
.login-submit { background:#f51f32; height:52px; margin-top:20px; }
@media (max-width:980px) {
  .login-shell { grid-template-columns:1fr; border-radius:26px; }
  .login-card-logo { top:28px; right:32px; width:94px; }
  .login-card-head { margin-top:52px; }
}
@media (max-width:760px) {
  .brand-logo { height:62px; padding:10px 14px; }
  .brand-logo img { max-width:108px; }
  .login-page.active { padding:20px 12px; }
  .login-card { padding:64px 26px 28px; }
  .login-visual { padding:28px; min-height:320px; }
  .women-cert-wrap { width:154px; height:62px; }
}

/* v27: 로그인 로고 위치 정리 + 좌측 홈 로고 축소 */
.login-visual-brand {
  position: relative;
  z-index: 3;
  height: auto;
  display: block;
}
.login-cert-wrap {
  position: absolute;
  top: 42px;
  right: 52px;
  z-index: 3;
  width: 148px;
  height: 54px;
  padding: 6px 10px;
  border-radius: 16px;
  background: rgba(255,255,255,.94);
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-cert-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.login-card-logo { display: none !important; }
.login-card-head { margin-top: 76px; }
@media (max-width: 980px) {
  .login-visual-brand { width: 116px; }
  .login-cert-wrap { top: 26px; right: 28px; width: 136px; height: 50px; }
  .login-card-head { margin-top: 64px; }
}
@media (max-width: 760px) {
  .brand-logo { height: 44px; padding: 7px 14px; margin-bottom: 16px; }
  .brand-logo img { max-width: 84px; max-height: 30px; }
  .login-visual-brand { width: 108px; }
  .login-cert-wrap { width: 126px; height: 46px; top: 22px; right: 22px; }
  .login-card-head { margin-top: 58px; }
}

/* v28: 사이드바 상단 로고 슬림화 + 로그인 좌측 워터마크 중앙 정렬 */
.brand-logo {
  justify-content: flex-start;
}
.login-visual-brand {
  width: 118px;
}
.login-visual-watermark {
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  width: 58%;
  max-width: 440px;
  opacity: .13;
}
@media (max-width: 980px) {
  .brand-logo { height: 32px; padding: 4px 14px; margin-bottom: 10px; }
  .brand-logo img { max-width: 66px; max-height: 23px; }
  .login-visual-brand { width: 108px; }
  .login-visual-watermark { width: 60%; }
}
@media (max-width: 760px) {
  .brand-logo { height: 30px; padding: 4px 12px; margin-bottom: 10px; }
  .brand-logo img { max-width: 62px; max-height: 22px; }
  .login-visual-brand { width: 100px; }
}

/* v29: 사이드바 전용 로고 + 상단 여백 압축 */
.sidebar {
  padding: 10px 14px 16px !important;
}
.brand-logo {
  height: 24px !important;
  padding: 0 4px !important;
  margin: 0 2px 8px !important;
  justify-content: flex-start !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  line-height: 1 !important;
}
.brand-logo img {
  width: 72px !important;
  max-width: 72px !important;
  height: auto !important;
  max-height: 22px !important;
  object-fit: contain !important;
  display: block !important;
}
.sidebar .menu-title {
  margin-top: 0 !important;
  margin-bottom: 8px !important;
  font-size: 11px !important;
  line-height: 1.2 !important;
}
.menu a {
  padding-top: 10px !important;
  padding-bottom: 10px !important;
  margin-bottom: 5px !important;
}
@media (max-width: 980px) {
  .sidebar { padding-top: 10px !important; }
  .brand-logo { height: 24px !important; margin-bottom: 8px !important; }
  .brand-logo img { width: 70px !important; max-width: 70px !important; max-height: 22px !important; }
}
@media (max-width: 760px) {
  .brand-logo { height: 24px !important; padding: 0 4px !important; margin-bottom: 8px !important; }
  .brand-logo img { width: 68px !important; max-width: 68px !important; max-height: 21px !important; }
}

/* V30: compact collapsible sidebar */
.layout { transition: all .18s ease; }
.sidebar {
  width: 190px !important;
  padding: 10px 10px 14px !important;
  transition: width .18s ease, padding .18s ease;
}
.sidebar-topline {
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin: 0 0 10px;
}
.sidebar-topline .brand-logo {
  flex: 1 1 auto;
  min-width: 0;
  height: 28px !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
}
.sidebar-topline .brand-logo img {
  width: 70px !important;
  max-width: 70px !important;
  max-height: 22px !important;
  object-fit: contain !important;
}
.sidebar-toggle {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: rgba(255,255,255,.07);
  color: #cbd5e1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}
.sidebar-toggle:hover { background: rgba(255,255,255,.13); color:#fff; }
.sidebar-toggle .toggle-closed { display:none; font-size:22px; transform: translateY(-1px); }
.sidebar .menu-title {
  margin: 4px 0 8px !important;
  padding: 0 6px !important;
  white-space: nowrap;
  overflow: hidden;
}
.menu a {
  position: relative;
  display: flex !important;
  align-items: center;
  gap: 10px;
  min-height: 39px;
  padding: 9px 10px !important;
  margin-bottom: 5px !important;
  white-space: nowrap;
  overflow: hidden;
}
.menu a::before {
  content: attr(data-icon);
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  opacity: .95;
  font-size: 15px;
}
.menu-text { overflow:hidden; text-overflow:ellipsis; }
.sidebar-account .account-toggle {
  min-height: 42px;
  padding: 8px 9px !important;
  overflow: hidden;
}
.sidebar-account .account-text { min-width:0; }

.sidebar.collapsed {
  width: 64px !important;
  padding-left: 8px !important;
  padding-right: 8px !important;
}
.sidebar.collapsed .sidebar-topline {
  height: 34px;
  justify-content: center;
  gap: 0;
  margin-bottom: 12px;
}
.sidebar.collapsed .brand-logo {
  display: none !important;
}
.sidebar.collapsed .sidebar-toggle {
  flex-basis: 34px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
}
.sidebar.collapsed .sidebar-toggle .toggle-open { display:none; }
.sidebar.collapsed .sidebar-toggle .toggle-closed { display:inline-flex; }
.sidebar.collapsed .menu-title {
  height: 0;
  margin: 0 0 8px !important;
  padding: 0 !important;
  opacity: 0;
}
.sidebar.collapsed .menu a {
  justify-content: center;
  gap: 0;
  padding: 10px 0 !important;
  min-height: 42px;
}
.sidebar.collapsed .menu a::before {
  flex-basis: auto;
  width: 26px;
  height: 26px;
  font-size: 17px;
}
.sidebar.collapsed .menu-text,
.sidebar.collapsed .account-text,
.sidebar.collapsed .account-caret {
  display: none !important;
}
.sidebar.collapsed .sidebar-account .account-toggle {
  justify-content: center;
  padding: 8px 0 !important;
}
.sidebar.collapsed .account-avatar {
  margin: 0 !important;
}
.sidebar.collapsed .account-menu {
  left: 56px;
}

@media (max-width: 760px) {
  .sidebar { width: 100% !important; height: auto !important; position: relative !important; }
  .sidebar.collapsed { width: 100% !important; }
  .sidebar.collapsed .brand-logo { display:flex !important; }
  .sidebar.collapsed .menu-text,
  .sidebar.collapsed .account-text,
  .sidebar.collapsed .account-caret { display: inline-flex !important; }
  .sidebar.collapsed .menu a { justify-content: flex-start; gap:10px; padding: 9px 10px !important; }
}

/* V31: account menu visibility and collapsed sidebar account fixes */
.account-menu[hidden] {
  display: none !important;
}

/* keep desktop account popup outside the sidebar instead of being clipped */
.sidebar {
  overflow: visible !important;
}
.sidebar-account {
  margin-top: auto !important;
  position: relative;
  overflow: visible !important;
}
.account-menu {
  right: auto !important;
  width: 174px;
  max-width: calc(100vw - 24px);
}

.sidebar.collapsed .sidebar-account {
  margin: auto 0 0 !important;
  padding-top: 8px !important;
  border-top-color: rgba(255,255,255,.08);
}
.sidebar.collapsed .sidebar-account .account-toggle {
  display: flex !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 40px !important;
  padding: 5px 0 !important;
  justify-content: center !important;
  align-items: center !important;
  overflow: visible !important;
}
.sidebar.collapsed .account-avatar {
  width: 32px !important;
  height: 32px !important;
  flex: 0 0 32px !important;
  font-size: 11px !important;
}
.sidebar.collapsed .account-menu {
  position: absolute !important;
  left: calc(100% + 10px) !important;
  right: auto !important;
  bottom: 0 !important;
  width: 174px !important;
  min-width: 174px !important;
  z-index: 9999 !important;
}

@media (max-width: 760px) {
  .sidebar { overflow: auto !important; }
  .account-menu { position: static !important; width: 100% !important; margin-top: 8px; }
}

/* V32: account info popup should be an overlay, not inline content */
.hidden { display: none !important; }
#accountInfoModal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 10000 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: transparent !important;
  backdrop-filter: none !important;
}
#accountInfoModal.hidden { display: none !important; }
#accountInfoModal .modal-card {
  width: min(420px, 92vw);
  background: #fff;
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
}
#accountInfoModal .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
#accountInfoModal .icon-btn {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 10px;
  background: #f3f4f6;
  color: #111827;
  cursor: pointer;
}
#accountInfoModal .icon-btn:hover { background: #e5e7eb; }

/* V33: show sidebar menu icons only when sidebar is collapsed */
.sidebar:not(.collapsed) .menu a::before {
  display: none !important;
  content: none !important;
}
.sidebar:not(.collapsed) .menu a {
  gap: 0 !important;
}
.sidebar:not(.collapsed) .menu-text {
  display: inline-block !important;
}
.sidebar.collapsed .menu a::before {
  display: inline-flex !important;
  content: attr(data-icon) !important;
}
/* v39 장비목록 팝업 편집 */
.bulk-device-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(15, 23, 42, 0.42);
}
.bulk-modal-panel {
  width: min(1180px, 96vw);
  max-height: 88vh;
  overflow: auto;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
  padding: 22px;
}
.bulk-modal-panel .preview-wrap {
  max-height: 300px;
}

/* v40 장비목록 분류-모델 필터 및 대규모 상세 펼침 보정 */
.device-category-cell { width: 120px; min-width: 105px; }
.device-category-inline { min-width: 100px; }
.device-model-inline { min-width: 180px; }
.bulk-table .bulk-detail-cell { width: 150px; min-width: 140px; position: relative; }
.bulk-row-detail { min-width: 0 !important; position: relative; }
.bulk-row-detail[open] .bulk-detail-grid {
  position: absolute;
  top: 28px;
  right: 0;
  z-index: 20;
  width: 360px;
  max-width: 72vw;
  grid-template-columns: 1fr;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
}
.bulk-row-detail summary { white-space: nowrap; }
.bulk-modal-panel .table-wrap { overflow: visible; }
.bulk-modal-panel .preview-wrap { overflow: auto; }
@media (max-width: 900px) {
  .bulk-row-detail[open] .bulk-detail-grid { right: auto; left: 0; width: 300px; }
}
/* 파일/문서 미리보기 기본 UI */
.attachment-previewable-row { cursor: pointer; }
.attachment-previewable-row:hover td { background: #f8fbff; }
.row-actions { display: inline-flex; align-items: center; gap: 8px; }
.link-btn { border: 0; background: transparent; cursor: pointer; padding: 0; font-size: 13px; }
.attachment-preview-modal { width: min(1100px, 96vw); height: min(820px, 92vh); display: flex; flex-direction: column; }
.attachment-preview-body { flex: 1; min-height: 420px; border: 1px solid #e5e7eb; border-radius: 14px; overflow: auto; background: #f8fafc; display: flex; align-items: center; justify-content: center; }
.attachment-preview-frame { width: 100%; height: 100%; min-height: 560px; border: 0; background: #fff; }
.attachment-preview-image { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.text-preview { background: #fff; }
/* v45: 자재관리 대시보드 */
.material-dashboard { margin-bottom: 16px; }
.material-layout { display:grid; grid-template-columns: 220px minmax(0, 1fr) 300px; gap:16px; align-items:start; }
.material-category-card, .material-side-card { position: sticky; top: 18px; }
.material-category-list { display:flex; flex-direction:column; gap:8px; max-height: 360px; overflow: auto; padding-right: 2px; }
.material-category-btn { border:1px solid #e5e7eb; background:#fff; border-radius:12px; padding:10px 12px; display:flex; justify-content:space-between; align-items:center; cursor:pointer; color:#374151; }
.material-category-btn:hover, .material-category-btn.active { border-color:#2563eb; background:#eff6ff; color:#1d4ed8; }
.material-category-btn strong { font-size:12px; background:#f3f4f6; border-radius:999px; padding:3px 8px; }
.material-category-btn.active strong { background:#dbeafe; }
.material-toolbar { margin-bottom:12px; }
.material-spec-cell { max-width:220px; overflow:hidden; text-overflow:ellipsis; }
.material-movement-list li span.green { color:#15803d; font-weight:800; }
.material-movement-list li span.orange { color:#c2410c; font-weight:800; }
.material-movement-list li span.blue { color:#1d4ed8; font-weight:800; }
.material-movement-list li span.gray { color:#6b7280; font-weight:800; }
@media (max-width: 1180px) { .material-category-card, .material-side-card { position:static; } .material-category-list { flex-direction:row; flex-wrap:wrap; } }

/* v45 기준정보/환경설정 분리 패치 */
.inner-card {
  box-shadow: none;
  border: 1px solid rgba(15, 23, 42, 0.08);
}
.material-master-grid {
  align-items: start;
}
.compact-form {
  gap: 8px;
}
.master-chip-list,
.master-model-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
}
.master-chip-list li {
  padding: 7px 10px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 999px;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 700;
}
.master-model-list {
  display: block;
}
.master-model-list li {
  display: flex;
  flex-direction: column;
  padding: 9px 0;
  border-bottom: 1px dashed rgba(15, 23, 42, 0.12);
}
.master-model-list li span {
  color: #64748b;
  font-size: 12px;
}

/* v45-2 기준정보 삭제 버튼/분류 목록 스크롤 보정 */
.master-chip-list li { display: inline-flex; align-items: center; gap: 8px; }
.master-model-list li { flex-direction: row; justify-content: space-between; align-items: center; gap: 10px; }
.master-model-list li div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mini-danger-btn { border: 0; background: #fee2e2; color: #b91c1c; border-radius: 999px; padding: 4px 8px; font-size: 11px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.mini-danger-btn:hover { background: #fecaca; }

/* v45-3: 기준정보/긴 팝업 상단 닫기 버튼 고정 */
.modal-header {
  position: sticky;
  top: -20px;
  z-index: 5;
  background: #fff;
  padding: 4px 0 12px;
  border-bottom: 1px solid #eef2f7;
}

/* v45-3: 기준정보 모델은 모델명 중심 */
.master-model-list strong { word-break: break-all; }

/* v45-4: 품목등록/입출고 선택 UX 개선 */
.selector-row {
  display: grid;
  grid-template-columns: minmax(120px, 180px) minmax(0, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}
.muted-guide {
  margin-top: 6px;
  color: #64748b;
}
.master-list-toolbar {
  margin: 10px 0 0;
}
.master-list-toolbar input {
  width: 100%;
}
.master-model-list {
  max-height: 260px;
  overflow: auto;
  padding-right: 4px;
}
.master-chip-list {
  max-height: 180px;
  overflow: auto;
  padding-right: 4px;
}
.mini-action-btn {
  border: 0;
  background: #dbeafe;
  color: #1d4ed8;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
.mini-action-btn:hover { background: #bfdbfe; }
@media (max-width: 720px) {
  .selector-row { grid-template-columns: 1fr; }
}

/* v45-5: 자재관리 배치/입출고 선택 UX 보정 */
.material-layout { grid-template-columns: minmax(0, 1fr) 360px; }
.material-side-stack { position: sticky; top: 18px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.material-side-stack .material-side-card, .material-side-stack .material-category-card { position: static; }
.material-movement-list { max-height: 440px; overflow: auto; padding-right: 4px; }
.material-category-list { max-height: 260px; }
.movement-material-pick-list { max-height: 260px; overflow: auto; border: 1px solid #e5e7eb; border-radius: 14px; background: #f8fafc; padding: 8px; display: flex; flex-direction: column; gap: 8px; }
.movement-material-pick { border: 1px solid #e5e7eb; background: #fff; border-radius: 12px; padding: 10px 12px; text-align: left; cursor: pointer; display: grid; gap: 3px; }
.movement-material-pick:hover, .movement-material-pick.active { border-color: #2563eb; background: #eff6ff; }
.movement-material-pick strong { font-size: 13px; color: #111827; }
.movement-material-pick span { font-size: 12px; color: #64748b; }
.compact-note { margin-top: 10px; }
@media (max-width: 1180px) { .material-layout { grid-template-columns: 1fr; } .material-side-stack { position: static; } }

/* v45-6 자재관리 UX 보정 */
.material-movement-card { cursor: pointer; transition: transform .12s ease, box-shadow .12s ease; }
.material-movement-card:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(15,23,42,.08); }
.material-movement-list.compact { max-height: none; overflow: visible; }
.wide-modal { width: min(1180px, 96vw); max-height: 90vh; }
.movement-history-table-wrap { max-height: 68vh; overflow: auto; }
.movement-history-table-wrap table { min-width: 960px; }
.material-filter-check-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-height: 420px; overflow: auto; padding: 4px; }
.material-filter-check { display: flex; align-items: center; gap: 8px; border: 1px solid #e5e7eb; border-radius: 12px; padding: 10px 12px; background: #fff; cursor: pointer; }
.material-filter-check:hover { border-color: #2563eb; background: #eff6ff; }
.material-filter-check input { width: 16px; height: 16px; }
.material-filter-check span { flex: 1; font-weight: 700; color: #374151; }
.material-filter-check strong { font-size: 12px; color: #6b7280; background: #f3f4f6; border-radius: 999px; padding: 3px 8px; }
@media (max-width: 720px) { .material-filter-check-list { grid-template-columns: 1fr; } }

/* v45-8 자재관리 품목등록/입출고 UX 보정 */
.material-master-modal { width: min(1120px, 96vw); max-height: 92vh; }
.material-master-top-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.material-item-register-card { margin-bottom: 12px; }
.three-col { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.three-col .span-2 { grid-column: span 2; }
.three-col .span-3 { grid-column: span 3; }
.compact-master-list { max-height: 150px; overflow: auto; }
.between-actions { justify-content: space-between; }
.material-movement-modal { width: min(1050px, 96vw); max-height: 92vh; }
.movement-selector-row { display: grid; grid-template-columns: 180px minmax(220px, 1fr) minmax(220px, 1fr); gap: 8px; align-items: center; }
.movement-selector-row select, .movement-selector-row input { width: 100%; }
.material-item-register-card .modal-actions { margin-top: 10px; }
@media (max-width: 860px) {
  .material-master-top-grid { grid-template-columns: 1fr; }
  .three-col { grid-template-columns: 1fr; }
  .three-col .span-2, .three-col .span-3 { grid-column: span 1; }
  .movement-selector-row { grid-template-columns: 1fr; }
}
.light-danger{background:#fff5f5;color:#b42318;border-color:#f2c7c4}

/* v45-12 material dashboard refine */
.material-dashboard.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dashboard-action-card { width: 100%; text-align: left; border: 1px solid var(--border); background: var(--card); cursor: pointer; }
.dashboard-action-card:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(15,23,42,.08); }
.material-top-tools { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 16px; align-items: stretch; margin-bottom: 16px; }
.material-top-tools .material-movement-card { min-height: 150px; cursor: pointer; }
.material-top-tools .material-category-card { min-height: 150px; }
.material-layout.single { display: block; }
.material-layout.single .material-main-card { width: 100%; }
@media (max-width: 1180px) {
  }


/* v45-12-1: 자재관리 안정화 - 요약카드 크기 복구 및 목록 표시 안정화 */
.material-dashboard.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.material-top-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  align-items: stretch;
}
.material-layout.single {
  display: block;
  clear: both;
}
.material-main-card .table-wrap {
  min-height: 160px;
}
@media (max-width: 1180px) {
  }


/* v45-12-2: 자재관리 상단 영역 한 줄 compact 정리 */
.material-dashboard.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}
.material-dashboard.grid-3 .card {
  padding: 10px 12px;
  min-height: 68px;
  border-radius: 12px;
}
.material-dashboard.grid-3 .card-title { font-size: 12px; margin-bottom: 4px; }
.material-dashboard.grid-3 .card-value { font-size: 19px; line-height: 1.05; }
.material-dashboard.grid-3 .card-sub { font-size: 11px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.material-top-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 10px;
  align-items: stretch;
  margin-bottom: 10px;
}
.material-top-tools .material-movement-card,
.material-top-tools .material-category-card {
  min-height: 74px;
  padding: 10px 12px;
}
.material-top-tools .section-title { margin-bottom: 4px; }
.material-top-tools .section-title h2 { font-size: 14px; }
.material-movement-list.compact { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; }
.material-movement-list.compact li { padding: 4px 0; border-bottom: 0; min-width: 0; }
.material-movement-list.compact li:nth-child(n+3) { display: none; }
.material-movement-list.compact strong,
.material-movement-list.compact .small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; display: block; }
@media (max-width: 1180px) {
  .material-dashboard.grid-3, .material-top-tools { grid-template-columns: 1fr; }
  .material-movement-list.compact { grid-template-columns: 1fr; }
  .material-movement-list.compact li:nth-child(n+3) { display: flex; }
}

/* v45-12-3: 자재관리 상단 요약 1줄 정리 + 목록 밀도 보정 */
.material-dashboard.grid-4,
.material-dashboard.compact-summary-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
.material-dashboard.compact-summary-row .card {
  padding: 9px 11px;
  min-height: 64px;
  border-radius: 12px;
}
.material-dashboard.compact-summary-row .card-title { font-size: 12px; margin-bottom: 3px; }
.material-dashboard.compact-summary-row .card-value { font-size: 18px; line-height: 1.05; }
.material-dashboard.compact-summary-row .card-sub { font-size: 11px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.material-top-tools { display: none; }
.material-main-card .table-wrap { overflow: auto; }
.material-main-card table { font-size: 12px; }
.material-main-card th,
.material-main-card td { padding: 7px 8px; }
.material-main-card td .btn,
.material-main-card th .btn { padding: 5px 8px; font-size: 12px; }
.material-main-card th:nth-child(1), .material-main-card td:nth-child(1) { width: 74px; }
.material-main-card th:nth-child(2), .material-main-card td:nth-child(2) { width: 86px; }
.material-main-card th:nth-child(3), .material-main-card td:nth-child(3) { width: 110px; }
.material-main-card th:nth-child(4), .material-main-card td:nth-child(4) { min-width: 130px; }
.material-main-card th:nth-child(5), .material-main-card td:nth-child(5) { max-width: 240px; }
.material-main-card th:nth-child(6), .material-main-card td:nth-child(6),
.material-main-card th:nth-child(7), .material-main-card td:nth-child(7),
.material-main-card th:nth-child(8), .material-main-card td:nth-child(8) { width: 62px; text-align: center; }
.material-main-card th:nth-child(9), .material-main-card td:nth-child(9) { width: 108px; text-align: right; }
.material-main-card th:nth-child(10), .material-main-card td:nth-child(10) { max-width: 120px; }
.material-main-card th:nth-child(11), .material-main-card td:nth-child(11) { width: 70px; text-align: center; }
.material-main-card td:nth-child(5),
.material-main-card td:nth-child(10) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1180px) {
  .material-dashboard.grid-4,
  .material-dashboard.compact-summary-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .material-dashboard.grid-4,
  .material-dashboard.compact-summary-row { grid-template-columns: 1fr; }
}


/* v45-12-4: 자재 요약카드 구분감 + 수정팝업 단순화 */
.material-dashboard.compact-summary-row .card {
  border: 1px solid #dbe4f0;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .05);
}
.material-dashboard.compact-summary-row .card:nth-child(1) { background: #f0fdf4; }
.material-dashboard.compact-summary-row .card:nth-child(2) { background: #fff7ed; }
.material-dashboard.compact-summary-row .card:nth-child(3) { background: #eff6ff; }
.material-dashboard.compact-summary-row .card:nth-child(4) { background: #f8fafc; }
.material-edit-simple-grid textarea.auto-grow-textarea { min-height: 72px; }
.material-edit-simple-grid .form-field { min-width: 0; }
/* v45-12-4: 현장 목록 간단상세 펼침 시 가로 스크롤 억제 */
.detail-expand-row > td { max-width: 0; overflow: hidden; padding: 14px !important; box-sizing: border-box; }
.detail-expand-row .form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.detail-expand-row .readonly-box,
.detail-expand-row .site-note-value,
.detail-expand-row table { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.detail-expand-row > td > div { max-width: 100%; min-width: 0; box-sizing: border-box; }
@media (max-width: 1180px) { .detail-expand-row .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 820px) { .detail-expand-row .form-grid { grid-template-columns: 1fr; } }
/* v46: 견적서 게시판 */
.quote-dashboard { margin-bottom: 16px; }
.quote-main-card, .quote-form-card { margin-top: 0; }
.quote-toolbar { align-items: stretch; }
.quote-form-card .section-title { align-items: flex-start; }
.quote-sub-section { margin-top: 20px; }
.quote-edit-table input, .quote-edit-table select { width: 100%; min-width: 86px; border: 1px solid #d1d5db; border-radius: 9px; padding: 8px; font-size: 13px; background: #fff; }
.quote-edit-table .quote-name { min-width: 210px; }
.quote-edit-table .quote-spec { min-width: 180px; }
.quote-edit-table .quote-qty { width: 74px; text-align: center; }
.quote-edit-table .quote-price { width: 120px; text-align: right; }
.quote-edit-table .quote-amount { width: 130px; text-align: right; background: #f9fafb; }
.quote-total-box { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 10px; margin: 18px 0; }
.quote-total-box div { border: 1px solid #e5e7eb; background: #f9fafb; border-radius: 14px; padding: 12px; }
.quote-total-box span { display: block; color: #6b7280; font-size: 12px; font-weight: 700; margin-bottom: 6px; }
.quote-total-box strong { font-size: 18px; }
.quote-total-box .grand { background: #fff7ed; border-color: #fed7aa; }
.quote-total-box .round-card { background:#f8fafc; border-color:#cbd5e1; }
.quote-row { cursor: pointer; }
.quote-row:hover { background: #f8fbff; }
.quote-actions { display: flex; gap: 6px; }
.quote-actions .btn { padding: 7px 10px; font-size: 12px; }
@media (max-width: 1200px) { .quote-total-box { grid-template-columns: repeat(2, minmax(150px, 1fr)); } }
@media (max-width: 720px) { .quote-total-box { grid-template-columns: 1fr; } }


/* v46 견적서 게시판 보정 */
.quote-dashboard .dashboard-action-card {
  background: linear-gradient(180deg, #ffffff 0%, #f3f6fb 100%);
  border: 1px solid #cfd8e6;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}
.quote-dashboard .dashboard-action-card:hover {
  border-color: #9aa9bd;
  transform: translateY(-1px);
}
.quote-edit-table { table-layout: fixed; min-width: 1180px; }
.quote-edit-table th, .quote-edit-table td { vertical-align: middle; }
.quote-edit-table input, .quote-edit-table select { box-sizing: border-box; }
.quote-edit-table .quote-item-name-stack { display: flex; flex-direction: column; gap: 6px; min-width: 250px; }
.quote-edit-table .quote-item-name-stack select,
.quote-edit-table .quote-item-name-stack input { min-width: 250px; }
.quote-material-table th:nth-child(1) { width: 280px; }
.quote-material-table th:nth-child(2) { width: 200px; }
.quote-material-table th:nth-child(3) { width: 80px; }
.quote-material-table th:nth-child(4) { width: 80px; }
.quote-material-table th:nth-child(5),
.quote-material-table th:nth-child(7),
.quote-material-table th:nth-child(8) { width: 130px; }
.quote-material-table th:nth-child(6) { width: 90px; }
.quote-material-table th:nth-child(9) { width: 140px; }
.quote-edit-table .quote-markup { width: 82px; text-align: right; }
.quote-doc-bundle { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 14px; margin: 14px 0; border: 1px dashed #cbd5e1; border-radius: 14px; background: #f8fafc; }
.quote-doc-bundle span { font-size: 13px; font-weight: 800; color: #334155; margin-right: 4px; }
.doc-chip { border: 1px solid #d1d5db; background: #fff; color: #334155; border-radius: 999px; padding: 7px 12px; font-size: 12px; font-weight: 800; cursor: default; }
.doc-chip.active { border-color: #111827; background: #111827; color: #fff; }
.quote-total-box .grand em { display: block; margin-top: 4px; color: #7c2d12; font-style: normal; font-size: 12px; font-weight: 800; }

/* v46 quote board patch2 */
.quote-doc-bundle-top { margin: 0 0 12px; border-style: solid; background: #fff; }
.quote-doc-panel { border: 1px solid #e5e7eb; border-radius: 16px; background: #f8fafc; padding: 14px; margin-bottom: 16px; }
.compact-form-grid { grid-template-columns: repeat(4, minmax(180px, 1fr)); gap: 10px; }
.quote-edit-table { min-width: 1480px; }
.quote-material-table th:nth-child(1) { width: 360px; }
.quote-material-table th:nth-child(2) { width: 230px; }
.quote-material-table th:nth-child(3) { width: 90px; }
.quote-material-table th:nth-child(4) { width: 90px; }
.quote-material-table th:nth-child(5),
.quote-material-table th:nth-child(7),
.quote-material-table th:nth-child(8) { width: 145px; }
.quote-material-table th:nth-child(6) { width: 100px; }
.quote-material-table th:nth-child(9) { width: 150px; }
.quote-edit-table .quote-item-name-stack { gap: 4px; min-width: 320px; }
.quote-edit-table .quote-item-name-stack label { font-size: 11px; color: #64748b; font-weight: 800; line-height: 1; }
.quote-edit-table .quote-item-name-stack select,
.quote-edit-table .quote-item-name-stack input { min-width: 320px; }
.quote-edit-table th { white-space: nowrap; }
.quote-edit-table td { padding-top: 8px; padding-bottom: 8px; }
@media (max-width: 1200px) { .compact-form-grid { grid-template-columns: repeat(2, minmax(180px, 1fr)); } }
@media (max-width: 720px) { .compact-form-grid { grid-template-columns: 1fr; } }

/* v46 quote board patch3 */
#quoteAmountSections.hidden, #quoteMainFields.hidden { display: none !important; }
.quote-material-table { min-width: 1260px; }
.quote-edit-table { min-width: 1260px; }
.quote-edit-table td { padding: 8px 10px; }
.quote-edit-table input, .quote-edit-table select { height: 38px; }
.quote-edit-table .quote-name { min-width: 0; width: 100%; }
.quote-edit-table .quote-item-name-stack { display: block; min-width: 0; }
.quote-material-table th:nth-child(1) { width: 240px; }
.quote-material-table th:nth-child(2) { width: 220px; }
.quote-material-table th:nth-child(3) { width: 82px; }
.quote-material-table th:nth-child(4) { width: 82px; }
.quote-material-table th:nth-child(5),
.quote-material-table th:nth-child(7),
.quote-material-table th:nth-child(8) { width: 125px; }
.quote-material-table th:nth-child(6) { width: 85px; }
.quote-material-table th:nth-child(9) { width: 130px; }
.quote-material-table th:nth-child(10) { width: 70px; }
.quote-doc-panel .form-grid { align-items: end; }

/* v46 quote board patch4 */
.quote-material-search-cell { display: grid; grid-template-columns: 110px minmax(150px, 1fr); gap: 6px; align-items: center; }
.quote-material-search-cell .quote-material-category { min-width: 0; font-size: 12px; padding-left: 7px; padding-right: 7px; }
.quote-material-search-cell .quote-name { min-width: 0; }
.quote-suggest-layer { position: absolute; z-index: 5000; max-height: 320px; overflow-y: auto; border: 1px solid #cbd5e1; border-radius: 12px; background: #fff; box-shadow: 0 18px 40px rgba(15, 23, 42, .18); padding: 6px; }
.quote-suggest-layer button { display: block; width: 100%; text-align: left; border: 0; background: #fff; border-radius: 9px; padding: 9px 10px; cursor: pointer; }
.quote-suggest-layer button:hover { background: #f1f5f9; }
.quote-suggest-layer strong { display: block; font-size: 13px; color: #111827; margin-bottom: 3px; }
.quote-suggest-layer span { display: block; font-size: 11px; color: #64748b; line-height: 1.35; }
.quote-suggest-layer .empty { padding: 14px; color: #64748b; font-size: 12px; }
.quote-labor-table { min-width: 1460px; }
.quote-labor-table th:nth-child(1) { width: 200px; }
.quote-labor-table th:nth-child(2) { width: 180px; }
.quote-labor-table th:nth-child(3) { width: 90px; }
.quote-labor-table th:nth-child(4) { width: 90px; }
.quote-labor-table th:nth-child(5),
.quote-labor-table th:nth-child(7),
.quote-labor-table th:nth-child(8) { width: 130px; }
.quote-labor-table th:nth-child(6) { width: 90px; }
.quote-labor-table th:nth-child(9) { width: 150px; }
.quote-labor-table th:nth-child(10) { width: 70px; }
@media (max-width: 900px) {
  .quote-material-search-cell { grid-template-columns: 1fr; }
}

/* v46 quote board patch6 */
.quote-material-search-cell { grid-template-columns: 22px 110px minmax(150px, 1fr); }
.quote-drag-handle { display: inline-flex; align-items: center; justify-content: center; height: 38px; color: #94a3b8; font-size: 15px; cursor: grab; user-select: none; }
.quote-material-draggable-row.dragging { opacity: .55; }
.quote-material-draggable-row.drag-over td { border-top: 2px solid #2563eb; }
.quote-material-draggable-row input,
.quote-material-draggable-row select { cursor: auto; }
@media (max-width: 720px) { .quote-material-search-cell { grid-template-columns: 22px 1fr; } .quote-material-search-cell .quote-name { grid-column: 1 / -1; } }

.quote-drag-handle {
  cursor: grab;
  user-select: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  min-width: 22px;
  height: 34px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #64748b;
  font-weight: 700;
}
.quote-drag-handle:active { cursor: grabbing; }
.quote-drag-spacer {
  display: inline-block;
  width: 22px;
  min-width: 22px;
}


/* v46 quote board patch8 */
.quote-dashboard-6 {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 12px;
}
.quote-dashboard-6 .dashboard-action-card {
  min-height: 92px;
}
.card-value.muted { color: #64748b; }
.quote-row-closed {
  background: #f3f4f6;
  color: #6b7280;
  opacity: .72;
  filter: grayscale(35%);
}
.quote-row-closed:hover {
  background: #e5e7eb;
  opacity: .86;
}
.quote-row-cancel {
  background: #e5e7eb;
  color: #4b5563;
}
.quote-row-closed td {
  border-color: #e5e7eb;
}
.status.yellow {
  background: #fef3c7;
  color: #92400e;
}
@media (max-width: 1280px) {
  .quote-dashboard-6 { grid-template-columns: repeat(3, minmax(120px, 1fr)); }
}
@media (max-width: 720px) {
  .quote-dashboard-6 { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
}

/* v46 patch9: 계약서/보증각서 문서 미리보기 */
.quote-document-preview { margin-top: 14px; }
.quote-doc-sheet {
  background: #fff;
  border: 1px solid #d7dde8;
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  color: #111827;
}
.quote-doc-sheet h3 {
  text-align: center;
  font-size: 22px;
  margin: 4px 0 18px;
  letter-spacing: 0.02em;
}
.contract-lines {
  border-top: 2px solid #111827;
  border-bottom: 1px solid #111827;
  padding: 12px 8px;
  line-height: 1.9;
}
.contract-lines p,
.contract-body,
.contract-condition-box p,
.our-company-box p { margin: 6px 0; }
.contract-lines p {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}
.contract-lines p b::after {
  content: " :";
}
.contract-lines p span {
  min-width: 0;
}
.contract-body { line-height: 1.9; padding: 14px 8px; }
.contract-sign-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 14px;
}
.contract-sign-grid > div,
.contract-condition-box,
.our-company-box {
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 12px;
  background: #fbfdff;
}
.contract-sign-grid h4,
.contract-condition-box h4 { margin: 0 0 8px; }
.guarantee-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.guarantee-table th,
.guarantee-table td { border: 1px solid #111827; padding: 10px 12px; text-align: left; }
.guarantee-table th { width: 180px; background: #f8fafc; }
.doc-date { text-align: center; margin: 70px 0 40px; font-size: 18px; }
.our-company-box { max-width: 420px; margin-left: auto; }
.recipient-line { margin-top: 38px; font-size: 32px; font-weight: 900; text-align: center; }
@media (max-width: 900px) {
  .contract-sign-grid { grid-template-columns: 1fr; }
}

/* v46 patch10: 견적서 작성폼 중복 필드 정리 및 문서묶음 탭 hover 피드백 */
.quote-single-form-grid {
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #f8fafc;
  padding: 14px;
  margin-bottom: 12px;
}
.quote-doc-preview-panel {
  margin-top: 0;
}
.doc-chip {
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background-color .16s ease, color .16s ease;
}
.doc-chip:hover {
  transform: translateY(-2px);
  border-color: #111827;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .12);
  background: #fff7f7;
  color: #111827;
}
.doc-chip.active:hover {
  background: #111827;
  color: #fff;
}
@media (max-width: 1200px) { .quote-single-form-grid { grid-template-columns: repeat(2, minmax(180px, 1fr)); } }
@media (max-width: 720px) { .quote-single-form-grid { grid-template-columns: 1fr; } }

/* v46 patch11: 문서묶음별 입력영역 단순화 */
#quoteMainFields .quote-vendor-field {
  grid-column: span 2;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 10px;
}
#quoteMainFields .quote-vendor-field .small {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 11px;
  line-height: 1.35;
}
#quoteMainFields .quote-contract-field {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 10px;
}
.quote-doc-bundle .doc-chip.active {
  box-shadow: 0 8px 18px rgba(15, 23, 42, .16);
}
@media (max-width: 720px) {
  #quoteMainFields .quote-vendor-field { grid-column: auto; }
}

/* v46 patch12: 타사/계약서 보조 입력영역 압축 및 화면-출력 분리 */
#quoteMainFields.quote-main-fields-compact {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 12px;
  margin-bottom: 10px;
  border-style: dashed;
  background: #ffffff;
}
#quoteMainFields.quote-main-fields-compact .quote-vendor-field,
#quoteMainFields.quote-main-fields-compact .quote-contract-field {
  display: grid;
  grid-template-columns: auto minmax(180px, 240px);
  align-items: center;
  gap: 8px;
  grid-column: auto;
  padding: 7px 9px;
  border-radius: 999px;
  background: #f8fafc;
}
#quoteMainFields.quote-main-fields-compact .quote-vendor-field label,
#quoteMainFields.quote-main-fields-compact .quote-contract-field label {
  margin: 0;
  font-size: 12px;
  white-space: nowrap;
}
#quoteMainFields.quote-main-fields-compact .quote-vendor-field select,
#quoteMainFields.quote-main-fields-compact .quote-contract-field input {
  height: 32px;
  min-height: 32px;
  border-radius: 999px;
  font-size: 12px;
}
#quoteMainFields.quote-main-fields-compact .quote-vendor-field .small {
  display: none;
}
#quoteMainFields.quote-main-fields-compact:empty { display: none; }
.quote-doc-preview-panel .small {
  margin-top: 0;
}
@media (max-width: 720px) {
  #quoteMainFields.quote-main-fields-compact { display: grid; grid-template-columns: 1fr; }
  #quoteMainFields.quote-main-fields-compact .quote-vendor-field,
  #quoteMainFields.quote-main-fields-compact .quote-contract-field { grid-template-columns: 1fr; border-radius: 12px; }
}

/* v46 patch13: dynamic document bundle */
.quote-doc-bundle-top {
  position: relative;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.quote-doc-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.doc-chip em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-left: 6px;
  border-radius: 999px;
  font-style: normal;
  font-size: 12px;
  line-height: 1;
  opacity: .7;
}
.doc-chip em:hover {
  background: rgba(255,255,255,.25);
  opacity: 1;
}
.doc-add-chip {
  border-style: dashed !important;
  background: #fff7ed !important;
  color: #9a3412 !important;
}
.doc-add-chip:hover {
  background: #ffedd5 !important;
  border-color: #fb923c !important;
}
.doc-config-chip {
  background: #f8fafc !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}
.doc-config-chip:hover {
  background: #e2e8f0 !important;
  border-color: #64748b !important;
}
.quote-mini-popover {
  position: absolute;
  top: calc(100% + 8px);
  z-index: 60;
  min-width: 260px;
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(15,23,42,.18);
}
#quotePartnerPicker { left: 120px; }
.quote-contract-popover { right: 0; }
.quote-mini-popover label {
  display: block;
  margin: 8px 0 4px;
  font-size: 12px;
  font-weight: 800;
  color: #475569;
}
.quote-mini-popover label:first-child { margin-top: 0; }
.quote-mini-popover select,
.quote-mini-popover input {
  width: 100%;
  height: 36px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 0 10px;
  font-size: 13px;
}
.popover-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 10px;
}
.btn.small {
  padding: 6px 10px;
  font-size: 12px;
}


/* v46 patch14: 문서묶음 탭 밝은 선택색 + 계약정보 팝오버 버튼 추적 */
.quote-doc-bundle .doc-chip.active,
.doc-chip.active {
  border-color: #f97316 !important;
  background: #fff7ed !important;
  color: #9a3412 !important;
  box-shadow: 0 8px 18px rgba(249, 115, 22, .18) !important;
}
.quote-doc-bundle .doc-chip.active:hover,
.doc-chip.active:hover {
  background: #ffedd5 !important;
  border-color: #ea580c !important;
}
.quote-contract-anchor {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.quote-contract-anchor .quote-contract-popover {
  left: 0 !important;
  right: auto !important;
  top: calc(100% + 8px) !important;
}
@media (max-width: 720px) {
  .quote-contract-anchor .quote-contract-popover {
    left: auto !important;
    right: 0 !important;
    min-width: 240px;
  }
}
/* 모바일 셸 호환 보정
 * 과거 v46 규칙 중 현재 후속 CSS에서 덮이지 않고 실제로 남아 있는 선언만 보존한다.
 * 메뉴별 모바일 규칙은 runtime/domains/<기능>/mobile.css가 담당한다.
 */
@media (max-width: 760px) {
  .page.active { width: 100%; max-width: 100%; }
  .card { max-width: 100%; }
  .quote-form-card, .quote-doc-panel, .quote-doc-bundle-top, .quote-document-preview { max-width: 100%; }
  .quote-contract-anchor .quote-contract-popover { left: 0 !important; right: auto !important; }
}
/* v46 patch15: 계약 일반조건 전체 미리보기 */
.contract-condition-full p {
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px dashed #e5e7eb;
  word-break: keep-all;
}
.contract-condition-full p:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
@media print {
  .quote-doc-sheet { box-shadow: none !important; border: 0 !important; }
  .contract-condition-full p { page-break-inside: avoid; }
}
/* v47 설정관리 */
.settings-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.settings-side-card {
  position: sticky;
  top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.settings-nav {
  width: 100%;
  text-align: center;
  font-weight: 800;
  cursor: pointer;
}
.settings-content { min-width: 0; min-height: 0; }
.setting-panel { display: none; }
.setting-panel.active { display: block; }
.settings-group-grid {
  display: grid;
  gap: 14px;
}
.setting-mini-card {
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 14px;
  padding: 14px;
  background: #fff;
}
.setting-mini-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.compact-setting-input { margin-bottom: 10px; }
.setting-chip-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 260px;
  overflow: auto;
}
.setting-chip-list li {
  justify-content: space-between;
  border: 1px solid #edf0f4;
  border-radius: 10px;
  padding: 8px 10px;
  background: #fafafa;
}
.setting-chip-list button {
  border: 0;
  background: transparent;
  color: #b91c1c;
  font-weight: 700;
  cursor: pointer;
}
.permission-grid {
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 14px;
  overflow: hidden;
}
.permission-row {
  display: grid;
  grid-template-columns: 1.4fr repeat(5, .7fr);
  align-items: center;
  min-height: 42px;
  border-bottom: 1px solid #edf0f4;
}
.permission-row:last-child { border-bottom: 0; }
.permission-row > * { padding: 9px 10px; text-align: center; }
.permission-row > strong, .permission-row > span:first-child { text-align: left; }
.permission-head {
  background: #f3f4f6;
  font-weight: 800;
}
@media (max-width: 900px) {
  .settings-layout { grid-template-columns: 1fr; }
  .settings-side-card { position: static; }
  .settings-group-grid { grid-template-columns: 1fr; }
  .permission-row { grid-template-columns: 1.2fr repeat(5, .55fr); font-size: 12px; }
}

/* Settings page primary title + education/learning-style pill first-level menu. */
.settings-layout-top {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.settings-page-topbar {
  position: relative;
  z-index: 4;
  flex: 0 0 auto;
  margin: 0 -8px 8px;
  padding: 0 8px;
  align-items: flex-start;
  overflow: visible;
  background: transparent;
}
.settings-page-primary {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1 1 auto;
  min-width: 0;
}
.settings-page-primary > h1 {
  flex: 0 0 auto;
  margin: 0;
  white-space: nowrap;
}
/*
 * Settings second-level menu uses a two-layer lane:
 * - viewport owns horizontal scrolling and the vertical safety lane;
 * - track owns the pill row and is allowed to paint normally.
 * Keeping scrolling and hover movement on different layers prevents the
 * recurring top-edge clipping caused by overflow-y:hidden on the pill row.
 */
.settings-top-tabs-scroll {
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px;
  scrollbar-width: thin;
}
.settings-top-tabs {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  flex-wrap: nowrap;
  gap: 7px;
  width: max-content;
  min-width: 100%;
  overflow: visible;
  padding: 0;
  margin: 0;
}
.settings-top-tabs .jh-menu-pill:hover,
.settings-top-tabs .jh-menu-pill:focus-visible {
  box-shadow: 0 6px 12px rgba(127,29,29,.07);
}
.settings-top-tabs .jh-menu-pill.active,
.settings-top-tabs .jh-menu-pill[aria-current="page"],
.settings-top-tabs .jh-menu-pill[aria-pressed="true"] {
  box-shadow: 0 4px 12px rgba(127,29,29,.06), inset 0 0 0 1px rgba(220,38,38,.035);
}
.settings-top-tabs .settings-nav {
  flex: 0 0 auto;
  width: auto;
  min-width: 82px;
  min-height: 34px;
  padding: 0 12px;
  font-size: 12px;
  white-space: nowrap;
}
.settings-group-grid {
  grid-template-columns: 1fr !important;
}
.setting-wide-row-card {
  display: grid;
  gap: 10px 14px;
  align-items: start;
  padding: 12px 14px;
}
.setting-wide-row-card .setting-mini-head strong { display: block; margin-bottom: 4px; }
.setting-wide-row-card .setting-chip-list {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 7px;
  padding: 2px 0;
}
.setting-wide-row-card .setting-chip-list li {
  padding: 7px 9px;
  background: #fafafa;
}
.setting-bottom-input {
  display: flex;
  gap: 8px;
  align-items: center;
  border-top: 1px dashed #e5e7eb;
  padding-top: 10px;
}
.setting-bottom-input input {
  flex: 1;
  min-width: 220px;
}
.material-item-register-card {
  margin-top: 12px;
}
@media (max-width: 900px) {
  .settings-page-topbar { align-items: flex-start; }
  .settings-page-primary { min-width: 0; flex-wrap: wrap; gap: 8px; }
  .settings-page-primary > h1 { width: 100%; }
  .settings-top-tabs-scroll { width: 100%; }
  .settings-top-tabs { min-width: max-content; }
  .settings-top-tabs .settings-nav { min-width: 88px; }
  .setting-wide-row-card { grid-template-columns: 1fr; }
  .setting-wide-row-card .setting-mini-head { grid-row: auto; }
  .setting-bottom-input { flex-direction: column; align-items: stretch; }
  .setting-bottom-input input { min-width: 0; }
}

@media (min-width: 901px) {
  #setting.page.active {
    --jh-settings-third-slot-lift: 13px;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: none;
    height: calc(100dvh - 48px);
    min-height: 0;
    overflow: hidden;
  }
  #setting.page.active .settings-layout-top,
  #setting.page.active .settings-content {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    min-height: 0;
  }
  /* Keep normal setting panels on the existing content baseline, while reserving
     an internal slot that no-subnav work islands can intentionally reclaim. */
  #setting.page.active .settings-content {
    box-sizing: border-box;
    margin-top: calc(-1 * var(--jh-settings-third-slot-lift));
    padding-top: var(--jh-settings-third-slot-lift);
    overflow: hidden;
  }
  #setting.page.active .setting-panel.active {
    height: 100%;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
  }
  #setting.page.active #setting-data.setting-panel.active {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    width: 100%;
    height: calc(100% + var(--jh-settings-third-slot-lift));
    min-height: 0;
    margin-top: calc(-1 * var(--jh-settings-third-slot-lift));
    gap: 0;
    overflow: hidden;
  }
}

/* v47 patch3: 설정값 입력칸 소형화 + 제목 라인 우측 배치 */
.setting-wide-row-card {
  grid-template-columns: 150px minmax(260px, 1fr) 230px !important;
  align-items: start;
}
.setting-wide-row-card .setting-mini-head {
  grid-row: auto !important;
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding-top: 8px;
  margin-bottom: 0;
  padding-right: 14px;
}
.setting-wide-row-card .setting-chip-list {
  max-height: none !important;
  overflow: visible !important;
  align-content: flex-start;
}
.setting-wide-row-card .setting-chip-list li {
  min-width: 92px !important;
  max-width: 190px !important;
  min-height: 34px;
}
.setting-inline-input {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-height: 38px;
}
.setting-inline-input input {
  width: 132px;
  min-width: 0;
  flex: 0 0 132px;
  height: 34px;
  padding: 7px 9px;
}
.setting-inline-input .btn {
  height: 34px;
  padding: 0 11px;
  white-space: nowrap;
}
.setting-bottom-input { display: none; }
@media (max-width: 1100px) {
  .setting-wide-row-card { grid-template-columns: 140px minmax(0, 1fr) 210px !important; }
  .setting-inline-input input { width: 118px; flex-basis: 118px; }
}
@media (max-width: 900px) {
    .setting-wide-row-card .setting-mini-head {
    border-right: 0;
    border-bottom: 1px dashed #e5e7eb;
    padding-right: 0;
    padding-bottom: 8px;
  }
  .setting-inline-input { justify-content: flex-start; }
}

/* v47 patch4: 설정 추가 입력칸을 각 분류 제목 아래 좌측 배치 */
.setting-wide-row-card {
  grid-template-columns: 170px minmax(0, 1fr) !important;
  grid-template-rows: auto auto;
  align-items: start;
}
.setting-wide-row-card .setting-mini-head {
  grid-column: 1;
  grid-row: 1;
  display: block !important;
  border-right: 0 !important;
  border-bottom: 0 !important;
  padding: 4px 8px 0 0 !important;
  margin-bottom: 0 !important;
  min-height: 0 !important;
}
.setting-wide-row-card .setting-mini-head strong {
  display: block;
  margin-bottom: 2px !important;
}
.setting-wide-row-card .setting-inline-input {
  grid-column: 1;
  grid-row: 2;
  justify-content: flex-start !important;
  align-items: center;
  min-height: 34px;
  padding-right: 8px;
}
.setting-wide-row-card .setting-inline-input input {
  width: 92px !important;
  flex: 0 0 92px !important;
}
.setting-wide-row-card .setting-chip-list {
  grid-column: 2;
  grid-row: 1 / span 2;
  min-height: 70px;
  align-content: flex-start;
  border-left: 1px dashed #e5e7eb;
  padding-left: 14px !important;
}
@media (max-width: 900px) {
  .setting-wide-row-card {
    grid-template-columns: 1fr !important;
  }
  .setting-wide-row-card .setting-mini-head,
  .setting-wide-row-card .setting-inline-input,
  .setting-wide-row-card .setting-chip-list {
    grid-column: 1;
    grid-row: auto;
  }
  .setting-wide-row-card .setting-chip-list {
    border-left: 0;
    border-top: 1px dashed #e5e7eb;
    padding-left: 0 !important;
    padding-top: 10px !important;
    min-height: 0;
  }
}

/* v47 patch5: 개수 우측 정렬 + 설정 입력칸 둥근네모 정리 */
.setting-wide-row-card {
  grid-template-columns: 172px minmax(0, 1fr) !important;
}
.setting-wide-row-card .setting-mini-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  padding: 3px 8px 0 0 !important;
}
.setting-wide-row-card .setting-mini-head strong {
  margin-bottom: 0 !important;
  white-space: nowrap;
}
.setting-wide-row-card .setting-mini-head .small {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #6b7280;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}
.setting-wide-row-card .setting-inline-input {
  margin-top: 8px;
  gap: 6px;
}
.setting-wide-row-card .setting-inline-input input {
  width: 98px !important;
  flex: 0 0 98px !important;
  height: 34px !important;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 7px 9px !important;
  font-size: 13px;
  background: #fff;
  box-sizing: border-box;
  outline: none;
}
.setting-wide-row-card .setting-inline-input input:focus {
  border-color: #9ca3af;
  box-shadow: 0 0 0 3px rgba(17, 24, 39, .08);
}
.setting-wide-row-card .setting-inline-input .btn {
  height: 34px !important;
  border-radius: 10px;
  padding: 0 11px !important;
}
@media (max-width: 900px) {
  .setting-wide-row-card .setting-mini-head {
    justify-content: flex-start !important;
  }
}


/* Shared-management 3rd navigation: same JH card component, update-specific density only. */
.update-manager-subnav {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  min-height: 0;
  margin: 0;
  padding: 5px 0 7px;
}
.update-manager-subnav-grid {
  --jh-management-columns: 4;
  --jh-management-gap: 7px;
}

/* v57.00.19 WEB update manager: left-side package files, larger accented status cards, full-height history. */
.update-manager-shell {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  min-height: 0;
  padding: 0;
}
.update-manager-work-island {
  display: flex;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 11px 12px;
}
.update-manager-layout {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  min-width: 0;
  min-height: 0;
}
.update-manager-left,
.update-manager-right {
  min-width: 0;
  min-height: 0;
}
.update-manager-left {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.update-manager-right {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.update-section-title,
.update-upload-row {
  display: flex;
  align-items: center;
  gap: 9px;
}
.update-section-title h3 { margin: 0; font-size: 14px; }
.update-section-title .small { font-size: 10px; }
.update-manager-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}
.update-manager-card {
  border: 1px solid rgba(148,163,184,.24);
  border-radius: 15px;
  background: rgba(255,255,255,.9);
}
.update-status-card-version { --jh-status-accent: #dc2626; --jh-status-tint: rgba(220,38,38,.065); }
.update-status-card-extensions { --jh-status-accent: #2563eb; --jh-status-tint: rgba(37,99,235,.055); }
.update-status-card-rollback { --jh-status-accent: #d97706; --jh-status-tint: rgba(217,119,6,.06); }
.update-status-card-write { --jh-status-accent: #059669; --jh-status-tint: rgba(5,150,105,.055); }
.update-write-status-card {
  z-index: 6;
  overflow: visible;
}
.update-write-status-card > small { padding-right: 102px; }
.update-status-detail-button {
  position: absolute;
  right: 10px;
  bottom: 4px;
  min-height: 26px;
  padding: 0 11px;
  border: 1px solid rgba(148,163,184,.3);
  border-radius: 999px;
  background: #fff;
  color: #64748b;
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}
.update-status-detail-button:hover,
.update-status-detail-button:focus-visible,
.update-status-detail-button[aria-expanded="true"] {
  border-color: rgba(220,38,38,.28);
  background: #fffafa;
  color: #991b1b;
  outline: none;
}
.update-write-popover {
  position: absolute;
  z-index: 80;
  top: calc(100% + 7px);
  right: 0;
  width: min(390px, calc(100vw - 48px));
  max-height: min(430px, 62dvh);
  padding: 10px;
  overflow: auto;
  border: 1px solid rgba(148,163,184,.3);
  border-radius: 14px;
  background: rgba(255,255,255,.985);
  box-shadow: 0 14px 34px rgba(15,23,42,.16), 0 0 0 1px rgba(15,23,42,.025);
}
.update-write-popover[hidden] { display: none !important; }
.update-write-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  padding: 0 2px;
}
.update-write-popover-head > strong { color: #1f2937; font-size: 12px; }
.update-write-popover-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: #f8fafc;
  color: #64748b;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.update-write-popover-close:hover,
.update-write-popover-close:focus-visible { background: #f1f5f9; color: #991b1b; outline: none; }
.update-write-checks {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
}
.update-write-check {
  display: grid;
  grid-template-columns: minmax(76px, .7fr) minmax(0, 1.3fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid rgba(148,163,184,.22);
  border-radius: 10px;
  background: rgba(248,250,252,.9);
}
.update-write-check strong,
.update-write-check span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.update-write-check strong { color: #334155; font-size: 10px; }
.update-write-check span { color: #64748b; font-size: 9px; text-align: right; }
.update-write-check.ok { border-color: rgba(16,185,129,.22); background: rgba(236,253,245,.72); }
.update-write-check.error { border-color: rgba(239,68,68,.2); background: rgba(254,242,242,.72); }
.update-manager-card { padding: 10px; }
.update-workspace-card { flex: 0 0 auto; min-height: 0; }
.update-package-files-card { flex: 1 1 auto; min-height: 108px; }
.update-section-title { justify-content: space-between; margin-bottom: 8px; }
.update-dropzone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 9px 10px 9px 13px;
  border: 1px dashed rgba(148,163,184,.46);
  border-radius: 12px;
  background: #fbfcfe;
  box-shadow: inset 4px 0 0 #475569;
  color: #64748b;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.update-upload-inline-copy {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 9px;
  row-gap: 2px;
}
.update-upload-inline-kicker {
  grid-row: 1 / span 2;
  align-self: stretch;
  display: flex;
  align-items: center;
  padding-right: 10px;
  border-right: 1px solid #e2e8f0;
  color: #334155;
  font-size: 10px;
  font-weight: 950;
  white-space: nowrap;
}
.update-upload-inline-copy strong,
.update-upload-inline-copy > span:not(.update-upload-inline-kicker) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.update-upload-inline-copy strong {
  color: #1f2937;
  font-size: 11px;
  font-weight: 900;
}
.update-upload-inline-copy > span:not(.update-upload-inline-kicker) {
  color: #64748b;
  font-size: 9px;
  font-weight: 730;
}
.update-dropzone.is-dragover {
  border-color: rgba(185,28,28,.46);
  background: #fff7f7;
  box-shadow: inset 4px 0 0 #b91c1c;
}
.update-dropzone.has-file {
  border-style: solid;
  border-color: rgba(37,99,235,.22);
  background: #f8fbff;
  box-shadow: inset 4px 0 0 #2563eb;
}
.update-dropzone.is-status-success {
  border-style: solid;
  border-color: rgba(21,128,61,.25);
  background: #f7fcf8;
  box-shadow: inset 4px 0 0 #15803d;
}
.update-dropzone.is-status-error {
  border-style: solid;
  border-color: rgba(185,28,28,.28);
  background: #fff8f8;
  box-shadow: inset 4px 0 0 #b91c1c;
}
.update-dropzone.is-status-success .update-upload-inline-copy > span:not(.update-upload-inline-kicker) { color: #166534; }
.update-dropzone.is-status-error .update-upload-inline-copy > span:not(.update-upload-inline-kicker) { color: #b91c1c; }
.update-upload-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
}
.update-upload-actions .jh-action-button { min-width: 86px; }
.update-apply-button:not(:disabled) {
  border-color: rgba(185,28,28,.2);
  background: rgba(254,242,242,.92);
  color: #991b1b;
  font-weight: 800;
}
.update-apply-button:not(:disabled):hover,
.update-apply-button:not(:disabled):focus-visible {
  border-color: rgba(185,28,28,.34);
  background: #fee2e2;
  color: #7f1d1d;
  outline: none;
}
.update-file-pick { flex: 0 0 auto; }
.update-inspection-box {
  margin-top: 7px;
  padding: 8px;
  border: 1px dashed rgba(148,163,184,.32);
  border-radius: 12px;
  background: #fbfcfe;
}
.update-inspection-box[hidden] { display: none !important; }
.update-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 82px;
  color: #94a3b8;
  font-size: 11px;
  text-align: center;
}
.update-empty.error { color: #b91c1c; }
.update-inspection-box .update-empty { min-height: 42px; }
.update-inspection-warning {
  margin-bottom: 7px;
  padding: 7px 9px;
  border: 1px solid rgba(239,68,68,.18);
  border-radius: 10px;
  background: rgba(254,242,242,.72);
  color: #b91c1c;
  font-size: 10px;
  line-height: 1.45;
}
.update-inspection-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.update-inspection-summary > div {
  min-width: 0;
  padding: 7px 8px;
  border-radius: 10px;
  background: #f3f5f8;
}
.update-inspection-summary span { display: block; color: #64748b; font-size: 9px; }
.update-inspection-summary strong {
  display: block;
  min-width: 0;
  margin-top: 2px;
  overflow: hidden;
  color: #111827;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.update-inspection-summary code {
  display: block;
  margin-top: 3px;
  color: #475569;
  font-size: 9px;
  overflow-wrap: anywhere;
}
.update-apply-progress {
  margin-top: 7px;
  padding: 7px 9px 8px;
  border: 1px solid rgba(148,163,184,.24);
  border-radius: 11px;
  background: linear-gradient(100deg, rgba(248,250,252,.98), rgba(255,255,255,.98));
}
.update-apply-progress[hidden] { display: none !important; }
.update-apply-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}
.update-apply-progress-head strong {
  flex: 0 0 auto;
  color: #334155;
  font-size: 10px;
  font-weight: 900;
}
.update-apply-progress-head span {
  min-width: 0;
  overflow: hidden;
  color: #64748b;
  font-size: 9px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.update-apply-progress-track {
  position: relative;
  height: 4px;
  margin-top: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9eef5;
}
.update-apply-progress-track > span {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -38%;
  width: 38%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(185,28,28,.22), rgba(185,28,28,.82), rgba(185,28,28,.22));
  animation: jh-update-progress-slide 1.05s ease-in-out infinite;
}
.update-apply-progress[data-phase="verifying"] .update-apply-progress-track > span {
  background: linear-gradient(90deg, rgba(37,99,235,.2), rgba(37,99,235,.78), rgba(37,99,235,.2));
}
.update-apply-progress[data-phase="complete"] {
  border-color: rgba(5,150,105,.2);
  background: rgba(236,253,245,.58);
}
.update-apply-progress[data-phase="complete"] .update-apply-progress-track { background: rgba(5,150,105,.14); }
.update-apply-progress[data-phase="complete"] .update-apply-progress-track > span {
  left: 0;
  width: 100%;
  background: rgba(5,150,105,.68);
  animation: none;
}
.update-apply-progress[data-phase="error"] {
  border-color: rgba(239,68,68,.2);
  background: rgba(254,242,242,.68);
}
.update-apply-progress[data-phase="error"] .update-apply-progress-track { background: rgba(239,68,68,.12); }
.update-apply-progress[data-phase="error"] .update-apply-progress-track > span {
  left: 0;
  width: 100%;
  background: rgba(220,38,38,.62);
  animation: none;
}
.update-apply-progress[data-phase="warning"] {
  border-color: rgba(217,119,6,.22);
  background: rgba(255,247,237,.72);
}
.update-apply-progress[data-phase="warning"] .update-apply-progress-track { background: rgba(245,158,11,.14); }
.update-apply-progress[data-phase="warning"] .update-apply-progress-track > span {
  left: 0;
  width: 100%;
  background: rgba(217,119,6,.62);
  animation: none;
}
@keyframes jh-update-progress-slide {
  0% { transform: translateX(0); }
  100% { transform: translateX(365%); }
}
.update-history-card,
.update-package-files-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.update-history-card { flex: 1 1 auto; }
.update-history-list,
.update-package-files-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
  border: 1px solid #edf1f5;
  border-radius: 11px;
  background: #fbfcfe;
}
.update-history-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "version status"
    "main actions";
  gap: 4px 8px;
  align-items: center;
  min-height: 68px;
  padding: 8px 9px;
  border-bottom: 1px solid #edf1f5;
}
.update-history-row:last-child { border-bottom: 0; }
.update-history-version {
  grid-area: version;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 7px;
}
.update-history-version strong { color: #111827; font-size: 12px; white-space: nowrap; }
.update-history-version span,
.update-history-main span { color: #94a3b8; font-size: 9px; }
.update-history-main {
  grid-area: main;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.update-history-main strong {
  display: -webkit-box;
  overflow: hidden;
  color: #334155;
  font-size: 11px;
  line-height: 1.3;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.update-history-row > .status { grid-area: status; justify-self: end; }
.update-history-actions { grid-area: actions; display: flex; justify-content: flex-end; }
.update-history-row > .status,
.update-history-actions .update-history-rollback {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  min-height: 26px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}
.update-history-actions .update-history-rollback {
  border: 0;
  font-family: inherit;
  cursor: pointer;
}
.update-history-actions .update-history-rollback:hover,
.update-history-actions .update-history-rollback:focus-visible {
  background: #fed7aa;
  color: #9a3412;
  outline: none;
}
.update-package-files-title { flex: 0 0 auto; }
.update-package-files-list { background: #f8fafc; }
.update-package-files-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 54px;
  padding: 8px;
  color: #94a3b8;
  font-size: 10px;
  text-align: center;
}
.update-package-files-empty.error { color: #b91c1c; }
.update-package-file-row {
  display: grid;
  grid-template-columns: 42px minmax(0,1fr) auto;
  gap: 7px;
  align-items: center;
  min-height: 34px;
  padding: 6px 7px;
  border-bottom: 1px solid #edf1f5;
}
.update-package-file-row:last-child { border-bottom: 0; }
.update-package-file-row code {
  min-width: 0;
  color: #334155;
  font-size: 9px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.update-package-file-row small { color: #94a3b8; font-size: 9px; white-space: nowrap; }
.update-op {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 36px;
  min-height: 19px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
}
.update-op.replace { background: #eef2ff; color: #4338ca; }
.update-op.create { background: #ecfdf5; color: #047857; }
.update-op.delete { background: #fef2f2; color: #b91c1c; }

@media (min-width: 901px) {
  /* Fixed JH settings header baseline: align with standard side-menu pages. */
  #setting.page.active .settings-page-topbar { padding-top: 0; }

  #setting-updates.setting-panel.active {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    width: 100%;
    min-height: 0;
    overflow: hidden !important;
  }
  #setting-updates .update-manager-shell {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }
  #setting-updates .update-manager-subnav {
    flex: 0 0 auto;
    padding-bottom: 10px;
  }
  #setting-updates .update-manager-work-island {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
  }
  #setting-updates .update-manager-layout {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(320px, 2fr);
    gap: 10px;
    height: 100%;
    min-height: 0;
  }
  #setting-updates .update-manager-left {
    display: grid;
    grid-template-rows: auto auto minmax(108px, 1fr);
    gap: 9px;
    height: 100%;
    min-height: 0;
    overflow: visible;
  }
  #setting-updates .update-manager-right {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }
}

@media (min-width: 901px) and (max-height: 760px) {
  .update-manager-work-island { padding-top: 9px; padding-bottom: 9px; }
  .update-manager-left { gap: 7px; }
  .update-status-card { min-height: 56px; padding-top: 6px; padding-bottom: 6px; }
  .update-status-card > strong { font-size: 14px; }
  .update-status-card > small { font-size: 9px; }
  .update-manager-card { padding: 8px; }
  .update-section-title { margin-bottom: 6px; }
  .update-dropzone { min-height: 52px; padding-top: 6px; padding-bottom: 6px; }
  .update-inspection-box { padding: 6px; }
  .update-inspection-summary > div { padding: 6px 7px; }
}

@media (max-width: 900px) {
  .update-manager-work-island { padding: 10px; overflow: visible; }
  .update-manager-layout { display: flex; flex-direction: column; }
  .update-manager-status-grid,
  .update-inspection-summary { grid-template-columns: 1fr; }
  .update-write-popover { width: min(360px, calc(100vw - 32px)); }
  .update-dropzone { align-items: stretch; flex-direction: column; min-height: 0; }
  .update-upload-inline-copy { width: 100%; }
  .update-upload-actions { width: 100%; justify-content: flex-end; }
  .update-upload-actions > .jh-action-button { flex: 1 1 0; }
  .update-manager-left { display: flex; flex-direction: column; }
  .update-package-files-card { min-height: 150px; max-height: 240px; }
  .update-manager-right { display: flex; min-height: 260px; max-height: 360px; }
  .update-history-list,
  .update-package-files-list { min-height: 0; }
}

/* v57.00.22 Update/Backup 3rd-menu foundation + DB manual-backup first stage. */
.update-manager-pane {
  width: 100%;
  min-width: 0;
  min-height: 0;
}
.update-manager-pane[hidden] { display: none !important; }
.update-manager-pane.active {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
}
.db-backup-work-island {
  display: flex;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 11px 12px;
}
.db-backup-layout {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  min-width: 0;
  min-height: 0;
}
.db-backup-left,
.db-backup-right {
  min-width: 0;
  min-height: 0;
}
.db-backup-left {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.db-backup-right {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.db-backup-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}
.db-backup-status-business { --jh-status-accent: #dc2626; --jh-status-tint: rgba(220,38,38,.065); }
.db-backup-status-cbt { --jh-status-accent: #2563eb; --jh-status-tint: rgba(37,99,235,.055); }
.db-backup-status-storage { --jh-status-accent: #059669; --jh-status-tint: rgba(5,150,105,.055); }
.db-backup-status-engine { --jh-status-accent: #d97706; --jh-status-tint: rgba(217,119,6,.06); }
.db-backup-action-card,
.db-backup-history-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.db-backup-action-card { flex: 0 0 auto; }
.db-backup-action-title {
  position: relative;
  align-items: flex-start;
  margin-bottom: 7px;
}
.db-backup-action-title > div:first-child {
  align-self: flex-start;
  padding-top: 0;
}
.db-backup-title-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex: 0 0 auto;
}
.db-backup-title-actions > .btn,
.db-backup-baseline-menu > .btn {
  min-height: 32px;
  white-space: nowrap;
}
.db-backup-baseline-menu {
  position: relative;
  flex: 0 0 auto;
}
.db-backup-baseline-popover {
  width: min(400px, calc(100vw - 48px));
  max-height: min(360px, 56dvh);
}
.db-backup-baseline-list {
  display: grid;
  gap: 6px;
}
.db-backup-baseline-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
  padding: 9px 10px 9px 12px;
  border: 1px solid rgba(148,163,184,.22);
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(248,250,252,.96), rgba(255,255,255,.99));
  color: #334155;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: border-color .14s ease, background .14s ease, box-shadow .14s ease;
}
.db-backup-baseline-row:hover:not(:disabled),
.db-backup-baseline-row:focus-visible:not(:disabled) {
  border-color: rgba(220,38,38,.28);
  background: linear-gradient(90deg, rgba(254,242,242,.72), rgba(255,255,255,.99));
  box-shadow: 0 3px 9px rgba(15,23,42,.055);
  outline: none;
}
.db-backup-baseline-row:disabled {
  opacity: .46;
  cursor: not-allowed;
}
.db-backup-baseline-row > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.db-backup-baseline-row strong {
  color: #334155;
  font-size: 10px;
  font-weight: 900;
}
.db-backup-baseline-row small {
  overflow: hidden;
  color: #64748b;
  font-size: 8px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.db-backup-baseline-row.is-all {
  box-shadow: inset 3px 0 0 rgba(220,38,38,.52);
}
.db-backup-action-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}
.db-backup-action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  min-height: 44px;
  padding: 7px 10px;
  border: 1px solid #edf1f5;
  border-radius: 12px;
  background: #f8fafc;
}
.db-backup-action-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.db-backup-action-main strong {
  overflow: hidden;
  color: #1f2937;
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.db-backup-action-main span {
  overflow: hidden;
  color: #64748b;
  font-size: 9px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.db-backup-progress { flex: 0 0 auto; }
.db-backup-progress-meta {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  min-width: 0;
}
.db-backup-progress-percent {
  flex: 0 0 auto;
  color: #0f172a !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  white-space: nowrap;
}
.update-apply-progress[data-determinate="true"] .update-apply-progress-track > span {
  left: 0;
  animation: none;
  transition: width .22s ease;
}
.update-apply-progress[data-determinate="true"][data-phase="applying"] .update-apply-progress-track > span {
  background: linear-gradient(90deg, rgba(185,28,28,.56), rgba(185,28,28,.82));
}
.db-backup-history-card { flex: 1 1 auto; overflow: hidden; }
.db-backup-history-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
  border: 1px solid #edf1f5;
  border-radius: 11px;
  background: #fbfcfe;
}
.db-backup-history-row {
  display: grid;
  gap: 5px;
  min-height: 88px;
  padding: 9px 10px;
  border-bottom: 1px solid #edf1f5;
}
.db-backup-history-row:last-child { border-bottom: 0; }
.db-backup-history-row.is-missing { background: rgba(254,242,242,.52); }
.db-backup-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.db-backup-history-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  min-width: 0;
}
.db-backup-db-badge {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 0 8px;
  border-radius: 999px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}
.db-backup-db-badge.cbt { background: #eff6ff; color: #1d4ed8; }
.db-backup-history-row > strong {
  color: #1f2937;
  font-size: 12px;
  font-weight: 900;
}
.db-backup-history-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 9px;
  color: #64748b;
  font-size: 9px;
  font-weight: 700;
}
.db-backup-history-row code {
  overflow: hidden;
  color: #94a3b8;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 901px) {
  #setting-updates .update-manager-pane.active {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
  }
  #setting-updates .db-backup-work-island {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
  }
  #setting-updates .db-backup-layout {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(320px, 2fr);
    gap: 10px;
    height: 100%;
    min-height: 0;
  }
  #setting-updates .db-backup-left {
    display: grid;
    grid-template-rows: auto auto minmax(180px, 1fr);
    gap: 9px;
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }
  #setting-updates .db-backup-right {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }
}

@media (min-width: 901px) and (max-height: 760px) {
  .db-backup-work-island { padding-top: 9px; padding-bottom: 9px; }
  .db-backup-left { gap: 7px; }
  .db-backup-status-card { min-height: 56px; padding-top: 6px; padding-bottom: 6px; }
  .db-backup-status-card > strong { font-size: 14px; }
  .db-backup-action-row { min-height: 46px; padding-top: 6px; padding-bottom: 6px; }
}

@media (max-width: 900px) {
  .update-manager-pane.active { display: block; }
  .db-backup-work-island { padding: 10px; overflow: visible; }
  .db-backup-layout { display: flex; flex-direction: column; }
  .db-backup-status-grid,
  .db-backup-action-list { grid-template-columns: 1fr; }
  .db-backup-action-title { align-items: stretch; }
  .db-backup-title-actions { width: 100%; justify-content: flex-end; }
  .db-backup-baseline-popover { width: min(390px, calc(100vw - 32px)); }
  .db-backup-left { display: flex; flex-direction: column; }
  .db-backup-right { display: flex; min-height: 280px; max-height: 420px; }
  .db-backup-history-list { min-height: 0; }
}

/* v57.00.30: DB 백업 보호 기준점 */
.db-backup-history-row.is-protected {
  background: linear-gradient(90deg, rgba(255,247,237,.82), rgba(251,252,254,.96) 38%);
  box-shadow: inset 3px 0 0 rgba(217,119,6,.62);
}
.db-backup-protection-badge {
  min-width: 52px;
  border: 0;
  padding: 5px 9px;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: normal;
  cursor: pointer;
  appearance: none;
  box-shadow: inset 0 0 0 1px rgba(148,163,184,.28);
}
.db-backup-protection-badge.is-available {
  background: #f8fafc;
  color: #475569;
}
.db-backup-protection-badge.is-available:hover {
  background: #fff7ed;
  box-shadow: inset 0 0 0 1px rgba(217,119,6,.34);
  color: #b45309;
}
.db-backup-protection-badge.is-protected {
  background: #fff7ed;
  box-shadow: inset 0 0 0 1px rgba(217,119,6,.24);
  color: #b45309;
}
.db-backup-protection-badge:disabled {
  opacity: .46;
  cursor: not-allowed;
}
.db-backup-protection-meta {
  color: #b45309;
  font-weight: 900;
}
.db-backup-protection-modal {
  width: min(590px, 92vw);
}
.db-backup-protection-modal .modal-header {
  align-items: flex-start;
}
.db-backup-protection-modal .modal-header p {
  margin: 4px 0 0;
}
.db-backup-protection-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.db-backup-protection-summary > div,
.db-backup-protection-detail > div {
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid #e8edf3;
  border-radius: 12px;
  background: #fbfcfe;
}
.db-backup-protection-summary span,
.db-backup-protection-detail span {
  display: block;
  margin-bottom: 4px;
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
}
.db-backup-protection-summary strong,
.db-backup-protection-detail strong {
  display: block;
  color: #1f2937;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.db-backup-protection-form {
  display: grid;
  gap: 10px;
}
.db-backup-protection-form .form-field {
  display: grid;
  gap: 6px;
}
.db-backup-protection-form .form-field > span {
  color: #334155;
  font-size: 11px;
  font-weight: 900;
}
.db-backup-protection-form input,
.db-backup-protection-form textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #d7dee8;
  border-radius: 11px;
  padding: 10px 11px;
  background: #fff;
  color: #1f2937;
  font: inherit;
  font-size: 12px;
  line-height: 1.45;
  outline: none;
}
.db-backup-protection-form textarea {
  resize: vertical;
  min-height: 92px;
  max-height: 180px;
}
.db-backup-protection-form input:focus,
.db-backup-protection-form textarea:focus {
  border-color: rgba(220,38,38,.42);
  box-shadow: 0 0 0 3px rgba(220,38,38,.07);
}
.db-backup-protection-help {
  margin: 0;
  padding: 9px 10px;
  border-radius: 10px;
  background: #f8fafc;
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.55;
}
.db-backup-protection-detail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.db-backup-protection-detail[hidden],
.db-backup-protection-form[hidden],
.db-backup-protection-confirm[hidden] {
  display: none !important;
}
.db-backup-protection-confirm {
  margin-top: 12px;
  padding: 10px 11px;
  border: 1px solid rgba(217,119,6,.24);
  border-radius: 11px;
  background: #fff7ed;
  color: #92400e;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.5;
}
.db-backup-protection-message {
  min-height: 18px;
  margin-top: 8px;
  color: #b91c1c;
  font-size: 10px;
  font-weight: 800;
}
@media (max-width: 620px) {
  .db-backup-protection-summary,
  .db-backup-protection-detail { grid-template-columns: 1fr; }
  .db-backup-history-actions { flex-wrap: wrap; }
}

/* v57.00.33: 백업·복원 하단 3열 관리패널 재구성 */
.db-backup-control-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
  min-height: 0;
  height: 100%;
}
.db-backup-control-panel {
  --db-control-accent: #64748b;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  min-height: 0;
  padding: 11px;
  overflow: hidden;
  box-shadow: inset 4px 0 0 color-mix(in srgb, var(--db-control-accent) 72%, transparent);
}
.db-backup-control-auto { --db-control-accent: #dc2626; }
.db-backup-control-retention { --db-control-accent: #d97706; }
.db-backup-control-restore { --db-control-accent: #7c3aed; }
.db-backup-control-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 7px;
  min-width: 0;
  flex: 0 0 auto;
}
.db-backup-control-head > div:first-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.db-backup-control-head h3 {
  margin: 0;
  color: #1f2937;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.25;
}
.db-backup-control-head > div:first-child > span {
  overflow: hidden;
  color: #64748b;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.db-backup-control-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  flex: 0 0 auto;
}
.db-backup-control-head > .status,
.db-backup-control-actions > .status {
  flex: 0 0 auto;
  white-space: nowrap;
}
.db-backup-control-actions .jh-action-button {
  min-width: 50px;
  min-height: 29px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}
.db-backup-control-actions > .status {
  min-width: 46px;
  min-height: 29px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
/* v57.01.11: 자동백업 스위치 외형은 .jh-toggle-switch 공통 패턴을 사용합니다. */
#dbBackupTodayStatus .db-backup-control-value-main,
#dbBackupTodayStatus .db-backup-control-value-sub {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.db-backup-control-list {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  min-height: 0;
}
.db-backup-control-list > div {
  position: relative;
  display: grid;
  align-content: center;
  gap: 4px;
  min-width: 0;
  min-height: 52px;
  padding: 8px 10px 8px 13px;
  border: 1px solid #e9eef4;
  border-radius: 11px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--db-control-accent) 3.5%, #fff) 0%, #fbfcfe 34%, #fbfcfe 100%);
  overflow: hidden;
}
.db-backup-control-list > div::before {
  content: "";
  position: absolute;
  inset: -1px auto -1px -1px;
  width: 4px;
  border-radius: 11px 0 0 11px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--db-control-accent) 90%, transparent), color-mix(in srgb, var(--db-control-accent) 48%, transparent));
}
.db-backup-control-list strong {
  color: #334155;
  font-size: 9.5px;
  font-weight: 900;
  line-height: 1.25;
}
.db-backup-control-list > div > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.db-backup-control-value-main {
  min-width: 0;
  color: #475569;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.32;
  overflow-wrap: anywhere;
}
.db-backup-control-value-sub {
  min-width: 0;
  color: #94a3b8;
  font-size: 8.5px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.db-backup-retention-badge {
  white-space: nowrap;
}
.db-backup-history-row.is-retention-candidate:not(.is-protected) {
  background: linear-gradient(90deg, rgba(255,247,237,.62), rgba(251,252,254,.96) 42%);
  box-shadow: inset 2px 0 0 rgba(245,158,11,.42);
}
.db-backup-restore-review-badge {
  border: 1px solid rgba(124,58,237,.22);
  background: rgba(245,243,255,.94);
  color: #6d28d9;
  cursor: pointer;
}
.db-backup-restore-review-badge:hover {
  border-color: rgba(124,58,237,.4);
  background: rgba(237,233,254,.98);
}
@media (min-width: 901px) and (max-height: 760px) {
  .db-backup-control-grid { gap: 6px; }
  .db-backup-control-panel { gap: 6px; padding: 8px; }
  .db-backup-control-list { gap: 5px; }
  .db-backup-control-list > div { min-height: 42px; padding-top: 5px; padding-bottom: 5px; }
  .db-backup-control-head h3 { font-size: 11px; }
  .db-backup-control-head > div:first-child > span { font-size: 8px; }
  .db-backup-control-value-main { font-size: 8.8px; }
  .db-backup-control-value-sub { font-size: 7.7px; }
}
@media (max-width: 900px) {
  .db-backup-control-grid {
    grid-template-columns: 1fr;
    height: auto;
  }
  .db-backup-control-panel { overflow: visible; }
  .db-backup-control-head > div:first-child > span { white-space: normal; }
}

/* v57.00.39: 롤백·기준점 1차 - WEB 롤백과 DB 보호 기준점을 한 화면에서 안전하게 통합 조회. */
.rollback-checkpoint-work-island {
  display: flex;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 11px 12px;
}
.rollback-checkpoint-layout {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  min-width: 0;
  min-height: 0;
}
.rollback-checkpoint-left,
.rollback-checkpoint-right {
  min-width: 0;
  min-height: 0;
}
.rollback-checkpoint-left {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.rollback-checkpoint-right {
  display: flex;
  flex-direction: column;
}
.rollback-checkpoint-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}
.rollback-checkpoint-status-web { --jh-status-accent: #dc2626; --jh-status-tint: rgba(220,38,38,.065); }
.rollback-checkpoint-status-rollback { --jh-status-accent: #d97706; --jh-status-tint: rgba(217,119,6,.06); }
.rollback-checkpoint-status-business { --jh-status-accent: #2563eb; --jh-status-tint: rgba(37,99,235,.055); }
.rollback-checkpoint-status-cbt { --jh-status-accent: #7c3aed; --jh-status-tint: rgba(124,58,237,.052); }
.rollback-checkpoint-summary-card,
.rollback-checkpoint-list-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.rollback-checkpoint-summary-card { flex: 1 1 auto; }
.rollback-checkpoint-list-card { flex: 1 1 auto; height: 100%; overflow: hidden; }
.rollback-checkpoint-summary-list {
  --checkpoint-accent: #334155;
  display: grid;
  gap: 7px;
  min-width: 0;
}
.rollback-checkpoint-summary-list > div {
  position: relative;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 50px;
  padding: 8px 10px 8px 14px;
  border: 1px solid #e9eef4;
  border-radius: 11px;
  background: linear-gradient(90deg, rgba(248,250,252,.92), #fbfcfe 34%, #fbfcfe 100%);
  overflow: hidden;
}
.rollback-checkpoint-summary-list > div::before {
  content: "";
  position: absolute;
  inset: -1px auto -1px -1px;
  width: 4px;
  border-radius: 11px 0 0 11px;
  background: linear-gradient(180deg, rgba(71,85,105,.86), rgba(148,163,184,.56));
}
.rollback-checkpoint-summary-list strong {
  color: #334155;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.3;
}
.rollback-checkpoint-summary-list > div > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.rollback-checkpoint-shortcuts {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  margin-top: 9px;
}
.rollback-checkpoint-protected-list {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 2px;
}
.rollback-checkpoint-protected-row {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 10px 11px 10px 14px;
  border: 1px solid #f3e8d2;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(255,247,237,.86), rgba(251,252,254,.98) 46%);
  box-shadow: inset 4px 0 0 rgba(217,119,6,.58);
}
.rollback-checkpoint-protected-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.rollback-checkpoint-protected-row > strong {
  overflow: hidden;
  color: #334155;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rollback-checkpoint-protected-row > span,
.rollback-checkpoint-protected-row > small {
  min-width: 0;
  color: #64748b;
  font-size: 9px;
  font-weight: 750;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.rollback-checkpoint-protected-row > small { color: #94a3b8; }

@media (min-width: 901px) {
  #setting-updates .rollback-checkpoint-work-island {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
  }
  #setting-updates .rollback-checkpoint-layout {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(320px, 2fr);
    gap: 10px;
    height: 100%;
    min-height: 0;
  }
  #setting-updates .rollback-checkpoint-left {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 9px;
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }
  #setting-updates .rollback-checkpoint-right {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }
  #setting-updates .rollback-checkpoint-list-card { height: 100%; }
  #setting-updates .rollback-checkpoint-protected-list { flex: 1 1 auto; }
}

@media (min-width: 901px) and (max-height: 760px) {
  .rollback-checkpoint-work-island { padding-top: 9px; padding-bottom: 9px; }
  .rollback-checkpoint-left { gap: 7px; }
  .rollback-checkpoint-status-card { min-height: 56px; padding-top: 6px; padding-bottom: 6px; }
  .rollback-checkpoint-summary-list { gap: 5px; }
  .rollback-checkpoint-summary-list > div { min-height: 42px; padding-top: 5px; padding-bottom: 5px; }
}

@media (max-width: 900px) {
  .rollback-checkpoint-work-island { padding: 10px; overflow: visible; }
  .rollback-checkpoint-layout { display: flex; flex-direction: column; }
  .rollback-checkpoint-status-grid { grid-template-columns: 1fr; }
  .rollback-checkpoint-left { display: flex; flex-direction: column; }
  .rollback-checkpoint-summary-list > div { grid-template-columns: 78px minmax(0, 1fr); }
  .rollback-checkpoint-shortcuts { flex-wrap: wrap; }
  .rollback-checkpoint-right { min-height: 260px; max-height: 420px; }
  .rollback-checkpoint-list-card { min-height: 260px; }
}


/* v57.00.45: 가져오기·내보내기 허브 - 인수인계/SQL 내보내기 전환 + 임시파일 1회 다운로드. */
.handoff-export-work-island {
  display: flex;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 11px 12px;
}
.handoff-export-layout {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  min-width: 0;
  min-height: 0;
}
.handoff-export-left,
.handoff-export-right {
  min-width: 0;
  min-height: 0;
}
.handoff-export-left {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.handoff-export-right {
  display: flex;
  flex-direction: column;
}
.handoff-export-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}
.handoff-export-status-web { --jh-status-accent: #dc2626; --jh-status-tint: rgba(220,38,38,.065); }
.handoff-export-status-business { --jh-status-accent: #2563eb; --jh-status-tint: rgba(37,99,235,.055); }
.handoff-export-status-cbt { --jh-status-accent: #7c3aed; --jh-status-tint: rgba(124,58,237,.052); }
.handoff-export-status-security { --jh-status-accent: #059669; --jh-status-tint: rgba(5,150,105,.055); }
.handoff-export-mode-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}
.handoff-export-mode-card,
.handoff-sql-db-card {
  position: relative;
  display: grid;
  gap: 3px;
  min-width: 0;
  min-height: 58px;
  padding: 9px 13px 8px 15px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: linear-gradient(90deg, #fff 0%, #fbfcfe 100%);
  color: #334155;
  text-align: left;
  font: inherit;
  cursor: pointer;
  overflow: hidden;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease, transform .16s ease;
}
.handoff-export-mode-card::before,
.handoff-sql-db-card::before {
  content: "";
  position: absolute;
  inset: -1px auto -1px -1px;
  width: 4px;
  border-radius: 12px 0 0 12px;
  background: linear-gradient(180deg, rgba(100,116,139,.62), rgba(148,163,184,.25));
  transition: width .16s ease, background .16s ease;
}
.handoff-export-mode-card:hover:not(:disabled),
.handoff-export-mode-card:focus-visible:not(:disabled),
.handoff-sql-db-card:hover,
.handoff-sql-db-card:focus-visible {
  border-color: rgba(220,38,38,.28);
  box-shadow: 0 4px 11px rgba(15,23,42,.075);
  outline: none;
  transform: translateY(-1px);
}
.handoff-export-mode-card.active,
.handoff-sql-db-card.active {
  border-color: rgba(220,38,38,.38);
  background: linear-gradient(90deg, rgba(254,242,242,.88), #fff 66%);
  box-shadow: 0 0 0 1px rgba(220,38,38,.055), 0 3px 9px rgba(15,23,42,.06);
}
.handoff-export-mode-card.active::before,
.handoff-sql-db-card.active::before {
  width: 5px;
  background: linear-gradient(180deg, #dc2626, #f87171);
}
.handoff-export-mode-card > strong,
.handoff-sql-db-card > strong {
  position: relative;
  color: #334155;
  font-size: 10.5px;
  font-weight: 900;
  line-height: 1.3;
}
.handoff-export-mode-card > span,
.handoff-sql-db-card > span {
  position: relative;
  min-width: 0;
  color: #64748b;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.handoff-export-mode-card > small {
  position: relative;
  color: #94a3b8;
  font-size: 8.5px;
  font-weight: 700;
}
.handoff-export-create-card,
.handoff-export-policy-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.handoff-export-mode-panel[hidden],
.handoff-export-policy-panel[hidden] { display: none !important; }
.handoff-export-package-map {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}
.handoff-export-package-map > div {
  position: relative;
  display: grid;
  gap: 3px;
  min-width: 0;
  min-height: 52px;
  padding: 9px 10px 8px 14px;
  border: 1px solid #e8edf3;
  border-radius: 11px;
  background: linear-gradient(90deg, rgba(248,250,252,.94), rgba(255,255,255,.98));
  overflow: hidden;
}
.handoff-export-package-map > div::before {
  content: "";
  position: absolute;
  inset: -1px auto -1px -1px;
  width: 4px;
  border-radius: 11px 0 0 11px;
  background: linear-gradient(180deg, rgba(185,28,28,.82), rgba(239,68,68,.38));
}
.handoff-export-package-map strong {
  color: #334155;
  font-size: 10px;
  font-weight: 900;
}
.handoff-export-package-map span {
  min-width: 0;
  color: #64748b;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.handoff-sql-db-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}
.handoff-sql-db-card { min-height: 54px; }
.handoff-sql-import-target-note {
  min-height: 24px;
  margin-top: 7px;
  padding: 5px 9px;
  border: 1px solid #e8edf3;
  border-radius: 9px;
  background: #f8fafc;
  color: #64748b;
  font-size: 8.8px;
  font-weight: 800;
  line-height: 1.35;
}
.handoff-sql-import-target-note.is-working { border-color: rgba(37,99,235,.2); background: rgba(239,246,255,.78); color: #2563eb; }
.handoff-sql-import-target-note.is-ok { border-color: rgba(5,150,105,.2); background: rgba(236,253,245,.8); color: #047857; }
.handoff-sql-import-target-note.is-warning { border-color: rgba(217,119,6,.22); background: rgba(255,251,235,.86); color: #b45309; }
.handoff-sql-import-target-note.is-error { border-color: rgba(220,38,38,.22); background: rgba(254,242,242,.88); color: #b91c1c; }
.handoff-sql-import-upload-bar { margin-top: 7px; }
.handoff-sql-import-dropzone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  min-height: 58px;
  margin-top: 7px;
  padding: 8px 9px 8px 13px;
  border: 1px dashed #cbd5e1;
  border-radius: 11px;
  background: linear-gradient(90deg, rgba(248,250,252,.94), rgba(255,255,255,.99));
  transition: border-color .14s ease, background .14s ease, box-shadow .14s ease;
}
.handoff-sql-import-dropzone.has-file { border-style: solid; border-color: rgba(37,99,235,.22); }
.handoff-sql-import-dropzone.is-dragover {
  border-color: rgba(220,38,38,.5);
  background: linear-gradient(90deg, rgba(254,242,242,.82), rgba(255,255,255,.99));
  box-shadow: inset 0 0 0 1px rgba(220,38,38,.08);
}
.handoff-sql-import-file-meta {
  display: grid;
  flex: 1 1 auto;
  gap: 3px;
  min-width: 0;
}
.handoff-sql-import-file-meta strong {
  color: #334155;
  font-size: 9px;
  font-weight: 900;
}
.handoff-sql-import-file-meta span {
  min-width: 0;
  color: #64748b;
  font-size: 8.8px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.handoff-sql-import-file-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}
.handoff-sql-import-file-actions .jh-action-button {
  min-width: 86px;
  white-space: nowrap;
}
.handoff-sql-import-file-input { display: none; }
.handoff-sql-import-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 8px;
}
.handoff-sql-import-summary > div {
  position: relative;
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 43px;
  padding: 7px 9px 7px 13px;
  border: 1px solid #e8edf3;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(248,250,252,.94), rgba(255,255,255,.98));
  overflow: hidden;
}
.handoff-sql-import-summary > div::before {
  content: "";
  position: absolute;
  inset: -1px auto -1px -1px;
  width: 4px;
  border-radius: 10px 0 0 10px;
  background: linear-gradient(180deg, rgba(100,116,139,.72), rgba(148,163,184,.28));
}
.handoff-sql-import-summary > div.is-ok {
  border-color: rgba(5,150,105,.22);
  background: linear-gradient(90deg, rgba(236,253,245,.8), rgba(255,255,255,.98));
}
.handoff-sql-import-summary > div.is-ok::before { background: linear-gradient(180deg, #059669, #34d399); }
.handoff-sql-import-summary > div.is-error {
  border-color: rgba(220,38,38,.22);
  background: linear-gradient(90deg, rgba(254,242,242,.86), rgba(255,255,255,.98));
}
.handoff-sql-import-summary > div.is-error::before { background: linear-gradient(180deg, #dc2626, #f87171); }
.handoff-sql-import-summary strong {
  color: #334155;
  font-size: 9px;
  font-weight: 900;
}
.handoff-sql-import-summary span {
  min-width: 0;
  color: #64748b;
  font-size: 8.8px;
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.handoff-export-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 9px;
}
.handoff-export-actions > span {
  min-width: 0;
  color: #64748b;
  font-size: 9px;
  font-weight: 700;
  text-align: left;
  line-height: 1.35;
}
.handoff-export-actions > .btn { flex: 0 0 auto; }
.handoff-export-progress { margin-top: 8px; }
.handoff-export-policy-card {
  flex: 1 1 auto;
  height: 100%;
  overflow: hidden;
}
.handoff-export-policy-list {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 2px;
}
.handoff-export-policy-list > div {
  position: relative;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-width: 0;
  min-height: 47px;
  padding: 7px 9px 7px 13px;
  border: 1px solid #e8edf3;
  border-radius: 11px;
  background: linear-gradient(90deg, rgba(248,250,252,.94), rgba(255,255,255,.98));
  overflow: hidden;
}
.handoff-export-policy-list > div::before {
  content: "";
  position: absolute;
  inset: -1px auto -1px -1px;
  width: 4px;
  border-radius: 11px 0 0 11px;
  background: linear-gradient(180deg, rgba(15,23,42,.78), rgba(100,116,139,.4));
}
.handoff-export-policy-list strong {
  color: #334155;
  font-size: 9.5px;
  font-weight: 900;
}
.handoff-export-policy-list span {
  min-width: 0;
  color: #64748b;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.handoff-export-policy-meta {
  flex: 0 0 auto;
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(148,163,184,.2);
  border-radius: 10px;
  background: #f8fafc;
  color: #64748b;
  font-size: 8.5px;
  font-weight: 700;
  line-height: 1.4;
}

@media (min-width: 901px) {
  #setting-updates .handoff-export-work-island {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
  }
  #setting-updates .handoff-export-layout {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(320px, 2fr);
    gap: 10px;
    height: 100%;
    min-height: 0;
  }
  #setting-updates .handoff-export-left {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: 9px;
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }
  #setting-updates .handoff-export-right {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }
  #setting-updates .handoff-export-mode-panel { height: 100%; overflow: auto; }
  #setting-updates .handoff-export-policy-card { height: 100%; }
  #setting-updates .handoff-export-policy-list { flex: 1 1 auto; }
}

@media (min-width: 901px) and (max-height: 760px) {
  .handoff-export-work-island { padding-top: 9px; padding-bottom: 9px; }
  .handoff-export-left { gap: 7px; }
  .handoff-export-status-card { min-height: 56px; padding-top: 6px; padding-bottom: 6px; }
  .handoff-export-mode-card { min-height: 50px; padding-top: 6px; padding-bottom: 6px; }
  .handoff-export-mode-card > small { display: none; }
  .handoff-export-package-map > div { min-height: 44px; padding-top: 6px; padding-bottom: 6px; }
  .handoff-export-policy-list { gap: 5px; }
  .handoff-export-policy-list > div { min-height: 40px; padding-top: 5px; padding-bottom: 5px; }
}

@media (max-width: 900px) {
  .handoff-export-work-island { padding: 10px; overflow: visible; }
  .handoff-export-layout { display: flex; flex-direction: column; }
  .handoff-export-status-grid,
  .handoff-export-mode-grid,
  .handoff-export-package-map,
  .handoff-sql-db-grid { grid-template-columns: 1fr; }
  .handoff-export-actions { align-items: stretch; flex-direction: column; }
  .handoff-export-actions > .btn { width: 100%; }
  .handoff-sql-import-dropzone { align-items: stretch; flex-direction: column; }
  .handoff-sql-import-file-actions { width: 100%; }
  .handoff-sql-import-file-actions > .btn { flex: 1 1 0; min-width: 0; }
  .handoff-sql-import-summary { grid-template-columns: 1fr; }
  .handoff-export-right { min-height: 300px; max-height: 520px; }
  .handoff-export-policy-card { min-height: 300px; }
  .handoff-export-policy-list > div { grid-template-columns: 76px minmax(0, 1fr); }
}

/* v57.00.40: DB 실제 복원 1차 - 최종확인 UI */
.db-restore-execute-button {
  min-width: 66px !important;
  border-color: rgba(185,28,28,.18) !important;
  background: #fef2f2 !important;
  color: #b91c1c !important;
}
.db-restore-execute-button:hover:not(:disabled) {
  border-color: rgba(185,28,28,.32) !important;
  background: #fee2e2 !important;
}
.db-restore-execute-modal {
  width: min(610px, 92vw);
}
.db-restore-execute-warning {
  display: grid;
  gap: 5px;
  margin: 0 0 14px;
  padding: 11px 12px 11px 15px;
  border: 1px solid #fecaca;
  border-radius: 12px;
  background: linear-gradient(90deg, #fff1f2 0%, #fff 76%);
  box-shadow: inset 4px 0 0 #dc2626;
}
.db-restore-execute-warning strong {
  color: #991b1b;
  font-size: 11px;
  font-weight: 900;
}
.db-restore-execute-warning span {
  color: #7f1d1d;
  font-size: 10px;
  font-weight: 750;
  line-height: 1.55;
}
.db-restore-confirm-field {
  margin-top: 2px;
}
.db-restore-confirm-field input {
  font-family: inherit;
  font-weight: 700;
  letter-spacing: 0;
}
.db-restore-confirm-field small {
  margin-top: 5px;
  color: #64748b;
  font-size: 10px;
  line-height: 1.45;
}
.db-restore-confirm-field small strong {
  color: #b91c1c;
}
@media (max-width: 760px) {
  .db-restore-execute-modal { width: min(94vw, 610px); }
  .db-restore-execute-warning { padding: 10px 11px 10px 14px; }
}

/* v57.00.41: DB 복원 장시간 작업 안정화 + 복원 선택/모달 시인성 */
.db-restore-execute-backdrop,
.db-backup-protection-backdrop {
  z-index: 16000 !important;
}
.db-backup-history-row.is-restore-selected {
  border-color: rgba(124,58,237,.26);
  background: linear-gradient(90deg, rgba(124,58,237,.075) 0%, rgba(255,255,255,.98) 36%);
  box-shadow: inset 4px 0 0 #7c3aed;
}
.db-backup-history-row.is-restore-selected.is-protected {
  background: linear-gradient(90deg, rgba(124,58,237,.08) 0%, rgba(255,251,235,.72) 48%, rgba(255,255,255,.98) 100%);
}
.db-restore-execute-button {
  min-height: 28px !important;
  padding: 5px 9px !important;
  border-radius: 999px !important;
  font-family: inherit !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
}

/* v57.00.48: 데이터 가져오기 템플릿 Popover */
.handoff-data-import-title {
  position: relative;
  z-index: 4;
}
.handoff-template-menu {
  position: relative;
  flex: 0 0 auto;
}
.handoff-template-button {
  min-width: 104px;
  white-space: nowrap;
}
.handoff-template-popover {
  width: min(430px, calc(100vw - 48px));
  max-height: min(390px, 58dvh);
}
.handoff-template-list {
  display: grid;
  gap: 6px;
}
.handoff-template-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
  padding: 9px 10px 9px 12px;
  border: 1px solid rgba(148,163,184,.22);
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(248,250,252,.96), rgba(255,255,255,.99));
  color: #334155;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: border-color .14s ease, background .14s ease, box-shadow .14s ease;
}
.handoff-template-row:hover,
.handoff-template-row:focus-visible {
  border-color: rgba(220,38,38,.28);
  background: linear-gradient(90deg, rgba(254,242,242,.72), rgba(255,255,255,.99));
  box-shadow: 0 3px 9px rgba(15,23,42,.055);
  outline: none;
}
.handoff-template-row > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.handoff-template-row strong {
  color: #334155;
  font-size: 10px;
  font-weight: 900;
}
.handoff-template-row small {
  min-width: 0;
  color: #64748b;
  font-size: 8.7px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.handoff-template-row em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid rgba(185,28,28,.18);
  border-radius: 999px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 8.5px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}
.handoff-template-note {
  margin-top: 7px;
  padding: 7px 8px;
  border-radius: 9px;
  background: #f8fafc;
  color: #64748b;
  font-size: 8.5px;
  font-weight: 700;
  line-height: 1.4;
}


.handoff-template-row {
  position: relative;
  overflow: hidden;
}
.handoff-template-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  bottom: 7px;
  width: 3px;
  border-radius: 0 999px 999px 0;
  background: #64748b;
}
.handoff-template-row.is-cbt::before { background: #7c3aed; }
.handoff-template-row.is-general::before { background: #2563eb; }
.handoff-template-row.is-cbt:hover,
.handoff-template-row.is-cbt:focus-visible {
  border-color: rgba(124,58,237,.24);
  background: linear-gradient(90deg, rgba(245,243,255,.8), rgba(255,255,255,.99));
}
.handoff-template-row.is-general:hover,
.handoff-template-row.is-general:focus-visible {
  border-color: rgba(37,99,235,.24);
  background: linear-gradient(90deg, rgba(239,246,255,.8), rgba(255,255,255,.99));
}
.handoff-import-progress-meta {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.handoff-import-progress-meta > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.handoff-import-progress-meta > em {
  flex: 0 0 auto;
  color: #0f172a;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}
.handoff-import-final-note {
  padding: 9px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
}

@media (max-width: 900px) {
  .handoff-data-import-title { align-items: flex-start; }
  .handoff-template-button { min-width: 0; }
  .handoff-template-popover { width: min(430px, calc(100vw - 32px)); right: 0; }
}

/* v57.00.51: 외부 복구백업 inline UI + 백업이력 직접 내보내기 */
.db-recovery-inline {
  margin-top: 10px;
}
.db-recovery-inline-dropzone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 9px 10px 9px 13px;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  background: #fbfcfe;
  box-shadow: inset 4px 0 0 #475569;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.db-recovery-inline-copy {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 9px;
  row-gap: 2px;
}
.db-recovery-inline-kicker {
  grid-row: 1 / span 2;
  align-self: stretch;
  display: flex;
  align-items: center;
  padding-right: 10px;
  border-right: 1px solid #e2e8f0;
  color: #334155;
  font-size: 10px;
  font-weight: 950;
  white-space: nowrap;
}
.db-recovery-inline-copy strong,
.db-recovery-inline-copy > span:not(.db-recovery-inline-kicker) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.db-recovery-inline-copy strong {
  color: #1f2937;
  font-size: 11px;
  font-weight: 900;
}
.db-recovery-inline-copy > span:not(.db-recovery-inline-kicker) {
  color: #64748b;
  font-size: 9px;
  font-weight: 730;
}
.db-recovery-inline-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}
.db-recovery-inline-dropzone.is-dragover {
  border-color: rgba(185,28,28,.46);
  background: #fff7f7;
  box-shadow: inset 4px 0 0 #b91c1c;
}
.db-recovery-inline-dropzone.has-file {
  border-style: solid;
  border-color: rgba(21,128,61,.25);
  background: #f7fcf8;
  box-shadow: inset 4px 0 0 #15803d;
}
.db-recovery-inline-dropzone.is-status-info {
  border-color: rgba(37,99,235,.24);
  background: #f8fbff;
  box-shadow: inset 4px 0 0 #2563eb;
}
.db-recovery-inline-dropzone.is-status-success {
  border-style: solid;
  border-color: rgba(21,128,61,.25);
  background: #f7fcf8;
  box-shadow: inset 4px 0 0 #15803d;
}
.db-recovery-inline-dropzone.is-status-error {
  border-style: solid;
  border-color: rgba(185,28,28,.28);
  background: #fff8f8;
  box-shadow: inset 4px 0 0 #b91c1c;
}
.db-recovery-inline-dropzone.is-status-success .db-recovery-inline-copy > span:not(.db-recovery-inline-kicker) { color: #166534; }
.db-recovery-inline-dropzone.is-status-error .db-recovery-inline-copy > span:not(.db-recovery-inline-kicker) { color: #b91c1c; }
.db-recovery-inline-dropzone.is-status-info .db-recovery-inline-copy > span:not(.db-recovery-inline-kicker) { color: #1d4ed8; }
.db-backup-recovery-export-badge {
  border-color: rgba(37,99,235,.24);
  background: #eff6ff;
  color: #1d4ed8;
  cursor: pointer;
}
.db-backup-recovery-export-badge:hover:not(:disabled) {
  border-color: rgba(37,99,235,.42);
  background: #dbeafe;
}
.db-backup-recovery-export-badge:disabled {
  opacity: .55;
  cursor: wait;
}
.db-backup-protection-message.success { color: #166534; }
.db-backup-protection-message.error { color: #b91c1c; }
@media (max-width: 760px) {
  .db-recovery-inline-dropzone { align-items: stretch; flex-direction: column; }
  .db-recovery-inline-copy { width: 100%; }
  .db-recovery-inline-actions { width: 100%; }
  .db-recovery-inline-actions > .btn { flex: 1 1 0; }
}

/* v57.00.52: 외부 복구백업 상태는 고정 파일바 안에서 치환해 하단 패널을 밀지 않는다. */
.db-recovery-inline { min-height: 56px; }
.db-recovery-inline-copy > span:not(.db-recovery-inline-kicker) { max-width: min(44vw, 540px); }
@media (min-width: 901px) {
  .db-recovery-inline { height: 56px; }
  .db-recovery-inline-dropzone { height: 56px; min-height: 56px; box-sizing: border-box; }
}

/* v57.00.58: 보존정책 수동 정리 2단 확인 */
.db-backup-retention-cleanup-button {
  min-width: 66px !important;
  min-height: 28px !important;
  padding: 5px 9px !important;
  border-radius: 999px !important;
  font-family: inherit !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
}
.db-backup-retention-cleanup-button.is-confirm {
  border-color: rgba(220,38,38,.34) !important;
  background: #fff1f2 !important;
  color: #b91c1c !important;
  box-shadow: 0 0 0 1px rgba(220,38,38,.06) inset;
}
/* v48 address book expansion */
.modal.large-modal { width:min(1040px, 96vw); }
.top-search-input { border:1px solid #d1d5db; border-radius:10px; padding:9px 11px; min-width:260px; font-size:14px; background:#fff; }
.attachment-list.compact {
  margin-top: 8px;
  display: grid;
  gap: 6px;
}
.attachment-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 10px;
  background: #fff;
}
.attachment-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.attachment-actions {
  display: inline-flex;
  gap: 6px;
  flex-shrink: 0;
}
.btn.disabled,
.btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}


/* v48 patch3: 첨부 미리보기 목록 */
.attachment-picker-list { width: 100%; max-width: 860px; padding: 18px; }
.attachment-picker-list .attachment-row { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; }

/* v48.1 address book card: left form / right preview */
.address-book-card-modal { width: min(1360px, 98vw); height: min(900px, 94vh); display: flex; flex-direction: column; }
.address-book-card-layout { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(560px, 1fr) minmax(420px, .82fr); gap: 16px; overflow: hidden; }
.address-book-form-pane { min-width: 0; overflow: auto; padding-right: 4px; }
.address-book-preview-pane { min-width: 0; display: flex; flex-direction: column; border: 1px solid var(--line, #e5e7eb); border-radius: 16px; background: #f8fafc; overflow: visible; }
.preview-pane-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line, #e5e7eb); background: #fff; }
.address-book-inline-preview { flex: 1; min-height: 520px; overflow: auto; display: flex; align-items: center; justify-content: center; padding: 12px; }
.address-book-inline-preview img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; border-radius: 10px; background: #fff; }
.address-book-inline-preview iframe { width: 100%; height: 100%; min-height: 620px; border: 0; border-radius: 10px; background: #fff; }
.preview-empty { color: #6b7280; text-align: center; line-height: 1.65; padding: 24px; }
.address-book-tabs { display: inline-flex; gap: 6px; padding: 4px; border: 1px solid var(--line, #e5e7eb); border-radius: 12px; background: #f9fafb; margin-bottom: 12px; }
.address-book-tabs button { border: 0; border-radius: 9px; background: transparent; padding: 8px 13px; font-weight: 700; cursor: pointer; color: #4b5563; }
.address-book-tabs button.active { background: #111827; color: #fff; }
.address-book-tab-panel { display: none; }
.address-book-tab-panel.active { display: block; }
.address-book-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1050px) {
  .address-book-card-modal { height: 94vh; }
  .address-book-card-layout { grid-template-columns: 1fr; overflow: auto; }
  .address-book-form-pane { overflow: visible; }
  .address-book-preview-pane { min-height: 520px; }
}

/* v48.2 address book attachment preview refinement */
.address-book-tab-panel.always-visible { display: block; }
.address-book-card-layout { grid-template-columns: minmax(560px, 1fr) minmax(460px, .88fr); }
.section-subtitle { font-size: 15px; font-weight: 800; color: #111827; margin: 0 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line, #e5e7eb); }
.address-preview-toolbar { align-items: center; gap: 10px; flex-wrap: wrap; }
.address-preview-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.compact-select { height: 34px; border: 1px solid var(--line, #d1d5db); border-radius: 10px; padding: 0 9px; background: #fff; font-weight: 700; max-width: 130px; }
.hidden-file-input { display: none; }
.selected-file-name { padding: 7px 12px; border-bottom: 1px solid var(--line, #e5e7eb); background: #fff; color: #6b7280; }
.address-attach-picker-wrap { position: relative; }
.address-attach-picker { display: none; position: absolute; right: 0; top: calc(100% + 8px); width: 360px; max-width: 82vw; max-height: 460px; overflow: auto; background: #fff; border: 1px solid var(--line, #d1d5db); border-radius: 14px; box-shadow: 0 20px 50px rgba(15, 23, 42, .2); z-index: 3000; padding: 10px; }
.address-attach-picker.open { display: block; }
.address-attach-picker .picker-title { font-size: 13px; font-weight: 900; color: #111827; padding: 4px 4px 8px; }
.address-attach-picker .attachment-row { display: flex; gap: 8px; align-items: center; border-bottom: 1px solid #eef2f7; padding: 8px 2px; }
.address-attach-picker .attachment-row:last-child { border-bottom: 0; }
.attach-pick-item { flex: 1; min-width: 0; text-align: left; border: 0; background: transparent; padding: 8px; border-radius: 10px; cursor: pointer; color: #111827; }
.attach-pick-item:hover { background: #f3f4f6; }
.attach-pick-item span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.address-attach-picker .attachment-actions { flex: 0 0 auto; }
@media (max-width: 760px) {
  .address-preview-actions { width: 100%; margin-left: 0; }
  .address-attach-picker { left: 0; right: auto; width: 92vw; }
  .compact-select { max-width: none; flex: 1; }
}


/* v48.3 address book preview usability */
.address-book-preview-pane { overflow: visible; }
.address-book-inline-preview { background: #f8fafc; border-radius: 0 0 16px 16px; }
.address-attach-picker.open { z-index: 9999; }
#abUploadNowBtn:disabled { opacity: .45; cursor: not-allowed; }

/* v48.4 address book preview size/flow refinement */
.address-book-card-modal { width: min(1480px, 99vw); height: min(960px, 96vh); }
.address-book-card-layout { grid-template-columns: minmax(560px, .92fr) minmax(540px, 1.08fr); }
.address-book-inline-preview { min-height: 620px; align-items: flex-start; justify-content: center; overflow: auto; padding: 10px; }
.address-book-inline-preview img { width: auto; max-width: 100%; height: auto; max-height: none; object-fit: contain; }
.address-book-inline-preview iframe { width: 100%; height: calc(96vh - 230px); min-height: 700px; }
.address-attach-picker { position: fixed; width: 520px; max-width: calc(100vw - 32px); max-height: min(680px, 76vh); overflow: auto; }
.address-attach-picker .attachment-row { padding: 10px 4px; }
.address-attach-picker .attach-pick-item { padding: 10px 8px; }
.address-book-preview-pane { min-height: 0; }
@media (max-width: 1180px) {
  .address-book-card-layout { grid-template-columns: 1fr; overflow: auto; }
  .address-book-inline-preview iframe { min-height: 620px; height: 70vh; }
}

/* v48.5 address book OCR + PDF single-scroll refinement */
.ocr-status { min-height: 0; padding: 0 12px; color: #64748b; background: #fff; }
.ocr-status.active { padding: 7px 12px; border-bottom: 1px solid var(--line, #e5e7eb); }
.ocr-status.success { color: #166534; }
.ocr-status.warn { color: #9a3412; }
.ocr-status.error { color: #b91c1c; }
.address-book-inline-preview.is-pdf-preview { overflow: hidden; align-items: stretch; justify-content: stretch; }
.address-book-inline-preview.is-pdf-preview iframe { width: 100%; height: 100%; min-height: 0; border-radius: 10px; }
.address-book-inline-preview.is-image-preview { overflow: auto; align-items: flex-start; }
.address-book-card-modal { overflow: hidden; }
.address-book-card-modal .modal-actions { flex-shrink: 0; }

/* v48.6 address book OCR extraction/status refinement */
.ocr-status.active {
  display: block;
  flex-shrink: 0;
  min-height: 34px;
  line-height: 1.45;
  white-space: normal;
  word-break: keep-all;
  overflow: visible;
  position: relative;
  z-index: 2;
}
.ocr-status.success,
.ocr-status.warn,
.ocr-status.error {
  font-weight: 700;
}
.address-book-form-pane input.ocr-filled {
  background: #f0fdf4;
  border-color: #86efac;
}
.address-book-preview-pane {
  overflow: hidden;
}
.address-book-inline-preview {
  min-height: 0;
}
.address-book-inline-preview.is-pdf-preview,
.address-book-inline-preview.is-image-preview {
  flex: 1 1 auto;
}

/* v48.12 address book duplicate compare + info-view refinement */
.address-dup-backdrop { z-index: 13000; }
.address-dup-modal { width: min(1120px, 96vw); max-height: 88vh; display: flex; flex-direction: column; }
.address-dup-notice { margin: 14px 18px 8px; padding: 12px 14px; border: 1px solid #fed7aa; background: #fff7ed; color: #9a3412; border-radius: 12px; line-height: 1.55; }
.address-dup-table-wrap { margin: 8px 18px 14px; border: 1px solid #e5e7eb; border-radius: 14px; overflow: auto; }
.address-dup-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.address-dup-table th, .address-dup-table td { padding: 10px 12px; border-bottom: 1px solid #eef2f7; vertical-align: top; text-align: left; word-break: keep-all; }
.address-dup-table thead th { background: #f8fafc; font-weight: 900; color: #111827; position: sticky; top: 0; z-index: 1; }
.address-dup-table tbody th { width: 130px; color: #374151; background: #fafafa; }
.address-dup-table tr.changed td:nth-child(3) { background: #f0fdf4; color: #166534; font-weight: 800; }
.address-dup-table tr.changed td:nth-child(2) { background: #fff7ed; color: #9a3412; }
.address-change-info { flex-shrink: 0; border-top: 1px solid var(--line, #e5e7eb); padding: 9px 12px; background: #fff; color: #475569; line-height: 1.5; }
.attach-pick-item em { display: block; margin-top: 3px; font-style: normal; font-size: 11px; color: #64748b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 760px) {
  .address-dup-modal { width: 96vw; max-height: 92vh; }
  .address-dup-table { min-width: 760px; }
}

/* v48.13 address book information history */
.address-history-list { display: flex; flex-direction: column; gap: 8px; max-height: 260px; overflow: auto; padding: 4px 2px; }
.address-history-list.compact { max-height: 230px; }
.address-history-item { border: 1px solid #e5e7eb; border-radius: 12px; background: #fff; padding: 9px 10px; font-size: 12px; line-height: 1.45; }
.address-history-item .history-head { display: flex; justify-content: space-between; gap: 10px; color: #64748b; margin-bottom: 4px; }
.address-history-item .history-head b { color: #111827; }
.address-history-item .history-desc { color: #374151; font-weight: 800; margin-bottom: 5px; }
.address-history-item .history-values { display: flex; align-items: center; gap: 8px; color: #475569; word-break: break-word; }
.address-history-item .history-values span { min-width: 0; }
.address-history-item .history-values b { color: #b91c1c; flex: 0 0 auto; }
.address-info-view h3 { margin: 14px 0 8px; font-size: 14px; color: #111827; }
.address-info-view h3:first-child { margin-top: 0; }
.address-info-view .attachment-picker-list { margin-bottom: 8px; }
.address-attach-picker .history-title { border-top: 1px solid #eef2f7; margin-top: 8px; padding-top: 10px; }
/* v48.14: 주소록/견적서 정보보기 및 선택창 보정 */
.address-info-list-btn {
  padding: 6px 10px;
  white-space: nowrap;
}
.quote-address-picker-modal {
  width: min(920px, 94vw);
  max-height: 86vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.quote-address-search-row {
  margin: 10px 0 12px;
}
.quote-address-search-row input {
  width: 100%;
  height: 42px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  padding: 0 14px;
  font-size: 14px;
}
.quote-address-picker-list {
  display: grid;
  gap: 8px;
  overflow: auto;
  padding-right: 4px;
}
.quote-address-result {
  width: 100%;
  text-align: left;
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  cursor: pointer;
}
.quote-address-result:hover {
  border-color: #ef4444;
  background: #fff7f7;
}
.quote-address-result-main {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 5px;
}
.quote-address-result-main strong {
  font-size: 15px;
  color: #111827;
}
.quote-address-result-main span {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 800;
  color: #991b1b;
  background: #fee2e2;
  border-radius: 999px;
  padding: 3px 8px;
}
.quote-address-result-sub {
  font-size: 13px;
  color: #475569;
  line-height: 1.45;
}
.quote-address-result-sub.muted {
  color: #64748b;
}
#quoteClientPickerInput {
  cursor: pointer;
  background: #fff;
}
@media (max-width: 720px) {
  .quote-address-picker-modal {
    width: 96vw;
    max-height: 90vh;
  }
  .quote-address-result-main {
    align-items: flex-start;
    flex-direction: column;
  }
}
/* v48.15: 주소록 리스트 단순화 + 견적서 주소 선택창 중앙 모달/2열 카드 */
#companyAddressBookList tr { cursor: pointer; }
#companyAddressBookList tr:hover { background: #fff7f7; }
#quoteAddressPickerModal.modal,
#quoteSitePickerModal.modal {
  position: fixed;
  inset: 0;
  width: auto;
  max-height: none;
  overflow: hidden;
  background: rgba(15, 23, 42, .42);
  border-radius: 0;
  padding: 18px;
  box-shadow: none;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 8000;
}
#quoteAddressPickerModal .quote-address-picker-modal,
#quoteSitePickerModal .quote-address-picker-modal {
  width: min(1180px, 94vw);
  max-height: min(820px, 88vh);
  background: #fff;
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 28px 70px rgba(15, 23, 42, .28);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
#quoteAddressPickerModal .modal-head,
#quoteSitePickerModal .modal-head { flex: 0 0 auto; }
#quoteAddressPickerModal .quote-address-search-row,
#quoteSitePickerModal .quote-address-search-row { flex: 0 0 auto; margin: 10px 0 12px; }
#quoteAddressPickerModal .quote-address-picker-list,
#quoteSitePickerModal .quote-address-picker-list {
  flex: 1 1 auto;
  min-height: 360px;
  max-height: 560px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 2px 6px 2px 2px;
}
#quoteAddressPickerModal .quote-address-result,
#quoteSitePickerModal .quote-address-result {
  min-height: 112px;
  border-radius: 14px;
  padding: 13px 14px;
}
#quoteAddressPickerModal .quote-address-result-sub,
#quoteSitePickerModal .quote-address-result-sub {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (max-width: 820px) {
  #quoteAddressPickerModal.modal,
#quoteSitePickerModal.modal { padding: 10px; }
  #quoteAddressPickerModal .quote-address-picker-modal,
#quoteSitePickerModal .quote-address-picker-modal { width: 96vw; max-height: 90vh; padding: 14px; }
  #quoteAddressPickerModal .quote-address-picker-list,
#quoteSitePickerModal .quote-address-picker-list { grid-template-columns: 1fr; min-height: 320px; max-height: 64vh; }
}
/* v48.16: 자재/협력업체/주소록 정보보기 보정 */
#materialStockSummaryModal.modal-backdrop,
#materialMovementHistoryModal.modal-backdrop,
#materialFilterModal.modal-backdrop {
  cursor: pointer;
}
#materialStockSummaryModal .modal,
#materialMovementHistoryModal .modal,
#materialFilterModal .modal {
  cursor: default;
}
#quotePartnerPicker .popover-actions {
  justify-content: flex-end;
}
.address-attach-picker {
  width: min(720px, calc(100vw - 32px)) !important;
  max-height: min(760px, 82vh) !important;
}
.address-attach-picker .address-history-line-list {
  max-height: 260px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f8fafc;
  padding: 6px;
}
.address-history-line-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: auto;
}
.address-history-line {
  display: grid;
  grid-template-columns: 140px 54px 92px minmax(130px, 1fr) minmax(170px, 1.25fr);
  gap: 8px;
  align-items: center;
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  font-size: 12px;
  line-height: 1.35;
}
.address-history-line span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.address-history-line .history-date { color: #64748b; }
.address-history-line .history-type {
  justify-self: start;
  color: #991b1b;
  background: #fee2e2;
  border-radius: 999px;
  padding: 2px 8px;
  font-weight: 900;
}
.address-history-line .history-field { font-weight: 900; color: #111827; }
.address-history-line .history-text { color: #334155; }
.address-history-line .history-change { color: #475569; }
.address-attach-picker .attachment-list.compact {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 260px;
  overflow: auto;
  padding: 4px 2px;
}
.address-attach-picker .attachment-row {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 8px;
  background: #fff;
}
.address-info-view-v48-16 {
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
}
.address-info-view-v48-16 .history-section {
  flex: 0 0 auto;
}
.address-info-view-v48-16 .file-section {
  flex: 1 1 auto;
  min-height: 0;
}
.address-info-view-v48-16 .address-history-line-list {
  max-height: 320px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #f8fafc;
  padding: 8px;
}
.address-info-file-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-height: 360px;
  overflow: auto;
}
.address-info-file-grid .attachment-row {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 10px;
  background: #fff;
}
@media (max-width: 900px) {
  .address-history-line {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .address-history-line span { white-space: normal; }
  .address-attach-picker .attachment-list.compact,
  .address-info-file-grid { grid-template-columns: 1fr; }
}
/* v48.17: 견적서 주소/협력업체 선택 UI 보정 */
#quoteAddressPickerModal .quote-address-picker-modal,
#quoteSitePickerModal .quote-address-picker-modal {
  position: relative;
}
#quoteAddressPickerModal .modal-head,
#quoteSitePickerModal .modal-head {
  padding-right: 44px;
}
#quoteAddressPickerModal .quote-address-picker-close,
#quoteSitePickerModal .quote-address-picker-close {
  position: absolute;
  top: 16px;
  right: 16px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #111827;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
#quoteAddressPickerModal .quote-address-picker-close:hover,
#quoteSitePickerModal .quote-address-picker-close:hover {
  background: #f9fafb;
}
#quotePartnerPicker {
  width: min(360px, calc(100vw - 36px));
}
#quotePartnerPicker select {
  width: 100%;
  min-width: 0;
  max-width: none;
}
#quotePartnerPicker .quote-partner-select-hint {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f9fafb;
  border: 1px solid #eef0f3;
  color: #6b7280;
  display: grid;
  gap: 3px;
  line-height: 1.35;
  word-break: keep-all;
}
#quotePartnerPicker .quote-partner-select-hint strong {
  color: #111827;
  font-weight: 800;
}
#quotePartnerPicker .quote-partner-select-hint span {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}


/* v48.18: 주소록 선택/불러오기 공통 모달 정리 */
#quoteAddressPickerModal .quote-address-picker-close,
#quoteSitePickerModal .quote-address-picker-close {
  width: auto;
  min-width: 58px;
  height: 36px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}
#quoteAddressPickerModal .modal-head,
#quoteSitePickerModal .modal-head {
  align-items: flex-start;
}
.address-common-picker-backdrop {
  position: fixed;
  inset: 0;
  width: auto;
  max-height: none;
  overflow: hidden;
  background: rgba(15, 23, 42, .42);
  border-radius: 0;
  padding: 18px;
  box-shadow: none;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 8000;
}
.address-common-picker-modal {
  width: min(1180px, 94vw);
  max-height: min(820px, 88vh);
  background: #fff;
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 28px 70px rgba(15, 23, 42, .28);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.address-common-picker-head {
  flex: 0 0 auto;
  align-items: flex-start;
}
.address-common-picker-close {
  min-width: 58px;
  height: 36px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
}
.address-common-picker-list {
  flex: 1 1 auto;
  min-height: 360px;
  max-height: 560px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 2px 6px 2px 2px;
}
.address-common-picker-card {
  min-height: 124px;
}
.address-common-picker-card .quote-address-result-sub {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (max-width: 820px) {
  .address-common-picker-backdrop { padding: 10px; }
  .address-common-picker-modal { width: 96vw; max-height: 90vh; padding: 14px; }
  .address-common-picker-list { grid-template-columns: 1fr; min-height: 320px; max-height: 64vh; }
}

/* v48.19: 현장관리 주소록 불러오기 닫기 버튼 위치 보정 */
.address-common-picker-head {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 18px;
  width: 100%;
  padding-right: 0;
}
.address-common-picker-head > div {
  min-width: 0;
  flex: 1 1 auto;
}
.address-common-picker-head .address-common-picker-close {
  flex: 0 0 auto;
  margin-left: auto;
}
/* v49.1 계약서 원본 양식 복원 */
.contract-lines p.contract-pay-line {
  grid-template-columns: 170px minmax(0, 1fr);
}
.contract-lines p.contract-pay-line span {
  line-height: 1.65;
}
.contract-lines p.contract-pay-line em {
  font-style: normal;
  color: #374151;
}
.contract-attach-line {
  padding: 0 8px 14px;
  font-size: 14px;
  color: #111827;
}
.contract-date-line {
  margin: 18px 0 18px !important;
  padding: 0 !important;
  text-align: center;
  font-size: 16px;
}
.contract-condition-full p {
  line-height: 1.75;
  white-space: normal;
}
.contract-condition-full b {
  display: inline-block;
  margin-bottom: 4px;
}

/* v49.3 계약서 갑지/일반조건 표시 보정 */
.contract-pay-line b::after,
.contract-warranty-title b::after,
.contract-warranty-sub b::after { content: "" !important; }
.contract-warranty-title { grid-template-columns: 1fr !important; }
.contract-warranty-title b { white-space: nowrap; }
.contract-warranty-sub { padding-left: 26px; }
.contract-warranty-sub b { padding-left: 8px; }
.contract-condition-box h4 { text-align: center; }

/* v50: 문서 미리보기 선택 팝업 / 큰 미리보기 모달 */
.quote-preview-anchor { position: relative; display: inline-flex; }
.quote-preview-menu { min-width: 190px; }
.quote-preview-menu-list { display: grid; gap: 6px; }
.quote-preview-menu-item {
  width: 100%;
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 10px;
  padding: 8px 10px;
  text-align: left;
  font-size: 13px;
  font-weight: 800;
  color: #111827;
  cursor: pointer;
}
.quote-preview-menu-item:hover { background: #f8fafc; border-color: #94a3b8; }
.quote-document-modal { width: min(1180px, 96vw); height: min(900px, 94vh); display: flex; flex-direction: column; }
.quote-document-modal-body { flex: 1; overflow: auto; background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 14px; padding: 18px; }
.quote-document-modal-body .quote-doc-sheet { max-width: 980px; margin: 0 auto; }
.quote-preview-head-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; border-top: 2px solid #111827; border-bottom: 1px solid #d1d5db; padding: 12px 8px; }
.quote-preview-head-grid p { margin: 5px 0; }
.quote-preview-total-line { margin: 14px 0; padding: 12px 14px; background: #111827; color: #fff; border-radius: 12px; font-size: 18px; font-weight: 900; display: flex; justify-content: space-between; gap: 12px; }
.quote-preview-total-line span { font-size: 13px; font-weight: 700; opacity: .9; }
.quote-preview-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.quote-preview-table th, .quote-preview-table td { border: 1px solid #d1d5db; padding: 7px 8px; vertical-align: top; }
.quote-preview-table th { background: #f1f5f9; }
.quote-preview-table .right { text-align: right; }
.quote-preview-section-row td { background: #f8fafc; font-weight: 900; color: #334155; }
.quote-preview-summary { margin-top: 12px; text-align: right; line-height: 1.7; }
.quote-preview-summary p { margin: 2px 0; }
@media (max-width: 720px) {
  .quote-preview-head-grid { grid-template-columns: 1fr; }
  .quote-document-modal { width: 96vw; height: 92vh; }
  .quote-document-modal-body { padding: 10px; }
}

/* v50.1: PDF/인쇄용 문서 레이아웃 기초 보정 */
.contract-cover-page,
.guarantee-preview {
  box-sizing: border-box;
}

.contract-preview .contract-cover-page {
  flex-direction: column;
  justify-content: space-between;
}


.contract-preview .contract-body {
  word-break: keep-all;
}



.contract-preview .contract-sign-grid {
  margin-top: 8px;
  align-items: stretch;
}

.contract-preview .contract-sign-grid > div {
  min-height: 188px;
}

.contract-preview .contract-condition-box {
  padding: 24px 26px;
  min-height: 1050px;
  background: #fff;
}

.guarantee-preview {
  min-height: 1050px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 32px 28px 30px;
}

.guarantee-preview h3 {
  margin-top: 10px;
  margin-bottom: 30px;
}

.guarantee-preview .guarantee-table {
  margin: 22px 0 34px;
}

.guarantee-preview .contract-body {
  margin: 26px 0 16px;
  padding: 12px 6px;
  line-height: 2.05;
  word-break: keep-all;
}

.guarantee-preview .doc-date {
  margin: 44px 0 26px;
}

.guarantee-preview .our-company-box {
  margin-top: 16px;
}

.guarantee-preview .recipient-line {
  margin-top: 34px;
  margin-bottom: 8px;
}

@media print {
  @page { size: A4; margin: 12mm; }
  body { background: #fff !important; }
  body * { visibility: hidden; }
  .quote-document-modal-body,
  .quote-document-modal-body * { visibility: visible; }
  .quote-document-modal-body {
    position: static !important;
    overflow: visible !important;
    border: 0 !important;
    background: #fff !important;
    padding: 0 !important;
  }
  .quote-doc-sheet {
    width: 186mm !important;
    min-height: auto !important;
    margin: 0 auto !important;
    padding: 0 !important;
    box-shadow: none !important;
    border: 0 !important;
    border-radius: 0 !important;
  }
  .contract-cover-page,
  .guarantee-preview {
    min-height: 273mm !important;
    page-break-after: always;
    break-after: page;
  }
  .contract-preview .contract-condition-box {
    min-height: 273mm !important;
    margin-top: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    padding: 0 !important;
  }
  .guarantee-preview {
    width: 186mm !important;
    padding: 6mm 4mm !important;
  }
  .quote-preview-actions,
  .modal-actions,
  .modal-header,
  .modal-close,
  .quote-preview-menu,
  .quote-preview-anchor { display: none !important; }
}

/* v50.2 계약서 갑/을 좌우 배치 및 갑 주소 상세주소 제외 보정 */
.contract-preview .contract-cover-page {
  min-height: auto;
  justify-content: flex-start;
}
.contract-preview .contract-sign-grid,
.contract-sign-grid.contract-sign-grid-compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.contract-preview .contract-sign-grid > div,
.contract-sign-grid.contract-sign-grid-compact > div {
  min-height: 0;
  border-radius: 10px;
  overflow: visible;
}
.contract-party-box p {
  word-break: keep-all;
}
.contract-party-address {
  display: grid;
  column-gap: 4px;
  align-items: start;
}
.contract-party-address .contract-party-label {
  white-space: nowrap;
}
.contract-party-address .contract-party-value {
  min-width: 0;
  line-height: 1.35;
  word-break: keep-all;
}
.contract-preview .contract-date-line {
  margin: 18px 0 14px !important;
}
.contract-preview .contract-attach-line {
  padding-bottom: 0;
}
@media (max-width: 720px) {
  .contract-preview .contract-sign-grid,
  .contract-sign-grid.contract-sign-grid-compact {
    grid-template-columns: 1fr;
  }
}
@media print {
  .contract-preview {
    border: 1.5px solid #111827 !important;
    border-radius: 14px !important;
    box-shadow: none !important;
    padding: 8mm !important;
    page-break-after: always;
  }
  .contract-preview .contract-cover-page {
    min-height: auto !important;
    height: auto !important;
    border: 1.5px solid #111827 !important;
    border-radius: 12px !important;
    padding: 8mm 8mm 6mm !important;
  }
  .contract-preview .contract-sign-grid,
  .contract-sign-grid.contract-sign-grid-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10mm !important;
  }
  .contract-party-box p { font-size: 10.5pt !important; line-height: 1.32 !important; }
  .contract-party-box h4 { font-size: 11pt !important; }
}

/* v50.3 계약서 갑지 출력/좌우 배치 재보정 */
.contract-preview {
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
}
.contract-preview .contract-cover-page {
  border: 1.5px solid #111827 !important;
  border-radius: 14px !important;
  padding: 14px 18px 12px !important;
  min-height: auto !important;
  display: block !important;
}
.contract-preview .contract-cover-page h3 {
  margin: 0 0 12px !important;
  font-size: 21px !important;
}
.contract-preview .contract-lines {
  padding: 8px 8px !important;
  line-height: 1.42 !important;
}
.contract-preview .contract-lines p {
  margin: 4px 0 !important;
  grid-template-columns: 150px minmax(0, 1fr) !important;
}
.contract-preview .contract-lines p.contract-pay-line {
  grid-template-columns: 150px minmax(0, 1fr) !important;
}
.contract-preview .contract-lines p.contract-pay-line span {
  line-height: 1.42 !important;
}
.contract-preview .contract-body {
  margin: 8px 0 4px !important;
  padding: 7px 8px !important;
  line-height: 1.58 !important;
}
.contract-preview .contract-attach-line {
  padding: 0 8px 4px !important;
  font-size: 13px !important;
}
.contract-preview .contract-date-line {
  margin: 9px 0 8px !important;
  font-size: 15px !important;
}
.contract-preview .contract-sign-grid,
.contract-sign-grid.contract-sign-grid-compact {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px !important;
  margin-top: 8px !important;
}
.contract-preview .contract-sign-grid > div,
.contract-sign-grid.contract-sign-grid-compact > div {
  padding: 9px 10px !important;
  min-height: 0 !important;
}
.contract-party-box h4 {
  font-size: 13px !important;
  margin: 0 0 6px !important;
}
.contract-party-box p {
  margin: 2px 0 !important;
  font-size: 11.5px !important;
  line-height: 1.32 !important;
}
.contract-party-address {
  grid-template-columns: 36px minmax(0, 1fr) !important;
}
.contract-party-address .contract-party-value {
  overflow-wrap: break-word !important;
  word-break: keep-all !important;
}
.contract-preview .contract-condition-box {
  margin-top: 0 !important;
}

@media print {
  @page { size: A4; margin: 10mm; }
  html, body { background: #fff !important; height: auto !important; overflow: visible !important; }
  body * { visibility: hidden !important; }
  #quoteDocumentPreviewModal,
  #quoteDocumentPreviewModal *,
  .quote-document-modal,
  .quote-document-modal *,
  .quote-document-modal-body,
  .quote-document-modal-body * { visibility: visible !important; }
  #quoteDocumentPreviewModal {
    display: block !important;
    position: static !important;
    inset: auto !important;
    background: #fff !important;
    padding: 0 !important;
    overflow: visible !important;
  }
  .quote-document-modal {
    display: block !important;
    position: static !important;
    width: auto !important;
    height: auto !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    border: 0 !important;
    background: #fff !important;
    overflow: visible !important;
  }
  .quote-document-modal-body {
    display: block !important;
    position: static !important;
    overflow: visible !important;
    border: 0 !important;
    background: #fff !important;
    padding: 0 !important;
    width: auto !important;
    height: auto !important;
  }
  .quote-doc-sheet.contract-preview {
    width: 190mm !important;
    max-width: 190mm !important;
    margin: 0 auto !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
    page-break-after: auto !important;
    break-after: auto !important;
  }
  .contract-preview .contract-cover-page {
    box-sizing: border-box !important;
    width: 190mm !important;
    min-height: auto !important;
    height: auto !important;
    max-height: none !important;
    padding: 5.5mm 6mm 5mm !important;
    border: 1.5px solid #111827 !important;
    border-radius: 5mm !important;
    page-break-after: always !important;
    break-after: page !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
  .contract-preview .contract-cover-page h3 {
    font-size: 16pt !important;
    margin: 0 0 4mm !important;
  }
  .contract-preview .contract-lines {
    padding: 2.8mm 2.5mm !important;
    line-height: 1.32 !important;
  }
  .contract-preview .contract-lines p {
    margin: 1.3mm 0 !important;
    grid-template-columns: 34mm minmax(0, 1fr) !important;
    gap: 2mm !important;
    font-size: 10.2pt !important;
  }
  .contract-preview .contract-lines p.contract-pay-line {
    grid-template-columns: 34mm minmax(0, 1fr) !important;
  }
  .contract-preview .contract-lines p.contract-pay-line span,
  .contract-preview .contract-lines p.contract-pay-line em {
    line-height: 1.32 !important;
  }
  .contract-preview .contract-body {
    margin: 3mm 0 1.5mm !important;
    padding: 2.2mm 2.5mm !important;
    line-height: 1.55 !important;
    font-size: 10.2pt !important;
  }
  .contract-preview .contract-attach-line {
    padding: 0 2.5mm 1.5mm !important;
    font-size: 9.6pt !important;
  }
  .contract-preview .contract-date-line {
    margin: 3mm 0 2.6mm !important;
    font-size: 11pt !important;
  }
  .contract-preview .contract-sign-grid,
  .contract-sign-grid.contract-sign-grid-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 5mm !important;
    margin-top: 0 !important;
  }
  .contract-preview .contract-sign-grid > div,
  .contract-sign-grid.contract-sign-grid-compact > div {
    padding: 2.4mm 3mm !important;
    min-height: 0 !important;
    border: 1px solid #d1d5db !important;
    border-radius: 3mm !important;
    overflow: visible !important;
  }
  .contract-party-box h4 {
    font-size: 10pt !important;
    margin: 0 0 1.5mm !important;
  }
  .contract-party-box p {
    font-size: 8.7pt !important;
    line-height: 1.22 !important;
    margin: 0.9mm 0 !important;
  }
  .contract-party-address {
    grid-template-columns: 9mm minmax(0, 1fr) !important;
    column-gap: 1mm !important;
  }
  .contract-preview .contract-condition-box {
    display: block !important;
    width: 190mm !important;
    min-height: auto !important;
    margin: 0 auto !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #fff !important;
    page-break-before: always !important;
    break-before: page !important;
  }
  .contract-preview .contract-condition-box h4 {
    text-align: center !important;
    font-size: 15pt !important;
    margin: 0 0 5mm !important;
  }
  .contract-condition-full p {
    font-size: 9.3pt !important;
    line-height: 1.55 !important;
    margin: 0 0 3mm !important;
    padding-bottom: 2mm !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
  }

/* v50.4 계약서 인쇄 페이지 공백/여백 재보정 */
@media print {
  @page { size: A4; margin: 10mm 9mm; }

  html,
  body {
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: #fff !important;
  }

  /* visibility:hidden 방식은 기존 화면 높이가 남아 빈 페이지를 만들 수 있어 출력 대상 외 요소는 제거 */
  body > *:not(#quoteDocumentPreviewModal) {
    display: none !important;
  }

  #quoteDocumentPreviewModal,
  #quoteDocumentPreviewModal * {
    visibility: visible !important;
  }

  #quoteDocumentPreviewModal {
    display: block !important;
    position: static !important;
    inset: auto !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: #fff !important;
  }

  .quote-document-modal,
  .quote-document-modal-body {
    display: block !important;
    position: static !important;
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
  }

  .modal-header,
  .modal-actions,
  .modal-close,
  .quote-preview-actions,
  .quote-preview-menu,
  .quote-preview-anchor {
    display: none !important;
  }

  .quote-doc-sheet.contract-preview {
    display: block !important;
    width: 190mm !important;
    max-width: 190mm !important;
    margin: 0 auto !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
  }

  .contract-preview .contract-cover-page {
    display: block !important;
    box-sizing: border-box !important;
    width: 190mm !important;
    min-height: 255mm !important;
    height: auto !important;
    margin: 0 auto !important;
    padding: 8mm 8mm 7mm !important;
    border: 1.4px solid #111827 !important;
    border-radius: 5mm !important;
    page-break-before: auto !important;
    break-before: auto !important;
    page-break-after: always !important;
    break-after: page !important;
    page-break-inside: auto !important;
    break-inside: auto !important;
  }

  .contract-preview .contract-cover-page h3 {
    font-size: 15.5pt !important;
    line-height: 1.25 !important;
    margin: 0 0 6mm !important;
    padding-bottom: 3mm !important;
    border-bottom: 1.5px solid #111827 !important;
  }

  .contract-preview .contract-lines {
    padding: 0 !important;
    line-height: 1.42 !important;
    border-bottom: 1px solid #111827 !important;
    padding-bottom: 4mm !important;
    margin-bottom: 4mm !important;
  }

  .contract-preview .contract-lines p {
    display: grid !important;
    grid-template-columns: 40mm minmax(0, 1fr) !important;
    gap: 2mm !important;
    margin: 1.55mm 0 !important;
    font-size: 9.8pt !important;
    line-height: 1.42 !important;
  }

  .contract-preview .contract-lines p b {
    white-space: nowrap !important;
    word-break: keep-all !important;
    letter-spacing: -0.03em !important;
  }

  .contract-preview .contract-lines p span,
  .contract-preview .contract-lines p em {
    line-height: 1.42 !important;
    word-break: keep-all !important;
    overflow-wrap: break-word !important;
  }

  .contract-preview .contract-lines p.contract-pay-line {
    grid-template-columns: 40mm minmax(0, 1fr) !important;
  }

  .contract-warranty-sub {
    padding-left: 8mm !important;
  }

  .contract-preview .contract-body {
    margin: 0 0 2.8mm !important;
    padding: 0 !important;
    font-size: 9.8pt !important;
    line-height: 1.65 !important;
    word-break: keep-all !important;
  }

  .contract-preview .contract-attach-line {
    padding: 0 !important;
    margin: 0 0 6mm !important;
    font-size: 9.4pt !important;
    line-height: 1.45 !important;
  }

  .contract-preview .contract-date-line {
    margin: 0 0 5mm !important;
    font-size: 10.5pt !important;
    line-height: 1.3 !important;
  }

  .contract-preview .contract-sign-grid,
  .contract-sign-grid.contract-sign-grid-compact {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 5mm !important;
    margin: 0 !important;
  }

  .contract-preview .contract-sign-grid > div,
  .contract-sign-grid.contract-sign-grid-compact > div {
    box-sizing: border-box !important;
    padding: 3mm 3.2mm !important;
    min-height: 38mm !important;
    border: 1px solid #d1d5db !important;
    border-radius: 3mm !important;
    overflow: visible !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  .contract-party-box h4 {
    font-size: 10pt !important;
    line-height: 1.25 !important;
    margin: 0 0 1.8mm !important;
  }

  .contract-party-box p {
    font-size: 8.5pt !important;
    line-height: 1.32 !important;
    margin: 0.85mm 0 !important;
    word-break: keep-all !important;
    overflow-wrap: break-word !important;
  }

  .contract-party-address {
    display: grid !important;
    grid-template-columns: 9mm minmax(0, 1fr) !important;
    column-gap: 1mm !important;
    align-items: start !important;
  }

  .contract-party-address .contract-party-value {
    display: block !important;
    line-height: 1.32 !important;
    word-break: keep-all !important;
    overflow-wrap: break-word !important;
  }

  .contract-preview .contract-condition-box {
    display: block !important;
    box-sizing: border-box !important;
    width: 190mm !important;
    margin: 0 auto !important;
    padding: 8mm 6mm !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #fff !important;
    page-break-before: auto !important;
    break-before: auto !important;
  }

  .contract-preview .contract-condition-box h4 {
    text-align: center !important;
    font-size: 15pt !important;
    margin: 0 0 6mm !important;
  }

  .contract-condition-full p {
    font-size: 9.2pt !important;
    line-height: 1.55 !important;
    margin: 0 0 3mm !important;
    padding: 0 0 2mm !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
}


/* v50.5 계약서 갑지 테두리/서명부 위치 보정 */
.contract-preview .contract-cover-page {
  border: 0 !important;
  border-radius: 0 !important;
}
.contract-preview .contract-sign-grid,
.contract-sign-grid.contract-sign-grid-compact {
  margin-top: 22px !important;
}
.contract-party-box .contract-party-representative {
  margin-top: 14px !important;
  padding-top: 8px !important;
}

@media print {
  .contract-preview .contract-cover-page {
    border: 0 !important;
    border-radius: 0 !important;
    min-height: auto !important;
    padding: 8mm 4mm 7mm !important;
  }
  .contract-preview .contract-sign-grid,
  .contract-sign-grid.contract-sign-grid-compact {
    margin-top: 8mm !important;
  }
  .contract-party-box .contract-party-representative {
    margin-top: 5.5mm !important;
    padding-top: 2mm !important;
  }
  .contract-preview .contract-lines {
    margin-bottom: 5mm !important;
  }
  .contract-preview .contract-body {
    margin-top: 2mm !important;
    margin-bottom: 3mm !important;
  }
    .contract-preview .contract-date-line {
    margin-bottom: 6mm !important;
  }
}

/* v50.6 계약서 갑지 하단 정렬 / 일반조건 페이지 여백 보정 */
.contract-cover-bottom {
  margin-top: 28px;
}

@media print {
  @page { size: A4; margin: 12mm 10mm 13mm; }

  
  .contract-preview .contract-cover-page {
    box-sizing: border-box !important;
    width: 190mm !important;
    min-height: 272mm !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    padding: 1mm 2mm 1mm !important;
    border: 0 !important;
    border-radius: 0 !important;
    page-break-after: always !important;
    break-after: page !important;
  }

  .contract-preview .contract-cover-page h3 {
    margin-top: 0 !important;
    margin-bottom: 5mm !important;
  }

  .contract-preview .contract-cover-bottom {
    margin-top: auto !important;
    padding-top: 7mm !important;
  }

  .contract-preview .contract-attach-line {
    margin-bottom: 6mm !important;
  }

  .contract-preview .contract-date-line {
    margin: 0 0 7mm !important;
  }

  .contract-preview .contract-sign-grid,
  .contract-sign-grid.contract-sign-grid-compact {
    margin-top: 0 !important;
  }

  .contract-party-box .contract-party-representative {
    margin-top: 7mm !important;
    padding-top: 2mm !important;
  }

  .contract-preview .contract-condition-box {
    box-sizing: border-box !important;
    width: 190mm !important;
    margin: 0 auto !important;
    padding: 0 2mm !important;
    page-break-before: auto !important;
    break-before: auto !important;
  }

  .contract-preview .contract-condition-box h4 {
    margin-top: 0 !important;
    margin-bottom: 6mm !important;
  }

  .contract-condition-full p {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
}

/* v50.7 계약서 인쇄 여백/갑지 균형 보정 */
@media print {
  @page { size: A4; margin: 14mm 10mm 15mm; }

  
  .contract-preview .contract-cover-page {
    width: 190mm !important;
    min-height: 268mm !important;
    padding: 4mm 3mm 5mm !important;
    display: block !important;
    box-sizing: border-box !important;
    page-break-after: always !important;
    break-after: page !important;
  }

  .contract-preview .contract-cover-page h3 {
    font-size: 17pt !important;
    line-height: 1.25 !important;
    margin: 0 0 6mm !important;
    padding-bottom: 2.5mm !important;
  }

  .contract-preview .contract-lines {
    margin-bottom: 5.2mm !important;
    padding-bottom: 4.2mm !important;
    line-height: 1.48 !important;
  }

  .contract-preview .contract-lines p,
  .contract-preview .contract-lines p.contract-pay-line {
    grid-template-columns: 42mm minmax(0, 1fr) !important;
    gap: 2.2mm !important;
    margin: 1.8mm 0 !important;
    font-size: 10.4pt !important;
    line-height: 1.48 !important;
  }

  .contract-preview .contract-lines p span,
  .contract-preview .contract-lines p em {
    line-height: 1.48 !important;
  }

  .contract-preview .contract-body {
    margin: 0 0 4.2mm !important;
    font-size: 10.2pt !important;
    line-height: 1.72 !important;
  }

  .contract-preview .contract-cover-bottom {
    margin-top: 4mm !important;
    padding-top: 0 !important;
  }

  .contract-preview .contract-attach-line {
    margin: 0 0 5mm !important;
    font-size: 9.8pt !important;
    line-height: 1.45 !important;
  }

  .contract-preview .contract-date-line {
    margin: 0 0 6.5mm !important;
    font-size: 11pt !important;
    line-height: 1.35 !important;
  }

  .contract-preview .contract-sign-grid,
  .contract-sign-grid.contract-sign-grid-compact {
    gap: 5mm !important;
    margin-top: 0 !important;
  }

  .contract-preview .contract-sign-grid > div,
  .contract-sign-grid.contract-sign-grid-compact > div {
    min-height: 43mm !important;
    padding: 3.4mm 3.4mm !important;
  }

  .contract-party-box h4 {
    font-size: 10.8pt !important;
    line-height: 1.28 !important;
    margin-bottom: 2.1mm !important;
  }

  .contract-party-box p {
    font-size: 9.1pt !important;
    line-height: 1.35 !important;
    margin: 0.95mm 0 !important;
  }

  
  .contract-party-box .contract-party-representative {
    margin-top: 8mm !important;
    padding-top: 2.2mm !important;
  }

  .contract-preview .contract-condition-box {
    width: 190mm !important;
    box-sizing: border-box !important;
    margin: 0 auto !important;
    padding: 4mm 2mm 6mm !important;
    page-break-before: auto !important;
    break-before: auto !important;
  }

  
  }

/* v50.8 계약서 인쇄 하단 정렬 / 전체 여백 안정화 */
@media print {
  @page { size: A4; margin: 13mm 10mm 13mm; }

  .quote-doc-sheet.contract-preview {
    width: 190mm !important;
    max-width: 190mm !important;
  }

  .contract-preview .contract-cover-page {
    box-sizing: border-box !important;
    width: 190mm !important;
    min-height: 271mm !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    padding: 7mm 3mm 7mm !important;
    border: 0 !important;
    border-radius: 0 !important;
    page-break-after: always !important;
    break-after: page !important;
  }

  .contract-preview .contract-cover-page h3 {
    font-size: 17.4pt !important;
    line-height: 1.25 !important;
    margin: 0 0 5.5mm !important;
    padding-bottom: 2.6mm !important;
  }

  .contract-preview .contract-lines {
    margin-bottom: 5mm !important;
    padding-bottom: 4mm !important;
    line-height: 1.5 !important;
  }

  .contract-preview .contract-lines p,
  .contract-preview .contract-lines p.contract-pay-line {
    grid-template-columns: 42mm minmax(0, 1fr) !important;
    gap: 2.2mm !important;
    margin: 1.65mm 0 !important;
    font-size: 10.6pt !important;
    line-height: 1.5 !important;
  }

  .contract-preview .contract-lines p span,
  .contract-preview .contract-lines p em {
    line-height: 1.5 !important;
  }

  .contract-preview .contract-body {
    margin: 0 0 4mm !important;
    padding: 0 !important;
    font-size: 10.35pt !important;
    line-height: 1.68 !important;
  }

  .contract-preview .contract-cover-bottom {
    margin-top: auto !important;
    padding-top: 5mm !important;
  }

  .contract-preview .contract-attach-line {
    margin: 0 0 4.2mm !important;
    padding: 0 !important;
    font-size: 9.9pt !important;
    line-height: 1.45 !important;
  }

  .contract-preview .contract-date-line {
    margin: 0 0 6mm !important;
    font-size: 11.1pt !important;
    line-height: 1.35 !important;
  }

  .contract-preview .contract-sign-grid,
  .contract-sign-grid.contract-sign-grid-compact {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 5mm !important;
    margin-top: 0 !important;
  }

  .contract-preview .contract-sign-grid > div,
  .contract-sign-grid.contract-sign-grid-compact > div {
    box-sizing: border-box !important;
    min-height: 47mm !important;
    padding: 3.5mm 3.5mm !important;
  }

  .contract-party-box h4 {
    font-size: 11pt !important;
    line-height: 1.28 !important;
    margin: 0 0 2.2mm !important;
  }

  .contract-party-box p {
    font-size: 9.35pt !important;
    line-height: 1.36 !important;
    margin: 1mm 0 !important;
  }

  .contract-party-address {
    grid-template-columns: 9.5mm minmax(0, 1fr) !important;
  }

  .contract-party-box .contract-party-representative {
    margin-top: 8.5mm !important;
    padding-top: 2.4mm !important;
  }

  .contract-preview .contract-condition-box {
    width: 190mm !important;
    box-sizing: border-box !important;
    margin: 0 auto !important;
    padding: 2mm 2mm 4mm !important;
  }

  .contract-preview .contract-condition-box h4 {
    font-size: 15pt !important;
    margin: 0 0 6mm !important;
  }

  .contract-condition-full p {
    font-size: 9.15pt !important;
    line-height: 1.55 !important;
    margin: 0 0 3.2mm !important;
    padding: 0 0 2mm !important;
  }
}

/* v50.9: 계약서 갑지 붙임서류 위치만 상향 조정 */
@media print {
  .contract-preview .contract-attach-line {
    position: relative !important;
    top: -5mm !important;
  }
}

/* v50.10 계약서 갑지 가독성/붙임서류 위치 보정 */
@media print {
  /* 브라우저 기본 여백 사용 시에도 갑지 내용이 작게 보이지 않도록 출력 글자만 소폭 확대 */
  .contract-preview .contract-cover-page h3 {
    font-size: 18pt !important;
    margin-bottom: 5mm !important;
  }

  .contract-preview .contract-lines p,
  .contract-preview .contract-lines p.contract-pay-line {
    font-size: 10.9pt !important;
    line-height: 1.48 !important;
    margin: 1.65mm 0 !important;
  }

  .contract-preview .contract-body {
    font-size: 10.65pt !important;
    line-height: 1.62 !important;
    margin-bottom: 1.5mm !important;
  }

  /* 붙임서류가 하단으로 밀려 보이지 않도록 실제 레이아웃 기준으로 위쪽에 붙임 */
  .contract-preview .contract-cover-bottom {
    margin-top: 2mm !important;
    padding-top: 0 !important;
  }

  .contract-preview .contract-attach-line {
    position: static !important;
    top: auto !important;
    transform: none !important;
    margin-top: -2mm !important;
    margin-bottom: 3.2mm !important;
    font-size: 10.2pt !important;
    line-height: 1.4 !important;
  }

  .contract-preview .contract-date-line {
    font-size: 11.4pt !important;
    margin-bottom: 5.5mm !important;
  }

  .contract-preview .contract-sign-grid > div,
  .contract-sign-grid.contract-sign-grid-compact > div {
    min-height: 46mm !important;
  }

  .contract-party-box h4 {
    font-size: 11.4pt !important;
  }

  .contract-party-box p {
    font-size: 9.65pt !important;
    line-height: 1.35 !important;
  }

  .contract-party-box .contract-party-representative {
    margin-top: 8mm !important;
  }
}

/* v56.02.18: 견적 문서확인 도구를 PC에서 한 줄로 고정 */
.quote-document-modal {
  width: min(1320px, calc(100vw - 24px));
  box-sizing: border-box;
}
.quote-document-modal-header {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}
.quote-document-modal-header > h2 {
  margin: 0;
  white-space: nowrap;
}
.quote-document-toolbar {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  align-items: center;
  justify-content: end;
  gap: 8px;
  margin-left: auto;
  min-width: 0;
  white-space: nowrap;
}
.quote-document-select {
  width: 210px;
  min-width: 210px;
  max-width: 210px;
  height: 36px;
  padding: 0 34px 0 12px;
  border: 1px solid #d7dde8;
  border-radius: 10px;
  background: #fff;
  font-size: 13px;
  color: #111827;
  box-sizing: border-box;
}
.quote-document-toolbar .btn,
.quote-document-toolbar .modal-close,
.quote-document-toolbar .preview-stamp-toggle {
  height: 36px;
  min-height: 36px;
  box-sizing: border-box;
  white-space: nowrap;
}
.quote-document-toolbar .preview-stamp-toggle {
  padding-left: 9px;
  padding-right: 9px;
  font-size: 12.5px;
}
.quote-document-toolbar .btn,
.quote-document-toolbar .modal-close {
  padding-left: 12px;
  padding-right: 12px;
}
@media (max-width: 760px) {
  .quote-document-modal { width: 96vw; }
  .quote-document-modal-header {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .quote-document-toolbar {
    display: flex;
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    margin-left: 0;
  }
  .quote-document-select {
    flex: 1 1 190px;
    width: 190px;
    min-width: 170px;
    max-width: 100%;
  }
}


/* v56.02.20: 자사 견적서 고화질 PDF 시험 버튼 */
.quote-document-toolbar .quote-high-quality-test-btn {
  border-color: #e7a7ae;
  color: #991b1b;
  background: #fff;
  font-size: 12.5px;
}
.quote-document-toolbar .quote-high-quality-test-btn:hover {
  border-color: #c2414d;
  background: #fff7f8;
}
.quote-document-toolbar .quote-high-quality-test-btn:disabled {
  opacity: .68;
  cursor: wait;
}
/* Data management: browser foundation + JH shared UI application. */
.danger-zone-card { border-color: #fecaca; }
.warning-box { background: #fff7ed; border-color: #fed7aa; color: #7c2d12; }
.maintenance-summary { margin-top: 12px; padding: 12px 14px; background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 14px; color: #334155; font-size: 13px; line-height: 1.7; }
.empty-row td { color: #64748b; text-align: center; padding: 28px 12px; }

/* v57.01.11: 관리대상 카드의 공통 외형/선택 반응은 .jh-management-* 패턴을 사용합니다.
   이 파일은 데이터관리 전용 건수표현·밀도·배치만 유지합니다. */
.data-maintenance-card .data-count-inline {
  flex: 0 0 auto;
  margin-left: 0;
  color: #cbd5e1;
  font-size: 10px;
  font-weight: 700;
}
.data-maintenance-card .data-count-inline strong {
  margin-right: 2px;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
}

/* v57.00.60 Data Management console: one enlarged work island, fixed left control lane + compact right data tiles. */
#setting-data .data-maintenance-console {
  display: grid;
  grid-template-columns: minmax(310px, 29%) minmax(0, 1fr);
  gap: 10px;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 11px 12px;
  overflow: hidden;
}
#setting-data .data-maintenance-console-left {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 9px;
  min-width: 0;
  min-height: 0;
}
#setting-data .data-maintenance-source-panel,
#setting-data .data-maintenance-tools-panel,
#setting-data .data-maintenance-browser {
  box-sizing: border-box;
  min-width: 0;
  border: 1px solid #e8edf3;
  border-radius: 14px;
  background: rgba(251,252,254,.9);
}
#setting-data .data-maintenance-source-panel {
  padding: 10px;
}
#setting-data .data-maintenance-tools-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 10px;
  overflow: hidden;
}
#setting-data .data-maintenance-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
#setting-data .data-maintenance-panel-heading > div {
  min-width: 0;
}
#setting-data .data-maintenance-kicker {
  display: block;
  margin-bottom: 2px;
  color: #b91c1c;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .04em;
}
#setting-data .data-maintenance-panel-heading h2,
#setting-data .data-maintenance-panel-heading h3 {
  margin: 0;
  color: #111827;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
}
#setting-data .data-maintenance-panel-note,
#setting-data .data-maintenance-tool-count {
  flex: 0 0 auto;
  color: #64748b;
  font-size: 9px;
  font-weight: 750;
  line-height: 1.3;
  text-align: right;
}
#setting-data .data-maintenance-tool-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 23px;
  padding: 0 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  white-space: nowrap;
}

/* Left source cards reuse the established JH dark/accent card, but in a dense 2-column management array. */
#setting-data .data-maintenance-source-grid,
#setting-data .data-maintenance-special-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 0;
}
#setting-data .data-maintenance-source-grid .data-maintenance-card,
#setting-data .data-maintenance-special-grid .data-maintenance-card {
  min-height: 58px;
  padding: 9px 25px 8px 13px;
}
#setting-data .data-maintenance-source-grid .data-maintenance-card-head > strong,
#setting-data .data-maintenance-special-grid .data-maintenance-card-head > strong {
  font-size: 11px;
}
#setting-data .data-maintenance-source-grid .data-count-inline,
#setting-data .data-maintenance-special-grid .data-count-inline {
  display: inline-flex !important;
  align-items: baseline;
  font-size: 8px;
}
#setting-data .data-maintenance-source-grid .data-count-inline strong,
#setting-data .data-maintenance-special-grid .data-count-inline strong {
  font-size: 14px;
}
#setting-data .data-maintenance-source-grid .data-maintenance-card-desc,
#setting-data .data-maintenance-special-grid .data-maintenance-card-desc {
  margin-top: 5px;
  font-size: 8px;
}
#setting-data .data-maintenance-special-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 10px 1px 6px;
  padding-top: 8px;
  border-top: 1px dashed #dfe5ec;
}
#setting-data .data-maintenance-special-heading > span {
  color: #334155;
  font-size: 10px;
  font-weight: 900;
}
#setting-data .data-maintenance-special-heading > small {
  min-width: 0;
  overflow: hidden;
  color: #94a3b8;
  font-size: 8px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#setting-data .data-maintenance-special-grid .data-maintenance-card {
  min-height: 60px;
  background:
    linear-gradient(100deg, rgba(127,29,29,.08) 0%, transparent 62%),
    linear-gradient(145deg, #17191e 0%, #101217 58%, #0b0c10 100%);
}

/* Lower-left management functions: fixed console controls, not a second navigation row. */
#setting-data .data-maintenance-tools-heading {
  margin-bottom: 7px;
}
#setting-data .data-maintenance-selection-breakdown {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 5px;
  min-height: 30px;
  margin-bottom: 8px;
  padding: 6px;
  border: 1px solid #edf1f5;
  border-radius: 11px;
  background: #fff;
}
#setting-data .data-maintenance-selection-empty {
  align-self: center;
  color: #94a3b8;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.35;
}
#setting-data .data-maintenance-selection-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 22px;
  padding: 0 7px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #f8fafc;
  color: #64748b;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}
#setting-data .data-maintenance-selection-chip strong {
  color: #1f2937;
  font-size: 9px;
}
#setting-data .data-maintenance-tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 8px;
}
#setting-data .data-maintenance-tool-card {
  box-sizing: border-box;
  display: grid;
  gap: 3px;
  min-width: 0;
  min-height: 54px;
  padding: 8px 9px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  color: #111827;
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease, transform .16s ease;
}
#setting-data .data-maintenance-tool-card:hover:not(:disabled),
#setting-data .data-maintenance-tool-card:focus-visible:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(220,38,38,.34);
  background: #fffafa;
  box-shadow: 0 4px 12px rgba(127,29,29,.065);
  outline: none;
}
#setting-data .data-maintenance-tool-card:disabled {
  background: #f8fafc;
  color: #94a3b8;
  cursor: default;
  opacity: .72;
}
#setting-data .data-maintenance-tool-card strong {
  min-width: 0;
  overflow: hidden;
  font-size: 10px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#setting-data .data-maintenance-tool-card small {
  min-width: 0;
  overflow: hidden;
  color: #64748b;
  font-size: 8px;
  font-weight: 700;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#setting-data .data-maintenance-tool-card:disabled small { color: #a8b2c1; }
#setting-data .data-maintenance-tool-card.is-secondary:not(:disabled) strong { color: #475569; }
#setting-data .data-maintenance-tool-status {
  flex: 0 0 auto;
  min-height: 42px;
  max-height: 58px;
  overflow: hidden;
  padding: 8px 9px;
  border-left: 3px solid rgba(220,38,38,.36);
  border-radius: 10px;
  background: rgba(248,250,252,.88);
  color: #64748b;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.45;
}

/* Right side: compact data tiles maximize simultaneous record visibility without turning into a wide table. */
#setting-data .data-maintenance-browser {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 10px;
  overflow: hidden;
}
#setting-data .data-maintenance-browser-title {
  display: grid;
  grid-template-columns: minmax(145px, auto) minmax(220px, 1fr) auto;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  margin-bottom: 8px;
}
#setting-data .data-maintenance-browser-heading {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
#setting-data .data-maintenance-browser-heading h2 {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  color: #111827;
  font-size: 15px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#setting-data .data-maintenance-selected-count {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 76px;
  height: 36px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 11px;
  background: #f1f5f9;
  color: #475569;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}
#setting-data .data-maintenance-search {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 6px;
  width: min(100%, 340px);
  min-width: 0;
}
#setting-data .data-maintenance-search input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 130px;
  height: 36px;
}
#setting-data .data-maintenance-browser-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  min-width: 0;
  white-space: nowrap;
}
#setting-data .data-maintenance-browser-actions .jh-toolbar-btn {
  min-width: 76px;
  padding-inline: 10px;
  font-size: 11px;
  font-weight: 800;
}
#setting-data .data-maintenance-refresh-button {
  font-size: 11px;
  font-weight: 800;
}
#setting-data .data-maintenance-list {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
}
#setting-data .data-maintenance-tile-grid {
  --jh-compact-min-width: 210px;
  --jh-compact-row-height: 92px;
}
#setting-data .data-maintenance-tile {
  --jh-compact-card-height: 92px;
  --jh-compact-card-rows: 18px 18px 15px 14px;
}
#setting-data .data-maintenance-tile-grid > .data-maintenance-empty {
  grid-column: 1 / -1;
  align-self: start;
}
#setting-data .data-maintenance-empty {
  padding: 34px 16px;
  color: #64748b;
  font-size: 11px;
  text-align: center;
}
#setting-data .data-maintenance-empty.is-error { color: #b91c1c; }
#setting-data .data-maintenance-empty-feature {
  display: grid;
  gap: 6px;
  justify-items: center;
}
#setting-data .data-maintenance-empty-feature strong {
  color: #334155;
  font-size: 12px;
}
#setting-data .data-maintenance-empty-feature span {
  max-width: 520px;
  color: #94a3b8;
  font-size: 9px;
  line-height: 1.5;
}
#setting-data .data-maintenance-browser-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 0 0 auto;
  margin-top: 7px;
}
#setting-data .data-maintenance-browser-footer .btn:disabled { opacity: .42; cursor: default; }

@media (min-width: 1500px) {
  #setting-data .data-maintenance-console { grid-template-columns: minmax(330px, 27%) minmax(0, 1fr); }
  #setting-data .data-maintenance-tile-grid { grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); }
}

@media (min-width: 901px) and (max-height: 760px) {
  #setting-data .data-maintenance-console { padding-top: 9px; padding-bottom: 9px; }
  #setting-data .data-maintenance-source-panel,
  #setting-data .data-maintenance-tools-panel,
  #setting-data .data-maintenance-browser { padding: 8px; }
  #setting-data .data-maintenance-source-grid .data-maintenance-card,
  #setting-data .data-maintenance-special-grid .data-maintenance-card { min-height: 52px; padding-top: 7px; padding-bottom: 7px; }
  #setting-data .data-maintenance-special-heading { margin-top: 8px; padding-top: 6px; }
  #setting-data .data-maintenance-tool-card { min-height: 48px; padding-top: 6px; padding-bottom: 6px; }
  #setting-data .data-maintenance-tool-status { min-height: 34px; padding-top: 6px; padding-bottom: 6px; }
}

@media (max-width: 1180px) and (min-width: 901px) {
  #setting-data .data-maintenance-console { grid-template-columns: 300px minmax(0, 1fr); }
  #setting-data .data-maintenance-browser-title {
    grid-template-columns: minmax(120px, auto) minmax(170px, 1fr) auto;
  }
  #setting-data .data-maintenance-search { width: min(100%, 280px); }
  #setting-data .data-maintenance-browser-actions .jh-toolbar-btn { min-width: 72px; padding-inline: 8px; }
  #setting-data .data-maintenance-tile-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
}

@media (max-width: 900px) {
  #setting-data .data-maintenance-console {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 9px;
    overflow: visible;
  }
  #setting-data .data-maintenance-console-left {
    display: flex;
    flex-direction: column;
  }
  #setting-data .data-maintenance-tools-panel { overflow: visible; }
  #setting-data .data-maintenance-source-grid,
  #setting-data .data-maintenance-special-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #setting-data .data-maintenance-source-grid .data-maintenance-card,
  #setting-data .data-maintenance-special-grid .data-maintenance-card { min-height: 62px; }
  #setting-data .data-maintenance-browser { min-height: 420px; overflow: visible; }
  #setting-data .data-maintenance-browser-title { display: flex; flex-wrap: wrap; align-items: center; }
  #setting-data .data-maintenance-browser-heading { flex: 1 1 auto; }
  #setting-data .data-maintenance-search { order: 3; flex: 1 1 100%; width: 100%; max-width: none; }
  #setting-data .data-maintenance-browser-actions { margin-left: auto; flex-wrap: wrap; }
  #setting-data .data-maintenance-list { min-height: 300px; max-height: 54dvh; }
  #setting-data .data-maintenance-tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 92px; }
}

@media (max-width: 560px) {
  #setting-data .data-maintenance-panel-note,
  #setting-data .data-maintenance-special-heading > small { display: none; }
  #setting-data .data-maintenance-source-grid .data-maintenance-card,
  #setting-data .data-maintenance-special-grid .data-maintenance-card { padding-right: 24px; }
  #setting-data .data-maintenance-tool-grid { grid-template-columns: 1fr 1fr; }
  #setting-data .data-maintenance-tile-grid { grid-template-columns: 1fr; }
}

/* Existing reset modal remains non-exposed rollback-safe code until trash deletion is confirmed. */
.data-reset-modal .modal-body { padding: 0 18px 14px; }
.data-reset-modal .form-grid.compact-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 12px 0 14px;
}
.data-reset-modal .form-field {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}
.data-reset-modal .form-field label { margin: 0; font-size: 13px; font-weight: 800; color: #334155; white-space: nowrap; }
.data-reset-modal .form-field input { width: 100%; height: 42px; box-sizing: border-box; }
.data-reset-modal .warning-box { margin-top: 8px; }
.data-reset-modal .modal-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 12px; }
@media (max-width: 560px) {
  .data-reset-modal .form-field { grid-template-columns: 1fr; gap: 5px; }
}

/* v57.00.62 · read-only relation preview inside the existing left management island. */
#setting-data .data-maintenance-relation-report {
  display: grid;
  gap: 8px;
  min-width: 0;
}
#setting-data .data-maintenance-relation-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
#setting-data .data-maintenance-relation-summary > span {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
}
#setting-data .data-maintenance-relation-summary small {
  overflow: hidden;
  color: #94a3b8;
  font-size: 8px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#setting-data .data-maintenance-relation-summary strong {
  color: #111827;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
}
#setting-data .data-maintenance-relation-section {
  display: grid;
  gap: 5px;
  min-width: 0;
}
#setting-data .data-maintenance-relation-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #475569;
}
#setting-data .data-maintenance-relation-section-head strong {
  color: #1f2937;
  font-size: 9px;
  font-weight: 900;
}
#setting-data .data-maintenance-relation-section-head span {
  color: #64748b;
  font-size: 8px;
  font-weight: 800;
}
#setting-data .data-maintenance-relation-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}
#setting-data .data-maintenance-relation-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  min-height: 22px;
  padding: 0 7px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font-size: 8px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}
#setting-data .data-maintenance-relation-chip strong {
  overflow: hidden;
  max-width: 150px;
  color: #334155;
  font-size: 8px;
  font-weight: 900;
  text-overflow: ellipsis;
}
#setting-data .data-maintenance-relation-chip em {
  color: #dc2626;
  font-size: 8px;
  font-style: normal;
  font-weight: 900;
}
#setting-data .data-maintenance-relation-empty {
  color: #94a3b8;
  font-size: 8px;
  font-weight: 700;
}
#setting-data .data-maintenance-relation-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
}
#setting-data .data-maintenance-relation-file strong {
  flex: 0 0 auto;
  color: #1f2937;
  font-size: 9px;
  font-weight: 900;
}
#setting-data .data-maintenance-relation-file span {
  overflow: hidden;
  color: #64748b;
  font-size: 8px;
  font-weight: 800;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#setting-data .data-maintenance-relation-warnings {
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 7px 8px 7px 20px;
  border-left: 2px solid rgba(220,38,38,.28);
  border-radius: 8px;
  background: rgba(255,255,255,.64);
  color: #64748b;
  font-size: 8px;
  font-weight: 700;
  line-height: 1.4;
}
@media (max-width: 1180px) {
  #setting-data .data-maintenance-relation-summary { grid-template-columns: 1fr; }
  #setting-data .data-maintenance-relation-file { align-items: flex-start; flex-direction: column; gap: 2px; }
  #setting-data .data-maintenance-relation-file span { text-align: left; white-space: normal; }
}


/* Data Management floating work overlay.
   Shared JH visual shell; local rules own anchor, adaptive size, and command state. */
#setting-data .data-maintenance-browser {
  position: relative;
}
#setting-data .data-maintenance-work-popover {
  position: absolute;
  z-index: 64;
  top: var(--dm-work-popover-top, 312px);
  right: auto;
  left: 4px;
  width: min(var(--dm-work-popover-width, 520px), calc(100% - 12px));
  max-width: none;
  transform-origin: left top;
}
#setting-data .data-maintenance-work-popover-heading .data-maintenance-kicker { margin: 0; }
#setting-data .data-maintenance-work-popover .data-maintenance-relation-report,
#setting-data .data-maintenance-work-stack {
  display: grid;
  gap: 10px;
  min-width: 0;
}
#setting-data .data-maintenance-work-popover .data-maintenance-relation-summary {
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 7px;
}
#setting-data .data-maintenance-work-popover .data-maintenance-relation-summary > span { padding: 9px 10px; }
#setting-data .data-maintenance-work-popover .data-maintenance-relation-summary small { font-size: 9px; }
#setting-data .data-maintenance-work-popover .data-maintenance-relation-summary strong { font-size: 13px; }
#setting-data .data-maintenance-work-popover .data-maintenance-relation-section-head strong,
#setting-data .data-maintenance-work-popover .data-maintenance-relation-file strong { font-size: 10px; }
#setting-data .data-maintenance-work-popover .data-maintenance-relation-section-head span,
#setting-data .data-maintenance-work-popover .data-maintenance-relation-file span { font-size: 9px; }
#setting-data .data-maintenance-work-popover .data-maintenance-relation-chip {
  min-height: 25px;
  padding-inline: 8px;
  font-size: 9px;
}
#setting-data .data-maintenance-work-popover .data-maintenance-relation-chip strong,
#setting-data .data-maintenance-work-popover .data-maintenance-relation-chip em { font-size: 9px; }
#setting-data .data-maintenance-relation-chip.is-more {
  border-style: dashed;
  background: #f8fafc;
}
#setting-data .data-maintenance-work-note {
  padding: 8px 10px;
  border-left: 3px solid rgba(220,38,38,.3);
  border-radius: 9px;
  background: #f8fafc;
  color: #64748b;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.45;
}
#setting-data .data-maintenance-work-loading,
#setting-data .data-maintenance-work-error,
#setting-data .data-maintenance-work-placeholder {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
}
#setting-data .data-maintenance-work-loading { grid-template-columns: auto minmax(0,1fr); align-items: center; }
#setting-data .data-maintenance-work-loading > small { grid-column: 2; }
#setting-data .data-maintenance-work-loading-dot {
  grid-row: 1 / span 2;
  width: 10px;
  height: 10px;
  border: 3px solid #fecaca;
  border-top-color: #dc2626;
  border-radius: 50%;
  animation: data-maintenance-work-spin .8s linear infinite;
}
@keyframes data-maintenance-work-spin { to { transform: rotate(360deg); } }
#setting-data .data-maintenance-work-loading strong,
#setting-data .data-maintenance-work-error strong,
#setting-data .data-maintenance-work-placeholder strong { color:#1f2937; font-size:11px; font-weight:900; }
#setting-data .data-maintenance-work-loading small,
#setting-data .data-maintenance-work-error span,
#setting-data .data-maintenance-work-placeholder span { color:#64748b; font-size:9px; font-weight:700; line-height:1.45; }
#setting-data .data-maintenance-work-error { border-color:#fecaca; background:#fffafa; }
#setting-data .data-maintenance-work-error strong { color:#b91c1c; }
#setting-data .data-maintenance-work-placeholder.is-warning { border-color:#fed7aa; background:#fffaf3; }
#setting-data .data-maintenance-work-chip-row { display:flex; flex-wrap:wrap; gap:6px; min-width:0; }
#setting-data .data-maintenance-work-chip {
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:26px;
  padding:0 9px;
  border:1px solid #e5e7eb;
  border-radius:999px;
  background:#fff;
  color:#475569;
  white-space:nowrap;
}
#setting-data .data-maintenance-work-chip strong { font-size:9px; font-weight:900; }
#setting-data .data-maintenance-work-chip em { color:#dc2626; font-size:9px; font-style:normal; font-weight:900; }
#setting-data .data-maintenance-work-summary-card {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 11px;
  border:1px solid #e5e7eb;
  border-radius:11px;
  background:#fff;
}
#setting-data .data-maintenance-work-summary-card strong { color:#1f2937; font-size:10px; font-weight:900; }
#setting-data .data-maintenance-work-summary-card span { color:#64748b; font-size:9px; font-weight:800; }
#setting-data .data-maintenance-work-actions { display:flex; justify-content:flex-end; gap:7px; }
#setting-data .data-maintenance-work-policy-grid { display:grid; grid-template-columns:1fr 1fr; gap:7px; }
#setting-data .data-maintenance-work-policy-grid > span {
  display:grid;
  gap:3px;
  min-width:0;
  padding:9px 10px;
  border:1px solid #e5e7eb;
  border-radius:10px;
  background:#fff;
}
#setting-data .data-maintenance-work-policy-grid strong { color:#1f2937; font-size:9px; font-weight:900; }
#setting-data .data-maintenance-work-policy-grid em { overflow:hidden; color:#64748b; font-size:9px; font-style:normal; font-weight:750; text-overflow:ellipsis; white-space:nowrap; }
@media (max-width: 640px) {
  #setting-data .data-maintenance-work-popover .data-maintenance-relation-summary,
  #setting-data .data-maintenance-work-policy-grid { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  #setting-data .data-maintenance-work-loading-dot { animation: none; }
}

/* Data Management work overlay: shared JH shell + local anchoring/size behavior. */
#setting-data .data-maintenance-work-popover.is-open {
  animation: data-maintenance-work-panel-enter .16s ease-out both;
}
@keyframes data-maintenance-work-panel-enter {
  from { opacity: 0; transform: translateX(-8px); }
  to { opacity: 1; transform: translateX(0); }
}
#setting-data .data-maintenance-work-popover[data-work-size="normal"] {
  --dm-work-popover-width: 520px;
}
#setting-data .data-maintenance-work-popover[data-work-size="wide"] {
  --dm-work-popover-width: 590px;
}
#setting-data .data-maintenance-work-popover[data-work-size="expanded"] {
  --dm-work-popover-width: 660px;
}
#setting-data .data-maintenance-tool-card.is-work-active {
  border-color: rgba(220,38,38,.42);
  background: linear-gradient(90deg, rgba(254,226,226,.62) 0%, #fff 48%);
  box-shadow: inset 3px 0 0 #dc2626;
}
#setting-data .data-maintenance-tool-card.is-work-active strong {
  color: #991b1b;
}
@media (max-width: 1180px) {
  #setting-data .data-maintenance-work-popover[data-work-size="normal"] { --dm-work-popover-width: 500px; }
  #setting-data .data-maintenance-work-popover[data-work-size="wide"] { --dm-work-popover-width: 555px; }
  #setting-data .data-maintenance-work-popover[data-work-size="expanded"] { --dm-work-popover-width: 610px; }
}
@media (max-width: 980px) {
  #setting-data .data-maintenance-work-popover {
    top: var(--dm-work-popover-top, 12px);
    right: auto;
    left: 4px;
    width: min(var(--dm-work-popover-width, 500px), calc(100% - 8px));
  }
  #setting-data .data-maintenance-work-popover[data-work-size="normal"] { --dm-work-popover-width: 480px; }
  #setting-data .data-maintenance-work-popover[data-work-size="wide"] { --dm-work-popover-width: 520px; }
  #setting-data .data-maintenance-work-popover[data-work-size="expanded"] { --dm-work-popover-width: 560px; }
}
@media (max-width: 640px) {
  #setting-data .data-maintenance-work-popover {
    top: var(--dm-work-popover-top, 10px);
    left: 8px;
    width: calc(100% - 16px);
  }
}
@media (prefers-reduced-motion: reduce) {
  #setting-data .data-maintenance-work-popover.is-open { animation: none; }
}

/* v57.00.69 · Read-only delete-plan precheck status. */
#setting-data .data-maintenance-work-policy-grid > span.is-warning {
  border-color: #fed7aa;
  background: #fffaf3;
}
#setting-data .data-maintenance-work-policy-grid > span.is-warning strong {
  color: #b45309;
}

/* v57.00.73 data trash bundle / restore */
#setting-data .data-maintenance-trash-tile {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  text-align: left;
  font: inherit;
}
#setting-data .data-maintenance-trash-tile:focus-visible {
  outline: 2px solid rgba(220,38,38,.28);
  outline-offset: 1px;
}
/* 공통 위험 버튼: v51.13에서 설정관리 안에 있던 전역 규칙을 역할 기준으로 이동 */
.btn.danger { background: #991b1b; border: 1px solid #f2c7c4; border-color: #991b1b; color: #fff; }
.btn.danger:hover { background: #7f1d1d; border-color: #7f1d1d; }
/* v51.22 labor management / fixed setting chips */
.setting-fixed-chip em {
  margin-left: 6px;
  color: #7b8794;
  font-style: normal;
}
.material-labor-card {
  margin: 14px 0;
}
.labor-section-title {
  align-items: center;
}
.labor-item-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, max-content));
}
.labor-item-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
  min-height: 44px;
}
.labor-card-main {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  flex-wrap: nowrap;
}
.labor-card-main strong {
  font-size: 14px;
  line-height: 1.25;
  word-break: keep-all;
  overflow-wrap: anywhere;
  min-width: 0;
}
.labor-card-main span {
  font-weight: 800;
  color: #b91c1c;
  white-space: nowrap;
}
.labor-card-actions {
  flex: 0 0 auto;
  gap: 5px;
}
.labor-item-modal .compact-form {
  grid-template-columns: 1fr;
}
.quote-labor-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, max-content));
  gap: 8px;
  margin: -4px 0 10px;
  padding: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fafafa;
}
.quote-labor-picker.hidden {
  display: none;
}
.quote-labor-pick-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 6px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 9px 11px;
  text-align: left;
  background: #fff;
  cursor: pointer;
  min-height: 40px;
}
.quote-labor-pick-card:hover {
  border-color: #111827;
}
.quote-labor-pick-card strong {
  font-size: 13px;
  line-height: 1.25;
  overflow-wrap: anywhere;
  min-width: 0;
}
.quote-labor-pick-card span {
  font-weight: 800;
  color: #b91c1c;
  white-space: nowrap;
}
/* v51.25 labor card wrapping + safe split polish */
.labor-item-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 8px;
  align-items: stretch;
}
.labor-item-card {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}
.labor-card-main {
  min-width: 0;
  overflow: hidden;
}
.labor-card-main strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.quote-labor-picker {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}
.quote-labor-pick-card {
  min-width: 0;
}
.quote-labor-pick-card strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (min-width: 1500px) {
  .labor-item-list {
    grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
  }
}
/* v51.26 labor/card/site detail refinement */
.labor-item-list {
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
}
.quote-labor-picker {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.labor-item-card,
.quote-labor-pick-card {
  overflow: hidden;
}

/* v56.03.88: labor responsive rules consolidated from labor-management-responsive.css */
@media (min-width: 1280px) {
  .labor-item-list,
  .quote-labor-picker {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
@media (max-width: 1279px) {
  .labor-item-list,
  .quote-labor-picker {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }
}
@media (max-width: 900px) {
  .labor-item-list,
  .quote-labor-picker {
    grid-template-columns: 1fr;
  }
}
/* v56.04.15: 노무비 카드/선택기 최종 밀도 규칙을 labor 도메인으로 귀속 */
.labor-item-list { gap: 8px !important; }
.labor-item-card { padding: 8px 10px !important; min-height: 40px !important; }
.labor-card-main { gap: 8px !important; }
.labor-card-main strong { font-size: 13px !important; }
.labor-card-main span { font-size: 13px !important; }
.labor-card-actions .btn.small, .labor-card-actions .mini-danger-btn { padding: 5px 8px !important; font-size: 12px !important; }
.material-labor-card { padding-top: 18px !important; padding-bottom: 18px !important; }
.detail-summary.site-detail-summary-compact {
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
.detail-summary.site-detail-summary-compact .mini-card {
  padding: 10px 12px;
  min-height: 54px;
}
.detail-summary.site-detail-summary-compact .mini-card span {
  font-size: 12px;
}
.detail-summary.site-detail-summary-compact .mini-card strong {
  font-size: 14px;
}
.grid-1, .site-basic-full {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.site-basic-full .card {
  width: 100%;
}
.site-always-edit-note {
  color: #64748b;
  font-size: 12px;
  margin-top: 4px;
}

/* v56.03.88: site detail summary consolidated from site-detail-summary.css */
/* v51.28: 현장 상세 견적서 내역처리 */
.quote-site-status-control {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  white-space: nowrap;
}
.quote-site-status-control .mini-select,
select.mini-select {
  height: 30px;
  min-width: 104px;
  border: 1px solid #d7dde8;
  border-radius: 10px;
  padding: 0 8px;
  background: #fff;
  font-size: 12px;
}
#siteQuoteBody tr.clickable-row { cursor: pointer; }
#siteQuoteBody tr.clickable-row:hover { background: #f8fafc; }

/* v51.33: 현장 상세 요약 카드 2줄 배치/장비 수량 색상 보정 */
.detail-summary.site-detail-summary-compact.site-summary-split {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}
.site-summary-row {
  display: grid;
  gap: 8px;
  width: 100%;
}
.site-summary-row-main {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.site-summary-row-sub {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.site-summary-split .mini-card {
  min-width: 0;
  padding: 9px 11px;
  min-height: 50px;
}
.site-summary-split .mini-card strong {
  display: block;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.site-summary-split .device-count-accent {
  color: #2563eb;
}
@media (max-width: 1280px) {
  .site-summary-row-main,
  .site-summary-row-sub {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .site-summary-row-main,
  .site-summary-row-sub {
    grid-template-columns: 1fr;
  }
}


/* v51.34: 현장 요약 카드 클릭형 팝업 */
.site-summary-row-main { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.site-summary-click-card {
  appearance: none;
  border: 1px solid #e5e7eb;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.site-summary-click-card:hover {
  border-color: #94a3b8;
  box-shadow: 0 6px 16px rgba(15, 23, 42, .08);
  transform: translateY(-1px);
}
.site-summary-click-card:active { transform: translateY(0); }
.site-summary-modal .table-wrap { max-height: 62vh; overflow: auto; }
.site-summary-modal-body .clickable-row { cursor: pointer; }
.site-summary-modal-body .clickable-row:hover { background: #f8fafc; }
@media (max-width: 1280px) {
  .site-summary-row-main { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .site-summary-row-main { grid-template-columns: 1fr; }
}

/* v51.35: 현장 요약 팝업 툴바 */
.site-summary-toolbar { display:flex; justify-content:flex-end; align-items:center; gap:8px; margin-bottom:10px; }
.site-summary-modal .quote-site-status-control { display:flex; align-items:center; gap:6px; justify-content:flex-end; }
.setting-fixed-chip { background:#f8fafc; border:1px dashed #cbd5e1; }
/* v51_54: 자재관리 목록 헤더 고정 */
#material .material-main-card {
  position: relative;
  overflow: visible;
}
#material .material-main-card > .section-title {
  position: sticky;
  top: 0;
  z-index: 24;
  background: #fff;
  padding-top: 8px;
  padding-bottom: 8px;
  margin-bottom: 0;
  border-bottom: 1px solid #eef2f7;
}
#material .material-main-card > .material-toolbar {
  position: sticky;
  top: 50px;
  z-index: 23;
  background: #fff;
  padding: 10px 0 12px;
  margin-bottom: 0;
  border-bottom: 1px solid #eef2f7;
}
@media (max-width: 760px) {
  #material .material-main-card > .section-title,
  #material .material-main-card > .material-toolbar {
    position: static;
  }
}
/* v51.59 업무일지 1차 */
.worklog-dashboard { grid-template-columns: repeat(6, minmax(0, 1fr)); margin-bottom: 18px; }
.worklog-top-actions { display:flex; align-items:center; gap:8px; }
.worklog-period-inline {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  min-height:38px;
  padding:0 13px;
  color:#35527d;
  border:1px solid #ccd9ed;
  border-radius:999px;
  background:#f4f8ff;
  font:inherit;
  cursor:pointer;
  white-space:nowrap;
}
.worklog-period-inline > span { font-size:10px; font-weight:750; opacity:.72; }
.worklog-period-inline > strong { font-size:11px; font-weight:900; }
.worklog-period-inline:hover { border-color:#9db5d8; background:#eaf2ff; }
.worklog-period-inline:focus-visible { outline:3px solid rgba(59,130,246,.18); outline-offset:2px; }
.worklog-dashboard .card { padding: 16px; text-align: left; }
.worklog-dashboard .dashboard-action-card.active { border-color:#111827; box-shadow:inset 0 2px 8px rgba(0,0,0,.12), 0 8px 18px rgba(15,23,42,.08); transform:translateY(1px); }

.worklog-main-card .table-wrap { max-height: 58vh; overflow:auto; }
.worklog-table td:nth-child(4) { white-space: normal; min-width: 360px; max-width: 560px; line-height: 1.45; }
.worklog-table .worklog-row { cursor:pointer; }
.worklog-table .worklog-row:hover { background:#f8fbff; }
.worklog-site-link { color:#111827; font-weight:800; text-decoration:none; cursor:pointer; }
.worklog-site-link:hover { color:#2563eb; text-decoration:underline; }
.worklog-date-badge { display:inline-flex; align-items:center; justify-content:center; min-width:58px; padding:6px 9px; border-radius:999px; font-size:12px; font-weight:800; border:1px solid transparent; }
.worklog-date-badge.stage-done { background:transparent; color:#374151; border-color:#e5e7eb; }
.worklog-date-badge.stage-visit { background:#dbeafe; color:#1d4ed8; }
.worklog-date-badge.stage-hold { background:#fee2e2; color:#b91c1c; }
.worklog-date-badge.stage-plan-ok { background:#fef9c3; color:#854d0e; }
.worklog-date-badge.stage-plan-soon { background:#ffedd5; color:#c2410c; }
.worklog-date-badge.stage-plan-today { background:#fee2e2; color:#b91c1c; }
.worklog-date-badge.stage-plan-overdue { background:#b91c1c; color:#fff; }
.worklog-ox { display:inline-flex; min-width:28px; justify-content:center; padding:4px 8px; border-radius:999px; background:#f3f4f6; color:#4b5563; font-weight:800; font-size:12px; }
.worklog-ox.yes { background:#dcfce7; color:#15803d; }
.worklog-modal-grid { display:grid; gap:18px; }
.worklog-edit-panel, .worklog-history-panel { border:1px solid #e5e7eb; border-radius:16px; padding:16px; background:#fff; }
.worklog-history-list { display:grid; gap:10px; max-height:62vh; overflow:auto; }
.worklog-history-item { border:1px solid #e5e7eb; border-radius:14px; padding:12px; background:#f9fafb; }
.worklog-history-head { display:flex; justify-content:space-between; gap:10px; align-items:center; margin-bottom:8px; }
.worklog-history-head strong { font-size:14px; }
.worklog-history-content { color:#374151; font-size:13px; line-height:1.5; white-space:pre-wrap; }
.worklog-period-quick { display:grid; grid-template-columns:repeat(4, 1fr); gap:10px; margin-bottom:14px; }
.period-chip, .month-chip { border:1px solid #d1d5db; background:#fff; color:#374151; border-radius:14px; padding:11px 10px; cursor:pointer; box-shadow:0 3px 8px rgba(15,23,42,.06); font-weight:800; }
.period-chip:hover, .month-chip:hover { background:#f8fbff; }
.period-chip.active, .month-chip.active { background:#111827; color:#fff; border-color:#111827; box-shadow:inset 0 2px 7px rgba(0,0,0,.22); transform:translateY(1px); }
.worklog-year-row { display:flex; align-items:center; justify-content:space-between; gap:10px; margin:12px 0; }
.worklog-month-grid { display:grid; grid-template-columns:repeat(4, 1fr); gap:10px; }
@media (max-width: 1180px) {
  .worklog-dashboard { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .worklog-modal-grid { grid-template-columns:1fr; }
}
@media (max-width: 720px) {
  .worklog-dashboard { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .worklog-period-quick, .worklog-month-grid { grid-template-columns:repeat(2, 1fr); }
}

/* v51.62 업무일지/견적서 카드·리스트 밀도 통일 */
.worklog-dashboard.compact-summary-row,
.quote-dashboard-6.compact-summary-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
}
.worklog-main-card .table-wrap { max-height: 60vh; overflow:auto; }
.worklog-table td:nth-child(1) { width: 82px; white-space: nowrap; }
.worklog-table td:nth-child(2) { width: 88px; white-space: nowrap; }
.worklog-table td:nth-child(3) { width: 170px; max-width: 220px; }
.worklog-table td:nth-child(4) { white-space: normal; min-width: 280px; max-width: 520px; line-height: 1.4; }
.worklog-table td:nth-child(5) { width: 100px; white-space: nowrap; }
.worklog-table td:nth-child(6), .worklog-table td:nth-child(7) { width: 58px; text-align:center; }
.worklog-date-badge { min-width: 54px; padding: 5px 8px; font-size: 12px; }
.worklog-ox { min-width: 24px; padding: 3px 7px; }
.site-summary-as-table .movement-history-table-wrap table { min-width: 900px; }
@media (max-width: 1280px) {
  }
@media (max-width: 720px) {
  }


/* v51.63 업무일지/견적서 카드·목록 밀도 재보정: 자재관리 상단 카드 기준 */
.worklog-dashboard.compact-summary-row,
.quote-dashboard-6.compact-summary-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
.worklog-dashboard.compact-summary-row .card,
.quote-dashboard-6.compact-summary-row .dashboard-action-card {
  padding: 9px 11px !important;
  min-height: 64px !important;
  border-radius: 12px !important;
  border: 1px solid #dbe4f0 !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .05) !important;
  background: #f8fafc !important;
}
.worklog-dashboard.compact-summary-row .card:nth-child(1),
.quote-dashboard-6.compact-summary-row .dashboard-action-card:nth-child(1) { background: #f0fdf4 !important; }
.worklog-dashboard.compact-summary-row .card:nth-child(2),
.quote-dashboard-6.compact-summary-row .dashboard-action-card:nth-child(2) { background: #fff7ed !important; }
.worklog-dashboard.compact-summary-row .card:nth-child(3),
.quote-dashboard-6.compact-summary-row .dashboard-action-card:nth-child(3) { background: #eff6ff !important; }
.worklog-dashboard.compact-summary-row .card:nth-child(4),
.quote-dashboard-6.compact-summary-row .dashboard-action-card:nth-child(4) { background: #f8fafc !important; }
.worklog-dashboard.compact-summary-row .card:nth-child(5),
.quote-dashboard-6.compact-summary-row .dashboard-action-card:nth-child(5) { background: #f8fafc !important; }
.worklog-dashboard.compact-summary-row .card:nth-child(6),
.quote-dashboard-6.compact-summary-row .dashboard-action-card:nth-child(6) { background: #fff7ed !important; }
.worklog-dashboard.compact-summary-row .card-title,
.quote-dashboard-6.compact-summary-row .card-title { font-size: 12px !important; margin-bottom: 3px !important; }
.worklog-dashboard.compact-summary-row .card-value,
.quote-dashboard-6.compact-summary-row .card-value { font-size: 18px !important; line-height: 1.05 !important; }
.worklog-dashboard.compact-summary-row .card-sub,
.quote-dashboard-6.compact-summary-row .card-sub { font-size: 11px !important; margin-top: 3px !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.worklog-dashboard.compact-summary-row .dashboard-action-card.active { border-color:#111827 !important; box-shadow:inset 0 2px 6px rgba(0,0,0,.12), 0 2px 8px rgba(15,23,42,.05) !important; transform:translateY(1px); }
.worklog-table th, .worklog-table td {  font-size: 12px !important; }
.worklog-table td:nth-child(4) { min-width: 260px; max-width: 520px; line-height: 1.35; }
.quote-main-card table th,
.quote-main-card table td { padding: 7px 8px !important; font-size: 12px; }
.quote-main-card .quote-row td { padding-top: 7px !important; padding-bottom: 7px !important; }
.site-summary-as-table tr.clickable-row { cursor: pointer; }
.site-summary-as-table tr.clickable-row:hover { background: #f8fbff; }
@media (max-width: 1280px) {
  .worklog-dashboard.compact-summary-row,
  .quote-dashboard-6.compact-summary-row { grid-template-columns: repeat(3, minmax(120px, 1fr)); }
}
@media (max-width: 720px) {
  .worklog-dashboard.compact-summary-row,
  .quote-dashboard-6.compact-summary-row { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
}


/* v51.64 업무일지 보정 */
.worklog-modal { max-height: 88vh; }
.worklog-table td:nth-child(4) { max-width: 620px !important; }
/* v51.75 공통 마감처리 카드 팝업 */
.common-finalize-box { max-width: 560px; }
.common-finalize-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.common-finalize-card { text-align: left; border: 1px solid #e2e8f0; border-radius: 18px; padding: 18px; cursor: pointer; background: #fff; box-shadow: 0 8px 18px rgba(15, 23, 42, .06); transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.common-finalize-card:hover { transform: translateY(-1px); box-shadow: 0 12px 24px rgba(15, 23, 42, .10); }
.common-finalize-card strong { display:block; font-size: 18px; margin-bottom: 8px; }
.common-finalize-card span { display:block; color:#64748b; font-size: 13px; line-height: 1.45; }
.common-finalize-card.complete { border-color: #b7d7c2; }
.common-finalize-card.complete strong { color:#166534; }
.common-finalize-card.cancel { border-color: #f0c4c4; }
.common-finalize-card.cancel strong { color:#991b1b; }
@media (max-width: 640px) { .common-finalize-grid { grid-template-columns: 1fr; } }


/* v51.76 planned 표시/마감팝업/견적카드 보정 */
.common-finalize-backdrop {
  position: fixed !important;
  inset: 0 !important;
  width: auto !important;
  height: auto !important;
  display: none;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(15,23,42,.45) !important;
  z-index: 5000 !important;
  padding: 20px;
}
.common-finalize-backdrop .common-finalize-box {
  width: min(560px, 92vw) !important;
  max-height: 86vh;
  overflow: auto;
}
.quote-dashboard-3.compact-summary-row {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px !important;
  margin-bottom: 10px !important;
}
.quote-dashboard-3.compact-summary-row .dashboard-action-card {
  padding: 9px 11px !important;
  min-height: 64px !important;
  border-radius: 12px !important;
  border: 1px solid #dbe4f0 !important;
  box-shadow: 0 2px 8px rgba(15,23,42,.05) !important;
  background: #f8fafc !important;
}
.quote-dashboard-3.compact-summary-row .dashboard-action-card:nth-child(1) { background: #eff6ff !important; }
.quote-dashboard-3.compact-summary-row .dashboard-action-card:nth-child(2) { background: #f0fdf4 !important; }
.quote-dashboard-3.compact-summary-row .dashboard-action-card:nth-child(3) { background: #fff7ed !important; }
.quote-dashboard-3.compact-summary-row .card-title { font-size: 12px !important; margin-bottom: 3px !important; }
.quote-dashboard-3.compact-summary-row .card-value { font-size: 18px !important; line-height: 1.05 !important; }
.quote-dashboard-3.compact-summary-row .card-sub { font-size: 11px !important; margin-top: 3px !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 720px) {
  .quote-dashboard-3.compact-summary-row { grid-template-columns: repeat(2, minmax(120px, 1fr)) !important; }
}
/* v52.1: 입출금/비용처리 1차 구현 */
.money-dashboard,
.expense-dashboard {
  margin-bottom: 16px;
}
.money-main-card,
.expense-main-card {
  overflow: hidden;
}
.money-toolbar .search-box,
.expense-toolbar .search-box {
  width: 100%;
  display: grid;
  grid-template-columns: 150px 150px 150px minmax(220px, 1fr);
  gap: 10px;
}
.money-toolbar select,
.expense-toolbar select,
.money-toolbar input,
.expense-toolbar input {
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 10px;
  font-size: 14px;
  background: #fff;
}
.money-table th,
.money-table td {
  white-space: nowrap;
  vertical-align: middle;
}
.money-table td:nth-child(5) {
  min-width: 220px;
  white-space: normal;
}
.money-type-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  color: #334155;
}
.money-type-chip.income {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}
.money-type-chip.expense {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #c2410c;
}
.money-balance {
  color: #dc2626;
  font-weight: 900;
}
.money-modal .form-field input[readonly] {
  background: #f8fafc;
  color: #334155;
  font-weight: 800;
}
.money-modal textarea {
  min-height: 90px;
}
.money-modal-note {
  margin-top: 4px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
}
@media (max-width: 1100px) {
  .money-toolbar .search-box,
  .expense-toolbar .search-box {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 720px) {
  .money-toolbar .search-box,
  .expense-toolbar .search-box {
    grid-template-columns: 1fr;
  }
}
.money-table .right { text-align: right; }
/* v52.2: 메인/입출금/비용처리 요약카드 - 자재관리 compact 타입 통일 */
.dashboard-summary.compact-summary-row,
.money-dashboard.compact-summary-row,
.expense-dashboard.compact-summary-row {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}
.dashboard-summary.grid-4,
.money-dashboard.grid-4,
.expense-dashboard.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.dashboard-summary.compact-summary-row .card,
.money-dashboard.compact-summary-row .dashboard-action-card,
.expense-dashboard.compact-summary-row .dashboard-action-card {
  padding: 9px 11px !important;
  min-height: 64px !important;
  border-radius: 12px !important;
  border: 1px solid #dbe4f0 !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .05) !important;
  background: #f8fafc !important;
}
.dashboard-summary.compact-summary-row .card:nth-child(1),
.money-dashboard.compact-summary-row .dashboard-action-card:nth-child(1),
.expense-dashboard.compact-summary-row .dashboard-action-card:nth-child(1) { background: #f0fdf4 !important; }
.dashboard-summary.compact-summary-row .card:nth-child(2),
.money-dashboard.compact-summary-row .dashboard-action-card:nth-child(2),
.expense-dashboard.compact-summary-row .dashboard-action-card:nth-child(2) { background: #fff7ed !important; }
.dashboard-summary.compact-summary-row .card:nth-child(3),
.money-dashboard.compact-summary-row .dashboard-action-card:nth-child(3),
.expense-dashboard.compact-summary-row .dashboard-action-card:nth-child(3) { background: #eff6ff !important; }
.dashboard-summary.compact-summary-row .card:nth-child(4),
.money-dashboard.compact-summary-row .dashboard-action-card:nth-child(4),
.expense-dashboard.compact-summary-row .dashboard-action-card:nth-child(4) { background: #f8fafc !important; }
.dashboard-summary.compact-summary-row .card:nth-child(5),
.money-dashboard.compact-summary-row .dashboard-action-card:nth-child(5) { background: #f8fafc !important; }
.dashboard-summary.compact-summary-row .card:nth-child(6),
.money-dashboard.compact-summary-row .dashboard-action-card:nth-child(6) { background: #fff7ed !important; }
.dashboard-summary.compact-summary-row .card-title,
.money-dashboard.compact-summary-row .card-title,
.expense-dashboard.compact-summary-row .card-title { font-size: 12px !important; margin-bottom: 3px !important; }
.dashboard-summary.compact-summary-row .card-value,
.money-dashboard.compact-summary-row .card-value,
.expense-dashboard.compact-summary-row .card-value { font-size: 18px !important; line-height: 1.05 !important; }
.dashboard-summary.compact-summary-row .card-sub,
.money-dashboard.compact-summary-row .card-sub,
.expense-dashboard.compact-summary-row .card-sub {
  font-size: 11px !important;
  margin-top: 3px !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.money-dashboard.compact-summary-row .dashboard-action-card:hover,
.expense-dashboard.compact-summary-row .dashboard-action-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(15,23,42,.08) !important;
}
@media (max-width: 1180px) {
  .dashboard-summary.grid-4,
  .money-dashboard.grid-4,
  .expense-dashboard.grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .dashboard-summary.grid-4,
  .money-dashboard.grid-4,
  .expense-dashboard.grid-4 { grid-template-columns: 1fr; }
}
/* v52.3: 입출금 요약카드 PC 1줄 표시 + 추가 소형화 */
@media (min-width: 981px) {
  .money-dashboard.grid-4 {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  }
  .money-dashboard.compact-summary-row {
    gap: 6px !important;
    margin-bottom: 8px !important;
  }
  .money-dashboard.compact-summary-row .dashboard-action-card {
    padding: 7px 8px !important;
    min-height: 52px !important;
    border-radius: 10px !important;
  }
  .money-dashboard.compact-summary-row .card-title {
    font-size: 11px !important;
    margin-bottom: 2px !important;
  }
  .money-dashboard.compact-summary-row .card-value {
    font-size: 15px !important;
    line-height: 1.02 !important;
    letter-spacing: -0.04em;
  }
  .money-dashboard.compact-summary-row .card-sub {
    font-size: 10px !important;
    margin-top: 2px !important;
  }
}
@media (max-width: 980px) {
  .money-dashboard.grid-4 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 720px) {
  .money-dashboard.grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 430px) {
  .money-dashboard.grid-4 {
    grid-template-columns: 1fr !important;
  }
}

/* v52.5: 매출관리 분리 + 입출금 자동장부 정렬 */
.revenue-dashboard {
  margin-bottom: 10px;
}
.revenue-main-card {
  overflow: hidden;
}
.revenue-toolbar .search-box {
  width: 100%;
  display: grid;
  grid-template-columns: 140px 150px minmax(220px, 1fr);
  gap: 10px;
}
.ledger-search-box {
  grid-template-columns: 140px 150px minmax(220px, 1fr) !important;
}
.revenue-toolbar select,
.revenue-toolbar input {
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 10px;
  font-size: 14px;
  background: #fff;
}
.completed-money-row {
  opacity: .62;
  background: #f8fafc;
}
.money-in {
  color: #15803d;
  font-weight: 900;
}
.money-out {
  color: #c2410c;
  font-weight: 900;
}
.ledger-table td:nth-child(4),
.revenue-table td:nth-child(4),
.expense-table td:nth-child(5) {
  min-width: 220px;
  white-space: normal;
}
@media (min-width: 981px) {
  }
@media (max-width: 1100px) {
  .revenue-toolbar .search-box {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ledger-search-box {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 980px) {
  .revenue-dashboard.grid-4 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 720px) {
  .revenue-toolbar .search-box,
  .ledger-search-box {
    grid-template-columns: 1fr !important;
  }
  .revenue-dashboard.grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 430px) {
  .revenue-dashboard.grid-4 {
    grid-template-columns: 1fr !important;
  }
}


/* v52.6: 매출/매입/입출금 재정렬 및 매입관리 명칭 반영 */
@media (min-width: 981px) {
  .revenue-dashboard.grid-4,
  .expense-dashboard.grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}
.revenue-toolbar .search-box {
  grid-template-columns: 140px 150px minmax(220px, 1fr);
}

/* v52.7: 매출/매입/입출금 용어·장부·계산서 첨부 정리 */
@media (min-width: 981px) {
  .expense-dashboard.grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
  .expense-dashboard.compact-summary-row {
    gap: 6px !important;
    margin-bottom: 8px !important;
  }
  .expense-dashboard.compact-summary-row .dashboard-action-card {
    padding: 7px 8px !important;
    min-height: 52px !important;
    border-radius: 10px !important;
  }
  .expense-dashboard.compact-summary-row .card-title {
    font-size: 11px !important;
    margin-bottom: 2px !important;
  }
  .expense-dashboard.compact-summary-row .card-value {
    font-size: 15px !important;
    line-height: 1.02 !important;
    letter-spacing: -0.04em;
  }
  .expense-dashboard.compact-summary-row .card-sub {
    font-size: 10px !important;
    margin-top: 2px !important;
  }
}
.expense-toolbar .search-box {
  grid-template-columns: 150px 150px 150px minmax(220px, 1fr);
}
.ledger-direction-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 4px;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  background: rgba(255,255,255,.72);
  border: 1px solid currentColor;
}
.tax-cell {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  min-width: 92px;
}
.tax-date-text {
  color: #64748b;
  line-height: 1.1;
}
.invoice-preview-btn {
  padding: 0;
  font-size: 12px;
}
.money-detail-body {
  display: grid;
  gap: 12px;
}
.money-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.money-detail-line {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f8fafc;
  padding: 9px 10px;
  min-width: 0;
}
.money-detail-line span {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  color: #64748b;
  font-weight: 800;
}
.money-detail-line strong {
  display: block;
  font-size: 13px;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.money-detail-attachment {
  display: flex;
  justify-content: flex-end;
}
.money-detail-memo {
  min-height: 72px;
  white-space: pre-wrap;
}
.ledger-table td:nth-child(3),
.revenue-table td:nth-child(4),
.expense-table td:nth-child(3) {
  min-width: 220px;
  white-space: normal;
}
@media (max-width: 900px) {
  .money-detail-grid {
    grid-template-columns: 1fr;
  }
}
.ledger-table td:nth-child(5),
.expense-table td:nth-child(5) {
  min-width: auto;
  white-space: nowrap;
}


/* v52.8: 매출/매입 카드 총액 + 남은금액 중심 3카드 정리 */
.revenue-dashboard.grid-3,
.expense-dashboard.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}
.revenue-dashboard.compact-summary-row .dashboard-action-card:nth-child(3),
.expense-dashboard.compact-summary-row .dashboard-action-card:nth-child(3) {
  background: #fff7ed !important;
}
@media (min-width: 981px) {
  .revenue-dashboard.grid-3,
  .expense-dashboard.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
  .revenue-dashboard.compact-summary-row,
  .expense-dashboard.compact-summary-row {
    gap: 6px !important;
    margin-bottom: 8px !important;
  }
  .revenue-dashboard.compact-summary-row .dashboard-action-card,
  .expense-dashboard.compact-summary-row .dashboard-action-card {
    padding: 7px 8px !important;
    min-height: 52px !important;
    border-radius: 10px !important;
  }
  .revenue-dashboard.compact-summary-row .card-title,
  .expense-dashboard.compact-summary-row .card-title {
    font-size: 11px !important;
    margin-bottom: 2px !important;
  }
  .revenue-dashboard.compact-summary-row .card-value,
  .expense-dashboard.compact-summary-row .card-value {
    line-height: 1.02 !important;
  }
  .revenue-dashboard.compact-summary-row .card-sub,
  .expense-dashboard.compact-summary-row .card-sub {
    font-size: 10px !important;
    margin-top: 2px !important;
  }
}
@media (max-width: 980px) {
  .revenue-dashboard.grid-3,
  .expense-dashboard.grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 430px) {
  .revenue-dashboard.grid-3,
  .expense-dashboard.grid-3 {
    grid-template-columns: 1fr !important;
  }
}
/* v52.10: 업무일지/매출·매입 화면 폭 정리 */
.worklog-table th,
.worklog-table td {
  overflow: hidden;
}
.worklog-table th:nth-child(1),
.worklog-table td:nth-child(1) { width: 82px; }
.worklog-table th:nth-child(2),
.worklog-table td:nth-child(2) { width: 92px; }
.worklog-table th:nth-child(3),
.worklog-table td:nth-child(3) {
  width: 280px !important;
  max-width: 280px !important;
}
.worklog-table th:nth-child(4),
.worklog-table td:nth-child(4) {
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
}
.worklog-table th:nth-child(5),
.worklog-table td:nth-child(5) { width: 96px; }
.worklog-table th:nth-child(6),
.worklog-table td:nth-child(6),
.worklog-table th:nth-child(7),
.worklog-table td:nth-child(7) { width: 58px; text-align: center; }
.worklog-site-link {
  display: block;
  max-width: 100%;
  white-space: normal !important;
  overflow-wrap: anywhere;
  word-break: keep-all;
  line-height: 1.35;
}
.worklog-table td:nth-child(4) {
  overflow-wrap: anywhere;
  word-break: keep-all;
}
.revenue-dashboard.compact-summary-row,
.expense-dashboard.compact-summary-row {
  min-width: 0;
}
.revenue-dashboard.compact-summary-row .dashboard-action-card,
.expense-dashboard.compact-summary-row .dashboard-action-card {
  min-width: 0;
  overflow: hidden;
}
.revenue-dashboard.compact-summary-row .card-title,
.revenue-dashboard.compact-summary-row .card-value,
.expense-dashboard.compact-summary-row .card-title,
.expense-dashboard.compact-summary-row .card-value {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.revenue-toolbar .search-box {
  grid-template-columns: 150px minmax(320px, 1fr) !important;
}
.expense-toolbar .search-box {
  grid-template-columns: 150px 180px minmax(320px, 1fr) !important;
}
.revenue-toolbar input,
.expense-toolbar input {
  min-width: 0;
  width: 100%;
}
@media (max-width: 1100px) {
  .revenue-toolbar .search-box,
  .expense-toolbar .search-box {
    grid-template-columns: 1fr !important;
  }
  .worklog-table th:nth-child(3),
  .worklog-table td:nth-child(3) {
    width: 220px !important;
    max-width: 220px !important;
  }
}
@media (max-width: 760px) {
  .worklog-table {
    table-layout: auto;
  }
  .worklog-table th:nth-child(3),
  .worklog-table td:nth-child(3) {
    width: 190px !important;
    max-width: 190px !important;
  }
}
/* v52.11: 매입 품목 행/자재 선택 + 상단 카드 높이 통일 */
.purchase-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.purchase-item-wrap {
  max-height: 260px;
  overflow: auto;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
}
.purchase-item-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  font-size: 12px;
}
.purchase-item-table th,
.purchase-item-table td {
  border-bottom: 1px solid #e5e7eb;
  padding: 7px 8px;
  vertical-align: middle;
  white-space: nowrap;
}
.purchase-item-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 800;
}
.purchase-item-table input {
  width: 100%;
  min-width: 0;
  border: 1px solid #d1d5db;
  border-radius: 9px;
  padding: 7px 8px;
  font-size: 12px;
}
.purchase-item-table th:nth-child(1),
.purchase-item-table td:nth-child(1) { min-width: 180px; }
.purchase-item-table th:nth-child(2),
.purchase-item-table td:nth-child(2) { min-width: 170px; }
.purchase-item-table th:nth-child(3),
.purchase-item-table td:nth-child(3) { width: 76px; }
.purchase-item-table th:nth-child(4),
.purchase-item-table td:nth-child(4) { width: 82px; }
.purchase-item-table th:nth-child(5),
.purchase-item-table td:nth-child(5) { width: 120px; }
.purchase-item-table th:nth-child(6),
.purchase-item-table td:nth-child(6) { width: 120px; }
.purchase-item-table th:nth-child(7),
.purchase-item-table td:nth-child(7) { width: 86px; text-align: center; }
.purchase-item-table th:nth-child(8),
.purchase-item-table td:nth-child(8) { width: 92px; text-align: center; }
.purchase-item-table th:nth-child(9),
.purchase-item-table td:nth-child(9) { width: 72px; text-align: center; }
.purchase-material-picker-modal { width: min(980px, 96vw); max-height: 88vh; }
.purchase-material-toolbar { margin-bottom: 10px; }
.purchase-material-toolbar .search-box { width: 100%; display: grid; grid-template-columns: minmax(240px, 1fr); }
.purchase-material-toolbar input { border:1px solid #d1d5db; border-radius:10px; padding:10px; }
.purchase-material-picker-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 56vh;
  overflow: auto;
  padding: 2px;
}
.purchase-material-pick {
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  display: grid;
  gap: 3px;
  min-width: 0;
}
.purchase-material-pick:hover { border-color: #2563eb; background: #eff6ff; }
.purchase-material-pick strong { color: #111827; font-size: 13px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.purchase-material-pick span,
.purchase-material-pick em { color: #64748b; font-size: 12px; font-style: normal; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.money-detail-items { border:1px solid #e5e7eb; border-radius: 14px; overflow: hidden; }
.money-detail-items h3 { margin: 0; padding: 10px 12px; font-size: 14px; background:#f8fafc; border-bottom:1px solid #e5e7eb; }
.money-detail-items .purchase-item-table { min-width: 720px; }
@media (max-width: 720px) {
  .purchase-material-picker-list { grid-template-columns: 1fr; }
}

@media (min-width: 981px) {
  .worklog-dashboard.compact-summary-row,
  .quote-dashboard-3.compact-summary-row,
  .material-dashboard.compact-summary-row {
    gap: 6px !important;
    margin-bottom: 8px !important;
  }
  .worklog-dashboard.compact-summary-row .dashboard-action-card,
  .quote-dashboard-3.compact-summary-row .dashboard-action-card,
  .material-dashboard.compact-summary-row .dashboard-action-card,
  .material-dashboard.compact-summary-row > .card {
    padding: 7px 8px !important;
    min-height: 52px !important;
    border-radius: 10px !important;
    border: 1px solid #dbe4f0 !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .05) !important;
  }
  .worklog-dashboard.compact-summary-row .card-title,
  .quote-dashboard-3.compact-summary-row .card-title,
  .material-dashboard.compact-summary-row .card-title {
    font-size: 11px !important;
    margin-bottom: 2px !important;
  }
  .worklog-dashboard.compact-summary-row .card-value,
  .quote-dashboard-3.compact-summary-row .card-value,
  .material-dashboard.compact-summary-row .card-value {
    font-size: 15px !important;
    line-height: 1.02 !important;
    letter-spacing: -0.04em;
  }
  .worklog-dashboard.compact-summary-row .card-sub,
  .quote-dashboard-3.compact-summary-row .card-sub,
  .material-dashboard.compact-summary-row .card-sub {
    font-size: 10px !important;
    margin-top: 2px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .worklog-dashboard.grid-4 { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; }
  .material-dashboard.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
}

/* v52.13: 매입관리 리스트/필터/행 클릭 정리 */
.expense-toolbar .search-box {
  grid-template-columns: 180px minmax(360px, 1fr) !important;
}
.expense-table th,
.expense-table td {
  padding-top: 6px !important;
  padding-bottom: 6px !important;
  font-size: 12px !important;
}
.expense-table .purchase-click-row {
  cursor: pointer;
}
.expense-table .purchase-click-row:hover {
  background: #f8fafc;
}
.expense-table td:nth-child(3) {
  line-height: 1.28;
}
@media (max-width: 1100px) {
  .expense-toolbar .search-box {
    grid-template-columns: 1fr !important;
  }
}

/* v52.14: 매출/매입 계산서 날짜 단순화 + 매출 행 클릭 수정 */
.tax-cell.tax-date-only {
  min-width: 78px;
  gap: 2px;
}
.tax-cell.tax-date-only .tax-date-text {
  font-weight: 700;
  color: #334155;
}
.revenue-table .revenue-click-row {
  cursor: pointer;
}
.revenue-table .revenue-click-row:hover {
  background: #f8fafc;
}
.revenue-toolbar .search-box {
  grid-template-columns: minmax(360px, 1fr) !important;
}
.revenue-table th,
.revenue-table td {
  padding-top: 6px !important;
  padding-bottom: 6px !important;
  font-size: 12px !important;
}
@media (max-width: 900px) {
  .revenue-toolbar .search-box {
    grid-template-columns: 1fr !important;
  }
}

/* v52.15: 매출관리 현장/견적서 연동 선택 UI */
.inline-picker-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
}
.inline-picker-row input[readonly] {
  cursor: pointer;
}
.money-site-picker-modal .quote-address-picker-list {
  max-height: 62vh;
  overflow: auto;
}
#moneyQuoteSelect:disabled {
  background: #f8fafc;
  color: #64748b;
}

/* v52.16: 매출 수동등록 복구 / 자동연동 잠금 / 입출금·업무일지 시인성 정리 */
.money-modal .locked-field,
.money-modal input.locked-field,
.money-modal select.locked-field {
  background: #f3f4f6 !important;
  color: #6b7280 !important;
  cursor: not-allowed !important;
  border-color: #e5e7eb !important;
}
.money-lock-note {
  margin-top: 6px;
  color: #6b7280;
}
.ledger-table .ledger-row {
  cursor: pointer;
}
.ledger-table .ledger-row:hover {
  background: #f8fbff;
}
.ledger-table th,
.ledger-table td {
  padding-top: 7px !important;
  padding-bottom: 7px !important;
}
.ledger-search-box {
  grid-template-columns: 140px minmax(260px, 1fr) !important;
}
.worklog-table .completed-worklog-row {
  background: #f3f4f6 !important;
  color: #4b5563;
  filter: grayscale(1);
  opacity: .78;
}
.worklog-table .completed-worklog-row:hover {
  background: #e5e7eb !important;
}
.worklog-table .completed-worklog-row .worklog-site-link,
.worklog-table .completed-worklog-row .worklog-date-badge,
.worklog-table .completed-worklog-row .worklog-ox {
  color: #374151 !important;
  border-color: #d1d5db !important;
  background: #e5e7eb !important;
}

/* v52.18 일괄 매출/매입 현장 연결 */
.money-linked-sites-section { border: 1px solid #e5e7eb; border-radius: 14px; padding: 12px; background: #f8fafc; }
.money-linked-sites-list { display: flex; flex-wrap: wrap; gap: 8px; min-height: 36px; align-items: center; }
.money-linked-site-chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 9px; border: 1px solid #cbd5e1; border-radius: 999px; background: #fff; max-width: 100%; }
.money-linked-site-chip strong { font-size: 12px; color: #0f172a; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.money-linked-site-chip em { font-style: normal; font-size: 11px; color: #64748b; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.money-linked-site-chip button { width: 20px; height: 20px; border: 0; border-radius: 50%; background: #e2e8f0; color: #334155; cursor: pointer; line-height: 20px; }
.money-linked-site-chip button:hover { background: #fecaca; color: #991b1b; }
.quote-address-result.selected { border-color: #2563eb; background: #eff6ff; }
.quote-address-result.disabled,
.quote-address-result:disabled {
  cursor: not-allowed;
  opacity: .62;
  background: #f8fafc;
  border-color: #e2e8f0;
}
.quote-address-result.disabled:hover,
.quote-address-result:disabled:hover {
  background: #f8fafc;
  border-color: #e2e8f0;
}
.quote-address-result.disabled .quote-address-result-main span,
.quote-address-result:disabled .quote-address-result-main span {
  color: #475569;
  background: #e2e8f0;
}
.money-type-chip.bulk { background: #111827; color: #fff; margin-right: 4px; }
.money-bulk-help { padding: 8px 12px; border-top: 1px solid #e5e7eb; background: #f8fafc; }
@media (max-width: 720px) {
  .money-linked-site-chip { width: 100%; justify-content: space-between; border-radius: 12px; }
}

/* v52.24: 일괄매출/일괄매입 현장 선택 팝업 compact + 안전 닫기 UX */
#moneySitePickerModal.bulk-site-picker-mode .money-site-picker-modal {
  max-width: 980px;
}
#moneySitePickerModal.bulk-site-picker-mode .money-site-picker-list {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 7px;
}
#moneySitePickerModal.bulk-site-picker-mode .quote-address-result.money-site-result-compact {
  border-radius: 11px;
  padding: 8px 10px;
  min-height: 0;
}
#moneySitePickerModal.bulk-site-picker-mode .quote-address-result-main {
  margin-bottom: 3px;
  gap: 6px;
}
#moneySitePickerModal.bulk-site-picker-mode .quote-address-result-main strong {
  font-size: 13px;
  line-height: 1.25;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#moneySitePickerModal.bulk-site-picker-mode .quote-address-result-main span {
  font-size: 10px;
  padding: 2px 6px;
}
#moneySitePickerModal.bulk-site-picker-mode .quote-address-result-sub {
  font-size: 11px;
  line-height: 1.28;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#moneySitePickerModal.bulk-site-picker-mode .money-site-compact-meta {
  color: #475569;
}
#moneySitePickerModal.bulk-site-picker-mode .modal-actions .btn {
  min-width: 96px;
}
@media (max-width: 720px) {
  #moneySitePickerModal.bulk-site-picker-mode .money-site-picker-list {
    grid-template-columns: 1fr;
  }
  #moneySitePickerModal.bulk-site-picker-mode .quote-address-result-main strong {
    max-width: 62vw;
  }
}
/* v52.26: 업무공유 UI skeleton */
.share-dashboard.compact-summary-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
.share-dashboard.compact-summary-row .card {
  padding: 9px 11px;
  min-height: 64px;
  border-radius: 12px;
  border: 1px solid #dbe4f0;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .05);
}
.share-dashboard.compact-summary-row .card-title { font-size: 12px; margin-bottom: 3px; }
.share-dashboard.compact-summary-row .card-value { font-size: 18px; line-height: 1.05; }
.share-dashboard.compact-summary-row .card-sub { font-size: 11px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.share-dashboard.compact-summary-row .card:nth-child(1) { background: #eff6ff; }
.share-dashboard.compact-summary-row .card:nth-child(2) { background: #fff7ed; }
.share-dashboard.compact-summary-row .card:nth-child(3) { background: #f0fdf4; }
.share-dashboard.compact-summary-row .card:nth-child(4) { background: #eef2ff; }
.share-dashboard.compact-summary-row .card:nth-child(5) { background: #fff1f2; }
.share-dashboard.compact-summary-row .card:nth-child(6) { background: #f8fafc; }
.share-type-card { min-width: 0; }
.share-main-card .section-title { align-items: flex-start; }
.share-table { font-size: 12px; }
.share-table th,
.share-table td { padding: 8px 9px; }
.share-table th:nth-child(2), .share-table td:nth-child(2),
.share-table th:nth-child(6), .share-table td:nth-child(6),
.share-table th:nth-child(7), .share-table td:nth-child(7),
.share-table th:nth-child(8), .share-table td:nth-child(8),
.share-table th:nth-child(9), .share-table td:nth-child(9) { text-align: center; }
.share-toolbar .search-box select { max-width: 180px; }
.share-draft-modal .card { box-shadow: none; }
.share-draft-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(250px, .75fr);
  gap: 12px;
  margin-bottom: 12px;
}
.share-draft-form-card,
.share-draft-side-card,
.share-draft-link-card { padding: 14px; border-radius: 15px; }
.share-form-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.share-safe-list { list-style: none; display: grid; gap: 8px; }
.share-safe-list li {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 10px 11px;
  background: #f8fafc;
}
.share-safe-list strong { display: block; font-size: 13px; margin-bottom: 3px; }
.share-safe-list span { display: block; color: #64748b; font-size: 12px; line-height: 1.35; }
.share-chip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.share-chip {
  border: 1px solid #dbe4f0;
  background: #fff;
  border-radius: 12px;
  padding: 9px 10px;
  font-size: 12px;
  font-weight: 800;
  color: #334155;
  cursor: pointer;
  text-align: left;
}
.share-chip:hover { border-color: #94a3b8; background: #f8fafc; }
.share-placeholder-box {
  border: 1px dashed #cbd5e1;
  background: #f8fafc;
  border-radius: 14px;
  padding: 14px;
  color: #475569;
}
.share-placeholder-box strong { display: block; margin-bottom: 5px; color: #0f172a; }
.share-placeholder-box p { font-size: 12px; line-height: 1.5; }
@media (max-width: 1280px) {
  .share-dashboard.compact-summary-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .share-draft-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .share-dashboard.compact-summary-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .share-form-grid { grid-template-columns: 1fr; }
  .share-form-grid .span-2 { grid-column: span 1; }
  .share-toolbar .search-box { flex-direction: column; align-items: stretch; }
  .share-toolbar .search-box select { max-width: none; }
}
@media (max-width: 520px) {
  .share-dashboard.compact-summary-row { grid-template-columns: 1fr; }
}
/* v52.28 안정화: 잠금 날짜/고급옵션/자재선택 필터 정리 */
.locked-field,
input.locked-field,
select.locked-field,
textarea.locked-field {
  background: #f3f4f6 !important;
  color: #6b7280 !important;
  cursor: not-allowed !important;
}
.worklog-address-book-field .input-button input[readonly] {
  background: #f8fafc;
}
.money-advanced-options {
  margin-top: 6px;
  padding: 6px 8px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f9fafb;
}
.money-advanced-options summary {
  cursor: pointer;
  color: #6b7280;
  font-size: 12px;
  font-weight: 700;
  list-style: none;
}
.money-advanced-options summary::-webkit-details-marker { display: none; }
.money-advanced-options[open] summary { margin-bottom: 6px; color: #374151; }
.money-advanced-check,
.purchase-taxfree-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #f9fafb;
  color: #6b7280;
  font-size: 12px;
  white-space: nowrap;
}
.purchase-taxfree-chip input { margin: 0; }
.purchase-material-toolbar .search-box select#purchaseMaterialCategoryFilter {
  max-width: 160px;
  flex: 0 0 150px;
}

/* v52.29 업무일지/매입 안정화 보강 */
.worklog-stage-notice {
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.45;
  border: 1px solid #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}
.worklog-stage-notice.info {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}
.purchase-material-toolbar .search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  width: 100%;
}
.purchase-material-toolbar .search-box select {
  flex: 0 0 150px;
  min-width: 130px;
}
.purchase-material-toolbar .search-box input {
  flex: 1 1 auto;
  min-width: 180px;
}
.money-direct-edit-line {
  margin-top: 6px;
  justify-content: flex-start;
  opacity: .78;
}
.money-direct-edit-line:hover {
  opacity: 1;
}
.purchase-taxfree-chip.vat-included {
  min-width: 74px;
  justify-content: center;
}
@media (max-width: 720px) {
  .purchase-material-toolbar .search-box { flex-wrap: wrap; }
  .purchase-material-toolbar .search-box select,
  .purchase-material-toolbar .search-box input { flex: 1 1 100%; min-width: 0; }
}


/* v52.30 매입 폼 UI 복구/정리 */
.money-balance-field {
  position: relative;
}
.money-direct-edit-toggle {
  margin-top: 7px;
  min-height: 30px;
  padding: 6px 12px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #f9fafb;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.money-direct-edit-toggle::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #cbd5e1;
  display: inline-block;
}
.money-direct-edit-toggle:hover {
  background: #f1f5f9;
  color: #334155;
}
.money-direct-edit-toggle.active {
  border-color: #111827;
  background: #111827;
  color: #fff;
  box-shadow: 0 6px 16px rgba(17, 24, 39, .16);
}
.money-direct-edit-toggle.active::before {
  background: #ef4444;
}
.purchase-vat-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 28px;
  padding: 4px 7px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #f9fafb;
  color: #475569;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}
.purchase-vat-inline input {
  width: auto !important;
  min-width: 0 !important;
  margin: 0;
  padding: 0;
}
.purchase-vat-inline:hover {
  background: #f1f5f9;
  border-color: #d1d5db;
}

/* v52.31 매입 폼 재정리: VAT 헤더 체크 + 누적액 버튼 위치 */
.money-paid-label {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.money-paid-label-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}
.money-paid-label .money-direct-edit-toggle {
  margin-top: 0;
  min-height: 24px;
  padding: 4px 9px;
  font-size: 11px;
}
.purchase-vat-header {
  white-space: nowrap;
}
.purchase-vat-header > span {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}
.purchase-vat-header-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 5px;
  vertical-align: middle;
  cursor: pointer;
}
.purchase-vat-header-check input {
  width: 14px !important;
  min-width: 14px !important;
  height: 14px;
  margin: 0;
  padding: 0;
}
#moneyPaidHistoryInfo:empty {
  display: none;
}


/* v52.32 매입 VAT 헤더/누적액 버튼 재정리 */
.money-paid-label-row {
  display: flex !important;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin-bottom: 5px;
  min-height: 24px;
}
.money-paid-label-row .money-paid-label {
  display: inline-flex !important;
  align-items: center;
  margin: 0;
  width: auto;
  flex: 0 0 auto;
}
.money-paid-label-row .money-direct-edit-toggle {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  margin: 0;
  min-height: 24px;
  padding: 4px 9px;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}
.purchase-item-table th.purchase-vat-header {
  padding-left: 6px;
  padding-right: 6px;
}
.purchase-vat-header-inner {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 5px;
  white-space: nowrap !important;
  width: max-content;
  max-width: 100%;
  line-height: 1;
}
.purchase-vat-header-inner > span {
  display: inline-flex !important;
  align-items: center;
  white-space: nowrap !important;
  line-height: 1;
}
.purchase-vat-header-inner .purchase-vat-header-check {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto;
  margin: 0 !important;
  padding: 0;
  line-height: 1;
  vertical-align: middle;
}
.purchase-vat-header-inner .purchase-vat-header-check input {
  display: inline-block !important;
  width: 13px !important;
  min-width: 13px !important;
  height: 13px !important;
  margin: 0 !important;
  padding: 0 !important;
  vertical-align: middle;
}
/* v52.35 settings gateway / split settings / user admin */
.settings-gateway-backdrop {
  position: fixed !important;
  inset: 0 !important;
  width: auto !important;
  height: auto !important;
  display: none;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(15,23,42,.45) !important;
  z-index: 6000 !important;
  padding: 20px;
}
.settings-gateway-backdrop:not(.hidden) {
  display: flex !important;
}
.settings-gateway-card {
  width: min(620px, 92vw) !important;
  max-width: 620px;
  padding: 20px !important;
  max-height: 86vh;
  overflow: auto;
}
.settings-gateway-head {
  text-align: left;
  margin-bottom: 12px;
}
.settings-gateway-head h2 {
  font-size: 22px;
  margin: 0 0 4px;
}
.settings-gateway-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 12px;
}
.settings-gateway-btn {
  text-align: left;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #fff;
  padding: 18px;
  cursor: pointer;
  min-height: 120px;
  box-shadow: 0 8px 18px rgba(15,23,42,.06);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.settings-gateway-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(15,23,42,.10);
  background: #f8fff9;
}
.settings-gateway-btn strong {
  display: block;
  font-size: 18px;
  margin-bottom: 8px;
  color: #166534;
}
.settings-gateway-btn span {
  display: block;
  color: #64748b;
  line-height: 1.45;
  font-size: 13px;
}
.settings-gateway-btn.admin {
  border-color: #f0c4c4;
}
.settings-gateway-btn.admin:hover {
  background: #fffafa;
  border-color: #991b1b;
}
.settings-gateway-btn.admin strong {
  color: #991b1b;
}
.settings-gateway-btn.admin strong::after {
  content: "관리자";
  display: inline-block;
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
  color: #fff;
  background: #111827;
  vertical-align: 2px;
}
.settings-gateway-btn.locked {
  cursor: not-allowed;
  opacity: .55;
  background: #f9fafb;
}
.settings-gateway-btn.locked:hover {
  transform: none;
  border-color: #d1d5db;
  box-shadow: none;
  background: #f9fafb;
}
.topbar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.user-admin-grid {
  display: grid;
  grid-template-columns: minmax(280px, 430px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.user-admin-form {
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 14px;
  background: #fbfbfc;
}
.user-admin-table {
  margin-top: 0;
}
.btn.tiny {
  min-height: 28px;
  padding: 5px 9px;
  font-size: 12px;
  border-radius: 8px;
}
@media (max-width: 900px) {
  .settings-gateway-grid,
  .user-admin-grid {
    grid-template-columns: 1fr;
  }
}
/* v52.55 계약서 미리보기 1차 정리 */
.quote-document-modal-body .quote-doc-sheet.contract-preview {
  width: 794px;
  max-width: 100%;
  margin: 0 auto;
  background: #fff;
}
.quote-doc-sheet.contract-preview .contract-cover-page {
  border: 1px solid #111827;
  min-height: 1060px;
  box-shadow: none;
}
.quote-doc-sheet.contract-preview .contract-cover-page h3 {
  margin: 0 0 28px;
  text-align: center;
  font-size: 25px;
  letter-spacing: .08em;
  color: #111827;
}
.quote-doc-sheet.contract-preview .contract-lines {
  border-top: 2px solid #111827;
  border-bottom: 2px solid #111827;
  padding: 10px 0;
}
.quote-doc-sheet.contract-preview .contract-lines p {
  min-height: 30px;
  display: grid;
  grid-template-columns: 190px 1fr;
  align-items: start;
  gap: 10px;
  margin: 0;
  padding: 4px 0;
  font-size: 13px;
  line-height: 1.45;
}
.quote-doc-sheet.contract-preview .contract-lines p b {
  font-weight: 900;
  letter-spacing: .02em;
}
.quote-doc-sheet.contract-preview .contract-body {
  padding: 0;
  color: #111827;
}
.quote-doc-sheet.contract-preview .contract-cover-bottom { margin-top: 8px; }
.quote-doc-sheet.contract-preview .contract-attach-line,
.quote-doc-sheet.contract-preview .contract-date-line {
  text-align: center;
  font-weight: 800;
}
.quote-doc-sheet.contract-preview .contract-sign-grid,
.quote-doc-sheet.contract-preview .contract-sign-grid.contract-sign-grid-compact {
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.quote-doc-sheet.contract-preview .contract-sign-grid > div,
.quote-doc-sheet.contract-preview .contract-sign-grid.contract-sign-grid-compact > div {
  border: 1px solid #111827;
  background: #fff;
}
.quote-doc-sheet.contract-preview .contract-party-box h4 {
  margin: 0 0 8px;
  text-align: center;
  font-weight: 900;
}
.quote-doc-sheet.contract-preview .contract-party-box p {
  margin: 4px 0;
  color: #111827;
}
.quote-doc-sheet.contract-preview .contract-party-box .contract-party-representative {
  font-weight: 900;
  text-align: right;
}
.quote-doc-sheet.contract-preview .contract-condition-box {
  margin-top: 16px;
  border: 1px solid #111827;
  background: #fff;
}
.quote-doc-sheet.contract-preview .contract-condition-box h4 {
  text-align: center;
  margin: 0 0 18px;
}
.quote-doc-sheet.contract-preview .contract-condition-full p {
  margin: 0 0 10px;
  border-bottom: 1px solid #e5e7eb;
}

/* v52.58 계약서 갑지/PDF 가독성 보정 */
.quote-doc-sheet.contract-preview .contract-cover-page {
  padding: 28px 30px 24px !important;
}
.quote-doc-sheet.contract-preview .contract-lines p,
.quote-doc-sheet.contract-preview .contract-lines p.contract-pay-line {
  grid-template-columns: 245px 1fr !important;
  min-height: 31px !important;
  font-size: 13.6px !important;
  line-height: 1.42 !important;
}
.quote-doc-sheet.contract-preview .contract-lines p.contract-warranty-title {
  min-height: 28px !important;
}
.quote-doc-sheet.contract-preview .contract-lines p.contract-warranty-title b {
  white-space: nowrap !important;
}
.quote-doc-sheet.contract-preview .contract-body {
  font-size: 13.6px !important;
  line-height: 1.72 !important;
  margin: 18px 0 8px !important;
}
.quote-doc-sheet.contract-preview .contract-cover-bottom {
  margin-top: 0 !important;
}
.quote-doc-sheet.contract-preview .contract-attach-line {
  text-align: left !important;
  margin: 14px 0 0 8px !important;
  font-size: 12.8px !important;
  font-weight: 900 !important;
}
.quote-doc-sheet.contract-preview .contract-date-line {
  text-align: center !important;
  margin: 18px 0 14px !important;
  font-size: 15px !important;
  font-weight: 900 !important;
}
.quote-doc-sheet.contract-preview .contract-sign-grid,
.quote-doc-sheet.contract-preview .contract-sign-grid.contract-sign-grid-compact {
  gap: 14px !important;
  margin-top: 10px !important;
}
.quote-doc-sheet.contract-preview .contract-sign-grid > div,
.quote-doc-sheet.contract-preview .contract-sign-grid.contract-sign-grid-compact > div {
  border-radius: 10px !important;
  padding: 13px 16px 16px !important;
  min-height: 174px !important;
}
.quote-doc-sheet.contract-preview .contract-party-box h4 {
  font-size: 14.6px !important;
  margin-bottom: 10px !important;
}
.quote-doc-sheet.contract-preview .contract-party-box p {
  font-size: 12.8px !important;
  line-height: 1.5 !important;
  margin: 4px 0 !important;
}
.quote-doc-sheet.contract-preview .contract-party-box .contract-party-representative {
  margin-top: 12px !important;
  font-size: 13.2px !important;
  text-align: right !important;
}
.quote-doc-sheet.contract-preview .contract-condition-box {
  padding: 26px 30px !important;
}
.quote-doc-sheet.contract-preview .contract-condition-box h4 {
  font-size: 21px !important;
}
.quote-doc-sheet.contract-preview .contract-condition-full p {
  font-size: 13px !important;
  line-height: 1.75 !important;
  margin-bottom: 12px !important;
  padding-bottom: 12px !important;
}

/* v52.59 계약서 갑지/일반조건 가독성 2차 보정 */
.contract-preview .contract-lines p.contract-pay-line,
.contract-preview .contract-lines p.contract-warranty-title {
  display: block !important;
  grid-template-columns: none !important;
}
.contract-preview .contract-lines p.contract-pay-line b,
.contract-preview .contract-lines p.contract-warranty-title b {
  display: block !important;
  white-space: nowrap !important;
}
.contract-preview .contract-lines p.contract-pay-line span {
  display: block !important;
  margin-left: 168px !important;
  margin-top: 5px !important;
  line-height: 1.55 !important;
}
.contract-preview .contract-lines p.contract-warranty-sub {
  grid-template-columns: 150px minmax(0, 1fr) !important;
  padding-left: 76px !important;
}
.contract-preview .contract-lines p.contract-warranty-sub b {
  padding-left: 0 !important;
}
.contract-preview .contract-body {
  font-size: 14px !important;
  line-height: 1.78 !important;
}
.contract-preview .contract-sign-grid,
.contract-sign-grid.contract-sign-grid-compact {
  gap: 10px !important;
}
.contract-preview .contract-sign-grid > div,
.contract-sign-grid.contract-sign-grid-compact > div {
  border-radius: 14px !important;
  padding: 13px 15px !important;
  min-height: 178px !important;
}
.contract-party-box h4 {
  font-size: 15px !important;
}
.contract-party-box p {
  font-size: 13px !important;
  line-height: 1.42 !important;
}
.contract-party-box .contract-party-representative {
  text-align: right !important;
  margin-top: 22px !important;
  padding-top: 8px !important;
  font-size: 14px !important;
}
.contract-condition-full p {
  font-size: 10.4pt !important;
  line-height: 1.68 !important;
}
.contract-condition-full b {
  font-size: 10.8pt !important;
}

@media print {
  .contract-preview .contract-lines p.contract-pay-line,
  .contract-preview .contract-lines p.contract-warranty-title {
    display: block !important;
    grid-template-columns: none !important;
  }
  .contract-preview .contract-lines p.contract-pay-line b,
  .contract-preview .contract-lines p.contract-warranty-title b {
    display: block !important;
    white-space: nowrap !important;
  }
  .contract-preview .contract-lines p.contract-pay-line span {
    display: block !important;
    margin-left: 48mm !important;
    margin-top: 1.7mm !important;
    font-size: 11pt !important;
    line-height: 1.48 !important;
  }
  .contract-preview .contract-lines p.contract-warranty-sub {
    grid-template-columns: 38mm minmax(0, 1fr) !important;
    padding-left: 19mm !important;
    font-size: 10.9pt !important;
  }
  .contract-preview .contract-lines p.contract-warranty-sub b {
    padding-left: 0 !important;
  }
  .contract-preview .contract-body {
    font-size: 11pt !important;
    line-height: 1.66 !important;
  }
  .contract-preview .contract-sign-grid,
  .contract-sign-grid.contract-sign-grid-compact {
    gap: 3.4mm !important;
  }
  .contract-preview .contract-sign-grid > div,
  .contract-sign-grid.contract-sign-grid-compact > div {
    min-height: 49mm !important;
    padding: 3.8mm 4mm !important;
    border-radius: 4mm !important;
  }
  .contract-party-box h4 {
    font-size: 11.8pt !important;
  }
  .contract-party-box p {
    font-size: 9.9pt !important;
    line-height: 1.38 !important;
  }
  .contract-party-box .contract-party-representative {
    margin-top: 9mm !important;
    padding-top: 2.4mm !important;
    text-align: right !important;
    font-size: 10.7pt !important;
  }
  .contract-condition-full p {
    font-size: 10.15pt !important;
    line-height: 1.63 !important;
    margin-bottom: 3.4mm !important;
    padding-bottom: 2.2mm !important;
  }
  .contract-condition-full b {
    font-size: 10.55pt !important;
  }
}

/* v52.60 계약서 갑지 하단/본문/일반조건 추가 보정 */
.quote-doc-sheet.contract-preview .contract-lines p.contract-pay-line span,
.contract-preview .contract-lines p.contract-pay-line span {
  margin-left: 76px !important;
  margin-top: 5px !important;
  font-size: 14px !important;
  line-height: 1.55 !important;
}
.quote-doc-sheet.contract-preview .contract-lines p.contract-pay-line em,
.contract-preview .contract-lines p.contract-pay-line em {
  font-size: 14px !important;
  line-height: 1.55 !important;
}
.quote-doc-sheet.contract-preview .contract-body,
.contract-preview .contract-body {
  font-size: 14.6px !important;
  line-height: 1.82 !important;
}
.quote-doc-sheet.contract-preview .contract-cover-bottom,
.contract-preview .contract-cover-bottom {
  margin-top: 14px !important;
}
.quote-doc-sheet.contract-preview .contract-date-line,
.contract-preview .contract-date-line {
  margin: 20px 0 18px !important;
}
.quote-doc-sheet.contract-preview .contract-sign-grid,
.quote-doc-sheet.contract-preview .contract-sign-grid.contract-sign-grid-compact,
.contract-preview .contract-sign-grid,
.contract-sign-grid.contract-sign-grid-compact {
  gap: 8px !important;
  margin-top: 20px !important;
}
.quote-doc-sheet.contract-preview .contract-sign-grid > div,
.quote-doc-sheet.contract-preview .contract-sign-grid.contract-sign-grid-compact > div,
.contract-preview .contract-sign-grid > div,
.contract-sign-grid.contract-sign-grid-compact > div {
  min-height: 186px !important;
  padding: 14px 18px 16px !important;
  border-radius: 14px !important;
}
.quote-doc-sheet.contract-preview .contract-party-box h4,
.contract-party-box h4 {
  font-size: 15.8px !important;
}
.quote-doc-sheet.contract-preview .contract-party-box p,
.contract-party-box p {
  font-size: 13.6px !important;
  line-height: 1.46 !important;
}
.quote-doc-sheet.contract-preview .contract-party-box .contract-party-representative,
.contract-party-box .contract-party-representative {
  margin-top: 30px !important;
  padding-top: 8px !important;
  font-size: 14.5px !important;
}
.quote-doc-sheet.contract-preview .contract-condition-full p,
.contract-condition-full p {
  font-size: 11.2pt !important;
  line-height: 1.78 !important;
  margin-bottom: 13px !important;
  padding-bottom: 12px !important;
}
.quote-doc-sheet.contract-preview .contract-condition-full b,
.contract-condition-full b {
  font-size: 11.6pt !important;
}

@media print {
  .contract-preview .contract-lines p.contract-pay-line span {
    margin-left: 19mm !important;
    margin-top: 1.7mm !important;
    font-size: 11.2pt !important;
    line-height: 1.5 !important;
  }
  .contract-preview .contract-lines p.contract-pay-line em {
    font-size: 11.2pt !important;
    line-height: 1.5 !important;
  }
  .contract-preview .contract-body {
    font-size: 11.3pt !important;
    line-height: 1.7 !important;
  }
  .contract-preview .contract-sign-grid,
  .contract-sign-grid.contract-sign-grid-compact {
    gap: 2.6mm !important;
    margin-top: 6mm !important;
  }
  .contract-preview .contract-sign-grid > div,
  .contract-sign-grid.contract-sign-grid-compact > div {
    min-height: 52mm !important;
    padding: 4mm 4.6mm !important;
    border-radius: 4mm !important;
  }
  .contract-party-box h4 { font-size: 12.4pt !important; }
  .contract-party-box p { font-size: 10.5pt !important; line-height: 1.42 !important; }
  .contract-party-box .contract-party-representative {
    margin-top: 11mm !important;
    font-size: 11.2pt !important;
  }
  .contract-condition-full p {
    font-size: 10.9pt !important;
    line-height: 1.72 !important;
    margin-bottom: 3.7mm !important;
    padding-bottom: 2.5mm !important;
  }
  .contract-condition-full b { font-size: 11.3pt !important; }
}

/* v52.61 계약서 갑지 항목/내용 간격 보정 */
.quote-doc-sheet.contract-preview .contract-lines p:not(.contract-pay-line):not(.contract-warranty-title):not(.contract-warranty-sub),
.contract-preview .contract-lines p:not(.contract-pay-line):not(.contract-warranty-title):not(.contract-warranty-sub) {
  grid-template-columns: 168px minmax(0, 1fr) !important;
  gap: 10px !important;
}
.quote-doc-sheet.contract-preview .contract-lines p:not(.contract-pay-line):not(.contract-warranty-title):not(.contract-warranty-sub) b,
.contract-preview .contract-lines p:not(.contract-pay-line):not(.contract-warranty-title):not(.contract-warranty-sub) b {
  white-space: nowrap !important;
  letter-spacing: -0.02em !important;
}
.quote-doc-sheet.contract-preview .contract-lines p:not(.contract-pay-line):not(.contract-warranty-title):not(.contract-warranty-sub) span,
.contract-preview .contract-lines p:not(.contract-pay-line):not(.contract-warranty-title):not(.contract-warranty-sub) span {
  text-align: left !important;
}

@media print {
  .contract-preview .contract-lines p:not(.contract-pay-line):not(.contract-warranty-title):not(.contract-warranty-sub) {
    grid-template-columns: 34mm minmax(0, 1fr) !important;
    gap: 2.5mm !important;
  }
}


/* v52.62 계약서 글씨/일반조건 가독성 추가 보정 */
.quote-doc-sheet.contract-preview .contract-condition-full p,
.contract-condition-full p {
  font-size: 11.8pt !important;
  line-height: 1.84 !important;
  margin-bottom: 14px !important;
  padding-bottom: 13px !important;
}
.quote-doc-sheet.contract-preview .contract-condition-full b,
.contract-condition-full b {
  font-size: 12.15pt !important;
}
.quote-doc-sheet.contract-preview .contract-body,
.contract-preview .contract-body {
  font-size: 14.9px !important;
  line-height: 1.84 !important;
}
.quote-doc-sheet.contract-preview .contract-lines p,
.contract-preview .contract-lines p {
  font-size: 14.3px !important;
}
.quote-doc-sheet.contract-preview .contract-party-box h4,
.contract-party-box h4 {
  font-size: 16.1px !important;
}
.quote-doc-sheet.contract-preview .contract-party-box p,
.contract-party-box p {
  font-size: 13.9px !important;
  line-height: 1.48 !important;
}

@media print {
  .contract-condition-full p {
    font-size: 11.45pt !important;
    line-height: 1.78 !important;
    margin-bottom: 4mm !important;
    padding-bottom: 2.8mm !important;
  }
  .contract-condition-full b { font-size: 11.85pt !important; }
  .contract-preview .contract-body { font-size: 11.55pt !important; line-height: 1.74 !important; }
}

/* v52.63 보증각서 미리보기/PDF 기준 가독성 및 직인 공간 보정 */
.quote-doc-sheet.guarantee-preview {
  padding: 34px 34px 32px !important;
}
.quote-doc-sheet.guarantee-preview h3 {
  font-size: 26px !important;
  letter-spacing: .06em !important;
  margin: 8px 0 30px !important;
}
.quote-doc-sheet.guarantee-preview .guarantee-table {
  margin: 24px 0 36px !important;
  font-size: 14px !important;
}
.quote-doc-sheet.guarantee-preview .guarantee-table th,
.quote-doc-sheet.guarantee-preview .guarantee-table td {
  padding: 12px 14px !important;
  line-height: 1.55 !important;
}
.quote-doc-sheet.guarantee-preview .guarantee-table th {
  width: 185px !important;
  text-align: center !important;
  font-weight: 900 !important;
}
.quote-doc-sheet.guarantee-preview .contract-body {
  font-size: 14.2px !important;
  line-height: 2.0 !important;
  margin: 28px 0 18px !important;
  padding: 10px 6px !important;
}
.quote-doc-sheet.guarantee-preview .doc-date {
  font-size: 17px !important;
  font-weight: 900 !important;
  margin: 48px 0 30px !important;
}
.quote-doc-sheet.guarantee-preview .our-company-box.guarantee-company-box,
.quote-doc-sheet.guarantee-preview .our-company-box {
  width: 360px !important;
  max-width: 360px !important;
  margin-left: auto !important;
  padding: 16px 18px 18px !important;
  border-radius: 12px !important;
  border-color: #111827 !important;
  background: #fff !important;
}
.quote-doc-sheet.guarantee-preview .our-company-box p {
  font-size: 13.5px !important;
  line-height: 1.52 !important;
  margin: 5px 0 !important;
}
.quote-doc-sheet.guarantee-preview .our-company-box .guarantee-rep-line,
.quote-doc-sheet.guarantee-preview .our-company-box p:last-child {
  margin-top: 20px !important;
  padding-top: 8px !important;
  text-align: right !important;
  font-size: 14.4px !important;
  font-weight: 900 !important;
}
.quote-doc-sheet.guarantee-preview .recipient-line {
  margin-top: 40px !important;
  font-size: 33px !important;
  font-weight: 900 !important;
}

@media print {
  .quote-doc-sheet.guarantee-preview h3 { font-size: 20pt !important; }
  .quote-doc-sheet.guarantee-preview .guarantee-table { font-size: 10.8pt !important; }
  .quote-doc-sheet.guarantee-preview .contract-body { font-size: 11pt !important; line-height: 1.85 !important; }
  .quote-doc-sheet.guarantee-preview .our-company-box p { font-size: 10.3pt !important; }
  .quote-doc-sheet.guarantee-preview .our-company-box .guarantee-rep-line,
  .quote-doc-sheet.guarantee-preview .our-company-box p:last-child { font-size: 11pt !important; margin-top: 6mm !important; }
}

/* v52.64 고정값 배지 줄바꿈 방지 + 보증각서 하단 배치 보정 */
.setting-fixed-chip {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  flex-wrap: nowrap !important;
  min-width: 0 !important;
}
.setting-fixed-chip > span {
  min-width: 0 !important;
  flex: 1 1 auto !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.setting-fixed-chip button,
.setting-fixed-chip button:disabled {
  flex: 0 0 auto !important;
  min-width: 74px !important;
  white-space: nowrap !important;
  line-height: 1 !important;
  padding: 7px 10px !important;
  text-align: center !important;
}
.quote-doc-sheet.guarantee-preview .contract-body {
  margin-bottom: 44px !important;
}
.quote-doc-sheet.guarantee-preview .doc-date {
  margin: 72px 0 42px !important;
}
.quote-doc-sheet.guarantee-preview .our-company-box.guarantee-company-box,
.quote-doc-sheet.guarantee-preview .our-company-box {
  margin-top: 18px !important;
}
.quote-doc-sheet.guarantee-preview .recipient-line {
  margin-top: 58px !important;
  margin-bottom: 6px !important;
  font-size: 34px !important;
  font-weight: 900 !important;
  letter-spacing: 0.02em !important;
}
@media print {
  .setting-fixed-chip button,
  .setting-fixed-chip button:disabled { white-space: nowrap !important; }
  .quote-doc-sheet.guarantee-preview .doc-date { margin: 18mm 0 11mm !important; }
  .quote-doc-sheet.guarantee-preview .recipient-line { margin-top: 15mm !important; font-size: 25pt !important; font-weight: 900 !important; }
}

/* v52.66 보증/이행 각서 하단 회사정보 박스 대표자 날인 공간 보정 */
.quote-doc-sheet.guarantee-preview .our-company-box.guarantee-company-box,
.quote-doc-sheet.guarantee-preview .our-company-box {
  position: relative !important;
  height: 154px !important;
  min-height: 154px !important;
  padding: 16px 18px 10px !important;
  box-sizing: border-box !important;
}
.quote-doc-sheet.guarantee-preview .our-company-box .guarantee-rep-line,
.quote-doc-sheet.guarantee-preview .our-company-box p:last-child {
  position: absolute !important;
  right: 18px !important;
  bottom: 9px !important;
  width: calc(100% - 36px) !important;
  margin: 0 !important;
  padding: 0 !important;
  text-align: right !important;
}

/* v52.87: 문서 직인은 출력 직전 선택 적용 */
.quote-stamp-toggle{display:inline-flex;align-items:center;gap:6px;white-space:nowrap;cursor:pointer;}
.quote-stamp-toggle input{width:14px;height:14px;margin:0;}
.preview-stamp-toggle{font-size:13px;color:#374151;background:#f8fafc;border:1px solid #dbe3ee;border-radius:10px;padding:0 10px;}
.quote-cooperation-toggle{background:#fff7f7;border-color:#f3c4c9;color:#7f1d1d;}


/* v52.89: 견적서 경비 입력 칸 겹침 방지 */
.quote-expense-table { min-width: 1420px; }
.quote-expense-table th:nth-child(1) { width: 210px; }
.quote-expense-table th:nth-child(2) { width: 230px; }
.quote-expense-table th:nth-child(3) { width: 90px; }
.quote-expense-table th:nth-child(4) { width: 86px; }
.quote-expense-table th:nth-child(5),
.quote-expense-table th:nth-child(7),
.quote-expense-table th:nth-child(8) { width: 130px; }
.quote-expense-table th:nth-child(6) { width: 90px; }
.quote-expense-table th:nth-child(9) { width: 150px; }
.quote-expense-table th:nth-child(10) { width: 70px; }
.quote-expense-table .quote-spec { min-width: 0; width: 100%; }

/* v52.89: 보증각서 직인 체크 즉시 미리보기 */
.quote-doc-sheet.guarantee-preview .guarantee-seal-target { position: relative; display: inline-block; padding: 0 4px; }
.quote-doc-sheet.guarantee-preview .guarantee-preview-stamp { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 48px; height: 48px; object-fit: contain; opacity: .9; pointer-events: none; }

/* v52.89: 완료/취소 견적서는 내역처리 비활성 표시 */
.quote-site-status-control.is-disabled { opacity: .55; }
.quote-site-status-control.is-disabled select,
.quote-site-status-control.is-disabled button { cursor: not-allowed; }


/* v52.90 quote compare modal */
.quote-compare-modal { width: min(1480px, 98vw); height: min(900px, 94vh); display: flex; flex-direction: column; }
.quote-compare-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.quote-compare-pane { min-width: 0; min-height: 0; display: grid; grid-template-rows: auto auto minmax(0, 1fr); gap: 8px; }
.quote-compare-pane-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.quote-compare-doc-list { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.quote-compare-doc { flex: 0 0 220px; text-align: left; border: 1px solid #e5e7eb; background: #fff; border-radius: 12px; padding: 9px 10px; cursor: pointer; }
.quote-compare-doc:hover, .quote-compare-doc.active { border-color: #111827; box-shadow: 0 4px 14px rgba(15,23,42,.10); }
.quote-compare-doc strong, .quote-compare-doc span, .quote-compare-doc em { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quote-compare-doc strong { font-size: 13px; color: #111827; }
.quote-compare-doc span { font-size: 12px; color: #4b5563; margin-top: 3px; }
.quote-compare-doc em { font-style: normal; font-size: 11px; color: #9ca3af; margin-top: 3px; }
.quote-compare-viewer { min-height: 0; border: 1px solid #e5e7eb; border-radius: 14px; overflow: auto; background: #f8fafc; display: flex; align-items: center; justify-content: center; }
.quote-compare-frame { width: 100%; height: 100%; min-height: 620px; border: 0; background: #fff; }
.quote-compare-image { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
@media (max-width: 900px) { .quote-compare-body { grid-template-columns: 1fr; } .quote-compare-modal { height: 96vh; } }

/* v52.92 견적비교: 좌/우 문서 선택을 별도 팝업으로 분리 */
.quote-compare-pane { grid-template-rows: auto minmax(0, 1fr); }
.quote-compare-pane-head > div { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.quote-compare-selected-title { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #6b7280; font-size: 12px; }
.quote-compare-picker-backdrop { z-index: 80; }
.quote-compare-picker-modal { width: min(860px, 94vw); max-height: min(760px, 90vh); display: flex; flex-direction: column; }
.quote-compare-picker-tools { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.quote-compare-category-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.quote-compare-chip { border: 1px solid #e5e7eb; background: #fff; border-radius: 999px; padding: 6px 11px; font-size: 12px; cursor: pointer; color: #374151; }
.quote-compare-chip:hover, .quote-compare-chip.active { border-color: #111827; background: #111827; color: #fff; }
.quote-compare-picker-grid { min-height: 260px; max-height: 520px; overflow-y: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding-right: 3px; }
.quote-compare-picker-card { text-align: left; border: 1px solid #e5e7eb; background: #fff; border-radius: 14px; padding: 12px 13px; cursor: pointer; min-width: 0; }
.quote-compare-picker-card:hover, .quote-compare-picker-card.active { border-color: #111827; box-shadow: 0 5px 16px rgba(15,23,42,.12); }
.quote-compare-picker-card strong, .quote-compare-picker-card span, .quote-compare-picker-card em { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quote-compare-picker-card strong { font-size: 14px; color: #111827; }
.quote-compare-picker-card span { font-size: 12px; color: #4b5563; margin-top: 5px; }
.quote-compare-picker-card em { font-style: normal; font-size: 11px; color: #9ca3af; margin-top: 5px; }
@media (max-width: 720px) { .quote-compare-picker-grid { grid-template-columns: 1fr; } .quote-compare-pane-head { align-items: flex-start; flex-direction: column; } }


/* v52.93: 견적비교 문서 선택창을 현장 선택 팝업 UI와 통일 */
#quoteComparePickerModal.modal {
  position: fixed;
  inset: 0;
  width: auto;
  max-height: none;
  overflow: hidden;
  background: rgba(15, 23, 42, .42);
  border-radius: 0;
  padding: 18px;
  box-shadow: none;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9000;
}
#quoteComparePickerModal .quote-address-picker-modal {
  width: min(1180px, 94vw);
  max-height: min(820px, 88vh);
  background: #fff;
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 28px 70px rgba(15, 23, 42, .28);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
#quoteComparePickerModal .modal-head,
#quoteComparePickerModal .quote-address-search-row,
#quoteComparePickerModal .quote-compare-picker-category-row { flex: 0 0 auto; }
#quoteComparePickerModal .quote-compare-picker-category-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px;
}
#quoteComparePickerModal .quote-address-picker-list {
  flex: 1 1 auto;
  min-height: 360px;
  max-height: 560px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 2px 6px 2px 2px;
}
#quoteComparePickerModal .quote-address-result {
  min-height: 112px;
  border-radius: 14px;
  padding: 13px 14px;
}
#quoteComparePickerModal .quote-address-result.active {
  border-color: #ef4444;
  background: #fff7f7;
  box-shadow: 0 5px 16px rgba(239, 68, 68, .10);
}
#quoteComparePickerModal .quote-address-result-sub {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
#quoteComparePickerModal .quote-compare-chip {
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 12px;
  cursor: pointer;
  color: #374151;
}
#quoteComparePickerModal .quote-compare-chip:hover,
#quoteComparePickerModal .quote-compare-chip.active {
  border-color: #ef4444;
  background: #fff7f7;
  color: #991b1b;
}
@media (max-width: 820px) {
  #quoteComparePickerModal.modal { padding: 10px; }
  #quoteComparePickerModal .quote-address-picker-modal { width: 96vw; max-height: 90vh; padding: 14px; }
  #quoteComparePickerModal .quote-address-picker-list { grid-template-columns: 1fr; min-height: 320px; max-height: 64vh; }
}
/* v53.11: 매입 등록/수정 금액 3칸 정렬 및 카드결제 자동정산 표시 */
.money-modal .money-amount-field > label,
.money-modal .money-paid-label-row,
.money-modal .money-balance-field > label {
  min-height: 28px;
  margin-bottom: 5px;
  display: flex !important;
  align-items: center;
}
.money-modal .money-amount-field input,
.money-modal .money-paid-field > input,
.money-modal .money-balance-field input {
  min-height: 42px;
}
.money-modal .money-paid-field input.locked-field[readonly] {
  background: #f8fafc !important;
  color: #334155 !important;
  font-weight: 900;
}
/* v53.30: JH 공통 토스트 알림 - 완료 팝업 대체 */
.jh-toast-stack {
  position: fixed;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: min(460px, calc(100vw - 28px));
  pointer-events: none;
}
.jh-toast {
  position: relative;
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 12px;
  padding: 13px 15px 14px;
  overflow: hidden;
  border: 1px solid rgba(17, 24, 39, .10);
  border-top: 3px solid #111827;
  border-radius: 16px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 18px 45px rgba(15, 23, 42, .16);
  backdrop-filter: blur(8px);
  pointer-events: auto;
  cursor: pointer;
  opacity: 0;
  transform: translateY(-10px) scale(.985);
  transition: opacity .22s ease, transform .22s ease;
}
.jh-toast.show { opacity: 1; transform: translateY(0) scale(1); }
.jh-toast.hide { opacity: 0; transform: translateY(-8px) scale(.985); }
.jh-toast::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #e11d48;
}
.jh-toast-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: #111827;
  font-weight: 900;
  font-size: 18px;
  line-height: 1;
  animation: jhToastIconPop .28s ease both;
}
.jh-toast-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.jh-toast-body strong { font-size: 12px; color: #6b7280; letter-spacing: -.01em; }
.jh-toast-body span { font-size: 14px; font-weight: 800; color: #111827; line-height: 1.35; word-break: keep-all; }
.jh-toast-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 100%;
  background: #e11d48;
  transform-origin: left center;
  animation: jhToastProgress linear forwards;
}
.jh-toast-success { border-top-color: #111827; }
.jh-toast-success .jh-toast-icon { background: #111827; }
.jh-toast-success .jh-toast-progress,
.jh-toast-success::before { background: #e11d48; }
.jh-toast-info { border-top-color: #2563eb; }
.jh-toast-info .jh-toast-icon { background: #2563eb; }
.jh-toast-info .jh-toast-progress,
.jh-toast-info::before { background: #2563eb; }
.jh-toast-warning { border-top-color: #f59e0b; }
.jh-toast-warning .jh-toast-icon { background: #f59e0b; }
.jh-toast-warning .jh-toast-progress,
.jh-toast-warning::before { background: #f59e0b; }
.jh-toast-error { border-top-color: #dc2626; }
.jh-toast-error .jh-toast-icon { background: #dc2626; }
.jh-toast-error .jh-toast-progress,
.jh-toast-error::before { background: #dc2626; }
.jh-toast-loading { border-top-color: #111827; }
.jh-toast-loading::before { background: #111827; }
.jh-toast-spinner {
  width: 17px;
  height: 17px;
  border: 2px solid rgba(255,255,255,.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: jhToastSpin .75s linear infinite;
}
@keyframes jhToastProgress { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes jhToastSpin { to { transform: rotate(360deg); } }
@keyframes jhToastIconPop {
  0% { transform: scale(.72); opacity: .2; }
  70% { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
@media (max-width: 640px) {
  .jh-toast-stack { top: 12px; width: calc(100vw - 20px); }
  .jh-toast { border-radius: 14px; padding: 12px 13px 13px; }
  .jh-toast-body span { font-size: 13px; }
}
/* v53.32 삭제 현장 연결 표시 */
.jh-mini-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
  vertical-align: middle;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  color: #6b7280;
  white-space: nowrap;
}
.jh-mini-badge-deleted {
  border-color: #fecaca;
  background: #fff7f7;
  color: #b91c1c;
}
.quote-row-site-deleted td {
  background-image: linear-gradient(90deg, rgba(185,28,28,.035), rgba(255,255,255,0));
}
#siteRestoreDeletedBtn {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #c2410c;
}
/* v53.49 매입관리 문서보기/VAT 헤더 안정화 */
.purchase-item-table th.purchase-vat-header {
  white-space: nowrap !important;
  min-width: 96px !important;
  width: 96px !important;
  padding: 6px 8px !important;
  text-align: center;
  vertical-align: middle;
}
.purchase-vat-header-inline {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  width: auto !important;
  max-width: 100%;
  margin: 0 auto !important;
  padding: 0 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  cursor: pointer;
}
.purchase-vat-header-inline span {
  display: inline-block !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}
.purchase-vat-header-inline input {
  appearance: auto !important;
  display: inline-block !important;
  flex: 0 0 auto !important;
  width: 14px !important;
  min-width: 14px !important;
  max-width: 14px !important;
  height: 14px !important;
  margin: 0 !important;
  padding: 0 !important;
  vertical-align: middle !important;
}
.money-partner-doc-btn {
  white-space: nowrap;
}

/* v53.52 매입관리 정산문서 모달/일괄매입 VAT 표시 안정화 */
#quotePartnerDocPreviewModal.modal-backdrop,
#quotePartnerDocPreviewModal {
  z-index: 16000 !important;
}
#quotePartnerDocPreviewModal .quote-partner-doc-preview-modal,
#quotePartnerDocPreviewModal .quote-document-modal {
  z-index: 16001 !important;
}
.bulk-vat-grid .money-advanced-check,
.money-bulk-vat-section .money-advanced-check {
  justify-self: start !important;
  align-self: center !important;
  width: auto !important;
  max-width: max-content !important;
  justify-content: flex-start !important;
  margin-top: 0 !important;
  padding: 4px 10px !important;
  line-height: 1.2 !important;
}
.bulk-vat-grid .money-advanced-check input,
.money-bulk-vat-section .money-advanced-check input {
  flex: 0 0 auto !important;
  width: 14px !important;
  min-width: 14px !important;
  height: 14px !important;
  margin: 0 3px 0 0 !important;
  padding: 0 !important;
}
/* v56.03.87: 자료실·업무공유 v53.56~63 핵심/후속/레이아웃을 동일 도메인으로 재통합. */
/* v53.56: 자료실 순수 보관함 + 업무공유 리메이크 1차 */
.library-dashboard.compact-summary-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.library-dashboard.compact-summary-row .card {
  padding: 9px 11px;
  min-height: 64px;
  border-radius: 12px;
  border: 1px solid #dbe4f0;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .05);
}
.library-dashboard.compact-summary-row .card:nth-child(1) { background: #eff6ff; }
.library-dashboard.compact-summary-row .card:nth-child(2) { background: #fff7ed; }
.library-dashboard.compact-summary-row .card:nth-child(3) { background: #f0fdf4; }
.library-dashboard.compact-summary-row .card:nth-child(4) { background: #eef2ff; }
.library-dashboard.compact-summary-row .card:nth-child(5) { background: #f8fafc; }
.library-dashboard.compact-summary-row .card:nth-child(6) { background: #fff1f2; }
.library-dashboard.compact-summary-row .card-title { font-size: 12px; margin-bottom: 3px; }
.library-dashboard.compact-summary-row .card-value { font-size: 18px; line-height: 1.05; }
.library-dashboard.compact-summary-row .card-sub { font-size: 11px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.library-filter-card { min-width: 0; }
.library-main-card .section-title { align-items: flex-start; }
.library-search-box { display: grid; grid-template-columns: 140px 150px 150px 150px minmax(220px, 1fr); gap: 8px; width: 100%; }
.library-search-box select,
.library-search-box input { min-width: 0; }
.library-table { font-size: 12px; }
.library-table th,
.library-table td { vertical-align: middle; }
.library-table th:nth-child(6), .library-table td:nth-child(6),
.library-table th:nth-child(8), .library-table td:nth-child(8),
.library-table th:nth-child(9), .library-table td:nth-child(9) { text-align: center; }
.library-upload-modal { max-width: 980px; }
.library-upload-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.library-upload-grid .span-2 { grid-column: span 2; }
.library-upload-grid .span-4 { grid-column: 1 / -1; }
.library-upload-grid textarea { min-height: 86px; }
.share-method-field .share-method-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 38px;
  align-items: center;
}
.share-method-checks label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid #dbe4f0;
  background: #fff;
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 800;
  color: #334155;
  white-space: nowrap;
}
.share-method-checks input { margin: 0; }
.share-selected-items { margin-top: 8px; }
.share-selected-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.share-selected-table th,
.share-selected-table td { border-bottom: 1px solid #e5e7eb; padding: 8px; text-align: left; }
.share-category-lists {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.share-category-card { padding: 14px; border-radius: 16px; }
.share-mini-table th,
.share-mini-table td { padding: 7px 8px; }
.share-row-actions {
  display: flex;
  justify-content: center;
  gap: 5px;
}
.share-row-actions .small-btn { padding: 5px 7px; font-size: 11px; }
.share-table th:first-child,
.share-table td:first-child { text-align: center; min-width: 38px; width: 38px; }
.share-table th:nth-child(10),
.share-table td:nth-child(10) { text-align: center; }
@media (max-width: 1280px) {
  .library-dashboard.compact-summary-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .library-search-box { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .share-category-lists { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .library-dashboard.compact-summary-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .library-search-box,
  .library-upload-grid { grid-template-columns: 1fr; }
  .library-upload-grid .span-2,
  .library-upload-grid .span-4 { grid-column: span 1; }
}
@media (max-width: 520px) {
  .library-dashboard.compact-summary-row { grid-template-columns: 1fr; }
}


/* v53.57 자료실/업무공유 목록 정리 */
.library-table th:nth-child(1),
.library-table td:nth-child(1),
.library-table th:nth-child(3),
.library-table td:nth-child(3),
.library-table th:nth-child(4),
.library-table td:nth-child(4),
.library-table th:nth-child(5),
.library-table td:nth-child(5),
.library-table th:nth-child(6),
.library-table td:nth-child(6) { text-align: center; }
.library-title-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 5px 0 3px;
}
.library-title-actions .small { color: #64748b; }
.share-main-section-title {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.share-main-right {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  min-width: 0;
}
.share-list-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  max-width: 760px;
}
.share-list-tab {
  border: 1px solid #e2e8f0;
  background: #ffffff;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
  color: #475569;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.share-list-tab:hover { background: #f8fafc; border-color: #cbd5e1; }
.share-list-tab.active {
  background: #111827;
  border-color: #111827;
  color: #ffffff;
}
.share-batch-actions { justify-content: flex-end; }
.share-toolbar .search-box { justify-content: flex-end; width: 100%; }
.share-category-lists { display: none !important; }
@media (max-width: 1100px) {
  .share-main-section-title { flex-direction: column; }
  .share-main-right { align-items: stretch; width: 100%; }
  .share-list-tabs { justify-content: flex-start; max-width: none; }
  .share-batch-actions { justify-content: flex-start; }
}

/* v53.58 자료실 상세/업무공유 카드필터 정리 */
.library-click-row,
.share-click-row { cursor: pointer; }
.library-click-row:hover,
.share-click-row:hover { background: #f8fafc; }
.library-table th:nth-child(4),
.library-table td:nth-child(4),
.library-table th:nth-child(5),
.library-table td:nth-child(5),
.library-table th:nth-child(6),
.library-table td:nth-child(6),
.library-table th:nth-child(7),
.library-table td:nth-child(7),
.library-table th:nth-child(8),
.library-table td:nth-child(8) { text-align: center; }
.library-detail-modal { max-width: 880px; }
.library-detail-grid,
.share-detail-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.library-detail-grid > div,
.share-detail-summary > div {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 9px 10px;
  background: #f8fafc;
  min-width: 0;
}
.library-detail-grid strong,
.share-detail-summary strong {
  display: block;
  font-size: 11px;
  color: #64748b;
  margin-bottom: 4px;
}
.library-detail-grid span,
.share-detail-summary span { font-size: 13px; font-weight: 800; color: #0f172a; word-break: break-all; }
.library-detail-desc { margin-top: 10px; }
.share-type-card.active {
  border-color: #111827 !important;
  box-shadow: 0 0 0 2px rgba(17,24,39,.08), 0 8px 18px rgba(15,23,42,.08) !important;
}
.share-detail-modal { max-width: 1040px; z-index: 7100; }
.share-detail-actionbar {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-end;
  margin-bottom: 12px;
}
.share-link-text { font-size: 11px !important; font-weight: 700 !important; color: #475569 !important; }
.share-link-open { display: inline-block; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.share-link-open:hover { color: #0f172a !important; }
@media (max-width: 900px) {
  .library-detail-grid,
  .share-detail-summary { grid-template-columns: 1fr; }
  .share-detail-actionbar { justify-content: flex-start; }
}

/* v53.59: 자료실 대분류 카드/목록 재정리 + 업무공유 카드 의미 정리 */
.library-dashboard.compact-summary-row {
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
}
.library-filter-card.active {
  border-color: #111827 !important;
  box-shadow: 0 0 0 2px rgba(17,24,39,.08), 0 8px 18px rgba(15,23,42,.08) !important;
}
.library-search-box {
  display: flex !important;
  gap: 8px;
  width: 100%;
}
.library-search-box input {
  width: 100%;
  min-width: 240px;
}
.library-table th:nth-child(5),
.library-table td:nth-child(5) { white-space: nowrap; }
.library-download-link {
  display: inline-flex;
  background: #ffffff;
}
.library-download-link:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

/* v53.60: 자료실 카드 색상/목록 간격 + 수정 팝업 보강 */
.library-dashboard.compact-summary-row .library-filter-card {
  background: #ffffff !important;
}
.library-dashboard.compact-summary-row .library-filter-card[data-library-card="all"],
.library-dashboard.compact-summary-row .library-filter-card.library-all-card {
  background: #eff6ff !important;
}
.library-dashboard.compact-summary-row .library-filter-card.active:not([data-library-card="all"]) {
  background: #ffffff !important;
}
.library-table th,
.library-table td {
  padding-left: 7px !important;
  padding-right: 7px !important;
}
.library-table th:nth-child(2),
.library-table td:nth-child(2) {
  max-width: 92px !important;
}
.library-table th:nth-child(6),
.library-table td:nth-child(6) {
  max-width: 104px !important;
  overflow: hidden;
  text-overflow: ellipsis;
}
#libraryUploadFile:not([required])::file-selector-button {
  cursor: pointer;
}


/* v53.62: 자료실 클릭 영역/폭/카드 렌더 안정화 + 업무공유 선택발송 제거 */
.library-dashboard.compact-summary-row:empty {
  display: none;
}
.library-row {
  cursor: default;
}
.library-open-cell {
  cursor: pointer;
}
.library-open-cell:hover strong {
  text-underline-offset: 3px;
}
.library-table th:nth-child(2),
.library-table td:nth-child(2) {
  max-width: 88px !important;
}
.library-table th:nth-child(4),
.library-table td:nth-child(4) {
  max-width: 150px !important;
}
.library-table th:nth-child(5),
.library-table td:nth-child(5) {
  max-width: 88px !important;
}
.library-table th:nth-child(6),
.library-table td:nth-child(6) {
  max-width: 96px !important;
}
.share-main-section-title {
  align-items: flex-start;
}
.share-table th:first-child,
.share-table td:first-child {
  width: auto !important;
  min-width: 260px !important;
  text-align: left !important;
}
.share-table th:nth-child(9),
.share-table td:nth-child(9) {
  text-align: center;
}

.share-row-actions {
  min-width: 120px !important;
}
.share-table th:nth-child(9),
.share-table td:nth-child(9) {
  min-width: 120px !important;
}

/* v53.63 자료실/업무공유 UI 추가 정리 */
.library-dashboard.compact-summary-row .card {
  background: #f8fafc !important;
}
.library-dashboard.compact-summary-row .library-all-card,
.library-dashboard.compact-summary-row .library-all-card.active {
  background: #eff6ff !important;
}
.library-dashboard.compact-summary-row .library-category-card.active {
  border-color: #94a3b8 !important;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, .05), 0 2px 8px rgba(15, 23, 42, .05) !important;
}
.library-table th,
.library-table td {
  cursor: default !important;
}
.library-table th:nth-child(2),
.library-table td:nth-child(2) { max-width: 96px !important;  overflow: hidden; text-overflow: ellipsis; }
.library-table th:nth-child(4),
.library-table td:nth-child(4) { max-width: 172px !important; padding-left: 14px !important; padding-right: 18px !important; }
.library-open-cell,
.library-download-link {
  cursor: pointer !important;
}
.library-download-link {
  display: inline-block;
  max-width: 136px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}
.library-row.library-title-hover td {
  background: #f8fafc !important;
}
.library-open-cell:hover strong {
  text-decoration: none;
}
.share-table {
  table-layout: fixed;
  width: 100%;
}
.share-table th,
.share-table td { vertical-align: middle; }
.share-table th:nth-child(1), .share-table td:nth-child(1) { width: 92px !important; min-width: 92px !important; text-align: center !important; white-space: nowrap; }
.share-table th:nth-child(2), .share-table td:nth-child(2) { width: auto !important; min-width: 240px !important; text-align: left !important; }
.share-table th:nth-child(3), .share-table td:nth-child(3) { width: 150px !important; min-width: 150px !important; text-align: left !important; }
.share-table th:nth-child(4), .share-table td:nth-child(4) { width: 122px !important; min-width: 122px !important; text-align: center !important; }
.share-table th:nth-child(5), .share-table td:nth-child(5) { width: 88px !important; min-width: 88px !important; text-align: center !important; }
.share-table th:nth-child(6), .share-table td:nth-child(6) { width: 70px !important; min-width: 70px !important; text-align: center !important; }
.share-table th:nth-child(7), .share-table td:nth-child(7) { width: 118px !important; min-width: 118px !important; text-align: center !important; }
.share-row-actions { min-width: 0 !important; flex-wrap: nowrap !important; }
.share-row-type-label { color: #64748b; margin-top: 2px; }

/* v53.64 자료실 다운로드/클릭 영역 + 업무공유 구분별 리스트 보정 */
.library-table th,
.library-table td {
  cursor: default;
}
.library-table th:nth-child(2),
.library-table td:nth-child(2) { max-width: 110px; }
.library-table th:nth-child(4),
.library-table td:nth-child(4) { padding-right: 16px !important; }
.library-open-cell,
.library-download-cell,
.library-download-link {
  cursor: pointer !important;
}
.library-open-cell:hover strong {
  color: #111827;
}
.library-download-link {
  display: inline-flex;
  background: #fff;
}
.library-download-link:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}
.share-table th,
.share-table td {
  white-space: nowrap;
}
.share-table td:nth-child(3),
.share-table th:nth-child(3),
.share-table td:nth-child(4),
.share-table th:nth-child(4),
.share-table td:nth-child(5),
.share-table th:nth-child(5) {
  text-align: left;
}
.share-target-cell strong {
  display: block;
  max-width: 145px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.share-table td:nth-child(3) .small,
.share-table td:nth-child(4) .small,
.share-table td:nth-child(5) .small {
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.share-row-actions {
  min-width: 92px !important;
  flex-wrap: nowrap !important;
}

/* v53.65 자료실/업무공유/업무일지 UI 보정 */
.library-table th:nth-child(4),
.library-table td:nth-child(4) {
  padding-left: 16px !important;
  padding-right: 26px !important;
}
.library-download-cell { cursor: default !important; }
.library-open-cell,
.library-download-cell .library-download-link { cursor: pointer !important; }
.library-row.library-title-hover > td { background: #f8fafc !important; }
.library-open-cell:hover { background: #f8fafc !important; }
.library-open-cell:hover strong { text-decoration: none !important; color: #111827 !important; }

.share-table[class*="share-layout-"] {
  table-layout: fixed;
  width: 100%;
}
.share-table[class*="share-layout-"] th,
.share-table[class*="share-layout-"] td {
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.share-table[class*="share-layout-"] td strong,
.share-table[class*="share-layout-"] td .small {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.share-table.share-layout-all th:nth-child(1),
.share-table.share-layout-all td:nth-child(1),
.share-table.share-layout-manual th:nth-child(1),
.share-table.share-layout-manual td:nth-child(1) { width: 92px !important; min-width: 92px !important; text-align: center !important; }
.share-table.share-layout-all th:nth-child(2),
.share-table.share-layout-all td:nth-child(2),
.share-table.share-layout-manual th:nth-child(2),
.share-table.share-layout-manual td:nth-child(2) { width: 150px !important; min-width: 140px !important; max-width: 170px !important; text-align: left !important; }
.share-table.share-layout-all th:nth-child(3),
.share-table.share-layout-all td:nth-child(3),
.share-table.share-layout-manual th:nth-child(3),
.share-table.share-layout-manual td:nth-child(3) { width: auto !important; min-width: 260px !important; text-align: left !important; }
.share-table.share-layout-all th:nth-child(4),
.share-table.share-layout-all td:nth-child(4),
.share-table.share-layout-manual th:nth-child(4),
.share-table.share-layout-manual td:nth-child(4) { width: 112px !important; min-width: 108px !important; text-align: center !important; }
.share-table.share-layout-all th:nth-child(5),
.share-table.share-layout-all td:nth-child(5),
.share-table.share-layout-manual th:nth-child(5),
.share-table.share-layout-manual td:nth-child(5) { width: 84px !important; min-width: 80px !important; text-align: center !important; }
.share-table.share-layout-all th:nth-child(6),
.share-table.share-layout-all td:nth-child(6),
.share-table.share-layout-manual th:nth-child(6),
.share-table.share-layout-manual td:nth-child(6) { width: 64px !important; min-width: 60px !important; text-align: center !important; }
.share-table.share-layout-all th:nth-child(7),
.share-table.share-layout-all td:nth-child(7),
.share-table.share-layout-manual th:nth-child(7),
.share-table.share-layout-manual td:nth-child(7) { width: 108px !important; min-width: 104px !important; text-align: center !important; }

.share-table.share-layout-document th:nth-child(1),
.share-table.share-layout-document td:nth-child(1),
.share-table.share-layout-document th:nth-child(2),
.share-table.share-layout-document td:nth-child(2),
.share-table.share-layout-as th:nth-child(1),
.share-table.share-layout-as td:nth-child(1),
.share-table.share-layout-as th:nth-child(2),
.share-table.share-layout-as td:nth-child(2) { width: 92px !important; min-width: 88px !important; text-align: center !important; }
.share-table.share-layout-document th:nth-child(3),
.share-table.share-layout-document td:nth-child(3),
.share-table.share-layout-as th:nth-child(3),
.share-table.share-layout-as td:nth-child(3) { width: 160px !important; min-width: 150px !important; text-align: left !important; }
.share-table.share-layout-document th:nth-child(4),
.share-table.share-layout-document td:nth-child(4),
.share-table.share-layout-as th:nth-child(4),
.share-table.share-layout-as td:nth-child(4) { width: auto !important; min-width: 320px !important; text-align: left !important; }
.share-table.share-layout-document th:nth-child(5),
.share-table.share-layout-document td:nth-child(5),
.share-table.share-layout-as th:nth-child(5),
.share-table.share-layout-as td:nth-child(5) { width: 84px !important; min-width: 80px !important; text-align: center !important; }
.share-table.share-layout-document th:nth-child(6),
.share-table.share-layout-document td:nth-child(6),
.share-table.share-layout-as th:nth-child(6),
.share-table.share-layout-as td:nth-child(6) { width: 70px !important; min-width: 64px !important; text-align: center !important; }
.share-table.share-layout-material th:nth-child(4),
.share-table.share-layout-material td:nth-child(4) {  max-width: none !important; }
.share-table.share-layout-material th:nth-child(5),
.share-table.share-layout-material td:nth-child(5) { width: 86px !important; min-width: 78px !important; text-align: center !important; }
.share-table.share-layout-material th:nth-child(6),
.share-table.share-layout-material td:nth-child(6) { width: 76px !important; min-width: 70px !important; text-align: center !important; }
.share-table.share-layout-revenue th:nth-child(7),
.share-table.share-layout-revenue td:nth-child(7),
.share-table.share-layout-purchase th:nth-child(7),
.share-table.share-layout-purchase td:nth-child(7) { width: 92px !important; min-width: 84px !important; text-align: center !important; }
/* v56.03.87: v53.62~63 설정 드래그 정렬/저장상태 규칙을 자료실·업무공유 CSS에서 분리. */
.setting-draggable-chip {
  cursor: grab;
}
.setting-draggable-chip.dragging {
  cursor: grabbing;
}
.setting-draggable-chip.drag-over {
  outline: 2px dashed #94a3b8;
  outline-offset: 2px;
  background: #f8fafc;
}
.setting-drag-handle {
  cursor: grab !important;
  border: 1px solid #dbe4f0 !important;
  background: #f8fafc !important;
  color: #475569 !important;
  width: 24px !important;
  height: 24px !important;
  padding: 0 !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  line-height: 1 !important;
}
.setting-fixed-chip {
  cursor: default;
}

.setting-fixed-chip button:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.setting-wide-row-card .setting-mini-head .setting-order-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  min-width: 0;
  font-size: 11px;
  font-weight: 800;
  color: #64748b;
  white-space: nowrap;
}
.setting-order-state.saving { color: #2563eb; }
.setting-order-state.done { color: #16a34a; }
.setting-order-state.error { color: #dc2626; }
.setting-chip-list li {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  min-width: 0 !important;
  flex-wrap: nowrap !important;
}
.setting-chip-list li .setting-chip-label,
.setting-chip-list li > span:not(.setting-order-state) {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}
.setting-chip-actions {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.setting-chip-list li button {
  flex: 0 0 auto !important;
  white-space: nowrap !important;
}
.setting-drag-handle {
  width: 26px !important;
  min-width: 26px !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  text-align: center !important;
  cursor: grab !important;
}
.setting-draggable-chip.dragging {
  opacity: .58;
}
.setting-chip-list li.drag-over {
  outline: 2px dashed #94a3b8;
  outline-offset: 2px;
  background: #f8fafc;
}
/* v53.66 업무공유 현장문서 원본 연동 */
.share-candidate-panel {
  margin-top: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #f8fafc;
  padding: 10px;
}
.share-candidate-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.share-candidate-toolbar input {
  flex: 1 1 auto;
  min-width: 0;
  height: 34px;
  border: 1px solid #dbe4f0;
  border-radius: 10px;
  padding: 0 10px;
  background: #fff;
  font-size: 12px;
}
.share-candidate-scroll {
  max-height: 280px;
  overflow: auto;
  background: #fff;
  border-radius: 12px;
}
.share-candidate-table th:nth-child(1),
.share-candidate-table td:nth-child(1) { width: 86px; text-align: center; white-space: nowrap; }
.share-candidate-table th:nth-child(2),
.share-candidate-table td:nth-child(2) { width: 120px; text-align: center; white-space: nowrap; }
.share-candidate-table th:nth-child(3),
.share-candidate-table td:nth-child(3) { width: 170px; }
.share-candidate-table th:nth-child(5),
.share-candidate-table td:nth-child(5) { width: 70px; text-align: center; }
.share-file-actions {
  justify-content: center;
  gap: 4px;
  min-width: 0 !important;
}
.share-file-actions .small-btn,
.share-source-actions .btn {
  white-space: nowrap;
}
.share-source-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.share-table.share-layout-document th:nth-child(1),
.share-table.share-layout-document td:nth-child(1) { width: 88px !important; min-width: 84px !important; text-align: center !important; }
.share-table.share-layout-document th:nth-child(2),
.share-table.share-layout-document td:nth-child(2) { width: 124px !important; min-width: 116px !important; text-align: center !important; }
.share-table.share-layout-document th:nth-child(3),
.share-table.share-layout-document td:nth-child(3) { width: 180px !important; min-width: 160px !important; text-align: left !important; }
.share-table.share-layout-document th:nth-child(4),
.share-table.share-layout-document td:nth-child(4) { width: auto !important; min-width: 260px !important; text-align: left !important; }
.share-table.share-layout-document th:nth-child(5),
.share-table.share-layout-document td:nth-child(5) { width: 132px !important; min-width: 122px !important; text-align: center !important; }
.share-table.share-layout-document th:nth-child(6),
.share-table.share-layout-document td:nth-child(6) { width: 70px !important; min-width: 64px !important; text-align: center !important; }
.share-table.share-layout-document th:nth-child(7),
.share-table.share-layout-document td:nth-child(7) { width: 86px !important; min-width: 80px !important; text-align: center !important; }
@media(max-width: 760px) {
  .share-candidate-toolbar { flex-direction: column; align-items: stretch; }
  .share-source-actions { align-items: stretch; }
  .share-source-actions .btn { justify-content: center; }
}

/* v53.67 업무공유 현장문서 묶음/선택 UI */
.clickable-input { cursor: pointer; background: #f8fafc; }
.share-selected-site-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  margin: 8px 0;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #f8fafc;
  font-size: 12px;
}
.share-selected-site-box strong { font-size: 13px; color: #0f172a; }
.share-selected-site-box span { color: #475569; font-weight: 700; }
.share-selected-site-box em { color: #64748b; font-style: normal; }
.share-check-label { display: inline-flex; align-items: center; gap: 5px; font-weight: 800; white-space: nowrap; }
.share-check-label input { margin: 0; }
.share-site-candidate-table th:nth-child(1),
.share-site-candidate-table td:nth-child(1) { width: 92px; text-align: center; white-space: nowrap; }
.share-site-candidate-table th:nth-child(2),
.share-site-candidate-table td:nth-child(2) { width: 190px; }
.share-site-candidate-table th:nth-child(3),
.share-site-candidate-table td:nth-child(3) { width: 180px; }
.share-site-candidate-table th:nth-child(5),
.share-site-candidate-table td:nth-child(5) { width: 82px; text-align: center; }

/* v53.68 업무공유 자료찾기/협력정산 UI 정리 */
.share-dashboard.compact-summary-row {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.share-dashboard.compact-summary-row .card:nth-child(7) { background: #f8fafc; }
.share-source-picker-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e5e7eb;
}
.share-source-picker-row .strong-label {
  font-weight: 900;
  color: #334155;
  margin-right: 2px;
}
.share-source-picker-row .small-btn {
  padding: 6px 9px;
  font-size: 11px;
  border-radius: 9px;
}
.share-send-body {
  width: 100%;
  min-height: 190px;
  resize: vertical;
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  padding: 11px 12px;
  font-size: 13px;
  line-height: 1.55;
  background: #fff;
}
.share-source-picker-modal { max-width: 920px; }
.share-source-picker-list {
  max-height: 560px;
  overflow: auto;
  margin-top: 10px;
}
.share-table.share-layout-settlement th:nth-child(1),
.share-table.share-layout-settlement td:nth-child(1) { width: 110px !important; min-width: 96px !important; text-align: center !important; }
.share-table.share-layout-settlement th:nth-child(3),
.share-table.share-layout-settlement td:nth-child(3) { width: auto !important; min-width: 360px !important; text-align: left !important; }
.share-chip-grid:empty { display: none; }
@media (max-width: 1440px) {
  }
@media (max-width: 880px) {
    .share-source-picker-row { align-items: stretch; }
}

/* v53.69 업무공유 작성/자료찾기 모달 버튼 상단 통일 */
.share-draft-header-actions,
.share-source-picker-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.share-source-picker-header-actions .small-btn {
  padding: 7px 10px;
  font-size: 11px;
  border-radius: 9px;
}
.share-source-picker-header-actions .small-btn.active {
  border-color: #111827;
  color: #111827;
  background: #f8fafc;
}

/* v53.78 자료찾기 상단 버튼 크기 통일 */
#shareSourcePickerAllToggle.active {
  border-color: #111827;
  color: #111827;
  background: #f8fafc;
}
.share-draft-modal > .modal-actions,
.share-detail-modal > .modal-actions,
.share-source-picker-modal > .modal-actions,
.address-picker-modal > .modal-actions {
  display: none !important;
}
@media (max-width: 760px) {
  .share-draft-header-actions,
  .share-source-picker-header-actions { justify-content: flex-start; }
}

/* v53.80 업무공유 AS 날짜 범위 선택 */
.share-date-range-box {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0 10px;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
}
.share-date-range-box label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  color: #334155;
}
.share-date-range-box input[type="date"] {
  min-width: 142px;
  height: 34px;
  border: 1px solid #dbe4f0;
  border-radius: 9px;
  padding: 0 9px;
  font-size: 12px;
}

/* v53.81 업무공유 AS내역 리스트 폭 보정: 상태/공유 컬럼이 우측으로 밀리지 않도록 AS 레이아웃만 재정의 */
.share-table.share-layout-as th:nth-child(1),
.share-table.share-layout-as td:nth-child(1) { width: 86px !important; min-width: 78px !important; text-align: center !important; }
.share-table.share-layout-as th:nth-child(2),
.share-table.share-layout-as td:nth-child(2) { width: 170px !important; min-width: 135px !important; max-width: 190px !important; text-align: left !important; }
.share-table.share-layout-as th:nth-child(3),
.share-table.share-layout-as td:nth-child(3) { width: 82px !important; min-width: 72px !important; max-width: 90px !important; text-align: center !important; }
.share-table.share-layout-as th:nth-child(4),
.share-table.share-layout-as td:nth-child(4) { width: auto !important; min-width: 180px !important; text-align: left !important; }
.share-table.share-layout-as th:nth-child(5),
.share-table.share-layout-as td:nth-child(5) { width: 72px !important; min-width: 64px !important; max-width: 82px !important; text-align: center !important; }
.share-table.share-layout-as th:nth-child(6),
.share-table.share-layout-as td:nth-child(6) { width: 82px !important; min-width: 74px !important; max-width: 92px !important; text-align: center !important; }
.share-table.share-layout-as .btn.small-btn { padding: 5px 8px !important; font-size: 11px !important; min-width: 0 !important; }


/* v53.86 문서업무/인수인계서 기본 자리 */
.share-dashboard.compact-summary-row {
  grid-template-columns: repeat(8, minmax(0, 1fr));
}
.share-dashboard.compact-summary-row .card:nth-child(8) { background: #fefce8; }

/* v53.89: 업무공유 정산/AS 리스트 및 입출금 컬럼 폭 보정 */
.share-table.share-layout-settlement th:nth-child(2),
.share-table.share-layout-settlement td:nth-child(2) { width: 200px !important; min-width: 170px !important; text-align: left !important; }
.share-table.share-layout-settlement th:nth-child(3),
.share-table.share-layout-settlement td:nth-child(3) { width: auto !important; min-width: 300px !important; text-align: left !important; }
.share-table.share-layout-settlement th:nth-child(4),
.share-table.share-layout-settlement td:nth-child(4) { width: 130px !important; min-width: 118px !important; text-align: right !important; }

.share-table.share-layout-as th:nth-child(2),
.share-table.share-layout-as td:nth-child(2) { width: 180px !important; min-width: 150px !important; max-width: 210px !important; text-align: left !important; }
.share-table.share-layout-as th:nth-child(3),
.share-table.share-layout-as td:nth-child(3) { width: 108px !important; min-width: 96px !important; max-width: 120px !important; text-align: center !important; }
.share-table.share-layout-as th:nth-child(4),
.share-table.share-layout-as td:nth-child(4) { min-width: 170px !important; }

.share-table.share-layout-revenue th:nth-child(3),
.share-table.share-layout-revenue td:nth-child(3),
.share-table.share-layout-purchase th:nth-child(3),
.share-table.share-layout-purchase td:nth-child(3) { width: 150px !important; min-width: 135px !important; text-align: left !important; }
.share-table.share-layout-revenue th:nth-child(6),
.share-table.share-layout-revenue td:nth-child(6),
.share-table.share-layout-purchase th:nth-child(6),
.share-table.share-layout-purchase td:nth-child(6) { width: 118px !important; min-width: 108px !important; text-align: right !important; }

.ledger-table th:nth-child(1), .ledger-table td:nth-child(1) { width: 92px !important; min-width: 84px !important; }
.ledger-table th:nth-child(2), .ledger-table td:nth-child(2) { width: 130px !important; min-width: 112px !important; }
.ledger-table th:nth-child(3), .ledger-table td:nth-child(3) { width: auto !important; min-width: 300px !important; white-space: normal !important; }
.ledger-table th:nth-child(4), .ledger-table td:nth-child(4) { width: 128px !important; min-width: 112px !important; }
.ledger-table th:nth-child(5), .ledger-table td:nth-child(5) { width: 128px !important; min-width: 112px !important; }
.ledger-table th:nth-child(6), .ledger-table td:nth-child(6) { width: 104px !important; min-width: 92px !important; text-align: center !important; }
.ledger-table th:nth-child(7), .ledger-table td:nth-child(7) { width: 92px !important; min-width: 84px !important; text-align: center !important; }
.ledger-running-balance {
  color: #2563eb;
  font-weight: 900;
}

/* v53.90: 입출금/업무공유 금액 컬럼 2줄 고정 표시 */
.ledger-amount-stack,
.share-money-amount-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  line-height: 1.15;
  white-space: nowrap;
}
.ledger-amount-stack .ledger-direction-label,
.share-money-amount-stack .ledger-direction-label {
  display: block;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.1;
}
.ledger-amount-stack .ledger-amount-value,
.share-money-amount-stack .ledger-amount-value {
  display: block;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.15;
}
.share-money-amount-cell {
  text-align: right !important;
  white-space: nowrap !important;
}
.ledger-amount-stack .ledger-direction-label,
.share-money-amount-stack .ledger-direction-label {
  margin-right: 0;
}

/* v53.91: 업무공유 리스트 컬럼 간소화 */
.share-table.share-layout-document th:nth-child(1),
.share-table.share-layout-document td:nth-child(1) { width: 104px !important; min-width: 96px !important; text-align: center !important; }
.share-table.share-layout-document th:nth-child(2),
.share-table.share-layout-document td:nth-child(2) { width: 210px !important; min-width: 170px !important; text-align: left !important; }
.share-table.share-layout-document th:nth-child(3),
.share-table.share-layout-document td:nth-child(3) { width: 180px !important; min-width: 150px !important; text-align: left !important; }
.share-table.share-layout-document th:nth-child(4),
.share-table.share-layout-document td:nth-child(4) { width: auto !important; min-width: 320px !important; text-align: left !important; }

.share-table.share-layout-settlement th:nth-child(1),
.share-table.share-layout-settlement td:nth-child(1) { width: 104px !important; min-width: 96px !important; text-align: center !important; }
.share-table.share-layout-settlement th:nth-child(2),
.share-table.share-layout-settlement td:nth-child(2) { width: 190px !important; min-width: 160px !important; text-align: left !important; }
.share-table.share-layout-settlement th:nth-child(3),
.share-table.share-layout-settlement td:nth-child(3) { width: 130px !important; min-width: 118px !important; text-align: right !important; }
.share-table.share-layout-settlement th:nth-child(4),
.share-table.share-layout-settlement td:nth-child(4) { width: auto !important; min-width: 320px !important; text-align: left !important; }

.share-table.share-layout-as th:nth-child(1),
.share-table.share-layout-as td:nth-child(1) { width: 96px !important; min-width: 86px !important; text-align: center !important; }
.share-table.share-layout-as th:nth-child(2),
.share-table.share-layout-as td:nth-child(2) { width: 190px !important; min-width: 155px !important; max-width: 220px !important; text-align: left !important; }
.share-table.share-layout-as th:nth-child(3),
.share-table.share-layout-as td:nth-child(3) { width: 118px !important; min-width: 102px !important; max-width: 130px !important; text-align: center !important; }
.share-table.share-layout-as th:nth-child(4),
.share-table.share-layout-as td:nth-child(4) { width: auto !important; min-width: 360px !important; text-align: left !important; }

.share-table.share-layout-material th:nth-child(1),
.share-table.share-layout-material td:nth-child(1) { width: 96px !important; min-width: 86px !important; text-align: center !important; }
.share-table.share-layout-material th:nth-child(2),
.share-table.share-layout-material td:nth-child(2) { width: 210px !important; min-width: 180px !important; max-width: 240px !important; text-align: left !important; }
.share-table.share-layout-material th:nth-child(3),
.share-table.share-layout-material td:nth-child(3) { width: 230px !important; min-width: 190px !important; max-width: 260px !important; text-align: left !important; }
.share-table.share-layout-material th:nth-child(4),
.share-table.share-layout-material td:nth-child(4) { width: auto !important; min-width: 360px !important; text-align: left !important; }

.share-table.share-layout-revenue th:nth-child(1),
.share-table.share-layout-revenue td:nth-child(1),
.share-table.share-layout-revenue th:nth-child(2),
.share-table.share-layout-revenue td:nth-child(2),
.share-table.share-layout-purchase th:nth-child(1),
.share-table.share-layout-purchase td:nth-child(1),
.share-table.share-layout-purchase th:nth-child(2),
.share-table.share-layout-purchase td:nth-child(2) { width: 96px !important; min-width: 86px !important; text-align: center !important; }
.share-table.share-layout-revenue th:nth-child(3),
.share-table.share-layout-revenue td:nth-child(3),
.share-table.share-layout-purchase th:nth-child(3),
.share-table.share-layout-purchase td:nth-child(3) { width: 170px !important; min-width: 145px !important; text-align: left !important; }
.share-table.share-layout-revenue th:nth-child(4),
.share-table.share-layout-revenue td:nth-child(4),
.share-table.share-layout-purchase th:nth-child(4),
.share-table.share-layout-purchase td:nth-child(4) { width: 190px !important; min-width: 150px !important; text-align: left !important; }
.share-table.share-layout-revenue th:nth-child(5),
.share-table.share-layout-revenue td:nth-child(5),
.share-table.share-layout-purchase th:nth-child(5),
.share-table.share-layout-purchase td:nth-child(5) { width: auto !important; min-width: 380px !important; text-align: left !important; }
.share-inline-amount {
  display: inline-block;
  white-space: nowrap;
  font-weight: 900;
}
.share-money-inline-line .share-inline-amount {
  margin-left: 2px;
}


/* v53.92: 업무공유 협력정산 간격/외부 공유 문서 모달 보정 */
.share-table.share-layout-settlement th:nth-child(1),
.share-table.share-layout-settlement td:nth-child(1) { width: 96px !important; min-width: 88px !important; text-align: center !important; }
.share-table.share-layout-settlement th:nth-child(2),
.share-table.share-layout-settlement td:nth-child(2) { width: 145px !important; min-width: 125px !important; max-width: 170px !important; text-align: left !important; }
.share-table.share-layout-settlement th:nth-child(3),
.share-table.share-layout-settlement td:nth-child(3) { width: 116px !important; min-width: 106px !important; max-width: 124px !important; text-align: right !important; padding-left: 6px !important; }
.share-table.share-layout-settlement th:nth-child(4),
.share-table.share-layout-settlement td:nth-child(4) { width: auto !important; min-width: 360px !important; text-align: left !important; }

/* v53.93: 업무공유 협력정산 리스트 간격 재보정 */
.share-table.share-layout-settlement {
  table-layout: fixed !important;
  width: 100% !important;
}
.share-table.share-layout-settlement th:nth-child(1),
.share-table.share-layout-settlement td:nth-child(1) {
  width: 92px !important;
  min-width: 86px !important;
  max-width: 96px !important;
  text-align: center !important;
}
.share-table.share-layout-settlement th:nth-child(2),
.share-table.share-layout-settlement td:nth-child(2) {
  width: 126px !important;
  min-width: 112px !important;
  max-width: 138px !important;
  text-align: left !important;
  padding-right: 4px !important;
}
.share-table.share-layout-settlement th:nth-child(3),
.share-table.share-layout-settlement td:nth-child(3) {
  width: 108px !important;
  min-width: 98px !important;
  max-width: 116px !important;
  text-align: right !important;
  padding-left: 4px !important;
  padding-right: 8px !important;
}
.share-table.share-layout-settlement th:nth-child(4),
.share-table.share-layout-settlement td:nth-child(4) {
  width: auto !important;
  min-width: 400px !important;
  text-align: left !important;
}

/* v53.97: 업무공유 문서형 자료에서 저장 PDF가 없을 때 표시 */
.share-muted { color: #94a3b8; font-size: 12px; font-weight: 700; white-space: nowrap; }
/* v54.13: 주소록 폼/목록 스크롤 안정화 */
.address-book-card-modal {
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}
.address-book-card-modal > .modal-header,
.address-book-card-modal > .modal-actions {
  flex: 0 0 auto;
}
.address-book-card-modal .address-book-card-layout {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.address-book-card-modal .address-book-form-pane,
.address-book-card-modal .address-book-preview-pane {
  min-height: 0;
  overflow: auto;
}
.company-address-wrap {
  max-height: calc(100vh - 260px);
  overflow: auto;
}
.company-address-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fafc;
}
/* v54.15 공통 팝업/달력 정리 */
.modal-close,
.modal-head .modal-close,
.modal-header .modal-close,
.address-common-picker-close,
.quote-address-picker-close {
  border: 0 !important;
  background: #2563eb !important;
  color: #fff !important;
  border-radius: 10px !important;
  padding: 8px 13px !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
}
.modal-close:hover,
.modal-head .modal-close:hover,
.modal-header .modal-close:hover { filter: brightness(.96); }
input[type="date"]::-webkit-calendar-picker-indicator { opacity: 0; display: none; }
input[type="date"] { cursor: pointer; }

/* v56.03.88: modal header action rules consolidated from modal-header-actions.css */
.modal-header-actions { display: inline-flex; align-items: center; gap: 8px; }
/* 업무관리 기간/compact UI 통합 */
.worklog-dashboard.compact-summary-row { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.worklog-period-card .card-value { font-size: 18px !important; line-height: 1.15; word-break: keep-all; }
.worklog-period-range-info { margin: 0; text-align: center; font-weight: 800; color: #2563eb; }
@media (max-width: 1400px) { .worklog-dashboard.compact-summary-row { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 760px) { .worklog-dashboard.compact-summary-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* v54.16 업무일지 카드/기간 팝업 compact 보정 */
@media (min-width: 901px) {
  .worklog-dashboard.compact-summary-row,
  .worklog-dashboard.compact-summary-row.grid-4 {
    display: grid !important;
    grid-template-columns: repeat(7, minmax(86px, 1fr)) !important;
    gap: 8px !important;
  }
  .worklog-dashboard.compact-summary-row .dashboard-action-card,
  .worklog-dashboard.compact-summary-row .card {
    min-width: 0 !important;
    padding: 10px 9px !important;
    border-radius: 14px !important;
  }
  .worklog-dashboard.compact-summary-row .card-title {
    font-size: 12px !important;
    line-height: 1.15 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .worklog-dashboard.compact-summary-row .card-value {
    font-size: 22px !important;
    line-height: 1.05 !important;
    margin-top: 4px !important;
    white-space: nowrap !important;
  }
  .worklog-dashboard.compact-summary-row .worklog-period-card .card-value {
    font-size: 15px !important;
    line-height: 1.1 !important;
    letter-spacing: -0.04em !important;
  }
  .worklog-dashboard.compact-summary-row .card-sub {
    font-size: 10px !important;
    line-height: 1.15 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    margin-top: 4px !important;
  }
}
.worklog-period-range-info {
  overflow-x: auto !important;
  word-break: keep-all !important;
  line-height: 1.35 !important;
  padding: 10px 12px !important;
}
@media (max-width: 900px) {
  .worklog-dashboard.compact-summary-row,
  .worklog-dashboard.compact-summary-row.grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 520px) {
  .worklog-dashboard.compact-summary-row,
  .worklog-dashboard.compact-summary-row.grid-4 { grid-template-columns: 1fr !important; }
}
/* v54.16 새현장 등록 폼 재배치 보정 */
.site-register-form-grid .span-2 {
  min-width: 0;
}
@media (max-width: 900px) {
  .site-register-form-grid .span-2 { grid-column: span 2; }
}
@media (max-width: 760px) {
  .site-register-form-grid .span-2 { grid-column: span 1; }
}

/* v54.17 현장등록/업무일지 UI 추가 보정 */
@media (min-width: 901px) {
  .site-register-form-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    align-items: end !important;
  }
  .site-register-form-grid .form-field,
  .site-register-form-grid input,
  .site-register-form-grid select {
    min-width: 0 !important;
  }
}
.site-register-empty-cell {
  visibility: hidden;
  pointer-events: none;
}
@media (max-width: 900px) {
  .site-register-empty-cell { display: none !important; }
}
#siteDetailContractTypeBox.locked-field,
#siteDetailCompanyBox.locked-field,
.locked-field:disabled {
  background: #f8fafc !important;
  color: #64748b !important;
  cursor: not-allowed !important;
}
.worklog-period-range-info {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  max-width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: visible !important;
  white-space: nowrap !important;
  font-size: 13px !important;
  letter-spacing: -0.03em !important;
}
@media (max-width: 520px) {
  .worklog-period-range-info {
    font-size: 12px !important;
    padding: 8px 6px !important;
    letter-spacing: -0.05em !important;
  }
}

/* v54.18: 업무일지 상세는 우측 처리이력 없이 단일 입력 패널로 사용 */
.worklog-modal-grid { grid-template-columns: 1fr !important; }
.worklog-history-panel { display:none !important; }
/* v54.20 업무공유 카드 2단 구성 준비: 제목/수량 2칸만 사용, PC 8열 유지 */
.share-dashboard.compact-summary-row {
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 6px;
  align-items: stretch;
}
.share-dashboard.compact-summary-row .card {
  min-height: 50px;
  padding: 7px 8px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
}
.share-dashboard.compact-summary-row .card-title {
  font-size: 11px;
  line-height: 1.1;
  margin: 0;
  white-space: nowrap;
}
.share-dashboard.compact-summary-row .card-value {
  font-size: 17px;
  line-height: 1;
  margin: 0;
}
.share-dashboard.compact-summary-row .card-sub { display: none !important; }
@media (max-width: 1440px) {
  .share-dashboard.compact-summary-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 880px) {
  .share-dashboard.compact-summary-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .share-dashboard.compact-summary-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .share-dashboard.compact-summary-row .card { min-height: 48px; }
}

/* v54.21 업무공유 대분류 카드 + 하위 미니카드 1차 정리 */
.share-dashboard.compact-summary-row.share-major-dashboard {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}
.share-major-dashboard .share-type-card {
  min-height: 58px;
  padding: 8px 10px;
  align-items: stretch;
  justify-content: center;
}
.share-major-dashboard .share-type-card .card-title,
.share-major-dashboard .share-type-card .card-value {
  text-align: center;
}
.share-major-dashboard .share-type-card .card-title { font-size: 12px; }
.share-major-dashboard .share-type-card .card-value { font-size: 18px; }
.share-sub-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: -2px 0 10px;
  padding: 8px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #f8fafc;
}
.share-mini-filter {
  border: 1px solid #d7dde7;
  border-radius: 999px;
  padding: 6px 11px;
  background: #fff;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: .15s ease;
}
.share-mini-filter:hover { border-color: #94a3b8; background: #f1f5f9; }
.share-mini-filter.active {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
  box-shadow: 0 4px 10px rgba(37,99,235,.18);
}
.share-table.share-layout-library th:nth-child(1),
.share-table.share-layout-library td:nth-child(1) { width: 110px; min-width: 110px; text-align: center; white-space: nowrap; }
.share-table.share-layout-library th:nth-child(2),
.share-table.share-layout-library td:nth-child(2) { width: 150px; min-width: 130px; }
.share-table.share-layout-library th:nth-child(5),
.share-table.share-layout-library td:nth-child(5) { width: 92px; text-align: center; white-space: nowrap; }
@media (max-width: 1440px) {
  .share-dashboard.compact-summary-row.share-major-dashboard { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 880px) {
  .share-dashboard.compact-summary-row.share-major-dashboard { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .share-sub-filter-bar { padding: 7px; }
  .share-mini-filter { padding: 6px 9px; font-size: 11px; }
}

/* v54.22: 업무공유 자료실 리스트 폭 보정 - 분류 축소, 제목/모델 확대, 다운로드는 상세 팝업에서만 */
.share-table.share-layout-library th:nth-child(1),
.share-table.share-layout-library td:nth-child(1) {
  width: 96px !important;
  min-width: 86px !important;
  max-width: 104px !important;
  text-align: center !important;
  white-space: nowrap !important;
}
.share-table.share-layout-library th:nth-child(2),
.share-table.share-layout-library td:nth-child(2) {
  width: 118px !important;
  min-width: 104px !important;
  max-width: 130px !important;
  text-align: center !important;
}
.share-table.share-layout-library th:nth-child(3),
.share-table.share-layout-library td:nth-child(3) {
  width: auto !important;
  min-width: 360px !important;
  text-align: left !important;
}
.share-table.share-layout-library th:nth-child(4),
.share-table.share-layout-library td:nth-child(4) {
  width: 260px !important;
  min-width: 220px !important;
  max-width: 320px !important;
  text-align: left !important;
}
.share-table.share-layout-site-sources th:nth-child(1),
.share-table.share-layout-site-sources td:nth-child(1),
.share-table.share-layout-as-history th:nth-child(1),
.share-table.share-layout-as-history td:nth-child(1),
.share-table.share-layout-tax_invoice th:nth-child(1),
.share-table.share-layout-tax_invoice td:nth-child(1),
.share-table.share-layout-tax_invoice th:nth-child(2),
.share-table.share-layout-tax_invoice td:nth-child(2),
.share-table.share-layout-address_docs th:nth-child(1),
.share-table.share-layout-address_docs td:nth-child(1) {
  width: 96px !important;
  min-width: 86px !important;
  text-align: center !important;
}
.share-table.share-layout-site-sources th:nth-child(2),
.share-table.share-layout-site-sources td:nth-child(2),
.share-table.share-layout-as-history th:nth-child(2),
.share-table.share-layout-as-history td:nth-child(2),
.share-table.share-layout-tax_invoice th:nth-child(3),
.share-table.share-layout-tax_invoice td:nth-child(3),
.share-table.share-layout-address_docs th:nth-child(2),
.share-table.share-layout-address_docs td:nth-child(2) {
  width: 190px !important;
  min-width: 150px !important;
  text-align: left !important;
}
.share-table.share-layout-site-sources th:nth-child(3),
.share-table.share-layout-site-sources td:nth-child(3),
.share-table.share-layout-as-history th:nth-child(3),
.share-table.share-layout-as-history td:nth-child(3),
.share-table.share-layout-address_docs th:nth-child(3),
.share-table.share-layout-address_docs td:nth-child(3) {
  width: 120px !important;
  min-width: 104px !important;
  text-align: center !important;
}
.share-table.share-layout-site-sources th:nth-child(4),
.share-table.share-layout-site-sources td:nth-child(4),
.share-table.share-layout-as-history th:nth-child(4),
.share-table.share-layout-as-history td:nth-child(4),
.share-table.share-layout-address_docs th:nth-child(4),
.share-table.share-layout-address_docs td:nth-child(4) {
  width: auto !important;
  min-width: 320px !important;
  text-align: left !important;
}
.share-table.share-layout-tax_invoice th:nth-child(4),
.share-table.share-layout-tax_invoice td:nth-child(4) {
  width: 170px !important;
  min-width: 140px !important;
  text-align: left !important;
}
.share-table.share-layout-tax_invoice th:nth-child(5),
.share-table.share-layout-tax_invoice td:nth-child(5) {
  width: auto !important;
  min-width: 320px !important;
  text-align: left !important;
}

/* v54.23 업무공유 보정: 정산 전체, 사업자·통장, 자재 입출고 리스트 폭 */
.share-table.share-layout-finance-sources th:nth-child(1),
.share-table.share-layout-finance-sources td:nth-child(1) { width: 92px !important; min-width: 84px !important; text-align: center !important; }
.share-table.share-layout-finance-sources th:nth-child(2),
.share-table.share-layout-finance-sources td:nth-child(2) { width: 118px !important; min-width: 104px !important; text-align: center !important; }
.share-table.share-layout-finance-sources th:nth-child(3),
.share-table.share-layout-finance-sources td:nth-child(3) { width: 190px !important; min-width: 170px !important; text-align: left !important; }
.share-table.share-layout-finance-sources th:nth-child(4),
.share-table.share-layout-finance-sources td:nth-child(4) { width: 170px !important; min-width: 140px !important; text-align: left !important; }
.share-table.share-layout-finance-sources th:nth-child(5),
.share-table.share-layout-finance-sources td:nth-child(5) { width: auto !important; min-width: 360px !important; text-align: left !important; }

.share-table.share-layout-address_docs th:nth-child(1),
.share-table.share-layout-address_docs td:nth-child(1) { width: 92px !important; min-width: 84px !important; text-align: center !important; }
.share-table.share-layout-address_docs th:nth-child(2),
.share-table.share-layout-address_docs td:nth-child(2) { width: 260px !important; min-width: 220px !important; max-width: 330px !important; text-align: left !important; }
.share-table.share-layout-address_docs th:nth-child(3),
.share-table.share-layout-address_docs td:nth-child(3),
.share-table.share-layout-address_docs th:nth-child(4),
.share-table.share-layout-address_docs td:nth-child(4) { width: auto !important; min-width: 260px !important; text-align: left !important; }

.share-table.share-layout-stock_in th:nth-child(1),
.share-table.share-layout-stock_in td:nth-child(1),
.share-table.share-layout-stock_out th:nth-child(1),
.share-table.share-layout-stock_out td:nth-child(1) { width: 92px !important; min-width: 84px !important; text-align: center !important; }
.share-table.share-layout-stock_in th:nth-child(2),
.share-table.share-layout-stock_in td:nth-child(2),
.share-table.share-layout-stock_out th:nth-child(2),
.share-table.share-layout-stock_out td:nth-child(2) { width: 190px !important; min-width: 160px !important; text-align: left !important; }
.share-table.share-layout-stock_in th:nth-child(3),
.share-table.share-layout-stock_in td:nth-child(3),
.share-table.share-layout-stock_out th:nth-child(3),
.share-table.share-layout-stock_out td:nth-child(3) { width: 240px !important; min-width: 200px !important; text-align: left !important; }
.share-table.share-layout-stock_in th:nth-child(4),
.share-table.share-layout-stock_in td:nth-child(4),
.share-table.share-layout-stock_out th:nth-child(4),
.share-table.share-layout-stock_out td:nth-child(4) { width: 86px !important; min-width: 76px !important; text-align: center !important; }
.share-table.share-layout-stock_in th:nth-child(5),
.share-table.share-layout-stock_in td:nth-child(5),
.share-table.share-layout-stock_out th:nth-child(5),
.share-table.share-layout-stock_out td:nth-child(5) { width: auto !important; min-width: 320px !important; text-align: left !important; }

/* v54.24 업무공유 보정 */
.share-row-expired {
  background: #f1f5f9 !important;
  color: #64748b;
}
.share-row-expired td {
  opacity: 0.78;
}
.share-row-expired .status {
  filter: grayscale(0.35);
}
.share-layout-address_docs .share-address-name-cell {
  min-width: 230px;
  width: 36%;
}
.share-layout-address_docs .share-address-doc-cell {
  min-width: 170px;
  width: 24%;
}
.share-status-filter-wrap {
  display: inline-flex;
}
.library-login-required-link {
  color: #64748b;
  font-weight: 700;
  font-size: 12px;
}

/* v54.25 자료실 분류명 정리 + 업무공유 자료실 컬럼 재배치 */
.library-table th:nth-child(1),
.library-table td:nth-child(1) { width: 88px !important; min-width: 82px !important; text-align: center !important; white-space: nowrap !important; }
.library-table th:nth-child(2),
.library-table td:nth-child(2) { width: 118px !important; min-width: 108px !important; text-align: center !important; white-space: nowrap !important; overflow: hidden; text-overflow: ellipsis; }
.library-table th:nth-child(3),
.library-table td:nth-child(3) { width: 124px !important; min-width: 112px !important; text-align: center !important; white-space: nowrap !important; overflow: hidden; text-overflow: ellipsis; }
.library-table th:nth-child(4),
.library-table td:nth-child(4) { width: 130px !important; min-width: 116px !important; text-align: center !important; white-space: nowrap !important; overflow: hidden; text-overflow: ellipsis; }
.library-table th:nth-child(5),
.library-table td:nth-child(5) { width: auto !important; min-width: 300px !important; text-align: left !important; padding-left: 10px !important; }
.library-table th:nth-child(6),
.library-table td:nth-child(6) { width: 118px !important; min-width: 108px !important; text-align: center !important; white-space: nowrap !important; }
.library-table th:nth-child(7),
.library-table td:nth-child(7) { width: 118px !important; min-width: 108px !important; text-align: center !important; white-space: nowrap !important; }

.share-table.share-layout-library th:nth-child(1),
.share-table.share-layout-library td:nth-child(1) { width: 92px !important; min-width: 84px !important; max-width: 104px !important; text-align: center !important; white-space: nowrap !important; }
.share-table.share-layout-library th:nth-child(2),
.share-table.share-layout-library td:nth-child(2) { width: 145px !important; min-width: 125px !important; max-width: 170px !important; text-align: center !important; white-space: nowrap !important; overflow: hidden; text-overflow: ellipsis; }
.share-table.share-layout-library th:nth-child(3),
.share-table.share-layout-library td:nth-child(3) { width: 145px !important; min-width: 125px !important; max-width: 170px !important; text-align: center !important; white-space: nowrap !important; overflow: hidden; text-overflow: ellipsis; }
.share-table.share-layout-library th:nth-child(4),
.share-table.share-layout-library td:nth-child(4) { width: 150px !important; min-width: 130px !important; max-width: 180px !important; text-align: center !important; white-space: nowrap !important; overflow: hidden; text-overflow: ellipsis; }
.share-table.share-layout-library th:nth-child(5),
.share-table.share-layout-library td:nth-child(5) { width: auto !important; min-width: 360px !important; text-align: left !important; }
/* v54.24 권한관리 보정 */
.permission-toolbar {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 12px;
}
.permission-toolbar .form-field {
  max-width: 360px;
  margin: 0;
}
.permission-user-summary {
  margin-bottom: 10px;
}


.permission-toolbar .form-field select:disabled { background: #f1f5f9; color: #94a3b8; }
/* v54.28 공유 송부: 이메일 작성·첨부·Gmail 발송 1차 */
.share-send-modal {
  width: min(1420px, calc(100vw - 34px));
  max-width: 1420px;
  max-height: calc(100vh - 34px);
  overflow: auto;
}
.share-send-common-card { margin-bottom: 12px; }
.share-send-form-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.share-send-password-line {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--border, #d8dee8);
  border-radius: 10px;
  background: #fff;
}
.share-send-channel-tabs {
  display: flex;
  gap: 8px;
  margin: 12px 0;
  padding: 5px;
  border: 1px solid var(--border, #d8dee8);
  border-radius: 12px;
  background: #f8fafc;
  overflow-x: auto;
}
.share-send-channel-tab {
  border: 0;
  border-radius: 9px;
  padding: 9px 18px;
  min-width: 96px;
  background: transparent;
  color: #64748b;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.share-send-channel-tab.active {
  color: #fff;
  background: #1f2937;
  box-shadow: 0 2px 7px rgba(15, 23, 42, .18);
}
.share-send-channel-panel { display: none; }
.share-send-channel-panel.active { display: block; }
.share-send-email-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(360px, .85fr);
  gap: 14px;
  align-items: start;
}
.share-send-email-side {
  display: grid;
  gap: 12px;
}
.share-send-email-compose-card .form-field { margin-bottom: 10px; }
.share-email-editor-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 8px;
  border: 1px solid var(--border, #d8dee8);
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  background: #f8fafc;
}
.share-email-editor {
  min-height: 410px;
  padding: 18px;
  border: 1px solid var(--border, #d8dee8);
  border-radius: 0 0 10px 10px;
  background: #fff;
  overflow: auto;
  line-height: 1.65;
  outline: none;
}
.share-email-editor:focus {
  border-color: #94a3b8;
  box-shadow: inset 0 0 0 1px #94a3b8;
}
.share-email-preview {
  min-height: 260px;
  max-height: 440px;
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--border, #d8dee8);
  border-radius: 10px;
  background: #fff;
}
.share-send-attachment-group > strong {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
}
.share-send-existing-files {
  display: grid;
  gap: 7px;
  max-height: 180px;
  overflow: auto;
  margin-bottom: 12px;
}
.share-send-file-check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 10px;
  border: 1px solid var(--border, #d8dee8);
  border-radius: 9px;
  background: #fff;
  cursor: pointer;
}
.share-send-file-check input { margin-top: 3px; }
.share-send-file-check span { min-width: 0; }
.share-send-file-check strong,
.share-send-file-check small { display: block; }
.share-send-file-check strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}
.share-send-file-check small { color: #64748b; margin-top: 2px; }
.share-send-extra-file-summary {
  margin-top: 5px;
  line-height: 1.5;
  word-break: break-all;
}
.share-gmail-account {
  min-height: 24px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f8fafc;
  color: #475569;
}
.share-send-gmail-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.share-send-gmail-actions .btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}
.share-gmail-help { margin: 9px 0 0; line-height: 1.45; word-break: break-all; }
.share-send-message-card textarea {
  min-height: 150px;
  resize: vertical;
  white-space: pre-wrap;
}
.share-send-bottom-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}
.share-send-history-list {
  margin-top: 10px;
  max-height: 420px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.share-send-history-item {
  border: 1px solid var(--border, #d8dee8);
  border-radius: 10px;
  padding: 10px 11px;
  background: #fff;
}
.share-send-history-item > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
}
.share-send-history-item > div:first-child > span,
.share-send-history-item p {
  color: var(--muted, #6b7280);
  margin: 4px 0 0;
  font-size: 12px;
}
.share-send-history-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 7px;
}
.share-send-history-status small { color: #64748b; }
@media (max-width: 1100px) {
  .share-send-email-grid { grid-template-columns: 1fr; }
  .share-send-email-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .share-send-gmail-card { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .share-send-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .share-send-email-side { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .share-send-modal { width: calc(100vw - 16px); max-height: calc(100vh - 16px); }
  .share-send-form-grid { grid-template-columns: 1fr; }
  .share-send-form-grid .span-2 { grid-column: auto; }
  .share-send-channel-tab { min-width: 84px; padding: 8px 12px; }
  .share-email-editor { min-height: 330px; padding: 12px; }
  .share-send-gmail-actions .btn { flex: 1 1 auto; }
}

/* v54.29 회사 공통자료 · 자동 첨부/자료주소 분리 */
.share-send-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}
.share-send-header-actions .btn:disabled {
  opacity: .48;
  cursor: not-allowed;
}
.share-send-group-help {
  margin: -2px 0 8px;
  line-height: 1.45;
}
.share-send-attachment-group + .share-send-attachment-group {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border, #d8dee8);
}
.share-send-auto-file,
.share-send-company-doc {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 10px;
  border: 1px solid var(--border, #d8dee8);
  border-radius: 9px;
  background: #fff;
}
.share-send-auto-file > span,
.share-send-company-doc > span { min-width: 0; }
.share-send-auto-file strong,
.share-send-auto-file small,
.share-send-company-doc strong,
.share-send-company-doc small { display: block; }
.share-send-auto-file strong,
.share-send-company-doc strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}
.share-send-auto-file small,
.share-send-company-doc small {
  color: #64748b;
  margin-top: 2px;
}
.share-send-company-doc {
  cursor: pointer;
}
.share-send-company-doc input {
  margin-top: 3px;
  flex: 0 0 auto;
}
.share-send-company-files {
  display: grid;
  gap: 7px;
}
.share-send-link-files {
  margin: 10px 0 2px;
  padding: 10px;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  background: #fff7ed;
}
.share-send-link-summary strong,
.share-send-link-summary span { display: block; }
.share-send-link-summary strong { color: #9a3412; font-size: 13px; }
.share-send-link-summary span { margin-top: 3px; color: #7c2d12; font-size: 12px; line-height: 1.45; }
.share-send-link-list {
  display: grid;
  gap: 5px;
  margin-top: 8px;
  max-height: 120px;
  overflow: auto;
}
.share-send-link-list > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-top: 5px;
  border-top: 1px dashed #fdba74;
  font-size: 12px;
}
.share-send-link-list span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.share-send-link-list small { color: #9a3412; white-space: nowrap; }
.share-send-extra-group .form-field { margin: 0; }

.company-document-settings-card,
.gmail-settings-card { margin-top: 12px; }
.company-document-guide { margin: -2px 0 12px; line-height: 1.5; }
.company-document-setting-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.company-document-setting-item {
  padding: 14px;
  border: 1px solid var(--border, #d8dee8);
  border-radius: 12px;
  background: #f8fafc;
}
.company-document-setting-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.company-document-info {
  min-height: 36px;
  margin-bottom: 9px;
  padding: 8px 9px;
  border-radius: 8px;
  background: #fff;
  color: #475569;
  line-height: 1.45;
  word-break: break-all;
}
.company-document-setting-item input[type="file"] {
  width: 100%;
  margin-bottom: 9px;
}
.company-document-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.company-document-actions .btn { min-height: 34px; }
.company-document-actions .danger { color: #b91c1c; }

@media (max-width: 900px) {
  .company-document-setting-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .share-send-modal .modal-header { align-items: flex-start; }
  .share-send-header-actions { flex-direction: column-reverse; align-items: stretch; }
  .share-send-header-actions .btn,
  .share-send-header-actions .modal-close { width: 100%; }
  .share-send-link-list > div { display: block; }
  .share-send-link-list small { display: block; margin-top: 2px; }
  .company-document-actions .btn { flex: 1 1 calc(50% - 7px); }
}

/* v54.30 외부연동 분리 · 송부화면 간소화 */
.share-send-form-grid .span-4 {
  grid-column: 1 / -1;
}
.share-send-top-company-field,
.share-send-top-extra-field {
  min-width: 0;
}
.share-send-company-files-top {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}
.share-send-company-files-top .share-send-company-doc {
  min-height: 40px;
  padding: 8px 9px;
  align-items: center;
}
.share-send-company-files-top .share-send-company-doc input {
  margin-top: 0;
}
.share-send-company-files-top .share-send-company-doc strong {
  font-size: 12px;
}
.share-send-company-files-top .share-send-company-doc small {
  display: none;
}
.share-send-extra-picker {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px;
  border: 1px solid var(--border, #d8dee8);
  border-radius: 10px;
  background: #fff;
}
.share-send-extra-picker .btn {
  flex: 0 0 auto;
}
.share-send-extra-picker .share-send-extra-file-summary {
  min-width: 0;
  margin-top: 2px;
  color: #64748b;
}
.share-send-extra-file-input,
.company-document-file-input {
  display: none !important;
}
.company-document-actions {
  justify-content: flex-start;
}
.company-document-actions .company-document-file-button {
  order: 99;
}
.integration-settings-intro,
.gmail-settings-card {
  margin-top: 12px;
}
.integration-settings-intro p {
  margin: 0;
  line-height: 1.55;
}

@media (max-width: 900px) {
  .share-send-company-files-top {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .share-send-form-grid .span-4 {
    grid-column: auto;
  }
  .share-send-extra-picker {
    flex-direction: column;
  }
  .share-send-extra-picker .btn {
    width: 100%;
  }
}


/* v54.31 공유송부 토글 UI · 회사자료 팝업 미리보기 */
.share-send-toggle-input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.share-send-toggle-button,
.share-send-company-doc-button {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--border, #d8dee8);
  border-radius: 10px;
  padding: 8px 11px;
  background: #fff;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.share-send-toggle-button:hover,
.share-send-company-doc-button:hover {
  border-color: #93c5fd;
  background: #f8fbff;
  color: #1d4ed8;
}
.share-send-toggle-button.active,
.share-send-company-doc-button.active {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
  box-shadow: 0 2px 7px rgba(37, 99, 235, .2);
}
.share-send-toggle-button:focus-visible,
.share-send-company-doc-button:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .2);
  outline-offset: 1px;
}
.share-send-company-files-top {
  min-height: 40px;
  align-items: stretch;
}
.share-send-company-files-top .preview-empty {
  min-height: 40px;
  display: flex;
  align-items: center;
  padding: 8px 10px;
}
.share-send-notice-field textarea {
  min-height: 62px;
  height: 62px;
  resize: vertical;
}
.share-send-extra-picker {
  min-height: 62px;
  height: auto;
  align-items: center;
}
.share-send-message-card textarea {
  display: block;
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 10px;
  background: #fff;
  color: #111827;
  font: inherit;
  line-height: 1.5;
  outline: none;
}
.share-send-message-card textarea:focus {
  border-color: #94a3b8;
  box-shadow: 0 0 0 1px #94a3b8;
}
.company-document-actions .company-document-file-button { order: 0; }
.company-document-actions .company-document-delete-button { order: 99; }

@media (max-width: 640px) {
  .share-send-notice-field textarea { min-height: 72px; height: auto; }
  .share-send-extra-picker { min-height: 72px; }
}


/* v54.32 - 자료실 즉시 공유 / 이메일 송부 정렬 */
.library-detail-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.library-detail-header-actions .btn,
.library-detail-header-actions .modal-close {
  flex: 0 0 auto;
}
.library-detail-header-actions .btn:disabled {
  opacity: .58;
  cursor: wait;
}
.share-email-editor,
.share-email-preview {
  text-align: left;
}
.share-email-editor > table,
.share-email-preview > table,
.share-email-editor > div,
.share-email-preview > div {
  margin-left: 0 !important;
  margin-right: auto !important;
  text-align: left !important;
}
@media (max-width: 640px) {
  .library-detail-header-actions {
    align-items: stretch;
  }
  .library-detail-header-actions .btn,
  .library-detail-header-actions .modal-close {
    min-width: 64px;
  }
}

/* v54.34 공유송부 탭 분리 · 이메일 미리보기 팝업 · 명함 이미지 서명 */
.share-send-modal > .share-send-channel-tabs {
  margin-top: 0;
}
.share-send-channel-panel[data-channel-panel="basic"] .share-send-common-card {
  margin-bottom: 0;
}
.share-send-channel-panel[data-channel-panel="email"] .share-send-email-compose-card {
  width: 100%;
  margin: 0;
}
.share-email-preview-modal {
  width: min(980px, calc(100vw - 34px));
  max-width: 980px;
  max-height: calc(100vh - 34px);
  overflow: hidden;
}
.share-email-preview-popup {
  min-height: 420px;
  max-height: calc(100vh - 150px);
  overflow: auto;
  padding: 24px;
  border: 1px solid var(--border, #d8dee8);
  border-radius: 12px;
  background: #fff;
}
.share-email-preview-popup > table,
.share-email-preview-popup > div {
  margin-left: 0 !important;
  margin-right: auto !important;
}
#shareEmailPreviewButton,
#shareGmailSendButton {
  white-space: nowrap;
}
@media (max-width: 640px) {
  .share-email-preview-modal {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
  }
  .share-email-preview-popup {
    min-height: 300px;
    max-height: calc(100vh - 125px);
    padding: 12px;
  }
  .share-send-header-actions {
    flex-wrap: wrap;
  }
}


/* v54.35 공유송부 비이메일 탭 높이 통일 · 명함형 서명 보정 */
.share-send-channel-panel[data-channel-panel="basic"],
.share-send-channel-panel[data-channel-panel="kakao"],
.share-send-channel-panel[data-channel-panel="sms"],
.share-send-channel-panel[data-channel-panel="history"] {
  min-height: 500px;
}
.share-send-channel-panel[data-channel-panel="basic"] > .card,
.share-send-channel-panel[data-channel-panel="kakao"] > .card,
.share-send-channel-panel[data-channel-panel="sms"] > .card,
.share-send-channel-panel[data-channel-panel="history"] > .card {
  min-height: 500px;
  box-sizing: border-box;
  margin-bottom: 0;
}
.share-send-channel-panel[data-channel-panel="kakao"] .share-send-message-card textarea {
  min-height: 320px;
}
.share-send-channel-panel[data-channel-panel="sms"] .share-send-message-card textarea {
  min-height: 260px;
}
@media (max-width: 640px) {
  .share-send-channel-panel[data-channel-panel="basic"],
  .share-send-channel-panel[data-channel-panel="kakao"],
  .share-send-channel-panel[data-channel-panel="sms"],
  .share-send-channel-panel[data-channel-panel="history"],
  .share-send-channel-panel[data-channel-panel="basic"] > .card,
  .share-send-channel-panel[data-channel-panel="kakao"] > .card,
  .share-send-channel-panel[data-channel-panel="sms"] > .card,
  .share-send-channel-panel[data-channel-panel="history"] > .card {
    min-height: 0;
  }
  .share-send-channel-panel[data-channel-panel="kakao"] .share-send-message-card textarea,
  .share-send-channel-panel[data-channel-panel="sms"] .share-send-message-card textarea {
    min-height: 220px;
  }
}

/* v54.36 현장명 연동 · 이메일 카드 관리 · 문자 본문 복사 */
.company-document-setting-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.company-document-actions .btn.danger,
.company-document-actions .company-document-delete-button {
  background: #991b1b;
  border-color: #991b1b;
  color: #fff;
}
.company-document-actions .btn.danger:hover,
.company-document-actions .company-document-delete-button:hover {
  background: #7f1d1d;
  border-color: #7f1d1d;
  color: #fff;
}
.company-document-actions .company-document-delete-button:disabled {
  background: #e5e7eb;
  border-color: #d1d5db;
  color: #9ca3af;
  cursor: not-allowed;
}
.company-document-image-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 360px;
  padding: 20px;
  background: #f8fafc;
}
.company-document-image-preview img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 220px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .12);
}
.share-send-channel-panel[data-channel-panel="email"] .share-email-editor-toolbar,
.share-send-channel-panel[data-channel-panel="email"] .share-email-editor {
  width: min(840px, 100%);
  box-sizing: border-box;
  margin-left: auto;
  margin-right: auto;
}
.share-email-preview-popup > table,
.share-email-preview-popup > div {
  width: 100% !important;
  max-width: 760px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
#shareSmsCopyButton { white-space: nowrap; }
@media (max-width: 1100px) {
  .company-document-setting-grid { grid-template-columns: 1fr; }
}

/* v54.36.1 이메일 작성·미리보기 화면만 중앙 배치 (실제 발송 HTML은 좌측 정렬 유지) */
.share-send-channel-panel[data-channel-panel="email"] .share-email-editor > table,
.share-send-channel-panel[data-channel-panel="email"] .share-email-editor > div {
  width: 100% !important;
  max-width: 760px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}


/* v54.37 이메일 미리보기 수신주소 워터마크 */
.share-email-preview-stage {
  position: relative;
  min-height: 420px;
}
.share-email-preview-recipient-watermark {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 6;
  max-width: 78%;
  transform: translate(-50%, -50%) rotate(-16deg);
  padding: 10px 18px;
  border: 2px solid rgba(31, 41, 55, .12);
  border-radius: 12px;
  color: rgba(31, 41, 55, .16);
  background: rgba(255, 255, 255, .18);
  font-size: clamp(22px, 3vw, 38px);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: .02em;
  text-align: center;
  overflow-wrap: anywhere;
  white-space: normal;
  pointer-events: none;
  user-select: none;
  box-sizing: border-box;
}
.share-email-preview-recipient-watermark.missing {
  color: rgba(185, 28, 28, .22);
  border-color: rgba(185, 28, 28, .14);
}
.share-email-preview-stage .share-email-preview-popup {
  position: relative;
  z-index: 1;
}
@media (max-width: 640px) {
  .share-email-preview-stage {
    min-height: 300px;
  }
  .share-email-preview-recipient-watermark {
    max-width: 88%;
    padding: 8px 12px;
    font-size: 20px;
    transform: translate(-50%, -50%) rotate(-12deg);
  }
}


/* v54.40 카카오톡 공유 연동 */
.kakao-settings-card { margin-top: 14px; }
.kakao-settings-grid { margin-top: 4px; }
.share-kakao-settings-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:14px; }
.share-kakao-help { margin:10px 0 0; line-height:1.6; }
.btn.kakao-share-button {
  background:#FEE500;
  border-color:#FEE500;
  color:#191919;
  font-weight:800;
}
.btn.kakao-share-button:hover { background:#f5dc00; border-color:#f5dc00; color:#191919; }
.btn.kakao-share-button:disabled { background:#f4f4f4; border-color:#dedede; color:#9ca3af; opacity:1; cursor:not-allowed; }
@media (max-width: 720px) {
  .share-kakao-settings-actions .btn { flex:1 1 auto; justify-content:center; }
}
/* v54.61: 모바일 자료실 제목/다운로드 컬럼 침범 방지 */
@media (max-width: 760px) {
  .library-main-card .table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }
  .library-main-card .library-table {
    width: 916px !important;
    min-width: 916px !important;
    table-layout: fixed !important;
  }
  .library-table th:nth-child(1),
  .library-table td:nth-child(1) { width: 76px !important; min-width: 76px !important; }
  .library-table th:nth-child(2),
  .library-table td:nth-child(2) { width: 100px !important; min-width: 100px !important; }
  .library-table th:nth-child(3),
  .library-table td:nth-child(3) { width: 105px !important; min-width: 105px !important; }
  .library-table th:nth-child(4),
  .library-table td:nth-child(4) { width: 110px !important; min-width: 110px !important; }
  .library-table th:nth-child(5),
  .library-table td:nth-child(5) {
    width: 292px !important;
    min-width: 292px !important;
    max-width: 292px !important;
    overflow: hidden !important;
  }
  .library-table th:nth-child(6),
  .library-table td:nth-child(6) { width: 108px !important; min-width: 108px !important; }
  .library-table th:nth-child(7),
  .library-table td:nth-child(7) { width: 125px !important; min-width: 125px !important; }
  .library-open-cell strong,
  .library-open-cell .small {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .library-download-cell,
  .library-table td:nth-child(7) {
    position: relative;
    overflow: hidden;
    background: #fff;
  }
}
/* v54.64: 홈택스 사업용카드 보조자료 가져오기 */
.hometax-import-modal {
  width:min(1320px, 97vw);
  max-height:92vh;
  padding:20px;
}
.hometax-import-modal .modal-header > div:first-child { min-width:0; }
.hometax-import-modal .modal-header h2 { margin-bottom:4px; }
.hometax-import-notice {
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:12px 14px;
  margin-bottom:14px;
  border:1px solid #fecaca;
  border-radius:12px;
  background:#fff7f7;
  color:#475569;
  line-height:1.5;
  font-size:13px;
}
.hometax-import-notice strong {
  flex:0 0 auto;
  color:#c81e2b;
}
.hometax-import-tabs {
  display:flex;
  gap:8px;
  padding-bottom:12px;
  margin-bottom:14px;
  border-bottom:1px solid #e5e7eb;
}
.hometax-import-tab {
  border:1px solid #d1d5db;
  border-radius:999px;
  padding:8px 14px;
  background:#fff;
  color:#475569;
  font-size:13px;
  font-weight:800;
  cursor:pointer;
}
.hometax-import-tab.active {
  border-color:#111827;
  background:#111827;
  color:#fff;
}
.hometax-import-panel { display:none; }
.hometax-import-panel.active { display:block; }
.hometax-file-box {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:14px;
  border:1px solid #e5e7eb;
  border-radius:14px;
  background:#f8fafc;
}
.hometax-file-actions {
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
}
.hometax-file-actions input[type="file"] {
  max-width:380px;
  padding:8px;
  border:1px solid #d1d5db;
  border-radius:10px;
  background:#fff;
  font-size:13px;
}
.hometax-import-status {
  min-height:38px;
  display:flex;
  align-items:center;
  margin:10px 0;
  padding:9px 12px;
  border-radius:10px;
  background:#f8fafc;
  color:#475569;
}
.hometax-import-status.success { background:#f0fdf4; color:#166534; }
.hometax-import-status.error { background:#fff7f7; color:#b91c1c; }
.hometax-import-summary {
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:10px;
  margin-bottom:10px;
}
.hometax-summary-item {
  display:flex;
  flex-direction:column;
  gap:5px;
  min-width:0;
  padding:12px 14px;
  border:1px solid #e5e7eb;
  border-radius:12px;
  background:#fff;
}
.hometax-summary-item span { color:#64748b; font-size:12px; font-weight:700; }
.hometax-summary-item strong { color:#111827; font-size:17px; }
.hometax-import-meta {
  margin-bottom:10px;
  padding:8px 2px;
  line-height:1.5;
  white-space:normal;
}
.hometax-preview-wrap {
  max-height:430px;
  overflow:auto;
  border:1px solid #e5e7eb;
  border-radius:12px;
}
.hometax-preview-table { min-width:1120px; }
.hometax-preview-table thead th {
  position:sticky;
  top:0;
  z-index:2;
  background:#f8fafc;
}
.hometax-preview-table th,
.hometax-preview-table td { padding:9px 8px; font-size:12px; }
.hometax-preview-table .right { text-align:right; }
.hometax-merchant-cell { min-width:220px; white-space:normal; }
.hometax-merchant-cell strong,
.hometax-merchant-cell span { display:block; }
.hometax-merchant-cell span { margin-top:3px; color:#94a3b8; font-size:11px; }
.hometax-row-warning td { background:#fffaf0; }
.hometax-import-actions { position:sticky; bottom:-20px; padding:12px 0 0; background:#fff; }
.hometax-history-title { margin-bottom:12px; }
.hometax-history-title h3,
.hometax-history-detail h3 { margin:0 0 4px; font-size:17px; }
.hometax-history-list { display:grid; gap:8px; max-height:330px; overflow:auto; }
.hometax-history-card {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:13px 14px;
  border:1px solid #e5e7eb;
  border-radius:13px;
  background:#fff;
  cursor:pointer;
  transition:border-color .15s ease, background .15s ease;
}
.hometax-history-card:hover { border-color:#cbd5e1; background:#f8fafc; }
.hometax-history-card-main { min-width:0; display:flex; flex-direction:column; gap:4px; }
.hometax-history-card-main strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.hometax-history-card-main span { color:#475569; font-size:13px; }
.hometax-history-card-main small { color:#94a3b8; font-size:11px; }
.hometax-history-card-actions { flex:0 0 auto; display:flex; align-items:center; gap:7px; }
.hometax-history-card-actions .btn { padding:7px 10px; font-size:12px; }
.hometax-history-detail {
  margin-top:16px;
  padding-top:16px;
  border-top:1px solid #e5e7eb;
}
.hometax-empty-box {
  padding:20px;
  border:1px dashed #cbd5e1;
  border-radius:12px;
  text-align:center;
  color:#64748b;
}
.hometax-empty-box.error { border-color:#fecaca; background:#fff7f7; color:#b91c1c; }

@media (max-width:760px) {
  .hometax-import-modal {
    width:100vw;
    max-width:100vw;
    height:100dvh;
    max-height:100dvh;
    border-radius:0;
    padding:16px 12px;
  }
  .hometax-import-modal .modal-header { align-items:flex-start; }
  .hometax-import-notice { flex-direction:column; gap:4px; }
  .hometax-file-box { align-items:stretch; flex-direction:column; }
  .hometax-file-actions { justify-content:stretch; }
  .hometax-file-actions input[type="file"] { width:100%; max-width:none; }
  .hometax-import-summary { grid-template-columns:repeat(2, minmax(0, 1fr)); }
  .hometax-preview-wrap { max-height:46dvh; }
  .hometax-history-list { max-height:42dvh; }
  .hometax-history-card { align-items:flex-start; flex-direction:column; }
  .hometax-history-card-actions { width:100%; justify-content:flex-end; }
}

/* v54.65 카드사 이용내역 주자료 가져오기 */
.card-company-import-modal { max-width:min(1560px, calc(100vw - 34px)); }
.card-company-primary-notice { border-color:#bfdbfe; background:#eff6ff; }
.card-company-primary-notice strong { color:#1d4ed8; }
.card-company-import-summary { grid-template-columns:repeat(5, minmax(0, 1fr)); }
.card-company-bulk-tools {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:10px 0;
  flex-wrap:wrap;
}
.card-company-preview-wrap { max-height:52dvh; }
.card-company-preview-table {
  width:100%;
  min-width:1320px;
  border-collapse:collapse;
  font-size:12px;
}
.card-company-preview-table th,
.card-company-preview-table td {
  border-bottom:1px solid #e5e7eb;
  padding:8px 7px;
  vertical-align:middle;
  white-space:nowrap;
}
.card-company-preview-table th {
  position:sticky;
  top:0;
  z-index:2;
  background:#f8fafc;
  color:#334155;
  font-weight:700;
  text-align:center;
}
.card-company-preview-table .center { text-align:center; }
.card-company-preview-table .right { text-align:right; }
.card-company-preview-table .card-company-merchant {
  min-width:220px;
  max-width:300px;
  white-space:normal;
  line-height:1.35;
}
.card-company-category-select {
  min-width:112px;
  height:32px;
  padding:0 7px;
  border:1px solid #d8dee8;
  border-radius:8px;
  background:#fff;
  font-size:12px;
}
.card-company-row-cancelled { background:#fff7ed; color:#9a3412; }
.card-company-row-excluded { background:#f8fafc; color:#64748b; }
.card-company-row-cancelled .card-company-category-select,
.card-company-row-excluded .card-company-category-select { opacity:.72; }

@media (max-width: 760px) {
  .card-company-import-modal { max-width:calc(100vw - 16px); }
  .card-company-import-summary { grid-template-columns:repeat(2, minmax(0, 1fr)); }
  .card-company-bulk-tools { align-items:stretch; flex-direction:column; }
  .card-company-bulk-tools .device-actions { width:100%; flex-wrap:wrap; }
  .card-company-preview-wrap { max-height:48dvh; }
}
/* v55.15: 사이드메뉴 업무영역 그룹화 */
.sidebar .menu {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.sidebar-menu-section {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin: 0 0 13px;
  padding: 0;
}
.sidebar-menu-section + .sidebar-menu-section {
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.sidebar-menu-section:last-of-type { margin-bottom: 2px; }
/* v55.16: 분류 제목 가독성 보강 */
.menu-section-title {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 21px;
  margin: 0 0 7px;
  padding: 0 8px;
  color: #aeb8c7;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .04em;
  white-space: nowrap;
  overflow: hidden;
  user-select: none;
}
.menu-section-title::before {
  content: "";
  flex: 0 0 3px;
  width: 3px;
  height: 12px;
  border-radius: 999px;
  background: #dc2626;
  opacity: .92;
}
.sidebar-menu-section > a:last-child { margin-bottom: 0 !important; }
.brand-logo { cursor: pointer; }

/* 대시보드는 로고로 이동하므로 메뉴 활성표시는 남기지 않는다. */
.sidebar .brand-logo:focus-visible,
.sidebar .menu a:focus-visible {
  outline: 2px solid rgba(252,165,165,.92);
  outline-offset: 2px;
}

/* 접힌 상태에서는 그룹명을 짧은 구분선으로 치환한다. */
.sidebar.collapsed .sidebar-menu-section {
  margin: 0 0 7px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,.10);
}
.sidebar.collapsed .sidebar-menu-section:first-child {
  padding-top: 0;
  border-top: 0;
}
.sidebar.collapsed .menu-section-title {
  width: 28px;
  min-height: 0;
  height: 0;
  margin: 0 auto 4px;
  padding: 0;
  color: transparent;
  font-size: 0;
  opacity: 0;
  overflow: hidden;
}
.sidebar.collapsed .menu-section-title::before { display: none; }
.sidebar.collapsed .sidebar-menu-section > a { margin-bottom: 4px !important; }
.sidebar.collapsed .sidebar-menu-section > a:last-child { margin-bottom: 0 !important; }
/* v55.21: 비용매입 현장명·품목 요약을 한 줄 보조제목으로 통합 */
.expense-table .money-purchase-inline-sub {
  display: block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* v55.41 현장 마감일 선택 */
.common-finalize-date-field {
  width: min(220px, 100%);
  margin-top: 12px;
}
.common-finalize-date-field input[type="date"] {
  width: 100%;
}
/* v55.45 업무관리 타임라인 중심 개편 */
.worklog-timeline-modal {
  width: min(1180px, calc(100vw - 32px));
}
.worklog-timeline-modal .modal-header { align-items: flex-start; }
.worklog-summary-strip {
  display:flex;
  justify-content:space-between;
  gap:18px;
  align-items:center;
  padding:12px 14px;
  margin:0 0 14px;
  border:1px solid #e5e7eb;
  border-radius:16px;
  background:#f8fafc;
}
.worklog-summary-main { display:flex; align-items:center; gap:10px; min-width:0; }
.worklog-summary-main strong { font-size:16px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.worklog-summary-dates { display:flex; gap:16px; align-items:center; flex-wrap:wrap; color:#64748b; font-size:12px; }
.worklog-summary-dates strong { color:#111827; margin-left:4px; }
.worklog-status-pill {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:52px;
  min-height:24px;
  padding:4px 9px;
  border-radius:999px;
  font-size:11px;
  font-weight:800;
  white-space:nowrap;
}
.worklog-status-pill.status-receipt { background:#eff6ff; color:#1d4ed8; }
.worklog-status-pill.status-progress { background:#fff7ed; color:#c2410c; }
.worklog-status-pill.status-hold { background:#fefce8; color:#854d0e; }
.worklog-status-pill.status-done { background:#ecfdf5; color:#047857; }
.worklog-status-pill.status-cancel { background:#f3f4f6; color:#6b7280; }
.worklog-detail-grid {
  display:grid;
  grid-template-columns:minmax(330px,.78fr) minmax(520px,1.22fr);
  gap:14px;
  align-items:start;
}
.worklog-detail-card {
  border:1px solid #e5e7eb;
  border-radius:18px;
  background:#fff;
  padding:15px;
  min-width:0;
}
.worklog-basic-card { position:sticky; top:0; }
.worklog-basic-actions { margin-top:14px; }
.worklog-history-count {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:44px;
  padding:4px 8px;
  border-radius:999px;
  background:#f3f4f6;
  color:#4b5563;
  font-size:11px;
  font-weight:800;
}
.worklog-timeline-list {
  display:grid;
  gap:8px;
  max-height:330px;
  overflow:auto;
  padding:2px 4px 2px 0;
}
.worklog-timeline-list .worklog-timeline-item {
  display:grid;
  grid-template-columns:28px minmax(0,1fr);
  gap:9px;
  align-items:stretch;
  border:0;
  padding:0;
  background:transparent;
}
.worklog-timeline-marker {
  width:24px;
  height:24px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  margin-top:8px;
  background:#eef2f7;
  color:#475569;
  font-size:10px;
  font-weight:900;
}
.worklog-timeline-item.public .worklog-timeline-marker { background:#fee2e2; color:#b91c1c; }
.worklog-timeline-body {
  border:1px solid #e5e7eb;
  border-radius:14px;
  padding:10px 12px;
  background:#f9fafb;
}
.worklog-timeline-item.public .worklog-timeline-body { background:#fff; border-color:#fecaca; }
.worklog-history-head { margin-bottom:5px; }
.worklog-history-head > div { display:flex; align-items:center; gap:7px; min-width:0; }
.worklog-history-head strong { font-size:13px; }
.worklog-visibility-badge {
  display:inline-flex;
  align-items:center;
  min-height:18px;
  padding:2px 6px;
  border-radius:999px;
  font-size:9px;
  font-weight:800;
}
.worklog-visibility-badge.public { background:#fee2e2; color:#b91c1c; }
.worklog-visibility-badge.private { background:#e5e7eb; color:#64748b; }
.worklog-entry-editor {
  margin-top:14px;
  padding:13px;
  border:1px solid #dbe3ec;
  border-radius:16px;
  background:#f8fafc;
}
.worklog-entry-head { display:flex; justify-content:space-between; gap:12px; align-items:center; margin-bottom:10px; }
.worklog-entry-head strong { font-size:14px; }
.worklog-public-state {
  display:flex;
  align-items:center;
  min-height:36px;
  border:1px solid #d1d5db;
  border-radius:11px;
  padding:0 11px;
  font-size:12px;
  font-weight:800;
}
.worklog-public-state.private { background:#fff; color:#64748b; }
.worklog-public-state.public { background:#fff1f2; border-color:#fecdd3; color:#be123c; }
.worklog-share-box {
  margin-top:14px;
  padding:13px;
  border:1px solid #e5e7eb;
  border-radius:16px;
  background:#fff;
}
.worklog-share-box p { margin:4px 0 0; }
.worklog-share-url-wrap { margin-top:10px; }
.worklog-share-url-wrap input { width:100%; font-size:12px; }
.worklog-share-actions { display:flex; gap:7px; flex-wrap:wrap; margin-top:10px; }
.worklog-next-date { font-size:12px; font-weight:800; }
.worklog-next-date.overdue { color:#dc2626; }
.worklog-share-state {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:22px;
  padding:3px 7px;
  border-radius:999px;
  background:#f3f4f6;
  color:#6b7280;
  font-size:10px;
  font-weight:800;
  white-space:nowrap;
}
.worklog-share-state.active { background:#ecfdf5; color:#047857; }

/* 업무 리스트 7열 재정의 */
.worklog-table { table-layout:fixed !important; width:100%; }
.worklog-table th,
.worklog-table td { padding:8px 9px !important; font-size:12px !important; vertical-align:middle; }
.worklog-table th:nth-child(1), .worklog-table td:nth-child(1) { width:72px !important; }
.worklog-table th:nth-child(2), .worklog-table td:nth-child(2) { width:170px !important; max-width:170px !important; }
.worklog-table th:nth-child(3), .worklog-table td:nth-child(3) { width:76px !important; }
.worklog-table th:nth-child(4), .worklog-table td:nth-child(4) { width:82px !important; min-width:82px !important; max-width:82px !important; white-space:nowrap !important; }
.worklog-table th:nth-child(5), .worklog-table td:nth-child(5) { width:auto !important; min-width:220px !important; max-width:none !important; white-space:nowrap !important; overflow:hidden; text-overflow:ellipsis; }
.worklog-table th:nth-child(6), .worklog-table td:nth-child(6) { width:88px !important; text-align:left !important; }
.worklog-table th:nth-child(7), .worklog-table td:nth-child(7) { width:78px !important; text-align:center !important; }

@media (max-width: 900px) {
  .worklog-detail-grid { grid-template-columns:1fr; }
  .worklog-basic-card { position:static; }
  .worklog-summary-strip { align-items:flex-start; flex-direction:column; }
  .worklog-summary-dates { gap:10px; }
}
@media (max-width: 680px) {
  .worklog-timeline-modal { width:calc(100vw - 12px); max-height:96vh; }
  .worklog-summary-main { width:100%; flex-wrap:wrap; }
  .worklog-summary-main strong { max-width:100%; }
  .worklog-summary-dates { display:grid; grid-template-columns:1fr 1fr; width:100%; }
  .worklog-detail-card { padding:12px; }
  .worklog-entry-head { align-items:flex-start; flex-direction:column; }
  .worklog-share-actions .btn { flex:1 1 calc(50% - 7px); }
}

/* v55.46 업무상세 좌측 입력 / 우측 타임라인 고정 배치 */
.worklog-timeline-modal {
  width:min(1280px, calc(100vw - 28px));
  max-width:1280px;
  height:min(880px, 94vh);
  max-height:94vh;
  overflow:hidden;
  display:flex;
  flex-direction:column;
}
.worklog-timeline-modal > .modal-header,
.worklog-timeline-modal > .worklog-summary-strip { flex:0 0 auto; }
.worklog-timeline-modal .worklog-detail-grid {
  flex:1 1 auto;
  min-height:0;
  grid-template-columns:minmax(350px, 420px) minmax(0, 1fr);
  align-items:stretch;
}
.worklog-left-column {
  display:flex;
  flex-direction:column;
  min-width:0;
  min-height:0;
  overflow:auto;
  padding-right:3px;
}
.worklog-timeline-modal .worklog-basic-card { position:static; }
.worklog-timeline-modal .worklog-basic-card .section-title,
.worklog-timeline-modal .worklog-timeline-card .section-title { margin-bottom:9px; }
.worklog-timeline-modal .worklog-basic-card .form-grid,
.worklog-timeline-modal .worklog-entry-card .form-grid { gap:8px 9px; }
.worklog-timeline-modal .worklog-basic-card .form-field label,
.worklog-timeline-modal .worklog-entry-card .form-field label { margin-bottom:4px; }
.worklog-timeline-modal .worklog-basic-card input,
.worklog-timeline-modal .worklog-basic-card select,
.worklog-timeline-modal .worklog-entry-card input,
.worklog-timeline-modal .worklog-entry-card select,
.worklog-timeline-modal .worklog-entry-card textarea { min-height:34px; }
.worklog-timeline-modal .worklog-basic-actions,
.worklog-timeline-modal .worklog-entry-card .modal-actions { margin-top:9px; }
.worklog-entry-card .worklog-entry-head { margin-bottom:8px; }
.worklog-entry-card .worklog-entry-head > div { display:flex; align-items:baseline; gap:8px; flex-wrap:wrap; }
.worklog-entry-card .worklog-entry-head .small { color:#64748b; }
.worklog-entry-card #worklogContent {
  resize:vertical;
}
.worklog-share-card { flex:0 0 auto; }
.worklog-share-card .worklog-share-box {
  margin:0;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
}
.worklog-share-card .worklog-share-actions { margin-top:8px; }
.worklog-share-card .worklog-share-actions .btn { min-height:32px; padding:6px 9px; }
.worklog-timeline-card {
  display:flex;
  flex-direction:column;
  min-height:0;
  overflow:hidden;
}
.worklog-timeline-card .worklog-timeline-list {
  flex:1 1 auto;
  min-height:0;
  max-height:none;
  overflow:auto;
  padding-right:5px;
}
.worklog-timeline-item.pending .worklog-timeline-marker {
  background:#fff7ed;
  color:#c2410c;
}
.worklog-timeline-item.pending .worklog-timeline-body {
  background:#fffdf8;
  border-color:#fed7aa;
}
.worklog-visibility-badge.pending {
  background:#ffedd5;
  color:#c2410c;
}
.worklog-public-state.pending {
  background:#fff7ed;
  border-color:#fed7aa;
  color:#c2410c;
}

@media (max-width: 900px) {
  .worklog-timeline-modal {
    height:auto;
    max-height:94vh;
    overflow:auto;
  }
    .worklog-left-column { overflow:visible; padding-right:0; }
  .worklog-timeline-card { min-height:420px; overflow:visible; }
  .worklog-timeline-card .worklog-timeline-list { max-height:520px; }
}
@media (max-width: 680px) {
  .worklog-timeline-modal {
    width:calc(100vw - 10px);
    max-height:97vh;
  }
  .worklog-timeline-card { min-height:360px; }
  .worklog-timeline-card .worklog-timeline-list { max-height:440px; }
}

/* v55.47 업무상세 세로 밀도·공유 상세 팝업 연동 */
.worklog-timeline-modal > .modal-header {
  padding-top:10px;
  padding-bottom:8px;
}
.worklog-timeline-modal .worklog-summary-strip {
  padding:7px 10px;
  margin-bottom:7px;
}
.worklog-timeline-modal .worklog-detail-grid {
  grid-template-columns:minmax(350px, 405px) minmax(0, 1fr);
  gap:9px;
}
.worklog-left-column { gap:7px; }
.worklog-timeline-modal .worklog-detail-card {
  padding:9px 10px;
  border-radius:14px;
}
.worklog-timeline-modal .worklog-basic-card .section-title,
.worklog-timeline-modal .worklog-timeline-card .section-title {
  margin-bottom:6px;
}
.worklog-timeline-modal .worklog-basic-card .form-grid,
.worklog-timeline-modal .worklog-entry-card .form-grid {
  gap:5px 8px;
}
.worklog-timeline-modal .worklog-basic-card .form-field label,
.worklog-timeline-modal .worklog-entry-card .form-field label {
  margin-bottom:2px;
}
.worklog-timeline-modal .worklog-basic-card input,
.worklog-timeline-modal .worklog-basic-card select,
.worklog-timeline-modal .worklog-entry-card input,
.worklog-timeline-modal .worklog-entry-card select,
.worklog-timeline-modal .worklog-entry-card textarea,
.worklog-timeline-modal .worklog-public-state {
  min-height:30px;
}
.worklog-timeline-modal .input-button .btn {
  min-height:30px;
  padding-top:4px;
  padding-bottom:4px;
}
.worklog-timeline-modal .worklog-basic-actions,
.worklog-timeline-modal .worklog-entry-card .modal-actions {
  margin-top:6px;
  gap:7px;
}
.worklog-timeline-modal .worklog-basic-actions {
  justify-content:flex-end;
  align-items:center;
}
.worklog-timeline-modal .worklog-basic-actions .btn,
.worklog-timeline-modal .worklog-entry-card .modal-actions .btn {
  min-height:30px;
  padding-top:5px;
  padding-bottom:5px;
}
.worklog-inline-share-status {
  margin:5px 0 0;
  line-height:1.35;
  color:#64748b;
  text-align:right;
}
.worklog-entry-card .worklog-entry-head { margin-bottom:5px; }
.worklog-entry-card #worklogContent {
  min-height:54px;
  max-height:100px;
}
.worklog-timeline-card .worklog-timeline-list { padding-top:0; }

@media (max-width: 900px) {
  .worklog-timeline-modal .worklog-detail-grid { grid-template-columns:1fr; }
  .worklog-inline-share-status { text-align:left; }
}


/* v55.48 업무상세 공유 안내 축약·새 처리내역 폼 높이 통일 */
.worklog-timeline-modal .worklog-entry-card .form-field > input,
.worklog-timeline-modal .worklog-entry-card .form-field > select,
.worklog-timeline-modal .worklog-entry-card .worklog-public-state {
  height:32px;
  min-height:32px;
  padding:4px 9px;
  line-height:1.35;
}
.worklog-timeline-modal .worklog-entry-card .worklog-public-state {
  width:100%;
}
.worklog-timeline-modal .worklog-inline-share-status {
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
@media (max-width: 680px) {
  .worklog-timeline-modal .worklog-inline-share-status {
    white-space:normal;
    overflow:visible;
    text-overflow:clip;
  }
}

/* v55.49 업무상세 기본정보 세로 폭 축소 */
@media (min-width: 901px) {
  .worklog-timeline-modal .worklog-basic-card {
    padding:7px 9px;
  }
  .worklog-timeline-modal .worklog-basic-card .section-title {
    margin-bottom:3px;
  }
  .worklog-timeline-modal .worklog-basic-card .form-grid {
    gap:3px 7px;
  }
  .worklog-timeline-modal .worklog-basic-card .form-field label {
    margin-bottom:1px;
  }
  .worklog-timeline-modal .worklog-basic-card .form-field > input,
  .worklog-timeline-modal .worklog-basic-card .form-field > select,
  .worklog-timeline-modal .worklog-basic-card .input-button > input,
  .worklog-timeline-modal .worklog-basic-card .input-button > button {
    height:28px;
    min-height:28px;
    padding-top:3px;
    padding-bottom:3px;
    line-height:1.25;
  }
  .worklog-timeline-modal .worklog-basic-card .worklog-stage-notice {
    margin-top:2px;
    padding-top:3px;
    padding-bottom:3px;
    line-height:1.25;
  }
  .worklog-timeline-modal .worklog-basic-actions {
    margin-top:4px;
    gap:6px;
  }
  .worklog-timeline-modal .worklog-basic-actions .btn {
    min-height:28px;
    padding-top:3px;
    padding-bottom:3px;
  }
  .worklog-timeline-modal .worklog-inline-share-status {
    margin-top:2px;
    line-height:1.2;
  }
}
/* v55.56 수정본: 주소록 첨부 중복 표시 제거 / 세로 글자 잘림 보정 */
.jh-file-drop-host {
  position: relative;
  border-radius: 12px;
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}
.jh-file-drop-host.is-file-dragover {
  box-shadow: none !important;
}
.jh-file-drop-hint {
  position: static;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 30px;
  margin-top: 6px;
  padding: 6px 10px;
  box-sizing: border-box;
  border: 1px dashed #cbd5e1;
  border-radius: 9px;
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
  word-break: break-word;
  transition: border-color .16s ease, background-color .16s ease, color .16s ease;
}
.jh-file-drop-host.is-file-dragover .jh-file-drop-hint {
  border-color: #dc2626;
  border-style: dashed;
  background: #fff;
  color: #991b1b;
  font-weight: 700;
}
.jh-file-drop-hint.has-files {
  border-style: solid;
  border-color: #cbd5e1;
  background: #fff;
  color: #334155;
  font-weight: 600;
}
.jh-file-drop-native-hidden {
  display: none !important;
}
.jh-file-drop-primary,
.jh-file-drop-secondary {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.jh-file-drop-hint.has-secondary {
  min-height: 52px;
  margin-top: 0;
  padding: 8px 12px;
  flex-direction: column;
  box-sizing: border-box;
}
.jh-file-drop-primary {
  color: inherit;
  font-size: 12px;
  line-height: 1.35;
  white-space: nowrap;
}
.jh-file-drop-hint.has-secondary .jh-file-drop-primary { font-size: 13px; }
.jh-file-drop-secondary {
  margin-top: 3px;
  color: #64748b;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.35;
  white-space: normal;
}
.jh-file-drop-host.is-file-dragover .jh-file-drop-secondary { color: #b91c1c; }
.jh-file-drop-hint.is-clickable { cursor: pointer; }
.jh-file-drop-hint.is-clickable:hover {
  border-color: #94a3b8;
  background: #fff;
  color: #0f172a;
}
@media (max-width: 760px) {
  .jh-file-drop-hint { min-height: 34px; }
}
.cbt-content-block.jh-file-drop-host .jh-file-drop-hint { margin: 8px 0 0; }
.address-book-preview-pane.jh-file-drop-host #abSelectedFileName.jh-file-drop-hint {
  position: static;
  width: calc(100% - 24px);
  min-height: 48px;
  margin: 8px 12px;
  padding: 8px 10px 9px;
  overflow: visible;
  border: 1px dashed #cbd5e1;
  border-radius: 9px;
  background: #f8fafc;
}
.address-book-preview-pane.jh-file-drop-host #abSelectedFileName .jh-file-drop-primary {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.5;
  padding: 1px 0 2px;
}
.address-book-preview-pane.jh-file-drop-host #abSelectedFileName .jh-file-drop-secondary {
  overflow: visible;
  line-height: 1.45;
  padding-bottom: 1px;
}
@media (max-width: 760px) {
  .address-book-preview-pane.jh-file-drop-host #abSelectedFileName.jh-file-drop-hint {
    width: calc(100% - 16px);
    margin: 8px;
  }
}
.address-book-preview-pane.jh-file-drop-host .address-preview-actions button[onclick*="chooseAddressBookAttachmentFile"] {
  display: none !important;
}
.company-document-setting-item.jh-file-drop-host .jh-file-drop-hint {
  width: 100%;
  margin: 8px 0;
  box-sizing: border-box;
}
.company-document-setting-item.jh-file-drop-host .company-document-file-button {
  display: none !important;
}
.share-send-extra-picker.jh-file-drop-host {
  flex-wrap: wrap;
}
.share-send-extra-picker.jh-file-drop-host .jh-file-drop-hint {
  flex: 1 0 100%;
  width: 100%;
  margin: 0;
  box-sizing: border-box;
}
.share-send-extra-picker.jh-file-drop-host > .btn {
  display: none !important;
}
.hometax-file-actions .jh-file-drop-hint {
  flex: 1 1 260px;
  width: auto;
  min-width: 220px;
  margin: 0;
}
@media (max-width: 760px) {
  .hometax-file-actions .jh-file-drop-hint {
    width: 100%;
    min-width: 0;
  }
}
.library-upload-progress {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}
.library-upload-progress[hidden] { display: none !important; }
.library-upload-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 12px;
  color: #475569;
}
.library-upload-progress-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}
.library-upload-progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #dc2626;
  transition: width .18s ease;
}
/* v55.59: 주소록 왼쪽 폼 압축 · 담당자 UI 단순화 */
.address-book-form-pane .section-subtitle {
  margin-bottom: 7px;
  padding-bottom: 5px;
}
.address-book-form-pane .address-book-form-grid {
  gap: 7px 9px;
  margin-bottom: 8px;
}
.address-book-form-pane .address-book-form-grid .form-field > label,
.address-book-form-pane > .address-book-tab-panel > .form-field > label {
  display: block;
  margin-bottom: 3px;
  line-height: 1.2;
}
.address-book-form-pane .address-book-form-grid input,
.address-book-form-pane .address-book-form-grid select {
  height: 31px;
  padding: 4px 9px;
  border-radius: 9px;
  line-height: 1.2;
}
.address-book-form-pane .address-book-form-grid .input-button {
  gap: 6px;
}
.address-book-form-pane .address-book-form-grid .input-button .btn {
  min-height: 31px;
  padding: 4px 10px;
  border-radius: 9px;
}
.address-book-form-pane #abMemo {
  min-height: 58px;
  padding: 7px 9px;
  border-radius: 10px;
}
.address-contact-editor {
  margin-top: 8px;
  margin-bottom: 8px;
  padding: 10px;
  border: 1px solid #dbe3ee;
  border-radius: 16px;
  background: #f8fafc;
}
.address-contact-editor-head {
  align-items: flex-start;
  margin-bottom: 7px;
}
.address-contact-editor-head h3,
.address-contact-editor-head p { margin: 0; }
.address-contact-editor-head p { margin-top: 2px; line-height: 1.35; }
.address-contact-editor-head .btn {
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 10px;
}
.address-contact-column-head,
.address-contact-row {
  display: grid;
  grid-template-columns: minmax(125px, 1.05fr) minmax(85px, .72fr) minmax(120px, .95fr) minmax(150px, 1.25fr) 54px;
  gap: 7px;
  align-items: center;
}
.address-contact-column-head {
  padding: 0 9px 5px;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}
.address-contact-row-list {
  display: grid;
  gap: 7px;
}
.address-contact-row {
  padding: 7px;
  border: 1px solid #dbe3ee;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.address-contact-row input {
  width: 100%;
  min-width: 0;
  height: 31px;
  box-sizing: border-box;
  padding: 4px 9px;
  border: 1px solid #d1d9e5;
  border-radius: 10px;
  background: #fff;
}
.address-contact-row input:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(59,130,246,.12);
  outline: 0;
}
.address-contact-row .small-btn {
  min-height: 31px;
  padding: 4px 8px;
  border-radius: 10px;
}
.address-contact-empty {
  min-height: 42px;
  border-radius: 12px;
  background: #fff;
}
@media (max-width: 1150px) {
  .address-contact-column-head { display: none; }
  .address-contact-row {
    grid-template-columns: 1fr 1fr;
  }
  .address-contact-row .address-contact-work,
  .address-contact-row input:nth-child(4) { grid-column: 1 / -1; }
  .address-contact-row .address-contact-delete { justify-self: end; width: 72px; }
}
@media (max-width: 720px) {
  .address-contact-editor { padding: 9px; }
  .address-contact-editor-head { display: block; }
  .address-contact-editor-head .btn { width: 100%; margin-top: 7px; }
  .address-contact-row {
    grid-template-columns: 1fr;
    padding: 8px;
    border-radius: 13px;
  }
  .address-contact-row .address-contact-work,
  .address-contact-row input:nth-child(4) { grid-column: auto; }
  .address-contact-row .address-contact-delete { width: 100%; }
}

/* v55.60: 주소록 계좌정보 한 줄 배치 · 기본 화면 무스크롤 여유 확보 */
.address-book-form-pane .address-bank-inline-field {
  min-width: 0;
}
.address-book-form-pane .address-bank-inline-grid {
  display: grid;
  grid-template-columns: minmax(100px, .78fr) minmax(100px, .78fr) minmax(180px, 1.44fr);
  gap: 7px;
  min-width: 0;
}
.address-book-form-pane .address-bank-inline-grid input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
@media (max-width: 720px) {
  .address-book-form-pane .address-bank-inline-grid {
    grid-template-columns: 1fr;
  }
}
@keyframes jh-save-spin{to{transform:rotate(360deg)}}
/* v55.63 모바일 저장 진행상태 · 중복 저장 방지 */
.address-book-save-actions{align-items:center;border-top:1px solid var(--line,#e5e7eb);padding-top:10px;background:#fff}
.address-book-save-status{display:none;margin-right:auto;color:#334155;font-size:12px;font-weight:800;line-height:1.4}
.address-book-save-status.active{display:inline-flex;align-items:center;gap:7px}
.address-book-save-status.active::before{content:"";width:14px;height:14px;border:2px solid #cbd5e1;border-top-color:#334155;border-radius:50%;animation:jh-save-spin .75s linear infinite}
.address-book-card-modal.is-saving .modal-close,
.address-book-card-modal.is-saving .address-book-save-actions .btn:not(#abSaveBtn){pointer-events:none;opacity:.55}
@media(max-width:720px){
  .address-book-card-modal>.modal-actions.address-book-save-actions{position:sticky;bottom:0;z-index:20;flex-wrap:wrap;padding:9px 10px calc(9px + env(safe-area-inset-bottom));box-shadow:0 -8px 20px rgba(15,23,42,.08)}
  .address-book-save-status{order:-1;width:100%;min-height:24px;margin:0 0 2px;padding:3px 4px;border-radius:8px;background:#f8fafc}
  .address-book-save-actions .btn{flex:1;min-width:72px}
}
.site-register-save-status{display:none;color:#475569;font-size:12px;font-weight:800;white-space:nowrap}
.site-register-save-status.active{display:inline-flex;align-items:center;gap:6px}
.site-register-save-status.active::before{content:"";width:13px;height:13px;border:2px solid #cbd5e1;border-top-color:#334155;border-radius:50%;animation:jh-save-spin .75s linear infinite}
@media(max-width:720px){
  .site-register-save-status.active{width:100%;justify-content:flex-end;white-space:normal}
}
/* v55.73 업무 기본정보와 처리등록 통합: 상태/다음일정은 기록 구분에서 자동 관리 */
.worklog-hidden-state {
  display: none !important;
}
/* v55.75: 현장·주소록 선택 팝업 3열 카드형 통일 */
@media (min-width: 1081px) {
  #quoteAddressPickerModal .quote-address-picker-list,
  #quoteSitePickerModal .quote-address-picker-list,
  .address-common-picker-list,
  .money-site-picker-modal .money-site-picker-list,
  #shareAddressPickerModal .quote-address-result-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 10px;
    align-content: start;
  }
  #shareAddressPickerModal .address-picker-modal {
    width: min(1180px, 94vw);
    max-height: min(820px, 90vh);
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  #shareAddressPickerModal .quote-address-result-list {
    min-height: 360px;
    max-height: 560px;
    overflow-y: auto;
    padding: 2px 6px 2px 2px;
    margin-top: 10px;
  }
}
@media (min-width: 721px) and (max-width: 1080px) {
  #quoteAddressPickerModal .quote-address-picker-list,
  #quoteSitePickerModal .quote-address-picker-list,
  .address-common-picker-list,
  .money-site-picker-modal .money-site-picker-list,
  #shareAddressPickerModal .quote-address-result-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 9px;
    align-content: start;
  }
  #shareAddressPickerModal .address-picker-modal { width: min(940px, 96vw); }
}
@media (max-width: 720px) {
  #quoteAddressPickerModal .quote-address-picker-list,
  #quoteSitePickerModal .quote-address-picker-list,
  .address-common-picker-list,
  .money-site-picker-modal .money-site-picker-list,
  #shareAddressPickerModal .quote-address-result-list {
    display: grid;
    grid-template-columns: 1fr !important;
    gap: 8px;
  }
}
/* v55.77: 자재 수정에서 재고·금액·NVR 기준정보까지 함께 편집 */
.material-edit-modal{width:min(980px,96vw);max-height:92vh;overflow:auto}
.material-edit-section{padding:12px;margin:0 0 10px;background:#f8fafc;border-color:#e2e8f0;box-shadow:none}
.material-edit-section .section-title{margin-bottom:8px}
.material-edit-section .section-title h2{font-size:14px;margin:0}
.material-stock-stepper{display:grid;grid-template-columns:42px minmax(0,1fr) 42px;gap:6px;align-items:center}
.material-stock-stepper .btn{min-height:38px;padding:6px 8px;font-size:18px;line-height:1}
.material-stock-stepper input{text-align:center;font-weight:800}
#materialCurrentStockHint{margin:5px 2px 0}
@media(max-width:860px){.material-edit-modal .three-col{grid-template-columns:1fr}.material-edit-modal .three-col .span-2,.material-edit-modal .three-col .span-3{grid-column:span 1}}
/* v55.87: 저장·등록·업로드 진행 상태와 중복 클릭 차단 */
.jh-global-operation {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 12050;
  display: grid;
  grid-template-columns: 18px minmax(0,1fr);
  align-items: center;
  gap: 9px;
  min-width: 220px;
  max-width: min(440px, calc(100vw - 24px));
  padding: 11px 14px 13px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 14px;
  color: #fff;
  background: rgba(17,24,39,.96);
  box-shadow: 0 18px 46px rgba(15,23,42,.32);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 14px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
  pointer-events: none;
  overflow: hidden;
}
.jh-global-operation.is-visible { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.jh-global-operation-spinner {
  width: 17px;
  height: 17px;
  border: 2px solid rgba(255,255,255,.32);
  border-top-color: #fff;
  border-radius: 50%;
  animation: jh-operation-spin .75s linear infinite;
}
.jh-global-operation-bar {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 38%;
  height: 3px;
  border-radius: 999px;
  background: #ef4444;
  animation: jh-operation-slide 1.25s ease-in-out infinite;
}
@keyframes jh-operation-spin { to { transform: rotate(360deg); } }
@keyframes jh-operation-slide { 0% { transform: translateX(-110%); } 100% { transform: translateX(365%); } }
.jh-action-busy {
  cursor: progress !important;
  opacity: .72;
  pointer-events: none !important;
  filter: saturate(.82);
}

.attachment-upload-progress {
  margin: 12px 0 0;
  padding: 11px 12px;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  background: #f8fafc;
}
.attachment-upload-progress[hidden] { display: none !important; }
.attachment-upload-progress-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; font-size: 13px; }
.attachment-upload-progress-head span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment-upload-progress-head strong { flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.attachment-upload-progress-track { height: 8px; overflow: hidden; border-radius: 999px; background: #e2e8f0; }
.attachment-upload-progress-bar { width: 0; height: 100%; border-radius: inherit; background: #dc2626; transition: width .16s ease; }
/* 모바일 상단 툴바 크기·메뉴 버튼 보정 */
.sidebar-toggle-label { display: none; }
@media (max-width: 760px) {
  .sidebar-topline {
    min-height: 52px;
    gap: 8px !important;
  }
  .sidebar-topline .brand-logo {
    flex: 0 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: calc(100% - 84px) !important;
    height: 46px !important;
    padding: 6px 4px !important;
    justify-content: flex-start !important;
  }
  .sidebar-topline .brand-logo img { pointer-events: none; }
  .sidebar-topline .sidebar-toggle {
    flex: 0 0 72px !important;
    width: 72px !important;
    min-width: 72px !important;
    height: 48px !important;
    margin-left: 0 !important;
    padding: 0 10px !important;
    gap: 6px;
    border-radius: 12px !important;
    touch-action: manipulation;
  }
  .sidebar-toggle .toggle-open { font-size: 20px; line-height: 1; }
  .sidebar-toggle-label { display: inline-flex; font-size: 12px; font-weight: 800; letter-spacing: -.02em; }
  .jh-global-operation { width: calc(100vw - 24px); min-width: 0; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
}
/* 모바일 상단 계정 메뉴 */
.mobile-account-toggle,
.mobile-account-menu { display: none; }
@media (max-width: 760px) {
  /* 모바일에서는 상단 전용 계정 버튼만 사용하고 PC용 하단 계정 블록은 숨긴다. */
  .sidebar-account { display: none !important; }
  .mobile-account-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: rgba(255,255,255,.08);
    color: #f8fafc;
    cursor: pointer;
  }
  .mobile-account-toggle:hover,
  .mobile-account-toggle[aria-expanded="true"] { background: rgba(255,255,255,.15); }
  .mobile-account-toggle svg { width: 22px; height: 22px; fill: currentColor; pointer-events: none; }
  .mobile-account-menu {
    position: absolute;
    right: 56px;
    top: calc(100% + 7px);
    z-index: 4;
    width: min(230px, calc(100vw - 24px));
    padding: 9px;
    border: 1px solid rgba(148,163,184,.28);
    border-radius: 14px;
    background: #111827;
    box-shadow: 0 20px 50px rgba(15,23,42,.34);
  }
  .mobile-account-menu:not([hidden]) { display: grid; gap: 4px; }
  .mobile-account-summary { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px 10px; border-bottom: 1px solid rgba(255,255,255,.12); margin-bottom: 3px; }
  .mobile-account-summary strong { color: #fff; font-size: 14px; }
  .mobile-account-summary span { color: #aeb8c7; font-size: 11px; }
  .mobile-account-menu button { width: 100%; min-height: 40px; padding: 8px 10px; border: 0; border-radius: 9px; background: transparent; color: #e5e7eb; text-align: left; cursor: pointer; }
  .mobile-account-menu button:hover { background: rgba(255,255,255,.09); }
  .mobile-account-menu button.danger-text { color: #fecaca; }
}
/* v55.89 공유문서 원스톱 작성 흐름 */
.share-draft-stepbar{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:0 0 12px}
.share-draft-step{display:flex;align-items:center;gap:8px;min-width:0;padding:9px 11px;border:1px solid #e2e8f0;border-radius:12px;background:#f8fafc;color:#94a3b8;font-size:12px;font-weight:800}
.share-draft-step b{display:inline-flex;align-items:center;justify-content:center;flex:0 0 24px;width:24px;height:24px;border-radius:8px;background:#e2e8f0;color:#64748b}
.share-draft-step.active{border-color:#bfdbfe;background:#eff6ff;color:#1d4ed8}
.share-draft-step.active b{background:#2563eb;color:#fff}
.share-draft-step.done:not(.active){border-color:#bbf7d0;background:#f0fdf4;color:#15803d}
.share-draft-step.done:not(.active) b{background:#22c55e;color:#fff}
.share-draft-source-card{margin-bottom:12px}
.share-draft-type-grid{align-items:end}
.share-draft-type-grid .span-3{grid-column:span 3}
.share-draft-primary-finder{display:flex;align-items:center;justify-content:space-between;gap:14px;min-height:66px;padding:10px 12px;border:1px solid #dbeafe;border-radius:13px;background:#f8fbff}
.share-draft-primary-finder div{display:grid;gap:3px;min-width:0}
.share-draft-primary-finder strong{font-size:13px;color:#0f172a}
.share-draft-primary-finder span{font-size:11px;line-height:1.4;color:#64748b}
.share-draft-primary-finder .btn{flex:0 0 auto;min-width:112px}
.share-draft-link-card[hidden],#shareDraftDetailsArea[hidden]{display:none!important}
@media(max-width:760px){.share-draft-stepbar{gap:5px}.share-draft-step{padding:7px 8px;gap:5px}.share-draft-step b{width:21px;height:21px;flex-basis:21px}.share-draft-primary-finder{align-items:stretch;flex-direction:column}.share-draft-primary-finder .btn{width:100%;min-height:44px}.share-draft-type-grid .span-3{grid-column:span 1}}

/* v55.98: 공유송부 기본 세금계산서 이메일 + 주소록 담당자 선택 */
.share-send-contact-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
}
.share-send-contact-control input[readonly] {
  cursor: pointer;
  background: #fff;
}
.share-send-contact-control .btn {
  min-height: 40px;
  border-radius: 10px;
  white-space: nowrap;
}
.share-send-contact-field > .small {
  display: block;
  min-height: 16px;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.share-send-contact-picker-modal {
  width: min(760px, 94vw);
  max-height: min(760px, 90vh);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.share-send-contact-picker-list {
  min-height: 180px;
  max-height: 520px;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 10px;
  padding: 2px;
}
.share-send-contact-option {
  min-width: 0;
  min-height: 82px;
  display: grid;
  align-content: center;
  gap: 7px;
  padding: 12px;
  border: 1px solid #dbe3ee;
  border-radius: 14px;
  background: #fff;
  color: #172033;
  text-align: left;
  cursor: pointer;
}
.share-send-contact-option:hover,
.share-send-contact-option.selected {
  border-color: #7f9edc;
  background: #f6f9ff;
  box-shadow: 0 0 0 2px rgba(71,119,232,.08);
}
.share-send-contact-option:disabled {
  cursor: not-allowed;
  opacity: .55;
  background: #f8fafc;
  box-shadow: none;
}
.share-send-contact-option-head {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.share-send-contact-option-head strong,
.share-send-contact-option > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.share-send-contact-option-head strong { font-size: 13px; }
.share-send-contact-option > span { color: #64748b; font-size: 11px; }
@media (max-width: 640px) {
  .share-send-contact-picker-list { grid-template-columns: 1fr; }
  .share-send-contact-control { grid-template-columns: 1fr; }
  .share-send-contact-control .btn { width: 100%; }
}
/* v56.02.02 외부연동 카드 · 설정 팝업 */
.integration-settings-intro{margin:0 0 12px}
.integration-service-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;align-items:stretch}
.integration-service-card{position:relative;display:flex;min-width:0;min-height:220px;flex-direction:column;gap:10px;margin:0!important;padding:16px;overflow:hidden;border-top:3px solid transparent}
.integration-gmail-card{border-top-color:#ea4335}.integration-parcel-card{border-top-color:#e53935}.integration-kakao-card{border-top-color:#f3d900}
.integration-service-head{display:grid;grid-template-columns:38px minmax(0,1fr) auto;align-items:center;gap:10px}
.integration-service-icon{display:inline-flex;width:38px;height:38px;align-items:center;justify-content:center;border-radius:12px;font-size:16px;font-weight:900;background:#f5f6f8;color:#172033}
.integration-gmail-card .integration-service-icon{background:#fff0ee;color:#c62828}.integration-parcel-card .integration-service-icon{background:#ffefee;color:#c62828}.integration-kakao-card .integration-service-icon{background:#fff9cc;color:#3b3100}
.integration-service-title{min-width:0}.integration-service-title h2{margin:0;color:#172033;font-size:15px}.integration-service-title span{display:block;margin-top:3px;color:#7b8798;font-size:10px}
.integration-service-card .status{font-size:10px;white-space:nowrap;padding:4px 7px}
.integration-service-summary{min-height:38px;color:#334155;font-size:12px;font-weight:700;line-height:1.5;word-break:break-word}
.integration-service-help{display:-webkit-box;min-height:34px;margin:0;color:#7b8798;font-size:10px;line-height:1.45;overflow:hidden;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.integration-service-button{width:100%;margin-top:auto;justify-content:center}
.integration-settings-backdrop{display:none}.integration-settings-modal{position:relative;width:min(650px,calc(100vw - 28px));padding-top:18px}.integration-settings-modal-head{padding-right:82px}.integration-settings-close{position:absolute;top:16px;right:16px;z-index:3}.integration-settings-panel{display:flex;flex-direction:column;gap:14px}.integration-settings-panel.hidden{display:none}.integration-settings-notice{padding:12px 13px;border:1px solid #e0e6ee;border-radius:12px;background:#f8fafc;color:#526074;font-size:11px;line-height:1.55}.integration-settings-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}.integration-settings-actions .btn{min-width:104px;justify-content:center}
@media(max-width:1050px){.integration-service-grid{grid-template-columns:1fr}}
@media(max-width:680px){.integration-settings-modal{padding-top:14px}.integration-settings-modal-head{padding-right:74px}.integration-settings-close{top:12px;right:12px}.integration-settings-actions{display:grid;grid-template-columns:1fr 1fr}.integration-settings-actions .btn{width:100%;min-width:0}}
/* v56.02.03 자료실 상세 카카오톡 일회 공유주소 */
.library-share-address-card{margin-top:12px;padding:12px 13px;border:1px solid #e1e6ee;border-radius:14px;background:#fbfcfe}
.library-share-address-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}
.library-share-address-head strong{color:#172033;font-size:12px}
.library-share-address-head span{color:#7b8798;font-size:9px}
.library-share-address-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:6px}
.library-share-address-row input{width:100%;min-width:0;min-height:38px;border:1px solid #d7dde8;border-radius:11px;background:#fff;padding:8px 11px;color:#475569;font-size:10px}
.library-share-address-row .btn{padding:8px 11px;font-size:10px;white-space:nowrap}
@media(max-width:680px){.library-share-address-head{align-items:flex-start;flex-direction:column}.library-share-address-row{grid-template-columns:1fr 1fr}.library-share-address-row input{grid-column:1/-1}}

/* v56.02.04 자료실 상시 공유주소 도구 */
.library-detail-share-tools>span{display:flex!important;align-items:center;gap:6px;white-space:normal!important;overflow:visible!important}
.library-detail-share-tools .btn{min-height:30px;padding:6px 9px;font-size:10px;white-space:nowrap}
.library-detail-share-tools.is-ready{background:#f7faff;border-color:#cfdcf1}
@media(max-width:680px){.library-detail-share-tools>span{flex-wrap:wrap}.library-detail-share-tools .btn{flex:1 1 auto}}
/* v56.02.05 업무 자동공유 · 공유상세 상단 송부 */
.worklog-progress-share-bar{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-top:12px;padding:12px 13px;border:1px solid #dde4ed;border-radius:13px;background:#f8fafc}
.worklog-progress-share-copy{display:flex;flex-direction:column;gap:3px;min-width:0}.worklog-progress-share-copy strong{color:#172033;font-size:12px}.worklog-progress-share-copy .small{color:#64748b;line-height:1.4}
.worklog-progress-share-actions{display:flex;align-items:center;justify-content:flex-end;gap:7px;flex-wrap:wrap;flex:0 0 auto}
.worklog-share-state.expired{border-color:#d7dce4;background:#f1f3f5;color:#7b8794}
.share-detail-header-actions{display:flex;align-items:center;gap:8px;flex:0 0 auto}
@media(max-width:680px){.worklog-progress-share-bar{align-items:stretch;flex-direction:column}.worklog-progress-share-actions{justify-content:stretch}.worklog-progress-share-actions .btn{flex:1 1 auto}.share-detail-header-actions{gap:6px}.share-detail-header-actions .btn{padding-inline:10px}}


/* v56.02.06 현장 주소록 실데이터 로딩 · 업무 진행현황판 정렬 보정 */
.address-common-picker-state{grid-column:1/-1;display:flex;align-items:center;justify-content:center;min-height:220px;border:1px dashed #cbd5e1;border-radius:14px;background:#f8fafc;color:#64748b;font-size:13px;font-weight:800;text-align:center;padding:18px}
.worklog-progress-share-bar{display:grid;grid-template-columns:minmax(170px,1fr) auto;align-items:center;gap:12px}
.worklog-progress-share-copy{min-width:170px}
.worklog-progress-share-copy strong{white-space:nowrap;word-break:keep-all;writing-mode:horizontal-tb}
.worklog-progress-share-actions{min-width:0}
@media(max-width:980px){.worklog-progress-share-bar{grid-template-columns:1fr;align-items:stretch}.worklog-progress-share-copy{min-width:0}.worklog-progress-share-actions{justify-content:flex-start}}

/* v56.02.07 업무 진행현황판 하단 이동 · 기능버튼 가로 정렬 */
.worklog-progress-share-card{padding:12px 14px}
.worklog-progress-share-card .worklog-progress-share-bar{grid-template-columns:minmax(0,1fr) auto;margin:0;padding:0;border:0;border-radius:0;background:transparent}
.worklog-progress-share-card .worklog-progress-share-actions{min-width:0;overflow-x:auto;padding-bottom:1px}
@media(max-width:680px){
  .worklog-progress-share-card .worklog-progress-share-bar{grid-template-columns:minmax(0,1fr) auto;align-items:center}
  .worklog-progress-share-card .worklog-progress-share-actions{justify-content:flex-start;max-width:60vw}
  .worklog-progress-share-card .worklog-progress-share-actions .btn{flex:0 0 auto}
}
/* v56.02.08 공통 목록 제목 · 분류 · 검색 배치 통일 */
.jh-list-title-row {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}
.jh-list-title-copy {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
  min-width: 0;
}
.jh-list-title-copy h2 {
  margin: 0;
  white-space: nowrap;
}
.jh-list-title-copy > .small {
  overflow: hidden;
  max-width: 360px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.jh-list-search-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
}
.jh-list-search-actions input[type="text"],
.jh-list-search-actions input[type="search"] {
  flex: 1 1 560px;
  width: min(760px, 100%);
  max-width: 760px;
  min-width: 220px;
  min-height: 42px;
  border: 1px solid #d7dde8;
  border-radius: 13px;
  background: #fff;
  padding: 9px 13px;
  color: #111827;
  font-size: 13px;
  outline: 0;
}
.jh-list-search-actions input[type="text"]:focus,
.jh-list-search-actions input[type="search"]:focus {
  border-color: #93a9dc;
  box-shadow: 0 0 0 3px rgba(71,119,232,.1);
}
.jh-list-search-actions select,
.jh-list-search-actions > .jh-select {
  flex: 0 0 140px;
  min-width: 140px;
  min-height: 42px;
}
.jh-list-search-actions .btn {
  flex: 0 0 auto;
  min-height: 42px;
  white-space: nowrap;
}
@media (max-width: 1280px) {
  .jh-list-title-row {
    align-items: stretch;
    flex-direction: column;
    gap: 9px;
  }
  .jh-list-search-actions {
    width: 100%;
    justify-content: stretch;
  }
  .jh-list-search-actions input[type="text"],
  .jh-list-search-actions input[type="search"] {
    max-width: none;
  }
  .jh-list-title-copy > .small { max-width: none; }
}
@media (max-width: 760px) {
  .jh-list-title-copy {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }
  .jh-list-title-copy > .small {
    width: 100%;
    white-space: normal;
  }
  .jh-list-search-actions {
    flex-wrap: wrap;
  }
  .jh-list-search-actions input[type="text"],
  .jh-list-search-actions input[type="search"] {
    order: -1;
    flex: 1 1 100%;
    min-width: 0;
  }
  .jh-list-search-actions select,
  .jh-list-search-actions > .jh-select {
    flex: 1 1 132px;
    min-width: 0;
  }
  .jh-list-search-actions .btn { flex: 0 0 auto; }
}
.worklog-list-search-actions select,
.worklog-list-search-actions > .jh-select { flex-basis: 135px; min-width: 135px; }
@media (max-width: 760px) {
  .worklog-list-search-actions select,
  .worklog-list-search-actions > .jh-select {
    flex: 1 1 132px;
    min-width: 0;
  }
}
.expense-list-search-actions select,
.expense-list-search-actions > .jh-select { flex-basis: 154px; min-width: 154px; }
.money-list-search-actions select,
.money-list-search-actions > .jh-select { flex-basis: 112px; min-width: 112px; }
@media (max-width: 760px) {
  .expense-list-search-actions select,
  .expense-list-search-actions > .jh-select {
    flex: 1 1 132px;
    min-width: 0;
  }
}
.site-list-search-actions select,
.site-list-search-actions > .jh-select { flex-basis: 148px; min-width: 148px; }
@media (max-width: 760px) {
  .site-list-search-actions select,
  .site-list-search-actions > .jh-select {
    flex: 1 1 132px;
    min-width: 0;
  }
}
/* 현장 목록 14건 표시용 밀도와 변경된 컬럼 순서 */
#site .site-list-card th:nth-child(1),
#site .site-list-card td:nth-child(1) { width: 92px; }
#site .site-list-card th:nth-child(2),
#site .site-list-card td:nth-child(2) { width: 92px; text-align: center; }
#site .site-list-card th:nth-child(3),
#site .site-list-card td:nth-child(3) { width: 210px; }
#site .site-list-card th:nth-child(5),
#site .site-list-card td:nth-child(5) { width: 108px; }
#site .site-list-card th:nth-child(6),
#site .site-list-card td:nth-child(6) { width: 112px; }
#site .site-list-card th:nth-child(7),
#site .site-list-card td:nth-child(7) { width: 64px; }
#siteTableBody .site-row > td { padding-top: 7px; padding-bottom: 7px; }
.material-list-search-actions select,
.material-list-search-actions > .jh-select { flex-basis: 122px; min-width: 122px; }
