/* ============================================================
   Beacon — design tokens & component styles
   Tokens, base resets, animations and all hover/structural
   styling. Dynamic colors (status/type/priority/app/person)
   are applied inline from the components.
   ============================================================ */

:root {
  --bg: #faf7f4;
  --surface: #ffffff;
  --soft: #f5f1ec;
  --border: #ece6df;
  --line: #f0eae3;
  --text: #2b2723;
  --muted: #8d857b;
  --faint: #aaa295;
  --accent: #4f46e5;
  --accent-soft: #eef0fd;
  --accent-deep: #3730a3;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  background: var(--bg);
  color: var(--text);
}

::placeholder { color: #b8b0a6; }
input, textarea, select, button { font-family: inherit; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb {
  background: #ddd5cb; border-radius: 8px;
  border: 3px solid transparent; background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
  background: #ccc2b5; background-clip: padding-box; border: 3px solid transparent;
}

@keyframes beaconOverlay { from { opacity: 0; } to { opacity: 1; } }
@keyframes beaconDrawer { from { transform: translateX(24px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes beaconPop { from { transform: scale(.96) translateY(8px); opacity: 0; } to { transform: scale(1) translateY(0); opacity: 1; } }
@keyframes beaconFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* ---- app shell ---- */
.bk-app { min-height: 100vh; background: var(--bg); color: var(--text); display: flex; flex-direction: column; }
.bk-main { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.bk-spacer { flex: 1; }

/* ---- header ---- */
.bk-header {
  display: flex; align-items: center; gap: 18px; padding: 0 22px; height: 62px;
  background: var(--surface); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 30;
}
.bk-brand { display: flex; align-items: center; gap: 11px; }
.bk-logo {
  width: 30px; height: 30px; border-radius: 9px; background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(79,70,229,.32);
}
.bk-logo-dot { width: 11px; height: 11px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.35); }
.bk-wordmark { font-weight: 800; font-size: 18px; letter-spacing: -.02em; }

.bk-nav { display: flex; align-items: center; gap: 3px; background: var(--soft); padding: 4px; border-radius: 12px; }
.bk-tab {
  border: none; cursor: pointer; padding: 7px 14px; border-radius: 9px;
  font-size: 13.5px; font-weight: 600; transition: all .15s;
  display: flex; align-items: center; gap: 7px;
}

.bk-control { position: relative; display: flex; align-items: center; }
.bk-control .bk-ico-left { position: absolute; left: 11px; pointer-events: none; }
.bk-control .bk-ico-right { position: absolute; right: 10px; pointer-events: none; }
.bk-select {
  height: 38px; padding: 0 30px 0 32px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--soft); font-size: 13.5px; font-weight: 600; color: var(--text);
  cursor: pointer; outline: none; -webkit-appearance: none; appearance: none;
}
.bk-search {
  width: 190px; height: 38px; padding: 0 12px 0 32px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--soft); font-size: 13.5px; outline: none; color: var(--text);
}

.bk-btn-outline {
  height: 38px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--muted); font-size: 13.5px; font-weight: 600;
  cursor: pointer; display: flex; align-items: center; gap: 7px;
}
.bk-btn-outline:hover { background: var(--soft); }
.bk-btn-primary {
  height: 38px; padding: 0 16px; border-radius: 10px; border: none; background: var(--accent);
  color: #fff; font-size: 13.5px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; gap: 7px; box-shadow: 0 2px 10px rgba(79,70,229,.3);
}
.bk-btn-primary:hover { background: #4339d6; }

/* ---- type-filter chips ---- */
.bk-chip {
  height: 32px; padding: 0 13px; border-radius: 9px; font-size: 12.5px; font-weight: 600;
  cursor: pointer; transition: all .14s;
}

/* ---- board ---- */
.bk-board { display: flex; flex-direction: column; height: calc(100vh - 62px); }
.bk-board-toolbar { display: flex; align-items: center; gap: 10px; padding: 16px 22px 14px; }
.bk-chips-row { display: flex; align-items: center; gap: 6px; }
.bk-columns { flex: 1; min-height: 0; display: flex; gap: 16px; padding: 0 22px 22px; overflow-x: auto; }
.bk-column { flex: 1; min-width: 280px; display: flex; flex-direction: column; border-radius: 16px; transition: background .15s; }
.bk-col-head { display: flex; align-items: center; gap: 9px; padding: 6px 6px 12px; }
.bk-col-dot { width: 9px; height: 9px; border-radius: 50%; }
.bk-col-name { font-weight: 700; font-size: 13.5px; letter-spacing: .01em; }
.bk-col-count { font-size: 12px; font-weight: 600; color: var(--faint); background: var(--soft); padding: 1px 8px; border-radius: 20px; }
.bk-col-body { flex: 1; min-height: 60px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; padding: 2px; }
.bk-col-empty { font-size: 12.5px; color: var(--faint); text-align: center; padding: 18px 8px; font-weight: 500; }

/* ---- card ---- */
.bk-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 13px 13px 11px; cursor: grab; box-shadow: 0 1px 2px rgba(43,39,35,.04);
  transition: box-shadow .15s, transform .1s, border-color .15s;
}
.bk-card:hover { box-shadow: 0 6px 18px rgba(43,39,35,.1); transform: translateY(-1px); border-color: #ddd5cb; }
.bk-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }
.bk-badge {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; padding: 3px 8px; border-radius: 7px;
}
.bk-id { font-size: 11.5px; font-weight: 600; color: var(--faint); font-variant-numeric: tabular-nums; }
.bk-card-title { font-size: 14px; font-weight: 600; line-height: 1.4; color: var(--text); margin-bottom: 8px; text-wrap: pretty; }
.bk-app-row { display: flex; align-items: center; gap: 5px; margin-bottom: 10px; }
.bk-app-dot { width: 6px; height: 6px; border-radius: 2px; }
.bk-app-name { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.bk-card-foot { display: flex; align-items: center; gap: 8px; }
.bk-pri-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 7px; }
.bk-pri-dot { width: 6px; height: 6px; border-radius: 50%; }
.bk-comment-count { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; color: var(--faint); }
.bk-avatar { border-radius: 50%; color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.bk-avatar.bk-av-card { width: 25px; height: 25px; font-size: 10.5px; }
.bk-avatar.bk-av-row { width: 23px; height: 23px; font-size: 10px; }
.bk-avatar.bk-av-tl { width: 30px; height: 30px; font-size: 11px; }

/* ---- list ---- */
.bk-scroll { height: calc(100vh - 62px); overflow-y: auto; }
.bk-narrow { max-width: 1080px; margin: 0 auto; padding: 22px; }
.bk-list-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.bk-result-count { font-size: 12.5px; color: var(--faint); font-weight: 600; }
.bk-table { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; box-shadow: 0 1px 2px rgba(43,39,35,.04); }
.bk-grid { display: grid; grid-template-columns: 76px 1fr 132px 112px 92px 116px 66px; gap: 14px; }
.bk-thead {
  padding: 11px 18px; border-bottom: 1px solid var(--border); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em; color: var(--faint); background: var(--soft);
}
.bk-row { align-items: center; padding: 13px 18px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .12s; }
.bk-row:hover { background: var(--soft); }
.bk-cell-issue { min-width: 0; display: flex; align-items: center; gap: 9px; }
.bk-cell-issue .bk-tsq { width: 7px; height: 7px; border-radius: 2px; flex-shrink: 0; }
.bk-trunc { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.bk-cell-title { font-size: 13.5px; font-weight: 600; color: var(--text); }
.bk-cell-app { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.bk-cell-app .bk-app-dot { flex-shrink: 0; }
.bk-cell-app span.bk-app-name { font-size: 12.5px; }
.bk-status-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 7px; width: fit-content; }
.bk-pri-inline { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; }
.bk-cell-assignee { display: flex; align-items: center; gap: 7px; min-width: 0; }
.bk-cell-assignee .bk-name { font-size: 12.5px; color: var(--muted); }
.bk-age { font-size: 12px; color: var(--faint); text-align: right; font-weight: 500; }
.bk-empty { text-align: center; padding: 40px 0; color: var(--faint); font-size: 13.5px; font-weight: 500; }

/* ---- dashboard ---- */
.bk-dash-title { font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 4px; }
.bk-dash-sub { font-size: 13.5px; color: var(--muted); margin: 0 0 22px; }
.bk-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.bk-card-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 1px 2px rgba(43,39,35,.04); }
.bk-stat { padding: 18px; }
.bk-stat-head { display: flex; align-items: center; gap: 7px; margin-bottom: 12px; }
.bk-stat-dot { width: 8px; height: 8px; border-radius: 50%; }
.bk-stat-label { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.bk-stat-num { font-size: 34px; font-weight: 800; letter-spacing: -.03em; line-height: 1; color: var(--text); }
.bk-stat-sub { font-size: 12px; color: var(--faint); margin-top: 7px; font-weight: 500; }
.bk-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px; }
.bk-panel { padding: 20px; }
.bk-panel-title { font-size: 13.5px; font-weight: 700; margin-bottom: 18px; }
.bk-bars { display: flex; flex-direction: column; gap: 15px; }
.bk-bar-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.bk-bar-label { font-size: 13px; font-weight: 600; color: var(--text); }
.bk-bar-count { font-size: 12px; color: var(--faint); font-weight: 600; }
.bk-bar-track { height: 8px; border-radius: 6px; background: var(--soft); overflow: hidden; }
.bk-bar-fill { height: 100%; border-radius: 6px; }
.bk-recent { padding: 8px; }
.bk-recent-title { font-size: 13.5px; font-weight: 700; padding: 13px 14px 11px; }
.bk-recent-row { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 11px; cursor: pointer; transition: background .12s; }
.bk-recent-row:hover { background: var(--soft); }
.bk-recent-badge {
  display: inline-flex; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .03em; padding: 3px 8px; border-radius: 6px; min-width: 62px;
}
.bk-recent-name { font-size: 12px; color: var(--muted); font-weight: 500; }

/* ---- intake ---- */
.bk-intake { height: calc(100vh - 62px); overflow-y: auto; background: linear-gradient(180deg, #f4f1fb 0%, var(--bg) 240px); }
.bk-intake-inner { max-width: 560px; margin: 0 auto; padding: 40px 22px 60px; }
.bk-success {
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
  padding: 44px 36px; text-align: center; box-shadow: 0 8px 30px rgba(43,39,35,.06);
  animation: beaconPop .3s ease both;
}
.bk-success-ico { width: 58px; height: 58px; border-radius: 50%; background: #e3f5e8; display: flex; align-items: center; justify-content: center; margin: 0 auto 18px; }
.bk-success h2 { font-size: 21px; font-weight: 800; margin: 0 0 8px; letter-spacing: -.02em; }
.bk-success p { font-size: 14px; color: var(--muted); margin: 0 0 24px; line-height: 1.55; }
.bk-intake-head { text-align: center; margin-bottom: 26px; }
.bk-brand-pill { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--border); padding: 6px 14px 6px 8px; border-radius: 30px; margin-bottom: 18px; }
.bk-brand-pill .bk-mini { width: 22px; height: 22px; border-radius: 7px; background: var(--accent); display: flex; align-items: center; justify-content: center; }
.bk-brand-pill .bk-mini > span { width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.bk-brand-pill .bk-brand-text { font-size: 12.5px; font-weight: 700; color: var(--accent-deep); }
.bk-intake-head h1 { font-size: 25px; font-weight: 800; letter-spacing: -.025em; margin: 0 0 8px; }
.bk-intake-head p { font-size: 14.5px; color: var(--muted); margin: 0; line-height: 1.55; }
.bk-intake-card { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 28px; box-shadow: 0 8px 30px rgba(43,39,35,.06); }
.bk-type-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.bk-type-btn { height: 44px; border-radius: 11px; cursor: pointer; font-size: 13px; font-weight: 700; transition: all .14s; }
.bk-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bk-send { width: 100%; height: 48px; border-radius: 12px; border: none; cursor: pointer; font-size: 15px; font-weight: 700; transition: all .14s; color: #fff; }

/* shared form controls */
.bk-field { margin-bottom: 16px; }
.bk-flabel { display: block; font-size: 12.5px; font-weight: 700; color: var(--text); margin-bottom: 7px; }
.bk-input { width: 100%; height: 44px; padding: 0 13px; border-radius: 11px; border: 1px solid var(--border); background: var(--soft); font-size: 14px; outline: none; color: var(--text); }
.bk-textarea { width: 100%; padding: 12px 13px; border-radius: 11px; border: 1px solid var(--border); background: var(--soft); font-size: 14px; outline: none; resize: vertical; line-height: 1.5; color: var(--text); }
.bk-fselect { width: 100%; height: 44px; padding: 0 13px; border-radius: 11px; border: 1px solid var(--border); background: var(--soft); font-size: 14px; font-weight: 600; color: var(--text); cursor: pointer; outline: none; }

/* ---- drawer ---- */
.bk-overlay-wrap { position: fixed; inset: 0; z-index: 50; display: flex; justify-content: flex-end; }
.bk-scrim { position: absolute; inset: 0; background: rgba(43,39,35,.32); animation: beaconOverlay .2s ease both; }
.bk-drawer {
  position: relative; width: 480px; max-width: 92vw; height: 100%; background: var(--surface);
  box-shadow: -12px 0 40px rgba(43,39,35,.16); display: flex; flex-direction: column;
  animation: beaconDrawer .26s cubic-bezier(.22,1,.36,1) both;
}
.bk-drawer-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.bk-drawer-body { flex: 1; min-height: 0; overflow-y: auto; padding: 20px; }
.bk-drawer-foot { border-top: 1px solid var(--border); padding: 14px 20px; display: flex; gap: 10px; align-items: flex-end; background: var(--surface); }
.bk-close { width: 34px; height: 34px; border-radius: 9px; border: none; background: var(--soft); color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.bk-close:hover { background: var(--border); }
.bk-close.sm { width: 32px; height: 32px; }
.bk-drawer-title { font-size: 19px; font-weight: 700; line-height: 1.35; margin: 0 0 6px; letter-spacing: -.01em; text-wrap: pretty; }
.bk-drawer-meta { font-size: 12.5px; color: var(--faint); margin-bottom: 20px; }
.bk-section-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--faint); margin-bottom: 8px; }
.bk-dlabel { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--faint); margin-bottom: 6px; }
.bk-dselect { width: 100%; height: 40px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--soft); font-size: 13.5px; font-weight: 600; color: var(--text); cursor: pointer; outline: none; }
.bk-app-select-wrap { position: relative; }
.bk-app-select-wrap .bk-asdot { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 8px; height: 8px; border-radius: 2px; pointer-events: none; }
.bk-field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin-bottom: 22px; }
.bk-desc { font-size: 14px; line-height: 1.6; color: var(--text); margin: 0 0 20px; white-space: pre-wrap; text-wrap: pretty; }
.bk-steps { background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px; margin-bottom: 20px; }
.bk-step-line { font-size: 13.5px; line-height: 1.7; color: var(--text); }
.bk-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.bk-chip-static { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--soft); border: 1px solid var(--line); padding: 3px 10px; border-radius: 20px; }
.bk-attach-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.bk-add-link { font-size: 11.5px; font-weight: 700; color: var(--accent); background: none; border: none; cursor: pointer; padding: 2px 4px; }
.bk-attach-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.bk-attach { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--text); background: var(--soft); border: 1px solid var(--line); padding: 7px 11px; border-radius: 9px; text-decoration: none; }
.bk-attach:hover { background: var(--border); }
.bk-timeline { display: flex; flex-direction: column; gap: 14px; }
.bk-tl-item { display: flex; gap: 11px; }
.bk-tl-comment-body { flex: 1; min-width: 0; }
.bk-tl-comment-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.bk-tl-author { font-size: 13px; font-weight: 700; color: var(--text); }
.bk-tl-rel { font-size: 11.5px; color: var(--faint); }
.bk-tl-bubble { font-size: 13.5px; line-height: 1.55; color: var(--text); background: var(--soft); border-radius: 10px; padding: 9px 12px; text-wrap: pretty; }
.bk-tl-lognode { width: 30px; display: flex; justify-content: center; flex-shrink: 0; padding-top: 2px; }
.bk-tl-logdot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border); }
.bk-tl-logtext { font-size: 12.5px; color: var(--muted); padding-top: 1px; }
.bk-tl-logtext strong { font-weight: 600; color: var(--text); }
.bk-comment-input { flex: 1; min-height: 42px; max-height: 120px; padding: 11px 13px; border-radius: 11px; border: 1px solid var(--border); background: var(--soft); font-size: 13.5px; outline: none; resize: none; line-height: 1.45; color: var(--text); }
.bk-comment-send { height: 42px; padding: 0 16px; border-radius: 11px; border: none; background: var(--accent); color: #fff; font-size: 13.5px; font-weight: 700; cursor: pointer; flex-shrink: 0; }
.bk-comment-send:hover { background: #4339d6; }

/* ---- composer modal ---- */
.bk-modal-wrap { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-start; justify-content: center; padding: 48px 20px; overflow-y: auto; }
.bk-modal-scrim { position: absolute; inset: 0; background: rgba(43,39,35,.34); animation: beaconOverlay .2s ease both; }
.bk-modal { position: relative; width: 540px; max-width: 100%; background: var(--surface); border-radius: 20px; box-shadow: 0 20px 60px rgba(43,39,35,.24); animation: beaconPop .26s ease both; }
.bk-modal-head { display: flex; align-items: center; padding: 20px 22px 16px; }
.bk-modal-head h2 { font-size: 17px; font-weight: 800; letter-spacing: -.01em; margin: 0; }
.bk-modal-body { padding: 0 22px 8px; }
.bk-title-input { width: 100%; height: 46px; padding: 0 4px; border: none; border-bottom: 1.5px solid var(--border); background: transparent; font-size: 18px; font-weight: 700; outline: none; color: var(--text); margin-bottom: 18px; }
.bk-pick-row { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
.bk-type-pick { height: 34px; padding: 0 14px; border-radius: 9px; font-size: 12.5px; font-weight: 700; cursor: pointer; transition: all .14s; }
.bk-modal-foot { display: flex; align-items: center; gap: 10px; padding: 18px 22px; margin-top: 8px; border-top: 1px solid var(--line); }
.bk-cancel { height: 42px; padding: 0 18px; border-radius: 11px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: 13.5px; font-weight: 600; cursor: pointer; }
.bk-cancel:hover { background: var(--soft); }
.bk-create { height: 42px; padding: 0 20px; border-radius: 11px; border: none; color: #fff; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.bk-label-chip { font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: 20px; cursor: pointer; transition: all .12s; }
.bk-mb-13 { margin-bottom: 13px; }
.bk-mb-14 { margin-bottom: 14px; }
.bk-mb-16 { margin-bottom: 16px; }
.bk-mb-18 { margin-bottom: 18px; }
.bk-mb-22 { margin-bottom: 22px; }
.bk-mt-7 { margin-top: 7px; }
.bk-optional { color: var(--faint); font-weight: 500; }
.bk-visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
