body {
    background-color: #181818;
    color: #e4e4e4;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
header {
    background-color: #222222;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #363636;
}
#lbl_clock {
    text-align: center;
    line-height: 1.2;
}
.clock-date {
    font-size: 18px;
    color: #9a9a9a;
}
.clock-time {
    font-size: 24px;
    font-weight: bold;
    color: #e4e4e4;
    font-family: monospace;
}
.header-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.header-label{
    font-size: 13pt;
}
.header-callsign {
font-size: 15pt;
}
.header-phonetic-text {
    font-size: 15px;
    color: #9a9a9a;
    font-weight: normal;
    margin-left: 5px;
}
.header-link {
    text-decoration: none;
    padding: 6px 15px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 11px;
    margin-left: 8px;
    display: inline-block;
    transition: opacity 0.2s;
}
.header-link:hover { opacity: 0.8; }
.link-settings { background-color: #4a8fff; color: white; }
.link-admin { background-color: #ffcc44; color: #181818; }
.link-logout { background-color: #444444; color: #cccccc; }
.app-container {
    flex: 1;
    display: flex;
}
.sidebar {
    width: 450px;
    background-color: #222222;
    padding: 20px;
    border-right: 1px solid #363636;
}
.sidebar.edit-mode {
    background-color: #1a2535;
    border-right-color: #4a8fff;
}
.main-content {
    flex: 1;
    padding: 20px;
}
h2, h3 {
    color: #9a9a9a;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 0;
}
.form-group {
    margin-bottom: 15px;
}
.form-row {
    display: flex;
    gap: 10px;
}
.flex-1 {
    flex: 1;
}
label {
    display: block;
    font-size: 11px;
    color: #9a9a9a;
    font-weight: bold;
    margin-bottom: 5px;
}
input[type="text"], input[type="password"], select {
    width: 100%;
    background-color: #2a2a2a;
    border: 1px solid #363636;
    color: #e4e4e4;
    padding: 8px 12px;
    border-radius: 4px;
    box-sizing: border-box;
}
input[type="text"]:focus {
    border-color: #4a8fff;
    outline: none;
}
.btn-primary {
    background-color: #3a8a4a;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
}
.btn-primary:hover { background-color: #2d7a3d; }
.stats-panel {
    background-color: #222222;
    padding: 15px;
    border-radius: 6px;
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
}
.stat-item { text-align: center; }
.stat-val { font-size: 20px; font-weight: bold; color: #4a8fff; font-family: monospace; }
table {
    width: 100%;
    border-collapse: collapse;
    background-color: #1e1e1e;
}
th {
    background-color: #181818;
    color: #636363;
    text-align: left;
    padding: 10px;
    font-size: 12px;
    border-bottom: 1px solid #363636;
}
td { padding: 12px 10px; border-bottom: 1px solid #2a2a2a; font-size: 15px; }
tr.today { border-left: 4px solid #4a8fff; background-color: #1a2535 !important; }

/* Akcenty kolorystyczne dla pasm (tło wiersza) */
tr.band-160m { background-color: rgba(255, 0, 0, 0.04); }
tr.band-80m { background-color: rgba(255, 165, 0, 0.04); }
tr.band-40m { background-color: rgba(255, 255, 0, 0.04); }
tr.band-20m { background-color: rgba(0, 128, 0, 0.04); }
tr.band-15m { background-color: rgba(0, 0, 255, 0.04); }
tr.band-10m { background-color: rgba(75, 0, 130, 0.04); }
tr.band-2m { background-color: rgba(238, 130, 238, 0.04); }
tr.band-70cm { background-color: rgba(255, 192, 203, 0.04); }

/* Kolory dla badge'y modulacji */
.badge-mode { background-color: #444; padding: 2px 6px; border-radius: 3px; font-size: 11px; color: white; font-weight: bold; }
.badge-mode.mode-ssb { background-color: #2a6aaa; }
.badge-mode.mode-cw { background-color: #5a5a5a; }
.badge-mode.mode-fm { background-color: #008b8b; }
.badge-mode.mode-am { background-color: #a0522d; }
.badge-mode.mode-digi { background-color: #6a5acd; }
.badge-mode.mode-ft8 { background-color: #6a5acd; }
.badge-mode.mode-c4fm { background-color: #2e8b57; }

.callsign-cell { font-family: monospace; font-weight: bold; color: #ffffff; }

.btn-edit, .btn-delete {
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s;
    line-height: 1;
}
.btn-edit { background-color: rgba(74, 143, 255, 0.15); color: #4a8fff; margin-right: 5px; }
.btn-edit:hover { background-color: rgba(74, 143, 255, 0.3); }
.btn-delete { background-color: rgba(255, 136, 136, 0.15); color: #ff8888; }
.btn-delete:hover { background-color: rgba(255, 136, 136, 0.3); }

.btn-cancel {
    background-color: transparent;
    color: #9a9a9a;
    border: 1px solid #444444;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    margin-top: 8px;
    display: none; /* Hidden by default */
}
.btn-cancel:hover { background-color: #333333; color: #eeeeee; }

.alert { padding: 10px; border-radius: 4px; margin-bottom: 15px; }
.alert-danger { background-color: #5a1a1a; color: #ff8888; }

footer {
    background-color: #222222;
    padding: 10px 20px;
    border-top: 1px solid #363636;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #636363;
    font-size: 12px;
}
.btn-footer-export {
    background-color: #3a8a4a;
    color: white;
    text-decoration: none;
    padding: 6px 15px;
    border-radius: 4px;
    font-weight: bold;
}

.cs-status { 
    margin-top: 10px; 
    font-size: 13px; 
    line-height: 1.4; 
    color: #e4e4e4;
}
.cs-type-header {
    text-decoration: underline;
    font-weight: bold;
    font-size: 14pt;
}

.label-callsign {
    font-size: 14px !important;
    margin-bottom: 8px !important;
    color: #4a8fff !important; /* Wyróżnienie kolorem dla lepszej orientacji */
}

.input-callsign {
    height: 45px;
    font-size: 24px !important;
    font-weight: bold;
    text-align: center;
}

.form-section {
    border: 1px solid #363636;
    padding: 12px 10px 0 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    background-color: rgba(255, 255, 255, 0.02);
}

.filterable {
    cursor: pointer;
    transition: color 0.2s;
}
.filterable:hover {
    color: #4a8fff !important;
    text-decoration: underline;
}

/* --- NOWE SZLIFY: CENTROWANIE I RESPORSYWNOŚĆ --- */

.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #181818;
}

.auth-card {
    background-color: #222222;
    padding: 40px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px; /* Zgodnie z życzeniem ok 500px */
    border: 1px solid #363636;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}
.auth-card--policy {
    max-width: 800px;
}

.auth-title {
    text-align: center;
    margin-bottom: 25px !important;
    color: #ffffff !important;
    font-size: 18px !important;
    letter-spacing: 0.1em;
}

.auth-footer {
    margin-top: 25px;
    text-align: center;
    border-top: 1px solid #363636;
    padding-top: 20px;
}

.btn-link {
    color: #4a8fff;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}
.btn-link:hover {
    color: #3a8a4a;
    text-decoration: underline;
}
.btn-link.btn-link--button {
    border: 1px solid #444;
    padding: 8px 25px;
    border-radius: 4px;
    background-color: #333;
    color: #e4e4e4;
}
.btn-link.btn-link--button:hover {
    text-decoration: none;
    background-color: #444;
}
.auth-footer .btn-link{
    cursor: pointer;
}
.policy-content { color: #ccc; line-height: 1.6; font-size: 14px; text-align: justify; }
.policy-content h3 { color: #fff; margin-top: 20px; font-size: 16px; text-transform: none; letter-spacing: normal; }
.policy-content ul { padding-left: 20px; }

/* Kontener dla ustawień, aby nie był na full width */
.container-centered {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
    background-color: #222222;
    border-radius: 8px;
    border: 1px solid #363636;
}

/* Style dla pól typu checkbox wewnątrz formularzy */
.form-group-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    margin-bottom: 20px;
}
.form-group-checkbox input[type="checkbox"] {
    width: auto !important;
}
.form-group-checkbox label {
    margin-bottom: 0 !important;
    cursor: pointer;
}
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #222222;
    border-top: 1px solid #363636;
    padding: 15px 20px;
    z-index: 9999;
    color: #9a9a9a;
    display: none; /* Ukryty domyślnie */
    align-items: center;
    justify-content: center;
    gap: 15px;
}
.cookie-banner.is-visible {
    display: flex; /* Pokazany przez JS */
}
.cookie-banner .btn-link {
    margin: 0;
    white-space: nowrap;
}

/* Poprawka responsywna dla logowania łączności */
@media (max-width: 992px) {
    .app-container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 2px solid #363636;
        box-sizing: border-box;
    }
    .main-content {
        width: 100%;
        padding: 10px;
    }
    #qso_table_wrapper {
        overflow-x: auto;
    }
    table {
        min-width: 800px; /* Zapobiega ściskaniu tabeli, wymusza scroll poziomy */
    }
}

@keyframes blink { 50% { opacity: 0; } }

/* Jednoliniowy kontener dla znaku stacji i łamania */
.callsign-inline-container {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
}
.callsign-inline-container input[type="text"] {
    width: 0 !important;
    min-width: 0 !important;
    flex: 1 1 0% !important;
}
.callsign-inline-container .slash-separator {
    flex: 0 0 auto !important;
    font-size: 22px !important;
    font-weight: bold !important;
    color: #4a9eff !important;
    padding: 0 4px !important;
}
