/* =========================
   RESET + ZÁKLADNÍ NASTAVENÍ
   ========================= */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #f6f7fb;
  color: #24292f;
  padding-bottom: 84px; /* rezerva pro spodní lištu */
}

/* =========================
   PROMĚNNÉ (jedno místo pravdy)
   ========================= */
:root{
  --sidebar-width: 210px;          /* desktop šířka sidebaru */
  --sidebar-mobile-width: 64px;    /* mobilní šířka sidebaru */
  --sidebar-bg: #000000;
  --surface-1: rgba(255,255,255,0.06);
  --surface-2: rgba(255,255,255,0.10);
  --border: rgba(255,255,255,0.10);
  --text: #ffde59;
  --text-dim: rgba(229,231,235,0.65);
  --accent: #000000;
  --accent-text: #ffde59;
  --btn-height: 44px;
  --btn-radius: 10px;
  --btn-pad-x: 1rem;
}

/* =========================
   SIDEBAR (logo + menu)
   ========================= */
.sidebar{
  position: fixed;
  left: 0; top: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--sidebar-bg);
  color: var(--text);
  padding: 24px 0 0 0;
  box-shadow: 2px 0 18px rgba(0,0,0,0.04);
  display: flex; flex-direction: column;
  z-index: 10;
}

/* MENŠÍ LOGO – aby nebylo přerostlé */
.sidebar-title{ display:flex; justify-content:center; margin: 0 0 28px; }
.logo-img{
  height: 150px;             /* ↓ zmenšeno z 200px */
  max-width: 100%;
  object-fit: contain;
  display: block;
}

/* Hlavní seznam */
.sidebar-menu{ list-style: none; flex: 1; }
.sidebar-menu li{
  padding: 8px 10px;
  font-size: 1rem;        /* o něco menší text */
  border-radius: 12px;
  margin: 3px 3px;
  cursor: pointer;
  transition: background .14s;
  display: block;            /* důležité pro submenu layout */
}
.sidebar-menu a{
  color: var(--accent-text) !important;
  text-decoration: none !important;
  display: block; width: 100%;
}
.sidebar-menu li.active,
.sidebar-menu li:hover{
  background: #1c1a1a;
  color: var(--accent-text);
}

/* =========================
   SUBMENU (Calibration → Add item)
   ========================= */
.sidebar-menu li.has-submenu {
  display: block;
  background: transparent;
  padding: 0;                /* žádné poskakování */
}

.sidebar-menu li.has-submenu > a {
  display: block;
  width: 100%;
  padding: 8px 10px;        /* stejné jako ostatní položky */
  border-radius: 10px;
}

.sidebar-menu li.has-submenu > a:hover,
.sidebar-menu li.has-submenu.active > a {
  background: #1c1a1a;
  color: #ffde59;
}

/* vlastní seznam pod-položek */
.sidebar-menu li.has-submenu .submenu {
  list-style: none;
  margin: 6px 0 0 20px;      /* odsazení dovnitř, ne na rodiči */
  padding: 0;
  display: none;
}

.sidebar-menu li.has-submenu.active .submenu {
  display: block;
}

.sidebar-menu li.has-submenu .submenu li {
  display: block;
  font-size: 0.9rem;
  padding: 6px 16px;
  margin: 2px 0;
  border-radius: 6px;
}

.sidebar-menu li.has-submenu .submenu li.active {
  background: #333333;
  color: #ffde59;
}

.sidebar-menu li.has-submenu .submenu li:hover {
  background: #1c1a1a;
  color: #ffde59;
}

/* =========================
   HLAVNÍ OBSAH (layout)
   ========================= */
.main-content{
  margin-left: var(--sidebar-width);
  padding: 0 56px 40px 56px;
  min-height: 100vh;
}
.main-content h1{ font-size: 2.1rem; font-weight: 600; margin-bottom: 36px; }

/* Header pro stránky */
.header{
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 30px;
}

/* Karta / panel s výsledky */
.graph-box{
  background: #f5f5f5;
  border-radius: 16px;
  box-shadow: 0 4px 16px #ffffff;
  padding: 28px 32px;
  margin-bottom: 30px;
}

/* =========================
   CHATBOT ZETA – oprava vstupní lišty
   ========================= */
.chatbot-box{
  position: fixed; right: 32px; bottom: 32px;
  width: 350px; background: #fff; border-radius: 22px;
  box-shadow: 0 4px 28px rgba(0,0,0,.55);
  z-index: 9999; display:flex; flex-direction: column;
  overflow: hidden;                 /* aby se nic „nerozlilo“ */
}
.chatbot-header{
  display:flex; align-items:center; gap:12px;
  background:#0f2230;               /* decentní tmavě modrá */
  color: var(--accent-text);
  padding: 14px 16px;
}
.chatbot-title{ color: var(--accent-text); font-weight: 700; }
.chatbot-input-row{
  display:flex; align-items:center; gap:8px;
  padding: 12px;
  background: #f7f8fa;
}
.chatbot-input{
  flex:1; border:1px solid #e5e7eb; border-radius: 12px;
  background:#fff; font-size:1rem; padding: 10px 12px; outline:none;
}
.chatbot-send{
  background:#0f0f0f; color: var(--accent-text);
  border:1px solid var(--accent-text); border-radius: 10px;
  padding: 9px 14px; font-weight:700; cursor:pointer;
}

/* =========================
   SPODNÍ AKČNÍ LIŠTA (Calibration)
   ========================= */
.bottom-bar{
  position: fixed; left: var(--sidebar-width); right: 0; bottom: 0;
  z-index: 1000;
  display: flex; align-items: center; gap: .75rem;
  padding: .75rem 1rem;
  background: var(--sidebar-bg);
  border-top: 1px solid var(--border);
}
.bottom-bar .bt-input{
  height: var(--btn-height);
  border-radius: var(--btn-radius);
  border: 1px solid var(--border);
  background: var(--surface-1);
  color: var(--text);
  padding: 0 .9rem; outline: none;
}
.bottom-bar .bt-text{ order:0; flex:1; min-width:0; }

/* SKRYTÍ nativního inputu souboru */
.bt-file-input{ display:none; }

/* UNIFIKOVANÉ TLAČÍTKO – submit + „Vybrat soubor“ (label) */
.bt-submit,
.bt-file-btn{
  order: 1;                           /* submit půjde první z tlačítek */
  display: inline-flex; align-items:center; justify-content:center;
  height: var(--btn-height);
  padding: 0 var(--btn-pad-x);
  border-radius: var(--btn-radius);
  background: #0f0f0f;
  color: var(--accent-text);
  border: 1px solid var(--accent-text);
  font-weight: 700; cursor: pointer; text-decoration: none;
  transition: background .15s, transform .08s, box-shadow .15s;
}
.bt-submit:hover,
.bt-file-btn:hover{ background: #1c1a1a; transform: translateY(-1px); }
.bt-submit:active,
.bt-file-btn:active{ transform: translateY(0); }

/* Konkretizace pořadí: text (0) – Odeslat (1) – Vybrat (2) */
.bt-submit{ order:1; }
.bt-file-btn{ order:2; }

/* =========================
   OBRÁZKY – konzistentní zobrazení v result boxu
   ========================= */
.calibration-image{
  max-width: 380px; width: 100%;
  height: auto; border-radius: 8px;
  display: block;
}

/* =========================
   MOBILNÍ ÚPRAVY (≤700px)
   ========================= */
@media (max-width: 700px){
  .sidebar{
    width: var(--sidebar-mobile-width);
    min-width: var(--sidebar-mobile-width);
    max-width: var(--sidebar-mobile-width);
    padding: 8px 0 0 0;
  }
  .main-content{ margin-left: var(--sidebar-mobile-width); padding: 12px; }

  /* menu text -> jen ikony, pokud nějaké budou; nyní jen zmenšíme mezeru */
  .sidebar-menu li{ margin: 4px 8px; padding: 10px 14px; }

  /* spodní lišta: menší prvky */
  .bottom-bar{ left: var(--sidebar-width); }
  .bottom-bar .bt-input{ height: 40px; }
  .bt-submit, .bt-file-btn{ height: 40px; padding: 0 .75rem; }
}

