:root {
  --premium-navy: #101b2d;
  --premium-navy-2: #18263b;
  --premium-ink: #182132;
  --premium-muted: #697386;
  --premium-paper: #f5f3ee;
  --premium-surface: #fffefd;
  --premium-line: #dfe3e8;
  --premium-gold: #a8874f;
  --premium-gold-soft: #ede4d3;
  --premium-green: #24705a;
  --premium-red: #a84b47;
  --premium-amber: #9a6b24;
  --premium-blue: #315f90;
  --premium-shadow: 0 18px 50px rgba(16, 27, 45, .08);
  --premium-shadow-strong: 0 28px 90px rgba(16, 27, 45, .17);
  --premium-radius: 18px;
}

body.premium-business {
  background:
    radial-gradient(circle at 100% 0%, rgba(168,135,79,.10), transparent 28rem),
    var(--premium-paper);
  color: var(--premium-ink);
}

body.premium-business .topbar {
  height: 72px;
  border-color: rgba(223,227,232,.86);
  background: rgba(255,254,253,.91);
  box-shadow: 0 7px 28px rgba(16,27,45,.035);
}
body.premium-business .brand { color: var(--premium-navy); font-size: 16px; }
body.premium-business .brand-mark {
  border-radius: 9px;
  background: linear-gradient(145deg, var(--premium-navy), #263956);
  color: #f2dfb8;
  box-shadow: 0 7px 18px rgba(16,27,45,.18);
}
body.premium-business nav { gap: 8px; }
body.premium-business nav a {
  padding: 9px 12px;
  border-radius: 10px;
  font-weight: 650;
  color: #596477;
}
body.premium-business nav a:hover { background: #f0eee9; color: var(--premium-navy); }

.premium-workspace {
  max-width: 1280px;
  margin: 34px auto 0;
  padding: 0 clamp(20px, 5vw, 72px) 28px;
}
.premium-workspace[hidden] { display: none !important; }
.premium-workspace-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  margin-bottom: 18px;
}
.premium-kicker {
  color: var(--premium-gold);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.premium-workspace h2 {
  margin: 7px 0 6px;
  color: var(--premium-navy);
  font-size: clamp(31px, 4vw, 48px);
  line-height: 1.04;
  letter-spacing: -.045em;
}
.premium-workspace-subtitle { margin: 0; color: var(--premium-muted); line-height: 1.5; }
.premium-company-switcher {
  min-width: 280px;
  border-color: #d8dce2;
  background: var(--premium-surface);
  box-shadow: 0 7px 18px rgba(16,27,45,.04);
}

.premium-dashboard-grid {
  display: grid;
  grid-template-columns: 1.45fr .55fr;
  gap: 16px;
}
.premium-panel {
  border: 1px solid var(--premium-line);
  border-radius: var(--premium-radius);
  background: rgba(255,254,253,.94);
  box-shadow: var(--premium-shadow);
}
.premium-panel-main { padding: 24px; }
.premium-panel-side { padding: 20px; }
.premium-panel-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}
.premium-panel-title h3 { margin: 0; color: var(--premium-navy); font-size: 19px; }
.premium-panel-title p { margin: 4px 0 0; color: var(--premium-muted); font-size: 12px; }

.premium-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.premium-metric {
  min-height: 102px;
  padding: 15px;
  border: 1px solid #e6e8eb;
  border-radius: 14px;
  background: #faf9f6;
}
.premium-metric span { display: block; color: var(--premium-muted); font-size: 11px; line-height: 1.3; }
.premium-metric strong { display: block; margin-top: 11px; color: var(--premium-navy); font-size: 28px; letter-spacing: -.04em; }
.premium-metric.attention strong { color: var(--premium-amber); }
.premium-metric.ready strong { color: var(--premium-green); }

.premium-focus-list, .premium-app-list { display: grid; gap: 9px; }
.premium-focus-item, .premium-app-row {
  display: grid;
  gap: 8px;
  padding: 14px 15px;
  border: 1px solid #e5e8ec;
  border-radius: 14px;
  background: #fff;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.premium-app-row { cursor: pointer; }
.premium-app-row:hover {
  transform: translateY(-1px);
  border-color: #c8cfd8;
  box-shadow: 0 10px 24px rgba(16,27,45,.06);
}
.premium-app-row:focus-visible { outline: 3px solid rgba(49,95,144,.24); outline-offset: 2px; }
.premium-row-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.premium-row-head strong { color: var(--premium-navy); font-size: 14px; }
.premium-row-meta { display: flex; flex-wrap: wrap; gap: 7px; color: var(--premium-muted); font-size: 11px; }
.premium-action-title { color: var(--premium-ink); font-size: 13px; line-height: 1.4; }
.premium-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: #edf0f4;
  color: #516073;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .02em;
}
.premium-badge.green { background: #e7f2ee; color: var(--premium-green); }
.premium-badge.red { background: #f7e8e7; color: var(--premium-red); }
.premium-badge.amber { background: #f5ecdc; color: var(--premium-amber); }
.premium-badge.blue { background: #e8eff7; color: var(--premium-blue); }
.premium-badge.gold { background: var(--premium-gold-soft); color: #765b2d; }

.premium-progress { height: 6px; overflow: hidden; border-radius: 999px; background: #edf0f2; }
.premium-progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #496b8c, var(--premium-green)); }

.premium-empty {
  min-height: 130px;
  display: grid;
  place-items: center;
  padding: 24px;
  border: 1px dashed #cfd5dc;
  border-radius: 14px;
  color: var(--premium-muted);
  text-align: center;
  line-height: 1.5;
}

.premium-skeleton {
  min-height: 76px;
  border-radius: 13px;
  background: linear-gradient(90deg,#f0f1f2 25%,#fafafa 40%,#f0f1f2 58%);
  background-size: 300% 100%;
  animation: premium-shimmer 1.25s infinite linear;
}
@keyframes premium-shimmer { to { background-position: -150% 0; } }
@media (prefers-reduced-motion: reduce) { .premium-skeleton { animation: none; } }

.premium-button {
  border: 1px solid #d8dde3;
  border-radius: 11px;
  padding: 10px 14px;
  background: #fff;
  color: var(--premium-navy);
  font: inherit;
  font-size: 12px;
  font-weight: 760;
  cursor: pointer;
}
.premium-button:hover { border-color: #b8c0ca; background: #fbfbfa; }
.premium-button.primary { border-color: var(--premium-navy); background: var(--premium-navy); color: #fff; }
.premium-button.gold { border-color: #c6ac7d; background: #f2eadc; color: #654c23; }
.premium-button:disabled { opacity: .45; cursor: not-allowed; }

.premium-app-dialog {
  width: min(1180px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: var(--premium-surface);
  color: var(--premium-ink);
  box-shadow: var(--premium-shadow-strong);
}
.premium-app-dialog::backdrop { background: rgba(10,17,29,.63); backdrop-filter: blur(4px); }
.premium-dialog-shell { display: grid; grid-template-rows: auto auto 1fr; max-height: calc(100vh - 24px); }
.premium-dialog-head {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 20px;
  padding: 22px 24px 17px;
  border-bottom: 1px solid var(--premium-line);
}
.premium-dialog-head h2 { margin: 5px 0 5px; color: var(--premium-navy); font-size: 25px; letter-spacing: -.035em; }
.premium-dialog-head p { margin: 0; color: var(--premium-muted); font-size: 12px; }
.premium-dialog-close { width: 37px; height: 37px; padding: 0; border-radius: 10px; }
.premium-tabs {
  display: flex;
  gap: 3px;
  overflow-x: auto;
  padding: 10px 17px;
  border-bottom: 1px solid var(--premium-line);
  background: #faf9f6;
}
.premium-tab {
  white-space: nowrap;
  border: 0;
  border-radius: 9px;
  padding: 9px 11px;
  background: transparent;
  color: #6a7485;
  font-weight: 730;
  cursor: pointer;
}
.premium-tab[aria-selected="true"] { background: #fff; color: var(--premium-navy); box-shadow: 0 2px 7px rgba(16,27,45,.07); }
.premium-tab-panel { overflow: auto; padding: 22px 24px 28px; }
.premium-detail-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 14px; }
.premium-detail-card { padding: 17px; border: 1px solid var(--premium-line); border-radius: 14px; background: #fff; }
.premium-detail-card h3 { margin: 0 0 12px; color: var(--premium-navy); font-size: 15px; }
.premium-stat-line { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid #eef0f2; font-size: 12px; }
.premium-stat-line:last-child { border-bottom: 0; }
.premium-stat-line span { color: var(--premium-muted); }
.premium-stat-line strong { text-align: right; color: var(--premium-ink); }
.premium-task-list { display: grid; gap: 8px; }
.premium-task { padding: 12px; border-left: 3px solid #cbd2db; border-radius: 0 10px 10px 0; background: #f8f9fa; }
.premium-task.blocker { border-left-color: var(--premium-red); background: #fff7f6; }
.premium-task.high { border-left-color: var(--premium-amber); background: #fffaf1; }
.premium-task strong { display: block; font-size: 13px; }
.premium-task span { display: block; margin-top: 4px; color: var(--premium-muted); font-size: 11px; line-height: 1.45; }

.premium-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.premium-table th { padding: 9px 8px; border-bottom: 1px solid #dfe3e8; text-align: left; color: var(--premium-muted); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.premium-table td { padding: 11px 8px; border-bottom: 1px solid #eef0f2; vertical-align: top; }

.mera-toast-host {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1000;
  display: grid;
  gap: 9px;
  width: min(390px, calc(100vw - 36px));
}
.mera-toast {
  padding: 13px 15px;
  border: 1px solid #dce0e5;
  border-radius: 13px;
  background: rgba(255,254,253,.98);
  box-shadow: 0 14px 40px rgba(16,27,45,.16);
  color: var(--premium-ink);
  font-size: 12px;
  line-height: 1.45;
}
.mera-toast.error { border-color: #e8c3c0; }
.mera-toast.success { border-color: #bfdbd0; }

.mera-form-dialog {
  width: min(520px, calc(100vw - 24px));
  padding: 0;
  border: 0;
  border-radius: 17px;
  background: var(--premium-surface);
  box-shadow: var(--premium-shadow-strong);
}
.mera-form-dialog::backdrop { background: rgba(10,17,29,.60); }
.mera-form-dialog form { display: grid; gap: 15px; padding: 22px; }
.mera-form-dialog h3 { margin: 0; color: var(--premium-navy); }
.mera-form-actions { display: flex; justify-content: flex-end; gap: 8px; }

body.premium-business .program-card,
body.premium-business .profile-card,
body.premium-business .summary-card,
body.premium-business .pipeline-item {
  border-color: var(--premium-line);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(16,27,45,.045);
}
body.premium-business .button.primary { background: var(--premium-navy); }
body.premium-business .button.primary:hover { background: #20324d; }
body.premium-business .eyebrow { color: var(--premium-gold); }

@media (max-width: 900px) {
  .premium-dashboard-grid, .premium-detail-grid { grid-template-columns: 1fr; }
  .premium-metrics { grid-template-columns: repeat(2,1fr); }
  .premium-workspace-head { grid-template-columns: 1fr; align-items: start; }
  .premium-company-switcher { min-width: 0; width: 100%; }
}
@media (max-width: 620px) {
  .premium-workspace { padding-inline: 14px; margin-top: 20px; }
  .premium-panel-main, .premium-panel-side { padding: 15px; }
  .premium-metrics { grid-template-columns: 1fr 1fr; }
  .premium-metric { min-height: 86px; }
  .premium-metric strong { font-size: 23px; }
  .premium-dialog-head, .premium-tab-panel { padding-inline: 15px; }
}
