:root { 
  /* --- ALUK BRAND BARVE --- */
  --aluk-red: #E2001A;
  --aluk-red-hover: #B80015;
  --aluk-black: #323338;
  
  /* Tinti AluK Black */
  --aluk-black-75: #585960;  /* 75% - za podnaslove */
  --aluk-black-50: #98999B;  /* 50% - za sekundarni tekst */
  --aluk-black-25: #D8D9DA;  /* 25% - za borderje in ločnice */
  --aluk-black-10: #F5F5F6;  /* 10% - za ozadja */
  
  /* --- PRIMARNE BARVE --- */
  --primary: var(--aluk-red);
  --primary-hover: var(--aluk-red-hover);
  --header-bg: var(--aluk-black);
  
  /* --- NASLOVI IN TEKST --- */
  --heading-color: var(--aluk-black);           /* Naslovi (h1, h2, h3) */
  --subheading-color: var(--aluk-black-75);    /* Podnaslovi */
  --text-primary: var(--aluk-black);             /* Glavni tekst */
  --text-secondary: var(--aluk-black-50);       /* Sekundarni tekst */
  --text-tertiary: var(--aluk-black-25);      /* Terciarni tekst */
  
  /* --- REZULTATI --- */
  --result-article-heading: var(--aluk-red);   /* Naslov rezultatov artiklov */
  --result-article-text: var(--aluk-black);    /* Tekst rezultatov artiklov */
  --result-doc-heading: var(--aluk-black-75);  /* Naslov tehnične dokumentacije */
  --result-doc-text: var(--aluk-black);        /* Tekst tehnične dokumentacije */
  
  /* --- OZADJA IN BORDERJI --- */
  --bg-color: #ffffff;
  --bg-secondary: var(--aluk-black-10);
  --card-bg: #ffffff;
  --border: var(--aluk-black-25);
  --border-light: var(--aluk-black-10);
  
  /* --- STATUS BARVE --- */
  --success: #059669;
  --error: var(--aluk-red);
  --new-badge: var(--aluk-red);
  --fav-color: #fbbf24;
  --loading-color: var(--aluk-red);
  
  /* --- SISTEMSKA OZNAKA --- */
  --system-badge-bg: var(--aluk-black-50); 
  --system-badge-text: #ffffff;
  --system-badge-border: none;
}

/* Globalni reset za predvidljivo box-sizing */
*, *::before, *::after {
  box-sizing: border-box;
}

body { 
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; 
  margin: 0; 
  padding: 0; 
  color: var(--text-primary); 
  line-height: 1.6; 
  background-color: var(--bg-secondary); 
  min-height: 100vh; 
}

.fixed-header { 
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 90px;
  background-color: var(--header-bg);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  z-index: 1100;
  display: block;
}

@media (max-width: 768px) {
  .fixed-header { height: 80px; }
}

@media (max-width: 480px) {
  .fixed-header { height: 70px; }
}

.header-content { 
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  padding: 0 40px;
  height: 100%;
  display: flex;
  justify-content: space-between; 
  align-items: center; 
  flex-wrap: wrap;
  gap: 10px;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .header-content { 
    padding: 0 20px; 
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .header-content { 
    padding: 0 15px; 
    gap: 5px;
  }
}

.logo { 
  height: 45px; 
  width: auto; 
  display: block; 
  cursor: pointer; 
  transition: opacity 0.2s; 
}

.logo:hover { opacity: 0.8; }

@media (max-width: 768px) {
  .logo { height: 38px; }
}

@media (max-width: 480px) {
  .logo { height: 32px; }
}

.header-text h1 { 
  color: #fff; 
  margin: 0; 
  font-size: 20px; 
  font-weight: 600; 
  letter-spacing: 0.5px; 
}

.header-text .subtitle { 
  color: var(--text-secondary); 
  font-size: 13px; 
  margin: 0; 
  font-weight: 400; 
}

@media (max-width: 768px) {
  .header-text h1 { font-size: 16px; }
  .header-text .subtitle { font-size: 11px; }
}

@media (max-width: 480px) {
  .header-text h1 { font-size: 14px; }
  .header-text .subtitle { 
    font-size: 10px; 
    display: none; /* Skrij podnaslov na zelo majhnih zaslonih */
  }
}

.card { 
  border: 1px solid var(--border); 
  border-radius: 16px; 
  padding: 40px; 
  background: var(--card-bg); 
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.05); 
}

@media (max-width: 768px) {
  .card { padding: 30px; border-radius: 12px; }
}

@media (max-width: 480px) {
  .card { padding: 20px; border-radius: 10px; }
}

/* --- Sticky nav bar (2-row file-explorer style) --- */
.sticky-nav-bar {
  position: sticky;
  top: 90px;
  z-index: 100;
  background: var(--bg-secondary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border-bottom: 1px solid var(--border);
  border-radius: 15px 15px 0 0;
  margin: 0 -40px 0 -40px;
  margin-bottom: 20px;
  overflow: hidden;
}

.sticky-nav-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 40px;
  height: 68px;
  min-height: 68px;
  box-sizing: border-box;
}

/* Back button: compact, never full width – reset global button styles */
.sticky-nav-back-btn {
  width: auto !important;
  min-width: auto !important;
  max-width: none !important;
  padding: 8px 16px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  border-radius: 999px;
  flex-shrink: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.sticky-nav-back-btn:hover {
  background: var(--border);
  border-color: var(--text-tertiary);
}

.sticky-nav-row .breadcrumbs {
  margin: 0;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-size: 14px;
}

/* Scrollable toolbar (search + view toggles) – not sticky */
.toolbar.toolbar-scrollable {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 20px;
}

.toolbar-scrollable .search-box {
  flex: 1;
  min-width: 200px;
}

.toolbar-scrollable .view-toggles {
  flex-shrink: 0;
}

.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}
.search-input-wrap input {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
  padding-right: 40px;
}

.clear-search-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px !important;
  height: 32px !important;
  padding: 0 !important;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 18px;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color 0.2s;
}

.clear-search-btn:hover {
  color: var(--text-primary);
}

@media (max-width: 768px) {
  .sticky-nav-bar {
    top: 80px;
    border-radius: 12px 12px 0 0;
    margin: 0 -30px 0 -30px;
  }
  .sticky-nav-row {
    padding-left: 30px;
    padding-right: 30px;
  }
}

@media (max-width: 480px) {
  .sticky-nav-bar {
    top: 70px;
    border-radius: 10px 10px 0 0;
    margin: 0 -20px 0 -20px;
  }
  .sticky-nav-row {
    padding-left: 20px;
    padding-right: 20px;
  }
  .sticky-nav-back-btn {
    padding: 6px 12px !important;
    font-size: 13px !important;
  }
  .sticky-nav-row .breadcrumbs {
    font-size: 12px;
  }
  .toolbar-scrollable .search-box {
    min-width: 100%;
  }
}

.input-group { margin-bottom: 20px; }
label { 
  display: block; 
  margin-bottom: 8px; 
  font-weight: 500; 
  font-size: 14px;
}
.optional-label {
  font-weight: 400;
  font-size: 12px;
  color: var(--text-secondary, #64748b);
}

input { 
  width: 100%; 
  padding: 14px; 
  border: 1px solid var(--border); 
  border-radius: 8px; 
  box-sizing: border-box; 
  font-size: 16px; 
  height: 48px; 
  color: var(--text-primary);
  background: var(--card-bg);
}

input:focus { 
  outline: none; 
  border-color: var(--primary); 
  box-shadow: 0 0 0 2px rgba(226, 0, 26, 0.1); 
}

@media (max-width: 480px) {
  input { font-size: 16px; padding: 12px; }
}

button { width: 100%; padding: 14px; border-radius: 8px; border: none; cursor: pointer; font-weight: 600; font-size: 16px; transition: all 0.2s; }
button.primary { background: var(--primary); color: #fff; }
button.primary:hover { background: var(--primary-hover); transform: translateY(-1px); }
button.primary:disabled { opacity: 0.7; cursor: wait; }
button.secondary { 
  background: #fff; 
  border: 1px solid var(--border); 
  color: var(--text-primary); 
  margin-top: 12px; 
}

button.secondary:hover { 
  background: var(--bg-secondary); 
}
button.ghost { background: transparent; color: #fff; width: auto; padding: 8px 16px; font-size: 14px; border: 1px solid rgba(255,255,255,0.2); border-radius: 6px; }
button.ghost:hover { background: rgba(255,255,255,0.1); border-color: #fff; }

@media (max-width: 768px) {
  button.ghost { 
    padding: 6px 12px; 
    font-size: 13px; 
  }
}

@media (max-width: 480px) {
  button.ghost { 
    padding: 5px 10px; 
    font-size: 12px; 
  }
}

.search-box { 
  flex-grow: 1; 
  min-width: 200px;
}

@media (max-width: 480px) {
  .search-box { min-width: 100%; }
}
.view-toggles { 
  display: flex; 
  border: 1px solid var(--border); 
  border-radius: 8px; 
  overflow: hidden; 
  height: 48px; 
  align-self: flex-start; 
}

.view-btn { 
  background: #fff; 
  border: none; 
  padding: 0 15px; 
  cursor: pointer; 
  border-right: 1px solid var(--border); 
  font-size: 18px; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  width: 44px; 
  height: 100%; 
  transition: all 0.2s;
}

.view-btn:last-child { border-right: none; }

.view-btn.active { 
  background: var(--bg-secondary); 
  color: var(--primary); 
}

.view-btn:hover:not(.active) {
  background: var(--bg-secondary);
}

.breadcrumbs { 
  display: flex; 
  align-items: center; 
  gap: 8px; 
  margin-bottom: 20px; 
  font-size: 14px; 
  color: var(--text-secondary); 
  flex-wrap: wrap; 
}

.breadcrumb-item { 
  cursor: pointer; 
  color: var(--primary); 
  font-weight: 600; 
}

.breadcrumb-item:hover { 
  text-decoration: underline; 
}

@media (max-width: 480px) {
  .breadcrumbs { font-size: 12px; gap: 6px; }
}

.content-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.content-title-row .section-title {
  margin-top: 0;
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
  flex-shrink: 0;
}
.content-status {
  font-size: 13px;
  font-weight: normal;
  color: #666;
  flex-shrink: 0;
}
.content-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
  margin-bottom: 10px;
}
.section-title { 
  font-size: 14px; 
  font-weight: 700; 
  color: var(--subheading-color); 
  text-transform: uppercase; 
  letter-spacing: 1px; 
  margin-top: 35px; 
  margin-bottom: 15px; 
  padding-bottom: 8px; 
  border-bottom: 1px solid var(--border); 
  display:flex; 
  align-items:center; 
  gap:8px; 
}

.section-title.fav { 
  color: var(--fav-color); 
  border-bottom-color: var(--border-light); 
  margin-top: 0; 
}

#searchResultsWrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  width: 100%;
}

#searchResultsWrapper #mainContent,
#searchResultsWrapper #catalogResultsSection {
  flex: 1;
  min-width: 300px;
  box-sizing: border-box;
}

/* Ko je le vsebina katalogov (ni zadetkov iz map), naj zavzame celotno širino */
#searchResultsWrapper #mainContent[style*="display: none"] + #catalogResultsSection,
#searchResultsWrapper #mainContent[style*="display:none"] + #catalogResultsSection {
  flex: 1 1 100%;
  max-width: 100%;
}

#mainContent {
  width: 100% !important;
  min-height: max(80vh, 600px);
  box-sizing: border-box;
}

.search-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--aluk-black-25);
  border-top-color: var(--aluk-red);
  border-radius: 50%;
  animation: search-spin 0.8s linear infinite;
}
@keyframes search-spin {
  to { transform: rotate(360deg); }
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
}

/* Catalog section title above cards */
.catalog-results-title {
  margin: 0 0 12px;
  color: var(--result-doc-heading);
}

.catalog-section-header {
  min-height: 110px;
  margin-bottom: 0;
}

.catalog-section-header p {
  margin-bottom: 15px;
}

/* Search results headers in current two-column wrapper */
#searchResultsWrapper .search-section-header {
  min-height: 110px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

#searchResultsWrapper .search-section-header h3 {
  margin: 0 0 12px;
}

#searchResultsWrapper .search-section-header p {
  margin: 0;
  line-height: 1.45;
  color: var(--text-primary);
}

/* Catalog Card Container */
.catalog-card {
  background: white;
  border: 1px solid var(--aluk-black-25);
  border-radius: 8px;
  overflow: hidden; /* Keeps content inside rounded corners */
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  margin-bottom: 0; /* Let grid handle gaps */
}

.catalog-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Card Header (Filename) */
.catalog-card-header {
  background-color: var(--aluk-black-10);
  padding: 12px 15px;
  font-weight: 700;
  color: var(--aluk-black);
  border-bottom: 1px solid var(--aluk-black-25);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* List Container inside Card */
.match-list {
  display: flex;
  flex-direction: column;
  padding: 0;
  margin: 0;
  list-style: none;
}

/* Individual Result Row - Full Width, Stacked */
.match-item {
  display: flex;
  align-items: center; /* Vertically center badge and text */
  padding: 10px 15px;
  border-bottom: 1px solid var(--aluk-black-10);
  text-decoration: none;
  transition: background-color 0.1s;
  gap: 12px;
}

.match-item:last-child {
  border-bottom: none;
}

.match-item:hover {
  background-color: #fff5f5; /* Very light red tint on hover */
}

/* The Red Button Badge (Fixed Width) */
.page-badge {
  background-color: var(--aluk-black); /* Dark by default */
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  min-width: 65px; /* Ensure alignment */
  text-align: center;
  flex-shrink: 0; /* Prevent shrinking */
  transition: background-color 0.2s;
}

.match-item:hover .page-badge {
  background-color: var(--aluk-red); /* Turns RED on hover */
}

/* The Title Text (Black, Readable) */
.match-title {
  color: var(--aluk-black); /* STRICTLY BLACK text */
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2; /* Limit to 2 lines if very long */
  -webkit-box-orient: vertical;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--aluk-black-10);
  color: var(--aluk-black);
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  transition: all 0.2s ease;
  margin-right: 5px;
  margin-bottom: 5px;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.page-btn:hover {
  background-color: var(--aluk-red);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(226, 0, 26, 0.3);
}

.file-container {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
}

/* Layout izključno s CSS @media – brez JS, brez skakanja */
.file-container.grid-view {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 20px;
  align-items: stretch;
  justify-items: stretch;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
}

@media (max-width: 1200px) {
  .file-container.grid-view { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

@media (max-width: 768px) {
  .file-container.grid-view { grid-template-columns: minmax(0, 1fr) !important; } 
  .header-text { display: none; }
  .search-results-grid { grid-template-columns: 1fr !important; }
}

@media (max-width: 480px) {
  .file-container.grid-view { gap: 15px; }
}
.file-container.grid-view .item-card,
.file-container.grid-view .item {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  justify-self: stretch;
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  background: #fff;
  /* Transition samo za hover efekte, ne za dimenzije – preprečuje animacijo ob nalaganju */
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s, background-color 0.2s;
  cursor: pointer;
  overflow: hidden;
  position: relative;
  padding: 0 !important;
  box-sizing: border-box;
}

.file-container.grid-view .item:hover { border-color: var(--primary); box-shadow: 0 8px 20px rgba(0,0,0,0.1); transform: translateY(-3px); }

.file-container.grid-view .item-preview {
  width: 100%;
  height: 180px;
  flex-shrink: 0;
  background-color: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.file-container.grid-view .item-info {
  display: flex;
  flex-direction: column;
  flex-grow: 1 !important;
  width: 100%;
  padding: 15px;
  text-align: center;
  box-sizing: border-box;
}

/* Velikost (Mapa / MB) – margin-top: auto potisne velikost in datum na dno */
.file-container.grid-view .item-info small {
  margin-top: auto !important;
  margin-bottom: 0 !important;
}

/* Datum – takoj pod velikostjo, minimalen odmik */
.file-container.grid-view .item-info .item-date {
  margin-top: 2px !important;
  margin-bottom: 0 !important;
}

.file-container.grid-view .big-icon { font-size: 64px; }
.icon-img { width: 64px; height: 64px; object-fit: contain; }
/* Excel in DWG ikona na kartici: enaka velikost kot emoji za mape (.big-icon 64px), centrirana */
.file-container.grid-view .item-preview .icon-img {
  width: 64px !important;
  height: 64px !important;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}
/* PDF ikona: prikaz v celoti (object-fit: contain), povečana za 10% (51→56px) */
.file-container.grid-view .item-preview .icon-img[src*="PDF_file_icon"],
.file-container.grid-view .item-preview .icon-img[src*="256px-PDF"] {
  width: 56px !important;
  height: 56px !important;
  object-fit: contain !important;
}
/* Excel ikona 10% manjša (64px → 58px) */
.file-container.grid-view .item-preview .icon-img[src*="excel_icon"] {
  width: 58px !important;
  height: 58px !important;
}
/* DWG ikona 2× + 50% večja (128px → 192px) */
.file-container.grid-view .item-preview .icon-img[src="dwg-file.png"] {
  width: 192px !important;
  height: 192px !important;
}

.file-container.list-view { display: flex; flex-direction: column; gap: 10px; }
.file-container.list-view .item { display: flex; flex-direction: row; align-items: center; padding: 13px 15px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; background: #fff; transition: all 0.1s; position: relative; }
.file-container.list-view .item:hover { border-color: var(--primary); background: #fcfcfc; }
.file-container.list-view .item-preview { width: 50px; height: 50px; border-radius: 6px; margin-right: 15px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 24px; border: none; }
.file-container.list-view .item-info { text-align: left; flex-grow: 1; padding: 0; }
.file-container.list-view .item-preview img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.file-container.list-view .icon-img { width: 32px; height: 32px; }
.file-container.list-view .item-preview .icon-img[src*="PDF_file_icon"],
.file-container.list-view .item-preview .icon-img[src*="256px-PDF"] {
  width: 29px;
  height: 29px;
  object-fit: contain !important;
}
.file-container.list-view .item-preview .icon-img[src*="excel_icon"] {
  width: 29px;
  height: 29px;
}

.item-preview img { width: 100%; height: 100%; object-fit: cover; }
.item-preview.folder-bg { background-color: #fff7ed; color: #f97316; }
.item-preview.file-bg { background-color: #f1f5f9; color: #64748b; }
/* Datoteke za prenos (DWG, Excel): ikona prenosa na predogledu in kazalec */
.item-preview.file-preview-download { position: relative; }
.download-overlay-icon {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: var(--primary, #0d9488);
  color: #fff;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 14px;
  line-height: 1;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
/* List view: ikona prenosa desno spodaj v kvadrantu (50×50) */
.file-container.list-view .item-preview .download-overlay-icon {
  bottom: 2px;
  right: 2px;
  padding: 2px 4px;
  font-size: 10px;
  border-radius: 4px;
}
.file-download-type { cursor: pointer; }
.item-info strong { 
  display: block; 
  color: var(--text-primary); 
  margin-bottom: 2px; 
  word-break: break-word; 
  font-size: 15px; 
  font-weight: 600;
} 

.item-info small { 
  color: var(--text-secondary); 
  font-size: 13px; 
  display: block; 
  margin-bottom: 4px;
}

.item-date { 
  font-size: 11px; 
  color: var(--text-secondary); 
  display: block; 
  margin-top: 4px; 
  line-height: 1.3;
}

#globalFavorites { margin-bottom: 40px; }
#globalFavorites .item-preview { height: 120px; background: #fffbeb; } 
#globalFavorites .big-icon { font-size: 48px; }

/* --- BADGES --- */
/* Enotna definicija za vse NOVO značke (besedilo + kartice) */
.new-badge {
  /* Fiksne dimenzije - to je ključno! */
  height: 20px !important;
  min-width: 42px !important; /* Da so vsi enako široki */

  /* Flexbox za centriranje teksta v fiksni višini */
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  /* Tekst */
  font-size: 10px !important; /* Malo manjša pisava za kompakten videz */
  font-weight: 700 !important;
  line-height: 1 !important;
  text-transform: uppercase !important;

  /* Izgled */
  background-color: #dc2626 !important; /* Rdeča barva */
  color: white !important;
  border-radius: 4px !important; /* Enak radij kot ostali elementi */
  padding: 0 6px !important; /* Samo levo/desno, višina je fiksna */
  box-shadow: 0 1px 2px rgba(0,0,0,0.1) !important;
}

/* Skript skriva značko z style="display:none" ali "display: none" – obdržimo to */
.new-badge[style*="display:none"],
.new-badge[style*="display: none"] {
  display: none !important;
}

/* Značka na karticah (grid) – ohrani pozicijo v kotu */
.file-container.grid-view .item .new-badge {
  position: absolute !important;
  top: 10px !important;
  right: 10px !important;
  z-index: 10;
}

/* Značka v besedilu – samo poravnava s tekstom */
.new-badge.inline-badge {
  vertical-align: middle !important;
  margin: 0 6px !important; /* Malo prostora levo in desno */
  position: relative !important;
  top: -1px !important; /* Fina nastavitev, da sedi točno na sredini vrstice */
}

/* List view: značka NOVO v zgornjem desnem kotu vrstice (kot v gridu) */
.file-container.list-view .item {
  position: relative !important;
  padding-right: 60px !important;
}
.file-container.list-view .item .new-badge {
  position: absolute !important;
  top: 10px !important;
  right: 15px !important;
  margin: 0 !important;
}

.fav-btn { position: absolute; top: 10px; left: 10px; background: rgba(255,255,255,0.9); border: 1px solid #ddd; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 20; color: #ccc; font-size: 18px; transition: all 0.2s; }
.fav-btn:hover { transform: scale(1.1); color: var(--fav-color); border-color: var(--fav-color); }
.fav-btn.active { color: var(--fav-color); border-color: var(--fav-color); background: #fffbeb; }
.file-container.list-view .fav-btn {
  position: static;
  margin-left: auto;
  flex-shrink: 0;
  margin-right: 0;
  background: transparent;
  border: none;
  width: auto;
  height: auto;
}
.file-container.list-view .item-preview {
  flex-shrink: 0;
}

.skeleton-container { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top:20px; }
@media (max-width: 768px) { .skeleton-container { grid-template-columns: 1fr; } }
.skeleton { background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%); background-size: 200% 100%; animation: loading 1.5s infinite; border-radius: 8px; }
@keyframes loading { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.sk-card { height: 200px; border: 1px solid #eee; border-radius: 12px; }

.updates-banner { 
  background: #f0f9ff; 
  border: 1px solid #bae6fd; 
  border-left: 4px solid #0284c7; 
  border-radius: 8px; 
  margin-top: 12px;
  margin-bottom: 30px; 
  font-size: 14px; 
  overflow: hidden;
}
.updates-accordion-header {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  max-height: 50px;
  padding: 0 15px;
  background: #e8f4fc;
  border: none;
  border-bottom: 1px solid #bae6fd;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #075985;
  text-align: left;
  transition: background 0.2s;
}
.updates-accordion-header:hover {
  background: #d6eef9;
}
.updates-accordion-header:focus-visible {
  outline: 2px solid #0284c7;
  outline-offset: 2px;
}
.updates-accordion-icon { font-size: 18px; flex-shrink: 0; }
.updates-accordion-title { flex-grow: 1; }
.updates-accordion-chevron {
  flex-shrink: 0;
  font-size: 12px;
  transition: transform 0.25s ease;
  color: var(--text-secondary);
}
.updates-banner.is-open .updates-accordion-chevron {
  transform: rotate(-180deg);
}
.updates-banner.is-open .updates-accordion-header {
  border-bottom-color: #bae6fd;
}
.updates-badge {
  background: #0284c7;
  color: white;
  font-size: 12px;
  font-weight: 600;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.updates-accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  background: #f0f9ff;
  margin: 0;
  padding: 0;
  min-height: 0;
}
.updates-banner.is-open .updates-accordion-body {
  max-height: 600px;
  transition: max-height 0.35s ease-in;
  padding: 0 0 15px 0;
}
.updates-accordion-body .updates-list,
.updates-accordion-body .show-more-btn,
.updates-accordion-body > p {
  padding-left: 15px;
  padding-right: 15px;
}
.updates-accordion-body #lastUpdateDate {
  padding: 12px 15px 0;
}
.updates-list { 
  margin: 0; 
  padding-top: 0;
  padding-bottom: 0;
  color: var(--text-primary); 
  margin-bottom: 10px; 
  list-style: none;
}

.updates-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  padding: 4px 0;
}

.updates-list li > span:first-child {
  flex-grow: 1;
  cursor: pointer;
}

.updates-list li > span:last-child {
  white-space: nowrap;
  text-align: right;
  font-size: 13px;
  color: var(--text-secondary);
  flex-shrink: 0;
  min-width: fit-content;
}

.show-more-btn { background: transparent; color: #0284c7; border: none; cursor: pointer; font-size: 13px; font-weight: 600; padding: 0; text-align: left; }
.show-more-btn:hover { text-decoration: underline; }

#pdfModal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.85); z-index: 2000; flex-direction: column; }
.viewer-toolbar { height: 60px; background: #111; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; color: white; }
.viewer-title { font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 50%; }
.viewer-iframe { width: 100%; flex-grow: 1; border: none; background: #eee; }
.btn-viewer { background: #333; color: white; border: 1px solid #555; padding: 8px 16px; border-radius: 6px; cursor: pointer; text-decoration: none; font-size: 14px; margin-left: 10px; }
.btn-viewer:hover { background: #555; }
.btn-viewer.primary { background: var(--primary); border-color: var(--primary); }

/* Obvestilo ob prenosu datoteke (DWG, Excel) */
.download-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary, #0d9488);
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  z-index: 1500;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.download-toast.visible { opacity: 1; }

.footer { 
  text-align: center; 
  padding: 30px 20px; 
  color: var(--text-secondary); 
  font-size: 13px; 
  margin-top: auto; 
  border-top: 1px solid var(--border); 
}

.footer a { 
  color: var(--text-secondary); 
  text-decoration: none; 
  font-weight: 500; 
}

.footer a:hover { 
  text-decoration: underline; 
  color: var(--primary); 
}

@media (max-width: 480px) {
  .footer { padding: 20px 15px; font-size: 12px; }
}

.copy-btn { transition: all 0.2s; }
.copy-btn:hover { background: #e5e7eb !important; transform: scale(1.05); }

/* Po uspešnem kopiranju: zelena ikona (kljukica), brez overlay */
.copy-btn.copied-success {
  color: var(--success) !important;
  background: rgba(5, 150, 105, 0.12) !important;
}
.copy-check-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: bold;
  line-height: 1;
}

/* --- IKONA ZA KOPIRANJE --- */
.copy-icon-custom {
  width: 22px;
  height: 22px;
  cursor: pointer;
  transition: transform 0.1s ease;
}

.copy-icon-custom:active {
  transform: scale(0.9);
}

/* Loading indikator */
.loading-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.loading-dots {
  display: inline-flex;
  gap: 2px;
}

.loading-dots span {
  animation: loading-dot 1.4s infinite ease-in-out;
  animation-delay: calc(var(--i) * 0.2s);
}

.loading-dots span:nth-child(1) { --i: 0; }
.loading-dots span:nth-child(2) { --i: 1; }
.loading-dots span:nth-child(3) { --i: 2; }

@keyframes loading-dot {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1); }
}

.search-section { 
  margin-top: 20px;
  margin-bottom: 20px; 
}

@media (max-width: 480px) {
  .search-section { margin-bottom: 15px; }
}

.search-results-grid { 
  display: grid; 
  grid-template-columns: 1fr 1fr; 
  gap: 20px; 
  margin-top: 15px; 
  align-items: start;
}

.search-results-grid.search-results-single-col {
  grid-template-columns: 1fr;
}

.search-results-grid > div {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.search-results-grid .search-results-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Real spacing for documentation result cards in current layout */
#searchResultsWrapper .search-results-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Skupni gumb Pokaži več / Pokaži manj – pod obema stolpcema, centriran */
.search-results-show-more-wrap {
  text-align: center;
  margin-top: 24px;
  margin-bottom: 16px;
}
.search-results-show-more-wrap.shared-search-more {
  flex: 1 1 100%;
  width: 100%;
}
.search-results-show-more-wrap .show-more-results-btn {
  display: inline-block;
}
.show-more-results-btn {
  background: transparent;
  border: none;
  color: var(--primary);
  font-size: 13px;
  cursor: pointer;
  padding: 8px 0;
  margin: 0;
  text-align: center;
  transition: opacity 0.2s;
}
.show-more-results-btn:hover {
  opacity: 0.85;
  text-decoration: underline;
}

/* Glave sekcij - enaka višina za poravnavo začetka rezultatov (Y os) */
.search-results-grid .search-section-header {
  min-height: 100px;
  margin-bottom: 0;
}

.search-results-grid .search-section-header h3 {
  margin-bottom: 12px;
  margin-top: 0;
  font-size: 15px;
  font-weight: 600;
}

.search-results-grid .search-section-header p {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 15px;
  line-height: 1.5;
}

/* Kartice rezultatov - poenotena višina */
.search-item-card {
  min-height: 80px;
  padding: 15px;
  display: flex;
  align-items: center;
  gap: 15px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card-bg);
  transition: all 0.2s;
  margin-bottom: 0;
  cursor: pointer;
}

/* Izjema za kartice, ki niso klikljive (samo gumb za kopiranje) */
.search-item-card[style*="cursor: default"] {
  cursor: default !important;
}

.search-item-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.search-item-card .item-preview {
  width: 50px;
  height: 50px;
  border-radius: 6px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
}

.search-item-card .item-info {
  flex-grow: 1;
  min-width: 0;
  overflow: hidden;
}

.search-item-card .item-info strong {
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
  line-height: 1.3;
}

.search-item-card .item-info small {
  display: block;
  line-height: 1.4;
  word-wrap: break-word;
  color: var(--text-secondary);
  font-size: 12px;
}

.search-page-buttons-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.search-page-btn {
  background: #f0f0f0;
  border: 1px solid var(--border, #ddd);
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  color: var(--text-primary, #333);
  text-align: left;
  width: 100%;
  line-height: 1.35;
}

.search-page-btn b {
  font-weight: 600;
  color: var(--text-primary, #333);
}

.search-page-btn-title {
  font-weight: normal;
}

.search-page-btn:hover {
  background: var(--bg-secondary, #e8e8e8);
  border-color: var(--primary, #0066cc);
}

.search-item-card .copy-btn,
.search-item-card .item-arrow {
  flex-shrink: 0;
  margin-left: 10px;
}

.search-item-card .item-arrow {
  color: var(--text-secondary);
  font-size: 18px;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.search-item-card:hover .item-arrow {
  opacity: 1;
  color: var(--primary);
}

@media (max-width: 1024px) {
  .search-results-grid { gap: 15px; }
}

@media (max-width: 768px) { 
  .search-results-grid { 
    grid-template-columns: 1fr !important; 
    gap: 15px;
  } 
}

@media (max-width: 480px) {
  .search-results-grid { gap: 10px; margin-top: 10px; }
  .search-item-card {
    min-height: 70px;
    padding: 12px;
    gap: 12px;
  }
  .search-item-card .item-preview {
    width: 45px;
    height: 45px;
    font-size: 20px;
  }
}

#authMsg { margin-top: 15px; text-align: center; font-size: 14px; font-weight: 500; }
.error-msg { color: var(--error); }
.success-msg { color: var(--success); }
.info-box { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 8px; padding: 16px; margin-bottom: 24px; color: #166534; font-size: 14px; }
.contact-section { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--border); text-align: center; }
.contact-text { font-size: 14px; color: var(--gray); margin-bottom: 12px; }

/* --- LOGIN CARD (centrirana kartica) --- */
.login-card-center {
  max-width: 500px;
  width: calc(100% - 80px);
  margin: 120px auto 40px auto;
  padding: 40px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  border: 1px solid var(--border);
}

@media (max-width: 768px) {
  .login-card-center {
    margin-top: 100px;
    width: calc(100% - 40px);
    padding: 30px;
  }
}

@media (max-width: 480px) {
  .login-card-center {
    margin-top: 85px;
    width: calc(100% - 30px);
    padding: 25px;
    border-radius: 12px;
  }
}

/* notranji layout login kartice, da vsebina ni preširoka */
.login-card-center .login-inner {
  max-width: 420px;
  margin: 0 auto;
}

/* Zavihki prijave (Obstoječi / Nov uporabnik) */
.auth-tabs {
  display: flex;
  gap: 0;
  margin: 20px 0 24px 0;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-secondary, #f1f5f9);
  padding: 4px;
}
.auth-tab {
  flex: 1;
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  background: transparent;
  color: var(--text-secondary, #64748b);
  transition: background 0.2s, color 0.2s;
}
.auth-tab:hover {
  background: rgba(0,0,0,0.05);
  color: var(--text-primary, #1e293b);
}
.auth-tab.active {
  background: var(--primary, #dc2626);
  color: white;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.35);
}
.auth-section {
  display: block;
}
.auth-section[aria-hidden="true"] {
  display: none !important;
}
.auth-note {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 16px 0;
}

/* --- SIDEBAR & LAYOUT (Centriran design) --- */

/* Zunanji wrapper - zagotavlja prostor pod headerjem */
.app-wrapper {
  padding-top: 90px;
  min-height: 100vh;
}

@media (max-width: 768px) {
  .app-wrapper { padding-top: 80px; }
}

@media (max-width: 480px) {
  .app-wrapper { padding-top: 70px; }
}

/* Glavni kontejner - centriran z max-width */
.app-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 30px 40px;
  display: flex;
  gap: 30px;
  align-items: flex-start;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .app-container {
    padding: 20px;
    flex-direction: column;
    gap: 20px;
  }
}

@media (max-width: 480px) {
  .app-container {
    padding: 15px;
  }
}

/* Sidebar - sticky kartica */
.sidebar {
  position: sticky;
  top: 110px; /* header (90px) + 20px lufta */
  width: 280px;
  min-width: 280px;
  max-height: calc(100vh - 130px);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.05);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
  border-radius: 16px 16px 0 0;
}

.sidebar-nav {
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
}

.sidebar-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
  padding: 8px 20px;
  margin-bottom: 5px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.sidebar-link:hover {
  background: var(--bg-secondary);
  color: var(--primary);
}

.sidebar-link.active {
  background: var(--bg-secondary);
  color: var(--primary);
  border-left-color: var(--primary);
}

.sidebar-icon {
  font-size: 16px;
}

.sidebar-favorites {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 20px;
}

.sidebar-fav-list {
  display: flex;
  flex-direction: column;
}

.sidebar-fav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.sidebar-fav-item:hover {
  background: var(--bg-secondary);
  color: var(--primary);
  border-left-color: var(--fav-color);
}

.sidebar-fav-item .fav-icon {
  color: var(--fav-color);
  font-size: 14px;
}

.sidebar-fav-item .fav-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-fav-item .fav-remove {
  opacity: 0;
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  padding: 4px;
  transition: all 0.2s;
}

.sidebar-fav-item:hover .fav-remove {
  opacity: 1;
}

.sidebar-fav-item .fav-remove:hover {
  color: var(--error);
}

.sidebar-empty {
  padding: 15px 20px;
  color: var(--text-secondary);
  font-size: 13px;
  font-style: italic;
}

/* Main content - zapolni preostali prostor */
.main-content {
  flex: 1;
  width: 100% !important;
  min-width: 0;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.main-content .card {
  width: 100% !important;
  box-sizing: border-box;
  padding-top: 0;
}

/* Responsive - prilagodi sidebar na manjših zaslonih */
@media (max-width: 1200px) {
  .sidebar {
    width: 240px;
    min-width: 240px;
  }
}

@media (max-width: 1024px) {
  .sidebar {
    width: 220px;
    min-width: 220px;
  }
}

@media (max-width: 768px) {
  .sidebar {
    display: none;
  }
  .main-content .card {
    padding: 30px;
  }
}

@media (max-width: 480px) {
  .main-content .card {
    padding: 20px;
    border-radius: 12px;
  }
}

/* =====================================================
   MAPE (folder-item) - samo razlike v barvah, struktura je enaka kot datoteke
   ===================================================== */
/* Mape: bela barva predogleda namesto sive */
.file-container.grid-view .item.folder-item .item-preview {
  background-color: #fff;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
/* Mape: rumeno ozadje za info del */
.file-container.grid-view .item.folder-item .item-info {
  background-color: #fffbeb;
  border-top: 1px solid rgba(0,0,0,0.03);
}
/* Mape: hover efekt */
.file-container.grid-view .item.folder-item:hover {
  border-color: #fbbf24;
}
.file-container.grid-view .item.folder-item:hover .item-info {
  background-color: #fef3c7;
}
