/* 올마이티 오피스 2 — 화면 한 장짜리 스타일시트.
   색·간격·크기는 시안 5판(design/build_screens.py 의 팔레트 · design/v5/build_screens_v5.py 의 shell5)에서
   그대로 옮긴 값이다. 눈대중으로 고치지 않는다 — 시안 파일이 그림 정본이다. */

:root {
  --navy: #17324d;
  --soft: #eaf0f5;
  --ink: #17202a;
  --muted: #5e6975;
  --line: #d7dce2;
  --line2: #aeb7c2;
  --paper: #ffffff;
  --ground: #f4f5f7;
  --ok: #1f7a4d;
  --okbg: #e6f3ec;
  --bad: #b23b3b;
  --badbg: #f8e7e7;
  --warn: #8a5a00;
  --warnbg: #fbf1dc;
  --neu: #5e6975;
  --neubg: #eef0f2;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--ground);
  font-size: 14px;
  line-height: 1.5;
}
a { color: var(--navy); text-decoration: none; }
a:hover { color: #0f2236; }
.grow { flex-grow: 1; }
.help { display: inline-flex; align-items: center; justify-content: center; color: var(--muted); cursor: help; flex-shrink: 0; }

/* ---------------------------------------------------------------- 껍데기 */

.app { display: flex; box-sizing: border-box; width: 100%; min-height: 100vh; background: var(--ground); }

/* 왼쪽 56px 남색 레일 — 로고 · 구분선 · 자리 · 자리 추가 · (아래) 도움말 */
.rail {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  width: 56px; flex-shrink: 0; padding: 14px 0;
  background: var(--navy); color: var(--paper);
  position: sticky; top: 0; height: 100vh; box-sizing: border-box;
}
.rail-logo {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; flex-shrink: 0; border-radius: 9px; background: var(--paper);
}
.rail-line { width: 36px; height: 1px; background: rgba(255, 255, 255, 0.18); margin: 2px 0; flex-shrink: 0; }
/* 자리 배지가 타일 밖 6px 로 나가므로 좌우·위아래에 그만큼 자리를 준다 — 세로로 넘치면 레일만 구른다 */
.rail-seats { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 6px 8px; min-height: 0; overflow-y: auto; }
.rail-seats::-webkit-scrollbar { width: 0; }
.rail-help { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; color: rgba(255, 255, 255, 0.8); cursor: help; }

.seat { position: relative; flex-shrink: 0; display: block; }
.seat-tile {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; box-sizing: border-box; border-radius: 9px;
  font-weight: 700; font-size: 14px;
  background: rgba(255, 255, 255, 0.14); color: #ffffff;
}
.seat.on .seat-tile { background: var(--paper); color: var(--navy); }
.seat-badge {
  position: absolute; right: -6px; bottom: -6px;
  display: flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; box-sizing: border-box; border-radius: 8px;
  background: var(--paper); color: var(--navy);
}
.seat-add {
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 36px; height: 36px; box-sizing: border-box; border-radius: 9px;
  border: 1px dashed rgba(255, 255, 255, 0.5); color: rgba(255, 255, 255, 0.85);
}

/* 236px 사이드바 */
.side {
  display: flex; flex-direction: column; width: 236px; flex-shrink: 0;
  background: var(--paper); border-right: 1px solid var(--line);
  position: sticky; top: 0; height: 100vh; box-sizing: border-box;
}
.side-head { display: flex; align-items: center; gap: 8px; height: 56px; box-sizing: border-box; padding: 0 14px; border-bottom: 1px solid var(--line); }
.side-seat { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-mini { display: flex; gap: 4px; padding: 10px 10px 2px; }
.mini { display: flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 5px; color: var(--muted); font-size: 13px; }
.mini.on { background: var(--soft); color: var(--navy); font-weight: 600; }
.side-nav { display: flex; flex-direction: column; gap: 2px; padding: 8px 8px 4px; }
.nav-item { display: flex; align-items: center; gap: 9px; min-height: 36px; padding: 0 12px; border-radius: 5px; font-size: 14px; color: var(--ink); }
.nav-item.on { color: var(--navy); background: var(--soft); font-weight: 600; }
.side-lock { display: flex; align-items: center; gap: 6px; padding: 10px 14px; font-size: 12px; color: var(--muted); }
.side-user { display: flex; align-items: center; gap: 10px; padding: 14px; border-top: 1px solid var(--line); }
.avatar { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; flex-shrink: 0; border-radius: 17px; background: var(--soft); color: var(--navy); }
.side-user-text { display: flex; flex-direction: column; min-width: 0; }
.side-user-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user-sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logout { margin: 0; }
.linkish { display: flex; align-items: center; padding: 4px; border: 0; background: none; color: var(--muted); cursor: pointer; }
.linkish:hover { color: var(--navy); }

/* 머리띠 56px */
.main { display: flex; flex-direction: column; flex-grow: 1; min-width: 0; }
.head { display: flex; align-items: center; gap: 12px; height: 56px; flex-shrink: 0; box-sizing: border-box; padding: 0 24px; background: var(--paper); border-bottom: 1px solid var(--line); }
.crumb { font-size: 13px; color: var(--muted); }
.content { display: flex; flex-direction: column; gap: 14px; padding: 18px 24px; min-width: 0; }
.titlerow { display: flex; align-items: center; gap: 10px; }
.title { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.subtitle { font-size: 13px; color: var(--muted); }

/* ---------------------------------------------------------------- 부품 */

.btn {
  display: inline-flex; align-items: center; gap: 7px; min-height: 40px; box-sizing: border-box;
  padding: 0 14px; border-radius: 5px; font-size: 14px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  color: var(--navy); background: var(--paper); border: 1px solid var(--line2);
}
.btn.primary { color: var(--paper); background: var(--navy); border-color: var(--navy); }
.btn.off { color: var(--muted); background: var(--neubg); border-color: var(--line); }
.btn::-webkit-details-marker { display: none; }
.btn::marker { content: ""; }

.menu { position: relative; }
.menu-list {
  position: absolute; right: 0; top: 44px; z-index: 10;
  display: flex; flex-direction: column; min-width: 150px; max-height: 320px; overflow-y: auto;
  padding: 4px; background: var(--paper); border: 1px solid var(--line); border-radius: 6px;
  box-shadow: 0 6px 18px rgba(23, 50, 77, 0.12);
}
.menu-row { padding: 8px 10px; border-radius: 4px; font-size: 13px; color: var(--ink); white-space: nowrap; }
.menu-row:hover { background: var(--soft); }
.menu-row.on { color: var(--navy); font-weight: 600; background: var(--soft); }

.card { display: flex; flex-direction: column; gap: 10px; padding: 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; }
.card-h { display: flex; align-items: center; gap: 7px; font-size: 15px; font-weight: 700; color: var(--navy); }
.quiet { font-size: 13px; color: var(--muted); }

.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 4px; font-size: 12px; font-weight: 600; color: var(--neu); background: var(--neubg); white-space: nowrap; }
.chip.ok { color: var(--ok); background: var(--okbg); }
.chip.bad { color: var(--bad); background: var(--badbg); }
.chip.warn { color: var(--warn); background: var(--warnbg); }

/* ---------------------------------------------------------------- 들어가기 */

.gate { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 24px; box-sizing: border-box; }
.gate-card { display: flex; flex-direction: column; gap: 14px; width: 360px; padding: 26px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; }
.gate-logo { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 11px; background: var(--soft); }
.gate-title { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.gate label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--navy); }
.gate input {
  height: 40px; box-sizing: border-box; padding: 0 12px; font: inherit; font-size: 14px; font-weight: 400;
  color: var(--ink); background: var(--paper); border: 1px solid var(--line2); border-radius: 5px;
}
.gate input:focus { outline: none; border-color: var(--navy); }
.gate .btn { justify-content: center; }
.bad-line { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--bad); }
