html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* Splash screen */
.splash-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    animation: splash-fade-in 0.3s ease;
}

body.splashing nav {
    visibility: hidden;
}

.splash-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 1rem;
    margin: auto;
}

.splash-logo {
    max-width: 400px;
    width: 100%;
    animation: splash-pulse 1.5s ease-in-out infinite;
}

.splash-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #1b6ec2;
    letter-spacing: 0.05em;
}

.splash-spinner {
    margin-top: 0.5rem;
}

.splash-message {
    font-size: 0.95rem;
}

@keyframes splash-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes splash-pulse {
    0%, 100% { transform: scale(1);    opacity: 1; }
    50%       { transform: scale(1.05); opacity: 0.85; }
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff !important;
    background-color: #1b6ec2 !important;
    border-color: #1861ac !important;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjI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IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* style the entire popup element */
div.k-window.popup-window {
    border: 1px solid #2596be;
    box-shadow: 1px 5px 5px;
}

    /* titlebar */
    div.k-window.popup-window .k-window-titlebar {
        background: #FBFFFF;
    }

    /* title */
    div.k-window.popup-window .k-window-title {
        color: #063970;
        font-weight: 600;
    }

    /* content container */
    div.k-window.popup-window .k-window-content {
        background: whitesmoke;
    }


.MyTelerikNotification .k-notification-container .k-notification {
    width: 300px;
    height: 50px;
    font-size: 1.5em;
    text-align: center;
    align-items: center;
}

.k-listbox {
    height: 560px;
}

#first-listbox {
    width: 270px;
}

#connected-listbox {
    margin-left: 0.6em;
    width: 232px;
}

#first-listbox1 {
    width: 270px;
}

#connected-listbox1 {
    margin-left: 0.6em;
    width: 232px;
}

.demo-section label {
    margin-bottom: 5px;
    font-weight: bold;
    display: inline-block;
}

.customSeparator .k-menu-link-text {
    color: white;
}

.customSeparator .k-svg-icon > svg {
    color: white
}

.customSeparator .k-menu-vertical > .k-separator {
    border-color: white;
    color: white;
}

.customSeparator .k-item k-separator {
    border-color: white;
    color: white;
}

.nav-pills .nav-link.active, .nav-pills .show > .nav-link {
    background-color: navy !important;
    color: white !important;
    font-weight: 500 !important;
}

.dropdown-item.active, .dropdown-item:active {
    background-color: navy !important;
}

.dropdown-menu.show {
    box-shadow: 5px 5px 12px grey;
}

.submitbutton {
    width: 190px;
    box-shadow: 4px 2px 7px grey;
    margin-bottom: 4px;
}

    .submitbutton:hover {
        box-shadow: 1px 1px 1px grey;
    }

.k-tabstrip-top > .k-content, .k-tabstrip-top > .k-tabstrip-content {
    background-color: lightskyblue;
}


.k-tabstrip-top > .k-tabstrip-items-wrapper .k-active {
    background-color: lightskyblue;
}

.k-tabstrip-items .k-link {
    color: black;
    font-weight: 600;
}

.card-header {
    background-color: darkkhaki;
    font-weight: 600;
    color: black;
}

.card-body {
    background-color: beige;
}

/* .k-textbox .k-disabled {
        background-color: lightgrey;
    }

    .k-input-solid .k-disabled {
        background-color: lightgrey;
        color: black;
    }

    .k-tabstrip-content .k-textbox .k-input .form-control .k-disabled
    {
        background-color: lightgrey;
        color: black;
    } */

.disabledControl {
    background-color: #e9ecef !important;
}


input[type=checkbox] {
    /* Double-sized Checkboxes */
    -ms-transform: scale(1); /* IE */
    -moz-transform: scale(1); /* FF */
    -webkit-transform: scale(1); /* Safari and Chrome */
    -o-transform: scale(1); /* Opera */
    transform: scale(1);
    padding: 10px;
    margin-left: 12px;
}

/* Might want to wrap a span around your checkbox text */
.checkboxtext {
    /* Checkbox text */
    font-size: 110%;
    display: inline;
}


/*.demo-notification {
    position: absolute;
}

    .demo-notification .k-notification {
        width: 530px;
    }

.k-notification-container {
    margin: 125px 0;
}

#demo-runner {
    height: 320px;
}
*/


/*.k-checkbox:checked, .k-checkbox.k-checked {
    --bs-form-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e") !important;
    background-color: red !important;
    opacity: 0.8;
}

.k-checkbox:checked, .k-checkbox.k-checked, input[type="checkbox"] {
    appearance: auto;  
}

k-table-row, k-selected {
    background-color: black;
    color: black;
}*/

/* Modern Container Styles */
.persons-grid-container {
    padding: 24px;
    background-color: #f8f9fa;
    min-height: 100vh;
}

/* Header Styles */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    padding: 20px 0;
    border-bottom: 2px solid #e9ecef;
}

.header-content {
    flex: 1;
}

.page-title {
    font-size: 2rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

    .page-title i {
        color: #3498db;
        font-size: 1.8rem;
    }

.page-description {
    color: #6c757d;
    font-size: 1rem;
    margin: 0;
    line-height: 1.5;
}

.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Modern Button Styles */
.btn-modern {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

    .btn-modern:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.15);
        text-decoration: none;
    }

.btn-primary.btn-modern {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* Info Card Styles */
.info-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
}

.info-icon {
    font-size: 2rem;
    opacity: 0.9;
}

.info-content {
    flex: 1;
    line-height: 1.5;
}

    .info-content .text-muted {
        color: rgba(255, 255, 255, 0.8);
    }

/* Grid Container */
.grid-container {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Grid Toolbar */
.grid-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 16px;
    width: 100%;
}

.toolbar-left,
.toolbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.export-options {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 16px;
    border-left: 1px solid #e9ecef;
}

.checkbox-label {
    font-size: 0.9rem;
    color: #6c757d;
    margin: 0;
    cursor: pointer;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.btn-action {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-edit {
    background-color: #28a745;
    border-color: #28a745;
}

    .btn-edit:hover {
        background-color: #218838;
        transform: translateY(-1px);
    }

.btn-view {
    background-color: #17a2b8;
    border-color: #17a2b8;
}

    .btn-view:hover {
        background-color: #138496;
        transform: translateY(-1px);
    }

/* Status Badges */
.status-badge {
    display: flex;
    justify-content: center;
}

.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.badge-inactive {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Filter Menu Styles */
.filter-menu {
    padding: 16px;
    min-width: 200px;
}

.filter-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #495057;
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #e9ecef;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
}

.filter-label {
    font-size: 0.875rem;
    color: #495057;
    margin: 0;
    cursor: pointer;
    flex: 1;
}

/* Group Footer */
.group-footer {
    background-color: #f8f9fa;
    padding: 8px 12px;
    border-radius: 4px;
    color: #495057;
}

/* Modern Grid Overrides */
.modern-grid {
    border: none;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Row Highlighting - Updated */
.highlightCellBackGround {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%) !important;
    color: #856404 !important;
    font-weight: 500 !important;
}

.negativeValuesRowFormatting {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%) !important;
    color: #721c24 !important;
    font-weight: 500 !important;
}

.positiveValuesRowFormatting {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%) !important;
    color: #155724 !important;
    font-weight: 500 !important;
}

/* Export Buttons */
.btn-export,
.btn-reset {
    border-radius: 6px;
    padding: 8px 16px;
    font-weight: 500;
    transition: all 0.2s ease;
}

    .btn-export:hover,
    .btn-reset:hover {
        transform: translateY(-1px);
    }

/* Responsive Design */
@@media (max-width: 768px) {
    .persons-grid-container {
        padding: 16px;
    }

    .page-header {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }

    .grid-toolbar {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }

    .toolbar-left,
    .toolbar-right {
        justify-content: center;
    }

    .action-buttons {
        flex-direction: column;
        gap: 4px;
    }

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

/* ── Crew assignment grid — unavailable conflict row ─────────────────── */
.rrm-row-danger td {
    background-color: #fef2f2 !important;
    border-top: 1px solid #fca5a5 !important;
    border-bottom: 1px solid #fca5a5 !important;
}

.rrm-row-danger:hover td {
    background-color: #fee2e2 !important;
}

/* ── Train summary stat tiles ────────────────────────────────────────── */
.rrm-stat-tile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    height: 100%;
}

.rrm-stat-icon {
    font-size: 1.6rem;
    flex-shrink: 0;
    width: 2.25rem;
    text-align: center;
}

.rrm-stat-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.rrm-stat-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6c757d;
    white-space: nowrap;
}

.rrm-stat-value {
    font-size: 1rem;
    font-weight: 600;
    color: #212529;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
