/* Hive CPQ red — replace with actual sampled hex from canonical Hive logo SVG.
   TODO plugin-developer: sample the red from icon.svg at scaffold time.
   Placeholder used here is a typical "Hive red" stand-in until the actual
   sampling happens. */
:root {
  --hive-primary-red: #d62828;
  --hive-primary-red-hover: #b51e1e;
  --hive-bg: #fafafa;
  --hive-fg: #1a1a1a;
  --hive-border: #e4e4e4;
  --hive-muted: #6a6a6a;
  --radius: 6px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: var(--hive-bg); color: var(--hive-fg); }

.hdr {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.75rem 1.25rem; background: white;
  border-bottom: 1px solid var(--hive-border);
}
.hdr__logo { width: 32px; height: 32px; }
.hdr__title { margin: 0; font-size: 1.1rem; flex: 1; }
.hdr__lang { display: flex; gap: 0.25rem; }
.lang-btn {
  background: none; border: 1px solid var(--hive-border);
  padding: 0.25rem 0.5rem; border-radius: var(--radius);
  cursor: pointer; font-size: 0.8rem;
}
.lang-btn--active { background: var(--hive-primary-red); color: white; border-color: var(--hive-primary-red); }

.app { max-width: 800px; margin: 0 auto; padding: 1.25rem; }
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.tabs { display: flex; gap: 0.5rem; }
.tab {
  background: none; border: none; padding: 0.5rem 1rem;
  border-bottom: 2px solid transparent; cursor: pointer; font-size: 0.95rem;
}
.tab--active { color: var(--hive-primary-red); border-bottom-color: var(--hive-primary-red); }

.btn {
  background: white; color: var(--hive-fg);
  border: 1px solid var(--hive-border);
  padding: 0.5rem 1rem; border-radius: var(--radius);
  cursor: pointer; font-size: 0.9rem;
}
.btn:hover { background: #f0f0f0; }
.btn--primary { background: var(--hive-primary-red); color: white; border-color: var(--hive-primary-red); }
.btn--primary:hover { background: var(--hive-primary-red-hover); border-color: var(--hive-primary-red-hover); }

.list { display: flex; flex-direction: column; gap: 0.5rem; }
.row {
  background: white; border: 1px solid var(--hive-border);
  border-radius: var(--radius); padding: 0.9rem 1rem;
  display: flex; justify-content: space-between; align-items: center;
}
.row__main { display: flex; flex-direction: column; gap: 0.15rem; }
.row__code { font-weight: 600; font-family: monospace; font-size: 0.95rem; }
.row__desc { color: var(--hive-fg); }
.row__meta { color: var(--hive-muted); font-size: 0.85rem; }
.row__actions { display: flex; gap: 0.25rem; }

.empty { text-align: center; padding: 3rem 1rem; color: var(--hive-muted); }
.loading { text-align: center; padding: 2rem; color: var(--hive-muted); }

.modal { border: none; border-radius: var(--radius); padding: 0; max-width: 480px; width: 100%; }
.modal::backdrop { background: rgba(0,0,0,0.4); }
.modal form { padding: 1.5rem; display: flex; flex-direction: column; gap: 0.85rem; }
.modal h2 { margin: 0 0 0.5rem; }
.field { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.85rem; color: var(--hive-muted); }
.field input {
  font-size: 1rem; padding: 0.45rem 0.6rem;
  border: 1px solid var(--hive-border); border-radius: var(--radius); color: var(--hive-fg);
}
.field input:focus { outline: 2px solid var(--hive-primary-red); outline-offset: -1px; }
.modal__actions { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 0.5rem; }
