/* === Cyber workstation UI (AUTO CONFIG style, site-wide) =================== */

/* Stage frame — hero / featured blocks */
.ops-stage {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(91, 140, 255, 0.28);
  background: radial-gradient(ellipse at 50% 28%, #121a2e 0%, rgba(8, 10, 15, 0.92) 68%);
  box-shadow:
    0 0 60px rgba(91, 140, 255, 0.1),
    0 0 90px rgba(157, 123, 255, 0.06),
    inset 0 0 80px rgba(61, 214, 195, 0.04);
}

.ops-stage--hero {
  margin-bottom: 2.5rem;
  padding: clamp(2rem, 5vw, 3.5rem) 1.5rem;
  text-align: center;
}

.ops-stage__grid,
.ops-workstation__grid {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(91, 140, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91, 140, 255, 0.07) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at center, black 15%, transparent 72%);
}

.ops-stage__scan,
.ops-workstation__scan {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(91, 140, 255, 0.025) 2px,
    rgba(91, 140, 255, 0.025) 4px
  );
  animation: ops-scanline 7s linear infinite;
}

@keyframes ops-scanline {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

.ops-stage__content {
  position: relative;
  z-index: 2;
}

/* Panel workstation wrapper */
.ops-workstation {
  position: relative;
  min-height: 60vh;
}

.ops-workstation__body {
  position: relative;
  z-index: 1;
  perspective: 1400px;
}

.ops-workstation .ops-screen {
  transform-style: preserve-3d;
}

/* Shell = big monitor */
.ops-screen--shell {
  display: flex;
  flex-direction: column;
  padding: 0 !important;
  overflow: hidden;
  border-radius: 14px !important;
  background: rgba(8, 12, 20, 0.88) !important;
  border: 1px solid rgba(91, 140, 255, 0.28) !important;
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.5),
    0 0 48px rgba(91, 140, 255, 0.08) !important;
}

.ops-screen--shell > .ops-win__bar {
  flex-shrink: 0;
}

.ops-screen--shell > .panel-shell {
  flex: 1;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

/* Window chrome */
.ops-win__bar,
.ops-screen > .ops-win__bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.7rem;
  background: linear-gradient(90deg, #1a2848 0%, #101620 100%);
  border-bottom: 1px solid rgba(91, 140, 255, 0.22);
  font-family: "Orbitron", var(--font);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9eb4d4;
  flex-shrink: 0;
}

.ops-win__dots {
  display: inline-flex;
  gap: 5px;
  margin-right: 0.15rem;
}

.ops-win__dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: block;
}

.ops-win__dots span:nth-child(1) { background: #ff5f57; }
.ops-win__dots span:nth-child(2) { background: #febc2e; }
.ops-win__dots span:nth-child(3) { background: #28c840; }

.ops-win__title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ops-blue, #5b8cff);
}

.ops-win__status {
  font-size: 0.58rem;
  color: var(--ops-mint, #3dd6c3);
  letter-spacing: 0.1em;
}

/* Screen panel (card, table, config block) */
.ops-screen {
  position: relative;
  padding: 0 !important;
  overflow: hidden;
  border-radius: 10px !important;
  background: rgba(10, 14, 22, 0.92) !important;
  border: 1px solid rgba(91, 140, 255, 0.22) !important;
  box-shadow:
    0 12px 36px rgba(0, 0, 0, 0.4),
    0 0 24px rgba(91, 140, 255, 0.06) !important;
  animation: ops-screen-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes ops-screen-in {
  from {
    opacity: 0;
    transform: translate3d(0, 16px, 0) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

.ops-screen__body {
  padding: 1.15rem 1.25rem;
  position: relative;
}

.ops-screen--table .ops-screen__body {
  padding: 0;
}

.ops-screen--table .table-wrap {
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.ops-screen--flash {
  margin-bottom: 1rem !important;
}

.ops-screen--flash .ops-screen__body {
  padding: 0.65rem 0.85rem;
  font-size: 0.9rem;
}

.ops-screen--flash.ops-screen--err .ops-win__bar {
  border-bottom-color: rgba(255, 77, 77, 0.35);
}

.ops-screen--flash.ops-screen--err .ops-win__title {
  color: #ff6b6b;
}

.ops-screen--flash.ops-screen--ok .ops-win__title {
  color: var(--ops-mint, #3dd6c3);
}

/* Terminal-style page header */
.ops-terminal-head {
  margin-bottom: 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(91, 140, 255, 0.2);
  background: linear-gradient(90deg, rgba(26, 40, 72, 0.5), rgba(12, 16, 24, 0.8));
  animation: ops-screen-in 0.4s ease both;
}

.ops-terminal-head__line {
  font-family: "Orbitron", var(--font);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--ops-mint, #3dd6c3);
  margin: 0 0 0.35rem;
}

.ops-terminal-head h1 {
  margin: 0 !important;
  font-size: clamp(1.1rem, 2.5vw, 1.45rem) !important;
}

/* Log / side panel style (reuse on lists) */
.ops-log-panel {
  display: flex;
  flex-direction: column;
  max-height: 420px;
  background: rgba(8, 12, 20, 0.9);
  border: 1px solid rgba(91, 140, 255, 0.2);
  border-radius: 10px;
  overflow: hidden;
}

.ops-log-panel__head {
  padding: 0.5rem 0.75rem;
  font-family: "Orbitron", var(--font);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--ops-mint, #3dd6c3);
  background: linear-gradient(180deg, #1a2438, #0d1118);
  border-bottom: 1px solid rgba(91, 140, 255, 0.18);
}

/* Mini floating window (ban detail rows etc.) */
.ops-win {
  background: #0c1018;
  border: 1px solid rgba(91, 140, 255, 0.3);
  border-radius: 8px;
  overflow: hidden;
  font-size: 0.8rem;
  animation: ops-win-in 0.35s ease;
}

@keyframes ops-win-in {
  from { opacity: 0; transform: translateX(10px); }
  to { opacity: 1; transform: translateX(0); }
}

.ops-win > .ops-win__bar {
  padding: 0.35rem 0.55rem;
}

.ops-win__content {
  padding: 0.55rem 0.65rem;
  color: #c5d4e8;
}

.ops-win__key {
  color: var(--ops-mint, #3dd6c3);
  font-weight: 600;
}

/* Dialog = PC modal */
body.ops-ui .otac-dialog__box {
  padding: 0 !important;
  overflow: hidden;
  border-radius: 12px !important;
}

body.ops-ui .otac-dialog__head {
  background: linear-gradient(180deg, #152238, #0a1018);
  border-bottom: 1px solid rgba(91, 140, 255, 0.25);
}

body.ops-ui .otac-dialog__head::before {
  content: "";
  display: inline-flex;
  gap: 5px;
  margin-right: 0.5rem;
  vertical-align: middle;
  width: 34px;
  height: 9px;
  background:
    radial-gradient(circle at 4px 50%, #ff5f57 4px, transparent 4px),
    radial-gradient(circle at 17px 50%, #febc2e 4px, transparent 4px),
    radial-gradient(circle at 30px 50%, #28c840 4px, transparent 4px);
}

body.ops-ui .otac-dialog__title {
  font-family: "Orbitron", var(--font);
  color: var(--ops-blue, #5b8cff) !important;
  letter-spacing: 0.1em;
}

body.ops-ui .otac-ban-detail-content,
body.ops-ui .otac-ban-detail-actions {
  background: #0a0e14;
}

/* Config editor inside screens */
body.ops-ui .cfg-editor__tabs {
  border-bottom-color: var(--mac-separator, var(--color-border));
}

body.ops-ui .cfg-editor__tab.is-active {
  background: var(--mac-fill, var(--color-primary-muted));
}

/* Home plan cards keep image inside screen body */
.ops-screen.card--ops .plan-img {
  margin-top: 0;
}

@media (prefers-reduced-motion: reduce) {
  .ops-stage__scan,
  .ops-workstation__scan,
  .ops-screen {
    animation: none !important;
  }
}

@media (max-width: 900px) {
  .ops-screen--shell > .panel-shell {
    flex-direction: column;
  }
}
