* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
}


/* ============================================================
   Landing page
   ============================================================ */

body.landing-page {
  color: #172033;
  background:
    linear-gradient(
      135deg,
      #f6f8fb 0%,
      #eef3f8 100%
    );
}

.landing-page .topbar {
  height: 68px;
  display: flex;
  align-items: center;
  padding: 0 36px;
  background: #ffffff;
  border-bottom: 1px solid #dfe5ec;
}

.landing-page .brand {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: .08em;
  color: #183a61;
}

.landing-page .hero {
  min-height: calc(100vh - 68px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.landing-page .hero-card {
  width: 100%;
  max-width: 720px;
  padding: 56px;
  background: white;
  border: 1px solid #dfe5ec;
  border-radius: 14px;
  box-shadow:
    0 12px 32px
    rgba(20, 42, 70, .08);
}

.landing-page h1 {
  margin: 0;
  font-size: 38px;
  color: #183a61;
}

.landing-page .subtitle {
  margin-top: 10px;
  font-size: 20px;
  font-weight: 600;
  color: #526273;
}

.landing-page .description {
  margin-top: 30px;
  line-height: 1.65;
  font-size: 16px;
  color: #596878;
}

.landing-page .signin {
  display: inline-block;
  margin-top: 30px;
  padding: 12px 22px;
  color: white;
  background: #1769aa;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 700;
}

.landing-page .signin:hover {
  background: #125a92;
}

.landing-page .restricted {
  margin-top: 22px;
  font-size: 13px;
  color: #788593;
}


/* ============================================================
   Lab catalog
   ============================================================ */

body.labs-page {
  background: #f4f6f8;
  color: #172033;
}

.labs-page .topbar {
  height: 68px;
  background: white;
  border-bottom: 1px solid #dfe5ec;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
}

.labs-page .brand-area {
  display: flex;
  align-items: center;
  gap: 22px;
}

.labs-page .arista {
  font-weight: 800;
  letter-spacing: .08em;
  color: #183a61;
  font-size: 19px;
}

.labs-page .portal-title {
  padding-left: 22px;
  border-left: 1px solid #d8dee6;
  font-weight: 700;
  font-size: 17px;
}

.labs-page .identity {
  display: flex;
  align-items: center;
  gap: 11px;
}

.labs-page .avatar {
  width: 38px;
  height: 38px;
  object-fit: cover;
  border-radius: 50%;
}

.labs-page .identity-text {
  line-height: 1.25;
  text-align: right;
}

.labs-page .identity-name {
  font-size: 14px;
  font-weight: 700;
}

.labs-page .identity-role {
  font-size: 12px;
  color: #74808c;
}

.labs-page .signout {
  margin-left: 10px;
  color: #1769aa;
  text-decoration: none;
  font-size: 13px;
}

.labs-page main {
  max-width: 1320px;
  margin: 0 auto;
  padding: 36px 30px 70px;
}

.labs-page h1 {
  margin: 0;
  color: #183a61;
  font-size: 30px;
}

.labs-page .subtitle {
  margin-top: 7px;
  color: #687888;
  font-size: 15px;
}

.labs-page .impersonation {
  margin-top: 24px;
  padding: 12px 16px;
  background: #fff4d6;
  border: 1px solid #ecd28a;
  border-radius: 7px;
  font-size: 14px;
}

.labs-page .impersonation a {
  color: #1769aa;
}

.labs-page .tenant-section {
  margin-top: 36px;
}

.labs-page .tenant-section h2 {
  margin-bottom: 15px;
  font-size: 19px;
  color: #35485c;
}

.labs-page .lab-grid {
  display: grid;
  grid-template-columns:
    repeat(
      auto-fill,
      minmax(270px, 1fr)
    );
  gap: 16px;
}

.labs-page .lab-card {
  display: block;
  min-height: 152px;
  padding: 20px;
  border: 1px solid #dce2e8;
  border-radius: 9px;
  background: white;
  color: inherit;
  text-decoration: none;
  box-shadow:
    0 1px 3px
    rgba(20, 42, 70, .04);
  transition:
    transform .1s ease,
    box-shadow .1s ease;
}

.labs-page .lab-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 5px 14px
    rgba(20, 42, 70, .10);
}

.labs-page .lab-name {
  font-size: 16px;
  font-weight: 700;
  color: #174f82;
}

.labs-page .lab-state {
  margin-top: 19px;
  font-size: 14px;
  font-weight: 700;
  color: #667584;
}

.labs-page .lab-state.running {
  color: #188038;
}

.labs-page .lab-state.stopped {
  color: #6b7280;
}

.labs-page .lab-state.unavailable {
  color: #b3261e;
}

.labs-page .lab-schedule.available {
  color: #16833b;
}

.labs-page .lab-schedule.reserved {
  color: #b56a00;
}

.labs-page .lab-schedule.unscheduled,
.labs-page .lab-schedule.unavailable {
  color: #667085;
}

.labs-page .lab-next {
  margin-top: 2px;
  min-height: 18px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.25;
  color: #7b8793;
}

.labs-page .lab-devices {
  margin-top: 5px;
  min-height: 18px;
  font-size: 12px;
  color: #7b8793;
}

.labs-page .open-lab {
  margin-top: 18px;
  font-size: 13px;
  font-weight: 700;
  color: #1769aa;
}


/* ============================================================
   Individual lab page
   ============================================================ */

body.lab-page {
  padding: 18px;
  background: #f5f7fa;
}

.lab-page h1 {
  margin: 0 0 14px;
  color: #174ea6;
  font-size: 24px;
}

.lab-page iframe {
  display: block;
  width: 100%;
  border: 0;
  background: white;
  border-radius: 10px;
  margin-bottom: 16px;
  box-shadow:
    0 1px 4px
    rgba(0, 0, 0, .12);
}

.lab-page iframe.status {
  height: 350px;
}

.lab-page iframe.topology {
  height: min(1180px, 125vw);
  min-height: 720px;
}


/* ============================================================
   ACT status widget
   ============================================================ */

body.status-widget-page {
  padding: 16px;
  color: #202124;
}

.status-widget-page .status-overview-grid {
  display: grid;
  grid-template-columns:
    minmax(360px, 760px)
    minmax(320px, 520px);
  gap: 16px;
  align-items: stretch;
}

.status-widget-page .status-card {
  border: 1px solid #d0d7de;
  border-left: 6px solid #1e8e3e;
  border-radius: 10px;
  padding: 18px;
  min-width: 0;
  background: #fff;
}

.status-widget-page .lab-services-card {
  border: 1px solid #d0d7de;
  border-radius: 10px;
  padding: 18px;
  min-width: 0;
  background: #fff;
}

.status-widget-page .services-title {
  color: #174ea6;
  font-size: 18px;
  font-weight: 700;
}

.status-widget-page .service-list {
  margin-top: 10px;
}

.status-widget-page .service-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 42px;
  border-top: 1px solid #eef1f4;
}

.status-widget-page .service-row:first-child {
  border-top: 0;
}

.status-widget-page .service-name {
  color: #202124;
  font-size: 14px;
  font-weight: 700;
}

.status-widget-page .service-detail {
  margin-top: 2px;
  color: #6b7280;
  font-size: 12px;
}

.status-widget-page .service-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.status-widget-page .service-state::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.status-widget-page .state-ready,
.status-widget-page .state-online {
  color: #188038;
}

.status-widget-page .state-degraded,
.status-widget-page .state-waiting {
  color: #b06000;
}

.status-widget-page .state-auth-error,
.status-widget-page .state-http-error,
.status-widget-page .state-config-error,
.status-widget-page .state-offline,
.status-widget-page .state-inconsistent {
  color: #b3261e;
}

.status-widget-page .state-unreachable,
.status-widget-page .state-unknown,
.status-widget-page .state-missing,
.status-widget-page .state-expected-offline {
  color: #6b7280;
}

.status-widget-page .bootstrap-readiness {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #dfe5ec;
  color: #4b5563;
  font-size: 12px;
  font-weight: 700;
}

.status-widget-page .bootstrap-readiness-state {
  font-size: 12px;
  font-weight: 800;
}

.status-widget-page .readiness-ready {
  color: #188038;
}

.status-widget-page .readiness-waiting {
  color: #6b7280;
}

@media (max-width: 900px) {
  .status-widget-page .status-overview-grid {
    grid-template-columns: 1fr;
  }
}

.status-widget-page .title {
  font-size: 20px;
  font-weight: 700;
  color: #174ea6;
}

.status-widget-page .state {
  margin-top: 10px;
  font-size: 18px;
  font-weight: 700;
}

.status-widget-page .details {
  margin-top: 12px;
  line-height: 1.6;
}

.status-widget-page button {
  margin-top: 16px;
  padding: 9px 16px;
  border: 0;
  border-radius: 6px;
  background: #174ea6;
  color: white;
  cursor: pointer;
}

.status-widget-page button:disabled {
  opacity: .6;
  cursor: wait;
}

.status-widget-page .stop-button {
  background: #b3261e;
}

.status-widget-page .status-message {
  margin-top: 12px;
  color: #5f6368;
  font-size: 13px;
}

.status-widget-page .status-message.error {
  color: #b3261e;
}

.status-widget-page .status-policy-warning {
  margin-top: 12px;
  padding: 9px 11px;
  border: 1px solid #e3b341;
  border-radius: 6px;
  background: #fff8e1;
  color: #7a4b00;
  font-size: 13px;
  line-height: 1.35;
}

.status-widget-page .status-policy-deny {
  margin-top: 12px;
  padding: 9px 11px;
  border: 1px solid #e0a09a;
  border-radius: 6px;
  background: #fce8e6;
  color: #9b1c16;
  font-size: 13px;
  line-height: 1.35;
}

.status-widget-page .runtime-autostop-warning {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #e3b341;
  border-radius: 7px;
  background: #fff8e1;
  color: #7a4b00;
  font-size: 12px;
  line-height: 1.35;
}

.status-widget-page .runtime-autostop-warning[hidden] {
  display: none;
}

.status-widget-page .runtime-autostop-warning.extended {
  border-color: #9ec5a8;
  background: #eef7f0;
  color: #17632a;
}

.status-widget-page .runtime-autostop-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-weight: 800;
}

.status-widget-page .runtime-autostop-heading strong {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.status-widget-page .runtime-autostop-message {
  margin-top: 4px;
}

.status-widget-page .runtime-extend-button {
  margin-top: 8px;
  padding: 7px 11px;
}

/* ============================================================
   Native lab reservation calendar
   ============================================================ */

.lab-page .lab-calendar-card {
  margin-bottom: 16px;
  padding: 20px;
  background: white;
  border: 1px solid #dce2e8;
  border-radius: 10px;
  box-shadow:
    0 1px 4px
    rgba(0, 0, 0, .08);
}

.lab-page .calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.lab-page .calendar-title {
  font-size: 20px;
  font-weight: 700;
  color: #183a61;
}

.lab-page .calendar-subtitle {
  margin-top: 4px;
  font-size: 12px;
  color: #7b8793;
}

.lab-page .calendar-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lab-page .calendar-controls button {
  min-width: 38px;
  height: 34px;
  padding: 0 11px;
  border: 1px solid #ccd5df;
  border-radius: 6px;
  background: #fff;
  color: #174f82;
  font-weight: 600;
  cursor: pointer;
}

.lab-page .calendar-controls button:hover {
  background: #f3f6f9;
}

.lab-page .calendar-range {
  margin-top: 18px;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 700;
  color: #46586a;
}

.lab-page .calendar-message {
  padding: 18px 0;
  font-size: 13px;
  color: #7b8793;
}

.lab-page .calendar-message.error {
  color: #b3261e;
}

.lab-page .week-calendar {
  display: grid;

  grid-template-columns:
    64px
    repeat(
      7,
      minmax(135px, 1fr)
    );

  grid-template-rows:
    auto
    1440px;

  width: 100%;
  max-height: 700px;

  border-top:
    1px solid #dce2e8;
  border-left:
    1px solid #dce2e8;
  border-bottom:
    1px solid #dce2e8;

  overflow: auto;

  background: #fff;
}


/*
 * Sticky top-left corner.
 */

.lab-page .calendar-corner {
  position: sticky;
  top: 0;
  left: 0;

  z-index: 6;

  min-height: 52px;

  border-right:
    1px solid #dce2e8;
  border-bottom:
    1px solid #dce2e8;

  background: #fff;
}


/*
 * Sticky day headers.
 */

.lab-page .calendar-day-header {
  position: sticky;
  top: 0;

  z-index: 5;

  min-height: 52px;
  padding: 7px 8px;

  border-right:
    1px solid #dce2e8;
  border-bottom:
    1px solid #dce2e8;

  background: #fff;

  text-align: center;
}

.lab-page .calendar-day-header.today {
  background: #eef5fc;
}

.lab-page .calendar-weekday {
  font-size: 11px;
  font-weight: 700;

  text-transform: uppercase;

  color: #7b8793;
}

.lab-page .calendar-date {
  margin-top: 2px;

  font-size: 15px;
  font-weight: 700;

  color: #35485c;
}

.lab-page .calendar-day-header.today
.calendar-date {
  color: #1769aa;
}


/*
 * Sticky time axis.
 */

.lab-page .calendar-time-axis {
  position: sticky;
  left: 0;

  z-index: 4;

  height: 1440px;

  border-right:
    1px solid #dce2e8;

  background: #fff;
}

.lab-page .calendar-hour-label {
  position: absolute;

  right: 8px;

  transform:
    translateY(-7px);

  font-size: 10px;
  line-height: 14px;

  color: #7b8793;

  white-space: nowrap;
}


/*
 * 24-hour day tracks.
 *
 * Major line every hour,
 * lighter line every 30 minutes.
 */

.lab-page .calendar-day-track {
  position: relative;

  height: 1440px;

  border-right:
    1px solid #dce2e8;

  background-color: #fff;

  background-image:
    linear-gradient(
      to bottom,
      transparent 59px,
      #dce2e8 59px,
      #dce2e8 60px
    ),
    linear-gradient(
      to bottom,
      transparent 29px,
      #f0f3f6 29px,
      #f0f3f6 30px
    );

  background-size:
    100% 60px,
    100% 30px;
}

.lab-page .calendar-day-track.today {
  background-color: #f9fbfe;
}


/*
 * Reservations.
 */

.lab-page .calendar-event {
  position: absolute;

  left: 4px;
  right: 4px;

  z-index: 2;

  box-sizing: border-box;

  padding: 5px 7px;

  overflow: hidden;

  border-left:
    4px solid #b56a00;

  border-radius: 5px;

  background: #fff8eb;

  box-shadow:
    0 1px 2px
    rgba(0, 0, 0, .06);
}

.lab-page .calendar-event.current {
  border-left-color: #188038;
  background: #eef8f1;
}

.lab-page .calendar-event-time {
  font-size: 10px;
  font-weight: 700;

  line-height: 1.2;

  color: #5d6976;

  white-space: nowrap;
}

.lab-page .calendar-event-title {
  margin-top: 2px;

  font-size: 11px;
  font-weight: 700;

  line-height: 1.2;

  color: #27394b;
}

.lab-page .calendar-event-owner {
  margin-top: 3px;

  font-size: 9px;
  line-height: 1.2;

  color: #7b8793;

  overflow: hidden;
  text-overflow: ellipsis;

  white-space: nowrap;
}


/*
 * Current time.
 */

.lab-page .calendar-now-line {
  position: absolute;

  left: 0;
  right: 0;

  z-index: 3;

  height: 2px;

  background: #1769aa;

  pointer-events: none;
}

.lab-page .calendar-now-line::before {
  content: "";

  position: absolute;

  left: -4px;
  top: -3px;

  width: 8px;
  height: 8px;

  border-radius: 50%;

  background: #1769aa;
}


@media (max-width: 900px) {
  .lab-page .week-calendar {
    grid-template-columns:
      58px
      repeat(
        7,
        minmax(145px, 1fr)
      );
  }

  .lab-page .calendar-header {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* ============================================================
   Reservation create / cancel controls
   ============================================================ */

.lab-page .calendar-controls
.reserve-button {
  min-width: 108px;
  background: #1769aa;
  border-color: #1769aa;
  color: #fff;
}

.lab-page .calendar-controls
.reserve-button:hover {
  background: #125b93;
}

.lab-page .calendar-event-cancel {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .86);
  color: #7a3e00;
  font-size: 15px;
  line-height: 17px;
  cursor: pointer;
}

.lab-page .calendar-event-cancel:hover {
  background: #fff;
  color: #b3261e;
}

.reservation-dialog {
  width: min(560px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: 12px;
  color: #27394b;
  box-shadow:
    0 18px 55px
    rgba(20, 42, 70, .24);
}

.reservation-dialog::backdrop {
  background: rgba(19, 35, 52, .42);
}

.reservation-dialog form {
  padding: 22px;
}

.reservation-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.reservation-dialog-title {
  color: #183a61;
  font-size: 20px;
  font-weight: 700;
}

.reservation-dialog-subtitle {
  margin-top: 4px;
  color: #7b8793;
  font-size: 12px;
}

.reservation-dialog-close {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #697887;
  font-size: 24px;
  line-height: 30px;
  cursor: pointer;
}

.reservation-dialog label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #46586a;
  font-size: 12px;
  font-weight: 700;
}

.reservation-dialog input {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #cbd5df;
  border-radius: 6px;
  background: #fff;
  color: #27394b;
  font: inherit;
  font-weight: 400;
}

.reservation-dialog input:focus {
  outline: 2px solid rgba(23, 105, 170, .18);
  border-color: #1769aa;
}

.reservation-time-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.reservation-booking-as {
  margin-top: 16px;
  color: #697887;
  font-size: 12px;
}

.reservation-form-error {
  min-height: 18px;
  margin-top: 10px;
  color: #b3261e;
  font-size: 12px;
}

.reservation-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

.reservation-dialog-actions button {
  min-width: 88px;
  min-height: 36px;
  padding: 7px 14px;
  border: 1px solid #cbd5df;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
}

.reservation-dialog-actions
button.secondary {
  background: #fff;
  color: #46586a;
}

.reservation-dialog-actions
button.primary {
  border-color: #1769aa;
  background: #1769aa;
  color: #fff;
}

.reservation-dialog-actions
button:disabled {
  opacity: .6;
  cursor: wait;
}

@media (max-width: 620px) {
  .reservation-time-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Tenant reservation overview
   ============================================================ */

.labs-page .tenant-calendar-card {
  margin-top: 18px;
  padding: 0 18px 18px;
  border: 1px solid #dce2e8;
  border-radius: 9px;
  background: white;
  box-shadow:
    0 1px 3px
    rgba(20, 42, 70, .04);
}

.labs-page .tenant-calendar-summary {
  padding: 16px 0;
  color: #35485c;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}

.labs-page .tenant-calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.labs-page .tenant-calendar-range {
  font-size: 13px;
  font-weight: 700;
  color: #566777;
}

.labs-page .tenant-calendar-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.labs-page
.tenant-calendar-controls
button {
  min-width: 34px;
  height: 31px;
  padding: 0 10px;
  border: 1px solid #ccd5df;
  border-radius: 6px;
  background: white;
  color: #174f82;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.labs-page
.tenant-calendar-controls
button:hover {
  background: #f3f6f9;
}

.labs-page .tenant-calendar-message {
  padding: 12px 0;
  color: #7b8793;
  font-size: 12px;
}

.labs-page
.tenant-calendar-message.error {
  color: #b3261e;
}

.labs-page .tenant-calendar-scroll {
  width: 100%;
  overflow-x: auto;
}

.labs-page .tenant-calendar-grid {
  display: grid;
  grid-template-columns:
    minmax(185px, 220px)
    repeat(
      7,
      minmax(125px, 1fr)
    );
  min-width: 1100px;
  border-top: 1px solid #dce2e8;
  border-left: 1px solid #dce2e8;
}

.labs-page .tenant-calendar-corner,
.labs-page
.tenant-calendar-day-header {
  min-height: 54px;
  padding: 9px 10px;
  border-right: 1px solid #dce2e8;
  border-bottom: 1px solid #dce2e8;
  background: #f8fafc;
}

.labs-page .tenant-calendar-corner {
  position: sticky;
  left: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  color: #7b8793;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .05em;
}

.labs-page
.tenant-calendar-day-header.today {
  background: #eef6ff;
}

.labs-page .tenant-calendar-weekday {
  color: #7b8793;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.labs-page .tenant-calendar-date {
  margin-top: 2px;
  color: #35485c;
  font-size: 14px;
  font-weight: 700;
}

.labs-page
.tenant-calendar-day-header.today
.tenant-calendar-date {
  color: #1769aa;
}

.labs-page .tenant-calendar-lab {
  position: sticky;
  left: 0;
  z-index: 2;
  min-height: 62px;
  padding: 11px 10px;
  border-right: 1px solid #dce2e8;
  border-bottom: 1px solid #dce2e8;
  background: white;
  color: #174f82;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.labs-page
.tenant-calendar-lab:hover {
  text-decoration: underline;
}

.labs-page .tenant-calendar-cell {
  min-height: 62px;
  padding: 5px;
  border-right: 1px solid #dce2e8;
  border-bottom: 1px solid #dce2e8;
  background: white;
}

.labs-page
.tenant-calendar-cell.today {
  background: #f8fbff;
}

.labs-page .tenant-calendar-row-message {
  grid-column: span 7;
  min-height: 62px;
  padding: 13px 12px;
  border-right: 1px solid #dce2e8;
  border-bottom: 1px solid #dce2e8;
  color: #8a949e;
  font-size: 11px;
}

.labs-page
.tenant-calendar-row-message.error {
  color: #b3261e;
}

.labs-page .tenant-calendar-event {
  margin-bottom: 4px;
  padding: 5px 6px;
  border-left: 3px solid #b56a00;
  border-radius: 4px;
  background: #fff8eb;
  overflow: hidden;
}

.labs-page
.tenant-calendar-event.current {
  border-left-color: #188038;
  background: #eef8f1;
}

.labs-page
.tenant-calendar-event-time {
  color: #687481;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.labs-page
.tenant-calendar-event-title {
  margin-top: 2px;
  color: #27394b;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

@media (max-width: 900px) {
  .labs-page
  .tenant-calendar-header {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Lab agent status */

.lab-agent-row {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  min-height: 1.15rem;
  margin-top: 0.15rem;
  margin-bottom: 0.85rem;
}

.lab-agent-state {
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.25;
}

.lab-agent-version {
  font-size: 0.78rem;
  font-weight: 500;
  color: #687587;
}

.lab-agent-version:not(:empty)::before {
  content: "· ";
}

/* Healthy */

.lab-agent-state.online {
  color: #16883b;
}

/* Transitional */

.lab-agent-state.waiting {
  color: #a66a00;
}

/* Fault */

.lab-agent-state.offline,
.lab-agent-state.inconsistent {
  color: #b42318;
}

/* Expected / informational */

.lab-agent-state.expected-offline,
.lab-agent-state.unknown,
.lab-agent-state.unavailable {
  color: #687587;
}

/* ============================================================
   Administrative activity
   ============================================================ */

.activity-page {
  margin: 0;
  background: #f4f6f8;
  color: #27394b;
  font-family:
    Arial,
    Helvetica,
    sans-serif;
}

.activity-shell {
  max-width: 1500px;
  margin: 0 auto;
  padding: 28px;
}

.activity-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.activity-title {
  font-size: 26px;
  font-weight: 700;
  color: #183a61;
}

.activity-subtitle {
  margin-top: 4px;
  font-size: 13px;
  color: #7b8793;
}

.activity-back {
  color: #1769aa;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.activity-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;

  padding: 16px;

  border: 1px solid #dce2e8;
  border-radius: 9px;

  background: #fff;

  box-shadow:
    0 1px 4px
    rgba(0, 0, 0, .05);
}

.activity-filters label {
  display: flex;
  flex-direction: column;
  gap: 5px;

  min-width: 150px;

  font-size: 11px;
  font-weight: 700;

  color: #5d6976;
}

.activity-filters input,
.activity-filters select {
  height: 34px;

  box-sizing: border-box;

  padding: 0 9px;

  border: 1px solid #ccd5df;
  border-radius: 6px;

  background: #fff;

  color: #27394b;
}

.activity-filter-actions {
  display: flex;
  gap: 6px;
}

.activity-filter-actions button {
  height: 34px;
  padding: 0 13px;

  border: 1px solid #1769aa;
  border-radius: 6px;

  background: #1769aa;

  color: #fff;
  font-weight: 600;

  cursor: pointer;
}

.activity-filter-actions
button.secondary {
  border-color: #ccd5df;
  background: #fff;
  color: #46586a;
}

.activity-summary {
  display: flex;
  justify-content: space-between;

  margin: 14px 2px 8px;

  font-size: 12px;
  color: #7b8793;
}

.activity-message.error {
  color: #b3261e;
}

.activity-table-wrap {
  overflow-x: auto;

  border: 1px solid #dce2e8;
  border-radius: 9px;

  background: #fff;
}

.activity-table {
  width: 100%;

  border-collapse: collapse;

  font-size: 12px;
}

.activity-table th {
  padding: 10px 12px;

  border-bottom:
    1px solid #dce2e8;

  background: #f7f9fb;

  color: #5d6976;

  font-size: 11px;
  font-weight: 700;

  text-align: left;

  white-space: nowrap;
}

.activity-table td {
  padding: 10px 12px;

  border-bottom:
    1px solid #edf0f3;

  vertical-align: top;
}

.activity-table tbody
tr:hover {
  background: #f8fbfe;
}

.activity-result {
  font-weight: 700;
}

.activity-result.success {
  color: #188038;
}

.activity-result.failed {
  color: #b3261e;
}

.activity-result.rejected {
  color: #b56a00;
}

.activity-result.neutral {
  color: #7b8793;
}

.activity-empty {
  padding: 30px !important;

  text-align: center;

  color: #a0a9b2;
}

.lab-page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.page-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
}

.page-nav-link {
  margin-top: 8px;

  color: #1769aa;
  font-size: 13px;
  font-weight: 600;

  text-decoration: none;
}

.page-nav-link:hover {
  text-decoration: underline;
}

/* ============================================================
   Demo state reset controls
   ============================================================ */

.status-widget-page .status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.status-widget-page .status-actions button {
  margin-top: 16px;
}

.status-widget-page .reset-button {
  background: #b06000;
}

.status-widget-page .reset-availability {
  margin-top: 7px;
  color: #6b7280;
  font-size: 11px;
  line-height: 1.3;
}

.status-widget-page .reset-availability.ready {
  color: #188038;
}

.status-widget-page .reset-availability.warning,
.status-widget-page .reset-availability.active {
  color: #8a4b00;
}

.reset-dialog {
  width: min(560px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: #fff;
  color: #263238;
  box-shadow:
    0 18px 55px
    rgba(0, 0, 0, .25);
}

.reset-dialog::backdrop {
  background: rgba(36, 48, 61, .52);
}

.reset-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 28px 12px;
}

.reset-dialog-title {
  color: #183b66;
  font-size: 24px;
  font-weight: 800;
}

.reset-dialog-subtitle {
  margin-top: 4px;
  color: #65758b;
  font-size: 14px;
}

.reset-dialog-close {
  padding: 0;
  border: 0;
  background: transparent;
  color: #65758b;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.reset-warning {
  margin: 8px 28px 0;
  padding: 14px 16px;
  border: 1px solid #e6b75c;
  border-radius: 8px;
  background: #fff8e1;
  color: #6f4700;
  font-size: 14px;
  line-height: 1.45;
}

.reset-policy-message {
  margin: 14px 28px 0;
  color: #526071;
  font-size: 13px;
  line-height: 1.4;
}

.reset-policy-message.blocked {
  color: #9b1c16;
}

.reset-override-wrap {
  display: block;
  margin: 16px 28px 0;
  color: #455568;
  font-size: 13px;
  font-weight: 700;
}

.reset-override-wrap[hidden] {
  display: none;
}

.reset-override-wrap textarea {
  display: block;
  box-sizing: border-box;
  width: 100%;
  margin-top: 7px;
  padding: 10px 12px;
  border: 1px solid #c9d3df;
  border-radius: 7px;
  color: #263238;
  font: inherit;
  font-weight: 400;
  resize: vertical;
}

.reset-progress {
  margin: 16px 28px 0;
  padding: 11px 13px;
  border-radius: 7px;
  background: #eef5ff;
  color: #174ea6;
  font-size: 13px;
  line-height: 1.4;
}

.reset-progress.error {
  background: #fce8e6;
  color: #9b1c16;
}

.reset-progress.success {
  background: #e6f4ea;
  color: #137333;
}

.reset-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 22px 28px 26px;
}

.reset-dialog-actions button {
  padding: 10px 16px;
  border-radius: 7px;
  font-weight: 700;
  cursor: pointer;
}

.reset-dialog-actions .secondary {
  border: 1px solid #c9d3df;
  background: #fff;
  color: #455568;
}

.reset-dialog-actions .reset-primary {
  border: 1px solid #a05a00;
  background: #b06000;
  color: #fff;
}

.reset-dialog-actions button:disabled {
  opacity: .55;
  cursor: not-allowed;
}

/* ============================================================
   External authentication
   ============================================================ */

.landing-page .arista-signin {
  width: 100%;
  text-align: center;
}

.landing-page .signin-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0 18px;
  color: #8a96a3;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.landing-page .signin-divider::before,
.landing-page .signin-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #dfe5ec;
}

.landing-page .external-auth-title {
  margin-bottom: 14px;
  font-size: 15px;
  font-weight: 700;
  color: #35485c;
}

.landing-page .external-login-form,
.auth-action-page .password-reset-form {
  display: grid;
  gap: 14px;
}

.landing-page .external-login-form label,
.auth-action-page .password-reset-form label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #4d5d6d;
}

.landing-page .external-login-form input,
.auth-action-page .password-reset-form input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #cfd7e1;
  border-radius: 6px;
  background: #fff;
  color: #172033;
  font: inherit;
}

.landing-page .external-login-form input:focus,
.auth-action-page .password-reset-form input:focus {
  outline: 2px solid rgba(23, 105, 170, .2);
  border-color: #1769aa;
}

.landing-page .external-auth-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.primary-auth-button {
  padding: 11px 18px;
  border: 0;
  border-radius: 6px;
  background: #1769aa;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.primary-auth-button:hover {
  background: #125a92;
}

.primary-auth-button:disabled,
.link-button:disabled {
  opacity: .6;
  cursor: default;
}

.link-button {
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: #1769aa;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.external-auth-message,
.auth-action-message {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.45;
}

.external-auth-message.info,
.auth-action-message.info {
  background: #eef5fb;
  color: #315b80;
}

.external-auth-message.success,
.auth-action-message.success {
  background: #edf8f0;
  color: #28643a;
}

.external-auth-message.warning,
.auth-action-message.warning {
  background: #fff5df;
  color: #805d14;
}

.external-auth-message.error,
.auth-action-message.error {
  background: #fff0ef;
  color: #8d2c25;
}

/* ============================================================
   Identity Platform email action page
   ============================================================ */

body.auth-action-page {
  color: #172033;
  background:
    linear-gradient(
      135deg,
      #f6f8fb 0%,
      #eef3f8 100%
    );
}

.auth-action-page .topbar {
  height: 68px;
  display: flex;
  align-items: center;
  padding: 0 36px;
  background: #fff;
  border-bottom: 1px solid #dfe5ec;
}

.auth-action-page .brand {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: .08em;
  color: #183a61;
}

.auth-action-page .auth-action-shell {
  min-height: calc(100vh - 68px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.auth-action-page .auth-action-card {
  width: 100%;
  max-width: 560px;
  padding: 42px;
  background: #fff;
  border: 1px solid #dfe5ec;
  border-radius: 14px;
  box-shadow:
    0 12px 32px
    rgba(20, 42, 70, .08);
}

.auth-action-page h1 {
  margin: 0 0 20px;
  color: #183a61;
  font-size: 30px;
}

.auth-action-page .password-reset-form {
  margin-top: 20px;
}

.auth-action-page .auth-action-signin {
  display: inline-block;
  margin-top: 20px;
  padding: 11px 18px;
  border-radius: 6px;
  background: #1769aa;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.auth-action-page .auth-action-signin:hover {
  background: #125a92;
}

/* ============================================================
   Users & access administration
   ============================================================ */

.page-nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.access-admin-page {
  margin: 0;
  background: #f4f6f8;
  color: #27394b;
  font-family:
    Arial,
    Helvetica,
    sans-serif;
}

.access-admin-shell {
  max-width: 1500px;
  margin: 0 auto;
  padding: 28px;
}

.access-admin-topbar,
.access-admin-card-header,
.access-dialog-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.access-admin-topbar {
  margin-bottom: 18px;
}

.access-admin-title {
  color: #183a61;
  font-size: 26px;
  font-weight: 700;
}

.access-admin-subtitle {
  margin-top: 4px;
  color: #7b8793;
  font-size: 13px;
}

.access-admin-nav {
  display: flex;
  gap: 16px;
  align-items: center;
}

.access-admin-nav a {
  color: #1769aa;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.access-admin-nav a:hover {
  text-decoration: underline;
}

.access-admin-note {
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid #d7e3ef;
  border-radius: 8px;
  background: #eef5fb;
  color: #315b80;
  font-size: 13px;
  line-height: 1.45;
}

.access-admin-card {
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid #dce2e8;
  border-radius: 10px;
  background: #fff;
  box-shadow:
    0 1px 4px
    rgba(0, 0, 0, .05);
}

.access-admin-card h2,
.access-dialog-section h3 {
  margin: 0;
  color: #27394b;
}

.access-admin-card h2 {
  font-size: 17px;
}

.access-admin-card p,
.access-dialog-section p {
  margin: 5px 0 0;
  color: #7b8793;
  font-size: 12px;
  line-height: 1.4;
}

.access-user-form,
.access-grant-form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.access-user-form {
  grid-template-columns:
    minmax(240px, 1.4fr)
    minmax(220px, 1fr)
    minmax(220px, 1fr)
    auto;
  align-items: end;
}

.access-grant-form {
  grid-template-columns:
    minmax(180px, 1fr)
    minmax(180px, 1fr)
    minmax(210px, 1fr)
    auto;
  align-items: end;
}

.access-user-form label,
.access-grant-form label {
  display: grid;
  gap: 5px;
  color: #5d6976;
  font-size: 11px;
  font-weight: 700;
}

.access-user-form input,
.access-user-form select,
.access-grant-form input,
.access-grant-form select {
  box-sizing: border-box;
  height: 36px;
  width: 100%;
  padding: 0 10px;
  border: 1px solid #ccd5df;
  border-radius: 6px;
  background: #fff;
  color: #27394b;
  font: inherit;
  font-weight: 400;
}

.access-user-form input:focus,
.access-user-form select:focus,
.access-grant-form input:focus,
.access-grant-form select:focus {
  outline: 2px solid rgba(23, 105, 170, .16);
  border-color: #1769aa;
}

.access-user-form button,
.access-grant-form button,
.access-secondary-button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid #1769aa;
  border-radius: 6px;
  background: #1769aa;
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.access-secondary-button {
  border-color: #ccd5df;
  background: #fff;
  color: #46586a;
}

.access-secondary-button.compact {
  min-height: 30px;
  padding: 0 10px;
}

.access-secondary-button.danger {
  border-color: #e0b4b1;
  color: #a8322b;
}

.access-admin-summary {
  display: flex;
  gap: 28px;
  margin: 0 2px 18px;
  color: #6b7785;
  font-size: 12px;
}

.access-admin-summary strong {
  color: #183a61;
  font-size: 18px;
}

.access-admin-message {
  min-height: 0;
  margin-top: 10px;
  font-size: 12px;
}

.access-admin-message:empty {
  margin-top: 0;
}

.access-admin-message.info {
  color: #315b80;
}

.access-admin-message.success {
  color: #188038;
}

.access-admin-message.error {
  color: #b3261e;
}

.access-users-table-wrap {
  overflow-x: auto;
  margin-top: 14px;
  border: 1px solid #dce2e8;
  border-radius: 9px;
}

.access-users-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.access-users-table th {
  padding: 10px 12px;
  border-bottom: 1px solid #dce2e8;
  background: #f7f9fb;
  color: #5d6976;
  font-size: 11px;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}

.access-users-table td {
  padding: 11px 12px;
  border-bottom: 1px solid #edf0f3;
  vertical-align: middle;
}

.access-users-table tbody tr:hover {
  background: #f8fbfe;
}

.access-user-email {
  color: #27394b;
  font-weight: 700;
}

.access-user-name,
.access-muted {
  margin-top: 3px;
  color: #8a96a3;
  font-size: 11px;
}

.access-state-badge,
.access-grant-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.access-state-badge {
  padding: 4px 8px;
}

.access-state-badge.enabled {
  background: #edf8f0;
  color: #188038;
}

.access-state-badge.disabled {
  background: #f1f3f5;
  color: #6b7785;
}

.access-grant-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 220px;
}

.access-grant-badge {
  padding: 4px 7px;
  background: #eef5fb;
  color: #315b80;
}

.access-grant-badge.expired {
  background: #f1f3f5;
  color: #8a96a3;
  text-decoration: line-through;
}

.access-users-empty {
  padding: 30px !important;
  color: #a0a9b2;
  text-align: center;
}

.access-user-dialog {
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: #fff;
  color: #27394b;
  box-shadow:
    0 18px 55px
    rgba(0, 0, 0, .25);
}

.access-user-dialog::backdrop {
  background: rgba(36, 48, 61, .52);
}

.access-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px 16px;
  border-bottom: 1px solid #edf0f3;
}

.access-dialog-title {
  color: #183a61;
  font-size: 20px;
  font-weight: 800;
}

.access-dialog-subtitle {
  margin-top: 4px;
  color: #7b8793;
  font-size: 12px;
}

.access-dialog-close {
  padding: 0;
  border: 0;
  background: transparent;
  color: #65758b;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.access-dialog-section {
  padding: 18px 24px;
  border-bottom: 1px solid #edf0f3;
}

.access-dialog-section h3 {
  font-size: 14px;
}

.access-grants-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.access-grant-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  border: 1px solid #dce2e8;
  border-radius: 7px;
  background: #fbfcfd;
}

.access-grant-row.expired {
  opacity: .7;
}

.access-grant-title {
  font-size: 12px;
  font-weight: 700;
}

.access-grant-meta,
.access-expiry-note,
.access-grants-empty {
  margin-top: 3px;
  color: #8a96a3;
  font-size: 11px;
}

.access-policy-note {
  margin-top: 10px;
  padding: 9px 11px;
  border: 1px solid #cfe0ef;
  border-radius: 6px;
  background: #f4f9fd;
  color: #48657f;
  font-size: 11px;
  line-height: 1.4;
}

.access-link-button {
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: #1769aa;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.access-link-button.danger {
  color: #a8322b;
}

.access-user-dialog > .access-admin-message {
  padding: 0 24px 18px;
}

@media (max-width: 980px) {
  .access-user-form,
  .access-grant-form {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .access-admin-shell {
    padding: 18px;
  }

  .access-admin-topbar,
  .access-admin-card-header,
  .access-dialog-section-heading {
    flex-direction: column;
  }

  .access-user-form,
  .access-grant-form {
    grid-template-columns: 1fr;
  }

  .access-admin-summary {
    gap: 16px;
    flex-wrap: wrap;
  }
}

/* ============================================================
   Guided lab workflow
   ============================================================ */

.lab-workflow-card {
  margin-bottom: 16px;
  padding: 18px 20px;
  border: 1px solid #d7dee8;
  border-radius: 10px;
  background: #fff;
  box-shadow:
    0 1px 4px
    rgba(0, 0, 0, .08);
}

.workflow-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.workflow-title {
  color: #183b66;
  font-size: 20px;
  font-weight: 800;
}

.workflow-subtitle {
  margin-top: 3px;
  color: #65758b;
  font-size: 13px;
  line-height: 1.4;
}

.workflow-state {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eef2f7;
  color: #5f6b7a;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .03em;
}

.workflow-state.state-ready-for-demo {
  background: #e6f4ea;
  color: #137333;
}

.workflow-state.state-ready-for-reset,
.workflow-state.state-preparing,
.workflow-state.state-resetting,
.workflow-state.state-scheduled {
  background: #e8f0fe;
  color: #174ea6;
}

.workflow-state.state-grace {
  background: #fff4e5;
  color: #8a4b00;
}

.workflow-state.state-unavailable {
  background: #fce8e6;
  color: #9b1c16;
}

.workflow-body {
  display: grid;
  grid-template-columns:
    minmax(360px, 1fr)
    minmax(300px, .8fr);
  gap: 22px;
  margin-top: 18px;
}

.workflow-steps {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
}

.workflow-step {
  display: flex;
  gap: 9px;
  min-width: 0;
  padding: 9px 0;
  color: #526071;
}

.workflow-step-icon {
  display: inline-flex;
  flex: 0 0 22px;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 1px solid #c8d1dc;
  border-radius: 50%;
  color: #7a8796;
  font-size: 12px;
  font-weight: 800;
}

.workflow-step.complete
.workflow-step-icon {
  border-color: #1e8e3e;
  background: #e6f4ea;
  color: #137333;
}

.workflow-step.warning
.workflow-step-icon {
  border-color: #d99928;
  background: #fff4e5;
  color: #8a4b00;
}

.workflow-step strong {
  color: #26384d;
  font-size: 13px;
}

.workflow-step-detail {
  margin-top: 2px;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.35;
}

.workflow-action-panel {
  padding: 14px 16px;
  border: 1px solid #dbe4ef;
  border-radius: 9px;
  background: #f8fbff;
}

.workflow-next-label {
  color: #65758b;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .09em;
}

.workflow-next-message {
  margin-top: 5px;
  color: #26384d;
  font-size: 14px;
  line-height: 1.4;
}

.workflow-actions,
.workflow-reset-actions {
  margin-top: 13px;
}

.workflow-reset-actions {
  display: grid;
  grid-template-columns:
    minmax(160px, 1fr)
    auto;
  gap: 10px;
  align-items: end;
}

.workflow-reset-actions[hidden],
.workflow-actions[hidden],
.workflow-grace-actions[hidden] {
  display: none;
}

.workflow-reset-actions label {
  color: #526071;
  font-size: 12px;
  font-weight: 700;
}

.workflow-reset-actions select {
  box-sizing: border-box;
  width: 100%;
  margin-top: 5px;
  padding: 9px 10px;
  border: 1px solid #c9d3df;
  border-radius: 7px;
  background: #fff;
  color: #26384d;
}

.workflow-action-panel button,
.workflow-credential-actions button {
  padding: 9px 13px;
  border-radius: 7px;
  font-weight: 700;
  cursor: pointer;
}

.workflow-action-panel .primary {
  border: 1px solid #1769aa;
  background: #1769aa;
  color: #fff;
}

.workflow-action-panel .reset-primary {
  border: 1px solid #a05a00;
  background: #b06000;
  color: #fff;
}

.workflow-grace-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid #dbe4ef;
}

.workflow-grace-copy {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  color: #526071;
  font-size: 12px;
}

.workflow-grace-label {
  color: #a05a00;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
}

#workflow-grace-countdown {
  color: #8a4b00;
  font-size: 16px;
}

.workflow-reservations-shortcut {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #dbe4ef;
}

.workflow-reservations-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid #b9c7d8;
  border-radius: 7px;
  background: #fff;
  color: #174ea6;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.workflow-reservations-link:hover {
  background: #f3f7fc;
}

.lab-calendar-card {
  scroll-margin-top: 16px;
}

.workflow-grace-actions .secondary {
  border: 1px solid #b9c7d8;
  background: #fff;
  color: #174ea6;
}

.workflow-action-panel button:disabled,
.workflow-credential-actions button:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.workflow-credentials {
  display: grid;
  grid-template-columns:
    minmax(260px, 1fr)
    auto;
  gap: 12px 18px;
  align-items: center;
  margin-top: 16px;
  padding: 13px 15px;
  border: 1px solid #b9d3f4;
  border-radius: 8px;
  background: #f3f8ff;
  color: #26384d;
}

.workflow-credentials[hidden] {
  display: none;
}

.workflow-credentials-detail {
  margin-top: 3px;
  color: #65758b;
  font-size: 12px;
}

.workflow-credential-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.workflow-credential-actions .secondary {
  border: 1px solid #b9c7d8;
  background: #fff;
  color: #174ea6;
}

.workflow-copy-status {
  grid-column: 1 / -1;
  min-height: 16px;
  color: #137333;
  font-size: 12px;
}

.workflow-copy-status.error {
  color: #9b1c16;
}

.workflow-last-reset {
  margin-top: 12px;
  color: #748195;
  font-size: 11px;
}

.reset-profile-wrap {
  display: block;
  margin: 12px 28px 0;
  color: #455568;
  font-size: 13px;
  font-weight: 700;
}

.reset-profile-wrap select {
  display: block;
  box-sizing: border-box;
  width: 100%;
  margin-top: 7px;
  padding: 10px 12px;
  border: 1px solid #c9d3df;
  border-radius: 7px;
  background: #fff;
  color: #263238;
  font: inherit;
  font-weight: 400;
}

.reset-profile-wrap[hidden] {
  display: none;
}

.reset-revision-note {
  display: block;
  margin-top: 7px;
  color: #65758b;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.35;
}

.reset-revision-note.warning {
  color: #8a4b00;
}

@media (max-width: 900px) {
  .workflow-body {
    grid-template-columns: 1fr;
  }

  .workflow-steps {
    grid-template-columns: 1fr;
  }

  .workflow-credentials {
    grid-template-columns: 1fr;
  }

  .workflow-credential-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 600px) {
  .workflow-header {
    display: block;
  }

  .workflow-state {
    display: inline-block;
    margin-top: 9px;
  }

  .workflow-reset-actions {
    grid-template-columns: 1fr;
  }
}


/* ============================================================
   Demo profile administration
   ============================================================ */

.profile-admin-page {
  margin: 0;
  background: #f4f6f8;
  color: #27394b;
  font-family: Arial, Helvetica, sans-serif;
}

.profile-admin-shell {
  max-width: 1500px;
  margin: 0 auto;
  padding: 28px;
}

.profile-admin-topbar,
.profile-admin-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.profile-admin-topbar {
  margin-bottom: 18px;
}

.profile-admin-title {
  color: #183a61;
  font-size: 26px;
  font-weight: 700;
}

.profile-admin-subtitle {
  margin-top: 4px;
  color: #7b8793;
  font-size: 13px;
}

.profile-admin-nav {
  display: flex;
  gap: 16px;
  align-items: center;
}

.profile-admin-nav a,
.profile-lab-link,
.profile-link-button {
  color: #1769aa;
  font-weight: 600;
  text-decoration: none;
}

.profile-admin-nav a {
  font-size: 13px;
}

.profile-admin-nav a:hover,
.profile-lab-link:hover,
.profile-link-button:hover {
  text-decoration: underline;
}

.profile-admin-note,
.profile-policy-note {
  padding: 12px 14px;
  border: 1px solid #d7e3ef;
  border-radius: 8px;
  background: #eef5fb;
  color: #315b80;
  font-size: 12px;
  line-height: 1.45;
}

.profile-admin-note {
  margin-bottom: 18px;
}

.profile-policy-note {
  margin-top: 12px;
}

.profile-admin-card {
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid #dce2e8;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .05);
}

.profile-admin-card h2 {
  margin: 0;
  color: #27394b;
  font-size: 17px;
}

.profile-admin-card p {
  margin: 5px 0 0;
  color: #7b8793;
  font-size: 12px;
  line-height: 1.4;
}

.profile-primary-button,
.profile-secondary-button,
.profile-danger-button {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 6px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.profile-primary-button {
  border: 1px solid #1769aa;
  background: #1769aa;
  color: #fff;
}

.profile-secondary-button {
  border: 1px solid #ccd5df;
  background: #fff;
  color: #46586a;
}

.profile-danger-button {
  border: 1px solid #e0b4b1;
  background: #fff;
  color: #a8322b;
}

.profile-primary-button:disabled,
.profile-secondary-button:disabled,
.profile-danger-button:disabled {
  cursor: default;
  opacity: .5;
}

.profile-secondary-button.compact {
  min-height: 30px;
  padding: 0 10px;
}

.profile-admin-summary {
  display: flex;
  gap: 28px;
  margin: 18px 2px 4px;
  color: #6b7785;
  font-size: 12px;
}

.profile-admin-summary strong {
  color: #183a61;
  font-size: 18px;
}

.profile-admin-message {
  min-height: 0;
  margin-top: 10px;
  font-size: 12px;
}

.profile-admin-message:empty {
  margin-top: 0;
}

.profile-admin-message.info {
  color: #315b80;
}

.profile-admin-message.success {
  color: #188038;
}

.profile-admin-message.error {
  color: #b3261e;
}

.profile-catalog-filters {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(200px, 320px);
  gap: 12px;
  margin-top: 16px;
}

.profile-catalog-filters label,
.profile-description-form label,
.profile-dialog label {
  display: grid;
  gap: 5px;
  color: #5d6976;
  font-size: 11px;
  font-weight: 700;
}

.profile-catalog-filters input,
.profile-catalog-filters select,
.profile-description-form textarea,
.profile-dialog input,
.profile-dialog select,
.profile-dialog textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ccd5df;
  border-radius: 6px;
  background: #fff;
  color: #27394b;
  font: inherit;
  font-weight: 400;
}

.profile-catalog-filters input,
.profile-catalog-filters select,
.profile-dialog input[type="text"],
.profile-dialog select {
  min-height: 36px;
}

.profile-catalog-filters input:focus,
.profile-catalog-filters select:focus,
.profile-description-form textarea:focus,
.profile-dialog input:focus,
.profile-dialog select:focus,
.profile-dialog textarea:focus {
  outline: 2px solid rgba(23, 105, 170, .16);
  border-color: #1769aa;
}

.profile-description-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: end;
  margin-top: 16px;
}

.profile-table-wrap {
  overflow-x: auto;
  margin-top: 14px;
  border: 1px solid #dce2e8;
  border-radius: 9px;
}

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

.profile-table th {
  padding: 10px 12px;
  border-bottom: 1px solid #dce2e8;
  background: #f7f9fb;
  color: #5d6976;
  font-size: 11px;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}

.profile-table td {
  padding: 11px 12px;
  border-bottom: 1px solid #edf0f3;
  vertical-align: middle;
}

.profile-table tbody tr:hover {
  background: #f8fbfe;
}

.profile-file-table code {
  color: #34495e;
  font-size: 11px;
}

.profile-empty {
  padding: 24px;
  color: #8a96a3;
  font-size: 12px;
  text-align: center;
}

.profile-muted {
  color: #8a96a3;
  font-size: 11px;
}

.profile-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 300px;
}

.profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid #dce2e8;
  border-radius: 7px;
  background: #fbfcfd;
  color: #27394b;
  font-size: 11px;
  text-decoration: none;
}

.profile-chip:hover {
  border-color: #aac7df;
  background: #f5f9fc;
}

.profile-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 6px;
  border-radius: 999px;
  background: #f1f3f5;
  color: #65717f;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.profile-badge.published,
.profile-badge.ready {
  background: #edf8f0;
  color: #188038;
}

.profile-badge.draft {
  background: #eef5fb;
  color: #1769aa;
}

.profile-badge.warning {
  background: #fff4e5;
  color: #9c5a00;
}

.profile-row-actions,
.profile-card-actions,
.profile-draft-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-row-actions {
  justify-content: flex-end;
  white-space: nowrap;
}

.profile-draft-actions {
  justify-content: space-between;
  margin-top: 16px;
}

.profile-link-button {
  padding: 4px 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}

.profile-link-button.danger {
  color: #a8322b;
}

.profile-status-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.profile-status-card {
  padding: 16px;
  border: 1px solid #dce2e8;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .04);
}

.profile-status-label {
  color: #7b8793;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.profile-status-value {
  margin-top: 6px;
  color: #27394b;
  font-size: 18px;
  font-weight: 800;
}

.profile-status-value.ready {
  color: #188038;
}

.profile-status-value.warning {
  color: #9c5a00;
}

.profile-status-detail {
  margin-top: 4px;
  color: #7b8793;
  font-size: 11px;
  line-height: 1.4;
}

.profile-dialog {
  width: min(660px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: #fff;
  color: #27394b;
  box-shadow: 0 18px 55px rgba(0, 0, 0, .25);
}

.profile-dialog::backdrop {
  background: rgba(36, 48, 61, .52);
}

.profile-dialog form {
  display: grid;
  gap: 13px;
  padding: 22px 24px;
}

.profile-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin: -22px -24px 4px;
  padding: 22px 24px 16px;
  border-bottom: 1px solid #edf0f3;
}

.profile-dialog-title {
  color: #183a61;
  font-size: 20px;
  font-weight: 800;
}

.profile-dialog-subtitle {
  margin-top: 4px;
  color: #7b8793;
  font-size: 12px;
}

.profile-dialog-close {
  padding: 0;
  border: 0;
  background: transparent;
  color: #65758b;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.profile-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

.profile-lab-metadata-count {
  margin-top: 4px;
}

.profile-metadata-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.profile-metadata-panel {
  padding: 14px;
  border: 1px solid #e1e6eb;
  border-radius: 9px;
  background: #fbfcfd;
}

.profile-metadata-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.profile-metadata-panel h3 {
  margin: 0;
  color: #34495e;
  font-size: 13px;
}

.profile-metadata-panel p {
  margin-top: 3px;
  font-size: 11px;
}

.profile-metadata-editor {
  display: grid;
  gap: 8px;
}

.profile-metadata-row {
  display: grid;
  grid-template-columns: minmax(150px, .7fr) minmax(220px, 1.5fr) auto;
  gap: 8px;
  align-items: center;
}

.profile-metadata-row input {
  width: 100%;
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid #ccd5df;
  border-radius: 6px;
  background: #fff;
  color: #27394b;
  font: inherit;
  font-size: 12px;
}

.profile-metadata-row input:focus {
  outline: 2px solid rgba(23, 105, 170, .16);
  border-color: #1769aa;
}

.profile-metadata-toolbar,
.profile-metadata-save-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.profile-metadata-readonly {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.profile-metadata-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  max-width: 100%;
  padding: 5px 8px;
  border: 1px solid #dce6ef;
  border-radius: 999px;
  background: #f4f8fb;
  color: #41556a;
  font-size: 11px;
  line-height: 1.25;
}

.profile-metadata-chip strong {
  color: #1769aa;
}

.profile-metadata-dialog {
  width: min(760px, calc(100vw - 32px));
}

@media (max-width: 820px) {
  .profile-admin-shell {
    padding: 18px;
  }

  .profile-admin-topbar,
  .profile-admin-card-header {
    flex-direction: column;
  }

  .profile-status-grid,
  .profile-catalog-filters,
  .profile-description-form,
  .profile-metadata-columns,
  .profile-metadata-row {
    grid-template-columns: 1fr;
  }

  .profile-card-actions,
  .profile-admin-nav {
    flex-wrap: wrap;
  }
}

/* ============================================================
   Portal-admin view settings
   ============================================================ */

.view-settings-page {
  margin: 0;
  background: #f4f7fa;
  color: #27394b;
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

.view-settings-shell {
  width: min(980px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.view-settings-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.view-settings-title {
  color: #173a61;
  font-size: 28px;
  font-weight: 800;
}

.view-settings-subtitle {
  margin-top: 4px;
  color: #6f7f8e;
  font-size: 13px;
}

.view-settings-note {
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid #dce5ed;
  border-radius: 8px;
  background: #fff;
  color: #5a6b7b;
  font-size: 13px;
  line-height: 1.5;
}

.view-settings-card {
  overflow: hidden;
  border: 1px solid #dce5ed;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(30, 55, 80, .06);
}

.view-settings-card section {
  padding: 22px;
  border-bottom: 1px solid #e6edf3;
}

.view-settings-card h2 {
  margin: 0;
  color: #183a61;
  font-size: 18px;
}

.view-settings-card p {
  margin: 6px 0 16px;
  color: #758594;
  font-size: 13px;
  line-height: 1.45;
}

.view-setting-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #e0e8ef;
  border-radius: 8px;
  background: #fbfcfd;
  color: #33495d;
  cursor: pointer;
}

.view-setting-row + .view-setting-row {
  margin-top: 8px;
}

.view-setting-row input {
  margin-top: 2px;
}

.view-setting-row span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.view-setting-row small {
  color: #798896;
  font-size: 12px;
  font-weight: 400;
}

.view-settings-tenants {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.view-settings-tenants .view-setting-row + .view-setting-row {
  margin-top: 0;
}

.view-settings-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 18px 22px 10px;
}

.view-settings-actions button {
  min-height: 36px;
  padding: 7px 14px;
  border: 1px solid #cbd5df;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
}

.view-settings-actions .secondary {
  background: #fff;
  color: #46586a;
}

.view-settings-actions .primary {
  border-color: #1769aa;
  background: #1769aa;
  color: #fff;
}

.view-settings-message {
  min-height: 18px;
  padding: 0 22px 18px;
  color: #42627e;
  font-size: 12px;
}

@media (max-width: 700px) {
  .view-settings-topbar {
    flex-direction: column;
  }

  .view-settings-tenants {
    grid-template-columns: 1fr;
  }
}

.lab-page .calendar-event-edit {
  position: absolute;
  top: 3px;
  right: 24px;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .86);
  color: #315f86;
  font-size: 13px;
  line-height: 17px;
  cursor: pointer;
}

.lab-page .calendar-event-edit:hover {
  background: #fff;
  color: #1769aa;
}

/* ============================================================
   Documentation resource repository
   ============================================================ */

.resource-admin-shell {
  width: min(1240px, calc(100vw - 32px));
}

.resource-catalog-filters {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(180px, 260px);
  gap: 12px;
  margin-top: 16px;
}

.resource-catalog-filters label,
.resource-editor-dialog label,
.resource-small-dialog label,
.resource-target-linker label {
  display: grid;
  gap: 5px;
  color: #5d6976;
  font-size: 11px;
  font-weight: 700;
}

.resource-catalog-filters input,
.resource-catalog-filters select,
.resource-editor-dialog input,
.resource-editor-dialog select,
.resource-editor-dialog textarea,
.resource-small-dialog input,
.resource-small-dialog select,
.resource-small-dialog textarea,
.resource-target-linker input,
.resource-target-linker select {
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid #ccd5df;
  border-radius: 6px;
  background: #fff;
  color: #27394b;
  font: inherit;
  font-weight: 400;
}

.resource-editor-dialog textarea,
.resource-small-dialog textarea {
  min-height: 90px;
  resize: vertical;
}

.resource-catalog-filters input:focus,
.resource-catalog-filters select:focus,
.resource-editor-dialog input:focus,
.resource-editor-dialog select:focus,
.resource-editor-dialog textarea:focus,
.resource-small-dialog input:focus,
.resource-small-dialog select:focus,
.resource-small-dialog textarea:focus,
.resource-target-linker input:focus,
.resource-target-linker select:focus {
  outline: 2px solid rgba(23, 105, 170, .16);
  border-color: #1769aa;
}

.resource-table td:nth-child(2) {
  min-width: 320px;
}

.resource-title-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #1769aa;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.resource-title-button:hover {
  text-decoration: underline;
}

.resource-row-description {
  max-width: 520px;
  margin-top: 4px;
  overflow: hidden;
  color: #7b8793;
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-row-action {
  text-align: right;
  white-space: nowrap;
}

.profile-badge.resource-type-image {
  background: #eef5fb;
  color: #1769aa;
}

.profile-badge.resource-type-pdf {
  background: #fff0f0;
  color: #a8322b;
}

.profile-badge.resource-type-video {
  background: #f4effb;
  color: #6843a5;
}

.profile-badge.resource-type-link {
  background: #edf8f0;
  color: #188038;
}

.profile-badge.resource-type-markdown {
  background: #fff4e5;
  color: #9c5a00;
}

.resource-editor-dialog {
  width: min(900px, calc(100vw - 32px));
}

.resource-small-dialog {
  width: min(700px, calc(100vw - 32px));
}

.resource-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.resource-content-fields {
  display: grid;
  gap: 10px;
}

.resource-current-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  border: 1px solid #dce2e8;
  border-radius: 8px;
  background: #f8fafc;
  color: #5d6976;
  font-size: 12px;
}

.resource-editor-secondary {
  display: grid;
  gap: 14px;
  padding-top: 4px;
}

.resource-editor-section {
  padding: 13px;
  border: 1px solid #e1e6eb;
  border-radius: 9px;
  background: #fbfcfd;
}

.resource-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.resource-section-header h3 {
  margin: 0;
  color: #34495e;
  font-size: 13px;
}

.resource-section-header p {
  margin: 3px 0 0;
  color: #7b8793;
  font-size: 11px;
}

.resource-sublist,
.resource-target-list {
  display: grid;
  gap: 8px;
}

.resource-sublist-row,
.resource-target-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid #e5eaef;
  border-radius: 8px;
  background: #fff;
  color: #5d6976;
  font-size: 11px;
}

.resource-sublist-row strong,
.resource-target-row strong {
  color: #34495e;
}

.resource-sublist-empty {
  padding: 12px;
  color: #8a96a3;
  font-size: 11px;
  text-align: center;
}

.resource-editor-actions {
  align-items: center;
}

.resource-dialog-spacer {
  flex: 1 1 auto;
}

.resource-button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.resource-button-link:hover {
  text-decoration: none;
}

.profile-resource-dialog {
  width: min(820px, calc(100vw - 32px));
}

.profile-resource-dialog-body {
  display: grid;
  gap: 13px;
  padding: 22px 24px;
}

.profile-resource-dialog-body > .profile-dialog-header {
  margin: -22px -24px 4px;
}

.resource-target-main {
  min-width: 0;
}

.resource-target-heading {
  display: flex;
  align-items: center;
  gap: 8px;
}

.resource-target-heading strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-target-detail {
  margin-top: 3px;
  color: #7b8793;
  font-size: 11px;
}

.resource-target-linker {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(150px, .4fr) auto auto;
  gap: 10px;
  align-items: end;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid #edf0f3;
}

@media (max-width: 820px) {
  .resource-catalog-filters,
  .resource-editor-grid,
  .resource-target-linker {
    grid-template-columns: 1fr;
  }

  .resource-current-content,
  .resource-sublist-row,
  .resource-target-row,
  .resource-section-header {
    align-items: stretch;
    flex-direction: column;
  }
}

/* ============================================================
   Contextual lab access cards
   ============================================================ */

.lab-access-grid {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.lab-tool-card {
  padding: 18px 20px;
  border: 1px solid #d7dee8;
  border-radius: 10px;
  background: #fff;
  box-shadow:
    0 1px 4px
    rgba(0, 0, 0, .08);
}

.lab-tool-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.lab-tool-card-title {
  color: #183b66;
  font-size: 18px;
  font-weight: 800;
}

.lab-tool-card-subtitle {
  margin-top: 3px;
  color: #65758b;
  font-size: 12px;
  line-height: 1.4;
}

.lab-tool-primary,
.management-tool-button {
  padding: 9px 13px;
  border: 1px solid #1769aa;
  border-radius: 7px;
  background: #1769aa;
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.lab-tool-primary:disabled,
.management-tool-button:disabled {
  border-color: #c9d3df;
  background: #eef2f7;
  color: #7a8796;
  cursor: not-allowed;
}

.lab-tool-access-message {
  margin-top: 13px;
  padding: 8px 10px;
  border-radius: 7px;
  font-size: 12px;
  line-height: 1.4;
}

.lab-tool-access-message.available {
  border: 1px solid #b8dfc3;
  background: #f1faf3;
  color: #246b39;
}

.lab-tool-access-message.locked {
  border: 1px solid #dbe4ef;
  background: #f7f9fc;
  color: #65758b;
}

.lab-resource-heading {
  margin-top: 16px;
  color: #455568;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
}

.lab-resource-list {
  margin-top: 7px;
}

.lab-resource-row {
  padding: 10px 0;
  border-top: 1px solid #e3e8ef;
}

.lab-resource-row:first-child {
  border-top: 0;
}

.lab-resource-title {
  color: #1769aa;
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}

.lab-resource-title:hover {
  text-decoration: underline;
}

.lab-resource-description {
  margin-top: 3px;
  color: #526071;
  font-size: 12px;
  line-height: 1.4;
}

.lab-resource-meta,
.lab-resource-more,
.lab-resource-empty {
  margin-top: 3px;
  color: #7a8796;
  font-size: 11px;
}

.management-tool-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 16px;
}

@media (max-width: 900px) {
  .lab-access-grid {
    grid-template-columns: 1fr;
  }

  .lab-tool-card-header {
    display: block;
  }

  .lab-tool-primary {
    margin-top: 12px;
  }
}

/* ============================================================
   Lab / profile presentation workspace
   ============================================================ */

.lab-presentation-workspace {
  margin-bottom: 16px;
  padding: 18px 20px 20px;
  border: 1px solid #d7dee8;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
}

.lab-presentation-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.lab-presentation-title {
  color: #174ea6;
  font-size: 22px;
  font-weight: 800;
}

.lab-presentation-profile-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 10px;
  color: #526071;
  font-size: 12px;
}

.lab-presentation-profile-row label {
  font-weight: 800;
}

#presentation-profile-select {
  min-width: 180px;
  min-height: 34px;
  padding: 6px 30px 6px 9px;
  border: 1px solid #cbd5df;
  border-radius: 6px;
  background: #fff;
  color: #27394b;
  font: inherit;
  font-size: 13px;
}

.lab-presentation-applied {
  color: #667789;
}

.lab-presentation-description {
  max-width: 1100px;
  margin-top: 14px;
  color: #3f5062;
  font-size: 13px;
  line-height: 1.55;
}

.lab-presentation-profile-resources {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #edf0f3;
}

.presentation-profile-resources-label {
  margin-bottom: 7px;
  color: #455568;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.presentation-profile-resource-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.presentation-resource-chip {
  max-width: 360px;
  padding: 8px 10px;
  border: 1px solid #d9e1ea;
  border-radius: 7px;
  background: #f8fafc;
}

.presentation-resource-chip-title {
  color: #1769aa;
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
}

.presentation-resource-chip-title:hover {
  text-decoration: underline;
}

.presentation-resource-chip-meta {
  margin-top: 2px;
  color: #7a8796;
  font-size: 10px;
}

.lab-presentation-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 18px;
  border-bottom: 1px solid #dce3eb;
}

.lab-presentation-tab {
  position: relative;
  margin-bottom: -1px;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-bottom-color: #dce3eb;
  border-radius: 7px 7px 0 0;
  background: transparent;
  color: #526071;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.lab-presentation-tab:hover {
  background: #f6f8fb;
  color: #174f82;
}

.lab-presentation-tab.active {
  border-color: #dce3eb;
  border-bottom-color: #fff;
  background: #fff;
  color: #174ea6;
}

.lab-presentation-panel {
  padding-top: 14px;
}

.lab-presentation-workspace iframe.topology {
  margin-bottom: 0;
  box-shadow: none;
  border-radius: 7px;
}

.presentation-tab-heading {
  margin-bottom: 12px;
}

.presentation-tab-title {
  color: #183b66;
  font-size: 17px;
  font-weight: 800;
}

.presentation-tab-description {
  max-width: 1100px;
  margin-top: 4px;
  color: #607184;
  font-size: 12px;
  line-height: 1.5;
}

.presentation-primary-resource {
  min-width: 0;
}

.presentation-primary-card {
  padding: 16px;
  border: 1px solid #dce3eb;
  border-radius: 8px;
  background: #f8fafc;
  color: #455568;
  line-height: 1.5;
}

.presentation-primary-card a,
.presentation-primary-card strong {
  color: #1769aa;
  font-weight: 800;
  text-decoration: none;
}

.presentation-pdf-frame {
  width: 100%;
  height: min(900px, 75vh);
  margin: 0;
  border: 1px solid #dce3eb;
  border-radius: 8px;
  box-shadow: none;
}

.presentation-markdown {
  margin: 0;
  padding: 16px;
  overflow: auto;
  border: 1px solid #dce3eb;
  border-radius: 8px;
  background: #f8fafc;
  color: #34475a;
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.55;
}

.presentation-related-section {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #e3e8ef;
}

.presentation-related-heading {
  color: #455568;
  font-size: 12px;
  font-weight: 800;
}

.presentation-related-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 8px 16px;
  margin-top: 7px;
}

.presentation-related-resource {
  min-width: 0;
  padding: 9px 0;
}

.presentation-related-title {
  color: #1769aa;
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
}

.presentation-related-title:hover {
  text-decoration: underline;
}

.presentation-related-description {
  margin-top: 3px;
  color: #526071;
  font-size: 11px;
  line-height: 1.4;
}

.presentation-related-meta {
  margin-top: 3px;
  color: #7a8796;
  font-size: 10px;
}

.diagram-viewer {
  border: 1px solid #d5dde7;
  border-radius: 9px;
  overflow: hidden;
  background: #0f1728;
}

.diagram-viewer-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-height: 42px;
  padding: 6px 8px;
  border-bottom: 1px solid #d5dde7;
  background: #f8fafc;
}

.diagram-viewer-status {
  min-width: 48px;
  margin-right: 4px;
  color: #697887;
  font-size: 11px;
  text-align: right;
}

.diagram-viewer-button {
  min-width: 34px;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid #cbd5df;
  border-radius: 6px;
  background: #fff;
  color: #174f82;
  font: inherit;
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}

.diagram-viewer-button:hover {
  background: #eef5fb;
}

.diagram-viewer-canvas {
  position: relative;
  height: clamp(620px, 78vh, 1080px);
  overflow: hidden;
  background: #0f1728;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.diagram-viewer-canvas.dragging {
  cursor: grabbing;
}

.diagram-viewer-image {
  position: absolute;
  top: 0;
  left: 0;
  max-width: none;
  transform-origin: 0 0;
  will-change: transform;
  pointer-events: none;
}

@media (max-width: 760px) {
  .lab-presentation-workspace {
    padding: 15px;
  }

  .lab-presentation-profile-row {
    align-items: stretch;
    flex-direction: column;
  }

  #presentation-profile-select {
    width: 100%;
  }

  .diagram-viewer-canvas {
    height: 68vh;
    min-height: 460px;
  }
}
