/* =========================================================================
   TELMET OPS CONTROLS — EXACT APPSHEET DROPDOWN & CAMERA UPLOAD BOXES
   High-specificity rules isolated from index.html global input/button styles
   ========================================================================= */

.ops-app-shell .ops-ms-wrap {
  position: relative;
  width: 100%;
  margin-top: 4px;
}

.ops-app-shell button.ops-ms-trigger {
  width: 100%;
  min-height: 42px;
  padding: 8px 34px 8px 12px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: #14171f;
  color: #f8fafc;
  font-size: 13.5px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  position: relative;
  box-shadow: none;
}

.ops-app-shell button.ops-ms-trigger:hover,
.ops-app-shell button.ops-ms-trigger.open {
  border-color: #f8fafc;
  background: #181c26;
}

.ops-app-shell .ops-ms-caret {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #cbd5e1;
  font-size: 11px;
  pointer-events: none;
}

.ops-app-shell .ops-ms-placeholder {
  color: #64748b;
}

.ops-app-shell .ops-ms-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #f8fafc;
  font-size: 12px;
  font-weight: 600;
}

.ops-app-shell .ops-ms-menu {
  margin-top: 2px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: #2b2d33;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.72);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.ops-app-shell .ops-ms-searchbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: #16181d;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
}

.ops-app-shell .ops-ms-searchbar input[type="text"] {
  flex: 1;
  width: auto;
  min-width: 0;
  height: 32px;
  margin: 0;
  padding: 4px 6px;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  color: #f8fafc;
  font-size: 13.5px;
  outline: none;
}

.ops-app-shell button.ops-ms-addbtn {
  width: 30px;
  height: 30px;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: #f8fafc;
  font-size: 20px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ops-app-shell button.ops-ms-addbtn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.ops-app-shell label.ops-ms-selectall {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 11px 14px;
  background: #3a3d45;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  cursor: pointer;
  user-select: none;
}

.ops-app-shell .ops-ms-list {
  display: flex;
  flex-direction: column;
  max-height: 240px;
  overflow-y: auto;
  background: #2f3138;
}

.ops-app-shell label.ops-ms-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 11px 14px;
  font-size: 13.5px;
  font-weight: 500;
  color: #f1f5f9;
  cursor: pointer;
  user-select: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.ops-app-shell label.ops-ms-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.ops-app-shell .ops-ms-item input[type="checkbox"],
.ops-app-shell .ops-ms-selectall input[type="checkbox"] {
  width: 17px;
  height: 17px;
  min-width: 17px;
  margin: 0;
  padding: 0;
  accent-color: var(--ops-accent);
  cursor: pointer;
  flex-shrink: 0;
}

.ops-app-shell .ops-ms-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #1d2027;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 12px;
  color: #94a3b8;
}

/* =========================================================================
   EXACT APPSHEET CAMERA / FILE UPLOAD BOX (Replaces ugly browser Choose File)
   ========================================================================= */
.ops-app-shell .ops-photo-picker {
  position: relative;
  width: 100%;
  margin-top: 4px;
}

.ops-app-shell .ops-photo-picker input[type="file"] {
  display: none;
}

.ops-app-shell .ops-photo-drop {
  width: 100%;
  min-height: 76px;
  padding: 14px 16px;
  border-radius: 6px;
  border: 1px dashed rgba(255, 255, 255, 0.26);
  background: #141820;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.ops-app-shell .ops-photo-drop:hover {
  border-color: rgba(255, 255, 255, 0.55);
  background: #1b212e;
  color: #ffffff;
}

.ops-app-shell .ops-photo-preview-wrap {
  position: relative;
  width: 100%;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #0b0e14;
}

.ops-app-shell .ops-photo-preview-wrap img {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  cursor: zoom-in;
}

.ops-app-shell .ops-photo-overlay-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding: 7px 10px;
  background: rgba(18, 22, 31, 0.94);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.ops-app-shell .ops-photo-act {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: #1f2634;
  color: #f8fafc;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.ops-app-shell .ops-photo-act:hover {
  background: #2b3447;
}
.ops-app-shell .ops-photo-act.danger {
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.4);
}

/* =========================================================================
   POLISH v1.8: HIGH-VISIBILITY BACK BUTTON, SPINNING SYNC, & BLUE RE-OPEN
   ========================================================================= */
.ops-app-shell button.ops-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  padding: 0 11px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.09);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}
.ops-app-shell button.ops-back-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.5);
}

@keyframes opsSpinAnim {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.ops-app-shell .ops-spin {
  animation: opsSpinAnim 0.85s linear infinite;
}

/* Blue RE-OPEN (zero purple anywhere!) */
.ops-app-shell .ops-st-RE-OPEN {
  background: rgba(37, 99, 235, 0.24);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.45);
}
.ops-app-shell .ops-fab.reopen {
  background: #2563eb;
  color: #ffffff;
}

/* =========================================================================
   PHOTO SOURCE 2-OPTION ACTION SHEET + ONE-TIME PERMISSIONS + LIVE CAMERA
   ========================================================================= */
.ops-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99998;
  background: rgba(2, 6, 16, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  backdrop-filter: blur(4px);
}

.ops-modal-card,
.ops-sheet-card,
.ops-cam-card {
  width: 100%;
  max-width: 380px;
  background: #181e2a;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  padding: 18px;
  color: #f8fafc;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.72);
  font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ops-cam-card {
  max-width: 520px;
  padding: 14px;
}

.ops-modal-title,
.ops-sheet-hdr {
  font-size: 15px;
  font-weight: 800;
  color: #f8fafc;
  margin-bottom: 8px;
}

.ops-sheet-hdr {
  text-align: center;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 14px;
}

.ops-modal-sub {
  margin: 0 0 14px;
  font-size: 12.5px;
  color: #94a3b8;
  line-height: 1.45;
}

.ops-perm-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.ops-perm-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 11px;
  border-radius: 8px;
  background: #12161f;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.ops-perm-ico {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ops-perm-name {
  font-size: 13px;
  font-weight: 700;
  color: #f8fafc;
}

.ops-perm-desc {
  font-size: 11.5px;
  color: #94a3b8;
}

.ops-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.ops-modal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.ops-modal-btn.sec {
  background: #202838;
  color: #cbd5e1;
}
.ops-modal-btn.pri {
  background: #f8fafc;
  color: #0b0e14;
  border-color: #f8fafc;
}

.ops-sheet-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.ops-sheet-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 18px 12px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: #12161f;
  color: #f8fafc;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.14s, border-color 0.14s;
}
.ops-sheet-opt:hover {
  background: #222b3c;
  border-color: rgba(255, 255, 255, 0.45);
}

.ops-sheet-cancel {
  width: 100%;
  padding: 10px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.ops-sheet-cancel:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #f8fafc;
}

.ops-cam-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 700;
}

.ops-cam-stage {
  width: 100%;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ops-cam-stage video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ops-cam-foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}

/* =========================================================================
   SUNLIGHT LEGIBILITY v2.1: BRIGHT WHITE TITLES/LABELS, MUTED READ-ONLY TEXT
   ========================================================================= */
.ops-app-shell .ops-detail-label,
.ops-app-shell .ops-detail-label span,
.ops-app-shell .ops-form-item > label,
.ops-app-shell .ops-screen-title,
.ops-app-shell .ops-appbar-title {
  color: #ffffff;
  font-weight: 700;
}

.ops-app-shell .ops-detail-rowval,
.ops-app-shell .ops-compact-val,
.ops-app-shell .ops-form-item input:not([readonly]),
.ops-app-shell .ops-form-item select,
.ops-app-shell .ops-form-item textarea {
  color: #ffffff;
}

.ops-app-shell .ops-form-item input[readonly] {
  color: rgba(255, 255, 255, 0.56);
  background: #141923;
  border-color: rgba(255, 255, 255, 0.1);
}

/* =========================================================================
   POLISH v2.4: BOLD CORAL-RED REQUIRED LABELS (CLEAN, COMPACT, HIGH CONTRAST)
   ========================================================================= */
.ops-app-shell .ops-req-label,
.ops-app-shell .ops-detail-label span.ops-req-label,
.ops-app-shell .ops-form-item > label.ops-req-label {
  color: #f87171 !important;
  font-weight: 800 !important;
}

.ops-app-shell .ops-req-hint {
  display: none !important;
}

.ops-app-shell button.ops-close-ticket-btn {
  width: 100%;
  padding: 13px 18px;
  border-radius: 8px;
  border: 1px solid rgba(52, 211, 153, 0.65);
  background: linear-gradient(135deg, #059669, #10b981);
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.4px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
  transition: transform 0.12s ease, filter 0.15s ease;
}
.ops-app-shell button.ops-close-ticket-btn:hover {
  filter: brightness(1.08);
}
.ops-app-shell button.ops-close-ticket-btn:active {
  transform: scale(0.98);
}
.ops-app-shell button.ops-close-ticket-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* =========================================================================
   UNIFIED STATUS DASHBOARD v3.0 (STACKED MULTI-STATUS & DOMAIN BARS)
   ========================================================================= */
.ops-app-shell .ops-sd-wrap {
  padding: 12px 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ops-app-shell .ops-sd-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ops-app-shell .ops-sd-top h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.2px;
}

.ops-app-shell .ops-sd-card {
  background: #141923;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 12px 13px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ops-app-shell .ops-sd-card-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}

.ops-app-shell .ops-sd-card-title {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: #ffffff;
}

.ops-app-shell .ops-sd-total-pill {
  font-size: 12px;
  font-weight: 800;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 2px 9px;
  border-radius: 999px;
}

.ops-app-shell .ops-sd-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ops-app-shell .ops-sd-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.ops-app-shell .ops-sd-chip:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.3);
}
.ops-app-shell .ops-sd-chip.is-static {
  cursor: default;
  padding: 2px 6px;
  font-size: 10.5px;
  background: transparent;
  border-color: transparent;
  color: rgba(255, 255, 255, 0.82);
}

.ops-app-shell .ops-sd-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ops-app-shell .ops-sd-stack-track {
  width: 100%;
  height: 28px;
  background: #0b0e14;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  overflow: hidden;
  display: flex;
  gap: 2px;
  padding: 2px;
  box-sizing: border-box;
}

.ops-app-shell .ops-sd-stack-track.is-sub {
  height: 22px;
}

.ops-app-shell .ops-sd-seg {
  height: 100%;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  font-size: 11px;
  font-weight: 800;
  color: #090d14;
  cursor: pointer;
  overflow: hidden;
  white-space: nowrap;
  min-width: 24px;
  box-sizing: border-box;
  transition: filter 0.12s ease, transform 0.12s ease;
}
.ops-app-shell .ops-sd-seg:hover {
  filter: brightness(1.12);
}
.ops-app-shell .ops-sd-seg.is-light-txt {
  color: #ffffff;
}

.ops-app-shell .ops-sd-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ops-app-shell .ops-sd-row-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.ops-app-shell .ops-sd-row-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 800;
  color: #ffffff;
  cursor: pointer;
}
.ops-app-shell .ops-sd-row-name:hover {
  text-decoration: underline;
}

.ops-app-shell .ops-sd-row-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
}

.ops-app-shell .ops-sd-row-split {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.65);
}

.ops-app-shell .ops-sd-bar-shell {
  width: 100%;
  background: #0b0e14;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  padding: 2px;
  box-sizing: border-box;
}

.ops-app-shell .ops-sd-bar-inner {
  height: 18px;
  display: flex;
  gap: 2px;
  border-radius: 5px;
  overflow: hidden;
  min-width: 18px;
}

/* =========================================================================
   BARCODE / QR LIVE SCANNER RETICLE & DATETIME-LOCAL PICKER (v3.4)
   ========================================================================= */
.ops-scan-reticle {
  position: absolute;
  width: 78%;
  height: 46%;
  border: 2px solid rgba(56, 189, 248, 0.92);
  border-radius: 10px;
  box-shadow: 0 0 0 2000px rgba(2, 6, 16, 0.48);
  pointer-events: none;
  overflow: hidden;
}

.ops-scan-line {
  position: absolute;
  left: 6%;
  right: 6%;
  height: 2px;
  background: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.9);
  animation: opsScanSweep 1.8s ease-in-out infinite;
}

@keyframes opsScanSweep {
  0% { top: 12%; }
  50% { top: 86%; }
  100% { top: 12%; }
}

.ops-app-shell input[type="datetime-local"] {
  color-scheme: dark;
  color: #ffffff;
  font-weight: 600;
}

.ops-app-shell input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  background-color: transparent !important;
  cursor: pointer;
  width: 21px;
  height: 21px;
  padding: 2px;
  opacity: 1 !important;
  filter: brightness(2) contrast(1.6) drop-shadow(0 0 0.75px #ffffff) drop-shadow(0 0 0.75px #ffffff);
  transition: transform 0.12s ease;
}

.ops-app-shell input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover {
  transform: scale(1.12);
}

/* =========================================================================
   NOC ADD TICKET BUTTON (BRIGHT BLUE THEME) & BUS SELECTOR MODAL (v3.7)
   ========================================================================= */
.ops-app-shell .ops-appbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}

.ops-app-shell button.ops-add-ticket-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  padding: 0 11px;
  border-radius: 8px;
  border: 1px solid rgba(56, 189, 248, 0.62);
  background: rgba(14, 165, 233, 0.15);
  color: #7dd3fc;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.25px;
  cursor: pointer;
  white-space: nowrap;
  backdrop-filter: blur(8px);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.1s ease;
}
.ops-app-shell button.ops-add-ticket-btn svg {
  color: #38bdf8;
}
.ops-app-shell button.ops-add-ticket-btn:hover {
  background: rgba(14, 165, 233, 0.26);
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.ops-app-shell button.ops-add-ticket-btn:active {
  transform: scale(0.96);
}

.ops-unit-picker-card {
  width: 100%;
  max-width: 460px;
  max-height: 82vh;
  background: #141923;
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.65);
  color: #ffffff;
}

.ops-unit-picker-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ops-unit-picker-hdr h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
}

.ops-unit-picker-search {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(56, 189, 248, 0.45);
  background: #0b0e14;
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 600;
  outline: none;
  box-sizing: border-box;
}
.ops-unit-picker-search:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.ops-unit-picker-list {
  flex: 1;
  min-height: 180px;
  max-height: 52vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ops-unit-picker-row {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #1b2230;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.ops-unit-picker-row:hover {
  background: #232d40;
  border-color: rgba(56, 189, 248, 0.55);
}

/* =========================================================================
   GENERATE REPORT TAB (Corrective & Preventive Monthly BA DOCX Generator)
   Dynamic 1-Page Mobile PWA Fit + Smooth Scroll Fallback on Low-Res Screens
   ========================================================================= */
.appsheet-view-container.ops-report-host,
.ops-report-host {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  background: radial-gradient(circle at top center, rgba(153, 240, 112, 0.06), rgba(9, 13, 22, 0.99) 55%);
  padding: 8px 10px calc(12px + env(safe-area-inset-bottom, 0px)) !important;
  box-sizing: border-box;
  color: #f8fafc;
}

.ops-report-shell {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Database Connectivity Banner (Compact Single-Screen Friendly) */
.ops-rep-db-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 10px;
  padding: 8px 11px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

.ops-rep-db-bar.is-online {
  border-color: rgba(153, 240, 112, 0.42);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28), 0 0 14px rgba(153, 240, 112, 0.08);
}

.ops-rep-db-bar.is-offline {
  border-color: rgba(248, 113, 113, 0.42);
}

.ops-rep-db-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}

.ops-rep-db-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: rgba(153, 240, 112, 0.13);
  border: 1px solid rgba(153, 240, 112, 0.48);
  color: #99f070;
  box-shadow: 0 0 8px rgba(153, 240, 112, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ops-rep-db-bar.is-offline .ops-rep-db-icon {
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.35);
  color: #f87171;
  box-shadow: none;
}

.ops-rep-db-info {
  min-width: 0;
  flex: 1;
}

.ops-rep-db-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.ops-rep-db-sub {
  font-size: 10px;
  color: #94a3b8;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ops-rep-db-pills {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.ops-rep-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.24);
  color: #cbd5e1;
  white-space: nowrap;
}

.ops-rep-pill.ok {
  background: rgba(153, 240, 112, 0.12);
  border-color: rgba(153, 240, 112, 0.44);
  color: #99f070;
}

.ops-rep-pill.err {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(248, 113, 113, 0.38);
  color: #fca5a5;
}

.ops-rep-pill-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

/* Report Cards Grid */
.ops-rep-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

@media (max-width: 760px) {
  .ops-rep-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

.ops-rep-card {
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.34);
  min-width: 0;
}

.ops-rep-card.card-corrective {
  border-top: 2px solid rgba(244, 166, 64, 0.78);
}

.ops-rep-card.card-preventive {
  border-top: 2px solid rgba(74, 222, 128, 0.72);
}

.ops-rep-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ops-rep-card-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.ops-rep-card-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.card-corrective .ops-rep-card-icon {
  background: rgba(244, 166, 64, 0.14);
  border: 1px solid rgba(244, 166, 64, 0.42);
  color: #F4A640;
}

.card-preventive .ops-rep-card-icon {
  background: rgba(34, 197, 94, 0.14);
  border: 1px solid rgba(74, 222, 128, 0.36);
  color: #4ade80;
}

.ops-rep-card-title {
  margin: 0;
  font-size: 13.5px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
}

.ops-rep-card-sub {
  margin: 1px 0 0;
  font-size: 10.5px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ops-rep-badge {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.25px;
  padding: 2px 7px;
  border-radius: 5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.card-corrective .ops-rep-badge {
  background: rgba(244, 166, 64, 0.13);
  border: 1px solid rgba(244, 166, 64, 0.38);
  color: #F4A640;
}

.card-preventive .ops-rep-badge {
  background: rgba(74, 222, 128, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.32);
  color: #86efac;
}

/* Period Fields (Year + Month) */
.ops-rep-fields {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 8px;
}

.ops-rep-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.ops-rep-field label {
  font-size: 9.5px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.ops-rep-select {
  width: 100%;
  height: 32px;
  padding: 0 8px;
  border-radius: 7px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  background: #0b1120;
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  color-scheme: dark;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.card-corrective .ops-rep-select:focus {
  border-color: #F4A640;
  box-shadow: 0 0 0 2px rgba(244, 166, 64, 0.22);
}

.card-preventive .ops-rep-select:focus {
  border-color: #4ade80;
  box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.2);
}

/* Compact 1-Line Preview Summary Strip */
.ops-rep-preview {
  background: rgba(11, 17, 32, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 7px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ops-rep-preview-count {
  font-size: 11.5px;
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ops-rep-preview-meta {
  font-size: 10px;
  color: #64748b;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Generate Action Button (Rounded Box Style) */
.ops-rep-gen-btn {
  width: 100%;
  height: 34px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.2px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.1s ease;
}

.ops-rep-gen-btn.btn-corrective {
  border: 1px solid rgba(244, 166, 64, 0.68);
  background: rgba(244, 166, 64, 0.16);
  color: #f8c06f;
  box-shadow: 0 0 12px rgba(244, 166, 64, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.ops-rep-gen-btn.btn-corrective:hover:not(:disabled) {
  background: rgba(244, 166, 64, 0.28);
  border-color: #F4A640;
  color: #ffffff;
  box-shadow: 0 0 16px rgba(244, 166, 64, 0.36);
}

.ops-rep-gen-btn.btn-preventive {
  border: 1px solid rgba(74, 222, 128, 0.65);
  background: rgba(34, 197, 94, 0.16);
  color: #86efac;
  box-shadow: 0 0 12px rgba(74, 222, 128, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.ops-rep-gen-btn.btn-preventive:hover:not(:disabled) {
  background: rgba(34, 197, 94, 0.28);
  border-color: #4ade80;
  color: #ffffff;
  box-shadow: 0 0 16px rgba(74, 222, 128, 0.34);
}

.ops-rep-gen-btn:active:not(:disabled) {
  transform: scale(0.985);
}

.ops-rep-gen-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Integrated Progress Bar with Built-in Download Button at 100% */
.ops-rep-progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 7px 9px;
  border-radius: 9px;
  background: rgba(8, 13, 24, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.ops-rep-progress-wrap.state-running {
  border-color: rgba(56, 189, 248, 0.38);
}

.ops-rep-progress-wrap.state-done {
  border-color: rgba(52, 211, 153, 0.48);
  background: rgba(6, 28, 22, 0.52);
}

.ops-rep-progress-wrap.state-error {
  border-color: rgba(248, 113, 113, 0.48);
  background: rgba(45, 12, 16, 0.45);
}

.ops-rep-progress-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 10.5px;
}

.ops-rep-progress-stage {
  font-weight: 700;
  color: #cbd5e1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ops-rep-progress-pct {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #ffffff;
  flex-shrink: 0;
}

.ops-rep-progress-bar {
  position: relative;
  height: 32px;
  border-radius: 7px;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.22);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ops-rep-progress-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  transition: width 0.35s ease;
}

.card-corrective .ops-rep-progress-wrap.state-running {
  border-color: rgba(244, 166, 64, 0.45);
}

.card-corrective .ops-rep-progress-fill {
  background: linear-gradient(90deg, rgba(217, 119, 6, 0.48), rgba(244, 166, 64, 0.72));
}

.card-preventive .ops-rep-progress-fill {
  background: linear-gradient(90deg, rgba(22, 163, 74, 0.45), rgba(74, 222, 128, 0.65));
}

.ops-rep-progress-wrap.state-done .ops-rep-progress-fill {
  width: 100% !important;
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.38), rgba(34, 197, 94, 0.55));
}

.ops-rep-progress-wrap.state-error .ops-rep-progress-fill {
  background: rgba(239, 68, 68, 0.35);
}

.ops-rep-progress-overlay {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  box-sizing: border-box;
  gap: 8px;
}

.ops-rep-progress-label {
  font-size: 11px;
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ops-rep-dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 9px;
  border-radius: 6px;
  border: 1px solid rgba(110, 231, 183, 0.78);
  background: rgba(16, 185, 129, 0.88);
  color: #022c22;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.4);
  transition: background 0.15s ease, transform 0.1s ease;
}

.ops-rep-dl-btn:hover {
  background: #34d399;
  color: #022c22;
}

.ops-rep-dl-btn:active {
  transform: scale(0.96);
}

.ops-rep-dl-btn:disabled {
  background: rgba(51, 65, 85, 0.65);
  border-color: rgba(148, 163, 184, 0.25);
  color: #64748b;
  box-shadow: none;
  cursor: not-allowed;
}

.ops-rep-progress-detail {
  font-size: 10px;
  color: #94a3b8;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ops-rep-progress-wrap.state-error .ops-rep-progress-detail {
  color: #fca5a5;
  white-space: normal;
}

.ops-rep-spin {
  animation: opsRepSpin 0.9s linear infinite;
}

@keyframes opsRepSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Spacious breathing room on desktop / tall viewports */
@media (min-width: 761px) {
  .appsheet-view-container.ops-report-host,
  .ops-report-host {
    padding: 16px 16px 24px !important;
  }
  .ops-report-shell {
    gap: 14px;
  }
  .ops-rep-card {
    padding: 16px 16px;
    gap: 12px;
  }
  .ops-rep-select {
    height: 36px;
  }
  .ops-rep-gen-btn {
    height: 38px;
  }
  .ops-rep-progress-bar {
    height: 36px;
  }
}

/* =========================================================================
   TICKET ITHD TAB (Helpdesk Portal + Inline Photo Lightbox & Video Player)
   Accent: Teal #3EBFEA (distinct from NOC #3EBFEA & Generate Report #99f070)
   ========================================================================= */
.appsheet-view-container.ops-ithd-host,
.ops-ithd-host {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  background: radial-gradient(circle at top center, rgba(62, 191, 234, 0.07), rgba(9, 13, 22, 0.99) 55%);
  padding: 0 !important;
  box-sizing: border-box;
  color: #f8fafc;
}

.ithd-shell {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 10px 10px calc(18px + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Top Toolbar: Search + Queue Tabs */
.ithd-toolbar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(62, 191, 234, 0.25);
  border-radius: 12px;
  padding: 10px;
}

.ithd-search-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.ithd-search-input {
  flex: 1;
  min-width: 0;
  height: 35px;
  padding: 0 11px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: #0b1120;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  outline: none;
}

.ithd-search-input:focus {
  border-color: #3EBFEA;
  box-shadow: 0 0 0 2px rgba(62, 191, 234, 0.2);
}

.ithd-btn-teal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 35px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid rgba(62, 191, 234, 0.6);
  background: rgba(14, 165, 233, 0.16);
  color: #7dd3fc;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ithd-btn-teal:hover:not(:disabled) {
  background: rgba(14, 165, 233, 0.28);
  border-color: #3EBFEA;
  color: #ffffff;
}

.ithd-btn-teal:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.ithd-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 33px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(30, 41, 59, 0.8);
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.ithd-btn-ghost:hover:not(:disabled) {
  border-color: rgba(62, 191, 234, 0.55);
  color: #ffffff;
}

.ithd-btn-ghost:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.ithd-queues {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.ithd-q-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 32px;
  padding: 0 6px;
  border-radius: 7px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(11, 17, 32, 0.82);
  color: #94a3b8;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.ithd-q-btn.active {
  background: rgba(14, 165, 233, 0.18);
  border-color: rgba(62, 191, 234, 0.65);
  color: #7dd3fc;
  box-shadow: 0 0 10px rgba(62, 191, 234, 0.18);
}

.ithd-q-cnt {
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(148, 163, 184, 0.18);
  color: #cbd5e1;
}

.ithd-q-btn.active .ithd-q-cnt {
  background: rgba(62, 191, 234, 0.25);
  color: #ffffff;
}

/* Ticket List Cards */
.ithd-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.ithd-card {
  width: 100%;
  text-align: left;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 10px;
  padding: 10px 12px;
  color: #f8fafc;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.14s ease, background 0.14s ease;
}

.ithd-card:hover {
  border-color: rgba(62, 191, 234, 0.55);
  background: rgba(20, 31, 54, 0.96);
}

.ithd-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ithd-tno {
  font-size: 13.5px;
  font-weight: 800;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ithd-time {
  font-size: 11px;
  color: #94a3b8;
  white-space: nowrap;
}

.ithd-subj {
  font-size: 12.5px;
  font-weight: 600;
  color: #e2e8f0;
  line-height: 1.35;
}

.ithd-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: #94a3b8;
  margin-top: 2px;
}

.ithd-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.ithd-status-pill.st-open {
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(248, 113, 113, 0.45);
  color: #fca5a5;
}

.ithd-status-pill.st-resolved {
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(251, 191, 36, 0.45);
  color: #fcd34d;
}

.ithd-status-pill.st-closed {
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(52, 211, 153, 0.42);
  color: #6ee7b7;
}

.ithd-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 2px;
  font-size: 12px;
  color: #94a3b8;
}

/* Detail View */
.ithd-detail-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 11px;
  background: rgba(11, 17, 32, 0.96);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(62, 191, 234, 0.32);
  border-radius: 10px;
}

.ithd-section {
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.ithd-section-title {
  font-size: 11.5px;
  font-weight: 800;
  color: #7dd3fc;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* Inline Photo & Video Media Gallery (Zero-Download Preview!) */
.ithd-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 9px;
}

@media (max-width: 520px) {
  .ithd-media-grid {
    grid-template-columns: 1fr;
  }
}

.ithd-media-card {
  background: #0b1120;
  border: 1px solid rgba(62, 191, 234, 0.28);
  border-radius: 9px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.ithd-media-photo-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #050811;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ithd-media-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s ease;
}

.ithd-media-photo-wrap:hover img {
  transform: scale(1.03);
}

.ithd-media-video-wrap {
  width: 100%;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ithd-media-video-wrap video {
  width: 100%;
  max-height: 280px;
  display: block;
  background: #000000;
}

.ithd-media-cap {
  padding: 6px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 11px;
  color: #cbd5e1;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.ithd-media-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.ithd-media-dl {
  color: #7dd3fc;
  text-decoration: none;
  font-weight: 700;
  font-size: 10.5px;
  flex-shrink: 0;
}

/* Metadata & Custom Fields Grid */
.ithd-kv-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 12px;
}

@media (max-width: 560px) {
  .ithd-kv-grid {
    grid-template-columns: 1fr;
  }
}

.ithd-kv {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 8px;
  border-radius: 7px;
  background: rgba(11, 17, 32, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.ithd-kv-lbl {
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.35px;
}

.ithd-kv-val {
  font-size: 12.5px;
  font-weight: 600;
  color: #f8fafc;
  word-break: break-word;
}

/* SLA Strip */
.ithd-sla-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.ithd-sla-box {
  background: rgba(11, 17, 32, 0.85);
  border: 1px solid rgba(62, 191, 234, 0.22);
  border-radius: 8px;
  padding: 7px 8px;
  text-align: center;
}

.ithd-sla-lbl {
  font-size: 9.5px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
}

.ithd-sla-val {
  font-size: 11px;
  font-weight: 700;
  color: #7dd3fc;
  margin-top: 2px;
}

/* Thread Timeline */
.ithd-thread-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ithd-thread-event {
  font-size: 11px;
  color: #94a3b8;
  padding: 5px 9px;
  border-left: 2px solid rgba(148, 163, 184, 0.35);
  background: rgba(11, 17, 32, 0.55);
  border-radius: 0 6px 6px 0;
}

.ithd-thread-msg {
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(11, 17, 32, 0.88);
  overflow: hidden;
}

.ithd-thread-msg.kind-response {
  border-color: rgba(62, 191, 234, 0.4);
}

.ithd-thread-msg.kind-note {
  border-color: rgba(245, 158, 11, 0.35);
}

.ithd-thread-hdr {
  padding: 7px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  background: rgba(30, 41, 59, 0.72);
}

.ithd-thread-msg.kind-response .ithd-thread-hdr {
  background: rgba(14, 165, 233, 0.16);
}

.ithd-thread-msg.kind-note .ithd-thread-hdr {
  background: rgba(245, 158, 11, 0.14);
}

.ithd-thread-body {
  padding: 9px 10px;
  font-size: 12.5px;
  color: #e2e8f0;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Reply Composer */
.ithd-composer-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.ithd-textarea {
  width: 100%;
  min-height: 82px;
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: #0b1120;
  color: #ffffff;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
  box-sizing: border-box;
  outline: none;
}

.ithd-textarea:focus {
  border-color: #3EBFEA;
  box-shadow: 0 0 0 2px rgba(62, 191, 234, 0.2);
}

.ithd-composer-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* Fullscreen Lightbox with Gallery Navigation */
.ithd-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(2, 6, 16, 0.96);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 58px 14px 26px;
  box-sizing: border-box;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.ithd-lightbox-stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ithd-lightbox img {
  max-width: 96vw;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7);
  transition: transform 0.18s ease-out, opacity 0.18s ease;
  will-change: transform;
  pointer-events: none;
}

.ithd-lightbox-bar {
  position: fixed;
  top: 10px;
  left: 12px;
  right: 12px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ithd-lb-counter {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(62, 191, 234, 0.16);
  border: 1px solid rgba(62, 191, 234, 0.45);
  color: #7dd3fc;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  flex-shrink: 0;
}

.ithd-lb-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;
  width: 42px;
  height: 52px;
  border-radius: 10px;
  border: 1px solid rgba(62, 191, 234, 0.45);
  background: rgba(11, 17, 32, 0.76);
  backdrop-filter: blur(8px);
  color: #f8fafc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.55);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.ithd-lb-nav:hover {
  background: rgba(14, 165, 233, 0.28);
  border-color: #3EBFEA;
  color: #ffffff;
}

.ithd-lb-nav:active {
  transform: translateY(-50%) scale(0.94);
}

.ithd-lb-nav.prev {
  left: 10px;
}

.ithd-lb-nav.next {
  right: 10px;
}


/* ============================================================================
 * ACTIVITY AUDIT LOG MODAL & MASTER BUTTON (ZERO-RAM DISK JSONL)
 * ============================================================================ */

.ops-btn-activity-log {
  width: 100%;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 14px;
  margin-bottom: 8px;
  border-radius: 10px;
  border: 1px solid rgba(62, 191, 234, 0.52);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.2), rgba(2, 132, 199, 0.12));
  color: #7dd3fc;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.45px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.12s ease;
}

.ops-btn-activity-log:hover {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.34), rgba(2, 132, 199, 0.22));
  border-color: #3EBFEA;
  color: #ffffff;
}

.ops-btn-activity-log:active {
  transform: scale(0.99);
}

.ops-act-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100060;
  background: rgba(3, 7, 15, 0.84);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 12px;
  box-sizing: border-box;
}

.ops-act-backdrop.show {
  display: flex;
}

.ops-act-card {
  width: 100%;
  max-width: 780px;
  height: min(88vh, 820px);
  background: linear-gradient(180deg, #0d1424 0%, #090e1a 100%);
  border: 1px solid rgba(62, 191, 234, 0.36);
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.72), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #f1f5f9;
}

.ops-act-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.72);
  flex-shrink: 0;
}

.ops-act-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.ops-act-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(14, 165, 233, 0.16);
  border: 1px solid rgba(62, 191, 234, 0.42);
  color: #3EBFEA;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ops-act-title {
  font-size: 14px;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: 0.4px;
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.ops-act-master-pill {
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(52, 211, 153, 0.45);
  color: #6ee7b7;
  letter-spacing: 0.45px;
}

.ops-act-subtitle {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 2px;
}

.ops-act-close-x {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(30, 41, 59, 0.72);
  color: #cbd5e1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.ops-act-close-x:hover {
  border-color: rgba(248, 113, 113, 0.55);
  color: #fca5a5;
}

/* 2 Sub-Menu Segmented Tabs: Full Log | User Log */
.ops-act-subtabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 10px 16px 8px;
  background: rgba(11, 17, 32, 0.85);
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  flex-shrink: 0;
}

.ops-act-tab {
  height: 38px;
  border-radius: 9px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.85);
  color: #94a3b8;
  font-size: 12.5px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ops-act-tab.active {
  background: rgba(14, 165, 233, 0.2);
  border-color: #3EBFEA;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(62, 191, 234, 0.2);
}

/* Toolbar: Date Range + Module + Search */
.ops-act-toolbar {
  padding: 9px 16px;
  background: rgba(11, 17, 32, 0.65);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex-shrink: 0;
}

.ops-act-range-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.ops-act-range-group {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.ops-act-range-btn {
  height: 28px;
  padding: 0 10px;
  border-radius: 7px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.85);
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.ops-act-range-btn.active {
  background: rgba(14, 165, 233, 0.22);
  border-color: rgba(62, 191, 234, 0.72);
  color: #7dd3fc;
}

.ops-act-date-input {
  height: 28px;
  padding: 0 8px;
  border-radius: 7px;
  border: 1px solid rgba(62, 191, 234, 0.5);
  background: #0b1120;
  color: #f8fafc;
  font-size: 11.5px;
  font-weight: 700;
  color-scheme: dark;
}

.ops-act-filter-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ops-act-select {
  height: 32px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: #0b1120;
  color: #e2e8f0;
  font-size: 11.5px;
  font-weight: 700;
  flex-shrink: 0;
}

.ops-act-search-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: #0b1120;
  color: #64748b;
}

.ops-act-search-wrap:focus-within {
  border-color: #3EBFEA;
  color: #7dd3fc;
}

.ops-act-search-input {
  width: 100%;
  border: none;
  background: transparent;
  color: #f8fafc;
  font-size: 12px;
  outline: none;
}

.ops-act-refresh-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(30, 41, 59, 0.72);
  color: #cbd5e1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.ops-act-refresh-btn:hover {
  border-color: #3EBFEA;
  color: #7dd3fc;
}

/* Selected User Drill-Down Sticky Banner */
.ops-act-user-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 16px;
  background: rgba(14, 165, 233, 0.12);
  border-bottom: 1px solid rgba(62, 191, 234, 0.3);
  flex-shrink: 0;
  flex-wrap: wrap;
}

.ops-act-back-users {
  height: 30px;
  padding: 0 10px;
  border-radius: 7px;
  border: 1px solid rgba(62, 191, 234, 0.5);
  background: rgba(11, 17, 32, 0.85);
  color: #7dd3fc;
  font-size: 11.5px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.ops-act-back-users:hover {
  background: rgba(14, 165, 233, 0.24);
  color: #ffffff;
}

.ops-act-selected-user {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.ops-act-avatar-sm {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(14, 165, 233, 0.22);
  border: 1px solid rgba(62, 191, 234, 0.5);
  color: #7dd3fc;
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ops-act-sel-name {
  font-size: 12.5px;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ops-act-sel-sub {
  font-size: 10.5px;
  color: #94a3b8;
}

/* Scrollable Body */
.ops-act-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 16px 18px;
}

/* Loading / Empty / Error States */
.ops-act-state-box {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  color: #94a3b8;
  padding: 24px 12px;
}

.ops-act-state-error {
  color: #fca5a5;
}

.ops-act-state-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #e2e8f0;
}

.ops-act-state-sub {
  font-size: 11.5px;
  color: #94a3b8;
  max-width: 340px;
}

.ops-act-spinner {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 3px solid rgba(62, 191, 234, 0.2);
  border-top-color: #3EBFEA;
  animation: opsActSpin 0.75s linear infinite;
}

@keyframes opsActSpin {
  to { transform: rotate(360deg); }
}

/* Date Group Header */
.ops-act-date-sep {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 800;
  color: #7dd3fc;
  text-transform: uppercase;
  letter-spacing: 0.45px;
  padding: 6px 4px 6px;
  margin-top: 8px;
  border-bottom: 1px solid rgba(62, 191, 234, 0.22);
}

.ops-act-date-sep:first-child {
  margin-top: 0;
}

.ops-act-date-cnt {
  font-size: 10px;
  padding: 1px 7px;
  border-radius: 99px;
  background: rgba(62, 191, 234, 0.16);
  color: #bae6fd;
}

/* Timeline Rows */
.ops-act-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 7px;
}

.ops-act-row {
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.86);
  overflow: hidden;
  transition: border-color 0.14s ease, background 0.14s ease;
}

.ops-act-row:hover,
.ops-act-row.expanded {
  border-color: rgba(62, 191, 234, 0.48);
  background: rgba(18, 28, 48, 0.95);
}

.ops-act-row-head {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 11px;
  cursor: pointer;
}

.ops-act-time-col {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 2px;
  flex-shrink: 0;
}

.ops-act-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ops-act-dot-ok {
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
}

.ops-act-dot-err {
  background: #ef4444;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.6);
}

.ops-act-time-mono {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11.5px;
  font-weight: 700;
  color: #cbd5e1;
}

.ops-act-content-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ops-act-line-1 {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.ops-act-action-text {
  font-size: 12.5px;
  font-weight: 800;
  color: #f8fafc;
}

.ops-act-target-chip {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(56, 189, 248, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.42);
  color: #7dd3fc;
}

.ops-act-line-2 {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: #94a3b8;
}

.ops-act-actor-pill {
  font-weight: 700;
  color: #bae6fd;
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.22);
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 10.5px;
}

.ops-act-summary-text {
  color: #cbd5e1;
  word-break: break-word;
  line-height: 1.35;
}

.ops-act-chev {
  color: #64748b;
  padding-top: 2px;
  flex-shrink: 0;
  transition: transform 0.16s ease, color 0.16s ease;
}

.ops-act-row.expanded .ops-act-chev {
  transform: rotate(180deg);
  color: #3EBFEA;
}

/* Module Pills (Zero Purple) */
.ops-act-mod-pill {
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 5px;
  letter-spacing: 0.35px;
  text-transform: uppercase;
  flex-shrink: 0;
}

.ops-act-mod-xs {
  font-size: 9px;
  padding: 1px 5px;
}

.act-mod-auth { background: rgba(16, 185, 129, 0.18); border: 1px solid rgba(52, 211, 153, 0.45); color: #6ee7b7; }
.act-mod-telmet { background: rgba(14, 165, 233, 0.2); border: 1px solid rgba(56, 189, 248, 0.5); color: #7dd3fc; }
.act-mod-mdm3 { background: rgba(59, 130, 246, 0.2); border: 1px solid rgba(96, 165, 250, 0.5); color: #93c5fd; }
.act-mod-noc { background: rgba(6, 182, 212, 0.2); border: 1px solid rgba(34, 211, 238, 0.5); color: #67e8f9; }
.act-mod-ts { background: rgba(245, 158, 11, 0.2); border: 1px solid rgba(251, 191, 36, 0.5); color: #fcd34d; }
.act-mod-ithd { background: rgba(62, 191, 234, 0.22); border: 1px solid rgba(125, 211, 252, 0.55); color: #bae6fd; }
.act-mod-report { background: rgba(132, 204, 22, 0.2); border: 1px solid rgba(163, 230, 53, 0.5); color: #bef264; }
.act-mod-access { background: rgba(249, 115, 22, 0.2); border: 1px solid rgba(251, 146, 60, 0.5); color: #fdba74; }
.act-mod-default { background: rgba(148, 163, 184, 0.18); border: 1px solid rgba(148, 163, 184, 0.4); color: #cbd5e1; }

/* Expanded Forensic Detail Drawer */
.ops-act-detail-drawer {
  padding: 10px 12px 11px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(7, 11, 22, 0.85);
}

.ops-act-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 12px;
}

@media (max-width: 520px) {
  .ops-act-detail-grid {
    grid-template-columns: 1fr;
  }
}

.ops-act-dl {
  display: block;
  font-size: 9.5px;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.35px;
}

.ops-act-dv {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: #e2e8f0;
  margin-top: 1px;
  word-break: break-word;
}

.ops-act-dv.txt-ok { color: #6ee7b7; font-weight: 800; }
.ops-act-dv.txt-err { color: #fca5a5; font-weight: 800; }

.ops-act-detail-code-wrap {
  margin-top: 9px;
}

.ops-act-detail-code {
  margin: 0;
  padding: 8px 10px;
  border-radius: 7px;
  background: #04070e;
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: #bae6fd;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 180px;
  overflow-y: auto;
}

/* User Log Directory Cards */
.ops-act-user-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.ops-act-user-card {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 11px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.82);
  color: #f8fafc;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 7px;
  transition: border-color 0.14s ease, background 0.14s ease;
}

.ops-act-user-card.has-activity {
  border-color: rgba(62, 191, 234, 0.28);
}

.ops-act-user-card:hover {
  border-color: #3EBFEA;
  background: rgba(20, 32, 56, 0.96);
}

.ops-act-u-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ops-act-u-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.ops-act-avatar {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: rgba(14, 165, 233, 0.16);
  border: 1px solid rgba(62, 191, 234, 0.4);
  color: #7dd3fc;
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ops-act-u-info {
  min-width: 0;
}

.ops-act-u-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.ops-act-u-username {
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
}

.ops-act-u-fullname {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 1px;
}

.ops-act-role-badge {
  font-size: 9.5px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 5px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.act-role-super { background: rgba(6, 182, 212, 0.2); border: 1px solid rgba(34, 211, 238, 0.5); color: #67e8f9; }
.act-role-admin { background: rgba(14, 165, 233, 0.2); border: 1px solid rgba(56, 189, 248, 0.5); color: #7dd3fc; }
.act-role-noc { background: rgba(16, 185, 129, 0.18); border: 1px solid rgba(52, 211, 153, 0.48); color: #6ee7b7; }
.act-role-tech { background: rgba(245, 158, 11, 0.2); border: 1px solid rgba(251, 191, 36, 0.48); color: #fcd34d; }
.act-role-default { background: rgba(148, 163, 184, 0.18); border: 1px solid rgba(148, 163, 184, 0.38); color: #cbd5e1; }

.ops-act-master-mini {
  font-size: 9px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(52, 211, 153, 0.42);
  color: #6ee7b7;
}

.ops-act-u-right {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #64748b;
  flex-shrink: 0;
}

.ops-act-count-pill {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 7px;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #94a3b8;
}

.ops-act-count-pill.active {
  background: rgba(14, 165, 233, 0.2);
  border-color: rgba(62, 191, 234, 0.55);
  color: #7dd3fc;
}

.ops-act-u-bottom {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #94a3b8;
  padding-top: 6px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  overflow: hidden;
}

.ops-act-u-time {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
  font-weight: 700;
  color: #cbd5e1;
  flex-shrink: 0;
}

.ops-act-u-lastact {
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ops-act-u-idle {
  color: #64748b;
  font-style: italic;
}

/* Footer */
.ops-act-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(11, 17, 32, 0.9);
  flex-shrink: 0;
}

.ops-act-footer-meta {
  font-size: 11px;
  color: #94a3b8;
}

.ops-act-btn-close {
  height: 34px;
  padding: 0 18px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(30, 41, 59, 0.9);
  color: #f8fafc;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.ops-act-btn-close:hover {
  border-color: #3EBFEA;
  color: #7dd3fc;
}

@media (max-width: 600px) {
  .ops-act-backdrop {
    padding: 6px;
  }
  .ops-act-card {
    height: 92vh;
    border-radius: 13px;
  }
  .ops-act-header {
    padding: 11px 12px;
  }
  .ops-act-subtabs {
    padding: 8px 12px 7px;
  }
  .ops-act-toolbar {
    padding: 8px 12px;
  }
  .ops-act-body {
    padding: 10px 12px 14px;
  }
  .ops-act-footer {
    padding: 9px 12px;
  }
}
