/* BMG 로고 색: 진회색 #333 + 주황 #F07A2E */
:root { --ink:#222; --char:#333333; --char2:#444; --or:#F07A2E; --or2:#FFE3D1; --bg:#F4F4F2; --card:#fff; --line:#E2E2DE; --muted:#777; --red:#D93B2B; --green:#2E9E5B; }
* { box-sizing:border-box; }
body { margin:0; font-family:-apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; background:var(--bg); color:var(--ink); font-size:16px; }
/* 왼쪽 메뉴 배치 (2026-12-02 주인님 참고 화면) — PC·아이패드 가로는 고정 메뉴, 휴대폰은 ☰ 버튼으로 열기 */
#app { display:flex; min-height:100vh; }
#side { width:220px; flex:0 0 220px; background:var(--char); color:#fff; display:flex; flex-direction:column; position:sticky; top:0; height:100vh; overflow-y:auto; z-index:20; }
#side .brand { padding:16px 14px; border-bottom:1px solid #444; }
.brand { display:flex; align-items:center; gap:10px; color:#fff; text-decoration:none; font-weight:800; letter-spacing:-.3px; }
.brand img { width:34px; height:34px; } .brand small { display:block; font-size:11px; color:#aaa; font-weight:500; }
nav#nav { flex:1; padding:8px 0; }
nav#nav .grp { font-size:11px; color:#999; padding:12px 16px 4px; letter-spacing:.5px; }
nav#nav a { display:flex; align-items:center; justify-content:space-between; color:#e8e8e8; text-decoration:none; padding:9px 16px; font-size:14px; border-left:3px solid transparent; }
nav#nav a:hover { background:#3d3d3d; }
nav#nav a.on { background:#454545; border-left-color:var(--or); color:#fff; font-weight:700; }
nav#nav .cnt { background:var(--or); color:#fff; font-size:11px; border-radius:9px; padding:0 6px; }
#who { border-top:1px solid #444; padding:12px 14px; font-size:13px; color:#ddd; }
#who button { margin-top:6px; width:100%; }
#mainwrap { flex:1; min-width:0; }
header#top { display:none; position:sticky; top:0; z-index:15; align-items:center; gap:10px; background:var(--char); color:#fff; padding:10px 14px; padding-top:max(10px, env(safe-area-inset-top)); }
#menu { background:transparent; font-size:22px; padding:2px 8px; }
#bell { margin-left:auto; font-size:13px; }
#scrim { display:none; }
main { padding:18px 24px 90px; text-align:left; }
@media (max-width:900px) {
  header#top { display:flex; }
  #side { position:fixed; left:-240px; transition:left .2s; height:100vh; }
  body.menu-open #side { left:0; } body.menu-open #scrim { display:block; position:fixed; inset:0; background:rgba(0,0,0,.35); z-index:19; }
  main { padding:14px 16px 90px; }
}
.toolbar { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin:8px 0; }
.toolbar select, .toolbar input { width:auto; }
.kpis { display:grid; grid-template-columns:repeat(auto-fill, minmax(170px, 1fr)); gap:10px; }
.kpi { background:#fff; border:1px solid var(--line); border-radius:12px; padding:12px; } .kpi span { font-size:12px; color:var(--muted); } .kpi b { display:block; font-size:22px; margin:4px 0; } .kpi small { color:var(--muted); font-size:12px; }
.bar { height:8px; background:#eee; border-radius:4px; overflow:hidden; } .bar i { display:block; height:100%; background:var(--or); }
tr.reg td { background:#E8F5EC; } tr.unreg td { background:#FDE7E4; }
.tabs { display:flex; gap:4px; border-bottom:2px solid var(--line); margin:12px 0; overflow-x:auto; } .tabs a { padding:8px 14px; text-decoration:none; color:var(--muted); white-space:nowrap; } .tabs a.on { color:var(--char); font-weight:700; border-bottom:3px solid var(--or); margin-bottom:-2px; }
.week { border:1px solid var(--line); border-radius:12px; background:#fff; margin:12px 0; } .week > .wh { display:flex; justify-content:space-between; align-items:center; padding:10px 12px; border-bottom:1px solid var(--line); flex-wrap:wrap; gap:6px; }
.week .wb { display:grid; grid-template-columns:1fr 260px; } @media (max-width:1400px) { .week .wb { grid-template-columns:1fr; } .week .side { border-left:0; border-top:1px solid var(--line); display:grid; grid-template-columns:1fr 1fr; gap:0 12px; } .week .side p, .week .side button { grid-column:1 / -1; justify-self:start; } }
.week .side { border-left:1px solid var(--line); padding:10px; } .tag { font-size:11px; padding:2px 6px; border-radius:8px; background:#E6EEFF; color:#2F5BC4; } .tag.new { background:#E8F5EC; color:#2E9E5B; }
.callbtns { display:grid; grid-template-columns:repeat(auto-fill, minmax(110px, 1fr)); gap:8px; } .callbtns button.on { background:var(--or); }
h2 { font-size:19px; margin:18px 0 8px; } h3 { font-size:16px; margin:14px 0 6px; }
.card { background:var(--card); border:1px solid var(--line); border-radius:14px; padding:14px; margin:10px 0; }
.alert { border-left:6px solid var(--or); background:#fff7f1; }
.alert.red { border-left-color:var(--red); background:#fff1ef; }
.grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(150px, 1fr)); gap:10px; }
.stat { background:var(--card); border:1px solid var(--line); border-radius:14px; padding:12px; cursor:pointer; text-decoration:none; color:inherit; display:block; }
.stat b { display:block; font-size:26px; color:var(--char); } .stat.hot b { color:var(--or); } .stat.bad b { color:var(--red); }
.stat span { font-size:13px; color:var(--muted); }
.row { display:flex; align-items:center; gap:10px; padding:10px 0; border-bottom:1px solid var(--line); }
.row:last-child { border-bottom:0; } .row .grow { flex:1; min-width:0; }
.row .sub { font-size:13px; color:var(--muted); margin-top:2px; }
.badge { display:inline-block; font-size:12px; padding:2px 8px; border-radius:10px; margin:2px 4px 2px 0; background:#eee; color:#333; font-weight:600; }
.b-expired { background:#FDE0DC; color:var(--red); } .b-today { background:var(--red); color:#fff; } .b-month { background:var(--or2); color:#B4501A; }
.b-ptlow { background:#E6EEFF; color:#2F5BC4; } .b-ptzero { background:#2F5BC4; color:#fff; } .b-check { background:#FFF3B8; color:#7A6300; }
button, .btn { font:inherit; font-size:15px; border:0; border-radius:10px; padding:10px 14px; background:var(--char); color:#fff; cursor:pointer; }
button.or { background:var(--or); } button.ghost { background:#fff; color:var(--char); border:1px solid var(--line); } button.sm { padding:6px 10px; font-size:13px; }
button:disabled { opacity:.5; }
input, select, textarea { font:inherit; font-size:16px; width:100%; padding:10px; border:1px solid var(--line); border-radius:10px; background:#fff; }
label { display:block; font-size:13px; color:var(--muted); margin:10px 0 4px; }
.two { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.muted { color:var(--muted); } .ok { color:var(--green); font-weight:700; } .red { color:var(--red); font-weight:700; }
table { width:100%; border-collapse:collapse; font-size:14px; background:#fff; } th, td { text-align:left; padding:8px; border-bottom:1px solid var(--line); vertical-align:top; } th { background:#fafaf8; font-size:13px; color:var(--muted); }
.tbl { overflow-x:auto; border:1px solid var(--line); border-radius:12px; }
.chips { display:flex; gap:6px; flex-wrap:wrap; margin:6px 0; } .chips a { text-decoration:none; }
.done { opacity:.55; text-decoration:line-through; }
#toast { position:fixed; left:50%; bottom:24px; transform:translateX(-50%); background:var(--char); color:#fff; padding:10px 16px; border-radius:20px; font-size:14px; opacity:0; transition:.2s; pointer-events:none; max-width:90%; }
#toast.show { opacity:1; }
.login { max-width:380px; margin:40px auto; text-align:center; } .login img { width:120px; }
.fab { position:fixed; right:16px; bottom:20px; z-index:6; background:var(--or); color:#fff; border-radius:24px; padding:12px 16px; font-weight:700; box-shadow:0 4px 14px rgba(0,0,0,.2); }
@media (max-width:640px) { .two { grid-template-columns:1fr; } .grid { grid-template-columns:repeat(2, 1fr); } .hide-m { display:none; } }
@media print { header, nav, .fab, button { display:none !important; } body { background:#fff; } }
/* 표 안 입력칸(PT 계획표·OT·1달 미만자) — 글자가 잘리지 않게 */
.tbl td input, .tbl td select { padding:6px 8px; font-size:14px; }
.tbl td select { min-width:84px; } .tbl td input[type=date] { min-width:136px; } .tbl td input:not([type]) { min-width:90px; }
.week textarea { font-size:14px; }
#side { min-height:100vh; }
.sheet td, .sheet th { white-space:nowrap; } .sheet td input:not([type]) { min-width:80px; width:110px; }
.pair { display:flex; gap:6px; } .pair > * { min-width:0; width:auto; } .pair > :first-child { flex:3 1 0; } .pair > :last-child { flex:2 1 0; } .pair > input[type=date]:first-child { flex:0 0 150px; } .pair > input[type=date] + input { flex:1 1 0; }
tr.mng td { background:#FFF6D6; } tr.carry td { background:#E8EEFB; }
tr.ghost td { background:#F1ECFA; color:#6B5A8E; }

/* 대시보드 정리 (2026-12-02) */
.hero { display:flex; justify-content:space-between; gap:16px; flex-wrap:wrap; align-items:center; border-left:6px solid var(--or); }
.hero b { display:block; font-size:30px; margin:2px 0; color:var(--char); } .hero small { color:var(--muted); font-size:13px; }
.hero-r { min-width:260px; flex:1; max-width:460px; } .bar.big { height:12px; margin:6px 0; }
.dgrid { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:12px; } @media (max-width:1100px) { .dgrid { grid-template-columns:1fr; } }
.card.sec { margin:0; } .card.sec h3 { margin:0 0 10px; }
.row.tight { padding:6px 0; } .kpis.mini { grid-template-columns:repeat(auto-fill, minmax(110px, 1fr)); gap:8px; margin-bottom:10px; } .kpis.mini .kpi { padding:8px 10px; } .kpis.mini .kpi b { font-size:18px; }
table.center td, table.center th { text-align:center; }
details > summary { cursor:pointer; color:var(--char); font-weight:700; padding:6px 0; }
input.cnt-in { width:64px; padding:4px 6px; font-size:14px; text-align:center; }
input.cnt-in.big { width:100%; font-size:20px; font-weight:700; padding:6px; margin-top:4px; }

/* ---- 휴대폰·아이패드 (2026-12-03) ---- */
html { -webkit-text-size-adjust:100%; }
.tbl { -webkit-overflow-scrolling:touch; }
.tbl th { white-space:nowrap; }
@media (max-width:1100px) {
  .tbl td, .tbl th { white-space:nowrap; }                       /* 좁은 칸에서 글자가 세로로 쪼개지지 않게 → 옆으로 밀어서 보기 */
  .tbl td input, .tbl td select, input.cnt-in, .toolbar input, .toolbar select { font-size:16px; }   /* 아이폰: 16px 미만 칸은 누르면 화면이 확대됨 */
  .tbl.sheet table tr > :first-child { position:sticky; left:0; z-index:1; background:inherit; }
  .tbl.sheet table tr > td:first-child { background:#fff; } .tbl.sheet tr.reg > td:first-child { background:#E8F5EC; } .tbl.sheet tr.unreg > td:first-child { background:#FDE7E4; } .tbl.sheet tr.mng > td:first-child { background:#FFF6D6; } .tbl.sheet tr.carry > td:first-child { background:#E8EEFB; }
  .tbl.sheet table tr > th:first-child { background:#fafaf8; }
}
@media (max-width:640px) {
  main { padding:12px 10px 90px; }
  h2 { font-size:18px; } .hero b { font-size:24px; } .hero-r { min-width:0; }
  .kpis { grid-template-columns:repeat(2, 1fr); gap:8px; } .kpi b { font-size:19px; }
  .kpis.mini { grid-template-columns:repeat(2, 1fr); }
  .tabs a { padding:8px 10px; font-size:14px; }
  .card { padding:12px; }
  .toolbar { gap:6px; }
  .fab { bottom:14px; right:10px; padding:10px 14px; }
  .week .side { grid-template-columns:1fr !important; }
}
.dgrid > * { min-width:0; } .card.sec { overflow:hidden; } .card.sec .tbl { max-width:100%; }

.cmts { max-height:360px; overflow-y:auto; margin:8px 0; } .cmt { background:#f6f6f3; border-radius:10px; padding:8px 10px; margin:6px 0; max-width:80%; } .cmt.me { background:var(--or2); margin-left:auto; }
#ctext { flex:1; }
