:root {
  --g: #14532d; --g2: #16a34a; --bg: #f4f6f4; --line: #dfe5df; --text: #1b1f1b; --muted: #6b746b;
  --red: #c62828; --amber: #b45309; --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text);
  font-family: Pretendard, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; font-size: 16px; line-height: 1.5; }
.hidden { display: none !important; }
.muted { color: var(--muted); } .small { font-size: 13px; }
.err { color: var(--red); font-size: 14px; min-height: 1em; margin: 6px 0 0; }
h2 { font-size: 22px; margin: 4px 0 2px; } h3 { margin: 0 0 12px; }
a { color: var(--g2); }

.logo { width: 56px; height: 56px; border-radius: 16px; background: var(--g); color: #fff; font-weight: 800;
  display: inline-grid; place-items: center; font-size: 22px; letter-spacing: -1px; }
.logo.sm { width: 30px; height: 30px; border-radius: 9px; font-size: 13px; }

.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-box { width: 100%; max-width: 360px; background: #fff; padding: 28px 22px; border-radius: 20px; text-align: center; box-shadow: 0 8px 30px rgba(0,0,0,.06); }
.login-box h1 { margin: 12px 0 0; } .login-box form { text-align: left; margin-top: 18px; }

.top { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px; background: #fff; border-bottom: 1px solid var(--line); }
.brand { font-weight: 800; display: flex; align-items: center; gap: 8px; }
.who { font-size: 14px; color: var(--muted); }
main { max-width: 760px; margin: 0 auto; padding: 14px 14px 96px; }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 12px 0; }
label { display: block; font-size: 14px; font-weight: 600; margin: 10px 0; }
label.inline { display: flex; gap: 8px; align-items: center; font-weight: 500; }
input, select, textarea { width: 100%; margin-top: 5px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px;
  font: inherit; background: #fff; color: inherit; }
label.inline input { width: auto; margin: 0; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid #86efac; border-color: var(--g2); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 480px) { .grid2 { grid-template-columns: 1fr; } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 16px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; font: inherit; font-weight: 600; color: var(--text); cursor: pointer; text-decoration: none; }
.btn.primary { background: var(--g); border-color: var(--g); color: #fff; }
.btn.danger { color: var(--red); border-color: #f3c7c7; }
.btn.big { width: 100%; padding: 14px; font-size: 17px; margin-top: 8px; }
.btn:disabled { opacity: .5; cursor: default; }
.link { background: none; border: 0; color: var(--g2); font: inherit; cursor: pointer; padding: 0 0 0 6px; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }
.grow { flex: 1; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 8px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.chip { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font: inherit; font-size: 15px; cursor: pointer; }
.chip.on { background: var(--g); border-color: var(--g); color: #fff; font-weight: 700; }

.note { background: #fff7e6; border: 1px solid #fde1a8; color: #7a4b00; padding: 10px 12px; border-radius: 10px; font-size: 14px; }

.check-ok { background: #ecfdf3; border: 1px solid #b7ebc9; color: #14532d; padding: 10px 12px; border-radius: 10px; margin-top: 10px; font-weight: 600; }
.check-list { margin-top: 10px; display: grid; gap: 8px; }
.hit { border-radius: 10px; padding: 10px 12px; font-size: 14px; border: 1px solid; }
.hit.block { background: #fdecec; border-color: #f5c2c2; }
.hit.warn { background: #fff7e6; border-color: #fde1a8; }
.hit b { font-size: 15px; } .hit mark { background: #ffe08a; padding: 0 2px; border-radius: 3px; }
.hit .fix { color: var(--g); font-weight: 600; }
.rule-row { font-size: 14px; padding: 6px 0; border-bottom: 1px dashed var(--line); }

.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0; }
.toolbar input { flex: 1; min-width: 140px; margin: 0; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.seg button { border: 0; background: none; padding: 10px 14px; font: inherit; cursor: pointer; }
.seg button.on { background: var(--g); color: #fff; font-weight: 700; }

.cust { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 8px 0; cursor: pointer; }
.cust.due { border-left: 5px solid var(--red); }
.cust.soon { border-left: 5px solid #f59e0b; }
.cust .l1 { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; }
.cust .l2 { font-size: 14px; color: var(--muted); margin-top: 2px; }
.cust .memo { font-size: 14px; margin-top: 6px; white-space: pre-wrap; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cust .acts { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.cust .acts .btn { padding: 6px 10px; font-size: 14px; }
.tag { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: #eef2ee; color: #344034; font-weight: 600; }
.tag.stage-계약 { background: #dcfce7; color: #14532d; } .tag.stage-보류 { background: #f1f1f1; color: #777; }
.tag.stage-방문예약 { background: #e0f2fe; color: #075985; }
.section-title { font-weight: 800; margin: 16px 0 4px; }
.section-title.red { color: var(--red); }
.empty { text-align: center; color: var(--muted); padding: 30px 0; }

.quick-dates { font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.quick-dates button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 10px; font: inherit; font-size: 13px; cursor: pointer; }

dialog { border: 0; border-radius: 18px; padding: 20px; width: min(560px, 94vw); max-height: 92vh; }
dialog::backdrop { background: rgba(0,0,0,.35); }

.bottom { position: fixed; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(4, 1fr);
  background: #fff; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); z-index: 6; }
.bottom button { background: none; border: 0; padding: 8px 0 10px; font: inherit; font-size: 13px; color: var(--muted); cursor: pointer; position: relative; }
.bottom button span { display: block; font-size: 20px; }
.bottom button.on { color: var(--g); font-weight: 800; }
.badge { position: absolute; top: 4px; left: 55%; background: var(--red); color: #fff; font-size: 11px; border-radius: 999px; padding: 0 6px; font-style: normal; }

.toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); background: #1b1f1b; color: #fff;
  padding: 10px 18px; border-radius: 999px; font-size: 14px; z-index: 20; }
