/* Spec Portál - admin felület. Az ügyfélnézet arculati színeivel, külső erőforrás nélkül. */

@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('fonts/montserrat-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20C0;
}

@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('fonts/montserrat-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122;
}

:root {
  --bg: #f3f6fa;
  --card: #ffffff;
  --text: #3c3c3b;
  --muted: #5c5c5b;
  --heading: #1f3575;
  --link: #0067a6;
  --brand: #007bc3;
  --rule: #d9e0ea;
  --warn-bg: #fff3c4;
  --warn: #6b5200;
  --ok-bg: #dff3e4;
  --ok: #1d5c2e;
  --off-bg: #e6e9ee;
  --off: #4a5361;
  --new-bg: #e4f1fa;
  --danger: #a3261b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 0.95rem;
  line-height: 1.55;
}

a {
  color: var(--link);
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.5rem;
  border-bottom: 4px solid var(--brand);
  background: var(--card);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  color: var(--heading);
  font-weight: 800;
  text-decoration: none;
}

main {
  max-width: 62rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
}

h1 {
  margin: 0.25rem 0 0.5rem;
  color: var(--heading);
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.25;
}

h2 {
  margin: 2.25rem 0 0.75rem;
  color: var(--heading);
  font-size: 1.1rem;
}

summary h2 {
  display: inline;
}

summary {
  cursor: pointer;
}

.lead,
.crumb {
  margin: 0;
}

.muted {
  color: var(--muted);
  font-size: 0.86rem;
}

.card {
  margin: 0 0 1rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--rule);
  border-radius: 0.6rem;
  background: var(--card);
}

.card.new {
  border-color: var(--brand);
  background: var(--new-bg);
}

.card.new h2 {
  margin-top: 0;
}

.card.narrow {
  max-width: 24rem;
  margin: 12vh auto 0;
}

.plain {
  margin: 0;
  padding-left: 1.1rem;
}

.table-wrap {
  padding: 0;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tr.revoked {
  opacity: 0.6;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem;
  word-break: break-all;
}

.badge {
  display: inline-block;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge.ok {
  background: var(--ok-bg);
  color: var(--ok);
}

.badge.warn {
  background: var(--warn-bg);
  color: var(--warn);
}

.badge.off {
  background: var(--off-bg);
  color: var(--off);
}

.badge.new {
  background: var(--brand);
  color: #fff;
}

label {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
}

input:not([type='checkbox']),
select,
textarea {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid #b9c4d4;
  border-radius: 0.4rem;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 400;
}

textarea {
  resize: vertical;
}

button {
  padding: 0.5rem 1rem;
  border: 1px solid var(--link);
  border-radius: 0.4rem;
  background: var(--link);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

button.secondary {
  border-color: #b9c4d4;
  background: #fff;
  color: var(--text);
  font-weight: 500;
}

button.danger {
  border-color: var(--danger);
  background: var(--danger);
}

button.secondary.danger {
  background: #fff;
  color: var(--danger);
}

button.link {
  border: 0;
  background: none;
  color: var(--link);
  text-decoration: underline;
}

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
}

.check {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  font-weight: 500;
}

.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.6rem;
}

form.inline {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  align-items: end;
  gap: 0.9rem;
}

form.inline label {
  margin: 0;
}

.copy-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.copy-row .copy {
  margin-top: 0;
  font-size: 0.82rem;
}

.copy-row button {
  white-space: nowrap;
}

.error {
  color: var(--danger);
  font-weight: 600;
}

/* --- megjegyzésszál --- */

.thread {
  margin: 0 0 1rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--rule);
  border-left: 4px solid var(--link);
  border-radius: 0.6rem;
  background: var(--card);
}

.thread.megoldva {
  border-left-color: var(--rule);
}

.thread:target {
  box-shadow: 0 0 0 3px var(--brand);
}

.thread .where {
  margin: 0 0 0.5rem;
}

.thread blockquote {
  margin: 0 0 0.75rem;
  padding-left: 0.75rem;
  border-left: 3px solid #e6c84f;
  color: var(--muted);
  font-style: italic;
}

.flag {
  margin: 0 0 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 0.3rem;
  background: var(--warn-bg);
  color: var(--warn);
  font-size: 0.84rem;
  font-weight: 600;
}

.comments {
  margin: 0 0 0.75rem;
  padding: 0;
  list-style: none;
}

.comment {
  margin-bottom: 0.6rem;
}

.comment.nexen {
  padding: 0.5rem 0.7rem;
  border-radius: 0.4rem;
  background: #eef1f8;
}

.comment.internal {
  background: var(--warn-bg);
}

.comment p {
  margin: 0;
}

.comment .meta {
  color: var(--muted);
  font-size: 0.82rem;
}

.comment .text {
  white-space: pre-wrap;
}

.thread form + form {
  margin-top: 0.6rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

@media (max-width: 700px) {
  form.inline {
    grid-template-columns: 1fr;
  }

  .copy-row {
    flex-direction: column;
  }
}

/* --- hol kell javítani --- */

.source {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.9rem;
  margin: 0 0 0.75rem;
  padding: 0.45rem 0.7rem;
  border-radius: 0.4rem;
  background: var(--bg);
  font-size: 0.86rem;
}

.source code {
  font-size: 0.84rem;
  font-weight: 600;
  word-break: normal;
}

.source button {
  padding: 0.25rem 0.7rem;
  font-size: 0.82rem;
}

.copy-inline {
  display: inline-block;
}

.card.work p {
  margin: 0 0 0.75rem;
}

.card.work .row {
  align-items: flex-start;
  margin-top: 0;
}

button.secondary.primary {
  border-color: var(--link);
  background: var(--link);
  color: #fff;
  font-weight: 600;
}

.inline-form {
  display: flex;
  gap: 0.5rem;
  margin: 0.6rem 0 0.3rem;
}

.inline-form input {
  min-width: 22rem;
  margin-top: 0;
}
