/* ── PML Systém – hlavní stylesheet ─────────────────────────────── */

:root {
  --pml-dark:    #0f2318;
  --pml-mid:     #1a3d2b;
  --pml-green:   #2d6a4f;
  --pml-light:   #52b788;
  --pml-accent:  #95d5b2;
  --sidebar-w:   240px;
}

/* ── Layout ───────────────────────────────────────────────────── */
body {
  background: #f1f4f1;
  font-family: 'Segoe UI', system-ui, sans-serif;
  color: #1e2d1e;
}

.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: linear-gradient(180deg, var(--pml-dark) 0%, var(--pml-mid) 60%, var(--pml-green) 100%);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 4px 0 20px rgba(0,0,0,.25);
}

.main-content {
  margin-left: var(--sidebar-w);
  padding: 2rem 2.5rem;
  min-height: 100vh;
}

/* ── Sidebar brand ───────────────────────────────────────────── */
.sidebar-brand {
  padding: 1.4rem 1.2rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-brand .brand-icon {
  font-size: 1.8rem;
  color: var(--pml-accent);
}
.sidebar-brand .brand-name {
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.1;
}
.sidebar-brand .brand-sub {
  color: rgba(255,255,255,.45);
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* ── Sidebar nav ──────────────────────────────────────────────── */
.sidebar-section {
  padding: .5rem 1rem .15rem;
  color: rgba(255,255,255,.35);
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 600;
}
.sidebar .nav-link {
  color: rgba(255,255,255,.65);
  padding: .48rem 1rem;
  border-radius: 8px;
  margin: 1px 8px;
  font-size: .875rem;
  display: flex;
  align-items: center;
  gap: .55rem;
  transition: background .15s, color .15s;
}
.sidebar .nav-link i { font-size: 1rem; flex-shrink: 0; }
.sidebar .nav-link:hover  { background: rgba(255,255,255,.1); color: #fff; }
.sidebar .nav-link.active { background: rgba(255,255,255,.18); color: #fff; font-weight: 600; }

.sidebar-footer {
  padding: 1rem 1.2rem;
  border-top: 1px solid rgba(255,255,255,.08);
  margin-top: auto;
}
.sidebar-footer .user-name { color: rgba(255,255,255,.8); font-size: .85rem; font-weight: 500; }
.sidebar-footer .logout-link { color: rgba(255,100,100,.8); font-size: .8rem; }
.sidebar-footer .logout-link:hover { color: #ff6b6b; }

/* ── Cards ───────────────────────────────────────────────────── */
.card {
  border-radius: 14px !important;
  border: none !important;
  box-shadow: 0 2px 12px rgba(0,0,0,.07) !important;
}
.card-header {
  border-radius: 14px 14px 0 0 !important;
  border-bottom: 1px solid rgba(0,0,0,.06) !important;
  background: #fff !important;
  font-weight: 600;
  padding: .9rem 1.25rem;
}

/* ── Stat cards ───────────────────────────────────────────────── */
.stat-card {
  border-radius: 14px;
  padding: 1.4rem 1.2rem;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.stat-card::after {
  content: '';
  position: absolute;
  right: -20px; bottom: -20px;
  width: 90px; height: 90px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
}
.stat-card .stat-icon { font-size: 2rem; opacity: .85; }
.stat-card .stat-value { font-size: 1.9rem; font-weight: 700; line-height: 1.1; }
.stat-card .stat-label { font-size: .8rem; opacity: .8; margin-top: .2rem; }
.stat-card.green  { background: linear-gradient(135deg,#2d6a4f,#52b788); }
.stat-card.blue   { background: linear-gradient(135deg,#1e6091,#48cae4); }
.stat-card.orange { background: linear-gradient(135deg,#e76f51,#f4a261); }
.stat-card.purple { background: linear-gradient(135deg,#6a0572,#ab47bc); }
.stat-card.teal   { background: linear-gradient(135deg,#00796b,#4db6ac); }
.stat-card.red    { background: linear-gradient(135deg,#c62828,#ef5350); }

/* ── Alert nízkého stavu ─────────────────────────────────────── */
.alert-stock {
  background: linear-gradient(90deg,#fff3e0,#fff8f0);
  border-left: 4px solid #f4a261;
  border-radius: 10px;
  padding: .75rem 1.1rem;
}

/* ── Tabulky ─────────────────────────────────────────────────── */
.table thead th {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 700;
  border-bottom-width: 2px;
}
.table-dark thead { background: var(--pml-dark) !important; }

/* ── Badges ──────────────────────────────────────────────────── */
.badge { font-weight: 500; }

/* ── Produktová karta (pokladna) ──────────────────────────────── */
.produkt-karta {
  border-radius: 12px;
  border: 2px solid #e9ecef;
  cursor: pointer;
  transition: border-color .15s, transform .15s, box-shadow .15s;
  background: #fff;
  overflow: hidden;
}
.produkt-karta:hover {
  border-color: var(--pml-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(45,106,79,.15);
}
.produkt-karta.in-cart { border-color: var(--pml-green); background: #f0faf5; }
.produkt-karta .produkt-img {
  width: 100%; height: 120px;
  object-fit: cover;
  background: #f1f4f1;
}
.produkt-karta .produkt-img-placeholder {
  width: 100%; height: 120px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg,#e8f5e9,#f1f8f4);
  color: var(--pml-light);
  font-size: 2.5rem;
}
.produkt-karta .produkt-info { padding: .6rem .75rem .75rem; }
.produkt-karta .produkt-nazev { font-size: .8rem; font-weight: 600; line-height: 1.3; }
.produkt-karta .produkt-cena { font-size: 1rem; font-weight: 700; color: var(--pml-green); }

/* ── Stav pokladny bar ───────────────────────────────────────── */
.pokladna-bar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: .75rem;
  padding: .75rem 1.5rem;
  border-radius: 14px; margin-bottom: 1rem;
}
.pokladna-bar-open {
  background: #f0faf5;
  border: 1.5px solid #b7e4c7;
}
.pokladna-bar-closed {
  background: #fff8e1;
  border: 1.5px solid #ffe082;
}
.pk-stav-hlavni { display: flex; align-items: center; gap: .6rem; }
.pk-stav-label  { font-size: .82rem; color: #555; font-weight: 500; }
.pk-stav-castka { font-size: 1.35rem; font-weight: 900; color: var(--pml-green); }
.pk-trzby-mini  { display: flex; gap: 1rem; flex-wrap: wrap; }
.pk-trz-item    { font-size: .78rem; color: #666; display: flex; align-items: center; }

/* ── Způsob platby ───────────────────────────────────────────── */
.platba-volby {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem;
}
.platba-btn {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: .6rem .4rem; border-radius: 10px;
  border: 2px solid #dee2e6; background: #fff;
  cursor: pointer; transition: all .15s; font-size: .78rem; color: #555;
}
.platba-btn i { font-size: 1.2rem; }
.platba-btn.active {
  border-color: var(--pml-green);
  background: #f0faf5; color: var(--pml-green); font-weight: 700;
}
.platba-btn:hover:not(.active) { border-color: #aaa; background: #f8f9fa; }

/* ── Sklad produkt obrázek ───────────────────────────────────── */
.produkt-thumb {
  width: 44px; height: 44px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid #dee2e6;
}
.produkt-thumb-placeholder {
  width: 44px; height: 44px;
  border-radius: 8px;
  background: #e8f5e9;
  display: flex; align-items: center; justify-content: center;
  color: var(--pml-light);
  font-size: 1.2rem;
  border: 1px solid #dee2e6;
}

/* ── Kalendář směn ───────────────────────────────────────────── */
.smeny-calendar { border-radius: 14px; overflow: hidden; }
.smeny-calendar .day-col { min-width: 120px; }
.smeny-calendar .day-header {
  background: var(--pml-dark);
  color: #fff;
  padding: .5rem .75rem;
  font-size: .8rem;
  font-weight: 600;
  text-align: center;
}
.smeny-calendar .day-header.today { background: var(--pml-green); }
.smena-badge {
  background: linear-gradient(135deg,#e8f5e9,#d4edda);
  border: 1px solid var(--pml-accent);
  border-radius: 8px;
  padding: .35rem .6rem;
  margin: .25rem;
  font-size: .78rem;
}
.smena-badge .smena-time { font-weight: 700; color: var(--pml-green); }
.smena-badge .smena-name { color: #333; }

/* ── Grafy ───────────────────────────────────────────────────── */
.chart-container { position: relative; height: 260px; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn-primary {
  background: var(--pml-green);
  border-color: var(--pml-green);
}
.btn-primary:hover { background: var(--pml-dark); border-color: var(--pml-dark); }
.btn-outline-primary { color: var(--pml-green); border-color: var(--pml-green); }
.btn-outline-primary:hover { background: var(--pml-green); border-color: var(--pml-green); }

/* ── Page header ─────────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
}
.page-header h2 { margin: 0; font-weight: 700; font-size: 1.5rem; }

/* ── Upload zóna ─────────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed #b0c4b1;
  border-radius: 10px;
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.upload-zone:hover { border-color: var(--pml-green); background: #f0faf5; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar { width: 100%; min-height: auto; position: relative; }
  .main-content { margin-left: 0; padding: 1rem; }
}
