/* =====================================================================
 * REPURESYS DOT — style.css
 * 서버 경로: /var/www/html/css/style.css
 * 색감: 청록 · 하늘색 · 파랑 계열
 * ===================================================================== */
:root {
  --bg: #071a2c;
  --panel: #0b2744;
  --panel2: #0f3354;
  --panel3: #12395c;
  --line: #2b5d86;
  --line2: #3a7fb0;
  --teal: #19c2b0;
  --teal2: #0ea394;
  --sky: #5cc8f2;
  --blue: #1e7bf0;
  --blue2: #1561c7;
  --text: #eaf6ff;
  --muted: #8fb3cf;
  --gold: #ffd84a;
  --red: #e5566f;
  --green: #2fc47a;
  --font: "Galmuri11", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  --font-read: "Pretendard", "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--text); font-family: var(--font); -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
.hidden { display: none !important; }
img.pix { image-rendering: pixelated; image-rendering: crisp-edges; width: 24px; height: 24px; flex: none; }
img.pix.big { width: 64px; height: 64px; }
#game { position: fixed; inset: 0; display: block; touch-action: none; image-rendering: pixelated; }

/* 공통 패널 */
#topbar, #sidebar, #panel, #logbox, #guide, #editbar, .m-card, #zoom {
  background: linear-gradient(180deg, rgba(15, 51, 84, .97), rgba(9, 34, 60, .97));
  border: 2px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 8, 18, .45), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.primary { background: linear-gradient(180deg, #2b8cff, var(--blue2)); color: #fff; border: 2px solid #5aa9ff; border-radius: 9px; padding: 10px 14px; box-shadow: 0 3px 0 #0d3f86; }
.primary:hover { filter: brightness(1.08); }
.primary:active { transform: translateY(2px); box-shadow: 0 1px 0 #0d3f86; }
.primary:disabled { filter: grayscale(.8) brightness(.7); cursor: not-allowed; }
.danger { background: #3a1624; border: 2px solid #a3324a; color: #ffd4dc; border-radius: 9px; padding: 9px 12px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.warn { color: var(--gold); }
code { font-family: ui-monospace, Consolas, monospace; background: #06182a; padding: 1px 5px; border-radius: 4px; color: var(--sky); font-size: 12px; }

/* ---------------- 상단 ---------------- */
#topbar { position: fixed; top: 8px; left: 8px; right: 8px; height: 66px; z-index: 30; display: flex; align-items: center; gap: 10px; padding: 7px 10px; }
#menu-btn { display: none; width: 40px; height: 40px; border-radius: 8px; background: var(--panel3); border: 1px solid var(--line); font-size: 18px; }
.brand { display: flex; align-items: center; gap: 9px; padding-right: 8px; min-width: 180px; }
.brand img.logo { width: 36px; height: 36px; }
.brand b { display: block; font-size: 18px; letter-spacing: .5px; white-space: nowrap; }
.brand b span { color: var(--teal); }
.brand small { display: block; font-size: 10px; letter-spacing: 2px; color: var(--sky); margin-top: 2px; }
.stats { flex: 1; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.stats::-webkit-scrollbar { display: none; }
.stat { position: relative; display: flex; align-items: center; gap: 8px; background: var(--panel2); border: 1px solid var(--line); border-radius: 9px; padding: 5px 12px 5px 8px; text-align: left; white-space: nowrap; flex: none; }
.stat:hover { border-color: var(--sky); background: var(--panel3); }
.stat img.pix { width: 28px; height: 28px; }
.stat small { display: block; font-size: 11px; color: var(--muted); }
.stat b { display: block; font-size: 17px; margin-top: 1px; }
.stat em { display: block; font-style: normal; font-size: 10px; color: var(--teal); }
.stat .dot { position: absolute; top: 5px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); display: none; box-shadow: 0 0 0 2px var(--panel2); }
.stat .dot.on { display: block; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .3; } }
.clock { background: #06182a; border: 1px solid var(--line); border-radius: 9px; padding: 5px 14px; text-align: center; min-width: 150px; }
.clock small { display: block; font-size: 11px; color: var(--muted); }
.clock b { display: block; font-size: 22px; letter-spacing: 1px; }
.icon-btn { width: 46px; height: 46px; display: grid; place-items: center; background: var(--panel2); border: 1px solid var(--line); border-radius: 9px; }
.icon-btn:hover { border-color: var(--sky); }

/* ---------------- 왼쪽 메뉴 ---------------- */
#sidebar { position: fixed; left: 8px; top: 84px; width: 76px; bottom: 8px; z-index: 28; padding: 6px; display: flex; flex-direction: column; gap: 3px; overflow-y: auto; scrollbar-width: none; }
#sidebar::-webkit-scrollbar { display: none; }
.nav { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 2px 6px; border-radius: 9px; color: #cfe6f7; text-align: center; border: 1px solid transparent; font-size: 11px; white-space: nowrap; }
.nav:hover { background: var(--panel3); border-color: var(--line); }
.nav.on { background: linear-gradient(90deg, var(--teal2), var(--blue)); color: #fff; border-color: #6fd6f7; box-shadow: 0 2px 0 #0a4d6e; }

/* ---------------- 줌 ---------------- */
#zoom { position: fixed; right: 8px; top: 84px; z-index: 26; display: flex; flex-direction: column; padding: 4px; gap: 4px; border-radius: 10px; }
#zoom button { width: 34px; height: 34px; border-radius: 7px; background: var(--panel2); border: 1px solid var(--line); font-size: 17px; line-height: 1; font-family: system-ui, sans-serif; }
#zoom button:hover { border-color: var(--sky); }

/* ---------------- 직원 패널 ---------------- */
#panel { position: fixed; right: 8px; top: 84px; width: 350px; max-height: calc(100vh - 92px - 84px); overflow-y: auto; z-index: 32; padding: 14px; }
#panel .x { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border-radius: 8px; background: var(--panel3); border: 1px solid var(--line); font-size: 20px; line-height: 1; }
.p-head { display: flex; gap: 12px; align-items: center; }
#p-face { width: 84px; height: 84px; border-radius: 10px; background: linear-gradient(180deg, #cfeefa, #9fd8f0); border: 2px solid var(--sky); image-rendering: pixelated; flex: none; }
.p-id h3 { margin: 0; font-size: 21px; font-weight: 400; }
#p-role { margin: 4px 0 7px; color: var(--sky); font-size: 13px; }
#p-role::before { content: ''; display: inline-block; width: 8px; height: 8px; background: var(--tc, var(--sky)); margin-right: 6px; border-radius: 2px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 20px; font-size: 13px; border: 1px solid; }
.pill::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pill.green { color: #6ff0aa; background: #0e3b2c; border-color: #1f8a5a; }
.pill.sky { color: #8fe0ff; background: #0e3350; border-color: #2d7fb4; }
.pill.amber { color: #ffd98a; background: #3b2e10; border-color: #9a7420; }
.pill.violet { color: #cbbcff; background: #261d4a; border-color: #5d4ab0; }
.p-task { margin: 14px 0 10px; background: #081f37; border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; }
.p-task-top { display: flex; gap: 8px; justify-content: space-between; font-size: 14px; }
.p-task-top span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-task-top b { color: var(--teal); font-weight: 400; }
.bar { height: 10px; margin-top: 8px; background: #1b3a57; border-radius: 5px; overflow: hidden; border: 1px solid #24527a; }
.bar i { display: block; height: 100%; width: 0; background: repeating-linear-gradient(90deg, var(--teal) 0 6px, #34d8c6 6px 12px); transition: width .25s linear; }
#panel:not(.has-task) .bar i { background: #2a4d6d; }
.tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-bottom: 10px; }
.tabs button { padding: 9px 4px; background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; font-size: 13px; color: var(--muted); }
.tabs button.on { background: var(--blue); color: #fff; border-color: #5aa9ff; }
.tab label, .m-card label { display: block; font-size: 12px; color: var(--muted); margin: 10px 0 5px; }
.tab label:first-child { margin-top: 0; }
select, input[type=text], input:not([type]), textarea {
  width: 100%; background: #f4f9fd; color: #0b2744; border: 2px solid #9fd0ee; border-radius: 8px; padding: 9px 10px; font-family: var(--font-read); font-size: 14px; outline: none;
}
select:focus, input:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(25, 194, 176, .25); }
textarea { resize: vertical; margin-top: 8px; line-height: 1.5; }
.big { width: 100%; margin-top: 8px; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 16px; padding: 12px; }
.big img.pix { width: 22px; height: 22px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.row2 button { padding: 9px 6px; background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; font-size: 13px; }
.row2 button:hover { border-color: var(--sky); }
dl.info { display: grid; grid-template-columns: 110px 1fr; gap: 7px 10px; margin: 0; font-size: 13px; }
dl.info dt { color: var(--muted); }
dl.info dd { margin: 0; }
.note { font-size: 12px; color: var(--muted); background: #081f37; border-left: 3px solid var(--sky); padding: 8px 10px; border-radius: 6px; line-height: 1.6; }
.hist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.hist li { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #081f37; border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; cursor: pointer; }
.hist li:hover { border-color: var(--sky); }
.hist li b { display: block; font-weight: 400; font-size: 14px; word-break: break-all; }
.hist li small { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.st { font-size: 12px; padding: 3px 9px; border-radius: 12px; background: var(--panel3); border: 1px solid var(--line); white-space: nowrap; }
.st-done { color: #6ff0aa; border-color: #1f8a5a; background: #0e3b2c; }
.st-run { color: #8fe0ff; border-color: #2d7fb4; }

/* ---------------- 업무 로그 ---------------- */
#logbox { position: fixed; right: 8px; bottom: 8px; width: 400px; z-index: 27; padding: 8px 10px 10px; }
#logbox header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
#logbox header b { font-weight: 400; font-size: 14px; }
#log-toggle { font-size: 12px; color: var(--muted); padding: 3px 8px; border: 1px solid var(--line); border-radius: 6px; }
#logbox.collapsed ul { display: none; }
#logbox.collapsed header { margin-bottom: 0; }
#log-list { list-style: none; margin: 0; padding: 0; font-size: 12px; max-height: 104px; overflow: hidden; }
#log-list li { display: grid; grid-template-columns: 10px 40px 64px 1fr auto; gap: 6px; align-items: center; padding: 4px 2px; border-top: 1px dashed rgba(92, 200, 242, .15); }
#log-list li:first-child { border-top: 0; }
#log-list li.muted { display: block; }
#log-list i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
#log-list i.k-order { background: var(--sky); }
#log-list i.k-done { background: var(--green); }
#log-list i.k-hire { background: var(--teal); }
#log-list i.k-meeting { background: #9b86ff; }
#log-list i.k-system { background: var(--gold); }
#log-list time { color: var(--muted); }
#log-list b { font-weight: 400; color: #bfe6ff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#log-list span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#log-list em { font-style: normal; color: var(--teal); }

/* ---------------- 하단 버튼 ---------------- */
#actions { position: fixed; left: 92px; bottom: 8px; z-index: 27; display: flex; gap: 8px; }
.act { width: 108px; height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 13px; color: #fff;
  background: linear-gradient(180deg, #16466f, #0d2f52); border: 2px solid var(--line2); border-radius: 12px; box-shadow: 0 4px 0 #061a2e, 0 8px 20px rgba(0, 8, 18, .4); }
.act:first-child { background: linear-gradient(180deg, #2b8cff, #1561c7); border-color: #6fb5ff; }
.act:hover { filter: brightness(1.12); }
.act:active { transform: translateY(3px); box-shadow: 0 1px 0 #061a2e; }
.act img.pix { width: 28px; height: 28px; }
.act.on { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(255, 216, 74, .3), 0 4px 0 #061a2e; }
body.editing #actions { display: none; }

/* ---------------- 가이드 ---------------- */
#guide { position: fixed; left: 92px; bottom: 90px; width: 420px; z-index: 29; display: flex; gap: 10px; padding: 10px 12px 10px 6px; border-color: var(--sky); }
#guide-face { width: 72px; height: 84px; image-rendering: pixelated; align-self: flex-end; flex: none; }
.g-body { flex: 1; }
.g-step { display: inline-block; background: var(--gold); color: #2b1d00; font-size: 11px; padding: 2px 9px; border-radius: 10px; }
#guide-text { margin: 7px 0 9px; font-size: 13px; line-height: 1.65; }
.g-btns { display: flex; justify-content: flex-end; gap: 6px; }
.g-btns button { padding: 7px 12px; font-size: 13px; }
#guide-skip { color: var(--muted); border: 1px solid var(--line); border-radius: 8px; }

/* ---------------- 가구 배치 ---------------- */
#editbar { position: fixed; left: 92px; right: 420px; bottom: 8px; z-index: 29; padding: 10px 12px; border-color: var(--gold); }
.eb-head { display: flex; gap: 10px; align-items: baseline; margin-bottom: 8px; flex-wrap: wrap; }
.eb-head b { font-weight: 400; color: var(--gold); font-size: 14px; }
#eb-hint { font-size: 12px; color: var(--muted); }
.eb-items { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.eb-item { flex: none; width: 68px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 5px 2px; background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; font-size: 11px; color: #cfe6f7; }
.eb-item:hover, .eb-item.on { border-color: var(--gold); background: var(--panel3); }
.eb-item img { width: 44px; height: 44px; image-rendering: pixelated; }
.eb-btns { display: flex; gap: 6px; justify-content: flex-end; margin-top: 6px; }
.eb-btns button { padding: 8px 12px; font-size: 13px; }
#eb-del, #eb-reset { background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; }
#eb-del:disabled { opacity: .45; cursor: not-allowed; }

/* ---------------- 창(모달) ---------------- */
#modal { position: fixed; inset: 0; z-index: 50; background: rgba(2, 10, 20, .6); display: flex; align-items: center; justify-content: center; padding: 12px; }
.m-card { width: min(520px, 100%); max-height: 88vh; overflow-y: auto; padding: 0 16px 16px; border-color: var(--line2); }
.m-card.wide { width: min(780px, 100%); }
.m-card > header { position: sticky; top: 0; display: flex; justify-content: space-between; align-items: center; padding: 14px 0 10px; background: linear-gradient(180deg, #0f3354 80%, transparent); z-index: 1; }
.m-card > header b { font-weight: 400; font-size: 17px; }
#m-close { width: 32px; height: 32px; border-radius: 8px; background: var(--panel3); border: 1px solid var(--line); font-size: 20px; line-height: 1; }
.m-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.m-btns button:not(.primary):not(.danger) { padding: 10px 14px; background: var(--panel2); border: 1px solid var(--line); border-radius: 9px; }
.box { background: #081f37; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: 13px; line-height: 1.65; white-space: pre-wrap; word-break: break-all; }
.box.result { font-family: var(--font-read); font-size: 14px; max-height: 320px; overflow-y: auto; }
.tog { display: flex !important; align-items: center; gap: 9px; font-size: 14px !important; color: var(--text) !important; margin: 8px 0 !important; cursor: pointer; }
.tog input { width: 18px; height: 18px; accent-color: var(--teal); }
.ver { text-align: right; font-size: 11px; color: var(--muted); margin: 12px 0 0; }
.empty { text-align: center; padding: 10px 0; line-height: 1.7; font-size: 14px; }
.emp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.emp { display: flex; gap: 10px; align-items: center; text-align: left; padding: 8px; background: #081f37; border: 1px solid var(--line); border-left: 4px solid var(--tc); border-radius: 9px; }
.emp:hover { border-color: var(--sky); border-left-color: var(--tc); }
.emp img { width: 54px; height: 54px; image-rendering: pixelated; background: linear-gradient(180deg, #cfeefa, #9fd8f0); border-radius: 8px; flex: none; }
.emp b { display: block; font-weight: 400; font-size: 15px; }
.emp small { display: block; color: var(--muted); font-size: 12px; margin: 2px 0; }
.emp em { display: block; font-style: normal; color: var(--teal); font-size: 12px; }
.hire { display: flex; gap: 16px; align-items: flex-start; }
.h-prev { display: flex; flex-direction: column; align-items: center; gap: 8px; }
#h-prev { width: 72px; height: 112px; image-rendering: pixelated; background: linear-gradient(180deg, #cfeefa, #9fd8f0); border-radius: 10px; border: 2px solid var(--sky); }
#h-roll { font-size: 12px; padding: 6px 10px; background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; }
.h-form { flex: 1; }
.h-form label:first-child { margin-top: 0; }

/* ---------------- 알림 ---------------- */
#toast { position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 16px); opacity: 0; z-index: 60; pointer-events: none; transition: .22s;
  background: #0b2744; border: 2px solid var(--teal); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; box-shadow: 0 8px 24px rgba(0, 0, 0, .4); max-width: 90vw; text-align: center; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------- 중간 화면 ---------------- */
@media (max-width: 1280px) {
  .clock { min-width: 120px; }
  .brand { min-width: 0; }
  .brand small { display: none; }
  #logbox { width: 340px; }
  #editbar { right: 360px; }
}
@media (max-width: 1040px) {
  .clock { display: none; }
  #logbox { width: 300px; }
  .act { width: 96px; height: 62px; font-size: 12px; }
  #editbar { right: 8px; bottom: 8px; }
  body.editing #logbox { display: none; }
}

/* ---------------- 휴대폰 ---------------- */
@media (max-width: 760px) {
  #topbar { top: 6px; left: 6px; right: 6px; height: 56px; gap: 6px; padding: 6px; }
  #menu-btn { display: grid; place-items: center; flex: none; }
  .brand { display: none; }
  .icon-btn { display: none; }
  .stat { padding: 4px 9px 4px 6px; gap: 6px; }
  .stat img.pix { width: 22px; height: 22px; }
  .stat small { font-size: 10px; }
  .stat b { font-size: 14px; }
  .stat em { display: none; }
  #sidebar { top: 68px; bottom: auto; max-height: calc(100vh - 76px); width: 84px; transform: translateX(-110%); transition: transform .2s; z-index: 45; left: 6px; }
  body.menu-open #sidebar { transform: none; }
  #zoom { right: 6px; top: 68px; }
  #meet { left: 6px; right: 6px; top: auto; bottom: 6px; width: auto; max-height: 70vh; z-index: 40; }
  .chat { height: 34vh; }
  #zoom button { width: 36px; height: 36px; }
  #panel { left: 6px; right: 6px; top: auto; bottom: 6px; width: auto; max-height: 64vh; z-index: 40; }
  #logbox { left: 6px; right: 6px; width: auto; bottom: 84px; }
  #actions { left: 6px; right: 6px; bottom: 6px; }
  .act { flex: 1; width: auto; height: 68px; font-size: 11px; gap: 4px; padding: 0 2px; }
  .act img.pix { width: 24px; height: 24px; }
  #guide { left: 6px; right: 6px; width: auto; bottom: 128px; }
  #editbar { left: 6px; right: 6px; }
  .hire { flex-direction: column; align-items: center; }
  .h-form { width: 100%; }
  dl.info { grid-template-columns: 90px 1fr; }
  select, input, textarea { font-size: 16px; }
}

/* ---------------- 가로로 눕힌 휴대폰(화면 높이가 낮을 때) ---------------- */
@media (max-height: 520px) {
  #topbar { height: 48px; padding: 4px 6px; }
  .stat small, .stat em { display: none; }
  .stat img.pix { width: 20px; height: 20px; }
  .stat b { font-size: 14px; }
  #logbox { display: none; }
  #actions { bottom: 4px; }
  .act { height: 42px; flex-direction: row; gap: 6px; font-size: 11px; }
  .act img.pix { width: 20px; height: 20px; }
  #sidebar { top: 58px; }
  #zoom { top: 58px; }
  #zoom button { width: 30px; height: 30px; }
  #guide { bottom: 52px; }
  #panel { max-height: calc(100vh - 64px); }
}


/* ---------------- 대화 ---------------- */
.chat { height: 300px; overflow-y: auto; background: #06182a; border: 1px solid var(--line); border-radius: 9px; padding: 10px 8px; display: flex; flex-direction: column; gap: 8px; scrollbar-width: thin; }
.msg { display: flex; gap: 7px; align-items: flex-start; max-width: 100%; }
.msg img { width: 30px; height: 30px; border-radius: 7px; image-rendering: pixelated; background: linear-gradient(180deg, #cfeefa, #9fd8f0); flex: none; }
.msg small { display: block; font-size: 11px; color: var(--muted); margin: 0 0 3px 2px; }
.msg .b { background: #ffffff; color: #0b2744; border-radius: 4px 12px 12px 12px; padding: 7px 10px; font-family: var(--font-read); font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-break: break-all; box-shadow: 0 2px 0 rgba(0,0,0,.25); }
.msg.me { flex-direction: row-reverse; }
.msg.me small { text-align: right; margin: 0 2px 3px 0; }
.msg.me .b { background: linear-gradient(180deg, #2b8cff, #1561c7); color: #fff; border-radius: 12px 4px 12px 12px; }
.msg.sys { align-self: center; text-align: center; font-size: 12px; color: var(--muted); background: #0b2744; border: 1px dashed var(--line); border-radius: 8px; padding: 6px 10px; line-height: 1.6; }
.msg.typing .b { color: var(--muted); letter-spacing: 3px; animation: blink 1s steps(2) infinite; }
.act-btn { margin-top: 5px; font-size: 12px; padding: 6px 10px; border-radius: 8px; background: #0e3b2c; color: #6ff0aa; border: 1px solid #1f8a5a; }
.act-btn:hover { filter: brightness(1.15); }
.act-done { display: inline-block; margin-top: 5px; font-size: 12px; color: #6ff0aa; }
.chips { display: flex; gap: 5px; flex-wrap: wrap; margin: 8px 0; }
.chips button { font-size: 12px; padding: 5px 9px; background: var(--panel2); border: 1px solid var(--line); border-radius: 14px; color: #cfe6f7; }
.chips button:hover { border-color: var(--sky); }
.chat-input { display: flex; gap: 6px; }
.chat-input input { flex: 1; min-width: 0; }
.chat-input .primary { padding: 8px 14px; white-space: nowrap; }

/* ---------------- 전체 회의 창 ---------------- */
#meet { position: fixed; right: 8px; top: 84px; width: 390px; max-height: calc(100vh - 176px); z-index: 33; padding: 12px; display: flex; flex-direction: column;
  background: linear-gradient(180deg, rgba(22, 30, 74, .97), rgba(12, 28, 60, .97)); border: 2px solid #7a6cf0; border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 8, 18, .45); }
#meet > header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
#meet > header b { display: block; font-weight: 400; font-size: 17px; color: #cbbcff; }
#meet > header small { font-size: 11px; color: var(--muted); }
.m-hbtn { display: flex; gap: 6px; }
#meet-min { width: 32px; height: 32px; border-radius: 8px; background: var(--panel3); border: 1px solid var(--line); }
#meet-end { padding: 7px 10px; font-size: 13px; }
.meet-people { flex: none; display: flex; gap: 5px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 6px; scrollbar-width: thin; }
.mp { flex: none; width: 54px; text-align: center; opacity: .45; }
.mp.on { opacity: 1; }
.mp img { width: 34px; height: 34px; border-radius: 8px; image-rendering: pixelated; background: linear-gradient(180deg, #cfeefa, #9fd8f0); border: 2px solid #3a3470; }
.mp.on img { border-color: #9b86ff; }
.mp b { display: block; font-weight: 400; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp i { display: block; font-style: normal; font-size: 10px; color: var(--muted); }
.mp.on i { color: #9bf0c0; }
#meet .chat { flex: 1; min-height: 160px; height: auto; }
#meet.mini .meet-people, #meet.mini .chat, #meet.mini .chips, #meet.mini .chat-input { display: none; }
#meet.mini > header { margin-bottom: 0; }
@media (max-width: 760px) {
  #meet { left: 6px; right: 6px; top: auto; bottom: 6px; width: auto; max-height: 72vh; z-index: 40; }
  #meet .chat { min-height: 120px; }
  #panel .chat { height: 30vh; }
}
@media (max-height: 700px) { #panel .chat { height: 200px; } }

/* =====================================================================
 * v1.3 — 전체 화면 · 작업표시줄 · 방 카드
 * ===================================================================== */
#game { background: #3f8a4c; }
#sidebar { bottom: 70px; }
#taskbar { position: fixed; left: 8px; right: 8px; bottom: 8px; height: 54px; z-index: 34; display: flex; align-items: center; gap: 8px; padding: 6px 8px;
  background: linear-gradient(180deg, rgba(15, 51, 84, .96), rgba(8, 30, 54, .98)); border: 2px solid var(--line); border-radius: 12px; box-shadow: 0 6px 24px rgba(0, 8, 18, .45); }
.rooms { flex: 1; min-width: 0; display: flex; gap: 5px; overflow-x: auto; scrollbar-width: none; }
.rooms::-webkit-scrollbar { display: none; }
.rm { flex: none; display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border-radius: 9px; background: var(--panel2); border: 1px solid var(--line); font-size: 13px; color: #cfe6f7; white-space: nowrap; }
.rm i { width: 9px; height: 9px; border-radius: 3px; background: var(--tc, var(--sky)); }
.rm img.pix { width: 20px; height: 20px; }
.rm:hover { border-color: var(--sky); }
.rm.on { background: linear-gradient(90deg, var(--teal2), var(--blue)); color: #fff; border-color: #6fd6f7; }
.tb-right { display: flex; gap: 5px; align-items: center; flex: none; }
.tb-z { width: 38px; height: 38px; border-radius: 9px; background: var(--panel2); border: 1px solid var(--line); font-size: 17px; font-family: system-ui, sans-serif; }
.tb-z:hover { border-color: var(--sky); }
#log-btn { display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border-radius: 9px; background: var(--panel2); border: 1px solid var(--line); font-size: 13px; white-space: nowrap; }
#log-btn img.pix { width: 20px; height: 20px; }
#logbox { bottom: 70px; }
#guide { bottom: 72px; }
#editbar { bottom: 70px; }
#toast { bottom: 82px; }
#panel { max-height: calc(100vh - 92px - 70px); }
#meet { max-height: calc(100vh - 92px - 70px); }

#roomcard { position: fixed; left: 92px; bottom: 70px; z-index: 30; max-width: min(760px, calc(100vw - 110px)); padding: 8px 10px;
  background: linear-gradient(180deg, rgba(15, 51, 84, .97), rgba(9, 34, 60, .97)); border: 2px solid var(--tc, var(--line)); border-radius: 12px; box-shadow: 0 8px 26px rgba(0, 8, 18, .45); }
.rc-head { display: flex; align-items: center; gap: 8px; }
.rc-body { margin-top: 6px; }
.rc-head i { width: 10px; height: 10px; border-radius: 3px; background: var(--tc); flex: none; }
.rc-head b { font-weight: 400; font-size: 15px; white-space: nowrap; }
.rc-head small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-x { margin-left: auto; font-size: 12px; padding: 4px 9px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); white-space: nowrap; }
.rc-body { display: flex; gap: 10px; align-items: center; }
.rc-people { display: flex; gap: 5px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.rc-p { flex: none; display: flex; align-items: center; gap: 6px; padding: 4px 9px 4px 4px; background: #081f37; border: 1px solid var(--line); border-radius: 9px; text-align: left; }
.rc-p:hover { border-color: var(--sky); }
.rc-p img { width: 30px; height: 30px; border-radius: 7px; image-rendering: pixelated; background: linear-gradient(180deg, #cfeefa, #9fd8f0); }
.rc-p b { display: block; font-weight: 400; font-size: 13px; }
.rc-p small { display: block; font-size: 11px; color: var(--teal); }
.rc-btns { display: flex; gap: 5px; flex: none; }
.rc-btns button { font-size: 12px; padding: 8px 10px; background: var(--blue); border: 1px solid #5aa9ff; border-radius: 8px; color: #fff; white-space: nowrap; }

@media (max-width: 760px) {
  #taskbar { left: 6px; right: 6px; bottom: 6px; height: 50px; padding: 5px 6px; }
  .rm { height: 38px; padding: 0 10px; font-size: 12px; }
  .tb-z { display: none; }
  #log-btn span { display: none; }
  #log-btn { padding: 0 9px; }
  #logbox { left: 6px; right: 6px; width: auto; bottom: 62px; }
  #guide { bottom: 64px; }
  #editbar { bottom: 62px; }
  #toast { bottom: 70px; }
  #roomcard { left: 6px; right: 6px; top: 68px; bottom: auto; max-width: none; }
  .rc-body { flex-wrap: wrap; gap: 6px; }
  .rc-btns { margin-left: auto; }
  .rc-head small { display: none; }
  #sidebar { bottom: auto; }
}
@media (max-height: 520px) {
  #taskbar { height: 44px; bottom: 4px; }
  .rm, .tb-z, #log-btn { height: 32px; }
  #roomcard { display: none !important; }
}

/* ---------------- 대표 비서 계획 카드 ---------------- */
#panel.sec { border-color: var(--gold); }
.plan { margin-top: 6px; background: #081f37; border: 1px solid #9a7420; border-radius: 10px; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.pl-row { display: grid !important; grid-template-columns: 18px 1fr auto; gap: 4px 6px; align-items: center; margin: 0 !important; font-size: 12px !important; color: var(--text) !important; }
.pl-row b { font-weight: 400; color: #ffe08a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-row input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--teal); }
.pl-row .pl-task { grid-column: 1 / 4; grid-row: 2; padding: 6px 8px; font-size: 13px; border-width: 1px; }
.pl-row small { color: var(--muted); font-size: 11px; }
.plan.done { opacity: .75; }
#p-duty { font-size: 13px; margin: 0 0 4px; }

/* AI 엔진 표시 */
.eng { display: inline-block; font-size: 10px; padding: 1px 6px; border-radius: 8px; vertical-align: middle; font-weight: 400; }
.eng-claude { background: #3b2a1e; color: #ffb98a; border: 1px solid #c8753f; }
.eng-gpt { background: #10352c; color: #7ff0c8; border: 1px solid #1f9a74; }
#p-name .eng { font-size: 11px; }
#p-engine { font-size: 13px; padding: 6px 8px; }

/* 이번 달 AI 사용비 — Claude · GPT 분리 표시 (v1.5.2) */
.stat em i { font-style: normal; }
.stat em i.c-claude { color: #ffb98a; }
.stat em i.c-gpt { color: #7ff0c8; }
.cost-split { display: grid; gap: 6px; margin-bottom: 4px; }
.cost-split { white-space: normal; }
.cs-row { display: grid; grid-template-columns: 62px 1fr auto 38px; align-items: center; gap: 8px; font-size: 13px; }
.cs-row .eng { text-align: center; white-space: nowrap; }
.cs-row b:last-of-type { font-size: 15px; text-align: right; }
.cs-row small { color: var(--muted); text-align: right; }
.cs-bar { display: flex; height: 8px; border-radius: 4px; background: #06182a; border: 1px solid var(--line); overflow: hidden; margin-top: 2px; }
.cs-bar i { display: block; height: 100%; }
.cs-bar i.c-claude { background: #c8753f; }
.cs-bar i.c-gpt { background: #1f9a74; }
.cs-sum { font-size: 12px; color: var(--muted); }
.cs-sum b { color: var(--text, #e6f6ff); }
@media (max-width: 520px) { .cs-row { grid-template-columns: 60px 1fr auto; } .cs-row small { display: none; } }

/* =====================================================================
 * v1.6.0 — 로그인 · 내 계정 · 임원 관리 · 지시·결과함
 * ===================================================================== */
input[type=password], input[type=number], input[type=email] {
  width: 100%; background: #f4f9fd; color: #0b2744; border: 2px solid #9fd0ee; border-radius: 8px; padding: 9px 10px; font-family: var(--font-read); font-size: 14px; outline: none;
}
.err { color: #ff9fb0; font-size: 13px; min-height: 1em; margin: 0; flex: 1; align-self: center; }
.noperm { display: none !important; }

/* 로그인 화면 */
body.logged-out #topbar, body.logged-out #sidebar, body.logged-out #taskbar, body.logged-out #zoom, body.logged-out #panel, body.logged-out #logbox, body.logged-out #guide, body.logged-out #roomcard, body.logged-out #meet { display: none !important; }
#login { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: radial-gradient(1200px 600px at 20% 10%, rgba(25, 194, 176, .28), transparent 60%), radial-gradient(900px 600px at 90% 90%, rgba(30, 123, 240, .3), transparent 60%), linear-gradient(160deg, #071a2c, #0b2f52 55%, #072038);
  overflow-y: auto; }
#login::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .18;
  background-image: linear-gradient(rgba(92, 200, 242, .35) 1px, transparent 1px), linear-gradient(90deg, rgba(92, 200, 242, .35) 1px, transparent 1px); background-size: 32px 32px; }
.lg-card { position: relative; width: min(380px, 100%); background: rgba(11, 39, 68, .92); border: 2px solid var(--line2); border-radius: 16px; padding: 26px 24px 20px; box-shadow: 0 8px 0 #061526, 0 24px 60px rgba(0, 0, 0, .45); text-align: left; }
.lg-card #lg-logo { display: block; width: 72px; height: 72px; margin: 0 auto 8px; }
.lg-card h1 { margin: 0; text-align: center; font-weight: 400; font-size: 26px; letter-spacing: 1px; }
.lg-card h1 span { color: var(--teal); }
.lg-sub { text-align: center; color: var(--sky); font-size: 13px; margin: 6px 0 16px; }
.lg-card label { display: block; font-size: 12px; color: var(--muted); margin: 12px 0 5px; }
.lg-card .lg-keep { font-size: 13px !important; margin-top: 12px !important; }
.lg-card .err { margin-top: 6px; }
.lg-foot { text-align: center; font-size: 11px; color: var(--muted); margin: 14px 0 0; }

/* 오른쪽 위 내 계정 */
#me-btn { display: flex; align-items: center; gap: 8px; background: var(--panel2); border: 1px solid var(--line); border-radius: 9px; padding: 4px 10px 4px 5px; text-align: left; flex: none; max-width: 190px; }
#me-btn:hover { border-color: var(--sky); }
#me-btn canvas { width: 28px; height: 28px; image-rendering: pixelated; background: linear-gradient(180deg, #cfeefa, #9fd8f0); border-radius: 6px; flex: none; }
#me-btn b { display: block; font-weight: 400; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#me-btn small { display: block; font-size: 10px; color: var(--gold); white-space: nowrap; }
@media (max-width: 760px) { #me-btn span { display: none; } #me-btn { padding: 4px; } }

/* 내 계정 창 */
.acct-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.acct-head canvas { width: 56px; height: 56px; image-rendering: pixelated; background: linear-gradient(180deg, #cfeefa, #9fd8f0); border-radius: 10px; }
.acct-head b { display: block; font-weight: 400; font-size: 17px; }
.acct-head small { color: var(--muted); font-size: 12px; }
.pw-box { display: grid; gap: 8px; white-space: normal; }

/* 임원 관리 */
.ex-top { display: flex; justify-content: space-between; align-items: center; margin: 10px 0; font-size: 14px; }
.ex-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ex-row { display: flex; gap: 10px; align-items: center; padding: 9px 10px; background: #081f37; border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 10px; }
.ex-row.off { opacity: .55; border-left-color: #56708a; }
.ex-face { width: 40px; height: 40px; image-rendering: pixelated; background: linear-gradient(180deg, #cfeefa, #9fd8f0); border-radius: 8px; flex: none; }
.ex-main { flex: 1; min-width: 0; }
.ex-main b { font-weight: 400; font-size: 15px; }
.ex-main small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.ex-main .ex-perm { color: var(--sky); }
.ex-main .pill { padding: 1px 8px; font-size: 11px; }
.ex-side { text-align: right; flex: none; }
.ex-side b { display: block; font-weight: 400; font-size: 14px; }
.ex-side small { display: block; color: var(--muted); font-size: 11px; margin-bottom: 4px; }
.ex-grid { display: grid; grid-template-columns: 110px 1fr; gap: 14px; align-items: start; }
.ex-look { display: flex; flex-direction: column; align-items: center; gap: 8px; background: linear-gradient(180deg, #16466e, #0b2744); border: 1px solid var(--line); border-radius: 12px; padding: 10px 6px; }
.ex-look canvas { width: 72px; height: 112px; image-rendering: pixelated; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; width: 100%; }
.seg button { padding: 7px 4px; font-size: 13px; background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; color: var(--muted); }
.seg button.on { background: var(--teal2); border-color: var(--teal); color: #fff; }
.ex-titles { margin: 6px 0 0; }
.ex-titles button { padding: 4px 9px; }
.perm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.perm-grid .perm { align-items: flex-start; margin: 0 !important; padding: 8px 9px; background: #081f37; border: 1px solid var(--line); border-radius: 9px; }
.perm-grid .perm b { display: block; font-weight: 400; font-size: 13px; }
.perm-grid .perm small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
.perm-grid .perm input { margin-top: 1px; flex: none; }
.team-pick { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.team-pick .tog { margin: 2px 0 !important; font-size: 13px !important; }
@media (max-width: 520px) { .perm-grid { grid-template-columns: 1fr; } .ex-grid { grid-template-columns: 90px 1fr; } .ex-row { flex-wrap: wrap; } .ex-side { width: 100%; display: flex; align-items: center; gap: 8px; text-align: left; } .ex-side small { margin: 0; flex: 1; } }

/* 지시·결과함 */
.inbox-tabs button.on { background: var(--blue); border-color: #5aa9ff; color: #fff; }
.inbox-tabs small { opacity: .75; margin-left: 2px; }

/* 내 계정 — 이름·성별 */
.prof-row { display: grid; grid-template-columns: 1fr 150px; gap: 8px; align-items: center; }
@media (max-width: 520px) { .prof-row { grid-template-columns: 1fr; } }

/* 팀 협업 */
.collab-bar { background: linear-gradient(90deg, rgba(25, 194, 176, .16), rgba(30, 123, 240, .12)); border: 1px solid var(--teal2); border-radius: 10px; padding: 9px 12px; font-size: 13px; margin: 10px 0 4px; }
.collab-bar b { font-weight: 400; color: var(--teal); margin-right: 4px; }
.cb-steps { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 7px; }
.cb-steps i { font-style: normal; color: var(--muted); }
.cb-step { padding: 3px 9px; border-radius: 12px; border: 1px solid var(--line); background: #081f37; color: var(--muted); font-size: 12px; }
.cb-step.ok { border-color: #1f8a5a; background: #0e3b2c; color: #6ff0aa; }
.cb-step.now { border-color: var(--sky); background: #0e3350; color: #8fe0ff; animation: blink 1.2s steps(2) infinite; }
.collab-bar small { display: block; margin-top: 6px; }
details.collab-d { margin-top: 8px; }
details.collab-d summary { cursor: pointer; font-size: 13px; color: var(--sky); padding: 6px 0; }
details.collab-d .box { margin-top: 4px; }

/* 목소리 · 마이크 (v1.8.0) */
.mic-btn { flex: none; width: 42px; border-radius: 9px; background: var(--panel2); border: 1px solid var(--line); font-size: 18px; line-height: 1; }
.mic-btn:hover { border-color: var(--sky); }
.mic-btn.rec { background: #3a1624; border-color: #ff6b86; animation: micpulse 1s ease-in-out infinite; }
@keyframes micpulse { 50% { box-shadow: 0 0 0 5px rgba(255, 107, 134, .25); } }
#voice-btn { font-size: 18px; }
#voice-btn.off { opacity: .55; }
#mic-hint { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 70; background: rgba(58, 22, 36, .95); border: 2px solid #ff6b86; color: #ffe3ea; padding: 10px 18px; border-radius: 22px; font-size: 14px; pointer-events: none; box-shadow: 0 6px 20px rgba(0, 0, 0, .4); }
.voice-set { white-space: normal; }
.voice-set .tog { font-size: 13px !important; margin: 6px 0 !important; }
.rate-row { display: flex; align-items: center; gap: 10px; font-size: 13px; margin: 8px 0 6px; flex-wrap: wrap; }
.rate-row input[type=range] { flex: 1; min-width: 120px; accent-color: var(--teal); }
.box.easy { border-color: var(--teal); background: #0a2a36; }

/* 자료실 · 인계 자료 (v1.9.0) */
.f-drop { border: 2px dashed var(--line2); border-radius: 12px; padding: 12px; background: rgba(8, 31, 55, .6); transition: border-color .15s, background .15s; }
.f-drop.over { border-color: var(--teal); background: rgba(25, 194, 176, .12); }
.f-drop-top b { font-weight: 400; font-size: 15px; display: block; }
.f-drop-top small { color: var(--muted); font-size: 12px; }
.f-btns { display: flex; gap: 8px; margin: 10px 0 6px; flex-wrap: wrap; }
.f-btns button:not(.primary) { padding: 10px 14px; background: var(--panel2); border: 1px solid var(--line); border-radius: 9px; }
.f-btns button.rec { background: #3a1624; border-color: #ff6b86; animation: micpulse 1s ease-in-out infinite; }
.f-queue { list-style: none; margin: 6px 0; padding: 0; display: grid; gap: 4px; }
.f-queue li { display: flex; align-items: center; gap: 8px; font-size: 13px; background: #081f37; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.f-queue li small { color: var(--muted); }
.f-queue li button { margin-left: auto; width: 24px; height: 24px; border-radius: 6px; background: var(--panel3); }
.f-drop > small { display: block; margin-top: 8px; line-height: 1.5; }
.f-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.f-row { display: flex; gap: 10px; align-items: flex-start; background: #081f37; border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.f-ic { font-size: 24px; line-height: 1; flex: none; }
.f-main { flex: 1; min-width: 0; }
.f-main b { font-weight: 400; font-size: 14px; word-break: break-all; }
.f-main small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.f-main .f-note { color: var(--sky); }
.f-main details summary { cursor: pointer; font-size: 12px; color: var(--teal); margin-top: 4px; }
.f-main audio { width: 100%; max-width: 360px; height: 34px; margin-top: 6px; }
.f-act { display: flex; flex-direction: column; gap: 4px; flex: none; }
.f-act .act-btn { text-align: center; text-decoration: none; }
.act-btn.del { border-color: #a3324a; color: #ffd4dc; }
.file-chip { display: inline-flex; align-items: center; gap: 4px; margin: 4px 4px 0 0; padding: 4px 9px; border-radius: 12px; background: #0e3350; border: 1px solid #2d7fb4; color: #bfe9ff; font-size: 12px; text-decoration: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chip:hover { border-color: var(--sky); }
.msg-files { margin-top: 4px; }
#p-files { margin-top: 8px; background: #081f37; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
#p-files .pf-top { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
#p-files .pf { font-size: 13px !important; margin: 3px 0 !important; }
@media (max-width: 520px) { .f-row { flex-wrap: wrap; } .f-act { flex-direction: row; flex-wrap: wrap; width: 100%; } }

/* 기능별 사용비 (v1.9.2) */
.cs-kinds { display: grid; gap: 4px; margin-top: 6px; }
.ck-row { display: grid; grid-template-columns: 150px 1fr 64px 110px; align-items: center; gap: 8px; font-size: 12px; }
.ck-row i { display: block; height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--teal), var(--sky)); }
.ck-row b { font-weight: 400; text-align: right; }
.ck-row small { color: var(--muted); font-size: 11px; }
@media (max-width: 520px) { .ck-row { grid-template-columns: 1fr 60px; } .ck-row i, .ck-row small { display: none; } }
