/* --- ZMIANA TUTAJ: Importujemy czcionkę "Inter" zamiast "Segoe UI" --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap');

body {
    /* --- ZMIANA TUTAJ: Używamy "Inter" jako domyślnej czcionki --- */
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f2f5;
    margin: 0;
    padding: 40px;
    color: #333;
}

.hidden {
    display: none;
}

/* Style dla ekranu logowania */
#login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f0f2f5;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.login-box {
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 300px;
}

.login-box i {
    font-size: 40px;
    color: #007bff;
    margin-bottom: 15px;
}

.login-box h2 {
    margin: 0 0 10px;
    font-size: 20px;
}

.login-box input {
    width: 100%;
    padding: 10px;
    margin: 15px 0;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-sizing: border-box;
}

.login-box button {
    width: 100%;
    padding: 10px;
    background: #007bff;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.login-box button:hover {
    background: #0056b3;
}

#login-error {
    margin: 12px 0 0;
    color: #dc3545;
    font-size: 13px;
    display: none;
}

.file-browser-container {
    max-width: 1000px;
    margin: auto;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden; /* Aby zaokrąglenie objęło też tabelę */
}

.breadcrumb {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #e9ecef;
    padding: 12px 20px;
    font-size: 16px;
    color: #495057;
    border-bottom: 1px solid #dee2e6;
}

.breadcrumb .fa-home {
    margin-right: 8px;
}

.breadcrumb-link {
    color: #495057;
    text-decoration: none;
    font-weight: 600;
}

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

.breadcrumb-sep {
    color: #adb5bd;
}

.toolbar {
    display: flex;
    justify-content: flex-end;
    padding: 8px 20px;
    border-bottom: 1px solid #f0f2f5;
    background-color: #ffffff;
}

.toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #495057;
    cursor: pointer;
    user-select: none;
}

.toggle input {
    transform: scale(1.1);
    cursor: pointer;
}

.file-table {
    width: 100%;
    border-collapse: collapse;
}

.file-table th, .file-table td {
    padding: 12px 20px;
    text-align: left;
    border-bottom: 1px solid #f0f2f5;
    vertical-align: middle;
}

/* Nagłówek tabeli */
.file-table thead {
    background-color: #f8f9fa;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

.file-table th {
    font-weight: 600;
    cursor: pointer;
    user-select: none; /* Zapobiega zaznaczaniu tekstu */
}

.file-table th:hover {
    background-color: #e9ecef;
}

.file-table th i {
    margin-left: 8px;
    color: #adb5bd;
    transition: color 0.2s ease-in-out;
}

/* Ukrywanie i pokazywanie ikon sortowania */
.file-table th .fa-sort-up, .file-table th .fa-sort-down {
    display: none;
}
.file-table th.sorted .fa-sort {
    display: none;
}
.file-table th.sorted.asc .fa-sort-up {
    display: inline-block;
    color: #007bff;
}
.file-table th.sorted.desc .fa-sort-down {
    display: inline-block;
    color: #007bff;
}


/* Wiersze tabeli */
.file-table tbody tr:hover {
    background-color: #f8f9fa;
}

.file-table td {
    font-size: 14px;
}

.file-table td a {
    color: #007bff;
    text-decoration: none;
    display: flex;
    align-items: center;
    line-height: 1.2;
}

.file-table td a:hover {
    text-decoration: underline;
}

.file-table td i {
    margin-right: 15px;
    font-size: 18px;
    width: 20px; /* Zapewnia równe odległości */
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    align-self: center;
    vertical-align: middle;
}

.fa-folder {
    color: #ffc107; /* Kolor folderu */
}

.fa-file-alt {
    color: #6c757d; /* Kolor pliku */
}

/* Wyrównanie kolumn Rozmiar i Data */
.file-table th:nth-child(2), .file-table td:nth-child(2),
.file-table th:nth-child(3), .file-table td:nth-child(3) {
    text-align: right;
    width: 160px;
}

.file-table td:nth-child(3),
.file-table th:nth-child(3) {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

#total-size-display {
    font-size: 14px;
    font-weight: 600;
    color: #6c757d;
}

/* Nowe style dla linku z nazwą pliku i hashem */
.file-link {
    display: flex;
    align-items: center;
}

.file-details {
    display: flex;
    flex-direction: column;
}

.file-hash {
    font-size: 12px;
    color: #6c757d;
    margin-top: 3px;
    margin-left: 35px; /* Dodajemy wcięcie, aby zrównać z nazwą pliku */
    font-family: monospace;
    word-break: break-all;
}

/* Zaktualizowane style dla komórki z plikiem */
.file-cell-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.folder-badge {
    margin-left: 10px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 600;
    color: #495057;
    background: #e9ecef;
    border-radius: 10px;
    white-space: nowrap;
}

.group-row {
    background-color: #f8f9fa;
}

.group-row:hover {
    background-color: #f1f3f5;
}

.group-cell {
    font-weight: 600;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 8px;
}

.group-toggle-btn {
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
    color: #007bff;
}

.group-toggle-btn i {
    margin-right: 6px;
}

.group-meta {
    margin-left: auto;
    font-weight: 500;
    font-size: 12px;
    color: #6c757d;
    white-space: nowrap;
}

.hidden-row {
    display: none;
}
