/* ========== Ogólne ========== */
body {
    background: #f6f6f6;
    color: #222;
    min-height: 100vh;
    transition: background 0.2s, color 0.2s;
}

/* ========== Sidebar ========== */
.sidebar {
    background: #f8f9fa;
    color: #222;
    min-height: 100vh;
    padding-top: 1rem;
    border-right: 1px solid #e3e6ee;
}
.sidebar a {
    color: #2d3541;
    text-decoration: none;
    display: block;
    padding: 10px 20px;
    transition: background 0.16s, color 0.13s;
}
.sidebar a.active, .sidebar a:hover {
    background: #e3e8f0;
    color: #1976d2;
    font-weight: 600;
}

/* Offcanvas (mobile sidebar) */
.offcanvas {
    width: 250px;
}
.offcanvas-body a {
    display: block;
    color: #2d3541;
    padding: 10px 0;
    text-decoration: none;
    transition: background 0.16s, color 0.13s;
}
.offcanvas-body a.active, .offcanvas-body a:hover {
    background: #e3e8f0;
    color: #1976d2;
    font-weight: 600;
}

/* ========== Main ========== */
main {
    min-height: 80vh;
    padding-bottom: 24px;
}

/* ========== Tryb ciemny ========== */
body.dark-mode {
    background: #181e2a;
    color: #c0cae6;
}
body.dark-mode .sidebar, 
body.dark-mode .offcanvas, 
body.dark-mode .offcanvas-body {
    background: #181e2a !important;
    color: #c0cae6 !important;
    border-right: 1px solid #253357;
}
body.dark-mode .sidebar a, 
body.dark-mode .offcanvas-body a {
    color: #b8c8ef !important;
}
body.dark-mode .sidebar a.active, 
body.dark-mode .sidebar a:hover,
body.dark-mode .offcanvas-body a.active, 
body.dark-mode .offcanvas-body a:hover {
    background: #253357 !important;
    color: #fff !important;
}

/* ========== Navbar ========== */
.navbar {
    background: #f8f9fa !important;
    color: #222;
}
body.dark-mode .navbar {
    background: #232c3b !important;
    color: #c0cae6;
}
body.dark-mode .btn-outline-dark {
    border-color: #b8c8ef;
    color: #b8c8ef;
}
body.dark-mode .btn-outline-dark:hover {
    background: #253357;
    color: #fff;
}

/* ========== RWD ========== */
@media (max-width: 991px) {
    .sidebar {
        display: none !important;
        z-index: 1045;
    }
    main {
        padding: 1rem;
    }
}

@media (max-width: 575px) {
    .navbar-brand {
        font-size: 1rem;
    }
    .sidebar h4 {
        font-size: 1rem;
    }
    main {
        padding: 1rem 0.5rem;
        font-size: 0.9rem;
    }
    h2, h3, h4 {
        font-size: smaller;
    }
    button, .btn {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }
    table, .table-responsive {
        width: 100%;
        overflow-x: auto;
        display: block;
    }
    form {
        width: 100%;
    }
}

/* Ikony */
.icon {
    width: 24px;
    height: 24px;
    margin: 0 4px;
    vertical-align: middle;
}

/* Container padding */
.container {
    max-width: 1140px;
    padding-left: 15px;
    padding-right: 15px;
}

@media (max-width: 575px) {
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
}

.theme-toggle-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1040;
  background: #232531;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 1.6em;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
  cursor: pointer;
  transition: background 0.2s;
}
.theme-toggle-btn:hover { background: #465775; }


/* Dodaj to do swojego pliku CSS */
#frame-belka-fields,
#regulacja-row,
#opaska-fields {
    display: none;
}