/* EMF panel components */

.ops-card {
  background: var(--f-bg-panel);
  border: 1px solid var(--f-border);
  border-radius: var(--f-radius);
  padding: 0.85rem 1rem 1.35rem;
  min-width: 0;
}
.ops-card > h2 {
  margin: 0 0 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--f-muted);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}
.ops-card > h2 .freshness {
  font-size: 0.62rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--f-muted);
  font-family: var(--f-mono);
}
.ops-card.live-stripe { border-left: 3px solid var(--f-live); }

.panel-section { display: none; }
.panel-section.active { display: block; }

/* Now/Next hero */
.stage-columns {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem;
}
.stage-col {
  background: rgba(6, 12, 22, 0.55);
  border: 1px solid var(--f-border);
  border-radius: 8px;
  padding: 0.6rem 0.7rem;
}
.stage-col h3 {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  color: var(--f-accent);
  letter-spacing: 0.04em;
}
.stage-row {
  padding: 0.4rem 0.45rem;
  border-radius: 6px;
  margin-bottom: 0.35rem;
}
.stage-row.now { background: rgba(34, 211, 238, 0.08); border: 1px solid var(--f-border); }
.stage-row .slot-label {
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--f-live);
}
.stage-row.next .slot-label { color: var(--f-muted); }
.stage-row .talk-title {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--f-text);
  text-decoration: none;
  margin: 0.15rem 0;
}
.stage-row .talk-title:hover { color: var(--f-accent); }
.stage-row .talk-meta {
  font-size: 0.7rem;
  font-family: var(--f-mono);
  color: var(--f-muted);
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}
.stage-row .idle { font-size: 0.75rem; color: var(--f-muted); font-style: italic; }

/* Generic row lists (schedule browse, villages, bars) */
.row-list { display: flex; flex-direction: column; gap: 0.3rem; max-height: 26rem; overflow: auto; }
.row-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.35rem 0.75rem;
  align-items: center;
  padding: 0.42rem 0.5rem;
  border-radius: 6px;
  border: 1px solid transparent;
}
.row-item:hover { background: var(--f-bg-panel-hover); border-color: var(--f-border); }
.row-item .row-title {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--f-text);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.row-item .row-title:hover { color: var(--f-accent); }
.row-item .row-meta {
  grid-column: 1;
  font-size: 0.68rem;
  font-family: var(--f-mono);
  color: var(--f-muted);
}
.row-item .row-actions { grid-row: span 2; display: flex; gap: 0.35rem; }

.btn {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--f-accent);
  background: var(--f-accent-dim);
  border: 1px solid var(--f-border);
  border-radius: 6px;
  padding: 0.28rem 0.6rem;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { background: rgba(34, 211, 238, 0.2); }
.btn-lg { font-size: 0.9rem; padding: 0.55rem 1.1rem; }

.type-badge {
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  border: 1px solid var(--f-border);
  color: var(--f-muted);
}

/* Search results dropdown */
.search-results {
  position: absolute;
  top: calc(var(--f-hud-h) - 0.4rem);
  left: 50%;
  transform: translateX(-50%);
  width: min(34rem, 92vw);
  max-height: 60vh;
  overflow: auto;
  z-index: 200;
  background: var(--f-bg-mid);
  border: 1px solid var(--f-border);
  border-radius: var(--f-radius);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6);
  display: none;
  padding: 0.4rem;
}
.search-results.open { display: block; }

/* Bars */
.stock-table { width: 100%; border-collapse: collapse; font-size: 0.78rem; }
.stock-table th {
  text-align: left;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--f-muted);
  padding: 0.25rem 0.4rem;
  border-bottom: 1px solid var(--f-border);
}
.stock-table td { padding: 0.3rem 0.4rem; border-bottom: 1px solid rgba(34, 211, 238, 0.08); }
.stock-table td.num { font-family: var(--f-mono); text-align: right; }
.stock-low { color: var(--f-warn); }
.stock-out { color: var(--f-danger); }

/* Weather */
.weather-strip { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.weather-chip {
  min-width: 7rem;
  padding: 0.5rem 0.7rem;
  background: rgba(6, 12, 22, 0.55);
  border: 1px solid var(--f-border);
  border-radius: 8px;
}
.weather-chip .metric { font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--f-muted); }
.weather-chip .value { font-family: var(--f-mono); font-size: 1.15rem; font-weight: 700; color: var(--f-accent); }

/* Map */
.map-frame-wrap { position: relative; min-height: 20rem; }
.map-frame-wrap iframe {
  width: 100%;
  height: 24rem;
  border: 1px solid var(--f-border);
  border-radius: 8px;
  background: var(--f-bg-deep);
}
.map-fallback { text-align: center; padding: 2.5rem 1rem; }
.map-fallback p { color: var(--f-muted); }

/* Ask */
.chip-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.75rem; }
.ask-form { display: flex; gap: 0.5rem; margin-bottom: 0.75rem; }
.ask-form input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  color: var(--f-text);
  background: rgba(6, 12, 22, 0.8);
  border: 1px solid var(--f-border);
  border-radius: 6px;
}
.ask-answer {
  white-space: pre-wrap;
  font-size: 0.85rem;
  line-height: 1.5;
  background: rgba(6, 12, 22, 0.55);
  border: 1px solid var(--f-border);
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  min-height: 3rem;
}
.ask-answer .ask-source { display: block; margin-top: 0.5rem; font-size: 0.68rem; color: var(--f-muted); font-family: var(--f-mono); }

/* Status banners — static, high contrast, no shake. */
.banner {
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}
.banner.warn { background: rgba(251, 191, 36, 0.12); border: 1px solid rgba(251, 191, 36, 0.5); color: var(--f-warn); }
.banner.error { background: rgba(248, 113, 113, 0.12); border: 1px solid rgba(248, 113, 113, 0.55); color: var(--f-danger); }
.banner.info { background: var(--f-accent-dim); border: 1px solid var(--f-border); color: var(--f-accent); }

.empty-hint { color: var(--f-muted); font-size: 0.8rem; font-style: italic; }

.phones-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}
.phones-filter {
  width: 100%;
  padding: 0.45rem 0.65rem;
  font-size: 0.82rem;
  color: var(--f-text);
  background: rgba(6, 12, 22, 0.8);
  border: 1px solid var(--f-border);
  border-radius: 6px;
}
.phones-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.phones-page-status {
  font-size: 0.72rem;
  font-family: var(--f-mono);
  color: var(--f-muted);
}
.phones-table td {
  word-break: break-word;
}

.stats-frame-wrap { position: relative; min-height: 16rem; margin-top: 0.5rem; }
.stats-frame-wrap iframe {
  width: 100%;
  height: min(24rem, 55vh);
  border: 1px solid var(--f-border);
  border-radius: 8px;
  background: var(--f-bg-deep);
}

pre.data-block {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  color: var(--f-code-fg);
  background: var(--f-code-bg);
  border: 1px solid var(--f-border);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  overflow: auto;
  max-height: 20rem;
}
