@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --ss-accent: #ffc107;
  --sidebar-width: 400px; 
}

/* === OSNOVNO === */
html, body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-weight: 400;
  font-size: 0.95rem;
  color: var(--bs-body-color);
  background-color: var(--bs-body-bg);
}

/* === NASLOVI === */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--bs-heading-color, #212529);
}
[data-bs-theme="dark"] h1,
[data-bs-theme="dark"] h2,
[data-bs-theme="dark"] h3,
[data-bs-theme="dark"] h4,
[data-bs-theme="dark"] h5,
[data-bs-theme="dark"] h6 {
  color: #f8f9fa;
}

/* === GUMBI === */
.btn {
  font-weight: 500;
  letter-spacing: 0.2px;
  border-radius: .45rem;
  transition: all 0.2s ease-in-out;
}
.btn-warning {
  color: #000;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(255,193,7,0.25);
}
.btn-warning:hover {
  background-color: #e6b806;
  box-shadow: 0 3px 6px rgba(255,193,7,0.35);
}
#btnTheme {
  transition: all 0.2s;
}
#btnTheme:hover {
  background-color: rgba(255,193,7,0.15);
  border-color: var(--ss-accent);
}
.btn-outline-secondary {
  transition: all 0.5s;
}
.btn-outline-secondary:hover {
  background-color: rgba(255,193,7,0.15);
  border-color: var(--ss-accent);
  color: #212529 !important;
}

/* === TABLICE === */
.table {
  font-size: 0.9rem;
}
.table thead th {
  font-weight: 600;
  color: #555;
  white-space: nowrap;
}


/* === KPI KARTICE === */
.kpi-card .h4 { font-weight: 700; }
.kpi-card .text-secondary { font-weight: 500; letter-spacing: 0.3px; }
.kpi-card .kpi-icon { font-size: 1.75rem; opacity: .7; }

/* === NAVBAR (TOPBAR) === */
.navbar {
  position: relative;
  z-index: 1060;
  background-color: rgba(255,255,255,0.9) !important;
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  font-weight: 500;
}

.navbar-brand {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.2;
  color: #212529 !important;
  text-decoration: none;
}

.navbar-brand:hover { color: #000 !important; }
[data-bs-theme="dark"] .navbar-brand {
  color: #f8f9fa !important;
  text-shadow: 0 0 6px rgba(255,193,7,0.3);
}
[data-bs-theme="dark"] .navbar-brand:hover { color: #fff !important; }
.navbar .dropdown-menu {
  border-radius: .5rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  z-index: 1070;
}



/* === SIDEBAR === */

.offcanvas.sidebar {
  z-index: 1045 !important;
}

/* === DESKTOP === */
@media (min-width: 992px) {
  .sidebar {
    position: fixed !important;
    left: 0;
    top: 56px;
    width: var(--sidebar-width);
    height: calc(100vh - 56px);
    transform: none !important;
    visibility: visible !important;
    background-color: var(--bs-body-bg);
    border-right: 1px solid var(--bs-border-color);
    z-index: 1030;
    padding-top: 1rem;
      box-shadow: 2px 0 8px rgba(0, 0, 0, 0.05);
    
  }

  .navbar.sticky-top {
    position: sticky !important;
    top: 0;
    z-index: 1060;
    background-color: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(2px);
    transition: box-shadow 0.3s ease, background-color 0.3s ease;
  }
  .navbar.sticky-top.scrolled {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  }

  .content-wrapper {
    margin-left: var(--sidebar-width);
    margin-top: 56px;
    padding-top: 0 !important;
  }
}

/* === LINKOVI U SIDEBARU === */
.sidebar .nav-link {
  color: #444;
  border-radius: .5rem;
  padding: .55rem .75rem;
  margin-bottom: .25rem;
  font-weight: 500;
  transition: all 0.15s ease;
}
.sidebar .nav-link:hover {
  background-color: rgba(255,193,7,0.15);
  color: #000;
}
.sidebar .nav-link.active {
  background-color: var(--ss-accent);
  color: #000;
  font-weight: 600;
}


/* === Sidebar header (logo + tenant) === */
.sidebar-header {
  padding: .25rem 0 .75rem 0;
  border-bottom: 1px solid var(--bs-border-color);
}
.sidebar-header .brand-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: #212529;
}

.sidebar-header .tenant-sub {
  font-size: 0.7rem;
  font-weight: 500;
  color: #6c757d;
}
[data-bs-theme="dark"] .sidebar-header .tenant-sub {
  color: #dee2e6;
  opacity: 0.85;
}

/* === POMAK I VISINA === */
@media (min-width: 992px) {
  body { padding-top: 0px; }
  .sidebar { top: 50px !important; }

}
@media (max-width: 991.98px) {
  .offcanvas.sidebar { top: 50px; }
}

.content-wrapper {
    margin-top: 15px;
  }
  
/* Modal gumbi */
.modal-footer .btn-danger {
  font-weight: 600;
}
.modal-footer .btn-outline-secondary {
  font-weight: 500;
}

/* Logout modal stil */
#logoutCountdown {
  font-size: 1rem;
  color: #dc3545;
}

.progress {
  background-color: rgba(220,53,69,0.1);
  border-radius: 5px;
  overflow: hidden;
}

.progress-bar {
  transition: width 1s linear;
}

/* === Dropdown korisnika (topbar) === */
.navbar .dropdown-toggle {
  font-size: 0.9rem;
  padding: 0.4rem 0.75rem;
}

.navbar .dropdown-toggle i {
  font-size: 1rem;
  margin-right: 4px;
}

.navbar .dropdown {
  margin-right: 15px;
}

/* Uloga u dropdownu */
.dropdown-menu small.text-secondary {
  display: block;
  text-align: left;
  padding-left: 1rem; 
  padding-right: 1.5rem;
  font-size: 0.8rem;
  margin-top: 4px;
  margin-bottom: 6px;
  opacity: 0.8;
}


a {
  color: #d39e00;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease-in-out;
}

a:hover,
a:focus {
  color: #333; 
  text-decoration: none;
  text-underline-offset: 3px; 
}

a:active {
  color: #000;
  text-decoration: none;
}

#passwordFieldWrapper {
  transition: all 0.3s ease-in-out;
}
#passwordFieldWrapper.d-none {
  opacity: 0;
  height: 0;
  overflow: hidden;
}
.toast-container {
  z-index: 9999;
}
.toast.text-bg-success {
  background-color: #fff2cc !important;
  color: #fff;
}
.toast.text-bg-danger {
  background-color: #dc3545 !important;
  color: #fff;
}
.toast {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease;
}

.toast.show {
  opacity: 3;
  transform: translateY(0);
}


