body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f6f9;
}

/* ===== LAYOUT ===== */

.layout {
    display: flex;
    min-height: 100vh;
}

/* ===== SIDEBAR ===== */

.sidebar {
    width: 220px;
    background: #1f4e79;
    color: white;
    display: flex;
    flex-direction: column;
}

.logo-box {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.logo {
    height: 60px;
}

/* ===== MENU ===== */

.sidebar-menu {
    display: flex;
    flex-direction: column;
}

.sidebar-menu a {
    color: white;
    text-decoration: none;
    padding: 14px 20px;
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-menu a:hover {
    background: #163a5c;
}

/* ===== MAIN ===== */

.main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ===== TOPBAR ===== */

.topbar {
    background: white;
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
}

.system-title {
    font-weight: bold;
    font-size: 18px;
    color: #1f4e79;
}

.topbar-right {
    display: flex;
    gap: 10px;
    font-weight: 600;
}

.topbar-right a {
    text-decoration: none;
    color: #1f4e79;
}

.topbar-right a:hover {
    text-decoration: underline;
}

/* ===== CONTENT ===== */

.content {
    padding: 25px;
}

/* ===== CARDS ===== */

.card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.card-header {
    font-weight: bold;
    background: #cfe2f3;
    padding: 8px 12px;
    margin: -20px -20px 15px -20px;
}

/* ===== DASHBOARD CARDS ===== */

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.card-red {
    border-left: 5px solid #ef4444;
}

.card-blue {
    border-left: 5px solid #3b82f6;
}

.card-green {
    border-left: 5px solid #10b981;
}

.card-orange {
    border-left: 5px solid #f59e0b;
}

.card-purple {
    border-left: 5px solid #8b5cf6;
}

/* ===== TABLES ===== */

.table-custom {
    width: 100%;
    border-collapse: collapse;
}

.table-custom th {
    background: #cfe2f3;
    padding: 10px;
    text-align: left;
}

.table-custom td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

.table-custom tr:hover {
    background: #f5f8fb;
}

/* ===== FORMS ===== */

input,
select,
textarea {
    width: 100%;
    padding: 7px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.form-group {
    margin-bottom: 12px;
}

/* ===== BUTTONS ===== */

button {
    background: #1f4e79;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background: #163a5c;
}

select {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    margin-bottom: 15px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 14px;
    background: white;
}

/* =========================
DASHBOARD
========================= */

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.dashboard-cards .card {
    text-align: center;
    padding: 20px;
    border-radius: 8px;
}

.dashboard-cards .card h3 {
    margin-bottom: 10px;
    font-size: 16px;
}

.dashboard-cards .card p {
    font-size: 28px;
    font-weight: bold;
}

/* KOLORY KART */

.card-red {
    background: #ffe5e5;
}

.card-blue {
    background: #e6f0ff;
}

.card-green {
    background: #e6ffe6;
}

.card-orange {
    background: #fff2e6;
}

.card-purple {
    background: #f0e6ff;
}

/* =========================
   STATUS BADGES (PL / DE)
========================= */

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    color: white;
}

/* 🟢 OK / AKTYWNY */
.badge-success {
    background-color: #28a745;
}

/* 🟡 OSTRZEŻENIE */
.badge-warning {
    background-color: #ffc107;
    color: black;
}

/* 🔴 BŁĄD / KRYTYCZNE */
.badge-danger {
    background-color: #dc3545;
}

/* 🔵 INFORMACJA */
.badge-info {
    background-color: #0d6efd;
}

.flash-success {
    background: #d4edda;
    color: #155724;
    padding: 10px;
    margin-bottom: 10px;
    border-left: 5px solid #28a745;
}

.flash-error {
    background: #f8d7da;
    color: #842029;
    padding: 10px;
    margin-bottom: 10px;
    border-left: 5px solid #dc3545;
}

.flash-info {
    background: #e2e3e5;
    color: #41464b;
    padding: 10px;
    margin-bottom: 10px;
    border-left: 5px solid #6c757d;
}