.office-layout {
  display: grid;
  grid-template-columns: 2fr minmax(260px, 0.8fr);
  gap: 14px;
  margin-bottom: 18px;
}
.office-panel,
.activity-panel {
  min-width: 0;
  border: 1px solid var(--line);
  background: #f8fafb;
}
.office-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
  background: white;
}
.office-heading strong,
.office-heading span {
  display: block;
}
.office-heading span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}
.live-indicator {
  display: flex !important;
  align-items: center;
  gap: 7px;
  color: var(--success) !important;
  font-weight: 800;
}
.office-floor {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  padding: 16px;
  background:
    linear-gradient(rgba(18, 60, 105, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 60, 105, 0.035) 1px, transparent 1px);
  background-size: 22px 22px;
}
.office-worker {
  display: grid;
  grid-template-columns: 105px 1fr;
  align-items: center;
  gap: 14px;
  min-height: 142px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid #8793a1;
  background: rgba(255, 255, 255, 0.94);
}
.office-worker.monitor-working {
  border-left-color: #2d79aa;
}
.office-worker.monitor-review,
.office-worker.monitor-warning,
.office-worker.monitor-planned {
  border-left-color: var(--gold);
}
.office-worker.monitor-stopped {
  border-left-color: #a33b3b;
  background: #fff8f7;
}
.worker-scene {
  position: relative;
  height: 112px;
}
.worker-scene img {
  position: absolute;
  right: 0;
  bottom: 13px;
  width: 67px;
  height: 78px;
  border-radius: 34px 34px 5px 5px;
  object-fit: cover;
}
.office-monitor {
  position: absolute;
  left: 0;
  top: 12px;
  z-index: 2;
  width: 55px;
  height: 47px;
  padding: 8px;
  border: 4px solid #304761;
  background: #dceaf3;
}
.office-monitor span {
  display: block;
  width: 70%;
  height: 3px;
  margin: 4px 0;
  background: #8faec4;
}
.monitor-working .office-monitor span {
  animation: office-work 1.2s ease-in-out infinite alternate;
  background: #287aa5;
}
.monitor-working .office-monitor span:nth-child(2) {
  animation-delay: 0.25s;
}
.monitor-working .office-monitor span:nth-child(3) {
  animation-delay: 0.5s;
}
.office-desk {
  position: absolute;
  right: 0;
  bottom: 6px;
  width: 100%;
  height: 13px;
  border-radius: 2px;
  background: #aa8b68;
  box-shadow: 8px 8px 0 -5px #816a50;
}
.office-worker > div:last-child strong,
.office-worker > div:last-child span,
.office-worker > div:last-child small {
  display: block;
}
.office-worker > div:last-child strong {
  color: var(--blue);
  font:
    500 21px Georgia,
    serif;
}
.office-worker > div:last-child span {
  margin: 5px 0;
  font-size: 12px;
  font-weight: 750;
}
.office-worker > div:last-child small {
  color: var(--muted);
  line-height: 1.4;
}
.activity-feed {
  max-height: 260px;
  overflow: auto;
  padding: 6px 14px;
}
.activity-event {
  display: grid;
  grid-template-columns: 9px 1fr;
  gap: 9px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.activity-event i {
  width: 8px;
  height: 8px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--success);
}
.activity-event.failed i {
  background: #a33b3b;
}
.activity-event strong,
.activity-event span {
  display: block;
  font-size: 11px;
}
.activity-event span {
  margin-top: 3px;
  color: var(--muted);
}

/* ==========================================================================
   LIVE ROBOT SCREENCAST & DIGITAL WORKSTATION VIEWER (MRD CONTROLADORIA)
   ========================================================================== */

.screencast-modal {
  background: #0f172a;
  color: #f8fafc;
  width: 92%;
  max-width: 1000px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  border: 1px solid #334155;
}

.screencast-header {
  padding: 16px 20px;
  background: #1e293b;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #334155;
}

.screencast-identity {
  display: flex;
  align-items: center;
  gap: 14px;
}

.screencast-identity img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid #38bdf8;
  object-fit: cover;
}

.screencast-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: #090d16;
}

.screencast-browser-window {
  background: #1e293b;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #334155;
}

.browser-bar {
  background: #0f172a;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #334155;
}

.browser-dots {
  display: flex;
  gap: 6px;
}

.browser-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot-red {
  background: #ef4444;
}
.dot-yellow {
  background: #f59e0b;
}
.dot-green {
  background: #22c55e;
}

.browser-url {
  background: #1e293b;
  color: #94a3b8;
  padding: 4px 12px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.8rem;
  flex: 1;
}

.screencast-viewport {
  position: relative;
  min-height: 380px;
  background: #ffffff;
  color: #1e293b;
  padding: 20px;
  font-family:
    system-ui,
    -apple-system,
    sans-serif;
  overflow: hidden;
}

.virtual-cursor {
  position: absolute;
  width: 20px;
  height: 20px;
  background: rgba(34, 197, 94, 0.4);
  border: 2px solid #22c55e;
  border-radius: 50%;
  pointer-events: none;
  z-index: 100;
  transition: all 0.6s ease-in-out;
  box-shadow: 0 0 12px #22c55e;
}

.screencast-diary {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 14px;
  font-family: monospace;
  font-size: 0.85rem;
  max-height: 140px;
  overflow-y: auto;
  color: #38bdf8;
}

.diary-entry {
  margin-bottom: 6px;
}
.diary-time {
  color: #94a3b8;
}

/* ==========================================================================
   ENHANCED ROBOT SCREENCAST & DIGITAL WORKSTATION VIEWER STYLES
   ========================================================================== */

.screencast-tabs {
  display: flex;
  background: #090d16;
  border-bottom: 1px solid #334155;
  padding: 0 16px;
  gap: 8px;
}

.screencast-tab {
  padding: 10px 16px;
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 600;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}

.screencast-tab.active {
  color: #38bdf8;
  border-bottom-color: #38bdf8;
  background: rgba(56, 189, 248, 0.05);
}

.screencast-tab:hover:not(.active) {
  color: #e2e8f0;
}

.virtual-cursor-pointer {
  position: absolute;
  width: 24px;
  height: 24px;
  pointer-events: none;
  z-index: 999;
  transition:
    top 0.7s cubic-bezier(0.4, 0, 0.2, 1),
    left 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.virtual-cursor-pointer.clicking::after {
  content: '';
  position: absolute;
  top: -6px;
  left: -6px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #22c55e;
  animation: click-ripple 0.4s ease-out forwards;
}

@keyframes click-ripple {
  0% {
    transform: scale(0.3);
    opacity: 1;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

.screencast-highlight-step {
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.screencast-active-target {
  background-color: #eff6ff !important;
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3) !important;
}
