:root {
    --brand-accent: #2d5282;
    --brand-accent-hover: #24426a;
    --sidebar-width: 250px;
    --header-height: 56px;
    --primary-color: #16283f;
    --secondary-color: #16283f;
    --accent-color: #2d5282;
    --bg-color: #f8f9fa;
    --text-muted: #6c757d;
    --radius: 4px;
    --bs-border-radius: var(--radius);
    --bs-border-radius-sm: var(--radius);
    --bs-border-radius-lg: var(--radius);
    --bs-border-radius-xl: var(--radius);
    --bs-border-radius-2xl: var(--radius);
    --bs-primary: #2d5282;
    --bs-primary-rgb: 45, 82, 130;
    --bs-link-color: #2d5282;
    --bs-link-color-rgb: 45, 82, 130;
    --bs-link-hover-color: #24426a;
    --bs-link-hover-color-rgb: 36, 66, 106;
    --bs-focus-ring-color: rgba(45, 82, 130, 0.25);
}
html {
    height: 100%;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}
* {
    -webkit-tap-highlight-color: transparent;
}
body {
    height: 100%;
    background-color: var(--bg-color);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    padding: 0;
    overflow: hidden;
    overscroll-behavior: none;
}
.navbar-dark {
    background-color: var(--primary-color) !important;
}
.sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--header-height));
    height: calc(100dvh - var(--header-height));
    background-color: var(--secondary-color);
    padding-top: 1rem;
    overflow-y: auto;
}
.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.75rem 1.25rem;
    border-left: 3px solid transparent;
}
.sidebar .nav-link:hover,
.sidebar .nav-link:active {
    color: rgba(255, 255, 255, 0.8);
    background-color: transparent;
    border-left-color: transparent;
}@media (hover: hover) {

.sidebar .nav-link:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
    border-left-color: var(--accent-color);
}
}
.sidebar .nav-link:focus {
    color: rgba(255, 255, 255, 0.8);
    background-color: transparent;
    box-shadow: none;
    outline: none;
}
.sidebar .nav-link:focus-visible {
    color: #fff;
    outline: 2px solid rgba(255, 255, 255, 0.4);
    outline-offset: -2px;
    box-shadow: none;
}
.sidebar .nav-link.active,
.sidebar .nav-link.active:focus {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
    border-left-color: var(--accent-color);
}
.sidebar .nav-link i {
    margin-right: 0.5rem;
    width: 20px;
    text-align: center;
}
.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--header-height);
    padding: 1.5rem;
    height: calc(100vh - var(--header-height));
    height: calc(100dvh - var(--header-height));
    overflow-y: auto;
    overscroll-behavior: none;
}
.main-content.no-sidebar {
    margin-left: 0;
}
.card {
    border: none;
    border-radius: var(--radius);
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}
.card-header {
    background-color: #fff;
    border-bottom: 1px solid #e9ecef;
    border-radius: var(--radius) var(--radius) 0 0;
    font-weight: 600;
}
.btn {
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}@media (hover: hover) {

.btn-primary:hover {
    background-color: var(--brand-accent-hover);
    border-color: var(--brand-accent-hover);
}
}
.btn-primary:active,
.btn-primary:focus-visible,
.btn-primary:active:focus-visible,
.btn-primary.active,
.btn-primary:first-child:active,
.btn-check:checked + .btn-primary,
.btn-check:active + .btn-primary {
    background-color: #1f3a5e !important;
    border-color: #1f3a5e !important;
    box-shadow: none !important;
}
.btn-primary:disabled,
.btn-primary.disabled {
    background-color: var(--accent-color) !important;
    border-color: var(--accent-color) !important;
    opacity: 0.65;
}
a {
    color: var(--accent-color);
}@media (hover: hover) {

a:hover {
    color: var(--brand-accent-hover);
}
}
.text-muted a {
    color: var(--text-muted);
}@media (hover: hover) {

.text-muted a:hover {
    color: var(--accent-color);
}
}
.btn-secondary:active,
.btn-secondary:focus-visible,
.btn-secondary:active:focus-visible,
.btn-secondary:first-child:active {
    background-color: #5a6268 !important;
    border-color: #545b62 !important;
}
.btn-outline-secondary:active,
.btn-outline-secondary:focus-visible,
.btn-outline-secondary:active:focus-visible,
.btn-outline-secondary:first-child:active {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    color: #fff !important;
}
.btn-outline-light:active,
.btn-outline-light:focus-visible,
.btn-outline-light:active:focus-visible,
.btn-outline-light:first-child:active {
    background-color: rgba(255,255,255,0.2) !important;
    border-color: #fff !important;
    color: #fff !important;
}
.btn:focus:not(:focus-visible),
.btn:active:focus:not(:focus-visible) {
    outline: none !important;
    box-shadow: none !important;
}
.btn:focus-visible {
    box-shadow: 0 0 0 0.25rem rgba(45, 82, 130, 0.25);
}
.btn-outline-primary {
    --bs-btn-color: #2d5282;
    --bs-btn-border-color: #2d5282;
    --bs-btn-hover-bg: #2d5282;
    --bs-btn-hover-border-color: #2d5282;
    --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: #1f3a5e;
    --bs-btn-active-border-color: #1f3a5e;
    --bs-btn-active-color: #fff;
    --bs-btn-focus-shadow-rgb: 45, 82, 130;
}
.btn-link {
    --bs-btn-color: #2d5282;
    --bs-btn-hover-color: #24426a;
    --bs-btn-active-color: #24426a;
    --bs-btn-focus-shadow-rgb: 45, 82, 130;
}
.dropdown-menu {
    --bs-dropdown-link-active-color: #fff;
    --bs-dropdown-link-active-bg: #2d5282;
}
.list-group {
    --bs-list-group-active-bg: #2d5282;
    --bs-list-group-active-border-color: #2d5282;
    --bs-list-group-action-active-bg: #e9ecef;
    --bs-list-group-action-active-color: #212529;
}
.pagination {
    --bs-pagination-color: #2d5282;
    --bs-pagination-hover-color: #24426a;
    --bs-pagination-focus-color: #24426a;
    --bs-pagination-active-bg: #2d5282;
    --bs-pagination-active-border-color: #2d5282;
    --bs-pagination-focus-box-shadow: 0 0 0 0.25rem rgba(45, 82, 130, 0.25);
}
.nav-pills {
    --bs-nav-pills-link-active-bg: #2d5282;
}
.progress {
    --bs-progress-bar-bg: #2d5282;
}
.form-check-input:checked {
    background-color: #2d5282;
    border-color: #2d5282;
}
.form-check-input:focus {
    border-color: #9ca3af;
    box-shadow: none;
}
.form-switch .form-check-input:focus:not(:checked) {
    --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%280, 0, 0, 0.25%29'/%3e%3c/svg%3e");
}
.form-range::-webkit-slider-thumb {
    background-color: #2d5282;
}
.form-range::-moz-range-thumb {
    background-color: #2d5282;
}
.table th {
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}
.badge-role {
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
}
.login-container {
    max-width: 400px;
    width: 100%;
}
.login-card .btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}@media (hover: hover) {

.login-card .btn-primary:hover {
    background-color: #22395c;
    border-color: #22395c;
}
}
.login-card .btn-primary:active,
.login-card .btn-primary:disabled {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}
.login-card {
    border: 1px solid #d0d6de;
    border-radius: var(--radius);
    box-shadow: 0 1px 2px rgba(13, 27, 42, 0.04), 0 2px 6px rgba(13, 27, 42, 0.05) !important;
}
.login-header {
    text-align: center;
    padding: 2rem 0 1rem;
}
.form-control,
.form-select {
    border-radius: var(--radius);
    border: 1px solid #d1d5db;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    background-color: #fff;
    transition: border-color 0.15s ease-in-out;
}
.form-control:focus,
.form-select:focus {
    border-color: #9ca3af;
    box-shadow: none;
    background-color: #fff;
}@media (hover: hover) {

.form-control:hover:not(:focus):not(:disabled),
.form-select:hover:not(:focus):not(:disabled) {
    border-color: #b0b5bc;
}
}
.form-control::placeholder {
    color: #9ca3af;
    font-size: 0.875rem;
}
.form-control:disabled,
.form-select:disabled {
    background-color: #f3f4f6;
    color: #6b7280;
}
.form-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.35rem;
}
.form-text {
    font-size: 0.75rem;
    color: #6b7280;
}
.form-check-input {
    border-radius: 2px;
    border: 1px solid #d1d5db;
    width: 1rem;
    height: 1rem;
}
.form-check-input[type="radio"] {
    border-radius: 50%;
}
.form-check-input:focus {
    border-color: #9ca3af;
    box-shadow: none;
}
.form-check-input:checked {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}
.form-check-label {
    font-size: 0.875rem;
    color: #374151;
}
.input-group-text {
    border-radius: var(--radius);
    border: 1px solid #d1d5db;
    background-color: #f9fafb;
    font-size: 0.875rem;
    color: #6b7280;
}
textarea.form-control {
    min-height: 80px;
}
.btn {
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
}
.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.8125rem;
}
.btn-lg {
    padding: 0.625rem 1.25rem;
    font-size: 1rem;
}
.btn:focus,
.btn:active:focus,
.btn-check:focus + .btn {
    box-shadow: none;
}
.btn-close:focus {
    box-shadow: none;
}
.nav-link:focus,
.navbar-toggler:focus {
    box-shadow: none;
}
.accordion-button:focus {
    box-shadow: none;
    border-color: #d1d5db;
}
.page-link:focus,
.page-link:active:focus {
    box-shadow: none;
}
.table {
    font-size: 0.875rem;
}
.table thead th {
    background-color: #f9fafb;
    border-bottom: 2px solid #e5e7eb;
    padding: 0.625rem 0.75rem;
}
.table tbody td {
    padding: 0.625rem 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid #e5e7eb;
}@media (hover: hover) {

.table-hover tbody tr:hover {
    background-color: #f9fafb;
}
}
.alert {
    border-radius: var(--radius);
}
.dropdown-menu {
    border-radius: var(--radius);
}
.badge {
    border-radius: var(--radius);
}
.app-card {
    cursor: pointer;
    transition: transform 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}@media (hover: hover) {

.app-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}
}
.app-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.app-icon i {
    font-size: 1.5rem;
}
.page-title {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.25rem;
    letter-spacing: -0.01em;
}
.sidebar-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.75rem 1.25rem;
    border-left: 3px solid transparent;
}@media (hover: hover) {

.sidebar-link:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
    border-left-color: var(--accent-color);
}
}
.sidebar-link.active {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
    border-left-color: var(--accent-color);
}
.sidebar-link i {
    margin-right: 0.5rem;
    width: 20px;
    text-align: center;
}
@media (max-width: 767.98px) {
    .main-content {
        margin-left: 0;
        padding: 1rem;
    }
    .login-container {
        padding: 5vh 1rem 1rem;
        max-width: 100%;
    }
    .navbar-brand {
        font-size: 1rem;
    }
    .navbar .d-flex {
        flex-wrap: wrap;
        justify-content: flex-end;
    }
    .navbar .text-light.me-3 {
        display: none;
    }
}
@media (max-width: 480px) {
    .login-container {
        padding: 3vh 0.75rem 1rem;
    }
    .card-body {
        padding: 1rem !important;
    }
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    .display-4 {
        font-size: 1.75rem;
    }
    .display-4 i {
        display: block;
        margin-bottom: 0.5rem;
        margin-right: 0 !important;
    }
    .lead {
        font-size: 1rem;
    }
}

/* ===== Centralized additions (toasts, modern modals) ===== */

.toast-region {
    position: fixed;
    top: calc(var(--header-height) + 0.75rem);
    right: 1rem;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 360px;
    max-width: calc(100vw - 2rem);
    pointer-events: none;
}
.toast-item {
    pointer-events: auto;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(13, 27, 42, 0.18);
    border: 1px solid #e5e7eb;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.7rem 0.75rem 0.85rem;
    animation: toast-in 200ms ease-out;
}
.toast-item.toast-leaving { animation: toast-out 200ms ease-in forwards; }
@keyframes toast-in {
    from { transform: translateX(110%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes toast-out {
    to { transform: translateX(110%); opacity: 0; }
}
.toast-icon {
    font-size: 1.1rem;
    line-height: 1.225rem;
    flex-shrink: 0;
}
.toast-icon i { display: block; line-height: inherit; }
.toast-success .toast-icon { color: #065f46; }
.toast-danger .toast-icon { color: #991b1b; }
.toast-warning .toast-icon { color: #92400e; }
.toast-info .toast-icon { color: var(--brand-accent); }
.toast-item .toast-body {
    flex: 1 1 auto;
    font-size: 0.875rem;
    line-height: 1.4;
    color: #1f2937;
    min-width: 0;
    word-wrap: break-word;
    padding: 0;
}
.toast-close {
    background: transparent;
    border: 0;
    color: #6c757d;
    cursor: pointer;
    flex-shrink: 0;
    width: 1.4rem;
    height: 1.4rem;
    padding: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.toast-close i { font-size: 0.95rem; line-height: 1; display: block; }@media (hover: hover) {

.toast-close:hover { color: #1f2937; background-color: rgba(0, 0, 0, 0.06); }
}
.toast-progress {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.06);
}
.toast-progress-bar {
    height: 100%;
    width: 100%;
    transform-origin: left;
    animation: toast-countdown var(--toast-duration, 7s) linear forwards;
}
.toast-success .toast-progress-bar { background: #10b981; }
.toast-danger .toast-progress-bar { background: #ef4444; }
.toast-warning .toast-progress-bar { background: #f59e0b; }
.toast-info .toast-progress-bar { background: var(--brand-accent); }
@keyframes toast-countdown {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}@media (hover: hover) {

.toast-item:hover .toast-progress-bar { animation-play-state: paused; }
}

.modal-content {
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: var(--radius);
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}
.modal-header {
    border-bottom: 0;
    padding: 1.25rem 1.5rem 0.75rem;
}
.modal-body {
    padding: 0.5rem 1.5rem 1rem;
}
.modal-footer {
    border-top: 0;
    padding: 0.5rem 1.5rem 1.25rem;
    gap: 0.5rem;
}
.modal-title {
    font-weight: 600;
    letter-spacing: -0.01em;
    font-size: 1.05rem;
}
.modal-header .btn-close {
    width: 1.05rem;
    height: 1.05rem;
    padding: 0.35rem;
    border-radius: 50%;
    transition: background-color 0.12s;
}@media (hover: hover) {

.modal-header .btn-close:hover {
    background-color: rgba(15, 23, 42, 0.07);
}
}
.modal-backdrop {
    background-color: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(0);
    -webkit-backdrop-filter: blur(0);
    transition: opacity 0.15s linear, backdrop-filter 0.14s ease-out, -webkit-backdrop-filter 0.14s ease-out;
}
.modal-backdrop.show {
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 1;
}
.modal.fade .modal-dialog {
    transform: translateY(12px) scale(0.985);
    transition: transform 0.18s ease-out;
}
.modal.show .modal-dialog {
    transform: none;
}


/* ===== Button system: no transparent buttons ===== */

.btn-outline-primary {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
}
@media (hover: hover) {
.btn-outline-primary:hover {
    background-color: #1f3a5e !important;
    border-color: #1f3a5e !important;
    color: #fff !important;
}
}
.btn-outline-primary:active {
    background-color: #1f3a5e !important;
    border-color: #1f3a5e !important;
    color: #fff !important;
}
.btn-outline-secondary {
    background-color: #64748b;
    border-color: #64748b;
    color: #fff;
}
@media (hover: hover) {
.btn-outline-secondary:hover {
    background-color: #51606f !important;
    border-color: #51606f !important;
    color: #fff !important;
}
}
.btn-outline-secondary:active {
    background-color: #51606f !important;
    border-color: #51606f !important;
    color: #fff !important;
}
.btn-outline-danger {
    background-color: #dc3545;
    border-color: #dc3545;
    color: #fff;
}
@media (hover: hover) {
.btn-outline-danger:hover {
    background-color: #bb2d3b !important;
    border-color: #bb2d3b !important;
    color: #fff !important;
}
}
.btn-outline-danger:active {
    background-color: #bb2d3b !important;
    border-color: #bb2d3b !important;
    color: #fff !important;
}
.btn-outline-success {
    background-color: #198754;
    border-color: #198754;
    color: #fff;
}
@media (hover: hover) {
.btn-outline-success:hover {
    background-color: #157347 !important;
    border-color: #157347 !important;
    color: #fff !important;
}
}
.btn-outline-success:active {
    background-color: #157347 !important;
    border-color: #157347 !important;
    color: #fff !important;
}
.navbar .btn-outline-light {
    background-color: rgba(255, 255, 255, 0.12);
    border: none;
    color: #fff;
}@media (hover: hover) {

.navbar .btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.22) !important;
}
}

/* Table row actions: icon-only, colored */
.table .btn[class*="btn-outline-"],
table .btn[class*="btn-outline-"] {
    background-color: transparent !important;
    border: none !important;
    padding: 0.15rem 0.3rem;
}
.table .btn-outline-secondary, table .btn-outline-secondary { color: #475569 !important; }
.table .btn-outline-danger, table .btn-outline-danger { color: #dc3545 !important; }
.table .btn-outline-primary, table .btn-outline-primary { color: var(--brand-accent) !important; }
.table .btn-outline-success, table .btn-outline-success { color: #198754 !important; }@media (hover: hover) {

.table .btn[class*="btn-outline-"]:hover { transform: scale(1.15); }
}
.table .btn[class*="btn-outline-"]:active,
.table .btn[class*="btn-outline-"]:focus,
.table .btn[class*="btn-outline-"]:focus-visible,
.table .btn[class*="btn-outline-"]:active:focus-visible,
.table .btn[class*="btn-outline-"]:first-child:active,
table .btn[class*="btn-outline-"]:active,
table .btn[class*="btn-outline-"]:focus,
table .btn[class*="btn-outline-"]:focus-visible,
table .btn[class*="btn-outline-"]:active:focus-visible,
table .btn[class*="btn-outline-"]:first-child:active {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}
.table .btn-outline-secondary:active, .table .btn-outline-secondary:focus,
.table .btn-outline-secondary:focus-visible, .table .btn-outline-secondary:active:focus-visible,
.table .btn-outline-secondary:first-child:active,
table .btn-outline-secondary:active, table .btn-outline-secondary:focus,
table .btn-outline-secondary:focus-visible, table .btn-outline-secondary:active:focus-visible,
table .btn-outline-secondary:first-child:active { color: #475569 !important; }
.table .btn-outline-danger:active, .table .btn-outline-danger:focus,
.table .btn-outline-danger:focus-visible, .table .btn-outline-danger:active:focus-visible,
.table .btn-outline-danger:first-child:active,
table .btn-outline-danger:active, table .btn-outline-danger:focus,
table .btn-outline-danger:focus-visible, table .btn-outline-danger:active:focus-visible,
table .btn-outline-danger:first-child:active { color: #dc3545 !important; }
.table .btn-outline-primary:active, .table .btn-outline-primary:focus,
.table .btn-outline-primary:focus-visible, .table .btn-outline-primary:active:focus-visible,
.table .btn-outline-primary:first-child:active,
table .btn-outline-primary:active, table .btn-outline-primary:focus,
table .btn-outline-primary:focus-visible, table .btn-outline-primary:active:focus-visible,
table .btn-outline-primary:first-child:active { color: var(--brand-accent) !important; }
.table .btn-outline-success:active, .table .btn-outline-success:focus,
.table .btn-outline-success:focus-visible, .table .btn-outline-success:active:focus-visible,
.table .btn-outline-success:first-child:active,
table .btn-outline-success:active, table .btn-outline-success:focus,
table .btn-outline-success:focus-visible, table .btn-outline-success:active:focus-visible,
table .btn-outline-success:first-child:active { color: #198754 !important; }

/* Button families */
.btn-action, .btn-action:focus {
    background-color: var(--brand-accent);
    border-color: var(--brand-accent);
    color: #fff;
}
@media (hover: hover) {
.btn-action:hover {
    background-color: var(--brand-accent-hover) !important;
    border-color: var(--brand-accent-hover) !important;
    color: #fff !important;
}
}
.btn-action:active {
    background-color: var(--brand-accent-hover) !important;
    border-color: var(--brand-accent-hover) !important;
    color: #fff !important;
}
.btn-schedule, .btn-schedule:focus {
    background-color: #0e7490;
    border-color: #0e7490;
    color: #fff;
}
@media (hover: hover) {
.btn-schedule:hover {
    background-color: #0b5c73 !important;
    border-color: #0b5c73 !important;
    color: #fff !important;
}
}
.btn-schedule:active {
    background-color: #0b5c73 !important;
    border-color: #0b5c73 !important;
    color: #fff !important;
}
.btn-jobs, .btn-jobs:focus {
    background-color: #475569;
    border-color: #475569;
    color: #fff;
}
@media (hover: hover) {
.btn-jobs:hover {
    background-color: #384555 !important;
    border-color: #384555 !important;
    color: #fff !important;
}
}
.btn-jobs:active {
    background-color: #384555 !important;
    border-color: #384555 !important;
    color: #fff !important;
}

/* ===== Cards, tables, inputs modernization ===== */
.card {
    border: 1px solid #e6ebf2;
    border-radius: var(--radius);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 14px rgba(15, 23, 42, 0.05);
}
.card {
    --bs-card-inner-border-radius: var(--radius);
}
.card > :first-child {
    border-top-left-radius: var(--radius);
    border-top-right-radius: var(--radius);
}
.card > :last-child {
    border-bottom-left-radius: var(--radius);
    border-bottom-right-radius: var(--radius);
}@media (hover: hover) {

.table tbody tr:hover {
    background-color: #f3f6fa;
}
}
.form-control:focus, .form-select:focus {
    border-color: var(--brand-accent);
    box-shadow: none;
}
input:focus, textarea:focus, select:focus, button:focus {
    box-shadow: none !important;
}
.form-check-input:focus, .btn-check:focus + .btn, .btn-close:focus,
.nav-link:focus, .navbar-toggler:focus, .accordion-button:focus,
.page-link:focus, .dropdown-toggle:focus, .btn-link:focus {
    box-shadow: none !important;
    outline: none;
}

.btn-action:disabled, .btn-schedule:disabled, .btn-jobs:disabled,
.btn-outline-primary:disabled, .btn-outline-secondary:disabled,
.btn-outline-danger:disabled, .btn-outline-success:disabled {
    color: #fff;
    opacity: 0.55;
}
.btn-action:disabled { background-color: var(--brand-accent); border-color: var(--brand-accent); }
.btn-schedule:disabled { background-color: #0e7490; border-color: #0e7490; }
.btn-jobs:disabled { background-color: #475569; border-color: #475569; }
.btn-outline-primary:disabled { background-color: var(--accent-color); border-color: var(--accent-color); }
.btn-outline-secondary:disabled { background-color: #64748b; border-color: #64748b; }
.btn-outline-danger:disabled { background-color: #dc3545; border-color: #dc3545; }
.btn-outline-success:disabled { background-color: #198754; border-color: #198754; }


/* ===== Modern tabs: shift-free pill for the active tab ===== */
.nav-tabs {
    border-bottom: 1px solid #e5eaf1;
    gap: 0.25rem;
}
.nav-tabs .nav-link {
    border: none;
    border-radius: var(--radius) var(--radius) 0 0;
    color: #5b6675;
    font-weight: 500;
    padding: 0.55rem 1rem;
}@media (hover: hover) {

.nav-tabs .nav-link:hover {
    background-color: #eef2f8;
    border: none;
    color: #33415c;
}
}
.nav-tabs .nav-link.active {
    background-color: rgba(45, 82, 130, 0.10);
    border: none;
    color: var(--brand-accent);
    font-weight: 500;
}

/* ===== Modals always vertically centered ===== */
.modal-dialog {
    display: flex;
    align-items: center;
    min-height: calc(100% - 3.5rem);
}
.modal-dialog > .modal-content {
    width: 100%;
}

/* ===== Skeleton loading ===== */
.skeleton {
    position: relative;
    overflow: hidden;
    background-color: #e9edf3;
    border-radius: var(--radius);
    min-height: 0.9rem;
}
.skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent);
    animation: skeletonShimmer 1.4s infinite;
}
@keyframes skeletonShimmer {
    100% { transform: translateX(100%); }
}

/* ===== Shared large-table loader (portalTableLoading / portalRenderChunked) ===== */
.portal-table-loading {
    text-align: center;
    padding: 2rem 1rem;
    color: #6b7686;
}
.portal-table-loading .spinner-border {
    vertical-align: middle;
}
.portal-table-loading-text {
    margin-left: 0.5rem;
    font-size: 0.875rem;
    vertical-align: middle;
}

/* ===== Empty states ===== */
.portal-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #6b7686;
}
.portal-empty i {
    font-size: 2.2rem;
    opacity: 0.45;
    display: block;
    margin-bottom: 0.6rem;
}
.portal-empty .pe-title {
    font-weight: 600;
    color: #3c4759;
    margin-bottom: 0.2rem;
}
.portal-empty .pe-hint {
    font-size: 0.875rem;
}

button[id$="ZoomIn"], button[id$="ZoomOut"], span[id$="ZoomLabel"] {
    background-color: #fff;
    border: 1px solid #d8dfe9;
    color: #475569;
}@media (hover: hover) {

button[id$="ZoomIn"]:hover, button[id$="ZoomOut"]:hover {
    background-color: #eef2f8 !important;
    border-color: #c9d3e0 !important;
    color: #16283f !important;
}
}
span[id$="ZoomLabel"] {
    background-color: #f4f7fb;
    font-variant-numeric: tabular-nums;
}
button[id$="ZoomIn"]:disabled, button[id$="ZoomOut"]:disabled {
    background-color: #fff;
    border-color: #e3e9f1;
    color: #b6c0cd;
    opacity: 1;
}


.app-icon-active {
    background-color: rgba(45, 82, 130, 0.10);
}
.app-icon-active i {
    color: var(--brand-accent);
}
.app-icon-inactive {
    background-color: rgba(100, 116, 139, 0.12);
}
.app-icon-inactive i {
    color: #64748b;
}@media (hover: hover) {

.app-card:hover {
    border: 1px solid rgba(45, 82, 130, 0.28);
    box-shadow: 0 8px 28px rgba(22, 40, 63, 0.14);
    transform: translateY(-2px);
    transition: all 0.15s ease-out;
}
}

span[id$="PagerLabel"] {
    min-width: 9em;
    text-align: center;
    font-variant-numeric: tabular-nums;
    pointer-events: none;
}

.portal-nav-progress {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    background: #a9c4e2;
    box-shadow: 0 0 6px rgba(169, 196, 226, 0.55);
    z-index: 3000;
    transition: width 18s cubic-bezier(0.03, 0.75, 0.1, 1);
    pointer-events: none;
}
.portal-nav-progress-go {
    width: 92%;
}
.portal-nav-progress-done {
    width: 100% !important;
    opacity: 0;
    transition: width 0.15s ease-out, opacity 0.3s ease 0.15s;
}
.portal-btn-loading {
    position: relative !important;
    pointer-events: none;
    color: transparent !important;
}
.portal-btn-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1em;
    height: 1em;
    margin: -0.5em 0 0 -0.5em;
    border: 2px solid rgba(122, 134, 148, 0.55);
    border-top-color: transparent;
    border-radius: 50%;
    animation: portal-btn-spin 0.6s linear infinite;
}
@keyframes portal-btn-spin {
    to { transform: rotate(360deg); }
}

.modal .table-responsive > .table > :not(caption) > * > * {
    border: 1px solid #e6ebf2;
}
.modal .table-responsive > .table {
    border: 1px solid #e6ebf2;
}

.btn-check + .btn-outline-secondary {
    background-color: #fff !important;
    border-color: #d1d5db !important;
    color: #475569 !important;
}@media (hover: hover) {

.btn-check + .btn-outline-secondary:hover {
    background-color: rgba(45, 82, 130, 0.12) !important;
    border-color: rgba(45, 82, 130, 0.25) !important;
    color: var(--brand-accent) !important;
}
}
.btn-check:checked + .btn-outline-secondary {
    background-color: var(--brand-accent) !important;
    border-color: var(--brand-accent) !important;
    color: #fff !important;
}

/* ===== Keyboard focus visibility =====
   The modernization above zeroes focus rings globally (box-shadow/outline
   none) so a mouse click never flashes a halo. That also blinded keyboard
   users. Restore a ring for :focus-visible only (keyboard/programmatic
   focus); mouse focus stays ring-free because the suppressions still win on
   plain :focus:not(:focus-visible). */
:focus-visible {
    outline: 2px solid var(--brand-accent);
    outline-offset: 1px;
}
.form-control:focus-visible,
.form-select:focus-visible,
.form-check-input:focus-visible {
    outline: none;
}
.btn-check:focus-visible + .btn {
    outline: 2px solid var(--brand-accent);
    outline-offset: 1px;
}

.badge {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}
.btn:has(> .bi:only-child) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}


/* iOS Safari auto-zooms into any focused input whose font-size is below 16px,
   which makes the whole site lurch on every tap into a field. Pinning form
   controls to 16px on phones disables that zoom trigger entirely; desktop
   sizes are untouched. */
@media (max-width: 767px) {
    input.form-control,
    textarea.form-control,
    select.form-select,
    .form-control,
    .form-select {
        font-size: 16px !important;
    }
}

@media (max-width: 575.98px) {
    #notificationDropdown.dropdown-menu.show {
        position: fixed !important;
        inset: 62px 0.75rem auto 0.75rem !important;
        transform: none !important;
        width: auto !important;
    }
}

.min-vh-100 {
    min-height: 100vh !important;
    min-height: 100dvh !important;
}
