/* =========================================================
   glo Admin — shared stylesheet
   Register: product (internal admin tool)
   ========================================================= */

/* ── Fonts ──────────────────────────────────────────────── */
@font-face {
  font-family: 'glo Sans';
  src: url('../fonts/glo-sans-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'glo Sans';
  src: url('../fonts/glo-sans-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'glo Sans';
  src: url('../fonts/glo-sans-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'glo Sans';
  src: url('../fonts/glo-sans-300.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'glo Sans';
  src: url('../fonts/glo-sans-900.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'glo Sans';
  src: url('../fonts/glo-sans-400-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  --glo-red:        #B31217;
  --glo-red-dark:   #8A201D;
  --glo-maroon:     #6E0E12;
  --glo-orange:     #FE5000;
  --glo-orange-hi:  #FF7A00;
  --glo-ink:        #1A1A1A;
  --glo-ink-muted:  #5A5A5A;
  --glo-bg:         #F5F5F7;
  --glo-white:      #FEFEFE;
  --glo-border:     #E2DDDD;
  --glo-stripe:     #FAF5F5;
  --glo-hover:      #F3ECEC;
  --radius-card:    16px;
  --shadow-card:    0 2px 12px oklch(0.18 0.04 15 / 0.10), 0 1px 3px oklch(0.18 0.04 15 / 0.06);
  --font-base:      'glo Sans', system-ui, sans-serif;
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

/* ── Base ───────────────────────────────────────────────── */
html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-base);
  font-size: 15px;
  color: var(--glo-ink);
  background: var(--glo-bg);
  -webkit-font-smoothing: antialiased;
}

/* ── Header bar ─────────────────────────────────────────── */
.glo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 56px;
  background: linear-gradient(100deg, var(--glo-red) 0%, var(--glo-maroon) 100%);
  box-shadow: 0 2px 8px oklch(0.18 0.06 15 / 0.18);
}

.glo-header__logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
}

.glo-header__logo img {
  height: 34px;
  width: auto;
  display: block;
}

.glo-header__right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* ── Page wrapper ───────────────────────────────────────── */
.glo-page {
  padding: 2rem 2rem 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* ── Monochromatické ikony (dědí barvu textu) ─────────────── */
.ico {
  width: 1.15em;
  height: 1.15em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
  flex: none;
}
/* mezera mezi ikonou a textem v tlačítku (bez flex gap) */
.btn .ico { margin-right: 0.4em; }
.btn-icononly .ico { margin-right: 0; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-block;
  text-align: center;
  padding: 0.45em 1.1em;
  border-radius: 999px;
  font-family: var(--font-base);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  border: 2px solid transparent;
  transition: filter 0.15s ease-out, box-shadow 0.15s ease-out;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(90deg, var(--glo-orange-hi) 0%, var(--glo-orange) 100%);
  color: var(--glo-white);
  border-color: transparent;
}
.btn-primary:hover {
  filter: brightness(1.08);
  box-shadow: 0 3px 10px oklch(0.5 0.18 35 / 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--glo-red);
  border-color: var(--glo-red);
}
.btn-outline:hover {
  background: var(--glo-stripe);
  box-shadow: 0 2px 6px oklch(0.4 0.1 15 / 0.18);
}

.btn-danger {
  background: var(--glo-red);
  color: var(--glo-white);
  border-color: var(--glo-red);
}
.btn-danger:hover:not(:disabled) {
  filter: brightness(1.08);
  box-shadow: 0 3px 10px oklch(0.4 0.14 20 / 0.30);
}
.btn-danger:disabled,
.btn:disabled {
  background: #d9d2d2;
  color: #8a8a8a;
  border-color: #d9d2d2;
  cursor: not-allowed;
  filter: none;
  box-shadow: none;
}

/* per-page selector */
.glo-perpage {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  font-size: 0.85rem;
  color: var(--glo-ink-muted);
}
.glo-perpage select {
  font-family: var(--font-base);
  font-size: 0.85rem;
  line-height: 1.5; /* vycentruje "25" svisle (glo Sans jinak sedí vysoko) */
  padding: 0.35rem 0.5rem;
  border: 1.5px solid var(--glo-border);
  border-radius: 8px;
  background: var(--glo-white);
  color: var(--glo-ink);
  cursor: pointer;
}

/* row-select checkboxes */
.glo-table th.col-check,
.glo-table td.col-check {
  width: 40px;
  text-align: center;
}
.glo-table .row-check,
#selectAll {
  width: 16px;
  height: 16px;
  accent-color: var(--glo-red);
  cursor: pointer;
}

.btn-ghost {
  background: transparent;
  color: oklch(0.97 0.005 0);
  border-color: oklch(0.80 0.04 15 / 0.45);
}
.btn-ghost:hover {
  background: oklch(1 0 0 / 0.10);
}

/* Logout button inside header — resets browser <button> defaults */
.btn-logout {
  background: transparent;
  color: oklch(0.97 0.005 0);
  border: 2px solid oklch(0.80 0.04 15 / 0.45);
  border-radius: 999px;
  padding: 0.35em 1em;
  font-family: var(--font-base);
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease-out;
  white-space: nowrap;
}
.btn-logout:hover {
  background: oklch(1 0 0 / 0.12);
}

/* ── Toolbar (export links row) ─────────────────────────── */
.glo-toolbar {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.glo-toolbar__title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--glo-ink);
  margin: 0 auto 0 0;
}

/* ── White card ─────────────────────────────────────────── */
.glo-card {
  background: var(--glo-white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

/* ── Responses table ─────────────────────────────────────── */
.glo-table {
  border-collapse: collapse;
  width: 100%;
}

.glo-table thead tr {
  background: var(--glo-red);
}

.glo-table th {
  padding: 11px 14px;
  text-align: left;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--glo-white);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: none;
}

.glo-table td {
  padding: 10px 14px;
  font-size: 0.875rem;
  color: var(--glo-ink);
  border-bottom: 1px solid var(--glo-border);
}

.glo-table tbody tr:nth-child(even) td {
  background: var(--glo-stripe);
}

.glo-table tbody tr:last-child td {
  border-bottom: none;
}

.glo-table tbody tr:hover td {
  background: var(--glo-hover);
}

.glo-table td.empty {
  text-align: center;
  color: var(--glo-ink-muted);
  padding: 2.5rem 1rem;
}

/* Detail pill link inside table */
.glo-table a.detail-link {
  display: inline-flex;
  align-items: center;
  padding: 0.25em 0.75em;
  border-radius: 999px;
  border: 1.5px solid var(--glo-red);
  color: var(--glo-red);
  font-size: 0.8125rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.12s ease-out;
}
.glo-table a.detail-link:hover {
  background: var(--glo-stripe);
}

/* ── Pagination ─────────────────────────────────────────── */
.glo-pagination {
  display: flex;
  gap: 0.375rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
  align-items: center;
}

.glo-pagination a,
.glo-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.5em;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  border: 1.5px solid var(--glo-border);
  color: var(--glo-red);
  background: var(--glo-white);
  transition: background 0.12s ease-out, border-color 0.12s ease-out;
}

.glo-pagination a:hover {
  background: var(--glo-stripe);
  border-color: var(--glo-red);
}

.glo-pagination span.current {
  background: var(--glo-red);
  color: var(--glo-white);
  border-color: var(--glo-red);
  font-weight: 700;
}

/* pagination prev/next arrows */
.glo-pagination .page-arrow {
  font-size: 1.15rem;
  line-height: 1;
  font-weight: 700;
  padding: 0 0.55em;
}
.glo-pagination .page-arrow.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
  background: var(--glo-white);
}

/* footer under the table: per-page (left) + pagination (centered) */
.glo-tablefoot {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  margin-top: 1.25rem;
}
.glo-tablefoot .glo-perpage {
  justify-self: start;
}
.glo-tablefoot .glo-pagination {
  justify-self: center;
  margin-top: 0;
}
@media (max-width: 640px) {
  .glo-tablefoot {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 0.75rem;
  }
  .glo-tablefoot .glo-perpage {
    justify-self: center;
  }
}

/* ── Login page ──────────────────────────────────────────── */
.glo-login-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--glo-maroon);
  padding: 2rem 1rem;
}

.glo-login-logo {
  margin-bottom: 1.75rem;
}

.glo-login-logo img {
  height: 42px;
  width: auto;
  display: block;
}

.glo-login-card {
  background: var(--glo-white);
  border-radius: 20px;
  box-shadow: 0 8px 40px oklch(0.12 0.06 15 / 0.35), 0 2px 8px oklch(0.12 0.06 15 / 0.18);
  padding: 2.25rem 2rem 2.5rem;
  width: 100%;
  max-width: 360px;
}

.glo-login-card h1 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--glo-ink);
  text-align: center;
  margin: 0 0 1.75rem;
  letter-spacing: -0.01em;
}

.glo-login-card label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--glo-ink);
  margin-bottom: 0.3rem;
  letter-spacing: 0.01em;
}

.glo-login-card input {
  width: 100%;
  padding: 0.55rem 0.875rem;
  border: 1.5px solid var(--glo-border);
  border-radius: 8px;
  font-family: var(--font-base);
  font-size: 0.9375rem;
  color: var(--glo-ink);
  background: var(--glo-white);
  margin-bottom: 1.1rem;
  transition: border-color 0.15s ease-out, box-shadow 0.15s ease-out;
  outline: none;
}
.glo-login-card input:focus {
  border-color: var(--glo-red);
  box-shadow: 0 0 0 3px oklch(0.45 0.14 20 / 0.18);
}

.glo-login-card .btn-primary {
  width: 100%;
  justify-content: center;
  padding: 0.7rem 1rem;
  font-size: 1rem;
  border-radius: 10px;
  margin-top: 0.25rem;
}

.glo-login-error {
  display: flex;
  align-items: center;
  gap: 0.5em;
  background: oklch(0.95 0.04 20);
  border: 1.5px solid oklch(0.65 0.14 20);
  border-radius: 8px;
  color: var(--glo-maroon);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.55rem 0.875rem;
  margin-bottom: 1.25rem;
}

/* ── Detail page ─────────────────────────────────────────── */
.glo-detail-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  color: var(--glo-red);
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  margin-bottom: 1.25rem;
  transition: color 0.12s ease-out;
}
.glo-detail-back:hover {
  color: var(--glo-red-dark);
}
.glo-detail-back::before {
  content: '\2190'; /* ← */
  font-size: 1em;
}

.glo-detail-header {
  margin-bottom: 1.5rem;
}

.glo-detail-header h1 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--glo-ink);
  margin: 0 0 0.3rem;
}

.glo-detail-meta {
  font-size: 0.875rem;
  color: var(--glo-ink-muted);
  margin: 0;
}

/* Answers table */
.glo-answers {
  border-collapse: collapse;
  width: 100%;
}

.glo-answers th {
  width: 38%;
  padding: 10px 14px;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--glo-ink);
  text-align: left;
  border-bottom: 1px solid var(--glo-border);
  background: var(--glo-stripe);
  vertical-align: top;
}

.glo-answers td {
  padding: 10px 14px;
  font-size: 0.875rem;
  color: var(--glo-ink);
  border-bottom: 1px solid var(--glo-border);
  vertical-align: top;
}

.glo-answers tr:last-child th,
.glo-answers tr:last-child td {
  border-bottom: none;
}

.glo-answers .section-header td {
  background: var(--glo-red);
  color: var(--glo-white);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 7px 14px;
  border-bottom: none;
}

/* Photos grid */
.glo-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 2px 0;
}

.glo-photo-thumb {
  display: block;
  width: 120px;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
  border: 1.5px solid var(--glo-border);
  transition: opacity 0.15s ease-out, transform 0.15s ease-out;
}

.glo-photos a:hover .glo-photo-thumb {
  opacity: 0.88;
  transform: scale(1.03);
}

/* ── Responsive tweaks ───────────────────────────────────── */
@media (max-width: 640px) {
  .glo-header {
    padding: 0 1rem;
  }
  .glo-page {
    padding: 1.25rem 1rem 2.5rem;
  }
  .glo-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }
  .glo-toolbar__title {
    margin-bottom: 0.5rem;
  }
  .glo-table th,
  .glo-table td {
    padding: 8px 10px;
    font-size: 0.8125rem;
  }
  .glo-answers th {
    width: 45%;
  }
}
