/* ===========================================================
   STATUS DOS SERVIDORES — fábrica de áudio para clientes
   =========================================================== */

.server-status-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.server-status-factory-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(99,102,241,.22);
  border-radius: 11px;
  color: #6366f1;
  background: rgba(99,102,241,.08);
}

.server-status-kicker {
  display: block;
  margin-bottom: 3px;
  color: #818cf8;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .16em;
}

.server-status-panel.server-status-client-view {
  --flow-accent: #5968e9;
  --flow-accent-2: #8b5cf6;
  --flow-online: #0e9f6e;
  width: min(720px, calc(100vw - 300px));
  max-width: calc(100vw - 24px);
  max-height: min(82vh, 820px);
  overflow-x: hidden;
  color: #24303c;
  border: 1px solid rgba(92,107,128,.24);
  border-radius: 20px;
  background:
    radial-gradient(480px 190px at 12% 0%, rgba(255,255,255,.98), transparent 72%),
    linear-gradient(145deg, rgba(255,255,255,.99), rgba(234,240,245,.98) 54%, rgba(247,249,251,.99));
  box-shadow: 0 28px 80px rgba(34,48,66,.25), inset 0 1px 0 #fff;
  transform-origin: top right;
  animation: server-status-deploy .46s cubic-bezier(.16,.84,.22,1) both;
}

.server-status-client-view .server-status-panel-header {
  position: sticky;
  z-index: 8;
  top: 0;
  min-height: 64px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(76,91,110,.13);
  background: rgba(249,251,252,.9);
  box-shadow: 0 8px 20px rgba(42,58,77,.07);
  backdrop-filter: blur(18px) saturate(1.15);
}

.server-status-client-view .server-status-panel-header h3 {
  color: #18222d !important;
  font-size: 1rem;
}

.server-status-client-view .server-status-panel-close {
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  color: #697786;
  border: 1px solid rgba(88,104,124,.14);
  background: rgba(255,255,255,.76);
  box-shadow: inset 0 1px 0 #fff;
}

.server-status-client-view .server-status-panel-close:hover {
  color: #17212c;
  background: #fff;
}

.server-status-client-view .server-status-panel-body {
  padding: 12px 14px 16px;
  gap: 10px;
}

.server-status-workflow-intro {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(89,104,233,.16);
  border-radius: 14px;
  color: #43505e;
  background: linear-gradient(120deg, rgba(89,104,233,.08), rgba(255,255,255,.86) 52%, rgba(14,159,110,.07));
}

.server-status-workflow-intro > .material-icons-round {
  color: var(--flow-accent);
  font-size: 25px;
}

.server-status-workflow-intro strong,
.server-status-workflow-intro small {
  display: block;
}

.server-status-workflow-intro strong {
  color: #202c38;
  font-size: .76rem;
}

.server-status-workflow-intro small {
  margin-top: 2px;
  color: #718090;
  font-size: .61rem;
}

.server-status-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--flow-online);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .1em;
  white-space: nowrap;
}

.server-status-live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 0 currentColor;
  animation: server-live-pulse 1.6s ease-out infinite;
}

.server-status-client-view .server-status-row {
  display: block;
  min-height: 82px;
  padding: 8px 10px 9px;
  border: 1px solid rgba(82,99,120,.16);
  border-radius: 14px;
  background:
    linear-gradient(122deg, rgba(255,255,255,.93), rgba(239,244,247,.88) 54%, rgba(255,255,255,.94));
  box-shadow: inset 0 1px 0 #fff, 0 5px 14px rgba(44,59,77,.055);
  animation: server-row-arrive .38s cubic-bezier(.2,.8,.2,1) both;
  animation-delay: calc(var(--row-index, 0) * 45ms);
}

.server-status-client-view .server-status-row:hover {
  border-color: color-mix(in srgb, var(--flow-accent) 36%, transparent);
  box-shadow: inset 0 1px 0 #fff, 0 9px 22px rgba(58,70,121,.11);
}

.server-status-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.server-status-client-view .server-status-name {
  overflow: hidden;
  color: #263240 !important;
  font-size: .67rem;
  font-weight: 900;
  letter-spacing: .045em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.server-status-client-view .server-status-badge {
  position: relative;
  min-width: 54px;
  padding: 4px 10px 4px 19px;
  color: #fff !important;
  border: 1px solid rgba(255,255,255,.72);
  background: linear-gradient(135deg, #17b980, #087a59) !important;
  box-shadow: 0 4px 11px rgba(14,159,110,.24), inset 0 1px 0 rgba(255,255,255,.3);
  font-size: .57rem;
  letter-spacing: .08em;
  text-align: center;
  text-transform: uppercase;
}

.server-status-client-view .server-status-badge::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #dfffee;
  box-shadow: 0 0 7px #fff;
  transform: translateY(-50%);
  animation: server-led-blink 1.2s ease-in-out infinite;
}

.server-status-client-view .server-status-badge.status-high_demand {
  background: linear-gradient(135deg, #f5a524, #c66a08) !important;
  box-shadow: 0 4px 11px rgba(207,115,11,.24);
}

.server-status-client-view .server-status-badge.status-maintenance {
  background: linear-gradient(135deg, #ef5a67, #b6273d) !important;
  box-shadow: 0 4px 11px rgba(190,42,61,.22);
}

.server-audio-flow {
  display: grid;
  grid-template-columns: 72px minmax(130px, 1fr) 78px;
  align-items: center;
  min-height: 45px;
  gap: 7px;
}

.server-ai-station,
.server-client-station {
  position: relative;
  height: 42px;
  border: 1px solid rgba(89,104,233,.13);
  border-radius: 10px;
  background: rgba(255,255,255,.72);
  box-shadow: inset 0 1px 0 #fff;
}

.server-ai-label,
.server-client-label {
  position: absolute;
  bottom: 2px;
  color: #708093;
  font-size: 6px;
  font-weight: 900;
  letter-spacing: .12em;
}

.server-ai-label { left: 5px; color: var(--flow-accent); }
.server-client-label { right: 4px; }

.server-mini-bot {
  position: absolute;
  top: 6px;
  color: var(--flow-accent);
  font-size: 20px !important;
  filter: drop-shadow(0 3px 4px rgba(70,82,156,.18));
  animation: server-bot-work .8s ease-in-out infinite alternate;
}

.server-mini-bot.bot-one { left: 8px; }
.server-mini-bot.bot-two { left: 33px; animation-delay: -.4s; }

.server-ai-spark {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  color: var(--flow-accent-2);
  background: currentColor;
  box-shadow: -5px 7px 0 -1px currentColor, 1px 12px 0 -1px currentColor;
  animation: server-spark 1s steps(2) infinite;
}

.server-delivery-track {
  position: relative;
  height: 42px;
  overflow: hidden;
  border-radius: 10px;
  background:
    linear-gradient(90deg, transparent, rgba(89,104,233,.05) 20%, rgba(139,92,246,.08) 50%, rgba(14,159,110,.06) 82%, transparent);
}

.server-delivery-track::before,
.server-delivery-track::after {
  content: "";
  position: absolute;
  right: 4%;
  bottom: 7px;
  left: 4%;
  height: 2px;
  border-radius: 999px;
}

.server-delivery-track::before {
  background: rgba(91,105,126,.18);
}

.server-delivery-track::after {
  width: 24%;
  background: linear-gradient(90deg, transparent, var(--flow-accent), var(--flow-accent-2), transparent);
  box-shadow: 0 0 7px var(--flow-accent-2);
  animation: server-track-energy 1.8s linear infinite;
}

.server-track-pulse {
  position: absolute;
  bottom: 5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--flow-accent);
  box-shadow: 0 0 8px var(--flow-accent);
  animation: server-data-packet 2.1s linear infinite;
}

.server-track-pulse.pulse-two { animation-delay: -1.05s; }

.server-status-courier {
  position: absolute;
  z-index: 3;
  top: 2px;
  left: 8%;
  display: flex;
  align-items: flex-end;
  gap: 1px;
  width: 61px;
  height: 34px;
  padding: 0;
  color: var(--flow-accent);
  border: 0;
  background: transparent;
  cursor: grab;
  touch-action: none;
  user-select: none;
  filter: drop-shadow(0 4px 4px rgba(50,61,100,.2));
  animation: server-courier-delivery 3.4s cubic-bezier(.45,.03,.36,.99) var(--flow-delay, 0s) infinite;
}

.server-status-courier:hover,
.server-status-courier:focus-visible {
  z-index: 5;
  outline: none;
  filter: drop-shadow(0 6px 7px rgba(70,73,163,.3));
}

.server-status-courier:focus-visible::after {
  content: "ARRASTE";
  position: absolute;
  top: -9px;
  left: 4px;
  color: var(--flow-accent);
  font-size: 5px;
  font-weight: 900;
  letter-spacing: .12em;
}

.server-status-courier.is-dragging,
.server-status-courier.is-keyboard-moved,
.server-status-courier.is-returning {
  animation: none !important;
}

.server-status-courier.is-dragging {
  cursor: grabbing;
  transform: scale(1.12) translateY(-3px);
  filter: drop-shadow(0 9px 9px rgba(70,73,163,.34));
}

.server-status-courier.is-returning {
  left: 8% !important;
  transition: left .34s cubic-bezier(.16,.8,.22,1), transform .25s ease;
}

.server-courier-bot {
  font-size: 26px !important;
  line-height: 1;
}

.server-mp3-box {
  position: relative;
  display: grid;
  width: 27px;
  height: 22px;
  margin-bottom: 1px;
  place-items: center;
  overflow: hidden;
  color: #fff;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 4px;
  background: linear-gradient(145deg, var(--flow-accent-2), var(--flow-accent));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 3px 7px rgba(73,72,161,.23);
}

.server-mp3-box b {
  z-index: 1;
  font-size: 6px;
  letter-spacing: .05em;
}

.server-mp3-box i {
  position: absolute;
  right: -3px;
  bottom: -4px;
  color: rgba(255,255,255,.2);
  font-size: 19px !important;
}

.server-client-person {
  position: absolute;
  bottom: 5px;
  left: 4px;
  color: #516171;
  font-size: 23px !important;
}

.server-client-computer {
  position: absolute;
  top: 5px;
  right: 7px;
  color: var(--flow-online);
  font-size: 25px !important;
  filter: drop-shadow(0 0 5px rgba(14,159,110,.22));
  animation: server-screen-glow 1.5s ease-in-out infinite alternate;
}

.server-status-row.status-maintenance .server-status-courier,
.server-status-row.status-maintenance .server-track-pulse,
.server-status-row.status-maintenance .server-delivery-track::after {
  animation-play-state: paused;
  opacity: .36;
}

.server-status-row.status-high_demand .server-status-courier {
  animation-duration: 4.8s;
}

body[data-gradient="metallic-pink"] .server-status-panel.server-status-client-view {
  --flow-accent: #c34682;
  --flow-accent-2: #9a4ed2;
  --flow-online: #c34682;
  color: #654957;
  border-color: rgba(154,68,105,.25);
  background:
    radial-gradient(490px 200px at 12% 0%, rgba(255,255,255,.99), transparent 72%),
    linear-gradient(145deg, rgba(255,251,253,.99), rgba(246,226,235,.98) 54%, rgba(255,249,252,.99));
  box-shadow: 0 30px 82px rgba(103,45,70,.25), inset 0 1px 0 #fff;
}

body[data-gradient="metallic-pink"] .server-status-client-view .server-status-panel-header {
  border-bottom-color: rgba(151,72,104,.15);
  background: rgba(255,248,252,.9);
}

body[data-gradient="metallic-pink"] .server-status-client-view .server-status-factory-icon {
  color: #c34682;
  border-color: rgba(195,70,130,.22);
  background: rgba(195,70,130,.08);
}

body[data-gradient="metallic-pink"] .server-status-client-view .server-status-kicker {
  color: #c34682;
}

body[data-gradient="metallic-pink"] .server-status-workflow-intro {
  border-color: rgba(195,70,130,.18);
  background: linear-gradient(120deg, rgba(195,70,130,.09), rgba(255,255,255,.88) 52%, rgba(154,78,210,.08));
}

body[data-gradient="metallic-pink"] .server-status-client-view .server-status-row {
  border-color: rgba(151,72,104,.17);
  background: linear-gradient(122deg, rgba(255,255,255,.95), rgba(247,228,237,.89) 54%, rgba(255,255,255,.95));
  box-shadow: inset 0 1px 0 #fff, 0 5px 14px rgba(112,54,80,.06);
}

body[data-gradient="metallic-pink"] .server-status-client-view .server-status-badge {
  background: linear-gradient(135deg, #ea75a8, #a83569) !important;
  box-shadow: 0 4px 11px rgba(174,53,107,.24), inset 0 1px 0 rgba(255,255,255,.3);
}

@keyframes server-status-deploy {
  0% { opacity: 0; transform: translateY(-18px) scale(.72,.18); clip-path: inset(0 0 82% 0 round 20px); }
  58% { opacity: 1; clip-path: inset(0 0 0 0 round 20px); }
  100% { opacity: 1; transform: translateY(0) scale(1); clip-path: inset(0 0 0 0 round 20px); }
}

@keyframes server-row-arrive {
  from { opacity: 0; transform: translateY(-7px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes server-live-pulse {
  0% { box-shadow: 0 0 0 0 currentColor; }
  75%, 100% { box-shadow: 0 0 0 6px transparent; }
}

@keyframes server-led-blink {
  0%, 100% { opacity: .75; transform: translateY(-50%) scale(.8); }
  50% { opacity: 1; transform: translateY(-50%) scale(1.15); }
}

@keyframes server-bot-work {
  from { transform: translateY(0) rotate(-3deg); }
  to { transform: translateY(-2px) rotate(3deg); }
}

@keyframes server-spark {
  0%, 45% { opacity: .2; transform: scale(.7); }
  46%, 100% { opacity: 1; transform: scale(1); }
}

@keyframes server-track-energy {
  from { transform: translateX(-35%); }
  to { transform: translateX(420%); }
}

@keyframes server-data-packet {
  from { left: 3%; opacity: 0; }
  12%, 88% { opacity: .8; }
  to { left: 94%; opacity: 0; }
}

@keyframes server-courier-delivery {
  0% { left: 7%; transform: translateY(0) rotate(-2deg); }
  8% { transform: translateY(-2px) rotate(2deg); }
  18% { transform: translateY(0) rotate(-2deg); }
  45% { left: 77%; transform: translateY(-2px) rotate(2deg); }
  52% { left: 77%; transform: translateY(0) scale(.96); }
  58% { left: 77%; transform: translateY(0) scale(1); }
  92% { left: 7%; transform: translateY(-1px) rotate(-2deg); }
  100% { left: 7%; transform: translateY(0); }
}

@keyframes server-screen-glow {
  from { opacity: .65; filter: drop-shadow(0 0 2px currentColor); }
  to { opacity: 1; filter: drop-shadow(0 0 7px currentColor); }
}

@media (max-width: 900px) {
  .server-status-panel.server-status-client-view {
    position: fixed;
    top: 70px;
    right: 12px;
    left: 12px;
    width: auto;
    max-width: none;
    max-height: calc(100vh - 82px);
  }
}

@media (max-width: 560px) {
  .server-status-client-view .server-status-panel-body { padding: 9px; }
  .server-status-workflow-intro { grid-template-columns: 28px minmax(0,1fr); }
  .server-status-live { display: none; }
  .server-audio-flow { grid-template-columns: 58px minmax(90px,1fr) 60px; }
  .server-ai-station, .server-client-station { transform: scale(.92); }
  .server-status-client-view .server-status-name { max-width: calc(100vw - 120px); font-size: .59rem; }
}

@media (prefers-reduced-motion: reduce) {
  .server-status-panel.server-status-client-view,
  .server-status-client-view .server-status-row,
  .server-status-live i,
  .server-mini-bot,
  .server-ai-spark,
  .server-delivery-track::after,
  .server-track-pulse,
  .server-status-courier,
  .server-client-computer,
  .server-status-client-view .server-status-badge::before {
    animation: none !important;
  }
}
