/* Fonts are loaded via <link> in base.html — not @import — to avoid FOUT */

:root {
  --bs-font-sans-serif: 'Inter', sans-serif;
  --bs-body-font-family: 'Inter', sans-serif;
  --color-primary:   #0065BD;
  --color-secondary: #6AADE4;
  --color-gray:      #9B9B9B;
  --sidebar-width:   240px;
  --navbar-height:   56px;
}

body {
  font-family: 'Inter', sans-serif;
  font-size: 0.9375rem;
}

.mono { font-family: inherit; }

/* -------------------------------------------------------------------------
   Navbar
   ------------------------------------------------------------------------- */
.navbar { background-color: var(--color-primary) !important; height: var(--navbar-height); }
.navbar-logo { height: 32px; }

/* -------------------------------------------------------------------------
   Sidebar
   ------------------------------------------------------------------------- */
.sidebar {
  position: fixed;
  top: var(--navbar-height);
  left: 0;
  width: var(--sidebar-width);
  height: calc(100vh - var(--navbar-height));
  overflow-y: auto;
  background: #f8f9fa;
  border-right: 1px solid #dee2e6;
  z-index: 100;
  transition: width 0.2s;
}

.sidebar .nav-link { color: #444; padding: 0.5rem 1rem; }
.sidebar .nav-link:hover { background: #e9ecef; color: var(--color-primary); }
.sidebar .nav-link.active { background: var(--color-primary); color: #fff; }
.sidebar .nav-link .badge { font-family: inherit; }

/* Collapsed sidebar (tablet) */
@media (max-width: 1279px) and (min-width: 768px) {
  .sidebar { width: 60px; overflow: hidden; }
  .sidebar .nav-label { display: none; }
  .main-content { margin-left: 60px !important; }
}

/* Hidden sidebar (mobile) */
@media (max-width: 767px) {
  .sidebar { display: none; }
  .main-content { margin-left: 0 !important; }
}

/* -------------------------------------------------------------------------
   Main content
   ------------------------------------------------------------------------- */
.main-content {
  margin-left: var(--sidebar-width);
  height: calc(100vh - var(--navbar-height));
  overflow: hidden;
  padding: 1.5rem;
}

.main-content.scrollable {
  overflow-y: auto;
}

/* -------------------------------------------------------------------------
   Dashboard cards
   ------------------------------------------------------------------------- */
.dashboard-card .card-body { overflow-y: auto; }

/* -------------------------------------------------------------------------
   Status badges
   ------------------------------------------------------------------------- */
.status-badge {
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  font-weight: 500;
  white-space: nowrap;
}

.status-k_natoceni  { background: #FFFFFF; color: #444; border: 1px solid #9B9B9B; }
.status-v_terenu    { background: #FFF9C4; color: #555; border: 1px solid #e0d800; }
.status-natoceno    { background: #9B9B9B; color: #fff; }
.status-pro_spojeni { background: #F0AB00; color: #fff; }
.status-pripraveno  { background: #A2AD00; color: #fff; }
.status-spojeno     { background: #00B2A9; color: #fff; }
.status-zadano      { background: #E05206; color: #fff; }
.status-resi_se     { background: #F04D98; color: #fff; }
.status-vyreseno    { background: #156570; color: #fff; }
.status-nascitano   { background: #0065BD; color: #fff; }
.status-hotovo      { background: #5A8200; color: #fff; }
.status-predelat    { background: #C60C30; color: #fff; }
.status-pretocit    { background: #981F40; color: #fff; }

/* -------------------------------------------------------------------------
   Bootstrap overrides
   ------------------------------------------------------------------------- */
.btn-primary { background-color: var(--color-primary); border-color: var(--color-primary); }
.btn-primary:hover { background-color: #004f96; border-color: #004f96; }

thead th { font-weight: 500; }

a { color: var(--color-primary); }

/* -------------------------------------------------------------------------
   Tables inside cards — align first column with card-header text
   ------------------------------------------------------------------------- */
.card .table > thead > tr > th:first-child,
.card .table > tbody > tr > td:first-child { padding-left: 1rem; }
.card .table > thead > tr > th:last-child,
.card .table > tbody > tr > td:last-child { padding-right: 1rem; }

/* -------------------------------------------------------------------------
   Compact form controls inside cards
   ------------------------------------------------------------------------- */
.card-body .form-control,
.card-body .form-select { font-size: .875rem; padding: .25rem .5rem; }
.card-body .form-label { font-size: .8125rem; margin-bottom: .2rem; }

/* -------------------------------------------------------------------------
   Multi-field rows (crispy fields side by side) — row is display:flex,
   so each field's own mb-3 no longer collapses with siblings outside;
   move the spacing to the row and zero the trapped inner margins.
   ------------------------------------------------------------------------- */
.form-row { margin-bottom: 1rem; }
.form-row .mb-3 { margin-bottom: 0 !important; }
