/* Panel operatora: czytelny, spokojny, w kolorach GAIA. */
:root {
  --brand: #2270B9;
  --brand-hover: #1A5D9E;
  --text: #000000;
  --text-2: #3A3A3A;
  --text-3: #76777A;
  --line: #E8E8E8;
  --bg: #FFFFFF;
  --bg-2: #F5F5F5;
  --ok: #1E8E3E;
  --warn: #B26A00;
  --bad: #C62828;
  --font: 'Archivo', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.5; }
[hidden] { display: none !important; }

/* Nagłówek zostaje u góry przy przewijaniu: pasek ostrzeżeń widać też przy przyciskach Start i Pauza. */
.top {
  display: flex; align-items: center; flex-wrap: wrap; gap: 16px; padding: 16px 24px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10; background: var(--bg);
}
.top img { height: 32px; }
.top h1 { font-size: 20px; margin: 0; flex: 1; }
.top h1 span { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); margin-left: 12px; }
.badge { font-family: var(--mono); font-size: 13px; padding: 4px 12px; border-radius: 999px; background: var(--bg-2); color: var(--text-3); }
.badge.connected { background: #E6F4EA; color: var(--ok); }
.badge.connecting, .badge.reconnecting { background: #FFF4E0; color: var(--warn); }
.badge.paused { background: #EAF2FA; color: var(--brand); }
.alerts { flex-basis: 100%; list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.alerts li { padding: 8px 12px; border-radius: 8px; font-weight: 600; font-size: 15px; }
.alerts li.warn { background: #FFF4E0; color: var(--warn); }
.alerts li.bad { background: #FDECEA; color: var(--bad); }

.login { display: grid; place-items: center; padding: 96px 16px; }
.login form { display: grid; gap: 12px; width: min(360px, 100%); }
.login label { font-weight: 600; }

.console { display: grid; grid-template-columns: minmax(320px, 440px) 1fr; gap: 32px; padding: 24px; align-items: start; }
@media (max-width: 900px) { .console { grid-template-columns: 1fr; } }

section { margin-bottom: 28px; }
h2 { font-size: 15px; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
h2 b { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 12px; }
.row { display: flex; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.row select { flex: 1; min-width: 0; }
.hint { color: var(--text-3); font-size: 13px; margin: 6px 0 0; }

button, select, input, textarea { font: inherit; }
input[type=password], input[type=text], select, textarea { padding: 9px 12px; border: 1px solid #CCCCCC; border-radius: 8px; background: var(--bg); }
.field { display: block; font-weight: 600; font-size: 14px; margin: 16px 0 6px; }
#vocabulary { width: 100%; resize: vertical; display: block; }
.field.first { margin-top: 0; }
.buttons { margin-top: 14px; }
button { padding: 9px 16px; border-radius: 8px; border: 1px solid #CCCCCC; background: var(--bg); cursor: pointer; }
button:hover:not(:disabled) { border-color: var(--text); }
button:disabled { opacity: .45; cursor: default; }
button.primary { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
button.primary:hover:not(:disabled) { background: var(--brand-hover); }
button.link { border: 0; background: none; color: var(--text-3); padding: 0; text-decoration: underline; }
.buttons button { min-width: 88px; }

.meter { height: 12px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; margin-top: 8px; }
.meter div { height: 100%; width: 0; background: var(--ok); transition: width .08s linear; }

.status { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 0; }
.status dt { color: var(--text-3); }
.status dd { margin: 0; font-family: var(--mono); font-size: 14px; }
.errors { margin: 12px 0 0; padding-left: 18px; color: var(--bad); font-size: 13px; }
.error { color: var(--bad); min-height: 1.5em; margin: 0; }

.preview-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.preview-head h2 { margin: 0; }
.preview-head button { margin-left: auto; }
.screen-status { font-family: var(--mono); font-size: 13px; color: var(--text-3); }
.screen-status.visible { color: var(--ok); }
.preview .frame { position: relative; aspect-ratio: 16 / 9; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.preview iframe { width: 100%; height: 100%; border: 0; display: block; pointer-events: none; }
/* Klik w górny pasek podglądu zmienia napis w nagłówku ekranu. Pasek ma wysokość .head z ekran.css:
   2 × 2,2vw odstępu + logo 3,4vw, czyli 7,8% szerokości ekranu (stąd aspect-ratio, nie piksele). */
.header-edit {
  position: absolute; top: 0; left: 0; width: 100%; aspect-ratio: 1000 / 78;
  display: flex; align-items: center; justify-content: flex-end; padding: 0 12px;
  border: 2px solid transparent; border-radius: 8px 8px 0 0; background: none; color: transparent; cursor: text;
}
.header-edit:hover:not(:disabled), .header-edit:focus-visible { border-color: var(--brand); color: var(--brand); outline: none; }
/* Pole tuż pod paskiem: 7,8% szerokości ramki 16:9 to 13,9% jej wysokości (7,8 × 16 / 9). */
.header-input { position: absolute; top: 13.9%; left: 12px; right: 12px; box-shadow: 0 4px 16px rgba(0, 0, 0, .15); }

/* Prezentacje: lista, sterowanie i pasek miniatur pod podglądem ekranu. */
.slides.dropping { outline: 2px dashed var(--brand); outline-offset: 8px; border-radius: 8px; }
.progress { font-family: var(--mono); font-size: 13px; color: var(--brand); margin: 6px 0 0; }
.slide-list { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 6px; }
.slide-list li { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 12px; border: 1px solid var(--line); border-radius: 8px; }
.slide-list li.active { border-color: var(--brand); background: #EAF2FA; }
.slide-list .name { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slide-list .count { color: var(--text-3); font-size: 13px; white-space: nowrap; }
.slide-list button { padding: 4px 10px; font-size: 14px; }
.slide-controls { align-items: center; }
.counter { font-family: var(--mono); font-size: 14px; min-width: 72px; text-align: center; }
.thumbs-panel { margin-top: 24px; }
.thumbs { position: relative; display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; }
.thumbs img { height: 72px; flex: none; border-radius: 4px; border: 2px solid transparent; cursor: pointer; background: var(--bg-2); }
.thumbs img.current { border-color: var(--brand); }
