/* ==========================================================================
   Barevne motivy (svetly / tmavy)
   Rezim se nastavuje atributem data-theme na <html>, viz Theme_Set() v common.js.
   Vsechny barvy v CSS objektu (object/<TemplUID>/style.css) pouzivat jen pres
   tyto promenne, pak se objekty prepnou do tmaveho rezimu samy.
   ========================================================================== */
:root {
  --bg: #f4f5f7;            /* pozadi stranky */
  --card: #ffffff;          /* pozadi karet / polozek */
  --hover: #eef0f3;         /* polozka pod mysi */
  --line: #e3e6ea;          /* oddelovace, ramecky, neaktivni plochy */
  --text: #1d2329;          /* hlavni text */
  --muted: #6b7480;         /* vedlejsi text */
  --accent: #1a8fb0;        /* akcentni barva (zapnuto, odkazy, focus) */
  --accent-soft: #e3f2f7;   /* jemne podbarveni akcentem */
  --off: #c3c9d0;           /* vypnuty stav (prepinac, ...) */
  --knob: #ffffff;          /* jezdec prepinace */
  --on: #2ea84a;            /* zapnuty / sepnuty stav (prepinac, tlacitko) */
  --push-off: #50565d;      /* vnitrni kruh tlacitka - klid */
  --call: #2ea84a;          /* tlacitko zahajeni hovoru (interkom) */
  --hang: #d9443a;          /* tlacitko ukonceni hovoru, chyba hovoru */
  --danger: #c7372d;        /* chybove hlaseni (prihlaseni, ...) */
  --danger-soft: #fdecea;   /* pozadi chyboveho hlaseni */
  --radius: 14px;
  --item-name-fs: 17px;      /* nazev objektu na karte */
  --item-name-fw: 500;       /* tloustka nazvu objektu na karte */
  --item-desc-fs: 14px;      /* popis / stav objektu na karte */
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 8px rgba(16, 24, 40, .04);
  color-scheme: light;
}

/* Na mobilu (uzky displej) o neco vetsi text karet */
@media screen and (max-width: 600px) {
  :root {
    --item-name-fs: 18px;
    --item-desc-fs: 15px;
  }
}

html[data-theme="dark"] {
  --bg: #111417;
  --card: #1a1f24;
  --hover: #222830;
  --line: #2a3138;
  --text: #e9edf1;
  --muted: #9aa4ae;
  --accent: #45b3d3;
  --accent-soft: #16323c;
  --off: #3a434c;
  --knob: #ffffff;
  --on: #2ea84a;
  --push-off: #5d656e;
  --call: #2ea84a;
  --hang: #e5534b;
  --danger: #f07167;
  --danger-soft: #3a1f1d;
  --shadow: none;
  color-scheme: dark;
}

@media screen {
  /* Pismo Inter (variable, rezy 100-900), lokalne v css/fonts - system casto bezi bez internetu.
     Licence SIL OFL 1.1, viz css/fonts/OFL.txt */
  /* latin-ext */
  @font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('fonts/inter-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
  /* latin */
  @font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('fonts/inter-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
  html {
    -ms-text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%; }

  body {
    margin: 0; }

  article,
  aside,
  details,
  figcaption,
  figure,
  footer,
  header,
  hgroup,
  main,
  menu,
  nav,
  section,
  summary {
    display: block; }

  audio,
  canvas,
  progress,
  video {
    display: inline-block;
    vertical-align: baseline; }

  audio:not([controls]) {
    display: none;
    height: 0; }

  [hidden],
  template {
    display: none; }

  a {
    background-color: transparent; }

  a:active,
  a:hover {
    outline: 0; }

  p {
    margin-top: 0;
    margin-bottom: 24px; }

  ul, ol {
    margin-top: 0;
    margin-bottom: 24px; }

  abbr[title] {
    border-bottom: 1px dotted; }

  b,
  strong {
    font-weight: 700; }

  dfn {
    font-style: italic; }

  mark {
    color: var(--text); }

  sub,
  sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline; }

  sup {
    top: -0.5em; }

  sub {
    bottom: -0.25em; }

  img {
    border: 0; }

  svg:not(:root) {
    overflow: hidden; }

  figure {
    margin: 12px 24px; }

  hr {
    box-sizing: content-box;
    height: 0; }

  pre {
    overflow: auto; }

  code,
  kbd,
  pre,
  samp {
    font-family: monospace, monospace;
    font-size: 1em; }

  button,
  input,
  optgroup,
  select,
  textarea {
    color: inherit;
    font: inherit;
    margin: 0; }

  button {
    overflow: visible; }

  button,
  select {
    text-transform: none; }

  button,
  html input[type="button"],
  input[type="reset"],
  input[type="submit"] {
    -webkit-appearance: button;
    cursor: pointer; }

  button[disabled],
  html input[disabled] {
    cursor: default; }

  button::-moz-focus-inner,
  input::-moz-focus-inner {
    border: 0;
    padding: 0; }

  input {
    line-height: normal; }

  input[type="checkbox"],
  input[type="radio"] {
    box-sizing: border-box;
    padding: 0; }

  input[type="number"]::-webkit-inner-spin-button,
  input[type="number"]::-webkit-outer-spin-button {
    height: auto; }

  input[type="search"] {
    -webkit-appearance: textfield; }

  input[type="search"]::-webkit-search-cancel-button,
  input[type="search"]::-webkit-search-decoration {
    -webkit-appearance: none; }

  legend {
    border: 0;
    padding: 0; }

  textarea {
    overflow: auto; }

  optgroup {
    font-weight: 700; }

  table {
    border-collapse: collapse;
    border-spacing: 0; }
    table td,
    table th {
      padding: 0; }

  .log {
    word-break: break-word; }

  html {
    font-size: 16px;
    overflow: auto;
    background-color: var(--bg);
    line-height: 1;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box; }

  html, body {
    margin: 0 0;
    padding: 0 0; }

  body {
    font-size: 1rem;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 400;
    /* Cislice stejne siroke - hodnoty pri zmene neposkakuji */
    font-variant-numeric: tabular-nums;
    -webkit-font-smoothing: antialiased;
    background: var(--bg);
    color: var(--text);
    word-wrap: break-word;
    overflow: hidden;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: -moz-flex;
    display: -o-flex;
    display: flex;
    min-height: 100vh;
    min-width: 300px;
    flex-direction: column;
    user-select: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-touch-callout: none; }

  *, *:before, *:after {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box; }

  .cleaner:after {
    content: '';
    display: block;
    clear: both; }

  .clear {
    clear: both;
    display: block;
    overflow: hidden;
    visibility: hidden;
    width: 0;
    height: 0; }

  table {
    width: 100%;
    display: table;
    border: none;
    margin: 8px 0; }
    table td, table th {
      border: 0;
      display: table-cell;
      text-align: left;
      vertical-align: middle;
      padding: 4px 8px; }
    table.auto {
      width: auto; } }
  @media only screen and (max-width: 992px) {
    table {
      margin: 2px 0; }
      table td, table th {
        padding: 4px 8px; } }

@media screen {
  .bold {
    font-weight: 700; }

  .thin {
    font-weight: 400; }

  em {
    font-style: italic; }

  small, .small {
    font-size: 0.75rem; }

  .big {
    font-size: 1.125rem; }

  .uppercase {
    text-transform: uppercase; }

  .lowercase {
    text-transform: lowercase; }

  .through {
    text-decoration: line-through; }

  .left-align {
    text-align: left; }

  .right-align {
    text-align: right; }

  .center, .center-align {
    text-align: center; }

  .left {
    float: left; }

  .right {
    float: right; }

  label {
    color: var(--text);
    cursor: pointer; }
    label:hover {
      color: var(--accent); }

  .btn {
    position: relative;
    display: inline-block;
    text-decoration: none;
    padding: 12px 24px;
    color: #fff;
    font-weight: 600;
    background: var(--accent);
    border: 1px solid var(--accent);
    vertical-align: middle;
    outline: none;
    overflow: hidden;
    cursor: pointer;
    -webkit-border-radius: 12px;
    -moz-border-radius: 12px;
    border-radius: 12px;
    -webkit-transition: all 0.3s;
    -moz-transition: all 0.3s;
    transition: all 0.3s; }
    .btn:hover {
      filter: brightness(1.1); }

  ::-webkit-input-placeholder {
    color: var(--muted); }

  :-moz-placeholder {
    color: var(--muted); }

  ::-moz-placeholder {
    color: var(--muted); }

  :-ms-input-placeholder {
    color: var(--muted); }

  input:not([type]),
  input[type=text],
  input[type=password],
  input[type=email],
  input[type=url],
  input[type=time],
  input[type=date],
  input[type=datetime],
  input[type=datetime-local],
  input[type=tel],
  input[type=number],
  input[type=search],
  textarea {
    position: relative;
    color: var(--text);
    border: 1px solid var(--line);
    background-color: var(--card);
    margin: 0;
    padding: 12px 16px;
    outline: none;
    box-shadow: none;
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    border-radius: 10px; }
    input:not([type]):hover:not([readonly]),
    input[type=text]:hover:not([readonly]),
    input[type=password]:hover:not([readonly]),
    input[type=email]:hover:not([readonly]),
    input[type=url]:hover:not([readonly]),
    input[type=time]:hover:not([readonly]),
    input[type=date]:hover:not([readonly]),
    input[type=datetime]:hover:not([readonly]),
    input[type=datetime-local]:hover:not([readonly]),
    input[type=tel]:hover:not([readonly]),
    input[type=number]:hover:not([readonly]),
    input[type=search]:hover:not([readonly]),
    textarea:hover:not([readonly]) {
      border: 1px solid var(--muted); }
    input:not([type]):focus:not([readonly]),
    input[type=text]:focus:not([readonly]),
    input[type=password]:focus:not([readonly]),
    input[type=email]:focus:not([readonly]),
    input[type=url]:focus:not([readonly]),
    input[type=time]:focus:not([readonly]),
    input[type=date]:focus:not([readonly]),
    input[type=datetime]:focus:not([readonly]),
    input[type=datetime-local]:focus:not([readonly]),
    input[type=tel]:focus:not([readonly]),
    input[type=number]:focus:not([readonly]),
    input[type=search]:focus:not([readonly]),
    textarea:focus:not([readonly]) {
      border: 1px solid var(--accent); }
    input:not([type]):focus:not([readonly]) + label,
    input[type=text]:focus:not([readonly]) + label,
    input[type=password]:focus:not([readonly]) + label,
    input[type=email]:focus:not([readonly]) + label,
    input[type=url]:focus:not([readonly]) + label,
    input[type=time]:focus:not([readonly]) + label,
    input[type=date]:focus:not([readonly]) + label,
    input[type=datetime]:focus:not([readonly]) + label,
    input[type=datetime-local]:focus:not([readonly]) + label,
    input[type=tel]:focus:not([readonly]) + label,
    input[type=number]:focus:not([readonly]) + label,
    input[type=search]:focus:not([readonly]) + label,
    textarea:focus:not([readonly]) + label {
      color: var(--accent); }

  #LoginContainer {
    text-align: center;
    padding: 16px 16px; }
    #LoginContainer .loginWrap {
      display: inline-block !important;
      margin-top: 100px;
      padding: 24px 22px 20px;
      background: var(--card);
      box-shadow: var(--shadow);
      width: 420px;
      -webkit-border-radius: var(--radius);
      -moz-border-radius: var(--radius);
      border-radius: var(--radius); }

  /* Hlavicka prihlasovaci karty: znak + nazev aplikace + podtitul */
  #Title {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
    text-align: left; }

  /* Logo aplikace (favicon.ico, 100x100 px) */
  .TitleLogo {
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    object-fit: contain; }

  .TitleText {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0; }

  .TitleName {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -.025em;
    line-height: 1.1;
    color: var(--text); }

  .TitleSub {
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
    line-height: 1.2; } }
    @media only screen and (max-width: 600px) {
      #LoginContainer .loginWrap {
        width: 100%;
        max-width: 420px; } }
@media screen {
    #LoginContainer .field {
      margin-bottom: 12px;
      display: -ms-flexbox;
      display: -webkit-flex;
      display: -moz-flex;
      display: -o-flex;
      display: flex;
      -ms-flex-wrap: wrap;
      -webkit-flex-wrap: wrap;
      flex-wrap: wrap;
      -webkit-flex-direction: row-reverse;
      -moz-flex-direction: row-reverse;
      -ms-flex-direction: row-reverse;
      -webkit-flex-direction: row-reverse;
      flex-direction: row-reverse;
      -ms-flex-align: center;
      -webkit-align-items: center;
      -webkit-box-align: center;
      align-items: center; }
      #LoginContainer .field label {
        width: 75px; }
      #LoginContainer .field input {
        flex: 1 0 0; } }
    @media only screen and (max-width: 600px) {
      #LoginContainer .field {
        -webkit-flex-direction: column-reverse;
        -moz-flex-direction: column-reverse;
        -ms-flex-direction: column-reverse;
        -webkit-flex-direction: column-reverse;
        flex-direction: column-reverse; }
        #LoginContainer .field label {
          text-align: left;
          width: 100%;
          margin-bottom: 8px; }
        #LoginContainer .field input {
          width: 100%; } }
@media screen {
    #LoginContainer .buttonWrap {
      text-align: right; }

  /* Chybove hlaseni na prihlasovaci strance (spatne heslo, server nedostupny, odpojeni)
     Zobrazeni ridi ConnUpdate () v common.js pres inline display, prazdne se nezobrazi */
  #ConnStatus {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--danger);
    background: var(--danger-soft);
    color: var(--danger);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    text-align: left; }
    #ConnStatus:empty {
      display: none !important; }
    /* Ikona vykricniku v kruhu */
    #ConnStatus::before {
      content: '!';
      flex: 0 0 20px;
      width: 20px;
      height: 20px;
      border-radius: 50%;
      background: var(--danger);
      color: var(--danger-soft);
      font-size: 13px;
      font-weight: 700;
      line-height: 20px;
      text-align: center; }

  .MainPage {
    width: 100%;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto; }

  .ItemContainer {
    width: 100%;
    padding-bottom: 16px; }

  .PageContainer {
    display: -ms-flexbox;
    display: -webkit-flex;
    display: -moz-flex;
    display: -o-flex;
    display: flex;
    -ms-flex-wrap: wrap;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center; }
    .PageContainer > div {
      min-width: 420px; }
    .PageContainer > .ItemContainer {
      width: 50%;
      min-width: 420px;
      padding: 0 8px 8px; } }
  @media only screen and (max-width: 480px) {
    .PageContainer > div {
      width: 100%;
      min-width: auto;
      padding: 0 10px; }
    .PageContainer > .ItemContainer {
      width: 100%;
      min-width: auto; } }

@media screen {
  .ItemObject {
    background-color: var(--card);
    color: var(--text);
    width: 100%;
    min-height: 48px;
    border: 0;
    box-shadow: var(--shadow);
    -webkit-border-radius: var(--radius);
    -moz-border-radius: var(--radius);
    border-radius: var(--radius);
    transition: background-color .2s; }
    .ItemObject input {
      width: 96%;
      margin: 2%; } }
  /* Hover jen na zarizeni s mysi (ne podle sirky okna) - na dotykovem displeji by sede pozadi zustalo po klepnuti */
  @media only screen and (hover: hover) and (pointer: fine) {
    .ItemObject:hover {
      background-color: var(--hover); } }

@media screen {
  .ItemMainIcon {
    height: 40px;
    width: auto;
    position: relative;
    top: 2px; }

  .ItemCtrl1Icon,
  .ItemCtrl2Icon,
  .TopMenuIcon {
    height: 32px;
    width: auto;
    cursor: pointer;
    position: relative;
    top: 2px; }

  #menu {
    min-width: 100%; }

  .ItemName {
    font-size: 1.125rem;
    padding-bottom: 0; }

  .ItemTopMenuSpace {
    height: 20px; }

  .TopMenuName {
    text-align: center;
    font-size: 1.25rem; }

  .ItemLabel1 {
    text-align: center;
    font-size: 1.25rem; }

  .ItemLabel2 {
    text-align: center; } }

/* ==========================================================================
   Sdilene prvky objektu
   ========================================================================== */
@media screen {
  /* Verze serveru na prihlasovaci strance - pod kartou, na stredu */
  .GshVersion {
    margin-top: 12px;
    text-align: center;
    font-size: 12px;
    color: var(--muted); }

  /* Ctverec s hlavni ikonou objektu (pozadi stejne jako pozadi prvku) */
  .ItemIconBox {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent; }
    .ItemIconBox .ItemMainIcon {
      height: 28px;
      top: 0; }

  /* Prepinac (toggle) - stav ridi trida ItemOn / ItemPending na nadrazenem prvku */
  .Toggle {
    flex: 0 0 50px;
    width: 50px;
    height: 30px;
    border-radius: 15px;
    background: var(--off);
    position: relative;
    transition: background .2s, opacity .2s; }
    .Toggle::after {
      content: '';
      position: absolute;
      top: 3px;
      left: 3px;
      width: 24px;
      height: 24px;
      border-radius: 50%;
      background: var(--knob);
      box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
      transition: left .2s; }
  .ItemOn .Toggle {
    background: var(--on); }
    .ItemOn .Toggle::after {
      left: 23px; }
  /* Po kliknuti, nez server posle nova data */
  .ItemPending .Toggle {
    opacity: .55; }
    .ItemPending .Toggle::after {
      left: 13px; }

  /* Plocha pro stisk kulateho tlacitka - obdelnik pres celou vysku polozky u praveho okraje,
     sirka = 1.4 x vyska. Tlacitko je uprostred praveho ctverce (vyska x vyska = 1 / 1.4 = 71.43 %
     sirky), levy zbytek plochy jen zvetsuje misto pro stisk. Polozka musi mit position: relative a vpravo padding
     alespon na sirku praveho ctverce. */
  .PushArea {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    aspect-ratio: 1.4;
    display: grid;
    grid-template-columns: 28.57% 71.43%;
    align-items: center;
    justify-items: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent; }
    .PushArea .PushBtn {
      grid-column: 2; }

  /* Kulate tlacitko (drzi se) - obrucka v akcentni barve a vnitrni kruh,
     stav vystupu ridi trida ItemOn na nadrazenem prvku, drzeni trida PushBtnPressed na .PushArea */
  .PushBtn {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    position: relative;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform .1s, filter .1s; }
    .PushBtn::after {
      content: '';
      position: absolute;
      inset: 3px;
      border-radius: 50%;
      background: var(--push-off);
      transition: background .2s; }
  .ItemOn .PushBtn::after {
    background: var(--on); }
  /* Prst / mys drzi tlacitko - okamzita lokalni odezva, stav vystupu prijde ze serveru */
  .PushBtnPressed .PushBtn {
    transform: scale(.88);
    filter: brightness(.9); }

  /* Sipka vpravo na karte - polozka otevira podstranku */
  .ItemChevron {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    position: relative;
    color: var(--muted); }
    .ItemChevron::after {
      content: '';
      position: absolute;
      top: 6px;
      left: 4px;
      width: 8px;
      height: 8px;
      border-top: 2px solid currentColor;
      border-right: 2px solid currentColor;
      transform: rotate(45deg); }

  /* Odznak s poctem (napr. vybrano / celkem) vedle sipky */
  .ItemCount {
    flex: 0 0 auto;
    min-width: 34px;
    height: 22px;
    padding: 0 7px;
    border-radius: 11px;
    background: var(--line);
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center; }
  .ItemOn .ItemCount {
    background: var(--accent-soft);
    color: var(--accent); }

  /* Seznam moznosti na podstrance (selector = kolecko, multiselector = ctverecek, trida OptMulti)
     Vybrana polozka ma tridu OptSel, po kliknuti do prichodu novych dat OptPending */
  .OptLabel {
    font-size: 11px;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 600;
    margin: 14px 4px 6px; }

  .OptList {
    background: var(--card);
    color: var(--text);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 16px; }

  .OptItem {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 54px;
    padding: 0 14px;
    border-top: 1px solid var(--line);
    font-size: 15px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background-color .2s; }
    .OptItem:first-child {
      border-top: 0; }
  .OptName {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; }
  .OptMark {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--off);
    position: relative;
    transition: border-color .2s, background-color .2s, opacity .2s; }
    .OptMark::after {
      content: '';
      position: absolute;
      inset: 3px;
      border-radius: 50%;
      background: var(--accent);
      transform: scale(0);
      transition: transform .2s; }
  .OptSel {
    background: var(--accent-soft);
    font-weight: 600; }
    .OptSel .OptMark {
      border-color: var(--accent); }
      .OptSel .OptMark::after {
        transform: scale(1); }
  .OptPending .OptMark {
    border-color: var(--accent);
    opacity: .55; }
    .OptPending .OptMark::after {
      transform: scale(.5); }
  /* Multiselector - ctverecek s fajfkou */
  .OptMulti .OptMark {
    border-radius: 6px; }
    .OptMulti .OptMark::after {
      inset: auto;
      top: 2px;
      left: 6px;
      width: 5px;
      height: 10px;
      border-radius: 0;
      background: transparent;
      border-right: 2px solid #fff;
      border-bottom: 2px solid #fff;
      transform: rotate(45deg) scale(0); }
  .OptMulti.OptSel .OptMark {
    background: var(--accent); }
    .OptMulti.OptSel .OptMark::after {
      transform: rotate(45deg) scale(1); }
  .OptMulti.OptPending .OptMark::after {
    transform: rotate(45deg) scale(0); } }
  @media only screen and (hover: hover) and (pointer: fine) {
    .OptItem:hover {
      background-color: var(--hover); }
    .OptSel:hover {
      background-color: var(--accent-soft); } }

@media screen {
  /* Posuvnik (input type=range) - vzhled jako .Toggle: draha --off, vyplnena cast --accent, bily jezdec.
     Velikost vyplnene casti ridi promenna --pct (nastavuje skript objektu),
     stav "ceka na server" trida ItemPending na nadrazenem prvku */
  .ItemObject input.Range {
    width: auto;
    margin: 0; }
  .Range {
    flex: 1;
    min-width: 0;
    height: 30px;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
    touch-action: pan-y;
    -webkit-tap-highlight-color: transparent;
    transition: opacity .2s;
    --pct: 0%; }
    .Range:focus {
      outline: none; }
    .Range::-webkit-slider-runnable-track {
      height: 6px;
      border-radius: 3px;
      background: linear-gradient(to right, var(--accent) var(--pct), var(--off) var(--pct)); }
    .Range::-moz-range-track {
      height: 6px;
      border-radius: 3px;
      background: var(--off); }
    .Range::-moz-range-progress {
      height: 6px;
      border-radius: 3px;
      background: var(--accent); }
    .Range::-webkit-slider-thumb {
      -webkit-appearance: none;
      width: 24px;
      height: 24px;
      margin-top: -9px;
      border-radius: 50%;
      background: var(--knob);
      box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
      transition: transform .1s; }
    .Range::-moz-range-thumb {
      width: 24px;
      height: 24px;
      border: 0;
      border-radius: 50%;
      background: var(--knob);
      box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
    .Range:active::-webkit-slider-thumb {
      transform: scale(1.12); }
  /* Po pohybu, nez server posle nova data */
  .ItemPending .Range {
    opacity: .55; }
  /* Blokovano ze serveru */
  .Range:disabled {
    cursor: not-allowed; }
    .Range:disabled::-webkit-slider-runnable-track {
      background: linear-gradient(to right, var(--muted) var(--pct), var(--line) var(--pct)); }
    .Range:disabled::-moz-range-track {
      background: var(--line); }
    .Range:disabled::-moz-range-progress {
      background: var(--muted); }
    .Range:disabled::-webkit-slider-thumb {
      box-shadow: 0 0 0 1px var(--line); } }

@media screen {
  .ItemLabel2 {
    color: var(--muted); } }

/* ==========================================================================
   Stranka slozky (Folder_...) a jeji specialni prvky (object/_menu, _folder, _label1, _label2, _line)
   Tridy ItemLabel1 / ItemLabel2 / ItemLine / TopMenuName pouzivaji i podstranky objektu,
   proto jsou styly omezene na primeho potomka .ItemContainer, resp. na .TopBar
   ========================================================================== */
@media screen {
  /* Stranka slozky je mrizka: jeden sloupec (max 450 px, na stredu), od 860 px dva sloupce.
     Horni lista, nadpisy a cara zabiraji vsechny sloupce, takze jsou vzdy zarovnane s kartami. */
  .PageContainer[id^="Folder_"] {
    display: grid;
    grid-template-columns: minmax(0, 450px);
    justify-content: center;
    align-content: start; }
    .PageContainer[id^="Folder_"] > .ItemContainer {
      width: auto;
      min-width: 0; }
    .PageContainer[id^="Folder_"] > .ItemContainer:has(> .TopBar, > .ItemLabel1, > .ItemLabel2, > .ItemLine) {
      grid-column: 1 / -1; }
    .PageContainer[id^="Folder_"] > .ItemContainer:has(> .TopBar) {
      padding-bottom: 4px; }
    .PageContainer[id^="Folder_"] > .ItemContainer:has(> .ItemLabel1, > .ItemLabel2, > .ItemLine) {
      padding-bottom: 6px; } }
  @media only screen and (min-width: 860px) {
    .PageContainer[id^="Folder_"] {
      grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media only screen and (max-width: 480px) {
    .PageContainer[id^="Folder_"] {
      grid-template-columns: minmax(0, 1fr); } }

@media screen {
  /* --- Horni lista (zpet / nazev / volby), bez karty, na pozadi stranky
         Pouziva _menu (stranka slozky) i podstranky objektu (selector, interkom, ...) --- */
  .TopBar {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 56px;
    margin-bottom: 4px; }
    .ItemContainer > .TopBar {
      margin-bottom: 0; }

  /* Misto pro tlacitko - drzi sirku i kdyz je prazdne (parser.js vyprazdni MainMenuCtrl1Td / MainMenuCtrl2Td),
     aby nazev zustal uprostred */
  .TopBarSlot {
    flex: 0 0 40px;
    width: 40px;
    height: 40px; }

  .TopBar .TopMenuName {
    flex: 1;
    min-width: 0;
    text-align: center;
    font-size: 17px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer; }

  /* Tlacitko v liste, ikona je kreslena v CSS a ma barvu textu */
  .TopMenuBtn {
    display: block;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    position: relative;
    color: var(--text);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background-color .15s; }
    .TopMenuBtn:active {
      background-color: var(--hover); }

  /* Ikony v liste - SVG pouzite jako maska, vyplni se barvou textu (currentColor).
     Spolecny zaklad pro vsechny ikony, kazda ikona pak urcuje jen svou masku. */
  .TopMenuBack::after,
  .TopMenuEnter::after,
  .TopMenuOptions::after,
  .TopMenuTrash::after,
  .TopMenuOk::after {
    content: '';
    position: absolute;
    inset: 9px;
    background-color: currentColor; }

  /* Zpet - sipka vlevo */
  .TopMenuBack::after {
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 5l-7 7 7 7'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 5l-7 7 7 7'/%3E%3C/svg%3E") center / contain no-repeat; }

  /* Vstoupit - sipka vpravo (pripraveno pro budouci pouziti) */
  .TopMenuEnter::after {
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 5l7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 5l7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat; }

  /* Smazat - kos (pripraveno pro budouci pouziti) */
  .TopMenuTrash::after {
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16M9 7V4h6v3M6 7l1 13h10l1-13M10 11v6M14 11v6'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16M9 7V4h6v3M6 7l1 13h10l1-13M10 11v6M14 11v6'/%3E%3C/svg%3E") center / contain no-repeat; }

  /* Potvrdit - fajfka (pripraveno pro budouci pouziti) */
  .TopMenuOk::after {
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat; }

  /* Volby - ozubene kolo */
  .TopMenuOptions::after {
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19.4 15a1.7 1.7 0 00.3 1.8l.1.1a2 2 0 11-2.8 2.8l-.1-.1a1.7 1.7 0 00-1.8-.3 1.7 1.7 0 00-1 1.5V21a2 2 0 01-4 0v-.1a1.7 1.7 0 00-1.1-1.5 1.7 1.7 0 00-1.8.3l-.1.1a2 2 0 11-2.8-2.8l.1-.1a1.7 1.7 0 00.3-1.8 1.7 1.7 0 00-1.5-1H3a2 2 0 010-4h.1a1.7 1.7 0 001.5-1.1 1.7 1.7 0 00-.3-1.8l-.1-.1a2 2 0 112.8-2.8l.1.1a1.7 1.7 0 001.8.3H9a1.7 1.7 0 001-1.5V3a2 2 0 014 0v.1a1.7 1.7 0 001 1.5 1.7 1.7 0 001.8-.3l.1-.1a2 2 0 112.8 2.8l-.1.1a1.7 1.7 0 00-.3 1.8V9a1.7 1.7 0 001.5 1H21a2 2 0 010 4h-.1a1.7 1.7 0 00-1.5 1z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19.4 15a1.7 1.7 0 00.3 1.8l.1.1a2 2 0 11-2.8 2.8l-.1-.1a1.7 1.7 0 00-1.8-.3 1.7 1.7 0 00-1 1.5V21a2 2 0 01-4 0v-.1a1.7 1.7 0 00-1.1-1.5 1.7 1.7 0 00-1.8.3l-.1.1a2 2 0 11-2.8-2.8l.1-.1a1.7 1.7 0 00.3-1.8 1.7 1.7 0 00-1.5-1H3a2 2 0 010-4h.1a1.7 1.7 0 001.5-1.1 1.7 1.7 0 00-.3-1.8l-.1-.1a2 2 0 112.8-2.8l.1.1a1.7 1.7 0 001.8.3H9a1.7 1.7 0 001-1.5V3a2 2 0 014 0v.1a1.7 1.7 0 001 1.5 1.7 1.7 0 001.8-.3l.1-.1a2 2 0 112.8 2.8l-.1.1a1.7 1.7 0 00-.3 1.8V9a1.7 1.7 0 001.5 1H21a2 2 0 010 4h-.1a1.7 1.7 0 00-1.5 1z'/%3E%3C/svg%3E") center / contain no-repeat; }

  /* --- _folder: karta slozky (stejna jako tlacitko / vypinac), klik kamkoli otevre slozku --- */
  .FolderItem {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent; }

  .FolderName {
    flex: 1;
    min-width: 0;
    font-size: var(--item-name-fs);
    font-weight: var(--item-name-fw);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; }

  .FolderItem .ItemChevron {
    transition: color .15s; }
  .FolderItem:active .ItemChevron {
    color: var(--accent); }

  /* --- _label1: nadpis sekce --- */
  .ItemContainer > .ItemLabel1 {
    text-align: left;
    font-size: 17px;
    font-weight: 700;
    padding: 12px 4px 0; }

  /* --- _label2: podnadpis, male sede kapitalky --- */
  .ItemContainer > .ItemLabel2 {
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 8px 4px 0; }

  /* --- _line: jemny oddelovac --- */
  .ItemContainer > .ItemLine {
    height: 1px;
    background: var(--line);
    margin: 6px 4px 4px; } }

  @media only screen and (hover: hover) and (pointer: fine) {
    .TopMenuBtn:hover {
      background-color: var(--hover); }
    .FolderItem:hover .ItemChevron {
      color: var(--accent); } }


/* ===== Graf statistiky (js/chart.js) - spolecna stranka statistiky objektu
   Barvu grafu urcuje objekt promennymi --chart / --chart-soft na .ChartView (ve style.css objektu),
   bez nich se pouzije akcentni barva. Obsah vytvari ChartOpen. ===== */
@media screen {
  .ChartView {
    --chart-c: var(--chart, var(--accent));
    --chart-cs: var(--chart-soft, var(--accent-soft));
    padding-bottom: 16px; }

  /* Prepinac rozliseni - segmenty, pri vice nez 5 posouvatelna rada */
  .ChartRes {
    display: flex;
    gap: 2px;
    padding: 3px;
    border-radius: 12px;
    background: var(--card);
    box-shadow: var(--shadow);
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch; }
    .ChartRes::-webkit-scrollbar {
      display: none; }
    .ChartRes[Scroll="1"] {
      scroll-snap-type: x proximity;
      -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
      mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%); }
  .ChartResBtn {
    flex: 1 0 auto;
    height: 32px;
    line-height: 32px;
    padding: 0 10px;
    border-radius: 9px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    white-space: nowrap;
    cursor: pointer;
    scroll-snap-align: center;
    -webkit-tap-highlight-color: transparent;
    transition: background-color .15s, color .15s; }
    .ChartRes[Scroll="1"] .ChartResBtn {
      flex: 0 0 auto;
      padding: 0 13px; }
    .ChartResBtn.On {
      background: var(--chart-c);
      color: #fff; }

  /* Hlavicka obdobi */
  .ChartPer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 2px 10px; }
  .ChartPerMid {
    flex: 1;
    min-width: 0;
    text-align: center; }
    .ChartPerMid b {
      display: block;
      font-size: 15px;
      font-weight: 600;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis; }
    .ChartPerMid small {
      display: block;
      margin-top: 1px;
      font-size: 12px;
      font-weight: 500;
      color: var(--muted);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis; }
  .ChartNavBtn {
    position: relative;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--card);
    box-shadow: var(--shadow);
    color: var(--text);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent; }
    .ChartNavBtn::after {
      content: '';
      position: absolute;
      top: 13px;
      left: 14px;
      width: 7px;
      height: 7px;
      border-top: 2px solid currentColor;
      border-left: 2px solid currentColor;
      transform: rotate(-45deg); }
    .ChartNavBtn.ChartNext::after {
      left: 11px;
      transform: rotate(135deg); }
    .ChartNavBtn.Off {
      opacity: .35;
      pointer-events: none; }
    .ChartNavBtn:active {
      background: var(--hover); }

  /* Souhrn obdobi */
  .ChartSum {
    display: flex;
    gap: 8px;
    margin-bottom: 10px; }
  .ChartTile {
    flex: 1;
    min-width: 0;
    padding: 8px 10px;
    border-radius: 12px;
    background: var(--card);
    box-shadow: var(--shadow); }
    .ChartTile span {
      display: block;
      font-size: 11px;
      font-weight: 600;
      color: var(--muted);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis; }
    .ChartTile b {
      display: block;
      margin-top: 2px;
      font-size: 15px;
      font-weight: 600;
      line-height: 1.25;
      font-variant-numeric: tabular-nums;
      overflow-wrap: anywhere; }
    .ChartTile small {
      display: block;
      min-height: 14px;
      font-size: 11px;
      color: var(--muted);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis; }
    .ChartTile[Dir="Dn"] b {
      color: #2e9d62; }
    .ChartTile[Dir="Up"] b {
      color: var(--hang); }

  /* Karta grafu */
  .ChartCard {
    padding: 10px 8px 6px;
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow); }
  .ChartLegend {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    padding: 0 6px 6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--muted); }
    .ChartLegend i {
      display: inline-block;
      width: 12px;
      height: 8px;
      margin-right: 5px;
      border-radius: 2px; }
    .ChartLgCur {
      background: var(--chart-c); }
    .ChartLgPrev {
      background: var(--muted);
      opacity: .35; }
    .ChartLgPart {
      background: repeating-linear-gradient(45deg, var(--chart-c) 0 1.5px, var(--chart-cs) 1.5px 4px); }
  .ChartBox {
    position: relative;
    height: 260px;
    touch-action: pan-y;
    -webkit-user-select: none;
    user-select: none; }
  .ChartSvg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible; }

  /* Prvky SVG */
  .ChartGrid {
    stroke: var(--line);
    stroke-width: 1; }
  .ChartBase {
    stroke: var(--muted);
    stroke-opacity: .45;
    stroke-width: 1; }
  .ChartAxis, .ChartUnit, .ChartAvgTxt, .ChartGapTxt {
    fill: var(--muted);
    font-size: 10px;
    font-variant-numeric: tabular-nums; }
  .ChartUnit, .ChartAvgTxt {
    font-weight: 700; }
  .ChartGapTxt {
    font-weight: 600; }
  .ChartBar {
    fill: var(--chart-c);
    transition: opacity .15s; }
  .ChartPrevBar {
    fill: var(--muted);
    opacity: .3; }
  .ChartFutBar {
    fill: none;
    stroke: var(--line);
    stroke-width: 1;
    stroke-dasharray: 2 2; }
  .ChartLine {
    fill: none;
    stroke: var(--chart-c);
    stroke-width: 2;
    stroke-linejoin: round;
    stroke-linecap: round; }
  .ChartDot {
    fill: var(--chart-c); }
  .ChartAreaStop {
    stop-color: var(--chart-c); }
  .ChartHatchBg {
    fill: var(--chart-cs); }
  .ChartHatchLn {
    stroke: var(--chart-c);
    stroke-width: 1.5; }
  .ChartGapLn {
    stroke: var(--line);
    stroke-width: 1.5; }
  .ChartAvg {
    stroke: var(--text);
    stroke-width: 1;
    stroke-dasharray: 3 3;
    opacity: .5; }

  /* Vybrana hodnota */
  .ChartSel {
    display: none;
    pointer-events: none; }
    .ChartSvg.Selecting .ChartSel {
      display: inline; }
  .ChartSvg.Selecting .ChartBar:not(.Sel) {
    opacity: .45; }
  .ChartSelLine {
    stroke: var(--text);
    stroke-width: 1;
    opacity: .35; }
  .ChartSelDot {
    fill: var(--chart-c);
    stroke: var(--card);
    stroke-width: 2; }
  .ChartTip rect {
    fill: var(--text); }
  .ChartTip1, .ChartTip2 {
    fill: var(--card);
    font-variant-numeric: tabular-nums; }
  .ChartTip1 {
    font-size: 11px;
    font-weight: 700; }
  .ChartTip2 {
    font-size: 10px;
    font-weight: 500; }

  /* Nacitani - skeleton pres graf */
  .ChartLoad {
    display: none;
    position: absolute;
    inset: 10px 6px 20px 30px;
    align-items: flex-end;
    gap: 6px;
    background: var(--card); }
    .ChartView[Loading="1"] .ChartLoad {
      display: flex; }
    .ChartLoad i {
      flex: 1;
      border-radius: 6px;
      background: linear-gradient(90deg, var(--line) 0, var(--bg) 40%, var(--line) 80%);
      background-size: 300% 100%;
      animation: ChartSkeleton 1.4s infinite linear; }
    .ChartLoad i:nth-child(1) { height: 40%; }
    .ChartLoad i:nth-child(2) { height: 65%; }
    .ChartLoad i:nth-child(3) { height: 50%; }
    .ChartLoad i:nth-child(4) { height: 80%; }
    .ChartLoad i:nth-child(5) { height: 60%; }
    .ChartLoad i:nth-child(6) { height: 72%; }
    .ChartLoad i:nth-child(7) { height: 45%; }
    .ChartLoad i:nth-child(8) { height: 55%; }
  @keyframes ChartSkeleton {
    from { background-position: 100% 0; }
    to { background-position: -200% 0; } }

  /* Prazdne obdobi / statistika bez dat */
  .ChartEmpty {
    display: none;
    position: absolute;
    inset: 0;
    place-items: center;
    padding: 0 20px;
    text-align: center;
    background: var(--card); }
    .ChartView[Empty="1"]:not([Loading="1"]) .ChartEmpty,
    .ChartView[Empty="nostat"] .ChartEmpty {
      display: grid; }
    .ChartEmpty b {
      display: block;
      font-size: 14px; }
    .ChartEmpty p {
      margin-top: 4px;
      font-size: 12px;
      line-height: 1.4;
      color: var(--muted); }
  .ChartEmptyIc {
    position: relative;
    display: block;
    width: 52px;
    height: 52px;
    margin: 0 auto 10px;
    border-radius: 50%;
    background: var(--chart-cs);
    color: var(--chart-c); }
    .ChartEmptyIc::after {
      content: '';
      position: absolute;
      inset: 13px;
      background-color: currentColor;
      -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 20h16'/%3E%3Cpath d='M7 16v-3M12 16V9M17 16v-5' stroke-dasharray='2 2'/%3E%3C/svg%3E") center / contain no-repeat;
      mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 20h16'/%3E%3Cpath d='M7 16v-3M12 16V9M17 16v-5' stroke-dasharray='2 2'/%3E%3C/svg%3E") center / contain no-repeat; }
  .ChartEmptyBtn {
    display: inline-block;
    margin-top: 12px;
    padding: 8px 14px;
    border-radius: 10px;
    background: var(--chart-c);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer; }
  .ChartView[Empty="nostat"] .ChartRes,
  .ChartView[Empty="nostat"] .ChartNavBtn,
  .ChartView[Empty="nostat"] .ChartSum,
  .ChartView[Empty="nostat"] .ChartLegend,
  .ChartView[Empty="nostat"] .ChartHint,
  .ChartView[Empty="nostat"] .ChartEmptyBtn {
    display: none; }

  /* Tabulka hodnot (prepina tlacitko v horni liste) */
  .ChartTableCard {
    display: none;
    padding: 2px 14px; }
    .ChartView[Table="1"] .ChartTableCard {
      display: block; }
    .ChartView[Table="1"] .ChartCard:not(.ChartTableCard),
    .ChartView[Table="1"] .ChartHint {
      display: none; }
  .ChartTable {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px; }
    .ChartTable td {
      padding: 10px 2px;
      border-top: 1px solid var(--line);
      font-variant-numeric: tabular-nums; }
    .ChartTable tr:first-child td {
      border-top: 0; }
    .ChartTable td:last-child {
      text-align: right;
      font-weight: 600; }
    .ChartTable td.ChartNA {
      color: var(--muted);
      font-weight: 500; }

  .ChartHint {
    margin-top: 8px;
    padding: 0 10px;
    text-align: center;
    font-size: 11px;
    line-height: 1.4;
    color: var(--muted); }

  /* Tlacitko tabulka / graf v horni liste */
  .ChartTableBtn::after {
    content: '';
    position: absolute;
    inset: 10px;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='5' width='16' height='14' rx='2'/%3E%3Cpath d='M4 10h16M4 14.5h16M10 5v14'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='5' width='16' height='14' rx='2'/%3E%3Cpath d='M4 10h16M4 14.5h16M10 5v14'/%3E%3C/svg%3E") center / contain no-repeat; }

  /* Siroka obrazovka - vetsi graf, stranka statistiky sirsi nez ostatni podstranky */
  @media (min-width: 481px) {
    .PageContainer > div:has(> .ChartView) {
      width: min(100%, 760px); }
    .ChartBox {
      height: 320px; } }

  /* Telefon na sirku - graf pres celou vysku, bez souhrnu a napovedy */
  @media (max-height: 480px) and (orientation: landscape) {
    .ChartBox {
      height: calc(100vh - 150px);
      min-height: 160px; }
    .ChartSum, .ChartHint {
      display: none; } } }
