/* ==========================================================================
   Showee OA · Design System v2
   Direction: neutral-first product UI (in the spirit of Linear / Vercel / Stripe).
   - Near-monochrome zinc neutrals carry the layout.
   - One accent (indigo) for actions, focus and selection only.
   - Green / amber / red are reserved for status meaning.
   - Hierarchy comes from type, spacing and hairline borders, not colored blocks.
   Shell and legacy component styles. Both shell and iframe load design-tokens.css.
   ========================================================================== */

/* ---------- Base ---------- */
[hidden] { display: none !important; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
body {
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  line-height: 1.55;
  letter-spacing: -.003em;
  background: var(--n-50);
  color: var(--n-900);
  font-feature-settings: "cv11" 1, "ss01" 1;
}
h1, h2, h3, h4 { color: var(--n-900); letter-spacing: -.015em; }
h3 { font-size: var(--fs-lg); font-weight: 600; }
h4 { font-size: var(--fs-md); font-weight: 600; }
strong, b { font-weight: 600; }
::selection { background: var(--accent-100); color: var(--accent-900); }
* { scrollbar-width: thin; scrollbar-color: var(--n-300) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--n-300); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
.muted { color: var(--n-500); }
td, .dashboard-metric-value, .metric strong { font-variant-numeric: tabular-nums; }

/* ---------- Buttons ---------- */
button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: var(--control-height); padding: 0 var(--space-3);
  border: 1px solid transparent;
  border-radius: var(--r-md);
  background: var(--accent-600);
  color: #fff;
  font-size: var(--fs-sm); font-weight: 500; line-height: 1.2;
  box-shadow: 0 1px 2px rgba(30, 27, 75, .14), inset 0 1px 0 rgba(255, 255, 255, .14);
  transition: background .15s var(--ease), border-color .15s var(--ease), box-shadow .15s var(--ease), color .15s var(--ease);
}
button:hover { background: var(--accent-700); }
button:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; box-shadow: var(--ring); }
button:active:not(:disabled) { transform: none; }
button svg { width: 16px; height: 16px; flex: none; }
button.secondary { background: var(--n-900); box-shadow: 0 1px 2px rgba(9, 9, 11, .2), inset 0 1px 0 rgba(255, 255, 255, .1); }
button.secondary:hover { background: var(--n-700); }
button.ghost {
  background: #fff; color: var(--n-700);
  border-color: var(--n-200);
  box-shadow: var(--shadow-xs);
}
button.ghost:hover { background: var(--n-50); border-color: var(--n-300); color: var(--n-900); }
button.danger { background: var(--red-700); }
button.danger:hover { background: #912018; }
button.icon-btn {
  width: 32px; height: 32px; min-height: 32px; padding: 0;
  background: transparent; color: var(--n-500); border-color: transparent; box-shadow: none;
  font-size: 18px;
}
button.icon-btn:hover { background: var(--n-100); color: var(--n-900); }
button.icon-btn svg { width: 17px; height: 17px; }
button:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- Form controls ---------- */
input, select, textarea {
  min-height: var(--control-height);
  border: 1px solid var(--n-200);
  border-radius: var(--r-md);
  padding: 7px 12px;
  background: #fff;
  color: var(--n-900);
  font-size: var(--fs-sm);
  box-shadow: var(--shadow-xs);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
textarea { line-height: 1.6; }
input::placeholder, textarea::placeholder { color: var(--n-400); }
input:hover, select:hover, textarea:hover { border-color: var(--n-300); }
input:focus, select:focus, textarea:focus,
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--accent-400); box-shadow: var(--ring); }
input[type="checkbox"], input[type="radio"] { min-height: 0; box-shadow: none; accent-color: var(--accent-600); }
select {
  appearance: none; -webkit-appearance: none;
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%2371717a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='m7 15 5 5 5-5M7 9l5-5 5 5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
select[multiple] { background-image: none; padding-right: 12px; }
label { gap: 6px; font-size: var(--fs-sm); font-weight: 500; color: var(--n-700); }

/* ---------- App shell ---------- */
.app { grid-template-columns: 248px minmax(0, 1fr); background: var(--n-50); }

.sidebar {
  background: var(--n-50);
  border-right: 1px solid var(--n-200);
  padding: 14px 12px 12px;
  gap: 12px;
  color: var(--n-700);
}
.brand { grid-template-columns: 32px minmax(0, 1fr) auto; gap: 10px; padding: 4px 6px; border-bottom: 0; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center;
  color: #fff;
  background: linear-gradient(140deg, #8b8ff8 0%, var(--accent-600) 55%, var(--accent-800) 100%);
  box-shadow: 0 1px 2px rgba(30, 27, 75, .3), inset 0 1px 0 rgba(255, 255, 255, .28);
}
.brand-copy { gap: 0; }
.brand strong { color: var(--n-900); font-size: var(--fs-md); font-weight: 600; letter-spacing: -.01em; line-height: 1.3; }
.brand-copy span { color: var(--n-500); font-size: var(--fs-xs); line-height: 1.3; }

.nav-search-region { display: grid; gap: 6px; }
.nav-search-region p:empty { display: none; }
.nav-search-region p { margin: 0 6px; color: var(--n-500); font-size: var(--fs-xs); }
.nav-search {
  position: relative; display: flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 8px 0 10px;
  border-radius: var(--r-md);
  background: #fff;
  border: 1px solid var(--n-200);
  box-shadow: var(--shadow-xs);
  color: var(--n-400);
  transition: border-color .15s, box-shadow .15s;
}
.nav-search:focus-within { border-color: var(--accent-400); box-shadow: var(--ring); }
.nav-search svg { width: 15px; height: 15px; flex: none; }
.nav-search input { min-height: 0; height: 100%; padding: 0; border: 0; background: transparent; box-shadow: none; font-size: var(--fs-sm); }
.nav-search input:focus { box-shadow: none; }
.nav-search::after {
  content: "/"; display: grid; place-items: center;
  min-width: 20px; height: 20px; padding: 0 5px;
  border: 1px solid var(--n-200); border-radius: 5px;
  background: var(--n-50); color: var(--n-500);
  font-size: var(--fs-2xs); font-weight: 500;
}
.nav-search:focus-within::after { display: none; }
.nav-search button { min-height: 0; width: 20px; height: 20px; padding: 0; border: 0; background: var(--n-200); color: var(--n-600); border-radius: 50%; box-shadow: none; font-size: 13px; }

#nav { margin: 0 -4px; padding: 2px 4px; }
.nav-group { gap: 1px; }
.nav-group + .nav-group { margin-top: 18px; }
.nav-group h3 { margin: 0 8px 6px; color: var(--n-400); font-size: var(--fs-2xs); font-weight: 500; letter-spacing: .02em; }
.nav-btn {
  min-height: 32px; padding: 0 8px; gap: 10px;
  background: transparent; color: var(--n-600);
  border: 1px solid transparent; border-radius: var(--r-sm);
  font-size: var(--fs-sm); font-weight: 500;
  box-shadow: none;
}
.nav-btn svg { width: 16px; height: 16px; color: var(--n-400); transition: color .15s; }
.nav-btn:hover { background: var(--n-150); color: var(--n-900); }
.nav-btn:hover svg { color: var(--n-600); }
.nav-btn.active { background: #fff; color: var(--n-900); border-color: var(--n-200); box-shadow: var(--shadow-xs); }
.nav-btn.active svg { color: var(--accent-600); }
.badge {
  min-width: 18px; height: 18px; padding: 0 5px;
  display: inline-grid; place-items: center;
  border-radius: var(--r-full);
  background: var(--accent-600); color: #fff;
  font-size: var(--fs-2xs); font-weight: 600; line-height: 1;
}

.sidebar-footer { gap: 2px; padding-top: 10px; border-top: 1px solid var(--n-200); }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 4px 8px 8px; min-width: 0; }
.sidebar-avatar {
  display: grid; place-items: center; flex: none;
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(140deg, var(--accent-100), var(--accent-200));
  color: var(--accent-800); font-size: var(--fs-xs); font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(81, 80, 216, .12);
}
.sidebar-user-text { display: grid; min-width: 0; line-height: 1.35; }
.sidebar-user-text b { color: var(--n-900); font-size: var(--fs-sm); font-weight: 600; }
.sidebar-user-text small { color: var(--n-500); font-size: var(--fs-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-footer button.ghost {
  justify-content: flex-start; gap: 10px; min-height: 32px; padding: 0 8px;
  background: transparent; border-color: transparent; box-shadow: none;
  color: var(--n-600); font-weight: 500;
}
.sidebar-footer button.ghost:hover { background: var(--n-150); color: var(--n-900); }
.sidebar-footer svg { width: 16px; height: 16px; color: var(--n-400); }

/* Top bar — slim, breadcrumb only */
.topbar {
  position: sticky; top: 0; z-index: 15;
  min-height: 56px; padding: 0 28px;
  background: rgba(255, 255, 255, .8);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--n-200);
}
.topbar-crumbs { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: var(--fs-sm); color: var(--n-500); }
.topbar-crumbs i { font-style: normal; color: var(--n-300); }
.topbar-crumbs b { color: var(--n-900); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-actions { gap: 6px; margin-left: auto; }
.topbar-actions button.secondary { min-height: 32px; background: #fff; color: var(--n-700); border-color: var(--n-200); box-shadow: var(--shadow-xs); }
.topbar-actions button.secondary:hover { background: var(--n-50); color: var(--n-900); }
.route-progress { position: sticky; top: 56px; z-index: 16; height: 2px; background: linear-gradient(90deg, var(--accent-400), var(--accent-600)); }

.page-container { width: 100%; max-width: 1360px; margin: 0 auto; padding: 36px 40px 72px; }
.page-heading { display: grid; gap: 6px; margin-bottom: 28px; }
.page-heading h2 { margin: 0; font-size: 28px; font-weight: 600; letter-spacing: -.025em; line-height: 1.2; }
.page-heading p { margin: 0; color: var(--n-500); font-size: var(--fs-md); }
.page-container:has(.dashboard-shell) .page-heading { display: none; }
#content { padding: 0; animation: oa-enter .3s var(--ease); }
@keyframes oa-enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Surfaces ---------- */
.panel, .card {
  background: #fff;
  border: 1px solid var(--n-200);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: var(--shadow-xs);
}
.metric strong { font-size: var(--fs-3xl); font-weight: 600; letter-spacing: -.03em; color: var(--n-900); }
.section-head { margin-bottom: 16px; }
.section-head h3, .section-head h4 { margin: 0; }
.section-head span { color: var(--n-500); font-size: var(--fs-sm); }
.info-block, .warning-block { border-radius: var(--r-md); }

/* Filter bar */
.toolbar { gap: 12px; align-items: flex-end; margin-bottom: 16px; padding: 0; background: transparent; border: 0; box-shadow: none; }
.toolbar label { min-width: 168px; color: var(--n-500); font-size: var(--fs-xs); }
.toolbar > button, .toolbar > .pill { align-self: flex-end; }
.toolbar > .pill { margin-left: auto; min-height: 36px; }

/* ---------- Tables ---------- */
.table-wrap { background: #fff; border: 1px solid var(--n-200); border-radius: var(--r-lg); box-shadow: var(--shadow-xs); }
table { border-collapse: separate; border-spacing: 0; }
th, td { padding: 14px 16px; border-bottom: 1px solid var(--n-150); font-size: var(--fs-sm); vertical-align: middle; color: var(--n-800); }
th {
  position: sticky; top: 0; z-index: 1;
  padding-top: 10px; padding-bottom: 10px;
  background: var(--n-50);
  color: var(--n-500);
  font-size: var(--fs-xs); font-weight: 500;
  border-bottom: 1px solid var(--n-200);
  white-space: nowrap;
}
th:first-child { border-top-left-radius: var(--r-lg); }
th:last-child { border-top-right-radius: var(--r-lg); }
tbody tr { transition: background .12s; }
tbody tr:hover td { background: var(--n-25); }
tbody tr:last-child td { border-bottom: 0; }
td .muted { font-size: var(--fs-xs); color: var(--n-500); }
td .actions { flex-wrap: nowrap; gap: 6px; }
td button { min-height: 30px; padding: 0 10px; font-size: var(--fs-xs); }

/* ---------- Status badges & pills ---------- */
.status {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 1px 8px 1px 7px;
  border: 1px solid var(--n-200);
  border-radius: var(--r-full);
  font-size: var(--fs-xs); font-weight: 500; line-height: 20px;
  background: var(--n-50); color: var(--n-600);
  white-space: nowrap;
}
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.status.approved, .status.feedback-closed, .status.inventory-completed, .status.supplier-active, .status.asset-in_use {
  background: var(--green-50); border-color: var(--green-200); color: var(--green-700);
}
.status.rejected, .status.supplier-rejected, .status.supplier-unarchived, .status.inventory-rejected, .status.asset-retired {
  background: var(--red-50); border-color: var(--red-200); color: var(--red-700);
}
.status.pending_manager, .status.pending_hr, .status.pending_finance, .status.pending_boss, .status.feedback-open,
.status.supplier-pending_procurement, .status.supplier-pending_boss, .status.asset-repair,
.status.inventory-pending_owner, .status.inventory-pending_quality, .status.inventory-pending_finance {
  background: var(--amber-50); border-color: var(--amber-200); color: var(--amber-700);
}
.status.feedback-processing { background: var(--accent-50); border-color: var(--accent-200); color: var(--accent-700); }
.status.cancelled { background: var(--n-50); border-color: var(--n-200); color: var(--n-500); }
.pill {
  min-height: 24px; padding: 0 9px;
  border-radius: var(--r-full);
  background: var(--n-100); color: var(--n-700);
  border: 1px solid var(--n-200);
  font-size: var(--fs-xs); font-weight: 500;
}
.pill.warn { background: var(--amber-50); color: var(--amber-700); border-color: var(--amber-200); }

/* ---------- Tabs (underline) ---------- */
.tabs { gap: 20px; padding: 0; margin-bottom: 20px; background: transparent; border-bottom: 1px solid var(--n-200); border-radius: 0; }
.tab {
  position: relative; min-height: 40px; padding: 0 2px;
  background: transparent; color: var(--n-500);
  border: 0; border-radius: 0; box-shadow: none;
  font-size: var(--fs-sm); font-weight: 500;
}
.tab:hover { background: transparent; color: var(--n-900); }
.tab.active { background: transparent; color: var(--n-900); border: 0; box-shadow: none; }
.tab.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px; background: var(--n-900); }

/* ---------- Empty state ---------- */
.empty-state { min-height: 320px; gap: 6px; }
.empty-state svg {
  width: 44px; height: 44px; padding: 11px; margin-bottom: 10px;
  border-radius: 12px;
  background: #fff; color: var(--n-500);
  border: 1px solid var(--n-200);
  box-shadow: var(--shadow-sm);
}
.empty-state h3 { font-size: var(--fs-lg); font-weight: 600; }
.empty-state p { color: var(--n-500); font-size: var(--fs-sm); max-width: 420px; }
.panel.muted { text-align: center; padding: 56px 24px; color: var(--n-400); }

/* ---------- Notifications ---------- */
.notification-item {
  position: relative; grid-template-columns: minmax(0, 1fr);
  padding: 14px 16px 14px 30px; gap: 4px;
  border: 1px solid var(--n-200); border-radius: var(--r-lg);
  background: #fff;
}
.notification-item.unread { border-left: 1px solid var(--n-200); background: #fff; }
.notification-item::before { content: ""; position: absolute; left: 14px; top: 21px; width: 7px; height: 7px; border-radius: 50%; background: var(--n-200); }
.notification-item.unread::before { background: var(--accent-500); box-shadow: 0 0 0 3px var(--accent-100); }
.notification-item b { font-size: var(--fs-sm); font-weight: 600; color: var(--n-900); }
.notification-item span { color: var(--n-400); font-size: var(--fs-xs); }
.notification-item p { color: var(--n-600); font-size: var(--fs-sm); }
.notification-item { display: flex; flex-wrap: wrap; align-items: center; column-gap: 6px; }
.notification-item > b, .notification-item > span, .notification-item > p { flex: 0 0 100%; }
.notification-item > p { margin-bottom: 6px; }
.notification-item button { min-height: 28px; padding: 0 10px; font-size: var(--fs-xs); }

/* ---------- Modal ---------- */
.modal { background: rgba(9, 9, 11, .4); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.modal-panel { border-radius: var(--r-xl); box-shadow: var(--shadow-lg); border: 1px solid var(--n-200); animation: oa-pop .2s var(--ease); }
@keyframes oa-pop { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
.modal-header { min-height: 60px; padding: 10px 14px 10px 24px; border-bottom: 1px solid var(--n-150); background: #fff; }
.modal-header h3 { font-size: var(--fs-lg); font-weight: 600; }
.modal-body { padding: 24px; }

/* ---------- Toast & update notice ---------- */
.toast { right: 24px; bottom: 24px; padding: 11px 16px; border-radius: var(--r-md); background: var(--n-900); color: #fff; font-size: var(--fs-sm); font-weight: 500; box-shadow: var(--shadow-lg); }
.app-update-notice { border-radius: var(--r-lg); box-shadow: var(--shadow-lg); border: 1px solid var(--n-200); }

/* ---------- Login ---------- */
.login-view {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(460px, 560px);
  place-items: stretch; padding: 0;
  min-height: 100vh; min-height: 100dvh;
  background: #fff;
}
.login-view.hidden { display: none !important; }
.login-hero {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column;
  margin: 12px 0 12px 12px; padding: 40px 48px;
  border-radius: 20px;
  color: #fff;
  background: #120f3a;
}
.login-mesh {
  position: absolute; inset: -20%; z-index: -1;
  background:
    radial-gradient(40% 45% at 18% 22%, rgba(99, 102, 241, .95), transparent 70%),
    radial-gradient(38% 42% at 82% 18%, rgba(168, 85, 247, .75), transparent 70%),
    radial-gradient(45% 50% at 70% 85%, rgba(14, 165, 233, .65), transparent 70%),
    radial-gradient(35% 40% at 25% 90%, rgba(236, 72, 153, .45), transparent 70%),
    linear-gradient(160deg, #1e1b4b, #0f0c29);
  filter: blur(40px) saturate(120%);
  animation: oa-mesh 18s ease-in-out infinite alternate;
}
@keyframes oa-mesh { from { transform: translate3d(0, 0, 0) rotate(0deg); } to { transform: translate3d(-3%, 2%, 0) rotate(6deg); } }
.login-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, .18) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, transparent, #000 40%, transparent);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 40%, transparent);
  opacity: .35;
}
.login-hero-brand { display: flex; align-items: center; gap: 10px; font-size: var(--fs-md); font-weight: 600; }
.brand-mark.showee-brand-mark { width: 32px; height: 32px; overflow: hidden; background: #fff; box-shadow: none; border: 1px solid var(--n-200); }
.showee-brand-mark img { display: block; width: 100%; height: 100%; object-fit: contain; }
.login-hero-brand .showee-brand-mark { border-color: rgba(255, 255, 255, .7); }
.login-hero-copy { margin-top: auto; max-width: 520px; }
.login-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 12px; margin-bottom: 20px;
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18);
  color: rgba(255, 255, 255, .85); font-size: var(--fs-xs); font-weight: 500;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.login-hero-copy h2 { margin: 0 0 16px; color: #fff; font-size: 44px; font-weight: 600; line-height: 1.18; letter-spacing: -.03em; }
.login-hero-copy p { margin: 0; color: rgba(255, 255, 255, .72); font-size: var(--fs-lg); line-height: 1.7; }
.login-preview { position: relative; display: flex; align-items: flex-end; gap: 16px; margin-top: 40px; }
.login-preview-card, .login-preview-stat {
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: 0 20px 40px -16px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .15);
  -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%);
}
.login-preview-card { width: 300px; padding: 16px; }
.login-preview-card header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: var(--fs-sm); color: rgba(255, 255, 255, .75); }
.login-preview-card header b { font-size: var(--fs-xl); color: #fff; }
.login-preview-card ul { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.login-preview-card li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-md); background: rgba(255, 255, 255, .06); font-size: var(--fs-sm); }
.login-preview-card li span { flex: 1; color: rgba(255, 255, 255, .9); }
.login-preview-card li em { font-style: normal; color: rgba(255, 255, 255, .65); font-size: var(--fs-xs); }
.login-preview .dot { width: 7px; height: 7px; border-radius: 50%; }
.login-preview .dot.amber { background: #fbbf24; }
.login-preview .dot.indigo { background: #a5b4fc; }
.login-preview .dot.green { background: #4ade80; }
.login-preview-stat { display: grid; gap: 2px; padding: 14px 18px; margin-bottom: 18px; }
.login-preview-stat small { color: rgba(255, 255, 255, .65); font-size: var(--fs-xs); }
.login-preview-stat b { font-size: var(--fs-2xl); letter-spacing: -.02em; }
.login-preview-stat span { color: #86efac; font-size: var(--fs-xs); font-weight: 500; }

.login-main { display: grid; place-items: center; padding: 48px 32px; background: #fff; }
.login-panel { width: min(360px, 100%); padding: 0; gap: 16px; background: transparent; border: 0; box-shadow: none; border-radius: 0; }
.login-panel h1 { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 28px; font-weight: 600; letter-spacing: -.025em; }
.login-brand-logo { display: block; flex: none; width: 44px; height: 44px; object-fit: contain; }
.login-panel p { margin: -8px 0 12px; color: var(--n-500); font-size: var(--fs-md); }
.login-panel label { color: var(--n-700); }
.login-panel input { min-height: 42px; font-size: var(--fs-md); }
.login-panel button[type="submit"] { min-height: 42px; margin-top: 8px; font-size: var(--fs-md); }
.login-panel small { color: var(--n-400); font-size: var(--fs-xs); line-height: 1.7; padding-top: 18px; margin-top: 4px; border-top: 1px solid var(--n-150); }
.login-panel .login-recovery-button { color: var(--n-600); border-color: transparent; box-shadow: none; font-size: var(--fs-sm); }
.login-panel .login-recovery-button:hover { background: var(--n-100); }

/* ---------- Dashboard ---------- */
.dashboard-shell { display: grid; gap: 24px; }
.dashboard-welcome { display: grid; gap: 6px; padding: 0; background: none; border: 0; min-height: 0; }
.dashboard-welcome p { margin: 0; font-size: 28px; font-weight: 600; letter-spacing: -.025em; color: var(--n-900); line-height: 1.2; }
.dashboard-welcome strong { font-weight: 600; }
.dashboard-welcome time { color: var(--n-500); font-size: var(--fs-md); }

/* Stripe-style connected KPI strip */
.dashboard-metric-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0;
  background: #fff;
  border: 1px solid var(--n-200);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}
.dashboard-metric {
  position: relative;
  display: grid; gap: 8px; align-content: start; justify-content: stretch; justify-items: start;
  min-height: 0; padding: 20px 22px;
  text-align: left;
  background: transparent; color: var(--n-900);
  border: 0; border-radius: 0; box-shadow: none;
}
.dashboard-metric + .dashboard-metric { border-left: 1px solid var(--n-150); }
button.dashboard-metric:hover { background: var(--n-25); }
.dashboard-metric-label { display: flex; align-items: center; gap: 8px; width: 100%; color: var(--n-500); font-size: var(--fs-sm); font-weight: 500; }
.dashboard-metric-label > svg:first-child { width: 15px; height: 15px; color: var(--n-400); }
.dashboard-metric.attention .dashboard-metric-label > svg:first-child { color: var(--amber-500); }
.dashboard-metric-label > span { flex: 1; }
.dashboard-metric-arrow { width: 15px; height: 15px; color: var(--n-300); opacity: 0; transition: opacity .15s, transform .15s; }
button.dashboard-metric:hover .dashboard-metric-arrow { opacity: 1; color: var(--n-600); transform: translateX(2px); }
.dashboard-metric-value { display: flex; align-items: baseline; gap: 4px; }
.dashboard-metric-value strong { font-size: 32px; font-weight: 600; letter-spacing: -.035em; line-height: 1.1; color: var(--n-900); }
.dashboard-metric-value span { color: var(--n-400); font-size: var(--fs-sm); }
.dashboard-metric-hint { color: var(--n-400); font-size: var(--fs-xs); }

.dashboard-columns { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr); gap: 24px; align-items: start; }
.dashboard-primary { display: grid; gap: 24px; }
.dashboard-panel { padding: 0; overflow: hidden; }
.dashboard-panel > :not(.dashboard-panel-head) { margin-left: 20px; margin-right: 20px; }
.dashboard-panel > :last-child { margin-bottom: 20px; }
.dashboard-panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 52px; padding: 0 12px 0 20px; margin-bottom: 16px;
  border-bottom: 1px solid var(--n-150);
}
.dashboard-panel-head h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: var(--fs-md); font-weight: 600; }
.dashboard-panel-head > span { color: var(--n-400); font-size: var(--fs-xs); padding-right: 8px; }
.dashboard-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-full); background: var(--accent-50); color: var(--accent-700); border: 1px solid var(--accent-100); font-size: var(--fs-2xs); font-weight: 600; }
.dashboard-text-link { min-height: 30px; padding: 0 8px; background: transparent; border-color: transparent; color: var(--n-600); box-shadow: none; font-size: var(--fs-xs); }
.dashboard-text-link:hover { background: var(--n-100); color: var(--n-900); }
.dashboard-text-link svg { width: 14px; height: 14px; }

.dashboard-shortcuts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.dashboard-shortcuts button {
  flex-direction: row; justify-content: flex-start; gap: 12px;
  min-height: 56px; padding: 0 12px;
  background: #fff; color: var(--n-800);
  border: 1px solid var(--n-150); border-radius: var(--r-md);
  box-shadow: none; font-size: var(--fs-sm); font-weight: 500;
}
.dashboard-shortcuts button svg {
  width: 32px; height: 32px; padding: 8px; flex: none;
  border-radius: 8px; background: var(--accent-50); color: var(--accent-600);
  transition: background .15s, color .15s;
}
.dashboard-shortcuts button:hover { background: var(--n-25); border-color: var(--n-200); color: var(--n-900); box-shadow: var(--shadow-sm); }
.dashboard-shortcuts button:hover svg { background: var(--accent-600); color: #fff; }

.dashboard-distribution-summary { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 12px; color: var(--n-500); font-size: var(--fs-sm); }
.dashboard-distribution-summary strong, .dashboard-distribution-summary b { color: var(--n-900); font-size: var(--fs-lg); font-weight: 600; }
.dashboard-distribution { display: flex; gap: 2px; height: 8px; margin-bottom: 20px; border-radius: var(--r-full); overflow: hidden; background: var(--n-100); }
.dashboard-distribution span { height: 100%; }
.dashboard-distribution-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 28px; margin: 0; padding: 0; list-style: none; }
.dashboard-distribution-label { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; font-size: var(--fs-sm); color: var(--n-600); }
.dashboard-distribution-label > span:first-child { display: flex; align-items: center; gap: 8px; }
.dashboard-distribution-label b { color: var(--n-900); }
.dashboard-distribution-label small { color: var(--n-400); margin-left: 4px; }
.dashboard-status-dot { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.dashboard-progress { height: 4px; border-radius: var(--r-full); background: var(--n-100); overflow: hidden; }
.dashboard-progress span { display: block; height: 100%; border-radius: inherit; }
.dashboard-distribution .pending, .dashboard-status-dot.pending, .dashboard-progress.pending span { background: var(--amber-500); }
.dashboard-distribution .approved, .dashboard-status-dot.approved, .dashboard-progress.approved span { background: var(--green-500); }
.dashboard-distribution .rejected, .dashboard-status-dot.rejected, .dashboard-progress.rejected span { background: var(--red-500); }
.dashboard-distribution .cancelled, .dashboard-status-dot.cancelled, .dashboard-progress.cancelled span { background: var(--n-300); }
.dashboard-distribution .other, .dashboard-status-dot.other, .dashboard-progress.other span { background: var(--accent-400); }

.dashboard-notification-list { display: grid; gap: 0; }
.dashboard-notifications .dashboard-notification-list { margin-left: 0; margin-right: 0; }
.dashboard-notifications .notification-item { border: 0; border-radius: 0; padding: 14px 20px 14px 36px; }
.dashboard-notifications .notification-item + .notification-item { border-top: 1px solid var(--n-150); }
.dashboard-notifications .notification-item::before { left: 20px; }
.dashboard-notifications .notification-item:hover { background: var(--n-25); }
.dashboard-notifications .dashboard-panel-head { margin-bottom: 0; }
.dashboard-list-note { margin-top: 12px; color: var(--n-400); font-size: var(--fs-xs); text-align: center; }
.dashboard-empty { display: flex; align-items: center; gap: 14px; padding: 20px; border-radius: var(--r-md); background: var(--n-25); border: 1px dashed var(--n-200); }
.dashboard-notifications .dashboard-empty { margin-top: 16px; }
.dashboard-empty svg { width: 36px; height: 36px; padding: 9px; flex: none; border-radius: 10px; background: #fff; color: var(--n-400); border: 1px solid var(--n-200); }
.dashboard-empty strong { font-size: var(--fs-sm); }
.dashboard-empty p { margin: 2px 0 0; color: var(--n-500); font-size: var(--fs-xs); }

.cloud-preview-entry { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-radius: var(--r-lg); background: #fff; border: 1px solid var(--n-200); box-shadow: var(--shadow-xs); }
.cloud-preview-entry > span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--accent-50); color: var(--accent-600); font-size: 18px; }
.cloud-preview-entry div { flex: 1; }
.cloud-preview-entry h3, .cloud-preview-entry p { margin: 0; }
.cloud-preview-entry h3 { font-size: var(--fs-md); }
.cloud-preview-entry p { color: var(--n-500); font-size: var(--fs-sm); }

/* ---------- Responsive ---------- */
@media (min-width: 861px) {
  .sidebar { position: sticky; top: 0; height: 100vh; }
}
@media (max-width: 1240px) {
  .dashboard-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-metric:nth-child(3) { border-left: 0; }
  .dashboard-metric:nth-child(n+3) { border-top: 1px solid var(--n-150); }
  .dashboard-columns { grid-template-columns: minmax(0, 1fr); }
  .dashboard-shortcuts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1080px) {
  .login-view { grid-template-columns: minmax(0, 1fr); }
  .login-hero { display: none; }
}
@media (max-width: 860px) {
  .sidebar { background: var(--n-50); border-right: 1px solid var(--n-200); }
  .topbar { min-height: 52px; padding: 0 12px; gap: 8px; }
  .route-progress { top: 52px; }
  .page-container { padding: 20px 16px calc(var(--mobile-nav-height, 64px) + 28px); }
  .page-heading { margin-bottom: 18px; }
  .page-heading h2 { font-size: var(--fs-2xl); }
  .dashboard-welcome p { font-size: var(--fs-2xl); }
  .dashboard-metric { padding: 16px; }
  .dashboard-metric-value strong { font-size: 26px; }
  .dashboard-shortcuts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-distribution-list { grid-template-columns: minmax(0, 1fr); }
  .bottom-nav { background: rgba(255, 255, 255, .88); -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px); border-top: 1px solid var(--n-200); }
  .bottom-nav-btn { box-shadow: none; border-color: transparent; }
  .bottom-nav-btn.active { color: var(--accent-600); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ==========================================================================
   Page rhythm & hierarchy
   Fixes the crowding found across module pages:
   1. sections sat 9–18px apart        → one vertical rhythm (28px between sections)
   2. every section was a tinted box with a colored left bar → plain surfaces, one emphasis per page
   3. KPI tiles were separate bordered cards → one connected stat strip
   4. module headers repeated the page title → duplicates hidden
   5. forms stretched to full width with boxes nested in boxes → readable form width, flat inner blocks
   ========================================================================== */

/* 1 · Vertical rhythm */
#content > [class*="-shell"], #content > .notification-center, #content > .inventory-workspace,
#content > .organization-chart-page, .copilot-layout, .help-layout { row-gap: 28px; }
#content > [class*="-shell"] > .toolbar, .notification-center > .toolbar { margin-bottom: 0; }
#content > :not(:last-child) { margin-bottom: 28px; }
#content > [class*="-shell"] > *, #content > .notification-center > * { margin-bottom: 0; }
.copilot-side { gap: 20px; }
.section-head, .copilot-section-head, .governance-section-head { margin-bottom: 16px; }

/* 2 · Calm surfaces: no colored side bars, no tinted section backgrounds */
.copilot-brief-band, .business-pricing, .business-situation, .meals-policy, .governance-live-state,
.overtime-attendance-evidence, .help-step-result, .feedback-card.anonymous, .vendor-benefit-card,
.project-task-card, .project-person-row, .governance-evidence > div, .org-detail-metrics span, .inventory-note {
  border-left-width: 1px; border-left-color: var(--n-200);
}
.copilot-brief-band {
  background: #fff; border: 1px solid var(--n-200); border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs); padding: 28px 32px;
}
.copilot-brief-band h2 { font-size: var(--fs-xl); letter-spacing: -.02em; }
.business-pricing {
  border: 0; border-radius: var(--r-md);
  background: var(--n-100); color: var(--n-600); padding: 12px 16px;
}
.business-pricing b { color: var(--n-900); }
.help-search-band { background: #fff; border-color: var(--n-200); box-shadow: var(--shadow-xs); }
.copilot-privacy { background: transparent; border: 0; padding: 0 4px; color: var(--n-500); }
/* Risk/urgency stays visible as a small marker instead of a thick bar */
.copilot-item.urgent, .copilot-item.high, .governance-task.overdue, .business-account.is-due, .project-card.at-risk {
  border-left-width: 1px; border-left-color: var(--n-200);
}
.copilot-items > .copilot-item + .copilot-item { border-top: 1px solid var(--n-150); }
.copilot-item { padding: 20px 24px; }

/* 3 · Connected stat strips (1px gaps over a hairline-colored track) */
.copilot-metrics, .governance-metrics, .business-metrics, .inventory-metrics, .project-metrics,
.vendor-benefit-metrics, .content-digest-metrics, .grid.cols-4:has(> .metric) {
  gap: 1px !important;
  padding: 0; overflow: hidden;
  background: var(--n-150);
  border: 1px solid var(--n-200); border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
}
.copilot-metrics > *, .governance-metrics > *, .business-metrics > *, .inventory-metrics > *, .project-metrics > *,
.vendor-benefit-metrics > *, .content-digest-metrics > *, .grid.cols-4:has(> .metric) > * {
  margin: 0; border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
  background: #fff; min-height: 0;
}
.copilot-metrics > button:hover, .governance-metrics > button:hover, .business-metrics > button:hover { background: var(--n-25); }
.business-metric { padding: 16px 18px; justify-items: start; text-align: left; }
.business-metric.due { background: #fff !important; }
.business-metric.due b { color: var(--red-700); }
.copilot-metric { padding: 18px 20px; }
.governance-metrics .metric, .inventory-metrics .metric, .grid.cols-4 > .metric { padding: 18px 20px; justify-content: flex-start; text-align: left; }
.metric strong { font-size: var(--fs-2xl); }

/* 4 · No duplicate titles under the page heading */
.governance-head > div:first-child { display: none; }
.governance-head { justify-content: flex-end; min-height: 0; margin-top: -8px; }
.notification-center-head { background: transparent; border: 0; box-shadow: none; padding: 0; }
.notification-center-head h3 { display: none; }
.notification-center-head p { margin: 0; color: var(--n-500); }
.page-heading p:empty { display: none; }

/* Lists read as one surface instead of a stack of cards */
.notification-list {
  gap: 0; overflow: hidden;
  background: #fff; border: 1px solid var(--n-200); border-radius: var(--r-lg); box-shadow: var(--shadow-xs);
}
.notification-list > .notification-item { border: 0; border-radius: 0; padding: 16px 20px 16px 38px; }
.notification-list > .notification-item + .notification-item { border-top: 1px solid var(--n-150); }
.notification-list > .notification-item::before { left: 20px; top: 23px; }
.notification-list > .notification-item:hover { background: var(--n-25); box-shadow: none; }

/* 5 · Forms: comfortable width, flat inner blocks */
#content > .panel:has(> form.form-grid), #content > .panel:has(> form > .form-grid) { max-width: 880px; padding: 32px; }
.form-grid { gap: 20px 20px; }
.panel .info-block, .card .info-block, .panel .warning-block {
  border: 0; border-radius: var(--r-md);
  background: var(--n-50); padding: 16px 18px;
}
.panel .info-block p { color: var(--n-600); line-height: 1.7; }
.panel .panel, .panel .card, .card .card { box-shadow: none; }
.form-grid > .actions { padding-top: 8px; border-top: 1px solid var(--n-150); margin-top: 4px; padding-top: 20px; }

/* Segmented controls used by several modules */
.segmented, .governance-tabs {
  display: inline-flex; gap: 2px; padding: 3px;
  background: var(--n-100); border: 0; border-radius: var(--r-md);
}
.segmented > button, .governance-tabs > button {
  min-height: 30px; padding: 0 12px;
  background: transparent; color: var(--n-600);
  border: 0; border-radius: var(--r-sm); box-shadow: none;
  font-size: var(--fs-sm); font-weight: 500;
}
.segmented > button:hover, .governance-tabs > button:hover { background: rgba(255, 255, 255, .6); color: var(--n-900); }
.segmented > button.active, .governance-tabs > button.active { background: #fff; color: var(--n-900); box-shadow: var(--shadow-sm); }

@media (max-width: 860px) {
  #content > [class*="-shell"], #content > .notification-center, .copilot-layout, .help-layout { row-gap: 20px; }
  #content > :not(:last-child) { margin-bottom: 20px; }
  #content > .panel:has(> form.form-grid) { padding: 20px; }
}

/* Stat strips: draw dividers with outset left/top hairlines clipped by the container,
   so trailing empty cells stay white instead of showing the track color. */
.copilot-metrics, .governance-metrics, .business-metrics, .inventory-metrics, .project-metrics,
.vendor-benefit-metrics, .content-digest-metrics, .grid.cols-4:has(> .metric) { gap: 0 !important; background: #fff; }
.copilot-metrics > *, .governance-metrics > *, .business-metrics > *, .inventory-metrics > *, .project-metrics > *,
.vendor-benefit-metrics > *, .content-digest-metrics > *, .grid.cols-4:has(> .metric) > * {
  box-shadow: -1px 0 0 var(--n-150), 0 -1px 0 var(--n-150) !important;
}
.panel .form-grid > .info-block, .panel form > .info-block { border: 0; background: var(--n-50); }
.copilot-work-list .copilot-section-head { margin-bottom: 0; }
/* Module rules color every <span> in a header muted; button labels must keep the button color. */
.help-results-head button span, .help-management-head button span, .section-head button span { color: inherit; }

/* ==========================================================================
   AI 工作台 (copilot) — restructured page
   ========================================================================== */
.cp-page { display: grid; gap: 28px; }
.cp-hero {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px 32px; align-items: start;
  padding: 28px 28px 0; overflow: hidden;
  background: #fff; border: 1px solid var(--n-200); border-radius: var(--r-xl); box-shadow: var(--shadow-xs);
}
.cp-eyebrow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--accent-700); font-size: var(--fs-xs); font-weight: 600; }
.cp-eyebrow svg { width: 14px; height: 14px; }
.cp-eyebrow em { font-style: normal; font-weight: 400; color: var(--n-400); margin-left: 6px; }
.cp-hero h2 { margin: 10px 0 6px; font-size: var(--fs-2xl); font-weight: 600; letter-spacing: -.025em; line-height: 1.3; }
.cp-hero-main p { margin: 0; color: var(--n-600); font-size: var(--fs-md); max-width: 680px; }
.cp-hero-actions { display: flex; align-items: center; gap: 8px; }
.cp-ai-state { display: inline-flex; align-items: center; gap: 6px; margin-right: 4px; color: var(--n-500); font-size: var(--fs-xs); white-space: nowrap; cursor: help; }
.cp-ai-state i { width: 7px; height: 7px; border-radius: 50%; background: var(--n-300); }
.cp-ai-state.ready i { background: var(--green-500); box-shadow: 0 0 0 3px var(--green-50); }
.cp-ai-state.off i { background: var(--amber-500); box-shadow: 0 0 0 3px var(--amber-50); }
.cp-stats {
  grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 4px -28px 0; border-top: 1px solid var(--n-150); background: var(--n-25);
}
.cp-stat {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px;
  min-height: 64px; padding: 0 24px;
  background: transparent; color: var(--n-600); border: 0; border-radius: 0; box-shadow: none;
  font-size: var(--fs-sm); font-weight: 500; text-align: left;
}
.cp-stat + .cp-stat { border-left: 1px solid var(--n-150); }
.cp-stat:hover { background: #fff; color: var(--n-900); }
.cp-stat svg { width: 16px; height: 16px; color: var(--n-400); }
.cp-stat b { font-size: var(--fs-xl); font-weight: 600; color: var(--n-900); letter-spacing: -.02em; }
.cp-stat.attention svg, .cp-stat.attention b { color: var(--amber-700); }
.cp-stat.risk svg, .cp-stat.risk b { color: var(--red-700); }

.cp-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
.cp-work { display: grid; gap: 20px; }
.cp-work-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.cp-work-head h3 { margin: 0; font-size: var(--fs-lg); }
.cp-work-head span { color: var(--n-400); font-size: var(--fs-xs); }
.cp-group h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; color: var(--n-600); font-size: var(--fs-xs); font-weight: 600; }
.cp-group h4 i { width: 8px; height: 8px; border-radius: 2px; background: var(--n-300); }
.cp-group.urgent h4 i { background: var(--red-500); }
.cp-group.high h4 i { background: var(--amber-500); }
.cp-group.ai h4 i { background: var(--accent-500); }
.cp-group h4 small { color: var(--n-400); font-weight: 500; }
.cp-rows { overflow: hidden; background: #fff; border: 1px solid var(--n-200); border-radius: var(--r-lg); box-shadow: var(--shadow-xs); }
.cp-row {
  display: grid; grid-template-columns: 36px minmax(0, 1fr) auto auto 16px; align-items: center; gap: 16px;
  padding: 14px 18px; cursor: pointer; transition: background .12s;
}
.cp-row + .cp-row { border-top: 1px solid var(--n-150); }
.cp-row:hover, .cp-row:focus-visible { background: var(--n-25); outline: none; }
.cp-row-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--n-100); color: var(--n-600); }
.cp-row-icon svg { width: 17px; height: 17px; }
.cp-row.urgent .cp-row-icon { background: var(--red-50); color: var(--red-700); }
.cp-row.high .cp-row-icon { background: var(--amber-50); color: var(--amber-700); }
.cp-row-main { min-width: 0; }
.cp-row-main h5 { margin: 0; font-size: var(--fs-md); font-weight: 600; color: var(--n-900); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-row-main p { margin: 2px 0 0; color: var(--n-500); font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-row-main .cp-suggest { display: flex; align-items: center; gap: 6px; margin-top: 6px; color: var(--accent-700); white-space: normal; }
.cp-suggest svg { width: 13px; height: 13px; flex: none; }
.cp-row-meta { display: grid; justify-items: end; gap: 2px; color: var(--n-400); font-size: var(--fs-xs); white-space: nowrap; }
.cp-due { display: inline-flex; align-items: center; gap: 4px; color: var(--n-600); }
.cp-due svg { width: 12px; height: 12px; }
.cp-row-priority { padding: 1px 8px; border-radius: var(--r-full); border: 1px solid var(--n-200); background: var(--n-50); color: var(--n-600); font-size: var(--fs-2xs); font-weight: 600; white-space: nowrap; }
.cp-row-priority.urgent { background: var(--red-50); border-color: var(--red-200); color: var(--red-700); }
.cp-row-priority.high { background: var(--amber-50); border-color: var(--amber-200); color: var(--amber-700); }
.cp-row-go { width: 16px; height: 16px; color: var(--n-300); }
.cp-row:hover .cp-row-go { color: var(--n-600); }

.cp-rail { display: grid; gap: 20px; position: sticky; top: 84px; }
.cp-card { padding: 18px 20px; background: #fff; border: 1px solid var(--n-200); border-radius: var(--r-lg); box-shadow: var(--shadow-xs); }
.cp-card h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: var(--fs-md); }
.cp-card h3 small { color: var(--n-400); font-size: var(--fs-xs); font-weight: 500; }
.cp-card h3 .icon-btn { margin-left: auto; width: 28px; height: 28px; min-height: 28px; }
.cp-notes { display: grid; margin: 0 -8px; }
.cp-notes button {
  display: grid; justify-items: start; gap: 2px; min-height: 0; padding: 8px;
  background: transparent; color: var(--n-800); border: 0; box-shadow: none; text-align: left; white-space: normal;
}
.cp-notes button:hover { background: var(--n-50); }
.cp-notes b { font-size: var(--fs-sm); font-weight: 500; }
.cp-notes small { color: var(--n-400); font-size: var(--fs-xs); }
.cp-watchouts { margin: 0; padding-left: 18px; color: var(--n-700); font-size: var(--fs-sm); line-height: 1.7; }
.cp-privacy { display: flex; gap: 8px; margin: 0; padding: 0 4px; color: var(--n-500); font-size: var(--fs-xs); line-height: 1.6; }
.cp-privacy svg { width: 14px; height: 14px; flex: none; margin-top: 2px; }
.cp-privacy b { color: var(--n-700); font-weight: 600; }

@media (max-width: 1100px) {
  .cp-body { grid-template-columns: minmax(0, 1fr); }
  .cp-rail { position: static; }
}
@media (max-width: 860px) {
  .cp-hero { grid-template-columns: minmax(0, 1fr); padding: 20px 20px 0; }
  .cp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0 -20px; }
  .cp-stat:nth-child(3) { border-left: 0; }
  .cp-stat:nth-child(n+3) { border-top: 1px solid var(--n-150); }
  .cp-row {
    grid-template-columns: 36px minmax(0, 1fr) 16px;
    grid-template-areas: "icon main go" ". meta ." ". priority .";
    gap: 6px 12px;
  }
  .cp-row-icon { grid-area: icon; align-self: start; }
  .cp-row-main { grid-area: main; }
  .cp-row-main h5, .cp-row-main p { white-space: normal; overflow: visible; overflow-wrap: anywhere; }
  .cp-row-meta { grid-area: meta; min-width: 0; justify-items: start; white-space: normal; overflow-wrap: anywhere; }
  .cp-row-priority { grid-area: priority; justify-self: start; }
  .cp-row-go { grid-area: go; }
}

/* ==========================================================================
   Notifications — grouped by day, one row per message
   ========================================================================== */
.nt-page { display: grid; gap: 28px; max-width: 1040px; }
.nt-toolbar { display: flex; align-items: center; gap: 16px; }
.nt-toolbar p { flex: 1; margin: 0; color: var(--n-500); font-size: var(--fs-sm); }
.segmented > button small { margin-left: 4px; color: var(--n-400); font-size: var(--fs-xs); }
.nt-group h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; color: var(--n-500); font-size: var(--fs-xs); font-weight: 600; }
.nt-group h4 small { color: var(--n-400); font-weight: 500; }
.nt-list { overflow: hidden; background: #fff; border: 1px solid var(--n-200); border-radius: var(--r-lg); box-shadow: var(--shadow-xs); }

.notification-item.nt-row {
  display: grid; grid-template-columns: 36px minmax(0, 1fr) auto auto; align-items: center; gap: 4px 16px;
  padding: 14px 18px; border: 0; border-radius: 0; background: #fff;
}
.notification-item.nt-row::before { display: none; }
.nt-list > .nt-row + .nt-row, .dashboard-notification-list > .nt-row + .nt-row { border-top: 1px solid var(--n-150); }
.nt-row:hover { background: var(--n-25); box-shadow: none; }
.nt-icon { position: relative; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--n-100); color: var(--n-500); }
.nt-icon svg { width: 17px; height: 17px; }
.nt-row.unread .nt-icon { background: var(--accent-50); color: var(--accent-600); }
.nt-row.unread .nt-icon::after { content: ""; position: absolute; top: -2px; right: -2px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent-500); border: 2px solid #fff; }
.nt-main { min-width: 0; display: grid; gap: 2px; }
.nt-main b { font-size: var(--fs-md); font-weight: 500; color: var(--n-700); }
.nt-row.unread .nt-main b { font-weight: 600; color: var(--n-900); }
.nt-main p { margin: 0; color: var(--n-500); font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nt-row time { color: var(--n-400); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; white-space: nowrap; }
.nt-actions { display: flex; align-items: center; gap: 6px; }
.nt-actions:empty { display: none; }
.nt-actions button { min-height: 30px; padding: 0 10px; font-size: var(--fs-xs); }
.nt-actions .notification-read-button { background: transparent; border-color: transparent; box-shadow: none; color: var(--n-500); }
.nt-actions .notification-read-button:hover { background: var(--n-100); color: var(--n-900); }
/* Hover-reveal secondary action on wide screens */
@media (hover: hover) and (min-width: 861px) {
  .nt-list .nt-actions .notification-read-button { opacity: 0; transition: opacity .12s; }
  .nt-list .nt-row:hover .notification-read-button, .nt-list .nt-row:focus-within .notification-read-button { opacity: 1; }
}

/* Narrow containers (dashboard column, phones): actions drop under the text */
.dashboard-notifications .notification-item.nt-row { grid-template-columns: 32px minmax(0, 1fr) auto; padding: 14px 20px; }
.dashboard-notifications .nt-icon { width: 32px; height: 32px; }
.dashboard-notifications .nt-actions { grid-column: 2 / -1; }
.dashboard-notifications .nt-main p { white-space: normal; }
@media (max-width: 860px) {
  .nt-toolbar { flex-wrap: wrap; }
  .nt-toolbar p { order: 3; flex-basis: 100%; }
  .notification-item.nt-row { grid-template-columns: 32px minmax(0, 1fr) auto; }
  .nt-actions { grid-column: 2 / -1; }
  .nt-main p { white-space: normal; }
}

/* ==========================================================================
   Application forms (leave / outing / travel / purchase / seal)
   Form on the left in titled sections, read-only notes in a side column.
   ========================================================================== */
.af-page { display: grid; grid-template-columns: minmax(0, 760px) minmax(260px, 340px); gap: 28px; align-items: start; }
.af-page:not(:has(.af-aside)) { grid-template-columns: minmax(0, 760px); }
.af-form { overflow: hidden; background: #fff; border: 1px solid var(--n-200); border-radius: var(--r-xl); box-shadow: var(--shadow-xs); }
.af-section { padding: 28px 32px; }
.af-section + .af-section { border-top: 1px solid var(--n-150); }
.af-section > header { margin-bottom: 20px; }
.af-section > header h3 { margin: 0; font-size: var(--fs-lg); }
.af-section > header p { margin: 4px 0 0; color: var(--n-500); font-size: var(--fs-sm); }
.af-section .form-grid { gap: 20px; }
.af-section textarea { min-height: 112px; }
.af-drop {
  position: relative; display: flex; align-items: center; gap: 14px;
  padding: 18px 20px; cursor: pointer;
  border: 1px dashed var(--n-300); border-radius: var(--r-lg); background: var(--n-25);
  transition: border-color .15s, background .15s;
}
.af-drop:hover, .af-drop:focus-within { border-color: var(--accent-400); background: var(--accent-25); }
.af-drop > svg { width: 36px; height: 36px; padding: 8px; flex: none; border-radius: 10px; background: #fff; color: var(--accent-600); border: 1px solid var(--n-200); }
.af-drop > span { display: grid; gap: 2px; }
.af-drop b { color: var(--n-900); font-size: var(--fs-sm); font-weight: 600; }
.af-drop small { color: var(--n-500); font-size: var(--fs-xs); font-weight: 400; }
.af-drop input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; min-height: 0; }
.af-footer {
  position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 32px; background: rgba(250, 250, 250, .92);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-top: 1px solid var(--n-200);
}
.af-footer span { color: var(--n-500); font-size: var(--fs-xs); }
.af-footer button { min-width: 120px; }
.af-aside { display: grid; gap: 16px; position: sticky; top: 84px; }
.af-aside .info-block {
  margin: 0; padding: 18px 20px;
  background: #fff; border: 1px solid var(--n-200); border-radius: var(--r-lg); box-shadow: var(--shadow-xs);
}
.af-aside .info-block b { display: block; margin-bottom: 6px; color: var(--n-900); font-size: var(--fs-sm); }
.af-aside .info-block p { margin: 6px 0 0; color: var(--n-600); font-size: var(--fs-xs); line-height: 1.75; }
.af-aside .info-block:empty { display: none; }
@media (max-width: 1100px) {
  .af-page { grid-template-columns: minmax(0, 1fr); }
  .af-aside { position: static; order: -1; }
}
@media (max-width: 860px) {
  .af-section { padding: 20px; }
  .af-footer { padding: 14px 20px; }
  .af-footer span { display: none; }
  .af-footer button { flex: 1; }
}

/* ==========================================================================
   商务协同 — search-first toolbar, stage pipeline, pricing tucked away
   ========================================================================== */
.biz-page { display: grid; gap: 24px; }
.biz-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.biz-search {
  flex: 1 1 320px; display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px;
  background: #fff; border: 1px solid var(--n-200); border-radius: var(--r-md); box-shadow: var(--shadow-xs); color: var(--n-400);
}
.biz-search:focus-within { border-color: var(--accent-400); box-shadow: var(--ring); }
.biz-search svg { width: 16px; height: 16px; flex: none; }
.biz-search input { min-height: 0; height: 100%; padding: 0; border: 0; box-shadow: none; background: transparent; font-size: var(--fs-sm); }
.biz-search input:focus { box-shadow: none; }
.biz-stage-select { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.biz-stage-select select { width: auto; min-width: 120px; }
.biz-due { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border-radius: var(--r-md); color: var(--n-500); font-size: var(--fs-sm); }
.biz-due svg { width: 15px; height: 15px; }
.biz-due b { color: var(--n-900); }
.biz-due.has-due { background: var(--red-50); color: var(--red-700); }
.biz-due.has-due b { color: var(--red-700); }
.biz-toolbar > button { height: 38px; }

.biz-pipeline {
  display: flex; overflow-x: auto;
  background: #fff; border: 1px solid var(--n-200); border-radius: var(--r-lg); box-shadow: var(--shadow-xs);
}
.biz-stage {
  position: relative; flex: 1 0 auto; display: grid; justify-items: start; gap: 2px;
  min-width: 108px; min-height: 0; padding: 14px 18px 14px 26px;
  background: transparent; color: var(--n-500); border: 0; border-radius: 0; box-shadow: none;
  font-size: var(--fs-xs); font-weight: 500; text-align: left;
}
.biz-stage:first-child { padding-left: 18px; }
.biz-stage + .biz-stage::before {
  content: ""; position: absolute; left: -6px; top: 50%; width: 12px; height: 12px;
  border-top: 1px solid var(--n-200); border-right: 1px solid var(--n-200);
  background: inherit; transform: translateY(-50%) rotate(45deg); z-index: 1;
}
.biz-stage b { color: var(--n-900); font-size: var(--fs-xl); font-weight: 600; letter-spacing: -.02em; }
.biz-stage:hover { background: var(--n-25); color: var(--n-800); }
.biz-stage.active { background: var(--accent-25); color: var(--accent-700); box-shadow: inset 0 -2px 0 var(--accent-500); }
.biz-stage.active b { color: var(--accent-700); }
.biz-stage:not(.active):has(b:only-child) { }

.biz-page .business-account-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.biz-page .business-account-list > .empty-state { grid-column: 1 / -1; }
.biz-page .business-account { padding: 20px; background: #fff; border: 1px solid var(--n-200); border-radius: var(--r-lg); box-shadow: var(--shadow-xs); display: grid; gap: 16px; }
.biz-page .business-account.is-due { box-shadow: inset 3px 0 0 var(--red-500), var(--shadow-xs); }
.biz-page .business-account header { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.biz-page .business-account h3 { margin: 0; font-size: var(--fs-md); }
.biz-page .business-account header p { margin: 2px 0 0; color: var(--n-500); font-size: var(--fs-xs); }
.biz-page .business-account-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; padding: 14px 0; border-top: 1px solid var(--n-150); border-bottom: 1px solid var(--n-150); }
.biz-page .business-account-grid span { display: grid; gap: 2px; }
.biz-page .business-account-grid small { color: var(--n-400); font-size: var(--fs-2xs); }
.biz-page .business-account-grid b { font-size: var(--fs-sm); font-weight: 500; }
.biz-page .business-account-actions { display: flex; gap: 8px; }
.biz-page .business-account-actions button { flex: 1; min-height: 32px; font-size: var(--fs-xs); }

.biz-pricing { color: var(--n-500); font-size: var(--fs-xs); }
.biz-pricing summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; list-style: none; color: var(--n-600); font-weight: 500; }
.biz-pricing summary::-webkit-details-marker { display: none; }
.biz-pricing summary svg { width: 14px; height: 14px; }
.biz-pricing div { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 10px; padding: 12px 16px; background: var(--n-100); border-radius: var(--r-md); color: var(--n-700); }
.cp-notes button { justify-content: stretch; justify-items: start; text-align: left; }
.af-aside .info-block, .af-aside .info-block > * { display: block; width: auto; max-width: none; grid-column: auto; }
.biz-page .business-account-grid span { padding: 0; background: transparent; border: 0; border-radius: 0; }
.biz-page .business-account.is-due { border-left: 1px solid var(--n-200); box-shadow: inset 3px 0 0 var(--red-500), var(--shadow-xs); }

/* ==========================================================================
   治理中心 — tabs lead, status + legend tucked to the right, stat strip below
   ========================================================================== */
.gv-page { display: grid; gap: 24px; }
.gv-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.gv-top-side { display: flex; align-items: center; gap: 10px; }
.gv-page .governance-health { display: flex; align-items: center; gap: 8px; }
.gv-page .governance-mode, .gv-page .governance-ai {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px;
  background: transparent; border: 0; color: var(--n-500); font-size: var(--fs-xs); font-weight: 500;
}
.gv-page .governance-mode svg, .gv-page .governance-ai svg { width: 14px; height: 14px; }
.gv-page .governance-ai.ready { color: var(--green-700); }
.gv-page .governance-health button { min-height: 32px; }
.gv-page .governance-tabs b { margin-left: 4px; min-width: 18px; padding: 0 5px; border-radius: var(--r-full); background: var(--accent-600); color: #fff; font-size: var(--fs-2xs); }
.gv-legend { position: relative; }
.gv-legend summary {
  display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 8px; cursor: pointer; list-style: none;
  border-radius: var(--r-sm); color: var(--n-500); font-size: var(--fs-xs);
}
.gv-legend summary::-webkit-details-marker { display: none; }
.gv-legend summary:hover { background: var(--n-100); color: var(--n-900); }
.gv-legend summary svg { width: 14px; height: 14px; }
.gv-legend .governance-priority-legend {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: 320px;
  display: grid; gap: 0; padding: 6px; background: #fff;
  border: 1px solid var(--n-200); border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
}
.gv-legend .governance-priority-legend > span { display: flex; align-items: center; gap: 10px; padding: 8px; background: transparent; border-radius: var(--r-sm); }
.gv-legend .governance-priority-legend small { color: var(--n-600); font-size: var(--fs-xs); }
.gv-page .governance-metrics .metric {
  display: grid; grid-template-columns: 1fr; justify-items: start; gap: 4px; padding: 18px 22px; text-align: left;
}
.gv-page .governance-metrics .metric > span:first-child { color: var(--n-500); font-size: var(--fs-sm); font-weight: 500; order: 0; }
.gv-page .governance-metrics .metric strong { margin: 0; font-size: 28px; line-height: 1.1; order: 1; }
.gv-page .governance-metrics .metric small { color: var(--n-400); font-size: var(--fs-xs); order: 2; }
.gv-page .governance-metrics .metric.priority strong { color: var(--red-700); }
.gv-page .governance-metrics .metric.overdue strong { color: var(--amber-700); }
.gv-page .governance-metrics .metric.priority::before, .gv-page .governance-metrics .metric.priority > span:not(:first-child) { display: none; }

/* ==========================================================================
   帮助与培训 — one entry (search / ask AI), category tabs, article list
   ========================================================================== */
.page-container:has(.hc-page) .page-heading { display: none; }
.hc-page { display: grid; gap: 24px; max-width: 1080px; }
.hc-hero {
  display: grid; gap: 20px; padding: 28px 32px 24px;
  border: 1px solid var(--n-200); border-radius: var(--r-xl);
  background:
    radial-gradient(520px 200px at 100% 0%, rgba(99, 102, 233, .10), transparent 70%),
    radial-gradient(420px 180px at 0% 100%, rgba(14, 165, 233, .06), transparent 70%),
    #fff;
  box-shadow: var(--shadow-xs);
}
.hc-hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.hc-hero-top h2 { margin: 0; font-size: 26px; font-weight: 600; letter-spacing: -.025em; }
.hc-hero-top p { margin: 4px 0 0; color: var(--n-500); }
.hc-progress { display: grid; grid-template-columns: auto auto; align-items: center; gap: 6px 10px; min-width: 200px; font-size: var(--fs-xs); color: var(--n-500); }
.hc-progress b { justify-self: end; color: var(--n-900); font-weight: 600; }
.hc-progress .help-progress-track { height: 6px; border-radius: var(--r-full); background: var(--n-100); overflow: hidden; }
.hc-progress .help-progress-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent-400), var(--accent-600)); }
.hc-progress strong { justify-self: end; color: var(--accent-700); font-size: var(--fs-xs); }

.hc-ask { display: grid; gap: 12px; }
.hc-mode { justify-self: start; }
.hc-mode svg { width: 14px; height: 14px; }
.hc-input {
  display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 6px 0 16px;
  background: #fff; border: 1px solid var(--n-200); border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
}
.hc-input:focus-within { border-color: var(--accent-400); box-shadow: var(--ring), var(--shadow-sm); }
.hc-input > svg { width: 18px; height: 18px; flex: none; color: var(--n-400); }
#helpAssistantForm > svg { color: var(--accent-500); }
.hc-input input { flex: 1; min-width: 0; min-height: 0; height: 100%; padding: 0; border: 0; box-shadow: none; background: transparent; font-size: var(--fs-md); }
.hc-input input:focus { box-shadow: none; }
.hc-input > button:not(.icon-btn) { height: 40px; padding: 0 20px; }
.hc-ai { display: grid; gap: 12px; }
.hc-samples { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; color: var(--n-400); font-size: var(--fs-xs); }
.hc-samples .chip { min-height: 28px; padding: 0 10px; background: #fff; color: var(--n-700); border: 1px solid var(--n-200); border-radius: var(--r-full); box-shadow: none; font-size: var(--fs-xs); font-weight: 500; }
.hc-samples .chip:hover { border-color: var(--accent-300); color: var(--accent-700); background: var(--accent-25); }
.hc-answer:empty { display: none; }
.hc-answer { padding: 16px 18px; border-radius: var(--r-lg); background: var(--accent-25); border: 1px solid var(--accent-100); color: var(--n-800); font-size: var(--fs-sm); line-height: 1.75; }
.hc-answer p { margin: 0 0 8px; }
.hc-answer .help-assistant-refs { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.hc-answer .help-assistant-note { display: flex; gap: 6px; color: var(--n-500); font-size: var(--fs-xs); }
.hc-answer .help-assistant-note svg { width: 13px; height: 13px; flex: none; margin-top: 3px; }
.hc-ai-note { margin: 0; color: var(--n-400); font-size: var(--fs-xs); }

.hc-list-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--n-200); }
.hc-tabs { display: flex; gap: 22px; overflow-x: auto; }
.hc-tabs button {
  position: relative; min-height: 42px; padding: 0 2px; gap: 6px;
  background: transparent; color: var(--n-500); border: 0; border-radius: 0; box-shadow: none; font-size: var(--fs-sm); font-weight: 500;
}
.hc-tabs button small { color: var(--n-400); font-size: var(--fs-xs); }
.hc-tabs button:hover { background: transparent; color: var(--n-900); }
.hc-tabs button.active { color: var(--n-900); }
.hc-tabs button.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px; background: var(--n-900); }
.hc-list-head .actions { padding-bottom: 8px; flex-wrap: nowrap; }
.hc-list-head .actions button { min-height: 32px; }

.hc-results h3 { display: flex; align-items: baseline; gap: 8px; margin: 0 0 12px; font-size: var(--fs-md); }
.hc-results h3 small { color: var(--n-400); font-size: var(--fs-xs); font-weight: 500; }
.hc-list { display: block; overflow: hidden; background: #fff; border: 1px solid var(--n-200); border-radius: var(--r-lg); box-shadow: var(--shadow-xs); }
.hc-list > .empty-state { border: 0; }
.help-article-card.hc-row {
  display: grid; grid-template-columns: 36px minmax(0, 1fr) auto 76px; align-items: center; gap: 16px;
  width: 100%; min-height: 0; padding: 14px 20px;
  background: #fff; color: var(--n-900); border: 0; border-radius: 0; box-shadow: none; text-align: left; white-space: normal;
}
.hc-row + .hc-row { border-top: 1px solid var(--n-150); }
.hc-row:hover { background: var(--n-25); }
.hc-row-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--accent-50); color: var(--accent-600); }
.hc-row-icon svg { width: 17px; height: 17px; }
.hc-row-main { display: grid; gap: 2px; min-width: 0; }
.hc-row-main b { font-size: var(--fs-md); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hc-row-main p { margin: 0; color: var(--n-500); font-size: var(--fs-sm); font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hc-row-meta { display: grid; justify-items: end; gap: 2px; color: var(--n-500); font-size: var(--fs-xs); font-weight: 400; white-space: nowrap; }
.hc-row-meta small { color: var(--n-400); }
.hc-row-state { display: inline-flex; align-items: center; justify-content: flex-end; gap: 4px; color: var(--n-400); font-size: var(--fs-xs); font-weight: 500; }
.hc-row-state svg { width: 14px; height: 14px; }
.hc-row.done .hc-row-state { color: var(--green-700); }
.hc-row.done .hc-row-icon { background: var(--n-100); color: var(--n-500); }

@media (max-width: 860px) {
  .hc-hero { padding: 20px; }
  .hc-hero-top { flex-direction: column; gap: 12px; }
  .hc-progress { min-width: 0; width: 100%; grid-template-columns: auto 1fr auto; }
  .hc-progress b { justify-self: start; }
  .hc-progress .help-progress-track { grid-column: 1 / -1; }
  .hc-list-head { flex-direction: column; align-items: stretch; }
  .hc-list-head .actions { padding: 0 0 8px; }
  .help-article-card.hc-row { grid-template-columns: 36px minmax(0, 1fr) auto; padding: 14px 16px; }
  .hc-row-meta { display: none; }
}

/* Tab-like controls never wrap or shrink; their rows scroll instead (scrollbar hidden). */
.hc-tabs { flex: 1 1 auto; min-width: 0; scrollbar-width: none; }
.hc-tabs::-webkit-scrollbar { display: none; }
.hc-list-head .actions { flex: none; }
.hc-tabs button, .tabs .tab, .segmented > button, .governance-tabs > button, .biz-stage, .cp-stat,
.hc-mode > button, .nt-toolbar .segmented > button {
  flex: none; white-space: nowrap;
}
.biz-pipeline, .tabs { scrollbar-width: none; }
.biz-pipeline::-webkit-scrollbar, .tabs::-webkit-scrollbar { display: none; }

/* Notification rows: fixed right-hand columns so time and actions line up across rows.
   [icon][text][time 48px][primary action, right-aligned][mark-read slot 32px] */
.notification-item.nt-row { grid-template-columns: 36px minmax(0, 1fr) 48px 136px; }
.nt-row time { justify-self: end; }
.nt-actions { display: grid; grid-template-columns: minmax(0, 1fr) 32px; align-items: center; justify-items: end; gap: 6px; }
.nt-actions:empty { display: grid; }
.nt-actions > button:not(.notification-read-button) { grid-column: 1; }
.nt-actions > .notification-read-button { grid-column: 2; width: 32px; height: 32px; min-height: 32px; padding: 0; opacity: 1; }
.nt-actions > .notification-read-button svg { width: 16px; height: 16px; }
.nt-actions > .notification-read-button:hover { background: var(--accent-50); color: var(--accent-700); }
@media (hover: hover) and (min-width: 861px) {
  .nt-list .nt-actions .notification-read-button { opacity: 1; }
}
/* Dashboard column and phones: actions sit under the text, left-aligned */
.dashboard-notifications .notification-item.nt-row { grid-template-columns: 32px minmax(0, 1fr) 48px; }
.dashboard-notifications .nt-actions, .dashboard-notifications .nt-actions:empty { grid-column: 2 / -1; display: flex; justify-content: flex-start; }
.dashboard-notifications .nt-actions:empty { display: none; }
@media (max-width: 860px) {
  .notification-item.nt-row { grid-template-columns: 32px minmax(0, 1fr) 48px; }
  .nt-actions { grid-column: 2 / -1; display: flex; justify-content: flex-start; }
  .nt-actions:empty { display: none; }
}
