:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-strong: rgba(15, 23, 42, 0.95);
    --border: rgba(148, 163, 184, 0.22);
    --muted: #94a3b8;
    --text: #f8fafc;
    --blue: #3b82f6;
    --green: #22c55e;
    --red: #ef4444;
    --orange: #f97316;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 18% 18%, rgba(37, 99, 235, 0.22), transparent 30%),
        radial-gradient(circle at 82% 25%, rgba(14, 165, 233, 0.16), transparent 28%),
        linear-gradient(135deg, #020617 0%, #0f172a 52%, #020617 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-card {
    width: min(430px, 100%);
    padding: 42px 38px;
    border: 1px solid var(--border);
    border-radius: 22px;
    text-align: center;
    background: var(--panel);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(16px);
}

.brand-mark,
.brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2563eb, #4338ca);
    box-shadow: 0 12px 35px rgba(37, 99, 235, 0.42);
}

.brand-mark {
    width: 74px;
    height: 74px;
    margin: 0 auto 24px;
    border-radius: 50%;
    font-size: 24px;
    font-weight: 800;
}

.login-card h1 {
    margin: 0;
    font-size: 42px;
    letter-spacing: 0;
}

.login-subtitle {
    margin: 12px 0 28px;
    color: #cbd5e1;
    font-size: 17px;
}

.login-form {
    display: grid;
    gap: 18px;
    padding-top: 26px;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.login-form label {
    display: grid;
    gap: 8px;
    text-align: left;
    color: #cbd5e1;
    font-size: 13px;
}

.login-form input {
    width: 100%;
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 12px;
    outline: none;
    background: rgba(2, 6, 23, 0.55);
    color: white;
    font-size: 16px;
}

.login-form input::placeholder {
    color: var(--muted);
}

.login-form input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.login-form button {
    width: 100%;
    padding: 16px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.35);
}

.login-form button:hover {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.login-footer {
    margin: 26px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.dashboard-shell {
    display: grid;
    grid-template-columns: 292px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    min-height: 0;
    overflow: hidden;
    padding: 24px 18px;
    border-right: 1px solid var(--border);
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(18px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    flex: 0 0 auto;
}

.brand-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    border-radius: 12px;
    font-weight: 800;
    overflow: hidden;
}

.brand-icon img,
.brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.brand strong,
.brand small {
    display: block;
}

.brand small {
    margin-top: 3px;
    color: var(--muted);
}

.nav-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    flex: 1 1 auto;
    gap: 7px;
    min-height: 0;
    margin-top: 22px;
    overflow-y: auto;
    padding: 0 4px 12px 0;
    scrollbar-gutter: stable;
}

.nav-item {
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
    min-height: 40px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: #cbd5e1;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
    min-width: 0;
}

.nav-section-toggle {
    appearance: none;
    -webkit-appearance: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 40px;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: #e2e8f0;
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.25;
    text-align: left;
    cursor: pointer;
}

.nav-section-toggle:hover,
.nav-section.active .nav-section-toggle {
    border-color: rgba(59, 130, 246, 0.35);
    background: rgba(37, 99, 235, 0.13);
    color: #f8fafc;
}

.nav-section-toggle:focus-visible,
.nav-item:focus-visible {
    outline: 2px solid rgba(147, 197, 253, 0.75);
    outline-offset: 2px;
}

.nav-section-chevron {
    flex: 0 0 auto;
    margin-left: 10px;
    color: var(--muted);
    transition: transform 0.16s ease;
}

.nav-section.expanded .nav-section-chevron {
    transform: rotate(180deg);
}

.nav-section-items {
    display: none;
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    min-width: 0;
    padding: 2px 0 4px 12px;
    border-left: 1px solid rgba(148, 163, 184, 0.16);
    margin-left: 12px;
}

.nav-section.expanded .nav-section-items {
    display: grid;
}

.nav-child {
    min-height: 34px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 14px;
    color: #aebfd4;
}

.nav-item:hover,
.nav-item.active {
    border-color: rgba(59, 130, 246, 0.35);
    background: rgba(37, 99, 235, 0.16);
    color: white;
}

.nav-child.active {
    border-color: rgba(34, 197, 94, 0.34);
    background: rgba(34, 197, 94, 0.12);
    color: #dcfce7;
    box-shadow: inset 3px 0 0 rgba(34, 197, 94, 0.75);
}

.sidebar-footer {
    flex: 0 0 auto;
    margin: 18px 10px 0;
    padding-top: 16px;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.sidebar-footer > span {
    min-width: 0;
}

.sidebar-footer small {
    display: block;
    margin-top: 2px;
    color: #64748b;
}

.logout-form {
    grid-column: 2;
}

.logout-form button {
    padding: 0;
    border: 0;
    background: transparent;
    color: #93c5fd;
    font-weight: 700;
    cursor: pointer;
}

.status-dot {
    width: 9px;
    height: 9px;
    flex: 0 0 auto;
    border-radius: 999px;
    background: var(--green);
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.6);
}

.main-panel {
    min-width: 0;
    padding: 34px;
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.header-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.eyebrow {
    margin: 0 0 8px;
    color: #93c5fd;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.page-header h1 {
    margin: 0;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1;
    letter-spacing: 0;
}

.page-subtitle {
    margin: 12px 0 0;
    color: #cbd5e1;
}

.dashboard-header-actions {
    display: grid;
    justify-items: end;
    gap: 10px;
}

.refresh-pill {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.6);
    color: #cbd5e1;
    white-space: nowrap;
}

.dashboard-refresh-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.dashboard-refresh-controls button,
.dashboard-refresh-controls select {
    min-height: 34px;
    padding: 0 11px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.72);
    color: #dbeafe;
    font-weight: 700;
}

.dashboard-refresh-controls button {
    cursor: pointer;
}

.dashboard-refresh-controls button:hover,
.dashboard-refresh-controls select:hover {
    border-color: rgba(59, 130, 246, 0.42);
}

.dashboard-refresh-controls .is-paused {
    border-color: rgba(249, 115, 22, 0.38);
    color: #fed7aa;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.dashboard-metrics {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

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

.metric-card,
.panel,
.mini-card,
.list-card {
    border: 1px solid var(--border);
    background: var(--panel);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(14px);
}

.metric-card {
    min-height: 120px;
    padding: 20px;
    border-radius: 16px;
}

.metric-card span,
.mini-card span {
    color: var(--muted);
    font-size: 13px;
    text-transform: uppercase;
}

.metric-card strong {
    display: block;
    margin-top: 18px;
    font-size: 38px;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.quick-action {
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 13px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.62);
}

.quick-action:hover {
    border-color: rgba(59, 130, 246, 0.42);
    background: rgba(37, 99, 235, 0.14);
}

.quick-action span {
    overflow: hidden;
    color: var(--text);
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.quick-action small {
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.compact-metrics {
    margin: 0 0 18px;
}

.compact-metrics .metric-card {
    min-height: 92px;
}

.compact-metrics .metric-card strong {
    margin-top: 12px;
    font-size: 28px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.attention-panel {
    grid-column: span 3;
    min-height: auto;
}

.attention-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.attention-summary span {
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 12px;
    background: rgba(2, 6, 23, 0.24);
    color: var(--muted);
}

.attention-summary strong {
    margin-right: 4px;
    color: var(--text);
}

.attention-item {
    display: grid;
    grid-template-columns: auto minmax(0, 0.5fr) minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.68);
}

.attention-item:hover {
    border-color: rgba(59, 130, 246, 0.42);
    background: rgba(37, 99, 235, 0.12);
}

.attention-item strong,
.attention-item small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.attention-item small {
    color: var(--muted);
}

.alert-centre-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.alert-centre-grid {
    margin-bottom: 18px;
}

.smart-alert-panel {
    grid-column: span 2;
    min-height: auto;
}

.repeat-alert-panel {
    grid-column: span 1;
    min-height: auto;
}

.smart-alert-card {
    grid-template-columns: auto minmax(0, 0.45fr) minmax(0, 1fr);
}

.bulk-alert-toolbar {
    min-height: auto;
    margin-bottom: 18px;
}

.alert-centre-table td {
    vertical-align: top;
}

.alert-centre-table td strong,
.alert-centre-table td small {
    display: block;
    max-width: 420px;
    overflow-wrap: anywhere;
}

.inline-alert-form {
    display: grid;
    grid-template-columns: minmax(80px, 1fr) minmax(100px, 1.2fr) auto;
    gap: 6px;
    margin-top: 8px;
}

.inline-alert-form input {
    min-width: 0;
    min-height: 32px;
    padding: 7px 8px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    background: rgba(2, 6, 23, 0.5);
    color: var(--text);
}

.alert-actions {
    align-items: flex-start;
}

.priority-panel {
    grid-column: span 1;
    min-height: 360px;
}

.fleet-map-panel {
    grid-column: span 2;
    min-height: 360px;
}

.priority-card-grid,
.fleet-map {
    display: grid;
    gap: 10px;
}

.priority-action-card {
    display: grid;
    gap: 8px;
    min-width: 0;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.68);
}

.priority-action-card:hover {
    border-color: rgba(59, 130, 246, 0.46);
    background: rgba(37, 99, 235, 0.14);
}

.priority-action-card.online {
    border-color: rgba(34, 197, 94, 0.28);
}

.priority-action-card.warning {
    border-color: rgba(245, 158, 11, 0.38);
}

.priority-action-card.error {
    border-color: rgba(239, 68, 68, 0.38);
}

.priority-action-card strong,
.priority-action-card small {
    overflow: hidden;
    text-overflow: ellipsis;
}

.priority-action-card strong {
    color: var(--text);
    line-height: 1.25;
}

.priority-action-card small {
    color: var(--muted);
    line-height: 1.4;
}

.fleet-map-filters {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.fleet-map-filters select {
    min-width: 0;
    min-height: 36px;
    padding: 0 10px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.72);
    color: #dbeafe;
}

.fleet-map {
    max-height: 430px;
    overflow: auto;
    padding-right: 4px;
}

.fleet-map-pin {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    padding: 13px 14px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 12px;
    background: rgba(2, 6, 23, 0.26);
}

.fleet-map-pin:hover {
    border-color: rgba(59, 130, 246, 0.46);
    background: rgba(37, 99, 235, 0.12);
}

.pin-dot {
    width: 13px;
    height: 13px;
    margin-top: 4px;
    border-radius: 50%;
    background: var(--muted);
    box-shadow: 0 0 0 5px rgba(148, 163, 184, 0.12);
}

.fleet-map-pin.online .pin-dot {
    background: var(--green);
    box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.12);
}

.fleet-map-pin.warning .pin-dot {
    background: var(--amber);
    box-shadow: 0 0 0 5px rgba(245, 158, 11, 0.12);
}

.fleet-map-pin.offline .pin-dot {
    background: var(--red);
    box-shadow: 0 0 0 5px rgba(239, 68, 68, 0.12);
}

.fleet-map-pin div {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.fleet-map-pin strong,
.fleet-map-pin small,
.fleet-map-pin span,
.fleet-map-pin em {
    overflow: hidden;
    min-width: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fleet-map-pin strong {
    color: var(--text);
}

.fleet-map-pin small,
.fleet-map-pin span,
.fleet-map-pin em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.panel {
    min-height: 380px;
    padding: 18px;
    border-radius: 16px;
}

.server-panel {
    grid-column: span 3;
    min-height: auto;
}

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

.panel-heading h2 {
    margin: 0;
    font-size: 20px;
}

.panel-heading a {
    color: #93c5fd;
    font-size: 14px;
}

.dashboard-panel-tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    margin-bottom: 14px;
}

.dashboard-panel-tools input,
.dashboard-panel-tools select {
    min-width: 0;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 10px;
    background: rgba(2, 6, 23, 0.35);
    color: var(--text);
}

.dashboard-panel-tools input::placeholder {
    color: var(--muted);
}

.stack-list {
    display: grid;
    gap: 12px;
}

.list-card {
    padding: 14px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.68);
}

.list-card h3 {
    margin: 0 0 8px;
    font-size: 17px;
}

.dashboard-list-card {
    display: grid;
    gap: 10px;
}

.list-card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.list-card-heading > div {
    min-width: 0;
}

.list-card-heading h3 {
    overflow: hidden;
    margin-bottom: 4px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.list-card-heading .badge {
    flex: 0 0 auto;
}

.list-card p {
    margin: 5px 0;
    color: #cbd5e1;
}

.dashboard-error-card {
    border-color: rgba(239, 68, 68, 0.34);
    color: #fecaca;
}

.dashboard-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}

.dashboard-card-meta span {
    min-width: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-card-meta a {
    flex: 0 0 auto;
    color: #93c5fd;
    font-size: 13px;
    font-weight: 700;
}

.small,
.list-card small,
.mini-card small {
    color: var(--muted);
    font-size: 13px;
}

.server-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.mini-card {
    display: grid;
    gap: 8px;
    padding: 16px;
    border-radius: 12px;
}

.mini-card strong {
    font-size: 20px;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.12);
    color: #cbd5e1;
    font-size: 12px;
    text-transform: capitalize;
}

.badge.warning {
    border-color: rgba(249, 115, 22, 0.35);
    background: rgba(249, 115, 22, 0.12);
    color: #fed7aa;
}

.badge.online {
    border-color: rgba(34, 197, 94, 0.34);
    background: rgba(22, 101, 52, 0.24);
    color: #bbf7d0;
}

.badge.error {
    border-color: rgba(239, 68, 68, 0.4);
    background: rgba(127, 29, 29, 0.28);
    color: #fecaca;
}

.badge.simulator {
    border: 1px solid rgba(168, 85, 247, 0.35);
    background: rgba(88, 28, 135, 0.28);
    color: #e9d5ff;
}

.badge.not-monitored {
    border-color: rgba(148, 163, 184, 0.24);
    background: rgba(15, 23, 42, 0.55);
    color: #cbd5e1;
}

.badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0;
}

.action-link,
.row-action,
.filter-form button,
.command-actions button,
.resolve-button {
    border: 1px solid rgba(59, 130, 246, 0.35);
    border-radius: 10px;
    background: rgba(37, 99, 235, 0.16);
    color: #bfdbfe;
    font-weight: 700;
}

.action-link,
.row-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.action-link {
    padding: 11px 14px;
}

.row-action {
    padding: 7px 10px;
    font-size: 13px;
}

.machine-primary-link {
    display: inline-block;
    font-weight: 700;
    color: #bfdbfe;
}

.machine-id-secondary {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.35;
}

.machine-link {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    text-align: left;
}

.machine-link small {
    color: var(--muted);
    font-weight: 400;
}

.filter-form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-form select,
.filter-form input {
    min-width: 140px;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.85);
    color: white;
}

.filter-form button,
.command-actions button,
.resolve-button,
.inline-action-form button {
    padding: 11px 14px;
    cursor: pointer;
}

.inline-action-form button {
    border: 1px solid rgba(59, 130, 246, 0.35);
    border-radius: 10px;
    background: rgba(37, 99, 235, 0.16);
    color: #bfdbfe;
    font-weight: 700;
}

.resolve-button {
    padding: 7px 10px;
    color: #bbf7d0;
    border-color: rgba(34, 197, 94, 0.35);
    background: rgba(34, 197, 94, 0.12);
}

.table-panel {
    min-height: auto;
}

.table-wrap {
    width: 100%;
    overflow-x: visible;
}

table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

th,
td {
    padding: 14px 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0;
    text-transform: uppercase;
}

td {
    color: #dbeafe;
    max-width: 280px;
    overflow-wrap: anywhere;
    word-break: normal;
}

tbody tr:hover {
    background: rgba(15, 23, 42, 0.55);
}

.machines-list-panel {
    width: 100%;
    min-width: 0;
}

.machines-list-panel .panel-heading {
    align-items: center;
}

.bulk-machines-form {
    display: grid;
    gap: 14px;
}

.machine-card-list {
    display: grid;
    gap: 12px;
    width: 100%;
    min-width: 0;
}

.machine-row-card {
    display: grid;
    grid-template-columns: minmax(240px, 0.9fr) minmax(0, 1.7fr) minmax(88px, auto);
    gap: 16px;
    align-items: center;
    width: 100%;
    min-width: 0;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.58);
}

.machine-row-card:hover {
    border-color: rgba(59, 130, 246, 0.28);
    background: rgba(15, 23, 42, 0.72);
}

.retired-machine-card {
    border-color: rgba(248, 113, 113, 0.18);
    background: rgba(30, 41, 59, 0.58);
}

.machine-card-identity {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    min-width: 0;
}

.machine-card-identity.no-select {
    grid-template-columns: minmax(0, 1fr);
}

.machine-select-control {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}

.machine-select-control input {
    width: 16px;
    height: 16px;
    accent-color: #60a5fa;
}

.machine-name-block {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.machine-primary-link {
    color: #e0f2fe;
    font-weight: 800;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.machine-id-secondary {
    display: block;
    font-size: 12px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.machine-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.machine-card-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
    gap: 10px 16px;
    min-width: 0;
    margin: 0;
}

.retired-machine-card .machine-card-metrics {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.machine-metric {
    min-width: 0;
}

.machine-metric dt {
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.machine-metric dd {
    margin: 0;
    color: #dbeafe;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.machine-metric dd small {
    display: block;
    margin-top: 4px;
}

.machine-card-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    min-width: 0;
}

.machine-card-actions .row-action {
    min-width: 88px;
    text-align: center;
    white-space: nowrap;
}

.machine-list-empty {
    border: 1px dashed rgba(148, 163, 184, 0.22);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.42);
}

.empty-cell {
    padding: 30px 12px;
    color: var(--muted);
    text-align: center;
}

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

.notice {
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.7);
    color: #cbd5e1;
}

.notice.success {
    border-color: rgba(34, 197, 94, 0.35);
    color: #bbf7d0;
}

.notice.error {
    border-color: rgba(239, 68, 68, 0.35);
    color: #fecaca;
}

.notice.warning {
    border-color: rgba(249, 115, 22, 0.38);
    color: #fed7aa;
}

.session-warning {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 60;
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: min(520px, calc(100vw - 32px));
    padding: 16px;
    border: 1px solid rgba(250, 204, 21, 0.35);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.96);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    color: #fde68a;
}

.session-warning[hidden] {
    display: none;
}

.session-warning strong,
.session-warning span {
    display: block;
}

.session-warning span {
    margin-top: 4px;
    color: #fef3c7;
    font-size: 13px;
}

.session-warning-actions {
    display: flex;
    gap: 8px;
    flex: 0 0 auto;
}

.session-warning-actions button {
    padding: 9px 11px;
    border: 1px solid rgba(250, 204, 21, 0.28);
    border-radius: 9px;
    background: rgba(250, 204, 21, 0.12);
    color: #fef3c7;
    font-weight: 800;
    cursor: pointer;
}

.contract-preview {
    max-height: 620px;
    overflow: auto;
    white-space: pre-wrap;
    line-height: 1.6;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(2, 6, 23, 0.55);
    color: #e2e8f0;
}

.contract-sign-card {
    width: min(760px, 100%);
    text-align: left;
}

.public-preview {
    max-height: 300px;
    margin-top: 18px;
}

.one-time-token {
    min-height: auto;
    margin-bottom: 18px;
}

.one-time-token code {
    display: block;
    padding: 14px;
    border: 1px solid rgba(250, 204, 21, 0.35);
    border-radius: 10px;
    background: rgba(113, 63, 18, 0.22);
    color: #fde68a;
}

.branding-preview {
    width: 96px;
    height: 96px;
    object-fit: contain;
    padding: 8px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    background: rgba(2, 6, 23, 0.45);
}

.branding-preview.small-preview {
    width: 48px;
    height: 48px;
}

.command-panel {
    min-height: auto;
    margin-bottom: 18px;
}

.command-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.command-actions form,
.command-actions button {
    width: 100%;
}

.danger-command-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

.danger-command-form {
    padding: 12px;
    border: 1px solid rgba(239, 68, 68, 0.26);
    border-radius: 12px;
    background: rgba(127, 29, 29, 0.14);
}

.danger-command-form button {
    width: 100%;
    padding: 11px 14px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
}

.confirm-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: #facc15;
    font-size: 13px;
}

.confirm-row input {
    accent-color: #facc15;
}

.stack-form {
    display: grid;
    gap: 12px;
}

.stack-form label {
    display: grid;
    gap: 6px;
    color: #cbd5e1;
    font-size: 13px;
}

.stack-form input,
.stack-form select,
.stack-form textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.85);
    color: white;
}

.stack-form button {
    padding: 11px 14px;
    border: 1px solid rgba(59, 130, 246, 0.35);
    border-radius: 10px;
    background: rgba(37, 99, 235, 0.16);
    color: #bfdbfe;
    font-weight: 700;
    cursor: pointer;
}

.permission-list,
.module-grid {
    display: grid;
    gap: 10px;
}

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

.permission-list span {
    padding: 8px 10px;
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 10px;
    background: rgba(2, 6, 23, 0.28);
    color: #cbd5e1;
    font-size: 13px;
}

.module-copy {
    margin: 0 0 18px;
    color: #cbd5e1;
    line-height: 1.6;
}

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

code {
    color: #c4b5fd;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.detail-wide {
    grid-column: span 2;
}

.server-list,
.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.server-card {
    min-height: auto;
}

.definition-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 0;
}

.definition-grid div {
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 12px;
    background: rgba(2, 6, 23, 0.28);
}

.definition-grid dt {
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
}

.definition-grid dd {
    margin: 0;
    color: #e0f2fe;
    overflow-wrap: anywhere;
}

.health-grid dd small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
}

.health-value {
    min-width: 0;
    word-break: break-word;
}

.wide-definition {
    grid-column: span 2;
}

.remote-access-grid {
    display: grid;
    grid-template-columns: minmax(320px, 0.9fr) minmax(360px, 1.1fr);
    gap: 18px;
    margin-bottom: 18px;
}

.remote-access-panel {
    min-height: auto;
}

.remote-machine-list {
    display: grid;
    gap: 10px;
}

.remote-machine-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 12px;
    background: rgba(2, 6, 23, 0.3);
}

.remote-machine-card.active {
    border-color: rgba(59, 130, 246, 0.42);
    background: rgba(37, 99, 235, 0.12);
}

.remote-machine-card h3 {
    margin: 0 0 4px;
    font-size: 16px;
    overflow-wrap: anywhere;
}

.remote-machine-card p {
    margin: 0;
    overflow-wrap: anywhere;
}

.remote-machine-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
}

.terminal-warning {
    margin: 16px 0;
    padding: 14px;
    border: 1px solid rgba(249, 115, 22, 0.32);
    border-radius: 12px;
    background: rgba(67, 20, 7, 0.28);
    color: #fed7aa;
}

.terminal-warning p {
    margin: 8px 0 0;
    color: #fdba74;
}

.remote-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.empty-state {
    padding: 24px;
    border: 1px dashed rgba(148, 163, 184, 0.28);
    border-radius: 12px;
    color: var(--muted);
}

.disabled-button {
    padding: 7px 10px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 10px;
    background: rgba(148, 163, 184, 0.08);
    color: var(--muted);
    cursor: not-allowed;
}

.bulk-action-panel {
    display: grid;
    grid-template-columns: minmax(180px, 240px) minmax(240px, 320px) auto;
    gap: 12px;
    align-items: end;
    margin-bottom: 16px;
    max-width: 860px;
    padding: 14px;
    border: 1px solid rgba(239, 68, 68, 0.22);
    border-radius: 12px;
    background: rgba(127, 29, 29, 0.16);
}

.bulk-action-panel label {
    display: grid;
    gap: 6px;
    color: #fecaca;
    font-size: 13px;
}

.bulk-action-panel input {
    min-height: 40px;
    width: 100%;
    padding: 9px 11px;
    border: 1px solid rgba(248, 113, 113, 0.28);
    border-radius: 10px;
    background: rgba(2, 6, 23, 0.55);
    color: white;
}

.machine-actions-panel,
.hmi-panel {
    min-height: auto;
    margin-bottom: 18px;
}

.machine-actions-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    gap: 14px;
}

.hmi-layout {
    display: grid;
    grid-template-columns: minmax(260px, 0.8fr) minmax(320px, 1.2fr);
    gap: 22px;
    align-items: center;
}

.hmi-machine-frame {
    position: relative;
    min-height: 430px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.75), rgba(2, 6, 23, 0.65)),
        radial-gradient(circle at 50% 18%, rgba(59, 130, 246, 0.18), transparent 34%);
    display: grid;
    place-items: center;
}

.hmi-machine-frame svg {
    width: min(100%, 300px);
    height: auto;
}

.hmi-shell {
    fill: rgba(30, 41, 59, 0.96);
    stroke: rgba(148, 163, 184, 0.42);
    stroke-width: 2;
}

.hmi-screen {
    fill: rgba(14, 165, 233, 0.16);
    stroke: rgba(125, 211, 252, 0.38);
}

.hmi-slot,
.hmi-base {
    fill: rgba(2, 6, 23, 0.8);
    stroke: rgba(148, 163, 184, 0.35);
}

.hmi-door {
    fill: rgba(15, 23, 42, 0.86);
    stroke: rgba(59, 130, 246, 0.42);
}

.hmi-bottle {
    fill: rgba(186, 230, 253, 0.26);
    stroke: rgba(224, 242, 254, 0.6);
}

.hmi-flow {
    stroke: rgba(148, 163, 184, 0.5);
    stroke-width: 5;
    stroke-linecap: round;
}

.hmi-flow.active {
    stroke: var(--green);
    filter: drop-shadow(0 0 10px rgba(34, 197, 94, 0.8));
}

.hmi-led.ok {
    fill: var(--green);
}

.hmi-led.alarm {
    fill: var(--red);
}

.hmi-led.muted {
    fill: var(--muted);
}

.hmi-mode-fault,
.hmi-mode-retired,
.hmi-mode-offline {
    border-color: rgba(239, 68, 68, 0.42);
}

.hmi-mode-cleaning,
.hmi-mode-updating {
    border-color: rgba(14, 165, 233, 0.42);
}

.hmi-fill-meter {
    position: absolute;
    right: 22px;
    bottom: 48px;
    width: 16px;
    height: 230px;
    overflow: hidden;
    border: 1px solid rgba(186, 230, 253, 0.42);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.78);
}

.hmi-fill-meter span {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    min-height: 2px;
    background: linear-gradient(180deg, #e0f2fe, #38bdf8);
}

.hmi-readouts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.hmi-readout {
    min-height: 84px;
    padding: 13px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 12px;
    background: rgba(2, 6, 23, 0.3);
}

.hmi-readout span {
    display: block;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
}

.hmi-readout strong {
    display: block;
    color: #e0f2fe;
    font-size: 20px;
    text-transform: capitalize;
}

.component-status-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.component-status-card {
    min-width: 0;
    padding: 13px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 12px;
    background: rgba(2, 6, 23, 0.3);
}

.component-status-card span {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
}

.component-status-card strong {
    display: block;
    overflow: hidden;
    color: #e0f2fe;
    font-size: 18px;
    text-overflow: ellipsis;
    text-transform: capitalize;
    white-space: nowrap;
}

.component-status-card.status-error {
    border-color: rgba(239, 68, 68, 0.34);
}

.component-status-card.status-warning {
    border-color: rgba(245, 158, 11, 0.34);
}

.machine-quick-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.machine-timeline-panel {
    min-height: auto;
    margin-bottom: 18px;
}

.machine-timeline {
    display: grid;
    gap: 10px;
}

.timeline-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 12px 14px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 12px;
    background: rgba(2, 6, 23, 0.28);
}

.timeline-dot {
    width: 12px;
    height: 12px;
    margin-top: 4px;
    border-radius: 999px;
    background: var(--muted);
    box-shadow: 0 0 0 5px rgba(148, 163, 184, 0.1);
}

.timeline-item.status-online .timeline-dot,
.timeline-item.status-success .timeline-dot,
.timeline-item.status-healthy .timeline-dot {
    background: var(--green);
}

.timeline-item.status-warning .timeline-dot,
.timeline-item.status-open .timeline-dot,
.timeline-item.status-acknowledged .timeline-dot,
.timeline-item.status-sent .timeline-dot,
.timeline-item.status-queued .timeline-dot {
    background: var(--amber);
}

.timeline-item.status-error .timeline-dot,
.timeline-item.status-critical .timeline-dot,
.timeline-item.status-failed .timeline-dot,
.timeline-item.status-offline .timeline-dot {
    background: var(--red);
}

.timeline-item strong,
.timeline-item small {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
}

.timeline-item small {
    margin-top: 4px;
    color: var(--muted);
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 18px;
    color: var(--muted);
}

.pagination a {
    padding: 8px 12px;
    border: 1px solid rgba(59, 130, 246, 0.35);
    border-radius: 10px;
    background: rgba(37, 99, 235, 0.16);
    color: #bfdbfe;
    font-weight: 700;
}

.pagination span {
    padding: 8px 12px;
    color: #64748b;
}

.online {
    color: var(--green);
}

.offline {
    color: var(--red);
}

.warning {
    color: var(--orange);
}

.status-queued {
    color: #facc15;
}

.status-sent {
    color: #38bdf8;
}

.status-completed,
.status-success {
    color: var(--green);
}

.status-failed,
.status-error {
    color: var(--red);
}

.status-fresh,
.status-online,
.status-valid,
.status-grace {
    color: var(--green);
}

.status-stale,
.status-warning,
.status-pending,
.status-unknown {
    color: var(--orange);
}

.status-offline,
.status-retired,
.status-expired,
.status-invalid,
.status-revoked {
    color: var(--red);
}

@media (max-width: 980px) {
    .dashboard-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: relative;
        height: auto;
        min-height: auto;
        overflow: visible;
    }

    .sidebar-footer {
        margin: 24px 10px 0;
    }

    .nav-list {
        flex: none;
        overflow: visible;
        grid-template-columns: minmax(0, 1fr);
    }

    .nav-section-items {
        padding-left: 0;
    }

    .metric-grid,
    .quick-actions,
    .dashboard-grid,
    .fleet-kpis,
    .fleet-map-filters,
    .alert-centre-metrics,
    .component-status-grid,
    .machine-quick-actions,
    .server-grid,
    .detail-grid,
    .server-list,
    .settings-grid,
    .hmi-layout,
    .remote-access-grid {
        grid-template-columns: 1fr 1fr;
    }

    .server-panel,
    .attention-panel,
    .fleet-map-panel,
    .smart-alert-panel,
    .detail-wide {
        grid-column: span 2;
    }

    .command-actions,
    .danger-command-actions,
    .machine-actions-grid,
    .hmi-readouts,
    .attention-summary,
    .remote-action-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .machine-row-card {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .machine-card-metrics,
    .retired-machine-card .machine-card-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .machine-card-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .main-panel {
        padding: 22px;
    }

    .session-warning {
        left: 16px;
        right: 16px;
        bottom: 16px;
        display: grid;
    }

    .session-warning-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .page-header {
        display: grid;
    }

    .dashboard-header-actions {
        justify-items: stretch;
    }

    .dashboard-refresh-controls {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .nav-list,
    .metric-grid,
    .quick-actions,
    .dashboard-grid,
    .fleet-kpis,
    .fleet-map-filters,
    .alert-centre-metrics,
    .component-status-grid,
    .machine-quick-actions,
    .server-grid,
    .detail-grid,
    .server-list,
    .settings-grid,
    .hmi-layout,
    .hmi-readouts,
    .bulk-action-panel,
    .machine-actions-grid,
    .permission-list,
    .module-grid,
    .definition-grid,
    .remote-access-grid,
    .attention-summary,
    .dashboard-panel-tools,
    .inline-alert-form,
    .remote-action-grid,
    .command-actions,
    .danger-command-actions {
        grid-template-columns: 1fr;
    }

    .server-panel,
    .attention-panel,
    .priority-panel,
    .fleet-map-panel,
    .smart-alert-panel,
    .repeat-alert-panel,
    .detail-wide,
    .wide-definition {
        grid-column: auto;
    }

    .attention-item {
        grid-template-columns: 1fr;
    }

    .machine-card-identity {
        grid-template-columns: 1fr;
    }

    .machine-card-metrics,
    .retired-machine-card .machine-card-metrics {
        grid-template-columns: 1fr;
    }

    .filter-form {
        align-items: stretch;
        flex-direction: column;
    }

    .pagination {
        align-items: stretch;
        flex-direction: column;
    }

    .remote-machine-card {
        grid-template-columns: 1fr;
    }

    .remote-machine-meta {
        justify-content: flex-start;
    }

}

.toolbar-panel,
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    align-items: end;
}

.toolbar-panel label,
.form-grid label {
    display: grid;
    gap: 8px;
    color: #cbd5e1;
    font-size: 13px;
}

.toolbar-panel input,
.toolbar-panel select,
.toolbar-panel textarea,
.form-grid input,
.form-grid select,
.form-grid textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 10px;
    background: rgba(2, 6, 23, 0.55);
    color: var(--text);
}

.toolbar-panel button,
.form-grid button {
    min-height: 44px;
    padding: 0 16px;
    border: 0;
    border-radius: 10px;
    background: #2563eb;
    color: white;
    font-weight: 700;
    cursor: pointer;
}

.form-wide {
    grid-column: 1 / -1;
}

.toggle-row {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    align-items: center;
}

.toggle-row label {
    display: flex;
    grid-template-columns: none;
    gap: 8px;
    align-items: center;
}

.form-note {
    color: var(--muted);
    min-height: 20px;
}

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

.rewards-tabs {
    margin-bottom: 18px;
}

.inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.action-cell {
    min-width: 160px;
}

.table-row-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    align-items: center;
    justify-content: flex-start;
}

.table-row-actions .inline-form {
    display: inline-flex;
    flex-wrap: nowrap;
    margin: 0;
}

.inline-form input,
.inline-form select {
    min-height: 36px;
    max-width: 180px;
    padding: 6px 10px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 8px;
    background: rgba(2, 6, 23, 0.55);
    color: var(--text);
}

.inline-form button {
    min-height: 36px;
    padding: 0 12px;
    border: 0;
    border-radius: 8px;
    background: #2563eb;
    color: #fff;
    cursor: pointer;
}

.machine-updates-table th:last-child,
.machine-updates-table td:last-child {
    width: 330px;
}

.machine-update-action-cell {
    min-width: 300px;
    vertical-align: middle;
}

.machine-update-controls select {
    width: 168px;
    max-width: 168px;
}

.machine-update-controls button {
    white-space: nowrap;
}

@media (max-width: 640px) {
    .table-row-actions,
    .table-row-actions .inline-form {
        align-items: stretch;
        flex-wrap: wrap;
    }

    .machine-update-controls select {
        width: 100%;
        max-width: 100%;
    }
}

.danger-button {
    border: 1px solid rgba(239, 68, 68, 0.45) !important;
    background: rgba(127, 29, 29, 0.45) !important;
    color: #fecaca !important;
}

.status-ok {
    color: var(--green);
}

.status-low {
    color: var(--orange);
}

.status-empty {
    color: var(--red);
}

.status-unknown {
    color: var(--muted);
}

.analytics-grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
}

.recommendation.warning {
    border-color: rgba(249, 115, 22, 0.5);
}

.recommendation.critical {
    border-color: rgba(239, 68, 68, 0.65);
}

.public-display {
    min-height: 100vh;
    overflow: hidden;
    background:
        linear-gradient(130deg, rgba(2, 6, 23, 0.85), rgba(15, 23, 42, 0.7)),
        radial-gradient(circle at 15% 25%, rgba(34, 197, 94, 0.2), transparent 28%),
        radial-gradient(circle at 85% 20%, rgba(59, 130, 246, 0.22), transparent 30%),
        #020617;
}

.display-stage {
    min-height: 100vh;
    padding: clamp(24px, 5vw, 72px);
    display: grid;
    grid-template-rows: auto 1fr;
    gap: clamp(24px, 4vw, 56px);
}

.display-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.display-header h1 {
    margin: 0;
    font-size: clamp(36px, 7vw, 92px);
    letter-spacing: 0;
}

.display-header span {
    color: #cbd5e1;
    font-size: clamp(14px, 2vw, 24px);
}

.display-widget-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: clamp(18px, 3vw, 36px);
    align-content: stretch;
}

.display-widget {
    min-height: 220px;
    padding: clamp(22px, 4vw, 44px);
    border: 1px solid rgba(226, 232, 240, 0.22);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(16px);
    display: grid;
    align-content: center;
    gap: 14px;
}

.display-widget span {
    color: #bae6fd;
    text-transform: uppercase;
    letter-spacing: 0;
    font-size: clamp(13px, 1.5vw, 18px);
    font-weight: 700;
}

.display-widget strong {
    font-size: clamp(36px, 7vw, 86px);
    line-height: 1;
    letter-spacing: 0;
}

.display-widget small {
    color: #cbd5e1;
    font-size: clamp(16px, 2vw, 28px);
}

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

    .display-header {
        align-items: flex-start;
        flex-direction: column;
    }
}
