@import url("/micis-theme-option-a.css");
@import url("/micis-theme-option-a-refinement.css?v=1832");

/* Shared operational usability refinements. */

/*
 * Refresh paint guard.
 * Large portal pages still contain some legacy source markup that is simplified by the
 * operational JavaScript layer. Keep those mutable shells behind a short, deterministic
 * loading veil until the enhanced dashboard exists. A 650 ms CSS-only fail-safe always
 * reveals the source UI if enhancement JavaScript is delayed or unavailable.
 */
@keyframes micis-ui-boot-reveal {
  to { opacity: 1; visibility: visible; }
}
@keyframes micis-ui-boot-overlay-hide {
  to { opacity: 0; visibility: hidden; }
}

body:has(#portal_app)::before,
body:has(#dashboard_view)::before {
  content: "Loading MICIS…";
  position: fixed;
  inset: 0;
  z-index: 2147483646;
  display: grid;
  place-items: center;
  background: #f5f7f8;
  color: #002b4f;
  font: 700 14px/1.4 Arial, Helvetica, sans-serif;
  letter-spacing: .01em;
  opacity: 1;
  visibility: visible;
  pointer-events: none;
  animation: micis-ui-boot-overlay-hide 0s linear .65s forwards;
}

body:has(#portal_app) #portal_app,
body:has(#dashboard_view) > .app {
  opacity: 0;
  visibility: hidden;
  animation: micis-ui-boot-reveal 0s linear .65s forwards;
}

/* The modern dashboard markers reveal the shell immediately when they arrive. */
body:has(#ml_dashboard_view) #portal_app,
body:has(#dashboard_view.micis-admin-dashboard) > .app {
  opacity: 1;
  visibility: visible;
  animation: none;
}
body:has(#ml_dashboard_view)::before,
body:has(#dashboard_view.micis-admin-dashboard)::before {
  display: none;
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  body:has(#portal_app)::before,
  body:has(#dashboard_view)::before,
  body:has(#portal_app) #portal_app,
  body:has(#dashboard_view) > .app {
    animation-duration: 0s;
  }
}

/* The product is operational; beta is the only pilot-era visual marker. */
.prototype-banner { display: none !important; }
.brand h1::after,
.sidebar .brand h1::after {
  content: " (beta)";
  color: #e5484d;
  font-size: .46em;
  font-weight: 700;
  letter-spacing: .01em;
  vertical-align: .22em;
  white-space: nowrap;
}

/* Remove pilot-era workspace notices and the low-value material summary card. */
#artefact_workspace_status { display: none !important; }
.card:has(#artefact_summary) { display: none !important; }
section#supporting_view > .notice.warning,
section#supporting_view > .notice.success,
#supporting_view > .notice.warning,
#supporting_view > .notice.success { display: none !important; }

.material-form {
  gap: 15px !important;
}
.material-form label {
  margin: 0 0 4px !important;
  line-height: 1.3;
  position: relative;
  z-index: 1;
}
.material-form > div:not(.hidden) {
  display: grid;
  gap: 7px;
}
.material-form input,
.material-form select {
  margin: 0;
}

.material-policy-head > strong {
  font-size: 1.08rem;
  line-height: 1.25;
  letter-spacing: -.01em;
  font-weight: 700;
}
.material-policy-row > small {
  display: block;
  margin-top: 3px;
  font-size: .78rem;
  line-height: 1.35;
  opacity: .72;
}
.material-live-list {
  display: grid;
  gap: 14px;
  margin-top: 12px;
}
.material-live-entry {
  border-top: 1px solid var(--border, #c7d5d8);
  padding-top: 13px;
}
.material-live-entry:first-child {
  border-top: 0;
  padding-top: 0;
}
.material-live-entry-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.material-live-entry-head .material-current-name {
  min-width: 0;
  font-size: .94rem;
  line-height: 1.34;
  font-weight: 400;
  color: #20252b;
}
.material-live-entry.external-evidence-entry {
  border-left: 3px solid #9aa7b3;
  padding-left: 11px;
}
.material-external-label {
  display: inline-block;
  margin: 0 0 5px;
  font-size: .66rem;
  line-height: 1;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #59646f;
}
.material-current > small,
.material-live-entry .material-current > small {
  display: block;
  margin-top: 4px;
  font-size: .74rem;
  line-height: 1.4;
  opacity: .7;
}
.material-current > button,
.material-live-entry .material-current > button {
  width: auto !important;
  min-height: 30px;
  padding: 5px 10px !important;
  margin-top: 8px;
  font-size: .75rem !important;
  font-weight: 600 !important;
  background: #fff !important;
  color: #163f65 !important;
  border: 1px solid #9eb9d4 !important;
  box-shadow: none !important;
}
.material-current > button:hover,
.material-live-entry .material-current > button:hover {
  background: #f3f7fb !important;
}
.material-live-entry .material-processing-controls {
  margin-top: 8px;
  gap: 6px !important;
  align-items: center;
}
.material-live-entry .material-processing-controls button {
  width: auto !important;
  min-height: 30px;
  padding: 5px 10px !important;
  font-size: .75rem !important;
  font-weight: 600 !important;
  box-shadow: none !important;
}
.material-live-entry .material-processing-controls button.primary {
  background: #07345c !important;
  color: #fff !important;
  border: 1px solid #07345c !important;
  font-weight: 700 !important;
}
.material-live-entry .material-processing-controls button.secondary {
  background: #fff !important;
  color: #294864 !important;
  border: 1px solid #b8c7d5 !important;
}
.material-live-entry .material-processing-controls button.secondary:hover {
  background: #f5f7f9 !important;
  border-color: #94aabc !important;
}
.material-live-entry .notice {
  padding: 8px 10px !important;
  margin: 7px 0 0 !important;
  font-size: .76rem !important;
  line-height: 1.35;
}
.material-live-entry .pill,
.material-policy-head .pill {
  font-size: .68rem !important;
  padding: 4px 8px !important;
}

.material-status {
  border: 1px solid transparent !important;
  font-weight: 700 !important;
}
.material-status-neutral { background: #eef1f4 !important; color: #505a63 !important; border-color: #d7dde2 !important; }
.material-status-amber { background: #fff1c7 !important; color: #704f00 !important; border-color: #e8c968 !important; }
.material-status-blue { background: #e4f0ff !important; color: #174f87 !important; border-color: #b6d3f3 !important; }
.material-status-green { background: #e4f6e9 !important; color: #176b35 !important; border-color: #a8d8b6 !important; }
.material-status-red { background: #fde8e8 !important; color: #9b1c1c !important; border-color: #e9aaaa !important; }
.material-status-key {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 10px 0 12px;
  padding: 8px 10px;
  border: 1px solid var(--border, #c7d5d8);
  border-radius: 8px;
  background: #fafbfc;
  font-size: .72rem;
  color: #4d5660;
}
.material-status-key > strong { color: #1e2a35; font-size: .74rem; }
.material-status-key-item { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.material-status-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; border: 1px solid transparent; }
.material-status-dot-neutral { background: #c7cdd2; border-color: #aeb6bd; }
.material-status-dot-amber { background: #e0a800; border-color: #b98900; }
.material-status-dot-blue { background: #3d83c5; border-color: #286b9f; }
.material-status-dot-green { background: #2f8a4d; border-color: #236c3a; }
.material-status-dot-red { background: #c83b3b; border-color: #9f2929; }

button.micis-processing-feedback {
  position: relative;
}
button.micis-processing-feedback::after {
  content: "";
  display: inline-block;
  width: .82em;
  height: .82em;
  margin-left: .55em;
  vertical-align: -.08em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: micis-button-spin .7s linear infinite;
}
@keyframes micis-button-spin {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  button.micis-processing-feedback::after { animation: none; border-right-color: currentColor; }
}
@media (max-width: 620px) {
  .material-live-entry-head {
    display: grid;
    gap: 6px;
  }
  .material-live-entry-head .pill {
    justify-self: start;
  }
  .material-status-key { align-items: flex-start; }
}

/* Guidance policy cards already contain one source Open action. Hide the legacy injected copy and collapse its reserved space. */
html body a.policy-link {
  padding-bottom: 16px !important;
}
html body a.policy-link .micis-link-action {
  display: none !important;
}
