/* === POKE AGENT DASHBOARD — DOT SHAPE EFFECT === */
:root {
  --bg:         rgb(36,  73, 209);
  --overlay:    rgba(70, 105, 230, 0.45);
  --dot-color:  rgba(255, 255, 255, 0.85);
  --card-bg:    rgba(255, 255, 255, 0.06);
  --card-border:rgba(255, 255, 255, 0.15);
  --text-primary: #ffffff;
  --text-muted: rgba(255,255,255,0.55);
  --accent:     #7eb3ff;
  --green:      #5dffb0;
  --yellow:     #ffe07a;
  --red:        #ff6b6b;
  --font:       'SF Mono', 'Fira Mono', 'Consolas', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%; height: 100%;
  background: var(--bg);
  font-family: var(--font);
  color: var(--text-primary);
  overflow-x: hidden;
}

/* === DOT CANVAS === */
#dotCanvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* === ASCII FLICKER LAYER === */
.ascii-layer {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: var(--overlay);
  font-size: 11px;
  line-height: 1.3;
  color: rgba(255,255,255,0.05);
  white-space: pre;
  overflow: hidden;
  animation: ascii-flicker 4s infinite steps(1);
}

@keyframes ascii-flicker {
  0%,100% { opacity: 0.3; }
  25%      { opacity: 0.18; }
  50%      { opacity: 0.28; }
  75%      { opacity: 0.12; }
}

/* === DASHBOARD LAYOUT === */
.dashboard {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0 0 40px;
}

/* === HEADER === */
.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 36px 18px;
  border-bottom: 1px solid var(--card-border);
  backdrop-filter: blur(4px);
}

.logo-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 10px rgba(255,255,255,0.7), 0 0 24px rgba(126,179,255,0.5);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%,100% { transform: scale(1); box-shadow: 0 0 10px rgba(255,255,255,0.7); }
  50%     { transform: scale(1.25); box-shadow: 0 0 18px rgba(255,255,255,0.95); }
}

.logo-text {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #fff;
}

.logo-sub {
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 2px;
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-muted);
}

.pulse-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: pulse-dot 2s ease-in-out infinite;
  display: inline-block;
}

/* === SCENE BAR (beach / palm / coconut) === */
.scene-bar {
  display: flex;
  align-items: flex-end;
  padding: 16px 36px 0;
  gap: 16px;
  overflow: hidden;
  height: 72px;
}

.palm-tree {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  user-select: none;
}

.palm-trunk {
  width: 4px;
  height: 36px;
  background: linear-gradient(to top, rgba(255,255,255,0.2), rgba(255,255,255,0.05));
  border-radius: 2px;
}

.palm-leaves { font-size: 28px; line-height: 1; margin-bottom: -4px; }

.beach-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  padding-bottom: 4px;
}

.coconut { font-size: 18px; animation: coconut-bob 3s ease-in-out infinite; display: inline-block; }
@keyframes coconut-bob {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-5px); }
}

.wave-bar {
  flex: 1;
  font-size: 13px;
  color: rgba(126,179,255,0.4);
  letter-spacing: -1px;
  overflow: hidden;
  animation: wave-scroll 6s linear infinite;
  white-space: nowrap;
}

@keyframes wave-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* === AGENT GRID === */
.agent-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  padding: 32px 36px;
}

/* === AGENT CARD === */
.agent-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 20px 22px;
  backdrop-filter: blur(8px);
  transition: border-color 0.3s, transform 0.2s;
  position: relative;
  overflow: hidden;
}

.agent-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(255,255,255,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.agent-card:hover {
  border-color: rgba(255,255,255,0.3);
  transform: translateY(-2px);
}

.agent-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.agent-name {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
}

.agent-status-badge {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.badge-idle    { background: rgba(255,224,122,0.15); color: var(--yellow); border: 1px solid rgba(255,224,122,0.3); }
.badge-active  { background: rgba(93,255,176,0.15);  color: var(--green);  border: 1px solid rgba(93,255,176,0.3); }
.badge-error   { background: rgba(255,107,107,0.15); color: var(--red);    border: 1px solid rgba(255,107,107,0.3); }
.badge-offline { background: rgba(255,255,255,0.08); color: var(--text-muted); border: 1px solid var(--card-border); }

.agent-task {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  min-height: 36px;
  margin-bottom: 14px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.agent-dots {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.agent-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  transition: background 0.3s;
}

.agent-dot.lit { background: #fff; box-shadow: 0 0 6px rgba(255,255,255,0.8); }

.agent-updated {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 12px;
  opacity: 0.7;
}

/* === LOADING CARD === */
.loading-card {
  grid-column: 1/-1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--text-muted);
  font-size: 13px;
  padding: 60px 0;
}

.dot-spinner {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.15);
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}

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

/* === FOOTER === */
.dashboard-footer {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  padding: 0 36px;
  letter-spacing: 0.08em;
}

/* === EMPTY STATE === */
.empty-state {
  grid-column: 1/-1;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  padding: 60px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.empty-palm { font-size: 42px; }
