/* ═══════════════════════════════════════════════════════
   Školní bufet – SOS NET OFFICE | Hlavní styly
   ═══════════════════════════════════════════════════════ */

:root {
  --school-blue:      #003087;
  --school-blue-dark: #001f5e;
  --school-blue-light:#1a4faa;
  --school-accent:    #e8961e;
  --gray-bg:          #f4f6fb;
}

/* Základní layout */
html, body { height: 100%; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--gray-bg);
  color: #222;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Navbar */
.bg-school {
  background: linear-gradient(135deg, var(--school-blue) 0%, var(--school-blue-light) 100%) !important;
}
.logo-img { background: #fff; border-radius: 6px; padding: 3px 6px; }
.brand-text { font-size: 1.1rem; font-weight: 700; letter-spacing: .02em; }
.credit-badge {
  background: rgba(255,255,255,0.15);
  border-radius: 20px;
  font-size: .85rem;
  padding: 4px 12px !important;
  font-weight: 600;
}
.cart-link { font-size: 1.3rem; position: relative; }
.cart-badge {
  position: absolute;
  top: 2px; right: -4px;
  background: var(--school-accent);
  color: #fff;
  border-radius: 50%;
  width: 18px; height: 18px;
  font-size: 11px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}

/* Footer */
.footer {
  background: var(--school-blue);
  color: #fff;
  margin-top: auto;
}
.footer .text-muted { color: rgba(255,255,255,.65) !important; }
.footer strong { color: #fff; }

/* Karty produktů */
.product-card {
  transition: transform .15s ease, box-shadow .15s ease;
  border: none;
  border-radius: 12px;
  overflow: hidden;
  height: 100%;
}
.product-card:hover:not(.sold-out) {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,48,135,.15) !important;
}
.product-card.sold-out { opacity: .55; filter: grayscale(80%); }
.product-img-wrap {
  height: 180px;
  overflow: hidden;
  background: #e9ecef;
  display: flex; align-items: center; justify-content: center;
}
.product-img-wrap img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 8px;
  background: #fff;
  transition: transform .3s ease;
}
.product-card:hover .product-img-wrap img { transform: scale(1.05); }
.product-img-placeholder {
  font-size: 3.5rem;
  color: #ced4da;
}
.product-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--school-blue);
}
.product-badge-out {
  background: #dc3545;
  color: #fff;
  font-size: .7rem;
  padding: 2px 8px;
  border-radius: 4px;
}
.category-pill {
  background: var(--school-blue);
  color: #fff;
  font-size: .72rem;
  padding: 2px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

/* Sekce kategorií */
.category-nav .nav-link {
  border-radius: 20px !important;
  font-size: .88rem;
  padding: 6px 16px;
  transition: all .15s;
}
.category-nav .nav-link.active,
.category-nav .nav-link:hover {
  background: var(--school-blue) !important;
  color: #fff !important;
}

/* Košík */
.cart-table td, .cart-table th { vertical-align: middle; }
.cart-qty-input { width: 70px; text-align: center; }

/* Stránky s formuláři (login, register) */
.auth-card {
  max-width: 460px;
  margin: 40px auto;
  border-radius: 16px;
  border: none;
  box-shadow: 0 8px 32px rgba(0,48,135,.1);
}
.auth-card .card-header {
  background: var(--school-blue);
  color: #fff;
  border-radius: 16px 16px 0 0 !important;
  padding: 1.5rem 2rem;
}

/* Admin / Cashier panely */
.panel-sidebar {
  min-width: 220px;
}
.panel-sidebar .nav-link {
  color: #444;
  border-radius: 8px;
  padding: 10px 16px;
  display: flex; align-items: center; gap: 10px;
  transition: all .15s;
}
.panel-sidebar .nav-link:hover,
.panel-sidebar .nav-link.active {
  background: var(--school-blue);
  color: #fff;
}
.panel-sidebar .nav-link i { font-size: 1.1rem; }

/* Stat cards */
.stat-card {
  border: none;
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
}
.stat-card .stat-value { font-size: 2rem; font-weight: 700; }
.stat-card .stat-label { font-size: .82rem; color: #888; }

/* Tabulky */
.table-hover tbody tr:hover { background: rgba(0,48,135,.04); }

/* Badge pro role */
.role-admin   { background: var(--school-blue); }
.role-cashier { background: #198754; }
.role-diner   { background: #6c757d; }

/* Status objednávek */
.status-pending   { color: #fd7e14; }
.status-ready     { color: #0dcaf0; }
.status-partial   { color: #6f42c1; }
.status-completed { color: #198754; }
.status-cancelled { color: #dc3545; }

/* Responzivita */
@media (max-width: 576px) {
  .product-img-wrap { height: 140px; }
  .brand-text { display: none !important; }
  .auth-card { margin: 20px auto; }
}

/* Přepínač jazyka */
.lang-btn {
  font-size: .72rem;
  font-weight: 700;
  text-decoration: none;
  color: rgba(255,255,255,.6) !important;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 4px;
  padding: 2px 6px;
  transition: all .15s;
  letter-spacing: .04em;
}
.lang-btn:hover {
  color: #fff !important;
  border-color: rgba(255,255,255,.7);
  background: rgba(255,255,255,.1);
}
.lang-btn.active {
  color: #fff !important;
  border-color: #fff;
  background: rgba(255,255,255,.2);
}

/* Spinner overlay */
.page-loading {
  position: fixed; inset: 0;
  background: rgba(255,255,255,.6);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  display: none;
}
