:root {
  --sa-blue: #1a5fb4;
  --sa-bg: #f4f6f9;
  --sa-card: #fff;
  --sa-line: #e2e8f0;
  --sa-text: #1e293b;
  --sa-muted: #64748b;
}
* { box-sizing: border-box; }
body.sa-admin, body.sa-chat-page {
  margin: 0;
  font-family: "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
  background: var(--sa-bg);
  color: var(--sa-text);
}
.sa-admin-head { padding: 20px 16px 8px; max-width: 960px; margin: 0 auto; }
.sa-admin-head h1 { margin: 0 0 6px; font-size: 1.4rem; }
.sa-meta, .sa-hint { color: var(--sa-muted); font-size: .85rem; line-height: 1.5; }
.sa-card {
  background: var(--sa-card);
  border: 1px solid var(--sa-line);
  border-radius: 12px;
  padding: 16px;
  margin: 12px auto;
  max-width: 960px;
}
.sa-card h2 { margin: 0 0 12px; font-size: 1.05rem; }
.sa-btn {
  appearance: none; border: 0; background: var(--sa-blue); color: #fff;
  padding: 8px 14px; border-radius: 8px; cursor: pointer; font-weight: 600; margin: 4px 4px 4px 0;
}
.sa-btn-muted { background: #64748b; }
.sa-form label { display: block; margin: 8px 0; font-size: .9rem; }
.sa-form input[type=text], .sa-form input[type=search], .sa-form input:not([type]) {
  display: block; width: 100%; max-width: 420px; margin-top: 4px; padding: 8px 10px;
  border: 1px solid var(--sa-line); border-radius: 8px;
}
.sa-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.sa-table th, .sa-table td { border-bottom: 1px solid var(--sa-line); padding: 8px 6px; text-align: left; }
.sa-icon-preview { width: 48px; height: 48px; object-fit: cover; border-radius: 10px; vertical-align: middle; }

/* floating dock on main site */
.sa-dock {
  position: fixed; right: 14px; bottom: 70px; z-index: 99990;
  display: flex; flex-direction: column; gap: 8px; align-items: flex-end;
}
.sa-dock a, .sa-dock button {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--sa-blue); color: #fff; border: 0; border-radius: 999px;
  padding: 10px 14px; font-size: .85rem; font-weight: 600; text-decoration: none; cursor: pointer;
  box-shadow: 0 4px 16px rgba(26,95,180,.35);
}
.sa-dock .sa-install { background: #0f766e; display: none; }
.sa-dock .sa-install.show { display: inline-flex; }

/* beforeinstallprompt ?? ?? ?? (workhub ???) */
.sa-install-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 18px;
  z-index: 99995;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #0f172a;
  color: #f8fafc;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .35);
  max-width: 420px;
  margin: 0 auto;
  animation: sa-install-in .28s ease-out;
}
.sa-install-banner__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sa-install-banner__body strong {
  font-size: .92rem;
}
.sa-install-banner__body span {
  font-size: .78rem;
  color: #94a3b8;
  line-height: 1.35;
}
.sa-install-banner__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.sa-install-banner__yes {
  appearance: none;
  border: 0;
  background: #0f766e;
  color: #fff;
  font-weight: 700;
  font-size: .85rem;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
}
.sa-install-banner__no {
  appearance: none;
  border: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 1rem;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  cursor: pointer;
}
@keyframes sa-install-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 480px) {
  .sa-install-banner { bottom: 78px; }
}

/* ?? ??(??) ?? ? ??? ? ?? */
.sa-push-banner {
  border-color: #93c5fd;
  background: #eff6ff;
}
.sa-push-banner .sa-install-banner__yes {
  background: #1a5fb4;
}

/* chat */
.sa-chat-top {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  background: var(--sa-blue); color: #fff; position: sticky; top: 0; z-index: 5;
}
.sa-chat-top h1 { flex: 1; margin: 0; font-size: 1.05rem; }
.sa-back { color: #fff; text-decoration: none; font-size: 1.2rem; padding: 4px 8px; }
.sa-icon-btn { background: transparent; border: 0; color: #fff; font-size: 1.4rem; cursor: pointer; }
.sa-chat-layout { display: grid; grid-template-columns: 280px 1fr; min-height: calc(100vh - 48px); }
@media (max-width: 720px) {
  .sa-chat-layout { grid-template-columns: 1fr; }
  .sa-chat-rooms.hidden-mobile { display: none; }
  .sa-chat-main:not([hidden]) ~ .sa-chat-rooms { display: none; }
}
.sa-chat-rooms { border-right: 1px solid var(--sa-line); background: #fff; overflow: auto; max-height: calc(100vh - 48px); }
.sa-room {
  display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--sa-line);
  background: #fff; padding: 12px; cursor: pointer;
}
.sa-room.active { background: #eff6ff; }
.sa-room .name { font-weight: 600; }
.sa-room .prev { color: var(--sa-muted); font-size: .8rem; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sa-chat-main { display: flex; flex-direction: column; min-height: calc(100vh - 48px); background: #eef2f7; }
.sa-chat-main[hidden] { display: none !important; }
.sa-chat-msgs { flex: 1; overflow: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.sa-bubble { max-width: 78%; padding: 8px 12px; border-radius: 14px; background: #fff; align-self: flex-start; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.sa-bubble.me { align-self: flex-end; background: #dbeafe; }
.sa-bubble .who { font-size: .7rem; color: var(--sa-muted); margin-bottom: 2px; }
.sa-chat-compose { display: flex; gap: 8px; padding: 10px; background: #fff; border-top: 1px solid var(--sa-line); }
.sa-chat-compose input { flex: 1; border: 1px solid var(--sa-line); border-radius: 20px; padding: 10px 14px; }
.sa-chat-compose button { background: var(--sa-blue); color: #fff; border: 0; border-radius: 20px; padding: 0 16px; font-weight: 600; }
.sa-chat-empty { padding: 40px; text-align: center; color: var(--sa-muted); }
.sa-hits button { display: block; width: 100%; text-align: left; padding: 8px; border: 0; border-bottom: 1px solid var(--sa-line); background: #fff; cursor: pointer; }
dialog { border: 1px solid var(--sa-line); border-radius: 12px; padding: 16px; max-width: 420px; width: calc(100% - 24px); }

/* ????? ???? ? ????? ??? ???? */
.sa-ib-board-toolbar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin: 10px 0; padding: 10px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px;
}
.sa-ib-board-toolbar .form-control { display: inline-block; width: auto; min-width: 140px; }
.sa-ib-board-toolbar #saBoardFilter { min-width: 180px; max-width: 260px; }
.sa-ib-inline { display: inline-flex; align-items: center; gap: 4px; margin: 0; font-weight: normal; font-size: 12px; white-space: nowrap; }
.sa-ib-inline select.form-control { min-width: 72px; }
.sa-ib-sep { width: 1px; height: 20px; background: #cbd5e1; margin: 0 2px; }
.sa-ib-count { margin-left: auto; font-size: 12px; color: #64748b; }
.sa-ib-board-wrap { max-height: 480px; overflow: auto; border: 1px solid #e2e8f0; border-radius: 8px; }
.sa-ib-table { margin: 0; }
.sa-ib-table th { position: sticky; top: 0; background: #fff; z-index: 1; white-space: nowrap; }
.sa-ib-th-check label { font-weight: 600; margin: 0; cursor: pointer; }
.sa-ib-lvhint { display: inline-block; margin-left: 4px; font-size: 11px; color: #94a3b8; }
.sa-ib-minlevel { min-width: 88px; max-width: 110px; padding: 2px 4px; height: auto; }
.sa-ib-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.sa-ib-tab.is-active { font-weight: 700; }
.sa-ib-tab-panel[hidden] { display: none !important; }
.sa-ib-tab-panel { margin-top: 4px; }
