:root{
  --bg:#f4f4f1;
  --card:#fff;
  --ink:#111;
  --muted:#767676;
  --line:#e1e1dc;
  --soft:#ecece8;
  --danger:#b42318;
  --nav:#171717;
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;font-family:-apple-system,BlinkMacSystemFont,"Pretendard","Noto Sans KR","Apple SD Gothic Neo",sans-serif;color:var(--ink);background:var(--bg)}
a{color:inherit;text-decoration:none}
button,input,select,textarea{font:inherit}
button{cursor:pointer}
.hkmgr-body{min-height:100vh}
.hkmgr-login-wrap{min-height:100vh;display:grid;place-items:center;padding:24px}
.hkmgr-login-card{width:min(440px,100%);background:#fff;border:1px solid var(--line);border-radius:20px;padding:34px;box-shadow:0 18px 55px rgba(0,0,0,.08)}
.hkmgr-brand{font-size:14px;font-weight:700;letter-spacing:.04em;margin-bottom:28px}
.hkmgr-login-card h1{font-size:28px;margin:0 0 8px}
.hkmgr-login-card>p{color:var(--muted);line-height:1.55;margin:0 0 26px}
.hkmgr-login-card label,.hkmgr-form label{display:grid;gap:7px;font-size:13px;font-weight:650}
.hkmgr-login-card input,.hkmgr-form input,.hkmgr-form select,.hkmgr-form textarea,.hkmgr-search input{
  width:100%;border:1px solid #d5d5d0;background:#fff;border-radius:10px;padding:12px 13px;outline:none
}
.hkmgr-login-card input:focus,.hkmgr-form input:focus,.hkmgr-form select:focus,.hkmgr-form textarea:focus,.hkmgr-search input:focus{border-color:#111;box-shadow:0 0 0 2px rgba(0,0,0,.06)}
.hkmgr-login-card form,.hkmgr-form{display:grid;gap:14px}
.hkmgr-check{display:flex!important;align-items:center;gap:8px!important;font-weight:500!important}
.hkmgr-check input{width:auto!important}
.hkmgr-primary,.hkmgr-danger,.hkmgr-search button{
  border:0;border-radius:10px;padding:12px 16px;font-weight:750
}
.hkmgr-primary{background:#111;color:#fff}
.hkmgr-danger{background:var(--danger);color:#fff}
.hkmgr-home-link{display:block;text-align:center;color:var(--muted);font-size:13px;margin-top:18px}
.hkmgr-app{min-height:100vh;display:grid;grid-template-columns:220px minmax(0,1fr)}
.hkmgr-side{position:sticky;top:0;height:100vh;background:var(--nav);color:#fff;padding:22px 14px;display:flex;flex-direction:column;gap:6px}
.hkmgr-side-brand{padding:9px 10px 24px;font-weight:800}
.hkmgr-side-brand small{display:block;color:#858585;font-weight:500;margin-top:5px}
.hkmgr-nav{padding:11px 12px;border-radius:9px;color:#b9b9b9;font-weight:650}
.hkmgr-nav:hover,.hkmgr-nav.is-active{background:#2b2b2b;color:#fff}
.hkmgr-side-bottom{margin-top:auto;border-top:1px solid #303030;padding:16px 10px 2px;display:grid;gap:5px}
.hkmgr-side-bottom span{font-size:13px;font-weight:700}
.hkmgr-side-bottom a{font-size:12px;color:#929292}
.hkmgr-main{padding:34px;max-width:1500px;width:100%;margin:0 auto}
.hkmgr-page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:22px}
.hkmgr-page-head h1{font-size:30px;margin:0 0 5px}
.hkmgr-page-head h1 small{font-size:16px;color:var(--muted)}
.hkmgr-page-head p{margin:0;color:var(--muted)}
.hkmgr-back{display:inline-block;font-size:13px;color:var(--muted);margin-bottom:9px}
.hkmgr-alert{padding:13px 15px;background:#fff8d9;border:1px solid #ead986;border-radius:11px;margin-bottom:18px;font-weight:650}
.hkmgr-alert.is-error{background:#fff0ef;border-color:#efb1ac;color:#8b1c13}
.hkmgr-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:18px}
.hkmgr-metrics a{background:var(--card);border:1px solid var(--line);border-radius:14px;padding:17px;display:flex;align-items:center;justify-content:space-between}
.hkmgr-metrics b{font-size:13px;color:#555}
.hkmgr-metrics strong{font-size:26px}
.hkmgr-card{background:var(--card);border:1px solid var(--line);border-radius:16px;padding:20px;margin-bottom:16px}
.hkmgr-card h2{font-size:17px;margin:0 0 16px}
.hkmgr-card>p{color:var(--muted);font-size:13px;line-height:1.5}
.hkmgr-card-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.hkmgr-card-head h2{margin:0}
.hkmgr-card-head a{font-size:12px;color:var(--muted)}
.hkmgr-empty{padding:34px 15px;text-align:center;color:#999}
.hkmgr-schedule-list{display:grid}
.hkmgr-schedule{display:grid;grid-template-columns:78px 1fr auto;gap:16px;align-items:center;padding:14px 4px;border-top:1px solid var(--soft)}
.hkmgr-schedule:first-child{border-top:0}
.hkmgr-schedule time{font-weight:800}
.hkmgr-schedule time small{display:block;color:var(--muted);font-weight:500;margin-top:3px}
.hkmgr-schedule div{display:grid;gap:4px}
.hkmgr-schedule span{font-size:12px;color:var(--muted)}
.hkmgr-schedule em{font-size:22px;color:#aaa;font-style:normal}
.hkmgr-message-row{border-top:1px solid var(--soft);padding:13px 0}
.hkmgr-message-row:first-of-type{border-top:0}
.hkmgr-message-row b,.hkmgr-message-row small{display:block}
.hkmgr-message-row small{color:var(--muted);font-size:11px;margin-top:3px}
.hkmgr-message-row p{margin:8px 0 0;color:#444;font-size:13px}
.hkmgr-month-nav{display:flex;align-items:center;gap:13px}
.hkmgr-month-nav a{width:34px;height:34px;border:1px solid var(--line);background:#fff;border-radius:9px;display:grid;place-items:center;font-size:22px}
.hkmgr-calendar{display:grid;grid-template-columns:repeat(7,1fr);background:var(--line);gap:1px;border:1px solid var(--line);border-radius:14px;overflow:hidden}
.hkmgr-dow{background:#f6f6f3;padding:10px;text-align:center;font-size:12px;font-weight:700;color:#777}
.hkmgr-day{background:#fff;min-height:125px;padding:8px;overflow:hidden}
.hkmgr-day.is-muted{background:#f7f7f4;color:#aaa}
.hkmgr-day.is-today{box-shadow:inset 0 0 0 2px #111}
.hkmgr-date{font-size:11px;font-weight:800;display:block;margin-bottom:6px}
.hkmgr-event{display:block;margin:4px 0;padding:6px 7px;border-radius:7px;background:#efefec;font-size:11px;line-height:1.3}
.hkmgr-event.type-hold{background:#fff2c7}
.hkmgr-event.type-visit{background:#e5f2ff}
.hkmgr-event b{margin-right:3px}
.hkmgr-event small{display:block;color:#777;margin-top:2px}
.hkmgr-detail-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px}
.hkmgr-detail-grid .hkmgr-card{margin:0}
.hkmgr-info-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}
.hkmgr-info-grid div{background:#f7f7f4;border-radius:10px;padding:12px}
.hkmgr-info-grid span,.hkmgr-info-grid b{display:block}
.hkmgr-info-grid span{font-size:11px;color:var(--muted);margin-bottom:5px}
.hkmgr-info-grid b{font-size:14px}
.hkmgr-form-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.hkmgr-actions{display:flex;gap:8px;flex-wrap:wrap}
.hkmgr-inline-form{display:inline}
.hkmgr-calc-box{background:#f3f3ef;border-radius:11px;padding:14px;display:grid;gap:4px}
.hkmgr-calc-box span{font-size:12px;color:var(--muted)}
.hkmgr-calc-box strong{font-size:21px}
.hkmgr-calc-box small{font-size:11px;color:#999}
.hkmgr-discount-line{display:flex;justify-content:space-between;padding:4px 2px}
.hkmgr-discount-line span{color:var(--muted)}
.hkmgr-discount-line b{color:var(--danger)}
.hkmgr-settled{display:flex;gap:15px;align-items:center;flex-wrap:wrap;background:#f2f7f1;border-radius:10px;padding:12px;margin-bottom:15px}
.hkmgr-settled span{font-size:12px;color:#40703a;font-weight:800}
.hkmgr-settled .is-discount{color:var(--danger)}
.hkmgr-settled strong{margin-left:auto}
.is-danger-zone{border-color:#e8c6c2}
.hkmgr-refund-quote{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:16px}
.hkmgr-refund-quote div{background:#fff6f5;border-radius:10px;padding:12px}
.hkmgr-refund-quote span,.hkmgr-refund-quote b,.hkmgr-refund-quote strong{display:block}
.hkmgr-refund-quote span{font-size:11px;color:#8f5f59;margin-bottom:5px}
.hkmgr-refund-quote strong{color:var(--danger)}
.hkmgr-confirm{padding:11px;background:#fff4f3;border-radius:9px}
.hkmgr-memo{white-space:pre-wrap;background:#f6f6f3;border-radius:10px;padding:14px;max-height:330px;overflow:auto;font-size:12px;line-height:1.55}
.hkmgr-message-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.hkmgr-inquiry{margin:0}
.hkmgr-inquiry header{display:flex;justify-content:space-between;gap:12px}
.hkmgr-inquiry header b,.hkmgr-inquiry header small{display:block}
.hkmgr-inquiry header small{color:var(--muted);font-size:11px;margin-top:4px}
.hkmgr-inquiry header>a{font-size:12px;text-decoration:underline}
.hkmgr-inquiry>p{background:#f7f7f4;padding:12px;border-radius:10px;min-height:68px;color:#333!important}
.hkmgr-search{display:flex;gap:8px;margin-bottom:14px}
.hkmgr-search input{max-width:420px}
.hkmgr-table-card{overflow:auto;padding:0}
.hkmgr-table-card table{border-collapse:collapse;width:100%;min-width:820px}
.hkmgr-table-card th,.hkmgr-table-card td{text-align:left;padding:13px 14px;border-bottom:1px solid var(--soft);font-size:12px}
.hkmgr-table-card th{background:#f6f6f3;color:#777}
.hkmgr-table-card td b,.hkmgr-table-card td small{display:block}
.hkmgr-table-card td small{margin-top:4px;color:#999}
.hkmgr-admin-list{display:grid}
.hkmgr-admin-list>div{padding:11px 0;border-top:1px solid var(--soft)}
.hkmgr-admin-list>div:first-child{border-top:0}
.hkmgr-admin-list b,.hkmgr-admin-list span{display:block}
.hkmgr-admin-list span{color:var(--muted);font-size:12px;margin-top:4px}
.hkmgr-rules{margin:0;padding-left:19px;color:#555;line-height:1.8}
@media(max-width:980px){
  .hkmgr-app{grid-template-columns:1fr}
  .hkmgr-side{position:sticky;z-index:20;height:auto;top:0;display:grid;grid-template-columns:auto repeat(5,auto) 1fr;align-items:center;overflow-x:auto;padding:10px}
  .hkmgr-side-brand{padding:4px 9px;white-space:nowrap}
  .hkmgr-side-brand small{display:none}
  .hkmgr-nav{white-space:nowrap;padding:8px 10px}
  .hkmgr-side-bottom{display:none}
  .hkmgr-main{padding:20px}
  .hkmgr-calendar{min-width:850px}
  .hkmgr-main:has(.hkmgr-calendar){overflow-x:auto}
}
@media(max-width:720px){
  .hkmgr-main{padding:14px}
  .hkmgr-page-head{align-items:flex-start;flex-direction:column}
  .hkmgr-page-head h1{font-size:25px}
  .hkmgr-metrics{grid-template-columns:repeat(2,1fr)}
  .hkmgr-detail-grid,.hkmgr-message-list{grid-template-columns:1fr}
  .hkmgr-info-grid{grid-template-columns:1fr 1fr}
  .hkmgr-card{padding:16px;border-radius:13px}
  .hkmgr-side{grid-template-columns:repeat(5,auto)}
  .hkmgr-side-brand{display:none}
  .hkmgr-form-row{grid-template-columns:1fr 1fr}
  .hkmgr-refund-quote{grid-template-columns:1fr}
}

/* v0.2.0 ledger */
.hkmgr-ledger-metrics{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:12px;
  margin-bottom:18px
}
.hkmgr-ledger-metric{
  background:#fff;
  border:1px solid var(--line);
  border-radius:14px;
  padding:16px;
  display:grid;
  gap:6px
}
.hkmgr-ledger-metric span{font-size:12px;color:#666;font-weight:700}
.hkmgr-ledger-metric strong{font-size:23px;line-height:1.15}
.hkmgr-ledger-metric small{font-size:10px;color:#999;line-height:1.35}
.hkmgr-ledger-metric.is-net{background:#f1f6ef}
.hkmgr-ledger-metric.is-out strong,
.hkmgr-ledger-metric.is-discount strong{color:var(--danger)}
.hkmgr-ledger-metric.is-due{background:#fff9e7}
.hkmgr-ledger-note{font-size:11px;color:#8a8a8a}
.hkmgr-table-card.is-inner{margin:0;border:0;border-radius:0;overflow:auto}
.hkmgr-ledger-table{min-width:900px}
.hkmgr-ledger-table .money{text-align:right;font-variant-numeric:tabular-nums;font-weight:750}
.hkmgr-ledger-table .money.in{color:#185b35}
.hkmgr-ledger-table .money.out{color:var(--danger)}
.hkmgr-ledger-table td a b,
.hkmgr-ledger-table td a small{display:block}
.hkmgr-ledger-table td a small{color:#999;margin-top:3px}
.hkmgr-tx-badge{
  display:inline-block;
  padding:4px 7px;
  border-radius:999px;
  background:#f0f0ec;
  white-space:nowrap;
  font-size:10px;
  font-weight:750
}
tr.type-refund .hkmgr-tx-badge,
tr.type-expense .hkmgr-tx-badge{background:#fff0ef;color:#8d241b}
.hkmgr-ledger-split{align-items:start}
.hkmgr-expense-list{display:grid}
.hkmgr-expense-row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  border-top:1px solid var(--soft);
  padding:13px 0
}
.hkmgr-expense-row:first-child{border-top:0;padding-top:0}
.hkmgr-expense-row>div{display:grid;gap:4px}
.hkmgr-expense-row b{font-size:15px}
.hkmgr-expense-row span{font-size:12px;color:#555}
.hkmgr-expense-row small{font-size:10px;color:#999}
.hkmgr-link-danger{
  border:0;
  background:transparent;
  padding:2px;
  color:var(--danger);
  font-size:11px;
  text-decoration:underline
}
.hkmgr-ledger-footnote{background:#f6f6f3}
.hkmgr-ledger-footnote b{font-size:12px}
.hkmgr-ledger-footnote p{margin:6px 0 0!important}
@media(max-width:980px){
  .hkmgr-side{grid-template-columns:auto repeat(6,auto) 1fr}
}
@media(max-width:720px){
  .hkmgr-side{grid-template-columns:repeat(6,auto)}
  .hkmgr-ledger-metrics{grid-template-columns:repeat(2,1fr)}
  .hkmgr-ledger-metric strong{font-size:19px}
}
.hkmgr-form-help{margin:0;color:#888;font-size:11px;line-height:1.5}
.hkmgr-nw-list{margin-top:14px}
