/*
 * RIFD Command Center
 * Shared system: PageHeader / KPICard / ActionButton / StatusPill
 * Revision: 20260729-command-center-light-1
 */

:root {
  --cc-navy: #1b3a6b;
  --cc-navy-deep: #11294f;
  --cc-mint: #33d6a6;
  --cc-mint-ink: #167c60;
  --cc-gold: #e8b84b;
  --cc-gold-ink: #916407;
  --cc-danger: #b84d45;
  --cc-canvas: #f4f7fb;
  --cc-surface: #ffffff;
  --cc-ink: #17243a;
  --cc-muted: #66758a;
  --cc-line: #e1e8f0;
  --cc-neutral: #718198;
  --cc-radius: 18px;
  --cc-shadow: 0 4px 12px rgba(27, 58, 107, 0.08);
}

.rifd-command-center,
.rifd-command-center *,
.rifd-command-center *::before,
.rifd-command-center *::after {
  box-sizing: border-box;
}

.rifd-command-center {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  direction: rtl;
  color: var(--cc-ink);
  background: var(--cc-canvas);
  font-family: "Tajawal", "IBM Plex Sans Arabic", Tahoma, Arial, sans-serif;
  transform: translateX(100%);
  transition: transform 220ms cubic-bezier(0.4, 0, 0.2, 1);
}

.rifd-command-center.cc-hidden {
  display: none;
}

.rifd-command-center.cc-visible {
  display: flex;
  transform: none;
}

/* Navy application header */
.cc-app-header {
  display: flex;
  min-height: 76px;
  flex: 0 0 76px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-inline: clamp(18px, 3vw, 44px);
  border-bottom: 3px solid var(--cc-mint);
  color: #fff;
  background: var(--cc-navy);
  box-shadow: 0 8px 22px rgba(17, 41, 79, 0.16);
}

.cc-brand-lockup {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.cc-brand-lockup > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.cc-brand-lockup strong {
  color: #fff;
  font-size: 19px;
  font-weight: 900;
  line-height: 1.15;
}

.cc-brand-lockup span {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cc-brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border-radius: 13px;
  color: var(--cc-navy);
  background: var(--cc-mint);
  box-shadow: 0 8px 18px rgba(51, 214, 166, 0.22);
}

.cc-top-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.cc-preview-badge {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--cc-navy);
  background: var(--cc-gold);
  box-shadow: 0 6px 14px rgba(232, 184, 75, 0.2);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

html.rifd-command-center-open .rifd-preview-badge {
  display: none !important;
}

.cc-body {
  flex: 1;
  overflow: auto;
  overscroll-behavior: contain;
  background:
    radial-gradient(
      circle at 92% 0%,
      rgba(232, 184, 75, 0.08),
      transparent 28rem
    ),
    linear-gradient(180deg, #f9fbfd 0%, var(--cc-canvas) 100%);
}

.cc-content {
  width: min(1760px, 100%);
  margin-inline: auto;
  padding: 30px clamp(18px, 3.5vw, 54px) 70px;
}

/* Shared PageHeader */
.cc-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 26px;
}

.cc-page-heading {
  min-width: 0;
}

.cc-page-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.cc-title-chip,
.cc-section-icon,
.cc-state-icon {
  display: grid;
  place-items: center;
  color: var(--cc-navy);
  background: var(--cc-gold);
}

.cc-title-chip {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 14px;
  box-shadow: 0 8px 18px rgba(232, 184, 75, 0.2);
}

.cc-eyebrow {
  margin: 0 0 3px;
  color: #7c8797;
  font-family: "IBM Plex Sans Arabic", "Tajawal", Tahoma, Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.09em;
}

.cc-page-header h1 {
  position: relative;
  margin: 0;
  padding-bottom: 9px;
  color: var(--cc-navy);
  font-family: "Tajawal", "IBM Plex Sans Arabic", Tahoma, Arial, sans-serif;
  font-size: 28px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.cc-page-header h1::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 66px;
  height: 3px;
  border-radius: 999px;
  background: var(--cc-gold);
}

.cc-page-subtitle {
  margin: 9px 62px 0 0;
  color: var(--cc-muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.7;
}

.cc-timestamp {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border: 1px solid #e5eaf0;
  border-radius: 999px;
  color: #66758a;
  background: #eef2f6;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

/* Shared ActionButton */
.cc-action-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid var(--cc-navy);
  border-radius: 11px;
  color: var(--cc-navy);
  background: #fff;
  font: 800 13px/1 "Tajawal", "IBM Plex Sans Arabic", Tahoma, Arial,
    sans-serif;
  cursor: pointer;
  transition:
    color 150ms ease,
    background-color 150ms ease,
    border-color 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease;
}

.cc-action-button:hover {
  color: var(--cc-navy-deep);
  background: #f7fafc;
  box-shadow: 0 5px 13px rgba(27, 58, 107, 0.08);
  transform: translateY(-1px);
}

.cc-action-primary {
  color: #fff;
  background: var(--cc-navy);
  box-shadow: 0 7px 16px rgba(27, 58, 107, 0.2);
}

.cc-action-primary:hover {
  border-color: var(--cc-navy-deep);
  color: #fff;
  background: var(--cc-navy-deep);
}

.cc-action-header {
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border-color: rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  color: #fff;
  background: var(--cc-navy);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.cc-action-header:hover {
  border-color: var(--cc-mint);
  color: var(--cc-navy);
  background: var(--cc-mint);
  box-shadow: 0 7px 16px rgba(51, 214, 166, 0.2);
}

.cc-action-button:focus-visible,
.cc-wf-input:focus-visible,
.cc-sla-indicator:focus-within {
  outline: 3px solid rgba(51, 214, 166, 0.28);
  outline-offset: 2px;
}

.cc-action-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.cc-action-button:disabled .cc-icon-refresh,
.cc-state-loading .cc-icon-refresh {
  animation: cc-spin 750ms linear infinite;
}

.cc-wf-form input:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

/* Shared KPICard */
.cc-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 30px;
}

.cc-kpi-card {
  --cc-card-accent: var(--cc-navy);
  --cc-card-ink: var(--cc-navy);

  display: flex;
  min-width: 0;
  min-height: 158px;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid var(--cc-line);
  border-top: 4px solid var(--cc-card-accent);
  border-radius: var(--cc-radius);
  background: var(--cc-surface);
  box-shadow: var(--cc-shadow);
  transition:
    box-shadow 170ms ease,
    transform 170ms ease;
}

.cc-kpi-card:hover {
  box-shadow: 0 9px 22px rgba(27, 58, 107, 0.12);
  transform: translateY(-2px);
}

.cc-tone-mint {
  --cc-card-accent: var(--cc-mint);
  --cc-card-ink: var(--cc-mint-ink);
}

.cc-tone-gold {
  --cc-card-accent: var(--cc-gold);
  --cc-card-ink: var(--cc-gold-ink);
}

.cc-tone-navy {
  --cc-card-accent: var(--cc-navy);
  --cc-card-ink: var(--cc-navy);
}

.cc-tone-neutral {
  --cc-card-accent: var(--cc-neutral);
  --cc-card-ink: #50627a;
}

.cc-tone-danger {
  --cc-card-accent: var(--cc-danger);
  --cc-card-ink: #9f3f39;
}

.cc-kpi-card.is-urgent {
  box-shadow:
    var(--cc-shadow),
    0 0 0 3px color-mix(in srgb, var(--cc-card-accent) 12%, transparent);
}

.cc-kpi-main {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: start;
  gap: 13px;
}

.cc-kpi-icon {
  position: relative;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: var(--cc-card-accent);
  box-shadow: 0 7px 16px
    color-mix(in srgb, var(--cc-card-accent) 26%, transparent);
}

.cc-kpi-indicator {
  position: absolute;
  top: -4px;
  left: -4px;
  width: 12px;
  height: 12px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--cc-mint);
  box-shadow: 0 0 0 3px rgba(51, 214, 166, 0.18);
}

.cc-kpi-copy {
  min-width: 0;
}

.cc-kpi-label {
  display: block;
  overflow: hidden;
  color: var(--cc-muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cc-kpi-value {
  display: block;
  margin-top: 6px;
  color: var(--cc-card-ink);
  font-family: "IBM Plex Sans Arabic", "Tajawal", Tahoma, Arial, sans-serif;
  font-size: clamp(32px, 2.3vw, 36px);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 0.98;
}

.cc-kpi-footer {
  min-height: 29px;
  padding-top: 10px;
  border-top: 1px solid #edf1f5;
  color: #7a8798;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

/* Shared sections */
.cc-section {
  min-width: 0;
  margin-bottom: 30px;
}

.cc-section-heading {
  margin-bottom: 14px;
}

.cc-section-title-row {
  display: flex;
  align-items: center;
  gap: 11px;
}

.cc-section-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 12px;
  color: #fff;
  background: var(--cc-navy);
  box-shadow: 0 6px 14px rgba(27, 58, 107, 0.14);
}

.cc-section-heading h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--cc-navy);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.3;
}

.cc-section-heading p {
  margin: 3px 0 0;
  color: var(--cc-muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
}

.cc-count-badge {
  display: inline-grid;
  min-width: 27px;
  height: 27px;
  padding-inline: 8px;
  place-items: center;
  border-radius: 999px;
  color: var(--cc-navy);
  background: var(--cc-gold);
  font-size: 12px;
  font-weight: 900;
}

.cc-attention-list,
.cc-status-bars,
.cc-recent-list,
.cc-wf-rows {
  overflow: hidden;
  border: 1px solid var(--cc-line);
  border-radius: var(--cc-radius);
  background: #fff;
  box-shadow: var(--cc-shadow);
}

.cc-attention-list {
  border-inline-start: 4px solid var(--cc-gold);
}

.cc-attention-item,
.cc-recent-item {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid #edf1f5;
}

.cc-attention-item:last-child,
.cc-recent-item:last-child {
  border-bottom: 0;
}

.cc-request-copy {
  min-width: 0;
  flex: 1;
}

.cc-request-copy strong {
  display: block;
  overflow: hidden;
  color: var(--cc-ink);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cc-request-copy span {
  display: block;
  margin-top: 3px;
  color: #718095;
  font-family: "IBM Plex Sans Arabic", "Tajawal", Tahoma, Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
}

.cc-request-meta {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.cc-request-meta time {
  color: #7b8797;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.cc-priority-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: #a3afbd;
}

.cc-priority-high {
  background: var(--cc-danger);
  box-shadow: 0 0 0 4px rgba(184, 77, 69, 0.12);
}

.cc-priority-medium {
  background: var(--cc-gold);
  box-shadow: 0 0 0 4px rgba(232, 184, 75, 0.14);
}

.cc-priority-normal {
  background: #9aa7b5;
}

.cc-priority-label {
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 900;
}

.cc-priority-label-high {
  color: #9f3f39;
  background: #fff0ef;
}

.cc-priority-label-medium {
  color: var(--cc-gold-ink);
  background: #fff7e3;
}

/* Status Distribution */
.cc-overview-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.85fr) minmax(0, 1.25fr);
  gap: 18px;
  align-items: start;
}

.cc-status-bars {
  display: grid;
  gap: 0;
  padding: 8px 16px;
}

.cc-bar-row {
  display: grid;
  grid-template-columns: 46px 128px minmax(120px, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 50px;
  border-bottom: 1px solid #edf1f5;
}

.cc-bar-row:last-child {
  border-bottom: 0;
}

.cc-bar-count {
  color: var(--cc-navy);
  font-family: "IBM Plex Sans Arabic", "Tajawal", Tahoma, Arial, sans-serif;
  font-size: 16px;
  font-weight: 900;
  text-align: start;
}

.cc-bar-label {
  color: #45566d;
  font-size: 14px;
  font-weight: 600;
  text-align: start;
}

.cc-bar-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1f5;
}

.cc-bar-fill {
  display: block;
  width: var(--cc-progress);
  min-width: 0;
  height: 100%;
  border-radius: 999px;
  background: var(--cc-neutral);
  transition: width 400ms ease;
}

.cc-bar-new,
.cc-bar-ready {
  background: var(--cc-mint);
}

.cc-bar-under_review,
.cc-bar-preparing {
  background: var(--cc-gold);
}

.cc-bar-approved {
  background: var(--cc-navy);
}

.cc-bar-delivered,
.cc-bar-closed,
.cc-bar-completed {
  background: #9aa7b5;
}

/* Shared StatusPill */
.cc-status-pill {
  display: inline-flex;
  min-height: 27px;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.cc-status-new,
.cc-status-ready {
  color: #106b52;
  background: rgba(51, 214, 166, 0.17);
}

.cc-status-under_review,
.cc-status-preparing {
  color: var(--cc-gold-ink);
  background: rgba(232, 184, 75, 0.2);
}

.cc-status-approved,
.cc-status-in_progress {
  color: var(--cc-navy);
  background: rgba(27, 58, 107, 0.11);
}

.cc-status-delivered,
.cc-status-closed,
.cc-status-completed {
  color: #53657a;
  background: #edf1f5;
}

.cc-status-rejected,
.cc-status-cancelled {
  color: #9f3f39;
  background: #fff0ef;
}

.cc-recent-main {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 12px;
}

/* SLA Settings */
.cc-wf-section {
  margin-top: 2px;
}

.cc-wf-rows {
  display: grid;
  gap: 10px;
  padding: 14px;
  background: #f8fafc;
}

.cc-wf-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(210px, auto) 112px;
  align-items: center;
  gap: 18px;
  min-height: 86px;
  padding: 14px 16px;
  border: 1px solid var(--cc-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(27, 58, 107, 0.05);
}

.cc-wf-stage strong {
  display: block;
  color: var(--cc-navy);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.4;
}

.cc-wf-stage span {
  display: block;
  margin-top: 3px;
  color: var(--cc-muted);
  font-size: 12px;
  font-weight: 600;
}

.cc-wf-hour-field,
.cc-wf-health {
  display: grid;
  gap: 5px;
  justify-items: start;
}

.cc-wf-input-wrap {
  display: flex;
  min-height: 42px;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--cc-navy);
  border-radius: 10px;
  color: var(--cc-navy);
  background: #fff;
}

.cc-wf-input {
  width: 86px;
  min-height: 40px;
  padding: 7px 10px;
  border: 0;
  border-inline-end: 1px solid rgba(27, 58, 107, 0.16);
  outline: none;
  color: var(--cc-navy);
  background: #fff;
  font: 900 15px/1 "IBM Plex Sans Arabic", "Tajawal", Tahoma, Arial,
    sans-serif;
  text-align: center;
}

.cc-wf-input-wrap > span {
  padding-inline: 10px;
  font-size: 12px;
  font-weight: 800;
}

.cc-wf-hour-field small,
.cc-wf-health small {
  color: #77869a;
  font-size: 12px;
  font-weight: 600;
}

.cc-sla-indicator {
  display: inline-flex;
  min-width: 82px;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 2px;
  overflow: hidden;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-weight: 900;
}

.cc-sla-indicator input {
  width: 48px;
  padding: 0;
  border: 0;
  outline: 0;
  color: inherit;
  background: transparent;
  font: 900 15px/1 "IBM Plex Sans Arabic", "Tajawal", Tahoma, Arial,
    sans-serif;
  text-align: end;
  appearance: textfield;
}

.cc-sla-indicator input::-webkit-inner-spin-button,
.cc-sla-indicator input::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
}

.cc-sla-indicator b {
  font-size: 14px;
}

.cc-sla-healthy {
  color: #106b52;
  background: rgba(51, 214, 166, 0.17);
}

.cc-sla-watch {
  color: var(--cc-gold-ink);
  background: rgba(232, 184, 75, 0.2);
}

.cc-sla-risk {
  color: #963f39;
  background: #fff0ef;
}

.cc-wf-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 14px;
}

/* Empty, loading, and error states */
.cc-empty-state,
.cc-state-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 28px;
  color: var(--cc-muted);
  text-align: center;
}

.cc-empty-state {
  min-height: 180px;
  flex-direction: column;
}

.cc-empty-state > .cc-icon {
  width: 30px;
  height: 30px;
  color: var(--cc-mint-ink);
}

.cc-empty-state strong,
.cc-state-card strong {
  display: block;
  color: var(--cc-navy);
  font-size: 15px;
  font-weight: 900;
}

.cc-empty-state p,
.cc-state-card p {
  margin: 5px 0 0;
  color: var(--cc-muted);
  font-size: 12px;
  line-height: 1.6;
}

.cc-state-card {
  width: min(620px, 100%);
  min-height: 170px;
  margin: 8vh auto 0;
  border: 1px solid var(--cc-line);
  border-radius: var(--cc-radius);
  background: #fff;
  box-shadow: var(--cc-shadow);
  text-align: start;
}

.cc-state-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 14px;
}

.cc-state-loading .cc-state-icon {
  color: #fff;
  background: var(--cc-mint);
}

.cc-retry-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 7px;
  margin-top: 13px;
  padding-inline: 13px;
  border: 1px solid var(--cc-navy);
  border-radius: 10px;
  color: #fff;
  background: var(--cc-navy);
  font: 800 12px/1 "Tajawal", Tahoma, Arial, sans-serif;
  cursor: pointer;
}

.cc-inline-alert {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  margin-bottom: 16px;
  padding: 8px 12px;
  border: 1px solid rgba(232, 184, 75, 0.42);
  border-radius: 12px;
  color: var(--cc-gold-ink);
  background: #fff8e8;
  font-size: 12px;
  font-weight: 800;
}

.cc-updated-at {
  margin: 4px 0 0;
  color: #7d8999;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

/* Toasts */
.cc-toasts {
  position: fixed;
  bottom: 24px;
  left: 50%;
  z-index: 2147483600;
  display: flex;
  width: min(440px, calc(100vw - 32px));
  flex-direction: column;
  gap: 8px;
  transform: translateX(-50%);
}

.cc-toast {
  padding: 11px 16px;
  border: 1px solid rgba(51, 214, 166, 0.36);
  border-radius: 999px;
  color: #fff;
  background: var(--cc-navy);
  box-shadow: 0 12px 30px rgba(17, 41, 79, 0.22);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  animation: cc-toast-in 180ms ease;
}

.cc-toast-error {
  border-color: rgba(232, 184, 75, 0.56);
  background: #8e3e3a;
}

/* Existing navigation integration */
.cc-nav-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: 8px;
  padding: 8px 14px;
  border: 1px solid rgba(27, 58, 107, 0.22);
  border-radius: 10px;
  color: var(--cc-navy);
  background: #fff;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.cc-nav-btn:hover,
.cc-nav-btn.active {
  border-color: var(--cc-navy);
  color: #fff;
  background: var(--cc-navy);
}

/* Shared masked icon system */
.cc-icon {
  --cc-icon-url: url("/assets/icons/manager/layout-dashboard.svg");

  display: inline-block;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  background-color: currentColor;
  -webkit-mask: var(--cc-icon-url) center / contain no-repeat;
  mask: var(--cc-icon-url) center / contain no-repeat;
}

.cc-brand-mark .cc-icon,
.cc-title-chip .cc-icon,
.cc-kpi-icon .cc-icon,
.cc-state-icon .cc-icon {
  width: 24px;
  height: 24px;
  flex-basis: 24px;
}

.cc-icon-dashboard {
  --cc-icon-url: url("/assets/icons/manager/layout-dashboard.svg");
}

.cc-icon-refresh {
  --cc-icon-url: url("/assets/icons/nutrition/refresh-cw.svg");
}

.cc-icon-close {
  --cc-icon-url: url("/assets/icons/executive/x.svg");
}

.cc-icon-eye {
  --cc-icon-url: url("/assets/icons/executive/eye.svg");
}

.cc-icon-calendar {
  --cc-icon-url: url("/assets/icons/executive/calendar-days.svg");
}

.cc-icon-zap {
  --cc-icon-url: url("/assets/icons/executive/zap.svg");
}

.cc-icon-clock {
  --cc-icon-url: url("/assets/icons/executive/clock-3.svg");
}

.cc-icon-check {
  --cc-icon-url: url("/assets/icons/executive/circle-check-big.svg");
}

.cc-icon-alert {
  --cc-icon-url: url("/assets/icons/nutrition/triangle-alert.svg");
}

.cc-icon-package {
  --cc-icon-url: url("/assets/icons/nutrition/package.svg");
}

.cc-icon-bell {
  --cc-icon-url: url("/assets/icons/nutrition/bell.svg");
}

.cc-icon-clipboard {
  --cc-icon-url: url("/assets/icons/nutrition/clipboard-list.svg");
}

.cc-icon-chart {
  --cc-icon-url: url("/assets/icons/manager/chart-no-axes-combined.svg");
}

/* Assistant button adopts the Command Center primary ActionButton treatment. */
html.rifd-command-center-open .rifd-assistant-fab {
  border: 1px solid var(--cc-navy);
  border-radius: 14px;
  color: #fff;
  background: var(--cc-navy);
  box-shadow: 0 12px 28px rgba(27, 58, 107, 0.24);
}

html.rifd-command-center-open .rifd-assistant-fab:hover {
  border-color: var(--cc-mint);
  background: var(--cc-navy-deep);
  transform: translateY(-1px);
}

html.rifd-command-center-open .rifd-assistant-fab svg {
  fill: var(--cc-mint);
}

.cc-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@keyframes cc-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes cc-toast-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 1280px) {
  .cc-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .cc-overview-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .cc-app-header {
    min-height: 68px;
    flex-basis: 68px;
    padding-inline: 14px;
  }

  .cc-brand-lockup > div > span {
    display: none;
  }

  .cc-preview-badge {
    min-height: 32px;
    padding: 5px 9px;
  }

  .cc-preview-badge .cc-icon {
    display: none;
  }

  .cc-content {
    padding: 20px 14px 54px;
  }

  .cc-page-header {
    flex-direction: column;
    gap: 13px;
    margin-bottom: 20px;
  }

  .cc-timestamp {
    margin-inline-start: 62px;
  }

  .cc-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .cc-kpi-card {
    min-height: 145px;
    padding: 15px;
  }

  .cc-attention-item,
  .cc-recent-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .cc-request-meta {
    width: 100%;
    justify-content: flex-start;
    padding-inline-start: 21px;
    flex-wrap: wrap;
  }

  .cc-bar-row {
    grid-template-columns: 42px minmax(98px, 0.7fr) minmax(100px, 1fr);
    gap: 8px;
  }

  .cc-wf-row {
    grid-template-columns: 1fr 1fr;
  }

  .cc-wf-stage {
    grid-column: 1 / -1;
  }
}

@media (max-width: 480px) {
  .cc-brand-mark {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .cc-brand-lockup strong {
    font-size: 17px;
  }

  .cc-top-tools {
    gap: 7px;
  }

  .cc-preview-badge {
    position: fixed;
    top: 76px;
    right: 50%;
    z-index: 2;
    transform: translateX(50%);
  }

  .cc-action-header {
    width: 42px;
    min-width: 42px;
    height: 42px;
    min-height: 42px;
  }

  .cc-page-header {
    margin-top: 28px;
  }

  .cc-eyebrow {
    font-size: 12px;
  }

  .cc-page-header h1 {
    font-size: 26px;
  }

  .cc-page-subtitle,
  .cc-timestamp {
    margin-inline-start: 0;
  }

  .cc-kpi-grid {
    grid-template-columns: 1fr;
  }

  .cc-kpi-card {
    min-height: 132px;
  }

  .cc-bar-row {
    grid-template-columns: 38px 1fr;
    min-height: 66px;
  }

  .cc-bar-track {
    grid-column: 1 / -1;
  }

  .cc-wf-row {
    grid-template-columns: 1fr;
  }

  .cc-wf-stage {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rifd-command-center,
  .cc-action-button,
  .cc-kpi-card,
  .cc-bar-fill,
  .rifd-assistant-fab {
    transition: none !important;
  }
}
