/* GLOBALNE */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Roboto', sans-serif;
    background-color: #f4f6f8;
    color: #333;
    min-height: 100vh;
}

/* PASEK NAWIGACYJNY (APP BAR) */
.navbar {
    background-color: #1a237e;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    height: 64px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.navbar-left {
    display: flex;
    align-items: center;
    font-size: 20px;
    font-weight: 500;
}
.navbar-left .material-icons { margin-right: 12px; font-size: 24px; }

.navbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}
.nav-item {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    opacity: 0.9;
    transition: opacity 0.2s;
    text-decoration: none; /* Usunięcie podkreślenia z linków */
    color: white;
}
.nav-item:hover, .nav-item.active { opacity: 1; text-decoration: none; color: white;}
.nav-item .material-icons { margin-right: 6px; font-size: 18px; }

.btn-logout {
    background-color: #d32f2f;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 500;
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 13px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.btn-logout .material-icons { font-size: 16px; margin-right: 6px; }

/* KONTENER GŁÓWNY */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* NAGŁÓWKI STRON */
.page-header { margin-bottom: 24px; }
.page-title {
    font-size: 24px;
    font-weight: 400;
    color: #1a237e;
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}
.page-title .material-icons { margin-right: 10px; font-size: 28px; }
.page-subtitle { color: #757575; font-size: 14px; }

/* KARTY DASHBOARDU */
.dashboard-cards { display: flex; gap: 24px; margin-top: 30px; }
.card {
    background: white;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    flex: 1;
    padding: 30px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.card-icon { font-size: 48px; margin-bottom: 16px; }
.card-icon.orange { color: #f57c00; }
.card-icon.green { color: #388e3c; }
.card-icon.red { color: #d32f2f; }
.card h3 { font-weight: 400; font-size: 18px; margin-bottom: 12px; color: #333; }
.card p { font-size: 12px; color: #757575; margin-bottom: 20px; flex-grow: 1; }

/* PRZYCISKI AKCJI */
.btn {
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    cursor: pointer;
    color: white;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    margin-bottom: 20px;
    text-decoration: none;
}
.btn .material-icons { font-size: 16px; margin-right: 6px; }
.btn-orange { background-color: #f57c00; }
.btn-green { background-color: #388e3c; }
.btn-red {
    background-color: #d32f2f;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-red:hover { background-color: #b71c1c; }
.btn-blue { background-color: #1976d2; }

/* TABELE */
.table-container {
    background: white;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    overflow: hidden;
}
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 16px; border-bottom: 1px solid #e0e0e0; font-size: 13px; }
th { background-color: #f9f9f9; color: #757575; font-weight: 500; }
.empty-table { text-align: center; color: #9e9e9e; padding: 30px; font-style: italic; }

/* Elementy widoczne tylko dla admina */
/* BADGE (Etykiety ról) */
.badge {
    padding: 4px 8px;
    border-radius: 2px;
    color: white;
    font-size: 11px;
    font-weight: 500;
    text-transform: lowercase;
}
.badge-user { background-color: #1976d2; }
.badge-admin { background-color: #d32f2f; }

/* MAŁE PRZYCISKI W TABELI */
.btn-icon-small {
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin-right: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.btn-icon-small .material-icons { font-size: 16px; }
.status-icon { color: #9e9e9e; font-size: 20px; }

/* KARTY FOLDERÓW */
.folder-grid { display: flex; gap: 20px; }
.folder-card {
    background: white;
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 200px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}
.folder-card .material-icons { font-size: 40px; color: #ffca28; margin-bottom: 10px; }
.folder-card span { font-size: 14px; color: #333; }

/* =========================================
   STYLE TYLKO DLA EKRANU LOGOWANIA
========================================= */

.login-page {
    display: flex;
    flex-direction: column;
}

.login-container {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    min-height: calc(100vh - 64px); /* Wysokość ekranu minus navbar */
}

.login-card {
    background: white;
    width: 100%;
    max-width: 480px;
    padding: 48px 40px;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    text-align: center;
}

.login-header { margin-bottom: 40px; }

.logo-icon-container {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px solid #1a237e;
    margin-bottom: 16px;
}

.logo-icon-container .material-icons { font-size: 36px; color: #1a237e; }
.login-title { font-size: 22px; color: #5c6b79; font-weight: 400; margin-bottom: 8px; }
.login-subtitle { font-size: 14px; color: #9e9e9e; }

/* Formularz wewnątrz karty logowania */
.form-group { position: relative; margin-bottom: 30px; }
.form-group .material-icons {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    color: #757575;
    font-size: 20px;
}

.form-group input {
    width: 100%;
    padding: 10px 10px 10px 36px;
    border: none;
    border-bottom: 1px solid #bdbdbd;
    font-size: 14px;
    font-family: inherit;
    color: #333;
    background: transparent;
    transition: border-bottom-color 0.3s;
    outline: none;
}
.form-group input:focus { border-bottom: 2px solid #1a237e; }
.form-group input::placeholder { color: #9e9e9e; }

.checkbox-group {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
    color: #757575;
    font-size: 14px;
}
.checkbox-group input[type="checkbox"] { margin-right: 8px; width: 16px; height: 16px; cursor: pointer; }

/* Duży przycisk logowania */
.btn-login {
    background-color: #1a237e;
    color: white;
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 2px;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    transition: background-color 0.3s, box-shadow 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    letter-spacing: 0.5px;
}
.btn-login:hover { background-color: #0d1452; box-shadow: 0 4px 8px rgba(0,0,0,0.3); }
.btn-login .text { flex-grow: 1; text-align: center; padding-left: 24px; }
.btn-login .material-icons { font-size: 20px; position: absolute; right: 16px; }

/* =========================================
   MODAL (Okno dialogowe)
   ========================================= */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}
.modal-overlay.active {
    display: flex;
}
.modal {
    background: white;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    width: 100%;
    max-width: 480px;
    padding: 32px;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}
.modal-title {
    font-size: 20px;
    font-weight: 500;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}
.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #757575;
}
.modal-close:hover { color: #333; }

.modal-form .form-group {
    margin-bottom: 20px;
    position: relative;
}
.modal-form .form-group label {
    display: block;
    font-size: 12px;
    color: #757575;
    margin-bottom: 6px;
    text-transform: uppercase;
    font-weight: 500;
}
.modal-form .form-group input,
.modal-form .form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    color: #333;
    transition: border-color 0.2s;
    outline: none;
}
.modal-form .form-group input:focus,
.modal-form .form-group select:focus {
    border-color: #1a237e;
}
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}
.btn-secondary {
    background-color: #e0e0e0;
    color: #333;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    cursor: pointer;
}
.btn-primary {
    background-color: #1a237e;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    cursor: pointer;
}
.btn-primary:hover { background-color: #0d1452; }

.alert {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 16px;
    font-size: 13px;
    display: none;
}
.alert-error {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}
.alert-success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

/* ============ FILES MODULE ============ */
.files-toolbar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}
.files-toolbar .btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.files-toolbar .btn-green { background: #43a047; }
.files-toolbar .btn-green:hover { background: #388e3c; }
.files-toolbar .btn-blue { background: #1e88e5; }
.files-toolbar .btn-blue:hover { background: #1565c0; }

.breadcrumb {
    margin-bottom: 16px;
    font-size: 14px;
    color: #b0b0b0;
}
.breadcrumb-item {
    cursor: pointer;
    color: #1976d2;
    transition: color 0.2s;
}
.breadcrumb-item:hover {
    color: #0d47a1;
    text-decoration: underline;
}
.breadcrumb-sep {
    color: #666;
    margin: 0 4px;
}

.folder-row {
    cursor: pointer;
    background: rgba(255,202,40,0.05);
}
.folder-row:hover {
    background: rgba(255,202,40,0.12);
}
.file-row {
    cursor: pointer;
}
.file-row:hover {
    background: rgba(255,255,255,0.04);
}

.btn-icon-small {
    background: transparent;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-icon-small:hover {
    background: rgba(0,0,0,0.05);
}
.btn-delete:hover {
    color: #d32f2f;
}

.empty-table {
    text-align: center;
    color: #888;
    padding: 32px;
}

.btn-view:hover {
    color: #1976d2;
}
.btn-download:hover {
    color: #388e3c;
}
