:root {
    --bg: #f4f7fb;
    --panel: #ffffff;
    --panel2: #f8fbfd;
    --stroke: #dbe4ee;
    --text: #0f172a;
    --muted: #64748b;
    --brand: #132b5b;
    --brand-cyan: #2ea7ad;
    --brand-lime: #c8f66a;
    --ok: #1f9d61;
    --warn: #d8a400;
    --danger: #dc3f4f;
    --info: #2ea7ad;
    --chip: #eef9f6;
    --shadow-soft: 0 14px 32px rgba(19, 43, 91, 0.08);
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background:
        radial-gradient(900px 420px at 80% 0%, rgba(46, 167, 173, 0.10), transparent 60%),
        radial-gradient(900px 420px at 10% 0%, rgba(200, 246, 106, 0.12), transparent 60%),
        var(--bg);
    color: var(--text);
    overflow: hidden;
}

#initial-loader {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner-large,
.spinner {
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-large {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--brand);
}

.spinner {
    width: 30px;
    height: 30px;
    border: 3px solid var(--stroke);
    border-top: 3px solid var(--brand);
    display: inline-block;
    margin-bottom: 10px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 14px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.24);
    background: linear-gradient(90deg, #7fd37c 0%, #2ea7ad 45%, #132b5b 100%);
    position: sticky;
    top: 0;
    z-index: 10;
}

.brandShell {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.brand,
.top-actions,
.addBox,
.grid-actions,
.pager,
.pagerBtns,
.noteComposer,
.modal-header-row,
.console-actions-bar,
.console-sms-bar,
.rs-modal__header,
.rs-modal__footer,
.noteTop,
.kv {
    display: flex;
    align-items: center;
}

.brand,
.top-actions,
.addBox,
.grid-actions,
.pagerBtns,
.noteComposer,
.console-actions-bar,
.console-sms-bar,
.rs-modal__footer,
.tabs,
.miniRow,
.row2,
.detailCard,
.notesList,
.historyList {
    gap: 10px;
}

.brand {
    gap: 12px;
}

.top-actions {
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.pager {
    justify-content: space-between;
}

.noteTop,
.kv,
.modal-header-row,
.rs-modal__header {
    justify-content: space-between;
}

.logo {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--brand), #60a5fa);
    display: grid;
    place-items: center;
    font-weight: 900;
    color: #fff;
}

.brandLogo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.18));
}

.brandMeta,
.toolbarActions,
.panelHeaderRow {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.brandMeta {
    color: #fff;
}

.title,
.panelTitle,
.cmdTitle,
.cmdLogTitle,
.noteAuthor,
.modal-title,
.rs-modal__title {
    font-weight: 900;
}

.title,
.subtitle {
    color: #fff;
}

.subtitle,
.muted,
.small,
.panelHint,
.kpiLabel,
.miniLabel,
.noteAt {
    color: var(--muted);
}

.subtitle,
.panelHint,
.kpiLabel,
.miniLabel,
.small,
.noteAt {
    font-size: 12px;
}

.pill,
.btn,
.select,
.addBox input,
.noteComposer input,
.console-sms-bar input,
.input {
    border-radius: 8px;
}

.pill {
    padding: 6px 10px;
    border: 1px solid rgba(19, 43, 91, 0.10);
    font-size: 12px;
    background: rgba(255, 255, 255, 0.88);
}

.brandPill,
.panelPill {
    background: rgba(19, 43, 91, 0.14);
    border-color: rgba(19, 43, 91, 0.12);
    color: var(--brand);
}

.brandMeta .pill {
    color: var(--brand);
}

.addBox input,
.noteComposer input,
.console-sms-bar input,
.input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--stroke);
    background: #fff;
    color: var(--text);
    outline: none;
}

.addBox input {
    width: 380px;
    max-width: 42vw;
}

.addBox input:focus,
.noteComposer input:focus,
.console-sms-bar input:focus,
.input:focus {
    border-color: rgba(31, 111, 235, .45);
    box-shadow: 0 0 0 4px rgba(31, 111, 235, .08);
}

.btn {
    padding: 10px 12px;
    border: 1px solid rgba(19, 43, 91, 0.12);
    background: #fff;
    color: var(--text);
    cursor: pointer;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(19, 43, 91, 0.06);
}

.btn:hover {
    filter: brightness(1.02);
}

.btn:disabled,
.btn:disabled:hover {
    cursor: not-allowed;
    filter: none;
    opacity: .55;
}

.btn.ghost {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.28);
}

.btn.primary {
    border-color: rgba(19, 43, 91, 0.12);
    background: linear-gradient(135deg, #132b5b 0%, #2ea7ad 100%);
    color: #fff;
}

.btn.danger {
    border-color: rgba(220, 63, 79, 0.18);
    background: rgba(255, 255, 255, 0.92);
    color: var(--danger);
}

.select {
    padding: 10px 12px;
    border: 1px solid var(--stroke);
    background: #fff;
    color: var(--text);
}

.kpis {
    display: grid;
    grid-template-columns: repeat(6, minmax(140px, 1fr));
    gap: 10px;
    padding: 12px 16px;
}

.kpi {
    border: 1px solid var(--stroke);
    background: rgba(255, 255, 255, 0.92);
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: transform .06s ease;
    box-shadow: var(--shadow-soft);
}

.kpi:hover {
    transform: translateY(-1px);
}

.kpiValue {
    font-size: 22px;
    font-weight: 900;
    margin-top: 4px;
}

.kpi.ok {
    border-color: rgba(22, 163, 74, .25);
}

.kpi.warn {
    border-color: rgba(245, 158, 11, .25);
}

.kpi.danger {
    border-color: rgba(220, 38, 38, .25);
}

.kpi.info {
    border-color: rgba(37, 99, 235, .25);
}

.main {
    display: grid;
    grid-template-columns: 1.55fr 1fr;
    gap: 12px;
    padding: 0 16px 16px 16px;
    align-items: start;
    height: calc(100vh - 188px);
    overflow: hidden;
}

.panel {
    border: 1px solid var(--stroke);
    background: rgba(255, 255, 255, 0.94);
    border-radius: 8px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
    box-shadow: var(--shadow-soft);
}

.panelHeader {
    padding: 12px 14px;
    border-bottom: 1px solid var(--stroke);
    background: linear-gradient(180deg, rgba(248, 251, 253, 0.96), rgba(255, 255, 255, 0.96));
}

.gridWrap,
.tabBody {
    min-height: 0;
    overflow-y: auto;
}

.gridWrap {
    flex: 1 1 auto;
    padding: 0 14px;
}

.grid {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
    line-height: 1.35;
}

.grid th,
.grid td {
    padding: 11px 10px;
    border-bottom: 1px solid rgba(229, 231, 235, .85);
    vertical-align: top;
}

.grid th {
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 10;
    box-shadow: 0 1px 0 var(--stroke);
    color: var(--text);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.grid th.sortable {
    padding: 0;
}

.gridSort {
    width: 100%;
    min-height: 42px;
    padding: 11px 10px;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font: inherit;
    text-align: left;
    text-transform: inherit;
}

.gridSort:hover,
.gridSort.active {
    color: var(--brand);
    background: rgba(46, 167, 173, .08);
}

.sortIcon {
    min-width: 12px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1;
}

.gridSort.active .sortIcon {
    color: var(--brand);
}

.grid tr:hover td {
    background: rgba(31, 111, 235, .04);
}

.grid td.mono {
    white-space: nowrap;
}

.gridTime {
    font-size: 12px;
    line-height: 1.3;
}

.gridEventName,
.gridAddress {
    color: #334155;
    font-size: 12px;
    line-height: 1.35;
}

.gridEventName {
    font-weight: 800;
}

.gridAddress {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cmdStatus {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    min-width: 132px;
    max-width: 168px;
}

.cmdStatusBadge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 4px 9px;
    border: 1px solid rgba(100, 116, 139, .24);
    border-radius: 999px;
    background: #f8fafc;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
}

.cmdStatusDetail {
    max-width: 100%;
    color: #475569;
    font-size: 11px;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cmdStatus--pending .cmdStatusBadge {
    border-color: rgba(216, 164, 0, .32);
    background: rgba(255, 251, 235, .92);
    color: #9a6b00;
}

.cmdStatus--clear .cmdStatusBadge {
    border-color: rgba(100, 116, 139, .20);
    background: rgba(248, 250, 252, .92);
    color: var(--muted);
}

.cmdStatus--clear_recent .cmdStatusBadge {
    border-color: rgba(31, 157, 97, .28);
    background: rgba(236, 253, 245, .92);
    color: var(--ok);
}

.cmdStatus--stale .cmdStatusBadge,
.cmdStatus--failed .cmdStatusBadge {
    border-color: rgba(220, 63, 79, .24);
    background: rgba(254, 242, 242, .92);
    color: var(--danger);
}

.grid-actions .gridDetailBtn {
    min-height: 28px;
    padding: 4px 9px;
    background: rgba(248, 251, 253, .96);
    border-color: rgba(19, 43, 91, .18);
    color: var(--brand);
    font-size: 11px;
    box-shadow: 0 2px 8px rgba(19, 43, 91, .06);
}

.grid-actions .gridDetailBtn:hover {
    background: #fff;
    border-color: rgba(46, 167, 173, .45);
    color: var(--brand);
}

.historyList .noteTop {
    align-items: flex-start;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 4px 10px;
    height: 28px;
    white-space: nowrap;
    line-height: 1;
    border: 1px solid transparent;
    border-radius: 999px;
    background: rgba(255, 255, 255, .65);
}

.badge.online {
    border-color: rgba(22, 163, 74, .28);
    color: var(--ok);
}

.badge.warn {
    border-color: rgba(245, 158, 11, .28);
    color: var(--warn);
}

.badge.offline {
    border-color: rgba(220, 38, 38, .28);
    color: var(--danger);
}

.badge.tel {
    border-color: rgba(37, 99, 235, .22);
    color: var(--info);
}

.badge.err {
    border-color: rgba(220, 63, 79, .30);
    color: var(--danger);
    background: rgba(254, 242, 242, .90);
}

.badge.notel {
    color: var(--muted);
}

.detailTop {
    padding: 10px 12px;
}

.detailCard {
    border: 1px solid var(--stroke);
    background: rgba(248, 250, 252, .75);
    border-radius: 14px;
    padding: 12px;
    display: grid;
}

.detailCard.compact {
    padding: 8px 10px;
    gap: 6px;
}

.detailCard.compact .k {
    font-size: 10px;
    line-height: 1.05;
    white-space: nowrap;
}

.detailCard.compact .v {
    font-size: 11px;
    font-weight: 900;
    line-height: 1.15;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: right;
}

.detailCard.compact .kv {
    gap: 6px;
    min-width: 0;
}

.detailCard.compact .row2,
.detailCard.compact .row3 {
    display: grid;
    gap: 6px;
}

.detailCard.compact .row2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.detailCard.compact .row3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.detailCard.compact .row4 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
}

.row2,
.miniRow {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.miniCard,
.cmdBox,
.cmdLogWrap,
.note,
.emptyState {
    border-radius: 8px;
}

.miniCard,
.cmdBox,
.cmdLogWrap,
.note {
    border: 1px solid var(--stroke);
    background: rgba(248, 250, 252, .75);
    padding: 10px;
}

.emptyState {
    border: 1px dashed rgba(100, 116, 139, .25);
    padding: 18px;
    text-align: center;
    background: rgba(248, 250, 252, .65);
}

.noteEventDescription {
    margin: 4px 0 0 10px;
    color: #1f2937;
    font-size: 13px;
    font-weight: 900;
    line-height: 1.4;
    text-align: left;
    overflow-wrap: anywhere;
}

.emptyState .big {
    font-size: 32px;
    margin-bottom: 6px;
}

.miniValue,
.kv .v {
    font-weight: 900;
    margin-top: 4px;
}

.tabs {
    display: flex;
    padding: 0 14px 12px 14px;
}

.tab {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--stroke);
    background: rgba(255, 255, 255, .65);
    color: var(--muted);
    cursor: pointer;
    font-weight: 900;
}

.tab.active {
    border-color: rgba(19, 43, 91, 0.16);
    background: rgba(46, 167, 173, 0.10);
    color: var(--brand);
}

.tab.disabled-tab {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
    background: var(--bg) !important;
    border-color: var(--stroke) !important;
    color: var(--muted) !important;
    text-decoration: line-through;
}

#detailPanel {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.tabBody {
    flex: 1 1 auto;
    padding: 0 14px 14px 14px;
    overscroll-behavior: contain;
}

.notesList,
.historyList {
    display: flex;
    flex-direction: column;
    max-height: none !important;
}

.map {
    height: 350px;
    min-height: 300px;
    width: 100%;
    border-radius: 8px;
    margin-bottom: 15px;
}

.cmdLog,
#cmdLog,
#terminalLog {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 12px;
    white-space: pre-wrap;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, .55) transparent;
}

.cmdLog::-webkit-scrollbar,
#cmdLog::-webkit-scrollbar,
#terminalLog::-webkit-scrollbar {
    width: 10px;
}

.cmdLog::-webkit-scrollbar-thumb,
#cmdLog::-webkit-scrollbar-thumb,
#terminalLog::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, .45);
    border-radius: 999px;
}

.cmdLogWrap {
    margin-top: 12px;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 20000 !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    position: relative;
    z-index: 20001 !important;
    background: white;
    padding: 20px;
    border-radius: 8px;
    width: 450px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
}

.serial-option-item {
    padding: 12px;
    border: 1px solid var(--stroke);
    border-radius: 8px;
    margin-top: 10px;
    cursor: pointer;
    transition: .2s;
}

.serial-option-item:hover {
    border-color: var(--brand);
    background: var(--chip);
}

.selected-row {
    background: rgba(31, 111, 235, 0.1) !important;
    border-left: 4px solid var(--brand);
}

.console-modal {
    width: 90%;
    max-width: 900px;
    padding: 0;
    max-height: calc(100vh - 44px);
    overflow-y: auto;
    border-radius: 8px;
}

.console-modal .modal-title {
    font-size: 16px;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.modal-header-row {
    padding: 14px 16px;
    border-bottom: 1px solid var(--stroke);
    background: rgba(248, 250, 252, .95);
}

.btn-close-modal {
    background: transparent;
    border: none;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    color: #64748b;
    padding: 4px 10px;
}

.btn-close-modal:hover {
    color: #0f172a;
}

.console-shortcuts-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    padding: 0 16px 10px 16px;
    background: rgba(255, 255, 255, 0.95);
}

#shortcutHint {
    margin-left: auto;
}

.console-actions-bar {
    padding: 12px 16px;
    background: #f4f4f4;
    flex-wrap: wrap;
    border-bottom: 1px solid #ddd;
}

.console-modal.gprs-blocked .modal-header-row {
    padding: 10px 14px;
}

.console-modal.gprs-blocked .console-actions-bar {
    gap: 6px;
    padding: 8px 12px;
}

.gprsBlockedNotice {
    flex: 1 1 100%;
    border: 1px solid rgba(220, 63, 79, .24);
    background: rgba(254, 242, 242, .88);
    color: var(--danger);
    border-radius: 8px;
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.25;
}

.console-modal.gprs-blocked .btnGprsCommand {
    min-height: 30px;
    padding: 5px 9px;
    border-radius: 7px;
    font-size: 11px;
    line-height: 1.1;
    box-shadow: none;
}

.console-sms-bar {
    padding: 12px 16px;
    border-bottom: 1px solid var(--stroke);
    background: rgba(255, 255, 255, .95);
}

.console-modal.gprs-blocked .console-sms-bar {
    gap: 8px;
    padding: 8px 12px;
}

.console-modal.gprs-blocked .console-sms-bar input {
    padding: 8px 10px;
}

.console-modal.gprs-blocked #btnSendSmsModal,
.console-modal.gprs-blocked .console-shortcuts-bar .btn {
    min-height: 32px;
    padding: 7px 10px;
    font-size: 12px;
}

.console-modal.gprs-blocked .console-shortcuts-bar {
    gap: 6px;
    padding: 0 12px 6px 12px;
}

.console-modal.gprs-blocked #shortcutHint {
    flex: 1 1 100%;
    margin-left: 0;
    font-size: 12px;
    line-height: 1.25;
}

.console-modal.gprs-blocked .console-sms-hint {
    padding: 0 12px 8px 12px;
    font-size: 12px;
}

.console-sms-hint {
    padding: 0 16px 10px 16px;
}

.terminal-wrapper {
    background: #121212;
    margin: 12px 16px 16px 16px;
    border-radius: 8px;
    border: 1px solid #333;
}

.terminal-header {
    background: #222;
    color: #0f0;
    padding: 8px 12px;
    font-family: monospace;
    display: flex;
    justify-content: space-between;
    font-size: 11px;
}

#terminalLog {
    height: 380px;
    padding: 12px;
    color: #e5e7eb;
    background: #111827;
    line-height: 1.45;
    min-height: 140px;
    max-height: 360px;
    margin: 0;
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.btn-refresh-terminal {
    background: none;
    border: 1px solid #0f0;
    color: #0f0;
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 6px;
}

body.modal-open {
    overflow: hidden;
}

.rs-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
}

.rs-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
}

.rs-modal__card {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(520px, calc(100vw - 24px));
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
    overflow: hidden;
}

.rs-modal__header,
.rs-modal__footer {
    padding: 12px 14px;
    border-bottom: 1px solid #e5e7eb;
}

.rs-modal__footer {
    border-bottom: 0;
    border-top: 1px solid #e5e7eb;
    justify-content: flex-end;
}

.rs-modal__body {
    padding: 14px;
}

.leaflet-control,
.leaflet-top,
.leaflet-bottom {
    z-index: 1000 !important;
}

body.modal-open .leaflet-control,
body.modal-open .leaflet-top,
body.modal-open .leaflet-bottom {
    z-index: 0 !important;
}

.login-page {
    overflow: auto;
}

.loginLayout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(320px, 1.1fr) minmax(320px, 420px);
    align-items: stretch;
}

.loginHero {
    padding: 48px;
    background: linear-gradient(135deg, #132b5b 0%, #2ea7ad 58%, #c8f66a 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
}

.loginHeroLogo {
    width: 84px;
    height: auto;
}

.loginBadge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    font-size: 12px;
    font-weight: 800;
}

.loginHeadline {
    margin: 0;
    max-width: 12ch;
    font-size: 42px;
    line-height: 1.05;
}

.loginCopy {
    margin: 0;
    max-width: 52ch;
    color: rgba(255, 255, 255, 0.86);
    font-size: 15px;
    line-height: 1.6;
}

.loginCard {
    margin: auto 24px auto 0;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--stroke);
    border-radius: 8px;
    padding: 28px;
    box-shadow: 0 18px 42px rgba(19, 43, 91, 0.16);
}

.loginCardHeader {
    margin-bottom: 18px;
}

.loginCardTitle {
    font-size: 28px;
    font-weight: 900;
    color: var(--brand);
}

.loginCardSub {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
}

.loginForm {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.formRow {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.formRow label {
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
}

.formRow input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--stroke);
    border-radius: 8px;
    background: #fff;
    outline: none;
    color: var(--text);
}

.formRow input:focus {
    border-color: rgba(46, 167, 173, 0.5);
    box-shadow: 0 0 0 4px rgba(46, 167, 173, 0.12);
}

.loginSubmit {
    width: 100%;
    justify-content: center;
}

.err {
    margin-bottom: 14px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(220, 63, 79, 0.18);
    background: rgba(220, 63, 79, 0.08);
    color: #b42318;
    font-weight: 700;
    font-size: 13px;
}

.hint {
    color: var(--muted);
    font-size: 12px;
}

@media (max-width: 1200px) {
    .topbar {
        flex-direction: column;
        align-items: stretch;
    }

    .top-actions,
    .toolbarActions {
        justify-content: flex-start;
    }

    .addBox input {
        max-width: 100%;
        width: 100%;
    }

    .main {
        grid-template-columns: 1fr;
        height: auto;
    }

    body {
        overflow: auto;
    }
}

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

    .loginHero {
        min-height: 44vh;
        padding: 28px 20px;
    }

    .loginHeadline {
        font-size: 34px;
        max-width: 16ch;
    }

    .loginCard {
        margin: -24px 12px 24px 12px;
        padding: 22px;
    }

    .kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .topbar,
    .kpis,
    .main {
        padding-left: 12px;
        padding-right: 12px;
    }

    .topbar {
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .kpis {
        gap: 8px;
    }

    .tabs {
        flex-wrap: wrap;
    }

    .row2,
    .miniRow,
    .detailCard.compact .row3,
    .detailCard.compact .row4,
    .detailCard.compact .row2 {
        grid-template-columns: 1fr;
    }

    .gridWrap {
        padding: 0 10px;
    }
}

.loading-btn {
    opacity: 0.6;
    pointer-events: none;
    cursor: wait;
}

.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

@media (max-width: 1200px) {
    .kpis {
        grid-template-columns: repeat(3, 1fr);
    }

    .main {
        grid-template-columns: 1fr;
    }

    .addBox input {
        width: 240px;
    }
}

@media (max-width: 900px) {

    .topbar,
    .top-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .console-shortcuts-bar {
        flex-direction: column;
        align-items: stretch;
    }

    #shortcutHint {
        margin-left: 0;
    }
}

