/* Enterprise-tight dashboard surfaces — Linear/Jira calibration */
/* Served from /public/ to bypass Turbopack's CSS bundler cache */
/* Last updated: 2026-04-07 */


/* ═════════════════════════════════════════════════════════════════
   Enterprise-tight dashboard surfaces (.ent-*)
   Linear / Jira calibration — dense rows, hairline separators,
   zero drop shadows, sentence-case labels, 6px card radius.
   Used by /overview first, will roll out to other pages later.
   ════════════════════════════════════════════════════════════════ */

/* ─── CSS variables ─── */
:root { --ent-ring-offset: #ffffff; }
.dark  { --ent-ring-offset: #1e2a3c; }

/* ─── Page frame ─── */
.ent-page {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ent-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
}
.ent-page-header:has(button, a.ent-btn, [class*="ent-btn"]) {
  border-bottom: 1px solid rgba(15, 17, 24, 0.08);
}
.dark .ent-page-header:has(button, a.ent-btn, [class*="ent-btn"]) {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.ent-page-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: rgba(15, 17, 24, 0.92);
}
.dark .ent-page-title {
  color: rgba(255, 255, 255, 0.90);
}

.ent-page-subtitle {
  margin-top: 2px;
  font-size: 12px;
  color: rgba(15, 17, 24, 0.56);
  line-height: 1.4;
}
.dark .ent-page-subtitle {
  color: rgba(255, 255, 255, 0.48);
}

.ent-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
}
.ent-status--ok {
  border-color: rgba(13, 122, 110, 0.28);
  background: rgba(13, 122, 110, 0.08);
  color: #0d7a6e;
}
.ent-status--warn {
  border-color: rgba(217, 119, 6, 0.28);
  background: rgba(217, 119, 6, 0.08);
  color: #d97706;
}
.ent-status--alert {
  border-color: rgba(185, 28, 28, 0.28);
  background: rgba(185, 28, 28, 0.08);
  color: #b91c1c;
}
.ent-status__dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
}

/* ─── KPI strip — dense horizontal row of numbers ─── */
.ent-kpi-strip {
  display: grid;
  grid-template-columns: repeat(var(--ent-kpi-count, 5), minmax(0, 1fr));
  border: 1px solid rgba(15, 17, 24, 0.08);
  background: #ffffff;
  border-radius: 6px;
  overflow: hidden;
}
.dark .ent-kpi-strip {
  border-color: rgba(255, 255, 255, 0.08);
  background: #151d29;
}

.ent-kpi-cell {
  padding: 10px 12px;
  border-left: 1px solid rgba(15, 17, 24, 0.06);
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.ent-kpi-cell:first-child {
  border-left: none;
}
.dark .ent-kpi-cell {
  border-left-color: rgba(255, 255, 255, 0.06);
}

.ent-kpi-label {
  font-size: 11px;
  font-weight: 500;
  color: rgba(15, 17, 24, 0.56);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dark .ent-kpi-label {
  color: rgba(255, 255, 255, 0.48);
}

.ent-kpi-value {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: rgba(15, 17, 24, 0.92);
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dark .ent-kpi-value {
  color: rgba(255, 255, 255, 0.92);
}

.ent-kpi-delta {
  font-size: 11px;
  color: rgba(15, 17, 24, 0.50);
  line-height: 1.2;
}
.dark .ent-kpi-delta {
  color: rgba(255, 255, 255, 0.42);
}
.ent-kpi-delta--alert {
  color: #b91c1c;
}
.dark .ent-kpi-delta--alert {
  color: #fca5a5;
}

/* ─── Card — base surface for every widget ─── */
.ent-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid rgba(15, 17, 24, 0.08);
  background: #ffffff;
  border-radius: 6px;
  overflow: hidden;
}
.dark .ent-card {
  border-color: rgba(255, 255, 255, 0.08);
  background: #151d29;
}

.ent-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(15, 17, 24, 0.06);
  min-height: 34px;
}
.dark .ent-card-header {
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

.ent-card-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: rgba(15, 17, 24, 0.92);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dark .ent-card-title {
  color: rgba(255, 255, 255, 0.88);
}

.ent-card-meta {
  font-size: 11px;
  color: rgba(15, 17, 24, 0.50);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.dark .ent-card-meta {
  color: rgba(255, 255, 255, 0.42);
}

.ent-card-link {
  font-size: 11px;
  color: #a88a3e;
  text-decoration: none;
  transition: color 0.15s ease;
}
.ent-card-link:hover {
  color: #c8a45e;
}
.dark .ent-card-link {
  color: #c8a45e;
}
.dark .ent-card-link:hover {
  color: #d4b878;
}

.ent-card-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.ent-card-empty {
  padding: 20px 12px;
  text-align: center;
  font-size: 12px;
  color: rgba(15, 17, 24, 0.50);
}
.dark .ent-card-empty {
  color: rgba(255, 255, 255, 0.42);
}

.ent-card-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  border-top: 1px solid rgba(15, 17, 24, 0.06);
  font-size: 11px;
  color: rgba(15, 17, 24, 0.56);
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.ent-card-footer:hover {
  background: rgba(15, 17, 24, 0.03);
  color: #a88a3e;
}
.dark .ent-card-footer {
  border-top-color: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.48);
}
.dark .ent-card-footer:hover {
  background: rgba(255, 255, 255, 0.03);
  color: #c8a45e;
}

/* ─── Row — the unit of dense information display ─── */
.ent-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-bottom: 1px solid rgba(15, 17, 24, 0.04);
  min-height: 32px;
  transition: background-color 0.12s ease;
  text-decoration: none;
  color: inherit;
}
.ent-row:last-child {
  border-bottom: none;
}
.ent-row:hover {
  background: rgba(15, 17, 24, 0.025);
}
.dark .ent-row {
  border-bottom-color: rgba(255, 255, 255, 0.04);
}
.dark .ent-row:hover {
  background: rgba(255, 255, 255, 0.025);
}

.ent-row-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  flex-shrink: 0;
}

.ent-row-main {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.ent-row-title {
  font-size: 12px;
  font-weight: 500;
  color: rgba(15, 17, 24, 0.88);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dark .ent-row-title {
  color: rgba(255, 255, 255, 0.84);
}

.ent-row-meta {
  font-size: 11px;
  color: rgba(15, 17, 24, 0.50);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dark .ent-row-meta {
  color: rgba(255, 255, 255, 0.42);
}

.ent-row-right {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: rgba(15, 17, 24, 0.50);
  font-variant-numeric: tabular-nums;
}
.dark .ent-row-right {
  color: rgba(255, 255, 255, 0.42);
}

.ent-row-amount {
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: rgba(15, 17, 24, 0.88);
}
.dark .ent-row-amount {
  color: rgba(255, 255, 255, 0.88);
}

.ent-row-time {
  flex-shrink: 0;
  width: 42px;
  font-size: 11px;
  color: rgba(15, 17, 24, 0.50);
  font-variant-numeric: tabular-nums;
}
.dark .ent-row-time {
  color: rgba(255, 255, 255, 0.42);
}

/* ─── Tag — small inline status chip ─── */
.ent-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.2;
  border: 1px solid transparent;
  flex-shrink: 0;
}
.ent-tag--gold {
  background: rgba(200, 164, 94, 0.10);
  border-color: rgba(200, 164, 94, 0.22);
  color: #a88a3e;
}
.ent-tag--teal {
  background: rgba(13, 122, 110, 0.10);
  border-color: rgba(13, 122, 110, 0.22);
  color: #0d7a6e;
}
.ent-tag--red {
  background: rgba(185, 28, 28, 0.10);
  border-color: rgba(185, 28, 28, 0.22);
  color: #b91c1c;
}
.ent-tag--orange {
  background: rgba(217, 119, 6, 0.10);
  border-color: rgba(217, 119, 6, 0.22);
  color: #d97706;
}
.ent-tag--purple {
  background: rgba(124, 58, 237, 0.10);
  border-color: rgba(124, 58, 237, 0.22);
  color: #7c3aed;
}
.dark .ent-tag--red {
  color: #fca5a5;
}
.dark .ent-tag--gold {
  color: #d4b878;
}

/* ─── Icon square — when a card MUST have an icon (minimal use) ─── */
.ent-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ═════════════════════════════════════════════════════════════════
   PHASE 0 — Foundation expansion
   Adds buttons, inputs, toolbar, tables, tabs, modals, popovers,
   nav rows, topbar, kanban, calendar, avatars, skeletons, empty
   states. All theme-aware via .dark ancestor override.
   ════════════════════════════════════════════════════════════════ */

/* ─── Buttons ─── */
.ent-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 5px;
  border: 1px solid rgba(15, 17, 24, 0.10);
  background: #ffffff;
  color: rgba(15, 17, 24, 0.82);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
  text-decoration: none;
  font-family: inherit;
  user-select: none;
}
.ent-btn:hover {
  background: #faf8f5;
  border-color: rgba(15, 17, 24, 0.16);
  color: rgba(15, 17, 24, 0.92);
}
.ent-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px rgba(200, 164, 94, 0.50);
}
.ent-btn:disabled,
.ent-btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
.dark .ent-btn {
  border-color: rgba(255, 255, 255, 0.10);
  background: #1b2432;
  color: rgba(255, 255, 255, 0.82);
}
.dark .ent-btn:hover {
  background: #243047;
  border-color: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.92);
}
.dark .ent-btn:focus-visible {
  box-shadow: 0 0 0 2px #151d29, 0 0 0 4px rgba(200, 164, 94, 0.50);
}

.ent-btn--primary {
  background: #c8a45e;
  border-color: #c8a45e;
  color: #0f172a;
  font-weight: 600;
}
.ent-btn--primary:hover {
  background: #d4b878;
  border-color: #d4b878;
  color: #0f172a;
}
.dark .ent-btn--primary {
  background: #c8a45e;
  border-color: #c8a45e;
  color: #0f172a;
}
.dark .ent-btn--primary:hover {
  background: #d4b878;
  border-color: #d4b878;
  color: #0f172a;
}

/* mAIk star-of-the-show button */
@keyframes maik-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(200,164,94,0.00), 0 1px 3px rgba(200,164,94,0.25); }
  50%       { box-shadow: 0 0 0 3px rgba(200,164,94,0.18), 0 1px 6px rgba(200,164,94,0.35); }
}
@keyframes maik-sparkle {
  0%, 100% { transform: rotate(0deg) scale(1);    opacity: 1; }
  25%       { transform: rotate(12deg) scale(1.15); opacity: 0.85; }
  75%       { transform: rotate(-8deg) scale(1.1);  opacity: 0.9; }
}
.ent-btn--maik {
  background: linear-gradient(135deg, #c8a45e 0%, #d4b878 60%, #b8923e 100%);
  border-color: #b8923e;
  color: #0f172a;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 1px 3px rgba(200,164,94,0.25);
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease;
}
.ent-btn--maik:hover {
  background: linear-gradient(135deg, #d4b878 0%, #e0c888 60%, #c8a45e 100%);
  border-color: #c8a45e;
  color: #0f172a;
  transform: translateY(-1px);
  box-shadow: 0 3px 12px rgba(200,164,94,0.45);
}
.ent-btn--maik:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px rgba(200,164,94,0.65);
}
.ent-btn--maik .maik-icon {
  transition: transform 0.18s ease;
}
.ent-btn--maik:hover .maik-icon {
  transform: rotate(12deg) scale(1.1);
}
.dark .ent-btn--maik {
  background: linear-gradient(135deg, #c8a45e 0%, #d4b878 60%, #b8923e 100%);
  border-color: #b8923e;
  color: #0f172a;
}
.dark .ent-btn--maik:hover {
  background: linear-gradient(135deg, #d4b878 0%, #e0c888 60%, #c8a45e 100%);
  border-color: #c8a45e;
  box-shadow: 0 3px 14px rgba(200,164,94,0.40);
}
.dark .ent-btn--maik:focus-visible {
  box-shadow: 0 0 0 2px #151d29, 0 0 0 4px rgba(200,164,94,0.65);
}

.ent-btn--ghost {
  background: transparent;
  border-color: transparent;
  color: rgba(15, 17, 24, 0.62);
}
.ent-btn--ghost:hover {
  background: rgba(15, 17, 24, 0.04);
  border-color: transparent;
  color: rgba(15, 17, 24, 0.92);
}
.dark .ent-btn--ghost {
  color: rgba(255, 255, 255, 0.56);
}
.dark .ent-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.92);
}

.ent-btn--danger {
  border-color: rgba(185, 28, 28, 0.28);
  background: #ffffff;
  color: #b91c1c;
}
.ent-btn--danger:hover {
  background: #b91c1c;
  border-color: #b91c1c;
  color: #ffffff;
}
.dark .ent-btn--danger {
  background: rgba(185, 28, 28, 0.10);
  color: #fca5a5;
  border-color: rgba(185, 28, 28, 0.30);
}
.dark .ent-btn--danger:hover {
  background: #b91c1c;
  border-color: #b91c1c;
  color: #ffffff;
}

.ent-btn--sm {
  padding: 0 8px;
  height: 26px;
  font-size: 11px;
  border-radius: 4px;
}

.ent-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 5px;
  border: 1px solid rgba(15, 17, 24, 0.10);
  background: #ffffff;
  color: rgba(15, 17, 24, 0.62);
  cursor: pointer;
  transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.ent-btn-icon:hover {
  background: #faf8f5;
  border-color: rgba(15, 17, 24, 0.16);
  color: rgba(15, 17, 24, 0.92);
}
.dark .ent-btn-icon {
  border-color: rgba(255, 255, 255, 0.10);
  background: #1b2432;
  color: rgba(255, 255, 255, 0.56);
}
.dark .ent-btn-icon:hover {
  background: #243047;
  border-color: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.92);
}

/* ─── Form inputs ─── */
.ent-fieldset {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.ent-input,
.ent-select,
.ent-textarea {
  display: block;
  width: 100%;
  padding: 6px 10px;
  border: 1px solid rgba(15, 17, 24, 0.10);
  background: #ffffff;
  color: rgba(15, 17, 24, 0.92);
  font-size: 12px;
  line-height: 1.4;
  border-radius: 5px;
  outline: none;
  font-family: inherit;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
  min-height: 28px;
}
.ent-textarea {
  min-height: 64px;
  resize: vertical;
  line-height: 1.5;
}
.ent-input::placeholder,
.ent-textarea::placeholder {
  color: rgba(15, 17, 24, 0.36);
}
.ent-input:hover,
.ent-select:hover,
.ent-textarea:hover {
  border-color: rgba(15, 17, 24, 0.18);
}
.ent-input:focus,
.ent-select:focus,
.ent-textarea:focus {
  border-color: rgba(200, 164, 94, 0.50);
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px rgba(200, 164, 94, 0.50);
}
.ent-input:disabled,
.ent-select:disabled,
.ent-textarea:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: #faf8f5;
}
.dark .ent-input,
.dark .ent-select,
.dark .ent-textarea {
  border-color: rgba(255, 255, 255, 0.14);
  background-color: #1e2a3c;
  color: rgba(255, 255, 255, 0.92);
}
.dark .ent-input::placeholder,
.dark .ent-textarea::placeholder {
  color: rgba(255, 255, 255, 0.36);
}
.dark .ent-input:hover,
.dark .ent-select:hover,
.dark .ent-textarea:hover {
  border-color: rgba(255, 255, 255, 0.18);
}
.dark .ent-input:focus,
.dark .ent-select:focus,
.dark .ent-textarea:focus {
  border-color: rgba(200, 164, 94, 0.50);
  box-shadow: 0 0 0 2px #151d29, 0 0 0 4px rgba(200, 164, 94, 0.50);
}
.dark .ent-input:disabled,
.dark .ent-select:disabled,
.dark .ent-textarea:disabled {
  background: #243047;
}

.ent-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, rgba(15, 17, 24, 0.42) 50%),
                    linear-gradient(135deg, rgba(15, 17, 24, 0.42) 50%, transparent 50%);
  background-position: calc(100% - 12px) 50%, calc(100% - 7px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 24px;
}
.dark .ent-select {
  background-image: linear-gradient(45deg, transparent 50%, rgba(255, 255, 255, 0.42) 50%),
                    linear-gradient(135deg, rgba(255, 255, 255, 0.42) 50%, transparent 50%);
}

.ent-checkbox {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid rgba(15, 17, 24, 0.18);
  background: #ffffff;
  accent-color: #c8a45e;
  cursor: pointer;
  flex-shrink: 0;
}
.dark .ent-checkbox {
  border-color: rgba(255, 255, 255, 0.18);
  background: #1b2432;
}

/* ─── Toolbar / filter bar ─── */
.ent-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid rgba(15, 17, 24, 0.08);
  background: #ffffff;
  border-radius: 6px;
  min-height: 38px;
}
.dark .ent-toolbar {
  border-color: rgba(255, 255, 255, 0.08);
  background: #151d29;
}

.ent-toolbar-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.ent-toolbar-divider {
  width: 1px;
  height: 18px;
  background: rgba(15, 17, 24, 0.10);
}
.dark .ent-toolbar-divider {
  background: rgba(255, 255, 255, 0.10);
}

.ent-toolbar-search {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid transparent;
  background: rgba(15, 17, 24, 0.03);
  border-radius: 5px;
  transition: border-color 0.12s ease, background-color 0.12s ease;
}
.ent-toolbar-search:focus-within {
  border-color: rgba(200, 164, 94, 0.40);
  background: #ffffff;
}
.ent-toolbar-search input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  font-size: 12px;
  color: rgba(15, 17, 24, 0.92);
  font-family: inherit;
}
.ent-toolbar-search input::placeholder {
  color: rgba(15, 17, 24, 0.36);
}
.dark .ent-toolbar-search {
  background: rgba(255, 255, 255, 0.03);
}
.dark .ent-toolbar-search:focus-within {
  background: #1b2432;
}
.dark .ent-toolbar-search input {
  color: rgba(255, 255, 255, 0.92);
}
.dark .ent-toolbar-search input::placeholder {
  color: rgba(255, 255, 255, 0.36);
}

.ent-segment {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  border: 1px solid rgba(15, 17, 24, 0.08);
  background: rgba(15, 17, 24, 0.03);
  border-radius: 5px;
  gap: 1px;
}
.ent-segment-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 500;
  color: rgba(15, 17, 24, 0.56);
  background: transparent;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease;
  font-family: inherit;
  line-height: 1.4;
  white-space: nowrap;
}
.ent-segment-btn:hover:not([aria-pressed="true"]) {
  color: rgba(15, 17, 24, 0.92);
}
.ent-segment-btn[aria-pressed="true"] {
  background: #ffffff;
  color: rgba(15, 17, 24, 0.92);
  box-shadow: 0 1px 2px rgba(15, 17, 24, 0.06);
}
.dark .ent-segment {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}
.dark .ent-segment-btn {
  color: rgba(255, 255, 255, 0.56);
}
.dark .ent-segment-btn:hover:not([aria-pressed="true"]) {
  color: rgba(255, 255, 255, 0.92);
}
.dark .ent-segment-btn[aria-pressed="true"] {
  background: #243047;
  color: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* ─── Tables ─── */
.ent-table-wrap {
  border: 1px solid rgba(15, 17, 24, 0.08);
  background: #ffffff;
  border-radius: 6px;
  /* Horizontal scroll when the table is wider than the available column;
     vertical handled by the parent page scroll. Prevents every cell from
     squishing to an ellipsis when the container is narrow (e.g. mAIk
     panel open) — now you can scroll sideways to see the full row. */
  overflow-x: auto;
  overflow-y: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ent-table-wrap .ent-table {
  /* Keep columns legible; below this width the wrapper scrolls instead
     of the cells collapsing to "...". Descendant combinator (not child)
     because some pages (e.g. Activities) nest an extra overflow wrapper
     between .ent-table-wrap and the <table>. */
  min-width: 720px;
}
.dark .ent-table-wrap {
  border-color: rgba(255, 255, 255, 0.08);
  background: #151d29;
}

.ent-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  table-layout: fixed;
}

.ent-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fcfbf8;
}
.dark .ent-table thead {
  background: #101722;
}

.ent-table th {
  text-align: left;
  padding: 7px 12px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(15, 17, 24, 0.62);
  border-bottom: 1px solid rgba(15, 17, 24, 0.08);
  white-space: nowrap;
  user-select: none;
  position: relative;
  height: 30px;
}
.dark .ent-table th {
  color: rgba(255, 255, 255, 0.56);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.ent-table th[aria-sort] {
  cursor: pointer;
}
.ent-table th[aria-sort]:hover {
  color: rgba(15, 17, 24, 0.92);
}
.dark .ent-table th[aria-sort]:hover {
  color: rgba(255, 255, 255, 0.92);
}
.ent-table th[aria-sort="ascending"]::after {
  content: " ↑";
  color: #c8a45e;
}
.ent-table th[aria-sort="descending"]::after {
  content: " ↓";
  color: #c8a45e;
}

.ent-table td {
  padding: 7px 12px;
  border-bottom: 1px solid rgba(15, 17, 24, 0.04);
  color: rgba(15, 17, 24, 0.84);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  height: 32px;
  vertical-align: middle;
}
/* Icon/button-only columns must never show "…" — their content is
   interactive elements, not text. If the column is narrower than the
   icon it should just clip without an ellipsis marker. */
.ent-table td[data-col="select"],
.ent-table td[data-col="action"],
.ent-table td[data-col="type"],
.ent-table td[data-col="attachments"] {
  text-overflow: clip;
  overflow: visible;
}
.dark .ent-table td {
  border-bottom-color: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.82);
}

.ent-table tbody tr {
  transition: background-color 0.10s ease;
}
.ent-table tbody tr:hover {
  background: rgba(15, 17, 24, 0.025);
}
.dark .ent-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.025);
}
.ent-table tbody tr[aria-selected="true"] {
  background: rgba(200, 164, 94, 0.06);
}
.dark .ent-table tbody tr[aria-selected="true"] {
  background: rgba(200, 164, 94, 0.10);
}

.ent-table tbody tr:last-child td {
  border-bottom: none;
}

.ent-table-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.ent-table-resize-handle {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 4px;
  cursor: col-resize;
  background: transparent;
  transition: background-color 0.12s ease;
}
.ent-table-resize-handle:hover,
.ent-table-resize-handle[data-resizing="true"] {
  background: rgba(200, 164, 94, 0.50);
}

/* ─── Tabs ─── */
.ent-tabs {
  display: flex;
  align-items: stretch;
  gap: 0;
  border-bottom: 1px solid rgba(15, 17, 24, 0.08);
}
.dark .ent-tabs {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.ent-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: none;
  background: transparent;
  font-size: 12px;
  font-weight: 500;
  color: rgba(15, 17, 24, 0.56);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.12s ease, border-color 0.12s ease;
  font-family: inherit;
  text-decoration: none;
}
.ent-tab:hover {
  color: rgba(15, 17, 24, 0.92);
}
.ent-tab[aria-selected="true"],
.ent-tab[data-active="true"] {
  color: #a88a3e;
  border-bottom-color: #c8a45e;
}
.dark .ent-tab {
  color: rgba(255, 255, 255, 0.56);
}
.dark .ent-tab:hover {
  color: rgba(255, 255, 255, 0.92);
}
.dark .ent-tab[aria-selected="true"],
.dark .ent-tab[data-active="true"] {
  color: #d4b878;
  border-bottom-color: #c8a45e;
}

.ent-tab-count {
  font-size: 10px;
  font-weight: 500;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(15, 17, 24, 0.06);
  color: rgba(15, 17, 24, 0.62);
}
.ent-tab[aria-selected="true"] .ent-tab-count,
.ent-tab[data-active="true"] .ent-tab-count {
  background: rgba(200, 164, 94, 0.15);
  color: #a88a3e;
}
.dark .ent-tab-count {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.62);
}
.dark .ent-tab[aria-selected="true"] .ent-tab-count,
.dark .ent-tab[data-active="true"] .ent-tab-count {
  background: rgba(200, 164, 94, 0.18);
  color: #d4b878;
}

/* ─── Modals ─── */
.ent-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15, 17, 24, 0.45);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.dark .ent-modal-backdrop {
  background: rgba(0, 0, 0, 0.65);
}

.ent-modal {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  border: 1px solid rgba(15, 17, 24, 0.10);
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(15, 17, 24, 0.18);
}
.dark .ent-modal {
  border-color: rgba(255, 255, 255, 0.10);
  background: #151d29;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
}

.ent-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(15, 17, 24, 0.08);
}
.dark .ent-modal-header {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.ent-modal-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: rgba(15, 17, 24, 0.92);
}
.dark .ent-modal-title {
  color: rgba(255, 255, 255, 0.92);
}

.ent-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ent-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding: 10px 16px;
  border-top: 1px solid rgba(15, 17, 24, 0.08);
  background: #fcfbf8;
}
.dark .ent-modal-footer {
  border-top-color: rgba(255, 255, 255, 0.08);
  background: #101722;
}

.ent-modal--lg { max-width: 800px; }
.ent-modal--xl { max-width: 1100px; }

/* ─── Popovers / dropdowns ─── */
.ent-popover {
  display: flex;
  flex-direction: column;
  min-width: 180px;
  border: 1px solid rgba(15, 17, 24, 0.10);
  background: #ffffff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(15, 17, 24, 0.12);
}
.dark .ent-popover {
  border-color: rgba(255, 255, 255, 0.10);
  background: #151d29;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
}

.ent-popover-header {
  padding: 6px 10px;
  border-bottom: 1px solid rgba(15, 17, 24, 0.06);
  font-size: 10px;
  font-weight: 600;
  color: rgba(15, 17, 24, 0.50);
  background: #fcfbf8;
}
.dark .ent-popover-header {
  border-bottom-color: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.42);
  background: #101722;
}

.ent-popover-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  font-size: 12px;
  color: rgba(15, 17, 24, 0.84);
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  width: 100%;
  font-family: inherit;
  text-decoration: none;
  transition: background-color 0.10s ease;
}
.ent-popover-item:hover,
.ent-popover-item[data-highlighted="true"] {
  background: rgba(200, 164, 94, 0.08);
  color: rgba(15, 17, 24, 0.92);
}
.dark .ent-popover-item {
  color: rgba(255, 255, 255, 0.82);
}
.dark .ent-popover-item:hover,
.dark .ent-popover-item[data-highlighted="true"] {
  background: rgba(200, 164, 94, 0.12);
  color: rgba(255, 255, 255, 0.92);
}

.ent-popover-divider {
  height: 1px;
  background: rgba(15, 17, 24, 0.06);
  margin: 4px 0;
}
.dark .ent-popover-divider {
  background: rgba(255, 255, 255, 0.06);
}

.ent-popover-shortcut {
  margin-left: auto;
  font-size: 10px;
  color: rgba(15, 17, 24, 0.42);
  font-family: ui-monospace, SFMono-Regular, monospace;
}
.dark .ent-popover-shortcut {
  color: rgba(255, 255, 255, 0.36);
}

/* ─── Sidebar nav (for new custom sidebar) ─── */
.ent-sidebar {
  display: flex;
  flex-direction: column;
  width: 176px;
  height: 100%;
  background: #fcfbf8;
  border-right: 1px solid rgba(15, 17, 24, 0.08);
  flex-shrink: 0;
  position: relative;
  transition: width 220ms cubic-bezier(0.22, 1, 0.36, 1);
}
.dark .ent-sidebar {
  background: #101722;
  border-right-color: rgba(255, 255, 255, 0.08);
}

.ent-sidebar--collapsed {
  width: 44px;
}

.ent-sidebar-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-bottom: 1px solid rgba(15, 17, 24, 0.06);
  height: 44px;
  flex-shrink: 0;
}
.dark .ent-sidebar-header {
  border-bottom-color: rgba(255, 255, 255, 0.06);
}
.ent-sidebar--collapsed .ent-sidebar-header {
  padding: 6px;
  justify-content: center;
}
.ent-sidebar--collapsed .ent-sidebar-brand {
  gap: 0;
  justify-content: center;
}

.ent-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}
.ent-sidebar-brand img {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}
.ent-sidebar-brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 140px;
  opacity: 1;
  overflow: hidden;
  transition: max-width 200ms cubic-bezier(0.22, 1, 0.36, 1), opacity 140ms ease;
}
.ent-sidebar--collapsed .ent-sidebar-brand-text {
  max-width: 0;
  opacity: 0;
}
.ent-sidebar-brand-name {
  font-size: 13px;
  font-weight: 600;
  color: rgba(15, 17, 24, 0.92);
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.dark .ent-sidebar-brand-name {
  color: rgba(255, 255, 255, 0.92);
}
.ent-sidebar-brand-meta {
  font-size: 9px;
  font-weight: 500;
  color: rgba(15, 17, 24, 0.42);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.2;
  margin-top: 1px;
}
.dark .ent-sidebar-brand-meta {
  color: rgba(255, 255, 255, 0.36);
}

.ent-sidebar-nav {
  display: flex;
  flex-direction: column;
  padding: 6px;
  position: relative;
  gap: 1px;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.ent-sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.ent-sidebar-section + .ent-sidebar-section {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(15, 17, 24, 0.06);
}
.dark .ent-sidebar-section + .ent-sidebar-section {
  border-top-color: rgba(255, 255, 255, 0.06);
}

.ent-sidebar-section-label {
  padding: 4px 8px 2px;
  font-size: 10px;
  font-weight: 600;
  color: rgba(15, 17, 24, 0.42);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
  overflow: hidden;
  max-width: 200px;
  opacity: 1;
  transition: max-width 200ms cubic-bezier(0.22, 1, 0.36, 1), opacity 140ms ease, padding 200ms ease;
}
.dark .ent-sidebar-section-label {
  color: rgba(255, 255, 255, 0.36);
}
.ent-sidebar--collapsed .ent-sidebar-section-label {
  max-width: 0;
  opacity: 0;
  padding: 0;
}

.ent-nav-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(15, 17, 24, 0.72);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.10s ease;
  min-height: 28px;
  position: relative;
  z-index: 1;
}
.ent-nav-row:hover {
  background: rgba(15, 17, 24, 0.04);
  color: rgba(15, 17, 24, 0.92);
}
.ent-nav-row[data-active="true"],
.ent-nav-row[aria-current="page"] {
  color: #a88a3e;
}
.ent-nav-row[data-active="true"]::before,
.ent-nav-row[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 16px;
  background: #c8a45e;
  border-radius: 2px;
}
.dark .ent-nav-row {
  color: rgba(255, 255, 255, 0.62);
}
.dark .ent-nav-row:hover {
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.92);
}
.dark .ent-nav-row[data-active="true"],
.dark .ent-nav-row[aria-current="page"] {
  color: #d4b878;
}

/* Sliding active indicator */
.ent-nav-indicator {
  position: absolute;
  left: 6px;
  right: 6px;
  border-radius: 4px;
  background: rgba(200, 164, 94, 0.10);
  pointer-events: none;
  z-index: 0;
  transition: top 240ms cubic-bezier(0.22, 1, 0.36, 1), height 180ms cubic-bezier(0.22, 1, 0.36, 1);
}
.dark .ent-nav-indicator {
  background: rgba(200, 164, 94, 0.12);
}

.ent-nav-row svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.ent-nav-row-label {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
  opacity: 1;
  transition: max-width 200ms cubic-bezier(0.22, 1, 0.36, 1), opacity 140ms ease;
}
.ent-sidebar--collapsed .ent-nav-row {
  justify-content: center;
  padding: 5px 0;
  gap: 0;
}
.ent-sidebar--collapsed .ent-nav-row-label {
  max-width: 0;
  opacity: 0;
}
.ent-sidebar--collapsed .ent-nav-row[data-active="true"]::before,
.ent-sidebar--collapsed .ent-nav-row[aria-current="page"]::before {
  left: 0;
}

.ent-nav-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 0 5px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(15, 17, 24, 0.08);
  color: rgba(15, 17, 24, 0.62);
  font-variant-numeric: tabular-nums;
}
.dark .ent-nav-badge {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.56);
}
.ent-sidebar--collapsed .ent-nav-badge {
  display: none;
}

.ent-sidebar-footer {
  position: relative;
  padding: 6px;
  border-top: 1px solid rgba(15, 17, 24, 0.06);
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.dark .ent-sidebar-footer {
  border-top-color: rgba(255, 255, 255, 0.06);
}

.ent-sidebar-collapse-btn {
  position: absolute;
  right: -12px;
  top: 40px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(15, 17, 24, 0.10);
  background: #fcfbf8;
  color: rgba(15, 17, 24, 0.42);
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(15, 17, 24, 0.10);
  opacity: 0;
  transition: opacity 0.15s ease, background 0.12s ease, color 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}
.ent-sidebar:hover .ent-sidebar-collapse-btn,
.ent-sidebar-collapse-btn:focus-visible {
  opacity: 1;
}
.ent-sidebar-collapse-btn:hover {
  background: #ffffff;
  color: rgba(15, 17, 24, 0.82);
  border-color: rgba(15, 17, 24, 0.18);
  box-shadow: 0 2px 8px rgba(15, 17, 24, 0.12);
}
.dark .ent-sidebar-collapse-btn {
  border-color: rgba(255, 255, 255, 0.10);
  background: #101722;
  color: rgba(255, 255, 255, 0.36);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.30);
}
.dark .ent-sidebar-collapse-btn:hover {
  background: #1b2432;
  color: rgba(255, 255, 255, 0.82);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.40);
}
.ent-sidebar-collapse-icon {
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}
.ent-sidebar--collapsed .ent-sidebar-collapse-icon {
  transform: rotate(180deg);
}

/* ─── Topbar ─── */
.ent-topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 12px;
  background: #fcfbf8;
  border-bottom: 1px solid rgba(15, 17, 24, 0.08);
  flex-shrink: 0;
  position: relative;
}
.dark .ent-topbar {
  background: #101722;
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.ent-topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: rgba(15, 17, 24, 0.62);
  min-width: 0;
}
.dark .ent-topbar-breadcrumb {
  color: rgba(255, 255, 255, 0.56);
}

.ent-topbar-breadcrumb-current {
  color: rgba(15, 17, 24, 0.92);
  font-weight: 500;
}
.dark .ent-topbar-breadcrumb-current {
  color: rgba(255, 255, 255, 0.92);
}

.ent-topbar-breadcrumb-sep {
  color: rgba(15, 17, 24, 0.30);
}
.dark .ent-topbar-breadcrumb-sep {
  color: rgba(255, 255, 255, 0.24);
}

.ent-topbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.ent-topbar-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 420px;
  max-width: 38vw;
  display: flex;
  align-items: center;
  pointer-events: none;
}

.ent-topbar-search {
  width: 100%;
  pointer-events: auto;
  max-width: 420px;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border: 1px solid rgba(15, 17, 24, 0.10);
  background: #ffffff;
  border-radius: 5px;
  font-size: 12px;
  color: rgba(15, 17, 24, 0.62);
  cursor: pointer;
  transition: border-color 0.12s ease;
  white-space: nowrap;
  overflow: hidden;
}
.ent-topbar-search > span:not(.ent-topbar-search-shortcut) {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ent-topbar-search:hover {
  border-color: rgba(15, 17, 24, 0.18);
}
.dark .ent-topbar-search {
  border-color: rgba(255, 255, 255, 0.10);
  background: #1b2432;
  color: rgba(255, 255, 255, 0.56);
}
.dark .ent-topbar-search:hover {
  border-color: rgba(255, 255, 255, 0.18);
}

.ent-topbar-search-shortcut {
  margin-left: auto;
  font-size: 10px;
  font-family: ui-monospace, SFMono-Regular, monospace;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(15, 17, 24, 0.06);
  color: rgba(15, 17, 24, 0.50);
}
.dark .ent-topbar-search-shortcut {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.42);
}

.ent-topbar-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: flex-end;
}

/* ─── Empty states ─── */
.ent-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  gap: 8px;
}

.ent-empty-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(15, 17, 24, 0.04);
  color: rgba(15, 17, 24, 0.42);
  margin-bottom: 4px;
}
.dark .ent-empty-icon {
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.36);
}

.ent-empty-title {
  font-size: 13px;
  font-weight: 600;
  color: rgba(15, 17, 24, 0.84);
}
.dark .ent-empty-title {
  color: rgba(255, 255, 255, 0.82);
}

.ent-empty-meta {
  font-size: 12px;
  color: rgba(15, 17, 24, 0.50);
  max-width: 280px;
  line-height: 1.4;
}
.dark .ent-empty-meta {
  color: rgba(255, 255, 255, 0.42);
}

/* ─── Skeleton loader ─── */
.ent-skel {
  display: block;
  background: linear-gradient(
    90deg,
    rgba(15, 17, 24, 0.06) 0%,
    rgba(15, 17, 24, 0.10) 50%,
    rgba(15, 17, 24, 0.06) 100%
  );
  background-size: 200% 100%;
  border-radius: 4px;
  animation: ent-skel-pulse 1.4s ease-in-out infinite;
}
.dark .ent-skel {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.06) 0%,
    rgba(255, 255, 255, 0.10) 50%,
    rgba(255, 255, 255, 0.06) 100%
  );
  background-size: 200% 100%;
}
@keyframes ent-skel-pulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ─── Avatars ─── */
.ent-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #f3ede3;
  color: #a88a3e;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  flex-shrink: 0;
  border: 1px solid rgba(15, 17, 24, 0.06);
  overflow: hidden;
}
.dark .ent-avatar {
  background: #243047;
  color: #d4b878;
  border-color: rgba(255, 255, 255, 0.06);
}
.ent-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ent-avatar--xs { width: 16px; height: 16px; font-size: 8px; }
.ent-avatar--sm { width: 18px; height: 18px; font-size: 9px; }
.ent-avatar--md { width: 28px; height: 28px; font-size: 11px; }
.ent-avatar--lg { width: 32px; height: 32px; font-size: 12px; }

/* Clickable avatar sized to match .ent-btn-icon (26px) for use as a
   topbar/menu trigger. Adds hover state. */
.ent-avatar--button {
  width: 26px;
  height: 26px;
  font-size: 10px;
  cursor: pointer;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.ent-avatar--button:hover {
  border-color: rgba(200, 164, 94, 0.40);
}
.ent-avatar--button[data-open="true"] {
  border-color: rgba(200, 164, 94, 0.50);
  box-shadow: 0 0 0 2px rgba(200, 164, 94, 0.18);
}

/* Notification dot for ent-btn-icon — small red/gold marker top-right */
.ent-btn-icon {
  position: relative;
}
.ent-btn-icon[data-has-badge="true"]::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #c8a45e;
  border: 1px solid #fcfbf8;
}
.dark .ent-btn-icon[data-has-badge="true"]::after {
  border-color: #101722;
}
.ent-btn-icon[data-has-badge="true"][data-badge-tone="alert"]::after {
  background: #b91c1c;
}

.ent-avatar-stack {
  display: inline-flex;
  align-items: center;
}
.ent-avatar-stack .ent-avatar + .ent-avatar {
  margin-left: -6px;
  border-color: #ffffff;
}
.dark .ent-avatar-stack .ent-avatar + .ent-avatar {
  border-color: #151d29;
}

/* ─── Kanban column + card (for /tasks) ─── */
.ent-kanban {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px;
  align-items: flex-start;
  min-height: 0;
  flex: 1;
}

.ent-kanban-col {
  display: flex;
  flex-direction: column;
  width: 280px;
  flex-shrink: 0;
  background: #f8f6f2;
  border: 1px solid rgba(15, 17, 24, 0.08);
  border-radius: 6px;
  max-height: 100%;
}
.dark .ent-kanban-col {
  background: #1b2432;
  border-color: rgba(255, 255, 255, 0.08);
}

.ent-kanban-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(15, 17, 24, 0.06);
  font-size: 11px;
  font-weight: 600;
  color: rgba(15, 17, 24, 0.62);
}
.dark .ent-kanban-col-header {
  border-bottom-color: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.56);
}

.ent-kanban-col-body {
  flex: 1;
  overflow-y: auto;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 48px;
}

.ent-kanban-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
  background: #ffffff;
  border: 1px solid rgba(15, 17, 24, 0.08);
  border-radius: 5px;
  cursor: grab;
  transition: border-color 0.10s ease, box-shadow 0.10s ease;
  font-size: 12px;
}
.ent-kanban-card:hover {
  border-color: rgba(15, 17, 24, 0.18);
  box-shadow: 0 1px 3px rgba(15, 17, 24, 0.06);
}
.ent-kanban-card[data-dragging="true"] {
  opacity: 0.5;
  cursor: grabbing;
}
.dark .ent-kanban-card {
  background: #151d29;
  border-color: rgba(255, 255, 255, 0.08);
}
.dark .ent-kanban-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
}

.ent-kanban-card-title {
  font-weight: 500;
  color: rgba(15, 17, 24, 0.92);
  line-height: 1.3;
}
.dark .ent-kanban-card-title {
  color: rgba(255, 255, 255, 0.92);
}

.ent-kanban-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: rgba(15, 17, 24, 0.50);
  margin-top: 2px;
}
.dark .ent-kanban-card-meta {
  color: rgba(255, 255, 255, 0.42);
}

.ent-kanban-add-btn {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 5px;
  width: 100%;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 500;
  font-family: inherit;
  line-height: 1;
  color: rgba(15, 17, 24, 0.42);
  background: transparent;
  border: none;
  border-top: 1px solid rgba(15, 17, 24, 0.06);
  cursor: pointer;
  text-align: left;
  transition: color 0.12s ease;
}
.ent-kanban-add-btn:hover {
  color: rgba(15, 17, 24, 0.72);
}
.dark .ent-kanban-add-btn {
  color: rgba(255, 255, 255, 0.30);
  border-top-color: rgba(255, 255, 255, 0.06);
}
.dark .ent-kanban-add-btn:hover {
  color: rgba(255, 255, 255, 0.62);
}

/* ─── Calendar (for /calendar) ─── */
.ent-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border: 1px solid rgba(15, 17, 24, 0.08);
  background: #ffffff;
  border-radius: 6px;
  overflow: hidden;
}
.dark .ent-cal-grid {
  border-color: rgba(255, 255, 255, 0.08);
  background: #151d29;
}

.ent-cal-header-cell {
  padding: 6px 8px;
  font-size: 10px;
  font-weight: 600;
  color: rgba(15, 17, 24, 0.50);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-right: 1px solid rgba(15, 17, 24, 0.06);
  border-bottom: 1px solid rgba(15, 17, 24, 0.08);
  background: #fcfbf8;
}
.ent-cal-header-cell:last-child {
  border-right: none;
}
.dark .ent-cal-header-cell {
  color: rgba(255, 255, 255, 0.42);
  border-right-color: rgba(255, 255, 255, 0.06);
  border-bottom-color: rgba(255, 255, 255, 0.08);
  background: #101722;
}

.ent-cal-day {
  min-height: 96px;
  padding: 6px;
  border-right: 1px solid rgba(15, 17, 24, 0.06);
  border-bottom: 1px solid rgba(15, 17, 24, 0.06);
  display: flex;
  flex-direction: column;
  gap: 2px;
  cursor: pointer;
  transition: background-color 0.10s ease;
}
.ent-cal-day:hover {
  background: rgba(15, 17, 24, 0.02);
}
.dark .ent-cal-day {
  border-right-color: rgba(255, 255, 255, 0.04);
  border-bottom-color: rgba(255, 255, 255, 0.04);
}
.dark .ent-cal-day:hover {
  background: rgba(255, 255, 255, 0.02);
}

.ent-cal-day--today {
  background: rgba(200, 164, 94, 0.05);
}
.ent-cal-day--other-month {
  opacity: 0.4;
}

.ent-cal-day-number {
  font-size: 11px;
  font-weight: 500;
  color: rgba(15, 17, 24, 0.62);
  margin-bottom: 2px;
}
.ent-cal-day--today .ent-cal-day-number {
  color: #a88a3e;
  font-weight: 600;
}
.dark .ent-cal-day-number {
  color: rgba(255, 255, 255, 0.56);
}
.dark .ent-cal-day--today .ent-cal-day-number {
  color: #d4b878;
}

.ent-cal-event {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 5px;
  font-size: 10px;
  font-weight: 500;
  border-radius: 3px;
  background: rgba(200, 164, 94, 0.12);
  color: #a88a3e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  border-left: 2px solid #c8a45e;
}
.dark .ent-cal-event {
  background: rgba(200, 164, 94, 0.18);
  color: #d4b878;
}

/* Calendar surface theme vars — scoped to .ent-cal-surface so inline
   style={{ background: 'var(--cal-bg)' }} in week/day view JSX can
   auto-flip between light and dark. */
.ent-cal-surface {
  --cal-bg: #ffffff;
  --cal-bg-muted: #fcfbf8;
  --cal-border: rgba(15, 17, 24, 0.06);
  --cal-border-strong: rgba(15, 17, 24, 0.08);
  --cal-text-strong: rgba(15, 17, 24, 0.84);
  --cal-text-body: rgba(15, 17, 24, 0.72);
  --cal-text-muted: rgba(15, 17, 24, 0.50);
  --cal-text-subtle: rgba(15, 17, 24, 0.42);
}
.dark .ent-cal-surface {
  --cal-bg: #151d29;
  --cal-bg-muted: #101722;
  --cal-border: rgba(255, 255, 255, 0.06);
  --cal-border-strong: rgba(255, 255, 255, 0.08);
  --cal-text-strong: rgba(255, 255, 255, 0.88);
  --cal-text-body: rgba(255, 255, 255, 0.72);
  --cal-text-muted: rgba(255, 255, 255, 0.56);
  --cal-text-subtle: rgba(255, 255, 255, 0.42);
}

