/*
 * Administrácia – kompaktný mobilný layout (načítava sa po admin.css a prepisuje ho).
 * Úzky stĺpec aj na PC (obsluha ide cez telefón), riadky "popisok vľavo / prvok vpravo".
 */

:root {
  --md-sys-color-primary: #2f7de1;
  --md-sys-color-background: #f1f4f5;
  --pl-line: #e3e8ec;
  --pl-field: #cfd8dc;
}

.pl-body { font-size: 14px; line-height: 1.45; letter-spacing: 0; }
.pl-body { --pl-max: 520px; --pl-pad: 10px; }

/* horná lišta */
.pl-bar { height: 52px; padding: 0 max(var(--pl-pad), calc((100% - var(--pl-max)) / 2 + var(--pl-pad))); background: #fff; box-shadow: 0 1px 0 var(--pl-line); }
.pl-bar__title { font: 500 1.05rem/1.4 var(--md-font); }
.pl-bar .md-btn { min-height: 32px; padding: 4px 12px; font-size: 13px; }
.pl-bar .md-btn::before { display: none; }

.pl-main { padding: 6px 0 24px; }
.pl-title { font: 400 1.3rem/1.6rem var(--md-font); margin: 14px 0 12px; }

/* karty */
.pl-stack { display: grid; gap: 10px; }
.pl-stack > * { min-width: 0; }
.pl-panel { background: #fff; border: 1px solid var(--pl-line); border-radius: 10px; box-shadow: none; padding: 14px 16px; }
.pl-panel .md-headline { font-size: 1.1rem; line-height: 1.5rem; font-weight: 600; }
.pl-panel .md-title { font-size: .95rem; line-height: 1.4rem; font-weight: 600; }
.pl-center { text-align: center; }
.pl-center p { margin: 4px 0; }
.pl-card { background: #fff; border: 1px solid var(--pl-line); border-radius: 10px; }
.pl-narrow { max-width: 520px; }
.pl-login { margin-top: 24px; }

/* skupiny v karte nastavení */
.pl-group { border: 0; border-bottom: 1px solid var(--pl-line); margin: 0; padding: 12px 16px 8px; min-width: 0; }
.pl-group:disabled { opacity: .65; }
.pl-sub { float: left; width: 100%; padding: 0; margin: 0 0 6px; font: 600 .72rem/1.2rem var(--md-font); letter-spacing: .06em; text-transform: uppercase; color: var(--md-sys-color-primary); }
.pl-sub + * { clear: both; }

/* riadok formulára */
.pl-row { display: grid; grid-template-columns: minmax(96px, 38%) 1fr; gap: 2px 12px; align-items: start; padding: 5px 0; }
.pl-row--stack { grid-template-columns: 1fr; }
.pl-lbl { padding-top: 8px; font-size: .8rem; line-height: 1.2rem; color: var(--md-sys-color-on-surface-variant); }
.pl-ctl { min-width: 0; }
.pl-hint { margin: 3px 0 0; font-size: .72rem; line-height: 1.1rem; color: var(--md-sys-color-on-surface-variant); }
.pl-depends { display: block; }
.pl-depends[hidden] { display: none; }
.pl-grid { display: block; }

.pl-in {
  width: 100%; height: 36px; padding: 0 10px;
  border: 1px solid var(--pl-field); border-radius: 8px; background: #fff;
  font: 400 .9rem/1.2 var(--md-font); color: var(--md-sys-color-on-surface);
  transition: border-color var(--md-motion), box-shadow var(--md-motion);
}
.pl-in:hover { border-color: #90a4ae; }
.pl-in:focus { outline: 0; border-color: var(--md-sys-color-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--md-sys-color-primary) 22%, transparent); }
.pl-in:disabled { background: #f3f6f7; color: #78909c; }
.pl-in--area { height: auto; min-height: 72px; padding: 8px 10px; resize: vertical; }
.pl-in--file { height: auto; padding: 5px; font-size: .78rem; }
.pl-in--file::file-selector-button { margin-right: 8px; padding: 5px 12px; border: 0; border-radius: 999px; background: var(--md-sys-color-primary); color: #fff; font: 500 .78rem var(--md-font); cursor: pointer; }
select.pl-in { padding-right: 6px; }
code { font-size: .85em; background: #eef2f4; padding: 0 4px; border-radius: 4px; }

/* tag */
.pl-prefix { display: flex; align-items: stretch; }
.pl-prefix__pre { display: grid; place-items: center; padding: 0 8px; border: 1px solid var(--pl-field); border-right: 0; border-radius: 8px 0 0 8px; background: #f3f6f7; color: #607d8b; font-size: .8rem; }
.pl-prefix .pl-in { border-radius: 0 8px 8px 0; }

/* farba */
.pl-color__ctl { display: flex; gap: 8px; align-items: center; }
.pl-color__ctl input[type="color"] { flex: none; width: 36px; height: 36px; padding: 2px; border: 1px solid var(--pl-field); border-radius: 8px; background: #fff; cursor: pointer; }
.pl-color__text { max-width: 120px; }

/* obrázok */
.pl-image__preview { display: block; max-width: 100%; max-height: 110px; margin-bottom: 6px; border-radius: 8px; border: 1px solid var(--pl-line); background: repeating-conic-gradient(#0001 0 25%, transparent 0 50%) 50% / 12px 12px; }

/* prepínač */
.md-switch { display: inline-flex; align-items: center; min-height: 0; cursor: pointer; }
.md-switch__track { width: 40px; height: 24px; border-radius: 12px; border-width: 2px; }
.md-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.md-switch__track { position: relative; flex: none; box-sizing: border-box; border-style: solid; border-color: var(--md-sys-color-outline); background: #eceff1; transition: background var(--md-motion), border-color var(--md-motion); }
.md-switch__track::after { content: ""; position: absolute; top: 4px; left: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--md-sys-color-outline); transition: transform var(--md-motion), width var(--md-motion), height var(--md-motion), background var(--md-motion); }
.md-switch input:checked + .md-switch__track { background: var(--md-sys-color-primary); border-color: var(--md-sys-color-primary); }
.md-switch input:checked + .md-switch__track::after { background: #fff; width: 16px; height: 16px; top: 2px; transform: translateX(16px); }
.md-switch input:focus-visible + .md-switch__track { outline: 3px solid color-mix(in srgb, var(--md-sys-color-primary) 45%, transparent); outline-offset: 2px; }
.pl-sr { position: absolute; left: -9999px; }

/* zaškrtávacie polia */
.pl-checks { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.pl-body .md-check { font-size: .85rem; line-height: 1.2rem; gap: 6px; }
.pl-body .md-check__box { width: 16px; height: 16px; margin: 2px; }

/* tlačidlá */
.pl-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 16px; border: 0; border-radius: 999px; cursor: pointer; text-decoration: none;
  background: var(--md-sys-color-primary); color: #fff; font: 500 .85rem/1 var(--md-font);
  transition: filter var(--md-motion), box-shadow var(--md-motion);
}
.pl-btn:hover { filter: brightness(1.08); box-shadow: var(--md-elev-1); }
.pl-btn--lg { height: 42px; padding: 0 22px; font-size: .9rem; }
.pl-btn--small { height: 28px; padding: 0 12px; font-size: .78rem; }
.pl-btn--outline { background: #fff; color: var(--md-sys-color-primary); box-shadow: inset 0 0 0 1px var(--pl-field); }
.pl-btn--outline:hover { box-shadow: inset 0 0 0 1px var(--md-sys-color-primary); filter: none; }

.pl-savebar {
  position: sticky; bottom: 0; z-index: 10; display: flex; gap: 8px; padding: 10px 12px;
  background: rgb(255 255 255 / .96); backdrop-filter: blur(6px); border-top: 1px solid var(--pl-line);
  border-radius: 0 0 10px 10px; box-shadow: none;
}
.pl-savebar .pl-btn { flex: 1; }

/* používatelia a inline formuláre */
.pl-users { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 4px; }
.pl-users li { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .85rem; }
.pl-inline-form { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.pl-inline-form .pl-in { flex: 1; min-width: 0; }

/* zbaliteľné sekcie */
.pl-accs { padding: 2px 16px; }
.pl-acc { border-bottom: 1px solid var(--pl-line); }
.pl-acc:last-child { border-bottom: 0; }
.pl-acc > summary { list-style: none; cursor: pointer; padding: 12px 0; font: 500 .9rem/1.4rem var(--md-font); display: flex; align-items: center; gap: 8px; }
.pl-acc > summary::-webkit-details-marker { display: none; }
.pl-acc > summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid #78909c; border-bottom: 2px solid #78909c; transform: rotate(45deg); transition: transform var(--md-motion); }
.pl-acc[open] > summary::after { transform: rotate(-135deg); }
.pl-acc__body { padding: 0 0 14px; display: grid; gap: 10px; font-size: .85rem; }
.pl-simple { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.pl-simple li { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: center; }
.pl-ol { list-style: decimal; padding-left: 22px; }
.pl-ol li { display: list-item; }
.pl-table { width: 100%; border-collapse: collapse; font-size: .8rem; }
.pl-table th, .pl-table td { text-align: left; padding: 6px; border-bottom: 1px solid var(--pl-line); }
.pl-qr { border: 4px solid #eef2f4; border-radius: 10px; padding: 6px; background: #fff; }
.pl-pay { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.pl-pay address { font-style: normal; line-height: 1.6; }

/* štítky */
.pl-chip { height: 20px; padding: 0 8px; border-radius: 6px; font-size: .68rem; font-weight: 600; }
.pl-chip--count { background: var(--md-sys-color-primary); color: #fff; border-radius: 10px; }
.pl-linkbtn { padding: 2px 4px; font-size: .8rem; }

/* zoznam súťaží (/sutaze) */
.pl-tabs { margin-bottom: 10px; }
.pl-tab { padding: 10px 8px; font-size: .85rem; }
.pl-list { border-radius: 8px; }
.pl-list > li { padding: 10px 12px; }
.pl-list__name { font-size: .95rem; }

.pl-flash { margin: 0; }
.pl-flash .md-banner { margin: 0; padding: 10px 12px; font-size: .85rem; }

/* prihlásenie */
.pl-login .md-field__input { height: 48px; padding: 12px 14px; }
.pl-login .md-field__label { top: 12px; }
.pl-login .md-form { gap: 14px; }

@media (max-width: 359px) {
  .pl-row { grid-template-columns: 1fr; }
}
@media (min-width: 600px) {
  .pl-body > #obsah { padding-top: 16px; }
}

/* ---------- Živý náhľad skenera (len desktop) ---------- */
.pl-preview { display: none; }
@media (min-width: 1020px) {
.pl-wide { --pl-max: 980px; }
  .pl-split { display: grid; grid-template-columns: minmax(0, 520px) 380px; gap: 28px; align-items: start; justify-content: center; }
  .pl-preview { display: block; position: sticky; top: 68px; }
  .pl-preview__bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
  .pl-preview__title { font: 600 .8rem/1 var(--md-font); letter-spacing: .06em; text-transform: uppercase; color: var(--md-sys-color-on-surface-variant); }
  .pl-preview__tabs { display: inline-flex; padding: 3px; border-radius: 999px; background: #e4eaed; }
  .pl-preview__tabs button { border: 0; background: none; padding: 6px 16px; border-radius: 999px; font: 600 .8rem/1 var(--md-font); color: #546e7a; cursor: pointer; }
  .pl-preview__tabs button[aria-selected="true"] { background: #fff; color: var(--md-sys-color-primary); box-shadow: 0 1px 3px rgb(0 0 0 / .18); }
  .pl-preview__phone { width: 100%; height: min(760px, calc(100vh - 170px)); border: 9px solid #20262b; border-radius: 38px; overflow: hidden; background: #fff; box-shadow: 0 20px 44px -18px rgb(0 0 0 / .5); }
  .pl-preview__phone iframe { display: block; width: 100%; height: 100%; border: 0; }
  .pl-preview__hint { margin: 10px 4px 0; font-size: .75rem; line-height: 1.1rem; color: var(--md-sys-color-on-surface-variant); }
}

/* ---------- Rozbaľovacie "Náhľady" ---------- */
.pl-previews { flex: 1; position: relative; }
.pl-previews summary { width: 100%; list-style: none; }
.pl-previews summary::-webkit-details-marker { display: none; }
.pl-previews summary svg { width: 18px; height: 18px; }
.pl-menu--up .pl-menu__list { top: auto; bottom: calc(100% + 8px); left: 0; right: 0; min-width: 220px; padding: 6px 0; border-radius: 12px; box-shadow: 0 8px 28px -6px rgb(0 0 0 / .3); background: #fff; }
.pl-menu--up .pl-menu__list a, .pl-menu__off { display: flex; align-items: center; gap: 10px; padding: 11px 16px; font-size: .9rem; color: #37474f; text-decoration: none; }
.pl-menu--up .pl-menu__list a:hover { background: #eef3f6; color: var(--md-sys-color-primary); }
.pl-menu__off { color: #9aa7b0; cursor: not-allowed; }
.pl-menu__off small { margin-left: auto; font-size: .68rem; }

.pl-pass { display: grid; gap: 6px; }
.pl-pass__submit { display: flex; justify-content: center; padding-top: 10px; }
.pl-pass .pl-row { grid-template-columns: 1fr; }

.pl-btnrow { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 4px; }
.pl-btn--off { opacity: .5; cursor: not-allowed; }
.pl-acc .rp-kod { font-family: ui-monospace, Consolas, monospace; font-size: .78rem; }
