/* Shared app shell: top bar + slide-in left navigation drawer.
   Injected by shell.js on links/calendar/admin pages (not login/setup). */
:root {
  --wt-bar-h: 52px;
  --wt-accent: #3f63e6;
  --wt-bar-bg: #ffffff;
  --wt-bar-fg: #1c2230;
  --wt-bar-muted: #6b7280;
  --wt-bar-border: #e3e7ee;
  --wt-drawer-bg: #ffffff;
  --wt-drawer-hover: #eef2ff;
  --wt-drawer-active: #e6ecff;
}
@media (prefers-color-scheme: dark) {
  :root {
    --wt-accent: #5b78f5;
    --wt-bar-bg: #141a26; --wt-bar-fg: #e7ebf3; --wt-bar-muted: #9aa3b2;
    --wt-bar-border: #263048; --wt-drawer-bg: #141a26;
    --wt-drawer-hover: #1d2640; --wt-drawer-active: #24325a;
  }
}

body.wt-has-shell { padding-top: var(--wt-bar-h); }
/* The shell's top bar replaces each page's own header.top (its buttons are
   relocated into .wt-actions by shell.js before this hides the empty header). */
body.wt-has-shell header.top { display: none !important; }

.wt-actions { display: flex; align-items: center; gap: 8px; }
.wt-actions button {
  height: 34px; padding: 0 12px; font-size: 13px; border-radius: 8px;
  border: 1px solid var(--wt-bar-border); background: transparent; color: var(--wt-bar-fg);
  cursor: pointer; white-space: nowrap;
}
.wt-actions button:hover { background: var(--wt-drawer-hover); }
/* Keep a primary-styled action visually primary in the bar. */
.wt-actions button.primary, .wt-actions button.btn.primary {
  background: var(--wt-accent); color: #fff; border-color: transparent;
}

.wt-bar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--wt-bar-h); z-index: 40;
  display: flex; align-items: center; gap: 12px; padding: 0 12px;
  background: var(--wt-bar-bg); color: var(--wt-bar-fg);
  border-bottom: 1px solid var(--wt-bar-border);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans KR", sans-serif;
}
.wt-burger {
  width: 38px; height: 38px; border: 0; border-radius: 9px; cursor: pointer;
  background: transparent; color: var(--wt-bar-fg); display: grid; place-items: center;
}
.wt-burger:hover { background: var(--wt-drawer-hover); }
.wt-burger svg { width: 20px; height: 20px; }
.wt-brand { display: flex; align-items: center; gap: 9px; font-weight: 650; font-size: 15px; letter-spacing: -0.01em; }
.wt-brand .wt-logo {
  width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--wt-accent), #7c5cff); color: #fff; font-size: 13px; font-weight: 700;
}
.wt-spacer { flex: 1; }
.wt-user { font-size: 13px; color: var(--wt-bar-muted); max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wt-logout {
  border: 1px solid var(--wt-bar-border); background: transparent; color: var(--wt-bar-fg);
  border-radius: 8px; padding: 6px 11px; font-size: 12.5px; cursor: pointer;
}
.wt-logout:hover { background: var(--wt-drawer-hover); }

.wt-backdrop {
  position: fixed; inset: 0; z-index: 45; background: rgba(15, 20, 32, 0.4);
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.wt-backdrop.on { opacity: 1; pointer-events: auto; }

.wt-drawer {
  position: fixed; top: 0; left: 0; bottom: 0; width: 240px; z-index: 46;
  background: var(--wt-drawer-bg); border-right: 1px solid var(--wt-bar-border);
  transform: translateX(-100%); transition: transform .22s ease;
  display: flex; flex-direction: column; padding: 10px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans KR", sans-serif;
}
.wt-drawer.on { transform: translateX(0); box-shadow: 4px 0 24px rgba(15, 20, 32, 0.18); }
.wt-drawer-head { display: flex; align-items: center; gap: 9px; padding: 8px 10px 14px; }
.wt-drawer-head .wt-logo { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: linear-gradient(135deg, var(--wt-accent), #7c5cff); color: #fff; font-weight: 700; }
.wt-drawer-head b { font-size: 15px; color: var(--wt-bar-fg); }
.wt-drawer-spacer { flex: 1; }
.wt-drawer-close {
  width: 32px; height: 32px; border: 0; border-radius: 8px; cursor: pointer;
  background: transparent; color: var(--wt-bar-muted); font-size: 22px; line-height: 1;
  display: grid; place-items: center;
}
.wt-drawer-close:hover { background: var(--wt-drawer-hover); color: var(--wt-bar-fg); }
.wt-nav { display: flex; flex-direction: column; gap: 2px; }
.wt-nav a {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 9px;
  color: var(--wt-bar-fg); text-decoration: none; font-size: 14px; font-weight: 500;
}
.wt-nav a:hover { background: var(--wt-drawer-hover); }
.wt-nav a.active { background: var(--wt-drawer-active); color: var(--wt-accent); font-weight: 650; }
.wt-nav a .wt-ico { width: 18px; text-align: center; }
.wt-nav .wt-sep { height: 1px; background: var(--wt-bar-border); margin: 8px 6px; }
.wt-nav a.wt-danger { color: #d1476b; }
