/* === Podstawowe style i reset === */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f4f7f6;
    color: #333;
    margin: 0;
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    border-radius: 8px;
}

/* === Nagłówek i Nawigacja === */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 20px;
}

header .logo a {
    text-decoration: none;
    color: #333;
}

header h1 {
    margin: 0;
    font-size: 24px;
}

nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    gap: 15px;
}

nav a {
    text-decoration: none;
    color: #007bff;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 5px;
    transition: background-color 0.2s;
}

nav a:hover, nav a.active {
    background-color: #e9ecef;
}

/* === Formularze === */
.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

input[type="text"],
input[type="password"],
input[type="date"],
input[type="number"],
input[type="file"],
textarea,
select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; /* Ważne, aby padding nie powiększał elementu */
    font-size: 16px;
}

textarea {
    resize: vertical;
    min-height: 80px;
}

.btn {
    display: inline-block;
    padding: 12px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.2s;
}

.btn:hover {
    background-color: #0056b3;
}

.btn-danger {
    background-color: #dc3545;
}
.btn-danger:hover {
    background-color: #c82333;
}

.btn-secondary {
    background-color: #6c757d;
}
.btn-secondary:hover {
    background-color: #5a6268;
}

/* === Alerty i komunikaty === */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

/* === Tabele === */
.table-container {
    overflow-x: auto; /* Umożliwia przewijanie tabeli na małych ekranach */
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

th {
    background-color: #f8f9fa;
    font-weight: bold;
}

tbody tr:hover {
    background-color: #f1f1f1;
}

.actions a {
    margin-right: 10px;
}

/* === Znaczniki (badges) === */
.badge {
    display: inline-block;
    padding: .35em .65em;
    font-size: .75em;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: .25rem;
}

.badge-success {
    color: #fff;
    background-color: #28a745;
}

.badge-danger {
    color: #fff;
    background-color: #dc3545;
}

.badge-warning {
    color: #212529;
    background-color: #ffc107;
}

.badge-secondary {
    color: #fff;
    background-color: #6c757d;
}

/* === Kolory tekstu === */
.positive {
    color: #28a745;
    font-weight: bold;
}
.negative {
    color: #dc3545;
    font-weight: bold;
}

/* === Panel główny (Dashboard) === */
.dashboard-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}
.stat-card {
    flex: 1;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    text-align: center;
}
.stat-card h3 {
    margin-top: 0;
    font-size: 18px;
    color: #6c757d;
}
.stat-card p {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 0;
}

/* === Stopka === */
footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
    color: #6c757d;
    font-size: 14px;
}