/* =========================================================
   ROOT PREMENNÉ + ZÁKLAD
========================================================= */
:root {
  --topbar-height: 56px;
  --sidebar-width: 220px;

  /* dynamické farby témy (z DB alebo default) */
  --theme-bg: #000000;
  --theme-text: #ffffff;
}

@media screen {
  html {
    zoom: 80%;
  }
}

body {
  font-size: 0.95rem;
  background: #F0F5F5;
}


/* =========================================================
   TOPBAR
========================================================= */
.topbar {
  background-color: var(--theme-bg);
  height: var(--topbar-height);
  color: var(--theme-text);
}

.topbar .brand-title,
.topbar a,
.topbar i,
.topbar .nav-link,
.topbar .navbar-brand {
  color: var(--theme-text) !important;
}

/* Logo */
.logo-servisportal {
  height: 48px;
  width: auto;
  display: inline-block;
  vertical-align: middle;
}


/* =========================================================
   SIDEBAR
========================================================= */
.sidebar {
  background-color: var(--theme-bg);
  min-height: 100vh;
  color: var(--theme-text);
  padding-top: 1rem;
}

.sidebar a {
  display: block;
  padding: 8px 16px;
  color: var(--theme-text);
  text-decoration: none;
  transition: 0.2s;
}

.sidebar a:hover {
  color: #ffffff;
  opacity: 0.85;
}

.sidebar a.active {
  color: #D9CC9C;   /* zvýraznená položka */
  font-weight: bold;
}

/* Accordion prvky v sidebare */
.sidebar .accordion-button {
  display: block !important;
  width: 100%;
  text-align: left;
  padding: 8px 16px !important;
  background-color: transparent !important;
  color: var(--theme-text) !important;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.sidebar .accordion-body {
  padding: 0 0 0 1rem;
}

.sidebar .accordion-body a {
  padding: 6px 16px;
  font-size: 0.95rem;
}


/* =========================================================
   LOGIN KARTA
========================================================= */
.login-card {
  max-width: 400px;
  width: 100%;
  margin: 2rem auto;
  box-sizing: border-box;
}


/* =========================================================
   OBSAH (MAIN CONTENT)
========================================================= */
main.content {
  margin-top: var(--topbar-height);
  padding: 1rem;
}

/* Trvalé menu a odsadenie obsahu pre PC rozhranie. */
.sidebar-desktop {
  position: fixed;
  top: var(--topbar-height);
  bottom: 0;
  left: 0;
  width: var(--sidebar-width);
  min-height: 0;
  overflow-y: auto;
  padding-top: 0.75rem;
  z-index: 1020;
}

main.content {
  margin-left: var(--sidebar-width);
  min-width: 0;
}

/* Posun tabuľky zachová všetky stĺpce aj pri užšom PC okne. */
.dataTables_wrapper .dataTables_scrollBody {
  overflow-x: auto;
}

/* =========================================================
   DROPDOWN + NOTIFIKÁCIE
========================================================= */
.dropdown-menu {
  min-width: 250px;
}

.dropdown-item {
  font-size: 0.95rem;
  white-space: normal;
}

.badge {
  font-size: 0.7rem;
}


/* =========================================================
   GALÉRIA STROJA
========================================================= */
.gallery-container {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.gallery-item {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 3px 8px rgba(0,0,0,0.15);
  background: #f8f9fa;
}

.gallery-item a {
  display: block;
  width: 100%;
  height: 100%;
}

.gallery-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease, filter 0.25s ease;
  background-color: #eee;
}

.gallery-thumb:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
}

/* Delete button */
.delete-photo {
  position: absolute;
  top: 6px;
  right: 6px;
  background-color: rgba(0,0,0,0.65);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  font-size: 18px;
  line-height: 24px;
  text-align: center;
  cursor: pointer;
  transition: background 0.2s;
}

.delete-photo:hover {
  background-color: #ba1512;
}


/* =========================================================
   BREADCRUMB
========================================================= */
.breadcrumb-bar-full {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    padding: 6px 20px 0 0;
    height: 30px;
    box-sizing: border-box;
}

.breadcrumb-nav {
    font-size: 0.90rem;
    white-space: nowrap;
    color: #000;
}

.crumb-link {
    color: #000;
    text-decoration: none;
    font-weight: 500;
}

.crumb-link:hover {
    text-decoration: underline;
}

.crumb-sep {
    margin: 0 6px;
    color: #444;
}

.crumb-active {
    font-weight: 600;
    color: #000;
}

/*================================================
/* Efekt stlačenia tlačidla */
.btn:active {
    transform: translateY(2px);
    box-shadow: none !important;
}


/* ===== NOTIFIKÁCIE ===== */

.notif-item {
    padding: 10px 14px;
    transition: background 0.15s ease;
}

.notif-item:hover {
    background: #f6f7f9;
}

/* Ikona v kruhu */
.notif-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    font-size: 16px;
}

/* Typy notifikácií */
.bg-report {
    background: #f0ad4e; /* report / servis */
}

.bg-message {
    background: #0d6efd; /* správy */
}

.bg-deadline {
    background: #198754; /* termíny */
}

.bg-system {
    background: #6c757d; /* systém */
}

/* Dropdown header */
.dropdown-header {
    background: #f8f9fa;
    font-size: 0.9rem;
}

/* Scrollbar jemný */
.dropdown-menu::-webkit-scrollbar {
    width: 6px;
}
.dropdown-menu::-webkit-scrollbar-thumb {
    background: #ced4da;
    border-radius: 3px;
}


/* Skrytie šípok v number inputoch */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button{
  -webkit-appearance:none;
  margin:0;
}
input[type=number]{
  -moz-appearance:textfield;
}

/* Klikateľné riadky zoznamov zariadení. */
tr.asset-info-row { cursor: pointer; }
tr.asset-info-row:focus-visible { outline: 2px solid #0d6efd; outline-offset: -2px; }
