body {
    background-color: #0d1117;
    color: #c9d1d9;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 0.85rem;
    line-height: 1.4;
}

/* LOGIN SPECIFIC (Bezpieczny target dla strony logowania) */
body:has(.login-card) {
    background-color: #212529;
    color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    margin: 0;
}

.login-card {
    max-width: 400px;
    width: 100%;
    border: 1px solid #444 !important;
    background-color: #2c3034 !important;
}

/* LAYOUT & CONTAINERS */
.main-container {
    max-width: 1280px;
    margin-top: 0px;
    margin-bottom: 50px;
    margin-left: auto;
    margin-right: auto;
}

.shadow-sm {
    box-shadow: none !important;
}

:root {
    --brand-line1: 2.1rem;
    --brand-line2: 0.95rem;
}

.top-header {
    padding: 0;
    margin-bottom: 0;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.site-logo {
    height: calc(var(--brand-line1) + var(--brand-line2));
    width: auto;
    max-height: 84px;
    background: transparent;
}

.brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.logo {
    display: block;
    margin: 0 auto 5px auto;
    max-height: 120px;
}

/* ICONS & BUTTONS */
.header-icons .icon-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 4px;
    font-size: 1.1rem;
}

.header-icons .icon-btn:hover {
    background-color: #21262d;
}

.btn {
    border-radius: 4px !important;
    font-size: 0.78rem;
    font-weight: 500;
    padding: 0.2rem 0.55rem;
    box-shadow: none !important;
}

.btn-tech {
    background-color: #21262d;
    border: 1px solid #30363d;
    color: #c9d1d9;
    font-size: 0.78rem;
    padding: 3px 9px;
    transition: all 0.15s ease;
}

.btn-tech:hover {
    background-color: #30363d;
    border-color: #8b949e;
    color: #ffffff;
}

.btn-tech-primary {
    background-color: #238636;
    border: 1px solid #2ea44f;
    color: #ffffff;
    font-size: 0.78rem;
    padding: 3px 10px;
}

.btn-generate {
    background-color: #238636;
    border: 1px solid #2ea043 !important;
    padding: 0.5rem 1rem;
    font-weight: 600;
    font-size: 0.85rem;
    transition: background-color 0.15s ease;
}

.btn-generate:hover {
    background-color: #2ea043;
}

/* CARDS & MODALS */
.card,
.modal-content {
    background-color: #161b22;
    border: 1px solid #30363d !important;
    border-radius: 4px !important;
}

.card-header,
.modal-header {
    background-color: #21262d !important;
    border-bottom: 1px solid #30363d !important;
    border-radius: 3px 3px 0 0 !important;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #8b949e;
}

/* FORMS & INPUTS */
.form-control,
.form-select,
.input-group-text {
    background-color: #0d1117 !important;
    border-color: #30363d !important;
    color: #e6edf3 !important;
    border-radius: 4px !important;
    font-size: 0.78rem;
}

.form-control:focus,
.form-select:focus {
    border-color: #58a6ff !important;
    box-shadow: 0 0 0 1px #58a6ff !important;
}

.form-control:disabled {
    background-color: #161b22 !important;
    color: #484f58 !important;
    border-color: #21262d !important;
}

select.form-select option {
    background-color: #161b22;
    color: #c9d1d9;
}

/* FONTS */
.font-mono,
code,
textarea.font-mono {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace !important;
    font-size: 0.78rem !important;
}

/* STATUS DOTS */
.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.status-dot.online {
    background-color: #3fb950;
    box-shadow: 0 0 5px rgba(63, 185, 80, 0.4);
}

.status-dot.offline {
    background-color: #f85149;
}

.status-dot.pending {
    background-color: #d29922;
}

/* BADGES */
.badge-status {
    font-weight: 600;
    font-size: 0.70rem;
    padding: 2px 7px;
    border-radius: 3px;
}

.badge-score-ok,
.badge-ok {
    background-color: rgba(46, 164, 79, 0.15);
    color: #3fb950;
    border: 1px solid rgba(46, 164, 79, 0.3);
}

.badge-score-danger,
.badge-danger {
    background-color: rgba(248, 81, 73, 0.15);
    color: #f85149;
    border: 1px solid rgba(248, 81, 73, 0.3);
}

.badge-score-warn,
.badge-warn {
    background-color: rgba(210, 153, 34, 0.15);
    color: #d29922;
    border: 1px solid rgba(210, 153, 34, 0.3);
}

.badge-score-pending {
    background-color: rgba(139, 148, 158, 0.15);
    color: #8b949e;
    border: 1px solid rgba(139, 148, 158, 0.3);
}

.badge-subtle-secondary {
    background: rgba(110, 118, 129, 0.15);
    color: #8b949e;
    border: 1px solid rgba(110, 118, 129, 0.3);
}

.badge-subtle-success {
    background: rgba(46, 160, 67, 0.15);
    color: #3fb950;
    border: 1px solid rgba(46, 160, 67, 0.3);
}

.badge-subtle-danger {
    background: rgba(248, 81, 73, 0.15);
    color: #f85149;
    border: 1px solid rgba(248, 81, 73, 0.3);
}

/* CUSTOM TABLES */
.table-dark-custom {
    background-color: #0d1117;
    color: #c9d1d9;
}

.table-dark-custom th {
    background-color: #161b22;
    border-bottom: 1px solid #30363d;
    font-size: 0.725rem;
    text-transform: uppercase;
    color: #8b949e;
    padding: 9px 12px;
}

.table-dark-custom td {
    border-bottom: 1px solid #21262d;
    vertical-align: middle;
    padding: 8px 12px;
}

tr.row-offline,
tr.row-offline:hover {
    opacity: 1;
}


/* MENU SPECIFIC (INDEX) */
.menu-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.menu-card {
    background-color: #0d1117 !important;
    border: 1px solid #30363d !important;
    border-radius: 4px !important;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.menu-card-link:hover .menu-card {
    border-color: #58a6ff !important;
    background-color: #161b22 !important;
}

/* PANELS (History, Details) */
.history-row {
    background-color: #12171f !important;
}

.history-panel,
.details-panel {
    padding: 12px;
    border-left: 3px solid #388bfd;
    background-color: #161b22;
    margin: 4px 0;
    border-radius: 0 4px 4px 0;
}

/* MISC HELPERS & COMPONENTS */
.devices-scroll-area {
    max-height: 640px;
    overflow-y: auto;
    overflow-x: hidden;
}

.qr-placeholder {
    background-color: #ffffff;
    padding: 10px;
    border-radius: 4px;
    display: inline-block;
}

.mode-switcher-container {
    background-color: #161b22;
    border: 1px solid #30363d;
    border-radius: 4px;
    padding: 2px;
    display: inline-flex;
}

.mode-switch-btn {
    background-color: transparent;
    border: none !important;
    color: #8b949e;
    font-size: 0.78rem;
    padding: 0.3rem 0.75rem;
    border-radius: 3px !important;
    transition: all 0.15s ease;
}

.mode-switch-btn:hover {
    color: #c9d1d9;
}

.mode-switch-btn.active {
    background-color: #21262d !important;
    color: #58a6ff !important;
    font-weight: 600;
    border: 1px solid #30363d !important;
}

/* DESKTOP MODALS (RESIZABLE) */
@media (min-width: 768px) {

    #addPeerModal .modal-content,
    #peersModal .modal-content,
    #deviceDetailsModal .modal-content {
        resize: both;
        overflow: auto;
        min-width: 600px;
        min-height: 400px;
        max-width: 95vw;
        max-height: 95vh;
    }

    #deviceDetailsModal .modal-content {
        min-width: 700px;
        min-height: 500px;
    }
}

#peersModal .modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

#peersModal code {
    white-space: normal;
    word-break: break-word;
}

#adminVpnAllowedIps,
#addPeerAllowedIps {
    resize: vertical;
    min-height: 42px;
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

#addPeerPreviewConfig {
    max-height: 250px;
    white-space: pre-wrap;
    word-break: break-all;
}

/* ---------------------------------------------------
   RWD - MOBILE BREAKPOINTS 
   --------------------------------------------------- */
@media (max-width: 768px) {
    .top-header .container.main-container {
        justify-content: space-between !important;
    }

    .site-branding {
        flex-direction: row;
        align-items: center;
        text-align: left;
        gap: 0.5rem;
    }

    .site-logo {
        margin: 0;
        max-height: 50px;
    }

    .site-branding h4 {
        font-size: 1.3rem !important;
    }

    .site-branding div[style*="font-size: 0.85rem"] {
        font-size: 0.70rem !important;
    }
}

@media (max-width: 767.98px) {
    .main-container {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    .logo {
        max-height: 70px !important;
    }

    h4.mb-0 {
        font-size: 1.5rem !important;
    }

    .top-header .main-container {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.75rem !important;
    }

    .top-header .header-icons {
        width: 100%;
        justify-content: flex-end;
    }

    .action-bar-mobile {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .action-bar-mobile>div {
        max-width: 100% !important;
        width: 100% !important;
    }

    .action-bar-mobile select,
    .action-bar-mobile .input-group {
        max-width: 100% !important;
        width: 100% !important;
    }

    .action-bar-buttons {
        flex-wrap: wrap;
        width: 100%;
    }

    .action-bar-buttons .btn {
        flex: 1 1 auto;
    }

    #addPeerModal .modal-dialog,
    #peersModal .modal-dialog,
    #deviceDetailsModal .modal-dialog,
    #syslogManagerModal .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }

    #addPeerModal .modal-content,
    #peersModal .modal-content,
    #deviceDetailsModal .modal-content {
        min-width: 100% !important;
        max-width: 100% !important;
        resize: none !important;
    }

    .table-responsive,
    .table-responsive-mobile {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table-dark-custom {
        white-space: nowrap;
    }

    .nav-tabs-responsive {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 2px;
    }

    .nav-tabs-responsive .nav-item {
        flex: 0 0 auto;
    }

    .mobile-search-group {
        width: 100% !important;
    }

    .w-100-mobile {
        width: 100% !important;
    }
}

/* ANIMACJE DZWONKA ALERTÓW */
.alert-pulse-red {
    color: #f85149 !important;
    border-color: #f85149 !important;
    animation: pulse-red-anim 1.5s infinite;
}
.alert-pulse-yellow {
    color: #d29922 !important;
    border-color: #d29922 !important;
    animation: pulse-yellow-anim 2s infinite;
}

@keyframes pulse-red-anim {
    0% { box-shadow: 0 0 0 0 rgba(248, 81, 73, 0.7); }
    70% { box-shadow: 0 0 0 8px rgba(248, 81, 73, 0); }
    100% { box-shadow: 0 0 0 0 rgba(248, 81, 73, 0); }
}

@keyframes pulse-yellow-anim {
    0% { box-shadow: 0 0 0 0 rgba(210, 153, 34, 0.7); }
    70% { box-shadow: 0 0 0 8px rgba(210, 153, 34, 0); }
    100% { box-shadow: 0 0 0 0 rgba(210, 153, 34, 0); }
}

/* REPLACE MODE WIZARD STYLES */
.replace-mode-card {
    background-color: #161b22 !important;
    border: 1px solid #30363d !important;
    border-radius: 6px !important;
    transition: all 0.15s ease;
    cursor: pointer;
}
.replace-mode-card:hover {
    border-color: #8b949e !important;
    background-color: #21262d !important;
}
.replace-mode-card:has(input:checked) {
    border-color: #58a6ff !important;
    background-color: #1c2128 !important;
}

/* Podgląd skryptów i konfiguracji */
#attachLiveTextarea,
#attachCliTextarea,
#modalPreviewTextarea,
#previewCode,
#bulkScriptText {
    background-color: #0d1117 !important;
    color: #58a6ff !important;
    border: 1px solid #30363d !important;
}

/* Subpanele i kontenery parametrów */
.tech-subpanel {
    background-color: #0d1117;
    border: 1px solid #30363d;
}

/* LINKI DO PANELU ROUTERA */
.hover-underline {
    transition: color 0.15s ease, text-decoration 0.15s ease;
}
.hover-underline:hover {
    text-decoration: underline !important;
    color: #58a6ff !important;
    cursor: pointer;
}

/* ---------------------------------------------------
   LIGHT THEME - KOMPLEKSOWY & DOPRACOWANY
   --------------------------------------------------- */
:root[data-bs-theme="light"] body {
    background-color: #f6f8fa;
    color: #1f2328;
}

/* Logowanie w trybie jasnym */
:root[data-bs-theme="light"] body:has(.login-card) {
    background-color: #f6f8fa;
    color: #1f2328;
}

:root[data-bs-theme="light"] .login-card {
    background-color: #ffffff !important;
    border: 1px solid #d0d7de !important;
    box-shadow: 0 10px 30px rgba(140, 149, 159, 0.2) !important;
}

/* Nagłówek i branding */
:root[data-bs-theme="light"] .site-branding div[style*="color: #ccc"] {
    color: #57606a !important;
}

:root[data-bs-theme="light"] .header-icons .text-white,
:root[data-bs-theme="light"] .top-header .text-white {
    color: #1f2328 !important;
}

:root[data-bs-theme="light"] .header-icons .icon-btn {
    background-color: #ffffff;
    border: 1px solid #d0d7de !important;
    color: #57606a;
}

:root[data-bs-theme="light"] .header-icons .icon-btn:hover {
    background-color: #f3f4f6;
    border-color: #8c959f !important;
    color: #1f2328;
}

/* Karty i modale */
:root[data-bs-theme="light"] .card,
:root[data-bs-theme="light"] .modal-content,
:root[data-bs-theme="light"] .modal-content.bg-dark {
    background-color: #ffffff !important;
    border-color: #d0d7de !important;
    color: #1f2328 !important;
}

:root[data-bs-theme="light"] .card.bg-black,
:root[data-bs-theme="light"] .card.bg-dark {
    background-color: #f6f8fa !important;
    border-color: #d0d7de !important;
    color: #1f2328 !important;
}

:root[data-bs-theme="light"] .card-header,
:root[data-bs-theme="light"] .modal-header {
    background-color: #f6f8fa !important;
    border-bottom: 1px solid #d0d7de !important;
    color: #57606a !important;
}

:root[data-bs-theme="light"] .modal-footer {
    background-color: #f6f8fa !important;
    border-top: 1px solid #d0d7de !important;
}

:root[data-bs-theme="light"] .btn-close-white {
    filter: none !important;
}

/* Formularze i kontrolki */
:root[data-bs-theme="light"] .form-control,
:root[data-bs-theme="light"] .form-select,
:root[data-bs-theme="light"] .input-group-text,
:root[data-bs-theme="light"] .form-control.bg-dark,
:root[data-bs-theme="light"] .form-control.bg-black,
:root[data-bs-theme="light"] .form-select.bg-dark,
:root[data-bs-theme="light"] .form-select.bg-black,
:root[data-bs-theme="light"] textarea.bg-dark,
:root[data-bs-theme="light"] textarea.bg-black {
    background-color: #ffffff !important;
    border-color: #d0d7de !important;
    color: #1f2328 !important;
}

:root[data-bs-theme="light"] .form-control:focus,
:root[data-bs-theme="light"] .form-select:focus {
    border-color: #0969da !important;
    box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.15) !important;
}

:root[data-bs-theme="light"] .form-control:disabled,
:root[data-bs-theme="light"] .form-select:disabled {
    background-color: #f6f8fa !important;
    color: #8c959f !important;
    border-color: #d0d7de !important;
}

:root[data-bs-theme="light"] select.form-select option {
    background-color: #ffffff;
    color: #1f2328;
}

:root[data-bs-theme="light"] .input-group-text.bg-secondary {
    background-color: #eaeef2 !important;
    border-color: #d0d7de !important;
    color: #57606a !important;
}

/* Przyciski */
:root[data-bs-theme="light"] .btn-tech {
    background-color: #ffffff;
    border: 1px solid #d0d7de;
    color: #24292f;
}

:root[data-bs-theme="light"] .btn-tech:hover {
    background-color: #f3f4f6;
    border-color: #8c959f;
    color: #0969da;
}

:root[data-bs-theme="light"] .btn-tech.active {
    background-color: #e7f2ff;
    border-color: #0969da;
    color: #0969da;
}

:root[data-bs-theme="light"] .btn-tech-primary {
    background-color: #1f883d;
    border-color: #1a7f37;
    color: #ffffff;
}

:root[data-bs-theme="light"] .btn-tech-primary:hover {
    background-color: #1a7f37;
    border-color: #116329;
    color: #ffffff;
}

:root[data-bs-theme="light"] .btn-outline-light {
    border-color: #d0d7de !important;
    color: #57606a !important;
    background-color: #ffffff;
}

:root[data-bs-theme="light"] .btn-outline-light:hover {
    background-color: #f3f4f6 !important;
    border-color: #8c959f !important;
    color: #1f2328 !important;
}

:root[data-bs-theme="light"] .btn-outline-secondary {
    border-color: #d0d7de !important;
    color: #57606a !important;
}

:root[data-bs-theme="light"] .btn-outline-secondary:hover {
    background-color: #f3f4f6 !important;
    border-color: #8c959f !important;
    color: #1f2328 !important;
}

/* Tabele */
:root[data-bs-theme="light"] .table-dark-custom,
:root[data-bs-theme="light"] .table-dark {
    background-color: #ffffff !important;
    color: #1f2328 !important;
    border-color: #d0d7de !important;
}

:root[data-bs-theme="light"] .table-dark-custom th,
:root[data-bs-theme="light"] .table-dark th {
    background-color: #f6f8fa !important;
    border-bottom: 1px solid #d0d7de !important;
    color: #57606a !important;
}

:root[data-bs-theme="light"] .table-dark-custom td,
:root[data-bs-theme="light"] .table-dark td {
    background-color: #ffffff !important;
    border-bottom: 1px solid #eaeef2 !important;
    color: #1f2328 !important;
}

:root[data-bs-theme="light"] .table-dark-custom tr:hover td,
:root[data-bs-theme="light"] .table-dark tr:hover td,
:root[data-bs-theme="light"] .table-hover>tbody>tr:hover>* {
    background-color: #f6f8fa !important;
}

:root[data-bs-theme="light"] tr.row-offline td {
    background-color: #fff8f8 !important;
}

:root[data-bs-theme="light"] .history-row td {
    background-color: #f6f8fa !important;
}

:root[data-bs-theme="light"] .history-panel,
:root[data-bs-theme="light"] .details-panel {
    background-color: #f6f8fa !important;
    border-left: 3px solid #0969da !important;
    border: 1px solid #d0d7de;
    border-left-width: 3px;
    color: #1f2328;
}

/* Menu nawigacyjne kafelkowe */
:root[data-bs-theme="light"] .menu-card {
    background-color: #ffffff !important;
    border: 1px solid #d0d7de !important;
    box-shadow: 0 1px 3px rgba(31, 35, 40, 0.06);
}

:root[data-bs-theme="light"] .menu-card-link:hover .menu-card {
    background-color: #ffffff !important;
    border-color: #0969da !important;
    box-shadow: 0 4px 12px rgba(9, 105, 218, 0.12);
}

:root[data-bs-theme="light"] .menu-card .border.rounded {
    border-color: #d0d7de !important;
    background-color: #f6f8fa !important;
}

/* Przełącznik trybu konfiguracji */
:root[data-bs-theme="light"] .mode-switcher-container {
    background-color: #eaeef2 !important;
    border: 1px solid #d0d7de !important;
}

:root[data-bs-theme="light"] .mode-switch-btn {
    color: #57606a !important;
}

:root[data-bs-theme="light"] .mode-switch-btn:hover {
    color: #1f2328 !important;
}

:root[data-bs-theme="light"] .mode-switch-btn.active {
    background-color: #ffffff !important;
    color: #0969da !important;
    border: 1px solid #d0d7de !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08) !important;
}

/* Karty kreatora wymiany (Replace mode) */
:root[data-bs-theme="light"] .replace-mode-card {
    background-color: #ffffff !important;
    border: 1px solid #d0d7de !important;
}

:root[data-bs-theme="light"] .replace-mode-card:hover {
    border-color: #8c959f !important;
    background-color: #f6f8fa !important;
}

:root[data-bs-theme="light"] .replace-mode-card:has(input:checked) {
    border-color: #0969da !important;
    background-color: #ddf4ff !important;
}

/* Badże i statusy */
:root[data-bs-theme="light"] .badge-score-ok,
:root[data-bs-theme="light"] .badge-ok,
:root[data-bs-theme="light"] .badge-subtle-success {
    background-color: #dafbe1 !important;
    color: #1a7f37 !important;
    border: 1px solid #4ac26b !important;
}

:root[data-bs-theme="light"] .badge-score-danger,
:root[data-bs-theme="light"] .badge-danger,
:root[data-bs-theme="light"] .badge-subtle-danger {
    background-color: #ffebe9 !important;
    color: #cf222e !important;
    border: 1px solid #ff8182 !important;
}

:root[data-bs-theme="light"] .badge-score-warn,
:root[data-bs-theme="light"] .badge-warn {
    background-color: #fff8c5 !important;
    color: #9a6700 !important;
    border: 1px solid #d4a72c !important;
}

:root[data-bs-theme="light"] .badge-score-pending,
:root[data-bs-theme="light"] .badge-subtle-secondary {
    background-color: #eff1f3 !important;
    color: #57606a !important;
    border: 1px solid #d0d7de !important;
}

/* Status dots */
:root[data-bs-theme="light"] .status-dot.online {
    background-color: #1a7f37;
    box-shadow: 0 0 5px rgba(26, 127, 55, 0.4);
}

:root[data-bs-theme="light"] .status-dot.offline {
    background-color: #cf222e;
}

:root[data-bs-theme="light"] .status-dot.pending {
    background-color: #9a6700;
}

/* Zakładki (Nav Tabs) */
:root[data-bs-theme="light"] .nav-tabs {
    border-bottom: 1px solid #d0d7de;
}

:root[data-bs-theme="light"] .nav-tabs .nav-link {
    color: #57606a;
    border: 1px solid transparent;
}

:root[data-bs-theme="light"] .nav-tabs .nav-link:hover {
    color: #1f2328;
    border-color: transparent transparent #d0d7de transparent;
}

:root[data-bs-theme="light"] .nav-tabs .nav-link.active {
    background-color: #ffffff !important;
    color: #0969da !important;
    border-color: #d0d7de #d0d7de #ffffff !important;
    font-weight: 600;
}

/* Kontener logów i terminalu */
:root[data-bs-theme="light"] #logsTableContainer,
:root[data-bs-theme="light"] #logsTableContainer.bg-black {
    background-color: #f6f8fa !important;
    border: 1px solid #d0d7de !important;
}

:root[data-bs-theme="light"] #logsTableContainer table td,
:root[data-bs-theme="light"] #logsTableContainer code {
    color: #1f2328 !important;
}

/* Podgląd konfiguracji .rsc, skryptów i edytorów */
:root[data-bs-theme="light"] #modalPreviewTextarea,
:root[data-bs-theme="light"] #previewCode,
:root[data-bs-theme="light"] #attachCliTextarea,
:root[data-bs-theme="light"] #attachLiveTextarea,
:root[data-bs-theme="light"] #bulkScriptText,
:root[data-bs-theme="light"] #singleScriptText,
:root[data-bs-theme="light"] #editPassTargetDisplay,
:root[data-bs-theme="light"] .tech-subpanel,
:root[data-bs-theme="light"] #adminPasswordBox {
    background-color: #f6f8fa !important;
    border-color: #d0d7de !important;
}

:root[data-bs-theme="light"] #modalPreviewTextarea,
:root[data-bs-theme="light"] #previewCode,
:root[data-bs-theme="light"] #attachCliTextarea,
:root[data-bs-theme="light"] #attachLiveTextarea,
:root[data-bs-theme="light"] #bulkScriptText {
    color: #0969da !important;
}

/* Inline Code */
:root[data-bs-theme="light"] code:not(#modalPreviewTextarea code) {
    background-color: #eff1f3;
    color: #0969da;
    padding: 2px 5px;
    border-radius: 4px;
    border: 1px solid #e1e4e8;
}

/* Dropdown Menu powiadomień / Dzwonek */
:root[data-bs-theme="light"] #bellDropdownMenu,
:root[data-bs-theme="light"] .dropdown-menu {
    background-color: #ffffff !important;
    color: #1f2328 !important;
    border: 1px solid #d0d7de !important;
    box-shadow: 0 8px 24px rgba(140, 149, 159, 0.2) !important;
}

:root[data-bs-theme="light"] #bellDropdownMenu .text-light {
    color: #1f2328 !important;
}

:root[data-bs-theme="light"] #bellDropdownMenu .list-group-item {
    background-color: #ffffff !important;
    border-color: #eaeef2 !important;
    color: #1f2328 !important;
}

:root[data-bs-theme="light"] #bellDropdownMenu .list-group-item:hover {
    background-color: #f6f8fa !important;
}

/* Link hover underline */
:root[data-bs-theme="light"] .hover-underline:hover {
    color: #0969da !important;
}

/* Form switch containers & check labels */
:root[data-bs-theme="light"] .form-switch.bg-black {
    background-color: #f6f8fa !important;
    border-color: #d0d7de !important;
}

:root[data-bs-theme="light"] .form-check-label.text-light {
    color: #1f2328 !important;
}
