/* zawężone do widoku Repozytoria (w lista.html: *) */
.widok-repozytoria,
.widok-repozytoria * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* zawężone do widoku Repozytoria (w lista.html: body) */
.widok-repozytoria {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  /* padding: 20px; */
}

/* widok wypełnia obszar treści pod paskiem i menu (odstęp 10px daje .tresc-zakladki) */
.widok-repozytoria:not([hidden]) {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

/* przy widoku Repozytoria obszar treści bez górnego odstępu — .sticky-header przylega do górnej krawędzi */
/* pionowy pasek przewijania zawsze widoczny — zmiana długości listy (wyszukiwanie) nie przesuwa układu */
.tresc-zakladki:has(> .widok-repozytoria:not([hidden])) {
  padding-top: 0;
  overflow-y: scroll;
}

/* na całą szerokość i wysokość widoku — w lista.html: max-width 1200px i wyśrodkowanie */
.container {
  flex: 1;
  width: 100%;
}

/* Sticky Header */
.sticky-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #f5f5f5;
}

.sort-controls {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* wysokość 32px — równa polu wyszukiwania (.wyszukiwarka-repozytoriow) */
.sort-label {
  display: inline-flex;
  align-items: center;
  height: 32px;
  cursor: pointer;
  padding: 0 12px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  color: #666;
  background: var(--kolor-tla);
  border: 1px solid var(--kolor-ramki);
  transition: all 0.2s;
  user-select: none;
  white-space: nowrap;
  /* fala kliknięcia (.fala-klikniecia) rysowana w obrębie labelki */
  position: relative;
  overflow: hidden;
}

.sort-label:hover {
  background: #e0e0e0;
  color: #444;
}

.sort-label[data-order="asc"] {
  background: #e8eff5;
  color: #4a4a4a;
}

.sort-label[data-order="desc"] {
  background: #f5e8ff;
  color: #7a5d8c;
}

.sort-arrow {
  margin-left: 6px;
  font-size: 14px;
}

.sort-label[data-order="none"] .sort-arrow {
  display: none;
}

.sort-label[data-order="asc"] .sort-arrow::after {
  content: '⬆';
}

.sort-label[data-order="desc"] .sort-arrow::after {
  content: '⬇';
}

/* pasek jak nagłówek listy plików w Kompilacjach:
   filtry autora/kontrahenta po lewej | wyszukiwarka, sortowanie i licznik obok siebie dosunięte do prawej */
.stats {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 360px) auto auto auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 5px;
  padding: 12px 20px;
  font-size: 13px;
  color: #666;
  white-space: nowrap;
  background: var(--kolor-tla);
  border-radius: 4px;
}

.filtry-listy-repozytoriow {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.wyszukiwarka-repozytoriow {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 8px;
  color: var(--kolor-tekstu-szary);
  background: var(--kolor-tla);
  border: 1px solid var(--kolor-ramki);
  border-radius: var(--promien);
}

.pole-wyszukiwania-repozytorium {
  flex: 1;
  min-width: 0;
  font: inherit;
  color: var(--kolor-tekstu);
  background: transparent;
  border: none;
  outline: none;
}

#statsAuthor {
  font-weight: 600;
  color: #6c9a7f;
  background: #d4edda;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

#statsAuthor:hover {
  background: #c3e3d0;
  text-decoration: line-through;
}

#statsKontrahent {
  font-weight: 600;
  color: #5a7a4a;
  background: #ddecd4;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

#statsKontrahent:hover {
  background: #c8dfc0;
  text-decoration: line-through;
}

/* licznik aplikacji — jak statystyki w Kompilacjach: szary tekst, pogrubione liczby */
#statsCount {
  justify-self: end;
  width: 120px;
  text-align: right;
  font-size: 12px;
  color: var(--kolor-tekstu-szary);
}

#statsCount strong {
  color: var(--kolor-tekstu);
}

/* Loading */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding: 40px;
  background: white;
  border-radius: 4px;
  border: 1px solid #e0e0e0;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e8e8e8;
  border-top: 3px solid #a8a8a8;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Error Message */
.error-message {
  background: #f8d7da;
  color: #8b5a5c;
  padding: 16px;
  border-radius: 4px;
  margin-bottom: 20px;
  border-left: 3px solid #d9a3a7;
}

/* Results Container */
.results-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Repository Item (Card) */
.repo-item {
  background: white;
  border-radius: 4px;
  padding: 16px;
  border: 1px solid #e0e0e0;
  border-left: 3px solid #c8d6e5;
  transition: background 0.2s;
}

.repo-item:hover {
  background: #fafafa;
}

.repo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.repo-path {
  font-size: 14px;
  font-weight: 500;
  color: #4a4a4a;
  word-break: break-all;
  flex: 1;
}

/* wrapper grupujący badge typu i przycisk JSON */
.repo-header-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* badge zatwierdzony na kafelku */
.repo-badge-zatwierdzony {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  background: #d4edda;
  color: #3a7a4e;
  border: 1px solid #b0d9bf;
  letter-spacing: 0.3px;
}

/* badge dla aplikacji z usuniętym katalogiem na dysku */
.repo-badge-usunieta {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  background: #f8d7da;
  color: #842029;
  border: 1px solid #f1aeb5;
  letter-spacing: 0.5px;
}

/* przycisk podglądu JSON */
.repo-json-btn {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  background: #e8e8e8;
  color: #555;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
  font-family: monospace;
}

.repo-json-btn:hover {
  background: #d0d0d0;
  color: #333;
  transform: scale(1.05);
}

/* TYMCZASOWO: przycisk trwałego usunięcia repozytorium na karcie */
.repo-usun-trwale {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  color: #ffffff;
  background: var(--kolor-czerwony);
  cursor: pointer;
}

.repo-info {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 12px;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.info-label {
  font-weight: 500;
  color: #888;
  font-size: 12px;
}

.info-value {
  color: #222;
  font-size: 13px;
  font-weight: 600;
}

.branches {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid #f0f0f0;
  align-items: center;
}

.branch-tag {
  background: #e8eff5;
  color: #6b7d8c;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 400;
  cursor: pointer;
  transition: background 0.15s;
}

.branch-tag:hover {
  background: #ccd9e4;
}

.authors {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid #f0f0f0;
  align-items: center;
}

.author-tag {
  background: #f5e8ff;
  color: #7a5d8c;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 400;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: background 0.2s;
}

.author-tag:hover {
  background: #e8d4f5;
}

.commit-badge {
  background: #7a5d8c;
  color: white;
  padding: 1px 5px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
}

.section-label {
  font-size: 16px;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  margin-right: 8px;
}

.branches-refresh {
  cursor: pointer;
  user-select: none;
  transition: color 0.15s;
}

.branches-refresh:hover {
  color: #4a9a5a;
}

/* Highlight for search results */
.highlight {
  background-color: #ffeb3b;
  color: #000;
  font-weight: 600;
  padding: 1px 2px;
  border-radius: 2px;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 50px 20px;
  background: white;
  border-radius: 4px;
  border: 1px solid #e0e0e0;
}

.empty-state h2 {
  color: #7a7a7a;
  margin-bottom: 10px;
  font-weight: 500;
  font-size: 18px;
}

.empty-state p {
  color: #aaa;
  font-size: 14px;
}

/* Dodatkowe notatki */
.dodatkowe-notatki {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid #f0f0f0;
  align-items: center;
}

.dodatkowe-notatki-add-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: #e8f5e9;
  color: #4caf50;
  border-radius: 50%;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dodatkowe-notatki-add-icon:hover {
  background: #4caf50;
  color: white;
  transform: scale(1.1);
}

.dodatkowe-notatki-tag {
  background: #fff3e0;
  color: #f57c00;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 400;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.dodatkowe-notatki-tag:hover {
  background: #ffe0b2;
}

/* Kontrahent */
.kontrahent-section {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid #f0f0f0;
  align-items: center;
}

.kontrahent-add-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: #e3f0fb;
  color: #1976d2;
  border-radius: 50%;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.kontrahent-add-icon:hover {
  background: #1976d2;
  color: white;
  transform: scale(1.1);
}

.kontrahent-tag {
  background: #e3f0fb;
  color: #1565c0;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 400;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.kontrahent-tag:hover {
  background: #bbdefb;
}

.kontrahent-koszt {
  font-size: 10px;
  font-weight: 600;
  color: #2e7d32;
  background: #e8f5e9;
  border-radius: 3px;
  padding: 1px 5px;
}

.notatka-badge {
  background: #ff9800;
  color: white;
  padding: 1px 5px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  margin-left: 6px;
}

/* Popup */
/* Popup wysuwany z LEWEJ strony (podgląd pliku) */
.popup-overlay-left {
  position: fixed;
  top: 0;
  left: -50%;
  width: 50%;
  height: 100%;
  z-index: 1001; /* wyżej niż popup-overlay (1000) */
  pointer-events: none;
  transition: left 0.3s ease;
}

.popup-overlay-left.active {
  left: 0;
  pointer-events: all;
}

.popup-overlay-left .popup-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  right: auto;
  /* ukryte okno bez cienia — inaczej cień z .popup-container wystaje wzdłuż lewej krawędzi przeglądarki */
  box-shadow: none;
  /* stan poprzedni: cień zawsze, także przy ukrytym oknie — wystawał wzdłuż lewej krawędzi przeglądarki; powrót: odkomentuj poniższą linię i usuń box-shadow z .popup-overlay-left.active .popup-container */
  /* box-shadow: 2px 0 10px rgba(0,0,0,0.2); */
}

.popup-overlay-left.active .popup-container {
  right: auto;
  left: 0;
  box-shadow: 2px 0 10px rgba(0,0,0,0.2);
}

.popup-overlay {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  transition: right 0.3s ease;
}

.popup-overlay.active {
  right: 0;
}

.popup-container {
  position: absolute;
  top: 0;
  right: -50%;
  width: 50%;
  height: 100%;
  background: white;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  transition: right 0.3s ease, width 0.3s ease;
}

.popup-overlay.active .popup-container {
  right: 0;
}

/* Tryb pełnoekranowy popupa */
.popup-overlay.active .popup-container.fullscreen {
  width: 100%;
}

.popup-fullscreen {
  background: none;
  border: none;
  font-size: 18px;
  color: #666;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.popup-fullscreen:hover {
  color: #333;
}

.popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #e0e0e0;
  background: #f9f9f9;
}

.popup-header h3 {
  margin: 0;
  font-size: 18px;
  color: #333;
}

.popup-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.btn-edytuj {
  background: #90bde0; /* pastelowy niebieski */
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
  display: flex;
  align-items: center;
  gap: 5px;
}

.btn-edytuj:hover {
  background: #6fa8d0;
}

.btn-usun {
  background: #e08080;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-usun:hover {
  background: #c96060;
}

/* Modal potwierdzenia niezapisanych zmian */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 2000; /* wyżej niż popup */
  align-items: center;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  background: white;
  border-radius: 8px;
  padding: 28px 32px;
  min-width: 420px;
  max-width: 780px; /* poszerzone dla długich ścieżek i list stashów */
  width: 90vw;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-title {
  font-size: 17px;
  font-weight: 600;
  color: #333;
}

.modal-text {
  font-size: 14px;
  color: #555;
  line-height: 1.5;
  white-space: pre-wrap; /* renderuj \n jako nowe linie */
  font-family: monospace;
}

.modal-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.modal-btn {
  padding: 8px 20px;
  border-radius: 4px;
  border: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
}

.modal-btn-primary {
  background: #90bde0; /* pastelowy niebieski */
  color: white;
}

.modal-btn-primary:hover {
  background: #6fa8d0;
}

.modal-btn-secondary {
  background: #f0f0f0;
  color: #555;
}

.modal-btn-secondary:hover {
  background: #e0e0e0;
}

.modal-btn-back {
  background: #f5f0e8; /* pastelowy beżowy */
  color: #7a6a50;
  border: 1px solid #e0d5c0;
}

.modal-btn-back:hover {
  background: #ede5d5;
}

.modal-btn-danger {
  background: #e08080;
  color: white;
}

.modal-btn-danger:hover {
  background: #c96060;
}

/* Podgląd JSON w popupie */
.json-viewer-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 10px;
}

.json-search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: #f9f9f9;
  border-bottom: 1px solid #eee;
  flex-shrink: 0;
  position: sticky; /* przyklejony do góry */
  top: 0;
  z-index: 10;
}

.json-search-input {
  flex: 1;
  padding: 7px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}

.json-search-input:focus {
  border-color: #90bde0;
}

.json-search-info {
  font-size: 12px;
  color: #888;
  white-space: nowrap;
  min-width: 80px;
}

.json-content {
  flex: 1;
  margin: 0;
  padding: 16px;
  overflow-y: auto; /* scroll tylko w treści, nie w całym popupie */
  min-height: 0;
  font-size: 12px;
  font-family: 'Courier New', monospace;
  line-height: 1.6;
  color: #333;
  background: #fafafa;
  white-space: pre;
}

mark.json-highlight {
  background: #fff176;
  color: #333;
  border-radius: 2px;
  padding: 0 1px;
}

.popup-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #666;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.popup-close:hover {
  background: #e0e0e0;
  color: #333;
}

.popup-body {
  flex: 1;
  padding: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#podgladContainer {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#podgladContent {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto; /* scroll w środku, nie w zewnętrznym kontenerze */
  min-height: 0;
}

#formContainer {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto; /* włączany przez JS gdy brakuje miejsca */
  min-height: 0;
}

#formDodatkowe {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #333;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s ease;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: #4caf50;
}

.form-textarea {
  resize: none; /* wysokość ustawiana dynamicznie przez JS */
  min-height: 250px;
  box-sizing: border-box;
}

.btn-zapisz {
  background: #4caf50;
  color: white;
  border: none;
  padding: 8px 16px; /* mniejszy padding - przycisk w nagłówku */
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-zapisz:hover {
  background: #45a049;
}

.btn-zapisz:active {
  transform: scale(0.98);
}

/* Podgląd dodatkowych informacji - scroll obsługuje #podgladContent */
.podglad-item {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #f0f0f0;
}

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

.podglad-label {
  font-size: 12px;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.podglad-autor-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.podglad-date-relatywna {
  font-size: 12px;
  color: #aaa;
  cursor: default;
  white-space: nowrap;
  margin-left: 12px;
  flex-shrink: 0;
}

.podglad-value {
  font-size: 14px;
  color: #333;
  line-height: 1.6;
  word-wrap: break-word;
}

.podglad-value a {
  color: #2196f3;
  text-decoration: none;
}

/* Dropzone i załączniki */
.lista-zalacznikow {
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.zalacznik-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 8px 12px;
  background: #f5f5f5;
  border-radius: 4px;
  font-size: 13px;
}

.zalacznik-opis {
  width: 100%;
  font-size: 12px;
  color: #555;
  font-style: italic;
  padding: 4px 0 2px 28px;
  line-height: 1.4;
}

.zalacznik-opis-edit {
  width: 100%;
  padding: 3px 0 3px 28px;
}

.zalacznik-opis-input {
  width: 100%;
  border: none;
  border-bottom: 1px solid #ccc;
  background: transparent;
  font-size: 12px;
  color: #555;
  font-style: italic;
  outline: none;
  padding: 2px 4px;
  border-radius: 0;
  box-sizing: border-box;
}

.zalacznik-opis-input:focus {
  border-bottom-color: #2196f3;
  color: #333;
  font-style: normal;
}

.zalacznik-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

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

.zalacznik-name {
  color: #333;
  font-weight: 500;
}

.zalacznik-actions {
  display: flex;
  gap: 8px;
}

.zalacznik-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 4px 8px;
  transition: transform 0.2s ease;
}

.zalacznik-btn:hover {
  transform: scale(1.2);
}

.dropzone {
  border: 2px dashed #ccc;
  border-radius: 8px;
  padding: 30px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #fafafa;
}

.dropzone:hover {
  border-color: #2196f3;
  background: #f0f8ff;
}

.dropzone.dragging {
  border-color: #4caf50;
  background: #e8f5e9;
}

.dropzone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.dropzone-icon {
  font-size: 48px;
}

.dropzone-text {
  font-size: 14px;
  color: #666;
}

.podglad-value a:hover {
  text-decoration: underline;
}

/* Commit history clickable item */
.info-item-commits {
  cursor: pointer;
  transition: all 0.2s ease;
  /* delikatna ramka klikalnego pola — padding i margin jak w :hover, żeby najechanie nie zmieniało rozmiaru */
  padding: 6px;
  margin: -6px;
  border: 1px solid var(--kolor-ramki);
  border-radius: 6px;
  /* fala kliknięcia (.fala-klikniecia) rysowana w obrębie pola */
  position: relative;
  overflow: hidden;
}

.info-item-commits:hover {
  background: #e1e6eb;
  border-radius: 6px;
  padding: 6px;
  margin: -6px;
}

/* File list clickable item */
.info-item-files {
  cursor: pointer;
  transition: all 0.2s ease;
  /* delikatna ramka klikalnego pola — padding i margin jak w :hover, żeby najechanie nie zmieniało rozmiaru */
  padding: 6px;
  margin: -6px;
  border: 1px solid var(--kolor-ramki);
  border-radius: 6px;
  /* fala kliknięcia (.fala-klikniecia) rysowana w obrębie pola */
  position: relative;
  overflow: hidden;
}

.info-item-files:hover {
  background: #e1e6eb;
  border-radius: 6px;
  padding: 6px;
  margin: -6px;
}

/* fala (ripple) po kliknięciu pól "Commits" i "Pliki" oraz labelek sortowania — jak w przyciskach Vuetify; span wstawia repozytoria.js */
.fala-klikniecia {
  position: absolute;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.2);
  pointer-events: none;
  transform: scale(0);
  animation: fala-klikniecia 0.5s ease-out;
}

@keyframes fala-klikniecia {
  to {
    transform: scale(1);
    opacity: 0;
  }
}

/* File List Display */
.file-search-container {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #f1f8f4;
  border-radius: 8px;
  border-left: 4px solid #4caf50;
  flex-shrink: 0;
  margin-bottom: 16px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.file-search-input {
  flex: 1;
  padding: 10px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

.file-search-input:focus {
  outline: none;
  border-color: #4caf50;
}

.file-count {
  font-size: 13px;
  color: #666;
  font-weight: 500;
  white-space: nowrap;
}

.file-count span {
  color: #4caf50;
  font-weight: 600;
}

.file-list {
  flex: 1;
  overflow-y: auto;
  padding-right: 10px;
  min-height: 0;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 4px;
  transition: background 0.2s ease;
  cursor: default;
}

.file-item:hover {
  background: #f5f5f5;
}

.file-item.directory {
  font-weight: 500;
  color: #1976d2;
}

.file-item.file {
  color: #555;
}

.file-item.file:hover {
  background: #e8f0fe;
  color: #1a237e;
  cursor: pointer;
}

.file-content-pre {
  margin: 0;
  padding: 16px 20px;
  white-space: pre-wrap;
  word-break: break-all;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 12px;
  line-height: 1.6;
  background: #fff;
  color: #1e1e1e;
  min-height: 100%;
}

.file-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.file-name {
  font-size: 14px;
  word-break: break-all;
}

/* Commit History Display */
/* Commit search */
.commit-search-container {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #2196f3;
  flex-shrink: 0;
  margin-bottom: 16px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.commit-search-input {
  flex: 1;
  padding: 10px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

.commit-search-input:focus {
  outline: none;
  border-color: #2196f3;
}

.commit-count {
  font-size: 13px;
  color: #666;
  font-weight: 500;
  white-space: nowrap;
}

.commit-count span {
  color: #2196f3;
  font-weight: 600;
}

.commit-history-list {
  flex: 1;
  overflow-y: auto;
  padding-right: 10px;
  min-height: 0;
}

.commit-limit-warning {
  margin: 8px 0;
  padding: 8px 12px;
  background: #fff8e1;
  border-left: 3px solid #f9a825;
  border-radius: 4px;
  font-size: 13px;
  color: #795548;
  flex-shrink: 0;
}

/* Highlight znalezionego tekstu */
.highlight {
  background-color: #ffeb3b;
  color: #000;
  font-weight: 600;
  padding: 2px 0;
  border-radius: 2px;
}

.commit-item {
  display: flex;
  gap: 16px;
  margin-bottom: 0;
  position: relative;
}

.commit-item.merge-commit {
  background: #f0f8ff;
  border-radius: 4px;
  padding: 4px;
  margin-left: -4px;
}

.commit-graph {
  flex-shrink: 0;
  width: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.commit-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #2196f3;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px #2196f3;
  z-index: 2;
}

.merge-commit .commit-dot {
  background: #ff9800;
  box-shadow: 0 0 0 2px #ff9800;
}

.commit-line {
  width: 2px;
  flex: 1;
  background: linear-gradient(to bottom, #2196f3 0%, #64b5f6 100%);
  margin-top: 4px;
  min-height: 40px;
}

.commit-content {
  flex: 1;
  padding-bottom: 20px;
}

.commit-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.commit-hash {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  background: #e0e0e0;
  padding: 2px 6px;
  border-radius: 3px;
  color: #555;
  cursor: help;
}

.commit-merge-icon {
  font-size: 16px;
  cursor: help;
}

.commit-ref-tag,
.commit-ref-branch,
.commit-ref-head {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 500;
}

.commit-ref-tag {
  background: #fff3e0;
  color: #f57c00;
}

.commit-ref-branch {
  background: #e8f5e9;
  color: #4caf50;
}

.commit-ref-head {
  background: #e3f2fd;
  color: #2196f3;
  font-weight: 600;
}

.commit-message {
  display: flex;
  font-size: 14px;
  color: #333;
  /* margin-bottom: 8px; */
  line-height: 1.5;
  font-weight: 400;
}

.commit-message .commit-author {
  /* font-weight: 600; */
  color: #2196f3;
  margin-right: 8px;
}

.commit-header-row .commit-date {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #666;
  margin-left: auto;
}

.commit-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 12px;
  color: #666;
}

.commit-author,
.commit-date {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Responsive */
@media (max-width: 768px) {
  .sort-controls {
    width: 100%;
    justify-content: center;
  }

  .repo-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}