/* Layout griglia e barra superiore. Solo token CSS, nessun colore fisso. */

body {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin: 0;
}

#topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 8px 12px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.topbar-title {
  font-weight: 600;
  color: var(--gold);
  margin-right: 8px;
}

.topbar-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
}

.topbar-label select {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 6px;
  font-size: 12px;
}

.topbar-cells {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.topbar-spacer {
  flex: 1;
}

.topbar-btn {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 10px;
  cursor: pointer;
  font-size: 12px;
}

.topbar-btn:hover {
  border-color: var(--accent);
}

#grid {
  flex: 1;
  display: grid;
  gap: 6px;
  padding: 6px;
  min-height: 0;
  overflow: hidden;
}

.grid-cell {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: auto;
  min-height: 0;
  position: relative;
}

.grid-cell .panel {
  max-width: none;
  height: 100%;
  border: none;
  border-radius: 0;
}

.panel-empty {
  padding: 16px;
  font-size: 13px;
}
