body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Drawer section styling - iOS-inspired cards */
.drawer-section {
    background: #f5f5f7;
    padding: 16px;
    margin-bottom: 12px;
    border-radius: 12px;
}

.drawer-section:last-child {
    margin-bottom: 0;
}

/* Drawer section header with icon */
.drawer-section-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.drawer-section-header > i {
    font-size: 24px;
    color: #0071e3;
    flex-shrink: 0;
    margin-top: 2px;
}

.drawer-section-header .drawer-section-title {
    margin-bottom: 2px;
}

.drawer-section-title {
    font-weight: 600;
    font-size: 14px;
    color: #1d1d1f;
    text-transform: none;
    letter-spacing: -0.01em;
    margin-bottom: 12px;
    display: block;
}

.drawer-section-subtitle {
    font-size: 12px;
    color: #86868b;
    font-weight: 400;
    line-height: 1.4;
}

/* Legacy support for old title format */
.drawer-section-title i {
    font-size: 16px;
    color: #86868b;
}

.drawer-section-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.drawer-section-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.drawer-section-row:first-child {
    padding-top: 0;
}

.drawer-section-label {
    font-size: 14px;
    font-weight: 400;
    color: #1d1d1f;
    letter-spacing: -0.01em;
}

/* Compact form controls in drawers - iOS style */
.card-body .form-control,
.card-body .form-select {
    padding: 6px 10px;
    font-size: 13px;
    border-radius: 6px;
    border: 1px solid #d2d2d7;
    background-color: #fff;
    color: #1d1d1f;
    transition: border-color 0.15s ease;
}

.card-body .form-control:focus,
.card-body .form-select:focus {
    border-color: #0071e3;
    box-shadow: 0 0 0 2px rgba(0, 113, 227, 0.12);
}

.card-body .form-control::placeholder {
    color: #86868b;
}

.card-body textarea.form-control {
    padding: 8px 10px;
}

/* Disabled state for form controls */
.card-body .form-control:disabled,
.card-body .form-select:disabled,
.card-body .form-control[readonly] {
    background-color: #f5f5f7;
    color: #86868b;
    border-color: #e5e5e7;
    cursor: not-allowed;
    opacity: 0.8;
}

.card-body .form-label {
    font-size: 13px;
    margin-bottom: 6px;
    font-weight: 400;
    color: #1d1d1f;
    letter-spacing: -0.01em;
}

.card-body textarea.form-control {
    padding: 0.5rem 0.65rem;
}

/* Compact grid rows inside drawer sections */
.drawer-section .k-grid td,
.drawer-section .k-grid th {
    padding: 8px 10px;
    vertical-align: middle;
}

.drawer-section .k-grid .k-table-row {
    height: auto;
}

.drawer-section .k-grid .k-command-cell {
    padding: 4px 6px;
    vertical-align: middle;
}

.drawer-section .k-grid .k-grid-content .k-button,
.drawer-section .k-grid .k-command-cell .k-button {
    padding: 2px 4px;
    min-width: unset;
    min-height: unset;
    line-height: 1;
}

.drawer-section .k-grid .k-command-cell .k-button .k-svg-icon {
    width: 16px;
    height: 16px;
}

/* Badge text colors */
.badge.bg-success,
.badge.bg-primary,
.badge.bg-danger,
.badge.bg-info {
    color: #fff !important;
}

/* Compact toolbar buttons in drawer sections */
.drawer-section .k-toolbar .btn {
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
}

.drawer-section .k-toolbar .btn-outline-secondary {
    border-color: #c4c4c4;
    color: #444;
}

.drawer-section .k-toolbar .btn-outline-secondary:hover {
    background-color: #f5f5f5;
    border-color: #aaa;
}

/* Native OS-style buttons for drawer footer */
.card-footer .btn {
    font-weight: 500;
    font-size: 13px;
    padding: 5px 12px;
    border-radius: 5px;
    transition: all 0.1s ease;
    box-shadow: 0 1px 0 rgba(27, 31, 35, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.card-footer .btn-light {
    background: linear-gradient(180deg, #fafbfc 0%, #f0f1f3 100%);
    border: 1px solid #d1d5da;
    color: #24292f;
}

.card-footer .btn-light:hover {
    background: linear-gradient(180deg, #f3f4f6 0%, #e9eaec 100%);
    border-color: #c5c9d0;
}

.card-footer .btn-light:active {
    background: #e9eaec;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.card-footer .btn-primary {
    background: linear-gradient(180deg, #7c5cff 0%, #6b4ce6 100%);
    border: 1px solid #5a3fd6;
    color: #fff;
}

.card-footer .btn-primary:hover {
    background: linear-gradient(180deg, #8b6fff 0%, #7a5bf5 100%);
    border-color: #6b4ce6;
}

.card-footer .btn-primary:active {
    background: #6b4ce6;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);
}

.card-footer .btn-primary:disabled {
    background: linear-gradient(180deg, #b8a8f5 0%, #a99ae6 100%);
    border-color: #a99ae6;
    cursor: not-allowed;
    opacity: 0.7;
}

.customCardInput {
    height: 3rem;
    width: 100%;
    box-sizing: border-box;
    background-color: #fff;
    border-radius: 3px;
    color: #000;
    border: 2px solid #0a0c0d;
    text-indent: 8px;
    font-size: 1.2rem;
    margin-bottom: 8px;
    padding: 10px;
}

.customCardInput input {
    border: 2px solid #0a0c0d;
    color: #FFFFFF;
    padding: 10px;
    font-size: 1.2rem;
}

.hover-scroll-overlay-y {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    max-height: 100% !important;
}


.k-checkbox-md {
    width: 1.3rem !important;
    height: 1.3rem !important;
}

.k-button-text {
    font-weight: 600;
}

.k-column-title, .k-header {
    font-size: 94%;
    font-weight: 600;
}

#console {
    color: white;
    font-family: monospace;
    height: 600px;
    width: 100%;
    position:relative;
    background-color: black;
    margin: 0 auto;
}

#console .jqconsole {
    padding: 10px;
}

#console .jqconsole-cursor {
    background-color: gray;
}

#console .jqconsole-blurred .jqconsole-cursor {
    background-color: #666;
}

#console .jqconsole-prompt {
    color: #0d0;
}

#console .jqconsole-old-prompt {
    color: #0b0;
    font-weight: normal;
}

#console .jqconsole-input {
    color: #dd0;
}

#console .jqconsole-old-input {
    color: #bb0;
    font-weight: normal;
}

#console .jqconsole-output {
    color: white;
}

::placeholder { /* Chrome, Firefox, and Safari */
    color: #d3d3d3 !important;
    opacity: 1 !important; /* Firefox */
}

:-ms-input-placeholder { /* Internet Explorer 10-11 */
    color: #d3d3d3 !important;
}

::-ms-input-placeholder { /* Microsoft Edge */
    color: #d3d3d3 !important;
}


#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 3.5rem;
    top: 0.5rem;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

/* Lockswitch Grid Styling */

/* Grid container */
.ls-grid {
    margin: 0;
}

.ls-table {
    margin: 0;
    font-size: 13px;
}

.ls-table thead th {
    font-weight: 600;
    font-size: 12px;
    color: #5e6278;
    padding: 8px 10px;
    border-bottom: 1px solid #e4e6ef;
    background: transparent;
}

.ls-table tbody td {
    padding: 6px 10px;
    vertical-align: middle;
    border-bottom: 1px solid #f1f1f4;
}

.ls-table tbody tr:hover {
    background: #f9fafb;
}

.ls-table tbody tr.deleted {
    opacity: 0.4;
    text-decoration: line-through;
}

/* Port number */
.ls-port {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #3699ff;
    color: #fff;
    font-weight: 600;
    font-size: 12px;
    border-radius: 4px;
}

.ls-port.blocked {
    background: #f1416c;
}

/* Status toggle */
.ls-status {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.ls-status.on {
    background: #e8fff3;
    color: #50cd89;
}

.ls-status.off {
    background: #f5f8fa;
    color: #a1a5b7;
}

.ls-status:hover {
    transform: scale(1.05);
}

/* Text input */
.ls-input {
    width: 100%;
    padding: 4px 8px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 13px;
    background: transparent;
    transition: all 0.15s ease;
}

.ls-input:hover {
    background: #f5f8fa;
}

.ls-input:focus {
    outline: none;
    border-color: #3699ff;
    background: #fff;
}

/* Time input */
.ls-time-input {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ls-time-input input {
    width: 50px;
    padding: 4px 6px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 13px;
    text-align: right;
    background: transparent;
    transition: all 0.15s ease;
}

.ls-time-input input:hover {
    background: #f5f8fa;
}

.ls-time-input input:focus {
    outline: none;
    border-color: #3699ff;
    background: #fff;
}

.ls-time-input span {
    color: #a1a5b7;
    font-size: 12px;
}

/* Hide number input spinners */
.ls-time-input input::-webkit-outer-spin-button,
.ls-time-input input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.ls-time-input input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Relay selector buttons */
.ls-relay-select {
    display: flex;
    gap: 2px;
}

.ls-relay-btn {
    width: 22px;
    height: 22px;
    padding: 0;
    border: 1px solid #e4e6ef;
    border-radius: 3px;
    background: #fff;
    color: #a1a5b7;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.ls-relay-btn:hover {
    border-color: #3699ff;
    color: #3699ff;
}

.ls-relay-btn.active.trigger {
    background: #e8fff3;
    border-color: #50cd89;
    color: #50cd89;
}

.ls-relay-btn.active.block {
    background: #fff5f8;
    border-color: #f1416c;
    color: #f1416c;
}

/* Checkbox */
.ls-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #3699ff;
}

/* Delete button */
.ls-delete {
    padding: 4px 6px;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: #a1a5b7;
    cursor: pointer;
    transition: all 0.15s ease;
}

.ls-delete:hover {
    background: #fff5f8;
    color: #f1416c;
}

/* Section header badge */
.section-header-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #f5f8fa;
    color: #7e8299;
    font-weight: 600;
    font-size: 11px;
    border-radius: 10px;
    margin-left: 8px;
}

.section-header-badge.configured {
    background: #e8fff3;
    color: #50cd89;
}

/* ==========================================================================
   Dashboard Enterprise Styling
   iOS/Apple-inspired design system for KPI dashboards
   ========================================================================== */

/* Dashboard KPI Cards - Base styling */
.dashboard-card {
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    min-height: 180px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    overflow: hidden;
    border: none;
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    text-decoration: none;
}

.dashboard-card:active {
    transform: translateY(0);
}

/* KPI Value Typography - Large, prominent numbers */
.dashboard-kpi-value {
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1;
    margin-bottom: 4px;
}

/* KPI Label Typography */
.dashboard-kpi-label {
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: -0.01em;
}

/* Large card icon in top right corner */
.dashboard-card {
    position: relative !important;
    overflow: visible;
}

.dashboard-card .dashboard-card-icon {
    position: absolute !important;
    top: 20px !important;
    right: 20px !important;
    font-size: 2.75rem;
    line-height: 1;
    z-index: 1;
}

/* Card Color Variants - Enterprise color palette */
.dashboard-card-primary {
    background-color: #1a1d29;
    background-image: url('jobbs/media/svg/shapes/wave-bg-dark.svg');
}

.dashboard-card-danger {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.dashboard-card-danger-alt {
    background: linear-gradient(135deg, #ff6b6b 0%, #e74c3c 100%);
}

.dashboard-card-warning {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
}

.dashboard-card-purple {
    background: linear-gradient(135deg, #8e44ad 0%, #9b59b6 100%);
}

.dashboard-card-success {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
}

.dashboard-card-info {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

/* Dashboard Chart Cards */
.dashboard-chart-card {
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
}

.dashboard-chart-card .card-header {
    border-bottom: none;
    padding-bottom: 0;
    flex-shrink: 0;
}

.dashboard-chart-card .card-body {
    padding: 20px 24px 24px 24px;
    flex: 1;
    min-height: 300px;
}

.dashboard-chart-card .card-body .k-chart {
    height: 100% !important;
    min-height: 250px;
}

/* Dashboard Table Styling */
.dashboard-table {
    margin: 0;
}

.dashboard-table thead th {
    border-bottom: 1px solid #f1f3f5;
    padding: 12px 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.dashboard-table tbody tr {
    transition: background-color 0.15s ease;
}

.dashboard-table tbody tr:hover {
    background-color: #f8f9fa;
}

.dashboard-table tbody tr.cursor-pointer {
    cursor: pointer;
}

.dashboard-table tbody tr.cursor-pointer:hover {
    background-color: #e9ecef;
}

/* Utility class */
.cursor-pointer {
    cursor: pointer;
}

.dashboard-table tbody td {
    padding: 14px 8px;
    border-bottom: 1px solid #f1f3f5;
    vertical-align: middle;
}

.dashboard-table tbody tr:last-child td {
    border-bottom: none;
}

/* Dashboard Status Badges - Pill design */
.dashboard-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.dashboard-badge-success {
    background-color: #d4edda;
    color: #155724;
}

.dashboard-badge-warning {
    background-color: #fff3cd;
    color: #856404;
}

.dashboard-badge-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.dashboard-badge-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* Responsive adjustments for dashboard cards */
@media (max-width: 1400px) {
    .dashboard-kpi-value {
        font-size: 1.75rem;
    }

    .dashboard-card {
        min-height: 160px;
    }
}

@media (max-width: 768px) {
    .dashboard-card {
        min-height: 140px;
        border-radius: 12px;
    }

    .dashboard-kpi-value {
        font-size: 1.5rem;
    }

    .dashboard-chart-card {
        border-radius: 12px;
    }
}
