:root{--p:#7652eb;--ink:#211d32;--muted:#777185;--stroke:#e9e5f0}*{box-sizing:border-box}body{font:14px/1.55 system-ui,'Noto Sans KR',sans-serif;margin:0;color:var(--ink);background:#f7f7fd}button,input,textarea,select{font:inherit}button{cursor:pointer}button:disabled{opacity:.4;cursor:not-allowed}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #b4a1f9;outline-offset:2px}a{text-decoration:none;color:inherit}.primary{background:var(--p);border:1px solid var(--p);color:#fff;padding:10px 15px;border-radius:10px;font-weight:800}.outline{background:#fff;border:1px solid var(--stroke);padding:10px 15px;border-radius:10px;font-weight:700;color:var(--ink)}.login-screen{min-height:100vh;display:grid;place-items:center;background:linear-gradient(135deg,#ece7ff,#faf9ff);padding:20px}.login-screen[hidden],.admin-shell[hidden],.view[hidden]{display:none!important}.login-card{background:#fff;border:1px solid #e3d9fd;box-shadow:0 18px 60px #40337525;width:min(430px,100%);border-radius:22px;padding:36px}.login-icon{display:grid;place-items:center;background:var(--p);color:#ffe577;width:50px;height:50px;border-radius:15px;font-size:30px}.login-card h1{font-size:26px;margin:20px 0 4px}.login-card h1 span{color:var(--p)}.login-card p{color:var(--muted)}.login-card label{display:block;font-weight:800;margin:18px 0}.login-card input{display:block;margin-top:8px;padding:13px;border:1px solid var(--stroke);border-radius:11px;width:100%}.login-card button{width:100%;margin:3px 0}.login-error{color:#b42350!important;min-height:20px}.back-home{display:block;text-align:center;margin-top:12px;color:#827996}.demo-note{background:#fff5d7;border-radius:9px;padding:9px;font-size:12px;color:#795c20;margin-top:10px}.admin-shell{min-height:100vh;display:grid;grid-template-columns:224px minmax(0,1fr)}.sidebar{background:#251b42;color:#fff;display:flex;flex-direction:column;min-height:100vh;padding:26px 14px}.side-brand{font-size:20px;font-weight:900;white-space:nowrap;letter-spacing:-1px;margin:0 10px}.side-sub{color:#a79dc1;margin:4px 10px 31px;font-size:11px}.sidebar nav{display:flex;flex-direction:column;gap:7px}.side-nav{border:0;background:transparent;text-align:left;color:#cfc8dd;padding:12px 14px;border-radius:11px;font-weight:750}.side-nav:hover,.side-nav.active{color:#fff;background:#7554e8}.side-bottom{margin-top:auto;padding:15px 10px;font-size:11px;color:#b4add0}.side-bottom button{display:block;margin-top:15px;color:#fff;background:transparent;border:1px solid #645781;border-radius:8px;padding:8px 12px}.dashboard{padding:32px;min-width:0;max-width:1800px;width:100%;margin:0 auto}.dashboard-head{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:20px}.dashboard-head .eyebrow{font-size:11px;letter-spacing:1.5px;color:var(--p);font-weight:800;margin:0}.dashboard-head h1{font-size:30px;letter-spacing:-1px;margin:4px 0}.dashboard-head p:last-child{color:var(--muted);margin:0}.admin-alert{min-height:20px;font-size:12px;color:#5e41a6;margin-bottom:9px}.summary-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;margin-bottom:20px}.summary-card{display:flex;flex-direction:column;align-items:flex-start;gap:9px;padding:19px 16px;background:#fff;border:1px solid var(--stroke);border-radius:15px;text-align:left}.summary-card.active{border-color:var(--p);box-shadow:0 0 0 2px #7652eb19}.summary-card span{font-weight:800;color:var(--muted);font-size:12px}.summary-card strong{font-size:27px}.table-card{background:#fff;border-radius:18px;padding:23px;border:1px solid var(--stroke)}.table-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:18px}.table-head h2{margin:0;font-size:19px}.table-head p{color:var(--muted);margin:5px 0}.actions{display:flex;gap:8px;flex-wrap:wrap}.filter-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:15px 0 20px}.filter-grid label{font-size:12px;color:#787287;font-weight:700}.filter-grid input,.filter-grid select{display:block;width:100%;height:41px;border:1px solid var(--stroke);border-radius:9px;margin-top:5px;padding:8px 10px;color:var(--ink);background:#fff}.table-scroll{overflow-x:auto}table{width:100%;border-collapse:collapse;white-space:nowrap;font-size:12px}th{font-weight:800;color:#8b8495;text-align:left;background:#f8f7fb;padding:13px 10px}td{border-bottom:1px solid #f0edf4;padding:12px 10px}td:nth-child(3){font-weight:800}tr:hover td{background:#fbfaff}.status-badge{display:inline-block;border-radius:7px;background:#ece7ff;color:#5534ab;padding:4px 8px;font-size:11px;font-weight:800}.status-new{background:#ecf7ff;color:#2875bb}.status-completed{background:#e9f9ef;color:#168a48}.status-closed{background:#efeff3;color:#676575}.row-action{border:1px solid #dcd5ea;background:white;color:#5232bd;padding:6px 9px;border-radius:8px;font-weight:800}.pin-action{border:0;background:transparent;font-size:18px}.table-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-top:18px;color:#827a8e;font-size:12px}.table-foot>div{display:flex;align-items:center;gap:10px}.table-foot button{padding:7px 10px}#stats-content{display:grid;gap:14px;margin-top:24px;max-width:700px}.stat-row{display:grid;grid-template-columns:120px 1fr 50px;gap:12px;align-items:center}.stat-track{background:#f0edf5;height:11px;border-radius:10px;overflow:hidden}.stat-fill{background:var(--p);height:11px;border-radius:10px}.dialog{width:min(760px,calc(100vw - 20px));max-height:90vh;border:0;border-radius:19px;padding:23px;box-shadow:0 25px 90px #20134050}.dialog::backdrop{background:#201b338a}.dialog-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}.dialog-head h2{margin:0}.close-dialog{border:0;background:#f2eff8;border-radius:10px;padding:8px 12px;font-size:18px}.dialog-meta{background:#f7f3ff;border-radius:10px;padding:11px;margin-bottom:14px;color:#686078;font-size:12px}.dialog-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.dialog label{font-weight:750;display:block;font-size:12px}.dialog :is(input,textarea,select){display:block;margin-top:5px;padding:10px;border:1px solid var(--stroke);border-radius:9px;width:100%;background:#fff;min-height:42px;color:var(--ink)}.block-label{margin-top:15px}.lead-extra{margin-top:13px;background:#f8f8fd;border-radius:10px;padding:12px;font-size:12px;white-space:normal;color:#696073}.dialog-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:20px}.muted-empty{text-align:center!important;color:var(--muted);padding:38px!important}@media(max-width:1200px){.summary-grid{grid-template-columns:repeat(3,1fr)}}@media(max-width:780px){.admin-shell{display:block}.sidebar{min-height:auto;padding:14px}.sidebar nav{display:flex;flex-direction:row;overflow-x:auto;margin-top:10px}.side-sub,.side-bottom{display:none}.side-brand{font-size:18px}.side-nav{white-space:nowrap;padding:9px}.dashboard{padding:18px}.dashboard-head h1{font-size:24px}.summary-grid{grid-template-columns:repeat(2,1fr)}.filter-grid{grid-template-columns:repeat(2,1fr)}.table-card{padding:13px}.dialog-grid{grid-template-columns:1fr}.dialog{padding:18px}.table-head{align-items:flex-start;flex-wrap:wrap}}@media(max-width:480px){.filter-grid{grid-template-columns:1fr}.dashboard-head{align-items:flex-start}.dashboard-head button{font-size:11px}.summary-card{padding:13px}}

/* v2: 문의종류 복수선택 및 신청 경로 표시 */
.services-editor { padding: 7px 0; }
.services-editor > strong { display:block; margin-bottom: 9px; font-size: 13px; }
.service-check-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px 12px; }
.service-check-grid label { display: flex; flex-direction: row; align-items: center; gap: 7px; cursor: pointer; font-size: 13px; }
.service-check-grid input { width: 16px; height: 16px; accent-color: #7452ee; }
.source-tag { display: inline-block; margin-top: 2px; color: #7055c9; font-size: 11px; }
@media(max-width:600px) { .service-check-grid { grid-template-columns: 1fr 1fr; } }
.dialog .service-check-grid label { display:flex; align-items:center; gap:7px; font-size:13px; }
.dialog .service-check-grid input[type="checkbox"] { width:16px; height:16px; min-height:0; display:inline-block; padding:0; margin:0; flex:none; }


/* v3: 월간 예약 캘린더 */
.calendar-head { align-items:flex-start; flex-wrap:wrap; }
.calendar-nav { display:flex; align-items:center; gap:7px; flex-shrink:0; }
.calendar-nav button { min-width:39px; min-height:37px; padding:7px 11px; }
.calendar-nav button:first-child,.calendar-nav button:last-child { font-size:23px; line-height:1; }
.calendar-summary { display:flex; align-items:center; justify-content:space-between; margin:18px 0 12px; gap:12px; }
.calendar-summary h3 { font-size:22px; margin:0; letter-spacing:-.5px; }
.calendar-count { font-size:12px; color:#655c77; background:#f3efff; padding:6px 11px; border-radius:20px; }
.calendar-scroll { overflow-x:auto; border:1px solid var(--stroke); border-radius:12px; }
.calendar-content { min-width:690px; }
.calendar-weekdays,.calendar-grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); }
.calendar-weekdays { background:#f6f3fc; border-bottom:1px solid #e6e0f0; }
.calendar-weekdays span { font-size:12px; text-align:center; padding:11px 0; color:#615a6c; font-weight:800; }
.calendar-weekdays span:first-child { color:#c15567; }
.calendar-weekdays span:last-child { color:#446abb; }
.calendar-day { min-height:128px; padding:9px 7px; border-right:1px solid #edeaf3; border-bottom:1px solid #edeaf3; background:white; min-width:0; }
.calendar-day:nth-child(7n) { border-right:none; }
.calendar-day.is-other { background:#faf9fc; }
.calendar-day.is-today { background:#f5f0ff; box-shadow:inset 0 0 0 2px #bea8ff; }
.calendar-date { display:inline-flex; justify-content:center; align-items:center; width:28px; height:28px; border-radius:50%; font-weight:800; color:#3c344c; font-size:12px; margin-bottom:5px; }
.calendar-day.is-today .calendar-date { background:var(--p); color:white; }
.calendar-day.is-other .calendar-date { color:#bbb5c5; }
.calendar-day:nth-child(7n+1) .calendar-date { color:#bd4b66; }
.calendar-event { display:block; width:100%; text-align:left; padding:7px 8px; margin:4px 0 0; border:1px solid #b7a8ff; border-left:3px solid var(--p); border-radius:7px; background:#f4f0ff; color:#382978; line-height:1.35; cursor:pointer; min-height:0; font-size:11px; }
.calendar-event .event-name { display:block; font-weight:850; overflow-wrap:anywhere; }
.calendar-event .event-detail { display:block; font-size:10px; margin-top:3px; color:#695d8c; overflow-wrap:anywhere; }
.calendar-event.status-cleaning { border-color:#8fcde2; border-left-color:#138bad; background:#ebf9fc; color:#1a647a; }
.calendar-event.status-completed { border-color:#b3dfc4; border-left-color:#1d9954; background:#effbf2; color:#286642; }
.calendar-event.is-tentative { border-style:dashed; background:#fffdf5; border-color:#d8b85b; color:#796027; }
.calendar-event:hover { filter:brightness(.96); transform:translateY(-1px); }
.calendar-help,.calendar-hint { font-size:12px; margin:11px 0 0; color:#726781; }
.calendar-hint { color:#907643; }
.calendar-list { margin-top:20px; padding-top:15px; border-top:1px solid var(--stroke); }
.calendar-list summary { cursor:pointer; color:#6041b3; font-weight:800; padding:5px; }
.calendar-list .table-scroll { padding-top:12px; }
.booking-editor { margin-top:20px; background:#faf8ff; border:1px solid #e7defb; border-radius:14px; padding:16px; }
.booking-editor[hidden] { display:none; }
.booking-editor h3 { font-size:17px; margin:0 0 3px; }
.booking-editor p { color:#777185; font-size:12px; margin:0 0 13px; }
@media (max-width:780px) { .calendar-day { min-height:105px; } .calendar-summary h3 { font-size:20px; } .calendar-card { padding:15px; } }

/* 예약 캘린더 일정 한 줄 표시 */
.calendar-event { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.calendar-event .event-name, .calendar-event .event-detail {
 display:inline; margin-top:0; overflow-wrap:normal;
}
.calendar-event .event-detail::before {content:" · ";}


/* v5: CRM detailed inquiry labels and values */
.lead-extra { display:flex; flex-wrap:wrap; align-items:flex-start; gap:8px 14px; }
.lead-extra[hidden] { display:none!important; }
.lead-extra__item { display:inline-flex; align-items:baseline; gap:5px; max-width:100%; line-height:1.7; }
.lead-extra__label { color:#7046ce; font-weight:850; white-space:nowrap; }
.lead-extra__value { color:#392f4a; overflow-wrap:anywhere; }


/* CRM compact leads screen - v5 layout-only update.
   Keep the existing CRM data, interactions and other menu layouts unchanged. */
@media (min-width:781px) {
  .dashboard:has(#lead-view:not([hidden])) {
    padding: 14px 22px 22px;
  }
}

/* The left navigation already identifies the current page. */
.dashboard:has(#lead-view:not([hidden])) .dashboard-head > div {
  display: none;
}
.dashboard:has(#lead-view:not([hidden])) .dashboard-head {
  justify-content: flex-end;
  margin-bottom: 6px;
}
.dashboard:has(#lead-view:not([hidden])) #admin-alert:empty {
  display: none;
}
.dashboard:has(#lead-view:not([hidden])) #admin-alert:not(:empty) {
  min-height: 0;
  margin-bottom: 8px;
}

/* Status filters: label and count on the same line. */
#lead-view .summary-grid {
  gap: 9px;
  margin-bottom: 11px;
}
#lead-view .summary-card {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  min-height: 50px;
  padding: 10px 13px;
  gap: 8px;
  border-radius: 11px;
}
#lead-view .summary-card span {
  min-width: 0;
  font-size: 12px;
  color: #665f74;
  white-space: nowrap;
}
#lead-view .summary-card strong {
  flex-shrink: 0;
  font-size: 20px;
  line-height: 1.1;
  color: #211d32;
  font-variant-numeric: tabular-nums;
}

/* Reduce whitespace above and between the customer rows. */
#lead-view .table-card {
  padding: 16px 18px;
}
#lead-view .table-head {
  margin-bottom: 9px;
}
#lead-view .table-head h2 {
  font-size: 17px;
}
#lead-view .table-head .actions :is(.primary,.outline) {
  padding: 8px 12px;
}
#lead-view .filter-grid {
  gap: 7px 10px;
  margin: 9px 0 13px;
}
#lead-view .filter-grid :is(input,select) {
  height: 36px;
  margin-top: 3px;
  padding: 6px 9px;
}
#lead-view th {
  padding: 10px 9px;
}
#lead-view td {
  padding: 9px 9px;
}
#lead-view .table-foot {
  padding-top: 10px;
}

@media(max-width:780px) {
  .dashboard:has(#lead-view:not([hidden])) {
    padding: 10px 12px 18px;
  }
  #lead-view .summary-grid {
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 6px;
  }
  #lead-view .summary-card {
    padding: 9px 10px;
    min-height: 44px;
    gap: 5px;
  }
  #lead-view .summary-card span { font-size: 11px; }
  #lead-view .summary-card strong { font-size: 17px; }
  #lead-view .table-card { padding: 12px; }
}
@media(max-width:520px) {
  #lead-view .summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  #lead-view .summary-card span { white-space: normal; }
}

/* v5 CRM list refinement: separate contact column + quick date calendar */
#lead-view .leads-table { min-width:1125px; }
#lead-view .lead-name-cell strong { display:block; font-weight:850; line-height:1.3; }
#lead-view .lead-name-cell .source-tag { display:block; font-weight:500; line-height:1.4; margin-top:3px; }
#lead-view .lead-phone-cell { font-weight:650; letter-spacing:-.2px; white-space:nowrap; font-variant-numeric:tabular-nums; }
#lead-view .leads-table td:nth-child(4) { font-weight:650; }
#lead-view .inline-date-cell { display:inline-flex; align-items:center; gap:4px; padding:4px 3px; border:1px solid transparent; border-radius:6px; color:#33274c; background:transparent; white-space:nowrap; font-size:12px; font-variant-numeric:tabular-nums; }
#lead-view .inline-date-cell:hover, #lead-view .inline-date-cell:focus-visible { border-color:#c9baff; background:#f5f1ff; }
#lead-view .inline-date-cell.is-empty { color:#9991a7; }
#lead-view .inline-date-icon { font-size:10px; color:#906ef2; opacity:0; }
#lead-view .inline-date-cell:hover .inline-date-icon,#lead-view .inline-date-cell:focus-visible .inline-date-icon { opacity:1; }
#lead-view .followup-toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:8px 12px; margin:0 0 12px; }
#lead-view .followup-toolbar__label { font-size:12px; color:#594978; font-weight:850; white-space:nowrap; }
#lead-view .followup-filters { display:flex; flex-wrap:wrap; gap:5px; }
#lead-view .followup-chip { display:inline-flex; align-items:center; gap:6px; padding:5px 9px; border:1px solid #e4dbf7; border-radius:8px; background:#fff; font-size:12px; color:#625879; white-space:nowrap; font-weight:700; }
#lead-view .followup-chip b { color:#6f4eda; font-size:12px; font-variant-numeric:tabular-nums; }
#lead-view .followup-chip.active { background:#7554e8; border-color:#7554e8; color:white; }
#lead-view .followup-chip.active b { color:white; }
#lead-view .followup-chip:hover:not(.active) { background:#f6f1ff; }
.inline-date-picker[hidden] { display:none!important; }
.inline-date-picker { position:fixed; z-index:9999; width:300px; background:#fff; border:1px solid #ded7eb; border-radius:14px; box-shadow:0 18px 48px #24183d38; padding:12px; font-size:13px; color:#251f31; }
.inline-date-picker__head { display:flex; align-items:center; justify-content:space-between; gap:6px; padding-bottom:10px; border-bottom:1px solid #eee9f4; }
.inline-date-picker__head strong { font-size:13px; }
.inline-date-picker__tools { display:flex; gap:5px; }
.inline-date-picker__clear { border:1px solid #e2d8f8; background:#f7f3ff; color:#6740c0; font-size:11px; font-weight:800; border-radius:6px; padding:5px 8px; }
.inline-date-picker__close { border:0; background:#f4f0fb; border-radius:6px; padding:2px 8px; font-size:21px; line-height:1.2; }
.inline-date-picker__month { display:flex; justify-content:space-between; align-items:center; padding:12px 0 7px; }
.inline-date-picker__month button { border:1px solid #eee9f4; background:#fff; border-radius:7px; width:29px; height:29px; font-size:21px; line-height:1; }
.inline-date-picker__weekdays,.inline-date-picker__days { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:3px; }
.inline-date-picker__weekdays span { text-align:center; font-size:11px; font-weight:750; color:#8b8398; padding:6px 0; }
.inline-date-picker__days button { height:33px; border:0; background:#fff; border-radius:6px; font-size:12px; }
.inline-date-picker__days button:hover { background:#eee7ff; }
.inline-date-picker__days button.is-today { box-shadow:inset 0 0 0 1px #b49cf4; }
.inline-date-picker__days button.is-selected { color:white; background:#7554e8; font-weight:850; }
.inline-date-picker__days button:disabled { opacity:.4; }
.inline-date-picker__notice { margin:10px 0 0; min-height:16px; color:#6e6185; font-size:11px; line-height:1.4; }
@media(max-width:780px){#lead-view .followup-toolbar{gap:6px}#lead-view .followup-filters{gap:4px}#lead-view .followup-chip{padding:5px 7px}}
