html, body {
    height: 100dvh;
    display: flex;
    flex-direction: column;
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f5f5f5;
    color: #222;
}

.wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin: 0 auto;
    padding: 0 16px 32px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 18px 0;
}

.connection-banner {
    margin: -6px 0 14px;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(198, 40, 40, 0.82);
    color: #fff;
    font-weight: bold;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.connection-banner[hidden] {
    display: none !important;
}

.topbar h1 {
    margin: 0;
    font-size: 28px;
}

.topbar nav a {
    margin-left: 14px;
    text-decoration: none;
    color: #005bbb;
    font-weight: bold;
}

.content {
    display: flex;
    flex-direction: column;
    flex: 1;
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .08);
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.card {
    padding: 10px;
    border-radius: 10px;
    background: #eef4ff;
    text-align: center;
}

.card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.card-clickable {
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card-link:hover .card-clickable,
.card-link:focus .card-clickable,
.card-link:focus-visible .card-clickable {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .10);
}


.card-alert {
    background: #fff0cf;
}


.start-sticky-bar {
    position: sticky;
    top: 0;
    z-index: 30;
    background: #fff;
    padding: 4px 0 12px;
    margin-bottom: 12px;
    
}

.start-cards {
    margin-bottom: 0;
}

.card .num {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 8px;
}

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    gap: 14px;
}

.toolbar-events {
    align-items: flex-start;
}

.toolbar-left,
.toolbar-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.compact-toolbar {
    margin-bottom: 12px;
}

.compact-toolbar-left {
    gap: 10px;
}

.btn,
button,
.btn-secondary {
    display: inline-block;
    padding: 10px 14px;
    border: 0;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    font-size: 14px;
}

.btn,
button {
    background: #005bbb;
    color: #fff;
}

.btn-secondary {
    background: #ddd;
    color: #222;
}

.btn-top {
    padding: 8px 12px;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    font-size: 14px;
}

th,
td {
    border: 1px solid #ddd;
    padding: 2px 10px;
    vertical-align: middle;
}

th {
    background: #f0f0f0;
    text-align: left;
}

tr.unhandled td {
    font-weight: bold;
}

tr.row-alarm td {
    background: var(--event-row-bg, var(--event-color-alarm_wlamanie, #FFD6D6));
}

tr.row-arm td {
    background: var(--event-row-bg, var(--event-color-uzbrojenie_rozbrojenie, #DFF5DF));
}

tr.row-test td {
    background: var(--event-row-bg, var(--event-color-testy, #E5E7EB));
    opacity: 0.92;
}

tr.row-other td {
    background: var(--event-row-bg, var(--event-color-inne, #DBEAFE));
}

tr.row-trouble td {
    background: var(--event-row-bg, var(--event-color-awarie, #FFF6C7));
}

.status-new {
    display: inline-block;
    font-weight: bold;
    color: #c62828;
    text-decoration: none;
}

.status-handled {
    line-height: 1.35;
    white-space: nowrap;
}

label {
    display: block;
    margin: 10px 0 6px;
    font-weight: bold;
}

input[type="text"],
input[type="date"],
select,
textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 10px;
    border: 1px solid #bbb;
    border-radius: 8px;
    font-size: 14px;
}

.row2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.filterbar {
    display: flex;
    align-items: end;
    gap: 10px;
    margin-bottom: 16px;
}

.form-actions,
.filter-actions {
    margin-top: 18px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.error {
    padding: 12px;
    background: #ffdede;
    border: 1px solid #cc9999;
    border-radius: 8px;
    margin-bottom: 12px;
}

.info-box {
    padding: 12px 14px;
    background: #eef4ff;
    border: 1px solid #c8daf7;
    border-radius: 10px;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
}

.refresh-checkbox,
.test-checkbox {
    margin-top: 0;
}

.refresh-box {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.muted,
.compact-filter-note {
    color: #666;
    font-size: 13px;
}


.system-health-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.system-health-card {
    border: 1px solid #d8d8d8;
    border-radius: 12px;
    padding: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .05);
}

.system-health-topline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.system-health-topline h4 {
    margin: 0;
}

.system-health-value {
    font-size: 30px;
    font-weight: bold;
    line-height: 1.1;
    margin-bottom: 8px;
}

.system-health-value-sm {
    font-size: 22px;
}

.system-health-subtext {
    color: #555;
    font-size: 13px;
    line-height: 1.45;
}

.section-head-inline {
    margin-top: 6px;
}

.status-neutral {
    background: #eef2f7;
    color: #334155;
}

.status-temp-ok {
    background: #e4f7e9;
    color: #1a7e37;
}

.status-temp-warm,
.status-temp-warn {
    background: #fff4dd;
    color: #9a6200;
}

.status-temp-hot,
.status-temp-bad {
    background: #ffe5e5;
    color: #b22323;
}

.status-temp-unknown {
    background: #eef2f7;
    color: #475569;
}

.panel-section {
    margin-top: 28px;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.section-head h3,
.modem-card h4 {
    margin: 0;
}

.modem-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.modem-card {
    border: 1px solid #d8d8d8;
    border-radius: 12px;
    padding: 16px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .05);
}

.modem-ok {
    border-left: 6px solid #22a447;
}

.modem-bad {
    border-left: 6px solid #cc3b3b;
}

.age-fresh {
    background: linear-gradient(180deg, #ffffff 0%, #f7fff9 100%);
}

.age-warn {
    background: linear-gradient(180deg, #ffffff 0%, #fffaf0 100%);
}

.age-stale {
    background: linear-gradient(180deg, #ffffff 0%, #fff4f4 100%);
}

.modem-topline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.status-pill {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: bold;
}

.status-ok {
    background: #e4f7e9;
    color: #1a7e37;
}

.status-bad {
    background: #ffe5e5;
    color: #b22323;
}

.modem-status-text {
    margin-bottom: 12px;
    font-weight: bold;
	
}

.signal-wrap {
    margin-bottom: 14px;
}

.signal-bar {
    width: 100%;
    height: 12px;
    border-radius: 999px;
    background: #ececec;
    overflow: hidden;
}

.signal-bar span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #d34b4b 0%, #f0a63a 45%, #37a64b 100%);
}

.signal-text {
    margin-top: 6px;
    font-size: 13px;
}

.modem-meta {
    margin: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.modem-meta div {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 10px;
    align-items: start;
}

.modem-meta dt {
    font-weight: bold;
}

.modem-meta dd {
    margin: 0;
}

.mono,
code {
    font-family: Consolas, Monaco, monospace;
    word-break: break-all;

}

.empty-state {
    text-align: center;
    color: #666;
    padding: 24px 10px;
}

.events-sticky-bar {
    position: sticky;
    top: 0;
    z-index: 30;
    background: #fff;
    padding: 4px 0 12px;
    margin-bottom: 12px;
    box-shadow: 0 10px 14px -14px rgba(0, 0, 0, .35);
}

.live-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid #cfd8e3;
    background: #f7f9fc;
    font-weight: bold;
    font-size: 20px;
    line-height: 1;
    user-select: none;
    cursor: pointer;
	background: #90fc9b;
}

.live-indicator.is-refreshing {
    transform: scale(1.05);
	
}

.live-indicator.is-error {
    color: #b42323;
    border-color: #e6b1b1;
    background: #fff1f1;
}

.new-events-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #fff4d6;
    color: #8a5a00;
    font-weight: bold;
    border: 1px solid #efd28b;
}

.table-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 8px;
}

#events-table-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

#events-table-container .table-wrap {
    flex: 1;
    min-height: 0;
    height: 600px;
    overflow-y: auto;
    overflow-x: auto;
    border: 1px solid #ddd;
    border-radius: 10px;
    -webkit-overflow-scrolling: touch;
}

#events-table-container thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f0f0f0;
}

.filters-compact {
    display: grid;
    grid-template-columns: max-content max-content max-content 1fr;
    gap: 12px;
    align-items: end;
}

.filter-field {
    min-width: 0;
}

.filter-field label {
    margin-top: 0;
}

.filter-field-object select {
    width: 180px;
    max-width: 100%;
}

.filter-field-date input[type="date"] {
    width: 155px;
    max-width: 100%;
}

.filter-field-toggles {
    min-width: 0;
}

.filter-field-toggles .filter-icon-row,
.filter-icon-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.filter-icon-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid #cfd8e3;
    border-radius: 999px;
    background: #f7f9fc;
    color: #2a3a4f;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
}

.filter-icon-button:hover {
    background: #eef4ff;
}

.filter-icon-button.is-active {
    background: #dcecff;
    border-color: #89b4f8;
    color: #0f4fa8;
    box-shadow: inset 0 0 0 1px rgba(0, 91, 187, 0.08);
}

a.filter-icon-button {
    text-decoration: none;
    color: inherit;
}

.filter-icon-symbol {
    font-size: 17px;
}

.filter-icon-label {
    font-weight: bold;
    white-space: nowrap;
}

.alarm-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(180, 0, 0, 0.18);
    backdrop-filter: blur(2px);
    cursor: pointer;
}

.alarm-overlay[hidden] {
    display: none !important;
}

.alarm-overlay-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 28px 36px;
    border: 3px solid rgba(180, 0, 0, 0.85);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.25);
    text-align: center;
    animation: alarmPulse 1s ease-in-out infinite;
}

.alarm-overlay-title {
    font-size: clamp(48px, 11vw, 128px);
    line-height: 0.95;
    font-weight: 900;
    letter-spacing: 0.08em;
    color: #c20000;
    text-shadow: 0 0 18px rgba(255, 0, 0, 0.2);
}

.alarm-overlay-subtitle {
    font-size: clamp(16px, 2.3vw, 26px);
    font-weight: bold;
    color: #5c1111;
}

body.alarm-active {
    overflow: hidden;
}

@keyframes alarmPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 18px 45px rgba(0, 0, 0, 0.25);
    }
    50% {
        transform: scale(1.03);
        box-shadow: 0 22px 55px rgba(180, 0, 0, 0.35);
    }
}

@media (max-width: 1100px) {
    .filters-compact {
        grid-template-columns: max-content max-content max-content;
        gap: 12px;
        align-items: end;
    }

    .filter-field-toggles {
        grid-column: 1 / -1;
    }

}

@media (max-width: 900px) {
    .topbar,
    .toolbar,
    .section-head {
        flex-direction: column;
        align-items: flex-start;
    }



}

@media (max-width: 768px) {
    #events-table-container .table-wrap {
        height: 320px;
    }

}

@media (max-width: 640px) {
    .row2 {
        grid-template-columns: 1fr;
    }

    .modem-meta div {
        grid-template-columns: 1fr;
        gap: 4px;
    }


}

@media (max-width: 520px) {
    .filters-compact {
        grid-template-columns: 1fr;
    }

    .filter-field-object,
    .filter-field-date,
    .filter-field-toggles {
        grid-column: auto;
    }


}


/* Kolumna treści SMS: tu ustawisz szerokość */
th.sms-text-col,
td.sms-text-cell {
    width: 320px;
    min-width: 100px;
    max-width: 200px;
}

td.sms-text-cell {
    vertical-align: middle;
}


.sms-text-content {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 6px 10px;
    border-radius: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sms-text-content.is-expandable {
    cursor: pointer;
}

.sms-text-content.is-expandable:focus {
    outline: 2px solid rgba(0, 91, 187, 0.35);
    outline-offset: 1px;
}

.sms-text-content.is-expanded {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    word-break: break-word;
}

.topbar {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    flex-wrap:wrap;
}

.topbar-user {
    display:flex;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
    font-size:14px;
}

.topbar-role {
    display:inline-block;
    padding:4px 8px;
    border-radius:999px;
    background:#eef3ff;
    border:1px solid #cdd9ff;
}

.topbar-logout {
    text-decoration:none;
    font-weight:600;
}

.login-body {
    min-height:100vh;
    margin:0;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:24px;
    box-sizing:border-box;
}

.login-card {
    width:min(100%, 420px);
    background:#fff;
    border:1px solid #d9dfe8;
    border-radius:12px;
    padding:24px;
    box-sizing:border-box;
    box-shadow:0 10px 30px rgba(0,0,0,0.08);
}

.login-card h1 {
    margin:0 0 6px;
}

.login-card h2 {
    margin:0 0 18px;
    font-size:20px;
}

.login-form {
    display:grid;
    gap:10px;
}


.login-card select,
.login-card input[type="password"] {
    width: 100%;
    box-sizing: border-box;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #cfd7e3;
    border-radius: 8px;
    background: #fff;
}

.login-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
    font-size: 14px;
}

.login-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
}

.login-card input[type="password"]  {
        font-size:24px;
}





.success {
    padding: 12px;
    background: #e2f6e2;
    border: 1px solid #91c691;
    border-radius: 8px;
    margin-bottom: 12px;
}

.settings-grid {
    display: grid;
    gap: 18px;
}

.settings-card {
    border: 1px solid #dfe5ee;
    border-radius: 10px;
    padding: 18px;
    background: #fafcff;
}

.settings-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.settings-card-head h3 {
    margin: 0 0 6px;
}

.settings-card-head p {
    margin: 0;
    color: #4f5b6b;
}

.settings-users-layout {
    display: grid;
    grid-template-columns: minmax(320px, 2fr) minmax(280px, 1fr);
    gap: 18px;
    align-items: start;
}

.settings-users-table {
    margin-top: 0;
}

.settings-users-table tr.is-selected td {
    background: #eef4ff;
}

.settings-user-form-box {
    border: 1px solid #dfe5ee;
    border-radius: 10px;
    padding: 16px;
    background: #fff;
}

.settings-user-form-box h4 {
    margin-top: 0;
    margin-bottom: 12px;
}

.settings-user-meta {
    margin-bottom: 12px;
    line-height: 1.5;
}

.settings-form label:first-child {
    margin-top: 0;
}

@media (max-width: 980px) {
    .settings-users-layout {
        grid-template-columns: 1fr;
    }
}

.synoptic-section {
    margin-top: 5px;
}

.synoptic-header-row {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 10px;
    margin-bottom: 5px;
}

.synoptic-header-row h3 {
    margin: 0 0 4px;
}

.synoptic-subtitle {
    color: #666;
    font-size: 14px;
}

.synoptic-table-wrap {
    overflow-x: auto;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: #fff;
}

.synoptic-table {
    margin-top: 0;
    min-width: 920px;
}

.synoptic-table th,
.synoptic-table td {
    text-align: center;
    vertical-align: middle;

}

.synoptic-table th:first-child,
.synoptic-table td:first-child {
    text-align: left;
}

.synoptic-object-name-cell {
    min-width: 240px;
    white-space: nowrap;

}

.synoptic-object-link {
    color: #005bbb;
    text-decoration: none;
    font-weight: bold;
}

.synoptic-object-link:hover,
.synoptic-object-link:focus,
.synoptic-object-link:focus-visible {
    text-decoration: underline;
}

.synoptic-last-event-warning {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    vertical-align: middle;
}

.synoptic-last-event-warning:hover,
.synoptic-last-event-warning:focus,
.synoptic-last-event-warning:focus-visible {
    transform: scale(1.08);
}

.synoptic-col-icon,
.synoptic-icon-cell {
    width: 64px;
}

.synoptic-icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 20px;
    border-radius: 999px;
    text-decoration: none;
    font-size: 15px;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.synoptic-icon-link:hover,
.synoptic-icon-link:focus,
.synoptic-icon-link:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, .12);
}

.synoptic-icon-empty {
    opacity: 0.18;
    cursor: default;
    box-shadow: none;
}

.synoptic-icon-empty:hover,
.synoptic-icon-empty:focus,
.synoptic-icon-empty:focus-visible {
    transform: none;
    box-shadow: none;
}

.synoptic-icon-muted {
    background: #efefef;
    color: #666;
}

.synoptic-icon-alarm {
    background: var(--synoptic-state-bg, var(--event-color-alarm_wlamanie, #FFD6D6));
    color: var(--synoptic-state-fg, #7F1D1D);
}


.synoptic-cell-unhandled {
    animation: synopticCellBlink 1.1s ease-in-out infinite;
}

@keyframes synopticCellBlink {
    0%, 100% {
        background: transparent;
    }
    50% {
        background: #ffd2d2;
    }
}



.synoptic-icon-pozar {
    background: var(--synoptic-state-bg, var(--event-color-pozar, #FFE6D3));
    color: var(--synoptic-state-fg, #7F1D1D);
}

.synoptic-icon-napad {
    background: var(--synoptic-state-bg, var(--event-color-napad, #FFE0E0));
    color: var(--synoptic-state-fg, #7F1D1D);
}

.synoptic-icon-sabotaz {
    background: var(--synoptic-state-bg, var(--event-color-sabotaz, #EDE7F6));
    color: var(--synoptic-state-fg, #1F2937);
}

.synoptic-icon-awarie {
    background: var(--synoptic-state-bg, var(--event-color-awarie, #FFF6C7));
    color: var(--synoptic-state-fg, #1F2937);
}

.synoptic-icon-testy {
    background: var(--synoptic-state-bg, var(--event-color-testy, #E5E7EB));
    color: var(--synoptic-state-fg, #1F2937);
}

.synoptic-icon-techniczne {
    background: var(--synoptic-state-bg, var(--event-color-techniczne, #E0F2FE));
    color: var(--synoptic-state-fg, #1F2937);
}

.synoptic-icon-inne {
    background: var(--synoptic-state-bg, var(--event-color-inne, #DBEAFE));
    color: var(--synoptic-state-fg, #1F2937);
}

.row-focused td {
    position: relative;
    animation: none;
}

.row-focused td::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 193, 7, 0.5); /* pomarańcz */
    pointer-events: none;
    animation: focusOverlayBlink 0.5s ease-in-out 6;
}



@keyframes focusOverlayBlink {
    0%, 100% {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
}


@media (max-width: 900px) {
    .synoptic-object-name-cell {
        min-width: 180px;
    }

    .synoptic-col-icon,
    .synoptic-icon-cell {
        width: 54px;
    }

    .synoptic-icon-link {
        width: 15px;
        height: 20px;
        font-size: 20px;
    }
}

.icon-lock {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 25px;
    height: 25px;
    border-radius: 100%;
    font-size: 15px;
    
}



.lock-armed {
    background: #f7a79e;   /* czerwony */
    color: #fff;
}

.lock-disarmed {
    background: #C0FCD2;   /* mocna zieleń */
    color: #fff;
}

.status-inactive {
    display: inline-block;
    color: #666;
    font-style: italic;
    white-space: nowrap;
}

.object-row-inactive td {
    opacity: 0.6;
}



.synoptic-row-unhandled {
    scroll-margin-top: 10px;
}

.synoptic-row-unhandled td {
    animation: synopticRowBlink 1.1s ease-in-out infinite;
}

@keyframes synopticRowBlink {
    0%, 100% {
        background: transparent;
    }
    50% {
        background: var(--synoptic-row-blink-color, #FFD6D6);
    }
}

.event-color-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.event-color-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
}

.event-color-info label {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
}

.event-color-preview-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.event-color-preview {
    width: 36px;
    height: 22px;
    border-radius: 6px;
    border: 1px solid rgba(0,0,0,0.15);
    display: inline-block;
}

.event-color-code {
    font-family: monospace;
    color: #475569;
}

.event-color-picker-wrap input[type="color"] {
    width: 64px;
    height: 40px;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.settings-colors-form .settings-note {
    margin-top: 12px;
    color: #475569;
}


.event-color-picker-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.event-color-reset-btn {
    white-space: nowrap;
}

.modem-admin-layout {
    display: grid;
    gap: 18px;
}

.modem-admin-block {
    border: 1px solid #dfe5ee;
    border-radius: 10px;
    background: #fff;
    padding: 16px;
}

.modem-admin-block h4 {
    margin-top: 0;
    margin-bottom: 12px;
}

.modem-admin-table {
    margin-top: 0;
}

.modem-admin-table .mono {
    word-break: break-all;
}

.inline-form {
    display: inline;
}

.modem-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-danger-soft {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #ef9a9a;
    background: #fff5f5;
    color: #b42318;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.btn-danger-soft:hover {
    background: #ffe3e3;
}

.settings-note code,
.modem-admin-block code {
    word-break: break-word;
}

.settings-card-head-with-tools {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.session-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.session-summary-card {
    min-height: 45px;
}

.table-scroll-wrap {
    overflow-x: auto;
}

.settings-muted {
    margin-top: 4px;
    color: #64748b;
    font-size: 0.9rem;
	white-space: nowrap;
}

.user-sessions-table td,
.user-sessions-table th {
    vertical-align: center;
}

.user-sessions-table .mono {
    white-space: nowrap;
}

.user-sessions-table .adress {
   word-break: break-word;
   max-width: 200px;
   min-width: 150px;
}

.user-sessions-table .datetime {
   word-break: break-word;
   max-width: 120px;
   min-width: 80px;
}

.sessions-table .nowrap {
    white-space: nowrap;
}

@media (max-width: 900px) {
    .settings-card-head-with-tools {
        flex-direction: column;
        align-items: stretch;
    }
}
