/* 대표님 일정 비서 — 모바일 우선, 데스크톱에서는 좌측 메뉴 + 중앙 본문 */
:root {
  --bg: #f5f6fa; --card: #ffffff; --ink: #121a30; --sub: #566079; --line: #e3e7f0; --soft: #f0f3fa;
  --brand: #0f2147; --brand-2: #1e3f86; --accent: #b8893a; --accent-soft: #f6efe0;
  --ok: #0f8a55; --ok-bg: #e3f5ec; --warn: #a76100; --warn-bg: #fff2d9; --bad: #c0352b; --bad-bg: #fdeceb;
  --info: #2a56c6; --info-bg: #e8eefc;
  --shadow: 0 1px 2px rgba(15, 33, 71, .05), 0 8px 24px rgba(15, 33, 71, .06);
  --r: 18px; --font: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c1324; --card: #151d33; --ink: #eef2fb; --sub: #a3b0ca; --line: #26324f; --soft: #1a2440;
    --brand: #dbe5ff; --brand-2: #7ea2ff; --accent: #e0b866; --accent-soft: #2e2716;
    --ok: #4fd195; --ok-bg: #12352a; --warn: #ffc35c; --warn-bg: #3a2c10; --bad: #ff8f85; --bad-bg: #3b1a18;
    --info: #8fb0ff; --info-bg: #1c2a52; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px rgba(0, 0, 0, .28);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ink); font: 17px/1.6 var(--font); letter-spacing: -.01em;
  background: radial-gradient(1200px 380px at 50% -120px, rgba(30, 63, 134, .10), transparent 70%), var(--bg);
  padding-bottom: calc(84px + env(safe-area-inset-bottom)); min-height: 100vh;
}
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand-2); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand-2) 55%, transparent); outline-offset: 2px; }

/* 상단 바 */
.top { position: sticky; top: 0; z-index: 8; background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.top-in { max-width: 1040px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; color: #fff; flex: none; background: linear-gradient(145deg, #0f2147, #1e3f86); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12), 0 4px 12px rgba(15, 33, 71, .25); }
.brand-t { display: grid; font-weight: 800; color: var(--brand); line-height: 1.15; font-size: 17px; white-space: nowrap; }
.brand-t small { font-weight: 600; color: var(--accent); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.who { display: flex; gap: 6px; align-items: center; color: var(--sub); font-size: 15px; }
.who-name { font-weight: 700; color: var(--ink); max-width: 28vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.help { color: var(--brand-2); font-weight: 700; font-size: 14px; text-decoration: none; padding: 8px 10px; border-radius: 10px; background: var(--info-bg); white-space: nowrap; }
.link { background: none; border: 0; color: var(--sub); font-size: 14px; padding: 8px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* 본문 */
main { max-width: 680px; margin: 0 auto; padding: 24px 18px 8px; }
.eyebrow { color: var(--accent); font-weight: 800; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 4px; }
h1 { font-size: 28px; line-height: 1.25; margin: 0 0 8px; color: var(--brand); letter-spacing: -.02em; }
h2.sec { font-size: 21px; color: var(--brand); margin: 36px 0 8px; padding-top: 24px; border-top: 1px solid var(--line); }
.lead { color: var(--sub); margin: 0 0 22px; font-size: 16.5px; }
.lead b { color: var(--ink); }
.fine { color: var(--sub); font-size: 14px; margin: 10px 0 0; }
.center { text-align: center; }

/* 카드 */
.card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 18px 16px 22px; margin-bottom: 14px; box-shadow: var(--shadow); overflow: hidden; }
.card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--line); }
.card.st-pending::before { background: #e3a008; } .card.st-accepted::before { background: var(--ok); }
.card.st-declined::before { background: var(--bad); } .card.st-proposed::before { background: var(--info); }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.card h3 { margin: 0; font-size: 19px; line-height: 1.35; }
.meta { color: var(--sub); font-size: 15.5px; display: grid; gap: 4px; }
.meta b { color: var(--ink); font-weight: 700; }
.date-head { font-weight: 800; color: var(--brand); margin: 26px 2px 10px; font-size: 15px; letter-spacing: .02em; }
.badge { display: inline-block; padding: 4px 11px; border-radius: 999px; font-size: 13.5px; font-weight: 800; white-space: nowrap; font-style: normal; }
.badge.pending { background: var(--warn-bg); color: var(--warn); } .badge.accepted { background: var(--ok-bg); color: var(--ok); }
.badge.declined { background: var(--bad-bg); color: var(--bad); } .badge.proposed { background: var(--info-bg); color: var(--info); }
.legend { display: inline-flex; gap: 6px; flex-wrap: wrap; margin-left: 4px; vertical-align: 1px; } .legend .badge { font-size: 12.5px; padding: 2px 9px; }
.reply { margin-top: 10px; padding: 11px 13px; border-radius: 12px; background: var(--soft); font-size: 15.5px; }
.reply.proposal { background: var(--info-bg); }
.empty { display: grid; justify-items: center; gap: 4px; text-align: center; color: var(--sub); padding: 44px 16px; background: var(--card); border: 1.5px dashed var(--line); border-radius: var(--r); }
.empty strong { color: var(--ink); font-size: 18px; } .empty-ic { font-size: 34px; margin-bottom: 4px; }

/* 폼 */
.fs { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; margin-bottom: 14px; box-shadow: var(--shadow); }
.fs-h { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; margin-bottom: 12px; color: var(--brand); }
.fs-h b { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 14px; flex: none; }
@media (prefers-color-scheme: dark) { .fs-h b { color: #0c1324; } }
.fs-h small { color: var(--sub); font-weight: 500; }
label { display: block; font-weight: 700; margin: 16px 0 6px; font-size: 15.5px; }
.fs label:first-of-type { margin-top: 0; }
label small { color: var(--sub); font-weight: 500; }
input[type=text], input[type=date], input[type=time], input[type=email], textarea {
  width: 100%; padding: 14px 15px; border-radius: 13px; border: 1.5px solid var(--line); background: var(--soft); min-height: 54px; transition: border-color .15s, background .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--sub) 65%, transparent); }
textarea { min-height: 96px; resize: vertical; }
input:focus, textarea:focus { outline: none; border-color: var(--brand-2); background: var(--card); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-2) 16%, transparent); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hint { color: var(--sub); font-size: 14px; margin: 12px 0 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 11px 17px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); cursor: pointer; min-height: 46px; font-weight: 600; transition: all .15s; }
.chip:hover { border-color: var(--brand-2); }
.chip[aria-pressed=true] { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 800; }
@media (prefers-color-scheme: dark) { .chip[aria-pressed=true] { color: #0c1324; } }
.warn { background: var(--bad-bg); color: var(--bad); border: 1.5px solid color-mix(in srgb, var(--bad) 35%, transparent); border-radius: 13px; padding: 13px 15px; margin: 14px 0 0; font-weight: 800; line-height: 1.5; }

/* 버튼 */
.btn { display: block; width: 100%; padding: 16px; border: 0; border-radius: 15px; min-height: 58px; background: linear-gradient(180deg, #1e3f86, #0f2147); color: #fff; font-weight: 800; font-size: 18px; cursor: pointer; box-shadow: 0 8px 20px rgba(15, 33, 71, .22); transition: transform .1s, box-shadow .15s, opacity .15s; }
.btn:hover { box-shadow: 0 10px 26px rgba(15, 33, 71, .3); } .btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; box-shadow: none; cursor: not-allowed; }
.btn.ghost { background: var(--card); color: var(--ink); border: 1.5px solid var(--line); font-weight: 700; box-shadow: none; }
.btn.ok { background: linear-gradient(180deg, #14a46a, #0d7f4f); }
.btn.sm { min-height: 50px; padding: 12px; font-size: 16px; border-radius: 13px; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; } .actions .wide { grid-column: 1 / -1; }
.submit { margin-top: 22px; }

/* 하단 탭 (모바일) */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9; display: flex; gap: 4px; padding: 6px 10px calc(6px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
.tabs button { flex: 1; border: 0; background: none; padding: 8px 4px; min-height: 62px; cursor: pointer; color: var(--sub); font-size: 13.5px; font-weight: 700; border-radius: 14px; transition: background .15s, color .15s; }
.tabs button .ic { display: block; font-size: 22px; line-height: 1.25; }
.tabs button[aria-current=page] { color: var(--brand); background: var(--info-bg); }
.dot { background: var(--bad); color: #fff; border-radius: 999px; font-size: 12px; padding: 1px 7px; margin-left: 4px; }

.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); background: #121a30; color: #fff; padding: 13px 22px; border-radius: 999px; opacity: 0; pointer-events: none; transition: .25s; z-index: 40; width: max-content; max-width: 90vw; text-align: center; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); font-weight: 600; }
.toast.show { opacity: 1; transform: translate(-50%, 0); } .toast.err { background: var(--bad); }
.sheet-bg { position: fixed; inset: 0; background: rgba(8, 13, 28, .55); backdrop-filter: blur(3px); z-index: 30; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--card); width: 100%; max-width: 560px; border-radius: 24px 24px 0 0; padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); max-height: 90vh; overflow: auto; box-shadow: 0 -10px 40px rgba(0, 0, 0, .25); }
.sheet h2 { margin: 0 0 6px; font-size: 21px; color: var(--brand); }
.sheet .lead { margin-bottom: 14px; }

/* 로그인 */
.login { text-align: center; padding-top: 6vh; max-width: 460px; margin: 0 auto; }
.hero-mark { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 20px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 20px; background: linear-gradient(145deg, #0f2147, #1e3f86); box-shadow: 0 12px 28px rgba(15, 33, 71, .3), inset 0 0 0 1px rgba(255, 255, 255, .14); letter-spacing: .02em; }
.login h1 { font-size: 30px; } .login .lead { margin-bottom: 22px; }
.login-card { text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 22px 20px; box-shadow: var(--shadow); }
.login-card label { margin-top: 14px; } .login-card label:first-child { margin-top: 0; }
input.code { text-align: center; font-size: 22px; letter-spacing: .18em; font-weight: 700; }
.err-text { color: var(--bad); font-weight: 700; margin: 8px 0 8px; min-height: 1.5em; font-size: 15px; text-align: center; }
.login-card .fine { text-align: center; }
.how { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; text-align: left; }
.how li { display: flex; gap: 14px; align-items: center; background: color-mix(in srgb, var(--card) 70%, transparent); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.how b { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 15px; }
.how strong { display: block; color: var(--ink); } .how span { color: var(--sub); font-size: 15px; }
.guide-link { display: inline-block; margin: 18px 0 6px; padding: 13px 20px; border-radius: 999px; background: var(--info-bg); color: var(--brand-2); font-weight: 800; text-decoration: none; }

/* 데스크톱: 좌측 메뉴 + 중앙 본문 */
@media (min-width: 960px) {
  body { display: grid; grid-template-columns: 1fr 232px minmax(0, 680px) 1fr; column-gap: 28px; align-content: start; padding-bottom: 48px; }
  .top { grid-column: 1 / -1; }
  main { grid-column: 3; width: 100%; padding-top: 40px; }
  body:has(#tabs[hidden]) main { grid-column: 1 / -1; }
  .tabs { position: sticky; grid-column: 2; grid-row: 2; top: 92px; align-self: start; flex-direction: column; margin-top: 48px; padding: 8px; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); backdrop-filter: none; }
  .tabs button { display: flex; align-items: center; gap: 12px; text-align: left; font-size: 16px; padding: 13px 16px; min-height: 54px; }
  .tabs button .ic { display: inline; font-size: 20px; }
  .toast { bottom: 40px; }
  .sheet-bg { align-items: center; } .sheet { border-radius: 24px; }
  h1 { font-size: 32px; }
}
@media (max-width: 380px) { .brand-t small, .help { display: none; } .row2 { gap: 8px; } h1 { font-size: 25px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

.row2 > div { min-width: 0; }
input[type=date], input[type=time] { min-width: 0; max-width: 100%; -webkit-appearance: none; appearance: none; display: block; text-align: left; }
.link { white-space: nowrap; }
@media (max-width: 520px) {
  .brand-t small { display: none; } .brand-t { font-size: 16px; }
  .help { font-size: 13px; padding: 7px 9px; } .who-name { max-width: 24vw; font-size: 14px; }
  .top-in { padding: 9px 12px; gap: 8px; } .link { padding: 8px 4px; font-size: 13px; }
}

/* ---- 비서 기능: 회의실, 참석자 확인, 수정·취소, 지난 일정 ---- */
.card.st-cancelled::before { background: #9aa3b5; } .card.st-cancelled { opacity: .78; }
.card.st-past::before { background: #9aa3b5; } .card.st-past { opacity: .85; }
.badge.cancelled, .badge.past { background: var(--soft); color: var(--sub); }
.actions.one { grid-template-columns: 1fr; }
.btn.danger { background: linear-gradient(180deg, #d4443a, #b02b22); }
.btn.danger-t { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.roombox { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; padding: 11px 13px; border-radius: 13px; font-size: 15px; }
.roombox.need { background: var(--warn-bg); color: var(--warn); } .roombox.ok { background: var(--ok-bg); color: var(--ok); }
.rb-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.mini { font: inherit; font-size: 13.5px; font-weight: 800; padding: 8px 12px; border-radius: 10px; border: 1.5px solid currentColor; background: transparent; color: inherit; cursor: pointer; text-decoration: none; min-height: 38px; display: inline-flex; align-items: center; }
.guide-box { margin-top: 14px; padding: 13px 15px; border-radius: 14px; background: var(--accent-soft); color: var(--ink); font-size: 15px; }
.guide-box ul { margin: 6px 0 0; padding-left: 20px; } .guide-box li { margin: 2px 0; }
.rec-note { margin-top: 10px; padding: 10px 13px; border-radius: 12px; background: var(--info-bg); color: var(--info); font-size: 15px; }
.chip.rec { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.who-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.who { display: inline-block; padding: 6px 12px; border-radius: 999px; font-size: 14.5px; font-weight: 700; }
.who.ok { background: var(--ok-bg); color: var(--ok); } .who.skip { background: var(--soft); color: var(--sub); }
.who.bad { display: block; width: 100%; border-radius: 12px; background: var(--bad-bg); color: var(--bad); font-weight: 800; }
.who-note { width: 100%; font-size: 14px; color: var(--warn); background: var(--warn-bg); padding: 8px 12px; border-radius: 10px; }
.extra { margin-top: 14px; } .extra summary { cursor: pointer; color: var(--brand-2); font-weight: 700; padding: 6px 0; }
.extra input, .extra textarea { margin-top: 8px; }
.wide-sheet { max-width: 620px; }
.btn.save { margin-top: 14px; }
@media (min-width: 960px) { .tabs button { font-size: 15.5px; } }
@media (max-width: 430px) { .help { font-size: 0; padding: 8px 12px; } .help::before { content: "▶ 영상"; font-size: 13px; } .who { flex-wrap: nowrap; white-space: nowrap; } .who-name { max-width: 30vw; } }
