/* Shared workspace surfaces. All colors follow the selected application theme. */
:root {
  --surface-shadow: 0 6px 24px rgba(0, 0, 0, .1);
  --action-hover: #7062ee;
  --focus-ring: 0 0 0 3px var(--accent-soft);
}
:root[data-theme="light"] {
  --surface-shadow: 0 4px 20px rgba(35, 50, 85, .045);
  --action-hover: #4437b4;
}
body { font-size: 14px; line-height: 1.6; }
::selection { background: var(--accent-2); color: #fff; }
:where(a, button, input, select, textarea, summary):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
input::placeholder, textarea::placeholder { color: var(--dim); opacity: 1; }
button, a.btn, .menu a { -webkit-tap-highlight-color: transparent; transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease; }
.nav { background: linear-gradient(180deg, var(--bg-1), var(--bg)); }
.brand { gap: 10px; }
.brand-name { font-size: 15px; letter-spacing: -.3px; }
.brand-name small { font-size: 11px; letter-spacing: .6px; }
.brand .logo { width: 32px; height: 32px; }
.menu { padding: 16px 10px; gap: 4px; }
.menu a { min-height: 42px; padding: 10px 13px; border: 1px solid transparent; }
.menu a.active { border-color: color-mix(in srgb, var(--accent) 28%, transparent); }
.menu a.active::before { content: ""; position: absolute; left: -1px; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.menu a.active .lbl { font-weight: 600; }
.menu .count { min-width: 19px; line-height: 19px; text-align: center; }
.nav-foot { padding: 10px; }
.nav-toggle { color: var(--muted); }
.topbar { gap: 14px; padding-inline: 24px; }
.ws, .search { height: 40px; background: var(--bg-2); border-radius: 11px; }
.ws:hover { border-color: var(--line-2); }
.search { max-width: 600px; }
.search:focus-within { box-shadow: var(--focus-ring); }
.top-actions { gap: 6px; }
.top-actions .btn { min-height: 40px; padding-inline: 16px; }
.top-actions .icon-btn { width: 36px; height: 36px; }
.avatar { background: linear-gradient(140deg, #7468ee, #a456dd); }
.main { padding: 24px 28px 48px; }
.page-head { align-items: center; gap: 20px; margin-bottom: 22px; }
.page-head h1 { font-size: 24px; font-weight: 700; letter-spacing: -.5px; line-height: 1.35; }
.page-head .sub { margin-top: 6px; max-width: 760px; font-size: 13px; line-height: 1.65; }
.page-head .right { flex-shrink: 0; }
.tabs { gap: 8px; margin-bottom: 20px; }
.tabs a { padding: 10px 12px; font-size: 13px; }
.tabs a.active { color: var(--accent); font-weight: 650; }
.card, .sec, .kpi { box-shadow: var(--surface-shadow); }
.card h3 { font-size: 15px; margin: 0 0 12px; }
.btn { min-height: 36px; font-weight: 550; border-radius: 9px; justify-content: center; }
.btn.sm { min-height: 32px; font-size: 12px; padding: 6px 10px; }
.btn.primary { box-shadow: 0 3px 10px rgba(96, 85, 223, .17); }
.btn.primary:hover { background: var(--action-hover); border-color: var(--action-hover); color: #fff; }
.btn:disabled, .btn:disabled:hover { opacity: 1; background: var(--bg-3); border-color: var(--line); color: var(--dim); box-shadow: none; }
.badge { padding: 3px 9px; font-size: 11.5px; font-weight: 600; }
.chip { color: var(--muted); }
.chips button { min-height: 32px; }
.chips button b { color: inherit; opacity: 1; }
input[type=text], input[type=password], input[type=number], input[type=search], select, textarea { border-radius: 9px; }
textarea:focus, input:focus, select:focus { box-shadow: var(--focus-ring); }
.search input:focus { box-shadow: none; }
.warnbox { border: 1px solid color-mix(in srgb, var(--warn) 28%, transparent); font-size: 12.5px; line-height: 1.65; padding: 10px 13px; }
.hint { line-height: 1.7; }
.modal .box { border-radius: 18px; box-shadow: var(--pop-shadow); }
.toast { border-radius: 12px; max-width: min(560px, calc(100vw - 32px)); }
@media (max-width: 1180px) {
  .topbar { padding-inline: 20px; gap: 12px; }
  .top-actions { gap: 3px; }
  .top-actions .btn { padding-inline: 12px; }
  .ws { padding-inline: 10px; }
  .page-head { align-items: flex-start; }
  .page-head .right { flex-wrap: wrap; justify-content: flex-end; }
}
@media (max-width: 720px) {
  .main { padding: 18px 16px 32px; }
  .topbar { padding-inline: 12px; gap: 8px; }
  .ws { max-width: 150px; }
  .top-actions .avatar { display: none; }
  .page-head { flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
  .page-head h1 { font-size: 22px; }
  .page-head .right { margin-left: 0; justify-content: flex-start; }
}
@media (max-width: 560px) {
  .ws { height: 36px; max-width: 128px; font-size: 12px; }
  .search { min-width: 0; height: 36px; padding-inline: 8px; }
  .top-actions .btn { min-height: 36px; padding-inline: 10px; font-size: 12px; }
  .top-actions #bell, .top-actions #fbBtn, .top-actions #helpBtn { display: none; }
  .top-actions .icon-btn { width: 32px; height: 32px; }
}
@media (max-width: 440px) {
  .topbar .search { display: none; }
  .topbar .ws { max-width: none; flex: 1; }
  .topbar .ws-name { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  button, a.btn, .menu a, .theme-switching, .theme-switching * { transition: none !important; }
}
