html, body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 15px;
    color: #0f172a;
}

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

.btn-primary {
    color: #fff;
    background-color: #6d28d9;
    border-color: #5b21b6;
}

.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 #a78bfa;
}

.content {
    padding-top: 0.8rem;
}

/* ===== Premium Navbar Dropdowns ===== */
/* ===== Premium Navbar Dropdowns ===== */
.navbar-dark .dropdown-menu.dropdown-premium {
    background: #fff !important;
    border: none !important;
    border-radius: 14px !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15) !important;
    padding: 0.6rem 0 !important;
    min-width: 250px !important;
    margin-top: 0.6rem !important;
}

.navbar-dark .dropdown-menu.dropdown-premium .dropdown-header {
    color: #5b21b6 !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.8px !important;
    padding: 0.7rem 1.3rem 0.5rem !important;
    border-bottom: 1px solid #f0f2f5 !important;
    margin-bottom: 0.3rem !important;
}

.navbar-dark .dropdown-menu.dropdown-premium .dropdown-header i {
    color: #5b21b6 !important;
    font-size: 0.9rem !important;
}

.navbar-dark .dropdown-menu.dropdown-premium .dropdown-item {
    color: #2d2d2d !important;
    padding: 0.7rem 1.3rem !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.85rem !important;
    border-left: 3px solid transparent !important;
    transition: all 0.2s ease !important;
}

.navbar-dark .dropdown-menu.dropdown-premium .dropdown-item .dropdown-icon {
    font-size: 1.25rem !important;
    width: 26px !important;
    text-align: center !important;
    opacity: 0.9 !important;
    transition: all 0.2s ease !important;
}

/* Colored icons scoped per dropdown position */
.navbar-dark .dropdown:nth-child(1) li:nth-child(2) .dropdown-icon { color: #0d6efd !important; }
.navbar-dark .dropdown:nth-child(1) li:nth-child(3) .dropdown-icon { color: #fd7e14 !important; }
.navbar-dark .dropdown:nth-child(1) li:nth-child(4) .dropdown-icon { color: #198754 !important; }

.navbar-dark .dropdown:nth-child(2) li:nth-child(2) .dropdown-icon { color: #0d6efd !important; }
.navbar-dark .dropdown:nth-child(2) li:nth-child(3) .dropdown-icon { color: #dc3545 !important; }
.navbar-dark .dropdown:nth-child(2) li:nth-child(4) .dropdown-icon { color: #fd7e14 !important; }
.navbar-dark .dropdown:nth-child(2) li:nth-child(5) .dropdown-icon { color: #6f42c1 !important; }
.navbar-dark .dropdown:nth-child(2) li:nth-child(6) .dropdown-icon { color: #198754 !important; }

.navbar-dark .dropdown:nth-child(3) li:nth-child(2) .dropdown-icon { color: #5b21b6 !important; }

.navbar-dark .dropdown-menu.dropdown-premium .dropdown-item:hover {
    background: linear-gradient(135deg, #f8f4ff 0%, #eef2ff 100%) !important;
    color: #5b21b6 !important;
    border-left-color: #5b21b6 !important;
}

.navbar-dark .dropdown-menu.dropdown-premium .dropdown-item:hover .dropdown-icon {
    opacity: 1 !important;
    transform: scale(1.15) !important;
}

.navbar-dark .dropdown-menu.dropdown-premium .dropdown-item:active {
    background: linear-gradient(135deg, #5b21b6 0%, #1e3a8a 100%) !important;
    color: #fff !important;
}

.navbar-dark .dropdown-menu.dropdown-premium .dropdown-item:active .dropdown-icon {
    color: #fff !important;
    opacity: 1 !important;
}

.nav-dropdown-btn {
    border-radius: 8px !important;
    font-weight: 600 !important;
    letter-spacing: 0.3px !important;
    padding: 0.4rem 1.1rem !important;
    font-size: 0.9rem !important;
    transition: all 0.2s ease !important;
}

.nav-dropdown-btn:hover {
    background: rgba(255,255,255,0.15) !important;
    transform: translateY(-1px) !important;
}

.container-fluid {
    padding-left: 1rem;
    padding-right: 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,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."
    }

.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;
}

/* ===== Premium Card Styles ===== */
.card-premium {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.card-premium:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.card-premium .card-header {
    background: linear-gradient(135deg, #5b21b6 0%, #1e3a8a 100%);
    color: white;
    padding: 0.55rem 1.3rem;
    border-bottom: none;
    font-weight: 600;
    letter-spacing: 0.3px;
    font-size: 0.9rem;
}

.card-premium .card-header h5 {
    margin: 0;
    font-weight: 600;
    font-size: 1.05rem;
}

.card-premium .card-body {
    padding: 1rem;
}

/* ===== Premium Table ===== */
.table-premium {
    margin-bottom: 0;
}

.table-premium thead th {
    background: #f8f9fc;
    color: #2d3436;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.7rem 0.85rem;
    border-bottom: 2px solid #e8ecf1;
}

.table-premium tbody td {
    padding: 0.65rem 0.85rem;
    vertical-align: middle;
    border-bottom: 1px solid #f0f2f5;
    font-size: 0.92rem;
}

.table-premium tbody tr {
    transition: background-color 0.2s ease;
}

.table-premium tbody tr:hover {
    background-color: #f8f9ff;
}

.table-premium .btn-action {
    padding: 0.35rem 0.65rem;
    font-size: 0.8rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 700;
    border: none;
}

.table-premium .btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.table-premium .btn-action:active {
    transform: translateY(0);
}

.btn-action-profile {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
}
.btn-action-profile:hover {
    background: linear-gradient(135deg, #4f46e5, #4338ca);
    color: #fff;
}

.btn-action-edit {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: #fff;
}
.btn-action-edit:hover {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: #fff;
}

.btn-action-activate {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
}
.btn-action-activate:hover {
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: #fff;
}

.btn-action-deactivate {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
}
.btn-action-deactivate:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
    color: #fff;
}

.btn-action-delete {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
}
.btn-action-delete:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: #fff;
}

.btn-action-advance {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
}
.btn-action-advance:hover {
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: #fff;
}
.btn-action-advance:disabled {
    background: #d1d5db;
    color: #9ca3af;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.btn-action-review {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    color: #fff;
}
.btn-action-review:hover {
    background: linear-gradient(135deg, #6d28d9, #5b21b6);
    color: #fff;
}

/* ===== Premium Form ===== */
.form-premium .form-label {
    font-weight: 500;
    color: #2d3436;
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
}

.form-premium .form-control,
.form-premium .form-select {
    border-radius: 7px;
    border: 1.5px solid #e0e3e8;
    padding: 0.55rem 0.85rem;
    font-size: 0.98rem;
    font-weight: 450;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-premium .form-control:focus,
.form-premium .form-select:focus {
    border-color: #6d28d9;
    box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.12);
}

.form-premium textarea.form-control {
    min-height: 56px;
}

.form-premium .form-section {
    padding: 1rem 0;
    border-bottom: 1px solid #eef1f5;
}

.form-premium .form-section:first-child {
    padding-top: 0;
}

.form-premium .form-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.form-premium .form-section-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #5b21b6;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-premium .form-section-title i {
    font-size: 0.9rem;
    opacity: 0.8;
}

.form-premium .form-label i {
    font-size: 0.78rem;
}

/* ===== Premium Badge ===== */
.badge-premium {
    padding: 0.35em 0.7em;
    font-size: 0.78rem;
    font-weight: 500;
    border-radius: 20px;
}

.badge-active {
    background-color: #d4edda;
    color: #155724;
}

.badge-inactive {
    background-color: #f8d7da;
    color: #721c24;
}

.badge-warning {
    background-color: #fff3cd;
    color: #856404;
}

.badge-secondary {
    background-color: #e2e3e5;
    color: #383d41;
}

/* ===== Page Header ===== */
.page-header {
    margin-bottom: 1.5rem;
}

.page-header h2 {
    font-weight: 700;
    color: #5b21b6;
    margin: 0;
    font-size: 1.6rem;
}

.page-header .text-muted {
    font-size: 0.9rem;
}

/* ===== Toast Notification ===== */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
}

.toast-premium {
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    min-width: 300px;
}

.toast-premium .toast-header {
    border-bottom: none;
    padding: 0.75rem 1rem;
    font-weight: 600;
}

.toast-premium .toast-body {
    padding: 0.75rem 1rem;
}

.toast-success .toast-header {
    background: #d4edda;
    color: #155724;
}

.toast-error .toast-header {
    background: #f8d7da;
    color: #721c24;
}

/* ===== Search Box ===== */
.search-box {
    position: relative;
}

.search-box .bi-search {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #adb5bd;
}

.search-box .form-control {
    padding-left: 36px;
    border-radius: 8px;
    border: 1.5px solid #e0e3e8;
}

/* ===== Modal Premium ===== */
.modal-premium .modal-content {
    border: none;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.modal-premium .modal-header {
    background: linear-gradient(135deg, #5b21b6 0%, #1e3a8a 100%);
    color: white;
    border-radius: 14px 14px 0 0;
    padding: 0.9rem 1.3rem;
    border-bottom: none;
}

.modal-premium .modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.modal-premium .modal-body {
    padding: 1.3rem;
}

.modal-premium .modal-footer {
    border-top: 1px solid #f0f2f5;
    padding: 0.9rem 1.3rem;
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.empty-state .bi {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
    opacity: 0.4;
}

/* ===== Loading Spinner ===== */
.loading-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

/* ===== Stats Cards (Compact Premium) ===== */
.stat-card-compact {
    border: none;
    border-radius: 10px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
    padding: 0.65rem 1rem;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    height: 100%;
}

.stat-card-compact:hover {
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.stat-card-compact .stat-icon {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.stat-card-compact .stat-number {
    font-size: 1.2rem;
    font-weight: 700;
    color: #5b21b6;
    line-height: 1.1;
}

.stat-card-compact .stat-label {
    font-size: 0.65rem;
    color: #88929c;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-top: 0.05rem;
}

/* ===== Compact Premium Table ===== */
.table-premium-compact thead th {
    padding: 0.35rem 0.55rem !important;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
    border-bottom-width: 1px;
    white-space: nowrap;
}

.table-premium-compact tbody td {
    padding: 0.45rem 0.55rem !important;
    font-size: 0.88rem;
    font-weight: 500;
    vertical-align: middle;
    border-bottom: 1px solid #f0f2f5;
}

/* Expand/Collapse button */
.btn-expand {
    padding: 0;
    border: none;
    background: none;
    color: #c8ccd0;
    font-size: 0.7rem;
    line-height: 1;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-expand:hover {
    color: #5b21b6;
    background: #eef1f5;
}

.btn-expand i {
    transition: transform 0.2s ease;
}

/* Expanded row highlight */
.table-premium-compact tbody tr.row-expanded {
    background: #f4f6fb !important;
}

.table-premium-compact tbody tr.row-expanded .btn-expand {
    color: #5b21b6;
    background: #e4e8f0;
}

/* Detail row slide-down */
.detail-row td {
    padding: 0 !important;
    border-top: none !important;
}

.detail-row .detail-inner {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.25s ease;
    background: #f8f9fc;
    border-bottom: 1px solid #e8ecf1;
}

.detail-row.expanded .detail-inner {
    max-height: 600px;
    opacity: 1;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.6rem;
    padding: 0.7rem 1rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
}

.detail-item .detail-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #88929c;
}

.detail-item .detail-value {
    font-size: 0.92rem;
    color: #0f172a;
    font-weight: 600;
}

@media (max-width: 992px) {
    .detail-grid { grid-template-columns: repeat(2, 1fr); }
}

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

/* ===== Stats Cards (Legacy) ===== */
.stat-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.stat-card .stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.stat-card .stat-number {
    font-size: 1.6rem;
    font-weight: 700;
    color: #5b21b6;
    line-height: 1.2;
}

.stat-card .stat-label {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
}

/* ===== Button Enhancements ===== */
.btn-premium {
    border-radius: 7px;
    padding: 0.45rem 1.1rem;
    font-weight: 500;
    font-size: 0.92rem;
    transition: all 0.2s ease;
}

.btn-premium:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-premium-sm {
    border-radius: 6px;
    padding: 0.3rem 0.8rem;
    font-size: 0.85rem;
}

/* ===== Fixed Form Action Bar ===== */
.form-action-bar {
    position: fixed;
    bottom: 0;
    right: 0;
    left: auto;
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    border-top-left-radius: 12px;
    box-shadow: -2px -2px 16px rgba(0, 0, 0, 0.08);
    z-index: 1020;
}

/* ===== Responsive Tweaks ===== */
@media (max-width: 768px) {
    .card-premium .card-body {
        padding: 1rem;
    }

    .table-premium thead {
        display: none;
    }

    .table-premium tbody td {
        display: block;
        padding: 0.5rem 0.75rem;
        border-bottom: none;
    }

    .table-premium tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        display: inline-block;
        width: 120px;
        color: #2d3436;
    }

    .table-premium tbody tr {
        border-bottom: 2px solid #e8ecf1;
        padding: 0.75rem 0;
    }
}

/* ===== Form Sections & Tabs ===== */
.section-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.75rem;
    letter-spacing: 0.3px;
}

.form-tabs {
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 0;
}

.form-tabs .nav-link {
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    background: none;
    transition: all 0.2s ease;
}

.form-tabs .nav-link:hover {
    color: #5b21b6;
    border-bottom-color: #c4b5fd;
}

.form-tabs .nav-link.active {
    color: #5b21b6;
    border-bottom-color: #5b21b6;
    background: none;
}

.form-tab-content {
    height: 185px;
    overflow-y: auto;
    padding: 0.35rem 0 0 0;
    background: transparent;
    border: none;
}

.form-tab-content::-webkit-scrollbar {
    width: 4px;
}
.form-tab-content::-webkit-scrollbar-track {
    background: transparent;
}
.form-tab-content::-webkit-scrollbar-thumb {
    background: #c4b5fd;
    border-radius: 4px;
}

.form-tab-content .tab-pane {
    display: none;
}

.form-tab-content .tab-pane.active {
    display: block;
}

/* ===== Stage Timeline / Progress Steps ===== */
.stage-steps {
    display: flex;
    align-items: center;
    gap: 0;
    width: 100%;
}

.stage-step {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex: 1;
    position: relative;
}

.stage-step .step-indicator {
    font-size: 1.1rem;
    line-height: 1;
    color: #d1d5db;
    flex-shrink: 0;
}

.stage-step.completed .step-indicator {
    color: #10b981;
}

.stage-step.current .step-indicator {
    color: #6d28d9;
}

.stage-step .step-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #9ca3af;
    white-space: nowrap;
    letter-spacing: 0.3px;
}

.stage-step.completed .step-label {
    color: #10b981;
}

.stage-step.current .step-label {
    color: #6d28d9;
    font-weight: 700;
}

.stage-step::after {
    content: '';
    flex: 1;
    height: 2px;
    background: #e5e7eb;
    margin: 0 0.5rem;
}

.stage-step:last-child::after {
    display: none;
}

.stage-step.completed::after {
    background: #10b981;
}

.stage-step.current::after {
    background: linear-gradient(90deg, #6d28d9 50%, #e5e7eb 50%);
}

.timeline-block {
    background: #f8f9fc;
    border-radius: 8px;
    padding: 0.75rem 1rem;
}

.timeline-block:last-child {
    margin-bottom: 0 !important;
}

/* ===== Pipeline / Kanban View ===== */
.pipeline-scroll {
    overflow-x: auto;
    padding-bottom: 1rem;
}

.pipeline-columns {
    display: flex;
    gap: 0.75rem;
    min-width: max-content;
}

.pipeline-col {
    width: 260px;
    min-width: 220px;
    flex-shrink: 0;
    background: #f4f5f7;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 140px);
}

.pipeline-col-header {
    padding: 0.55rem 0.85rem;
    font-weight: 600;
    font-size: 0.82rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.pipeline-header-joining { background: #6b7280; }
.pipeline-header-medical { background: #f59e0b; color: #1f2937; }
.pipeline-header-visa { background: #3b82f6; }
.pipeline-header-emigration { background: #8b5cf6; }
.pipeline-header-ticket { background: #06b6d4; }
.pipeline-header-deployed { background: #10b981; }

.pipeline-col-body {
    padding: 0.5rem;
    overflow-y: auto;
    flex: 1;
}

.pipeline-card {
    background: white;
    border-radius: 8px;
    padding: 0.65rem;
    margin-bottom: 0.5rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    cursor: pointer;
    transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.pipeline-card:hover {
    box-shadow: 0 3px 12px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.pipeline-empty {
    text-align: center;
    padding: 1.5rem 0.5rem;
    color: #9ca3af;
    font-size: 0.78rem;
}

.pipeline-col.drag-over {
    background: rgba(99, 102, 241, 0.08) !important;
    outline: 2px dashed #6366f1;
    outline-offset: -2px;
}

.pipeline-card[draggable="true"] {
    cursor: grab;
}

.pipeline-card[draggable="true"]:active {
    cursor: grabbing;
    opacity: 0.8;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.btn-advance {
    padding: 0.2rem 0.5rem !important;
    font-size: 0.75rem !important;
}

/* ===== Premium Select / Dropdown ===== */
.select-premium {
    border: 2px solid #e2e8f0 !important;
    border-radius: 8px !important;
    padding: 0.35rem 2rem 0.35rem 0.75rem !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16'%3E%3Cpath fill='%236d28d9' d='M8 11L3 6h10z'/%3E%3C/svg%3E") no-repeat right 0.6rem center/12px 12px !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    min-width: 140px !important;
}
.select-premium:hover {
    border-color: #c7d2fe !important;
    box-shadow: 0 1px 4px rgba(99,102,241,0.1) !important;
}
.select-premium:focus {
    border-color: #6d28d9 !important;
    box-shadow: 0 0 0 3px rgba(109,39,217,0.15) !important;
    outline: none !important;
}

/* ===== Unified Page Layout (matching CallingTracker) ===== */
.tracker-page { padding:0.1rem 0.15rem; }

.tracker-stats { display:flex; gap:0.5rem; margin-bottom:0.5rem; }
.tracker-stat { display:flex; align-items:center; gap:0.5rem; background:#fff; border-radius:8px; padding:0.45rem 0.7rem; flex:1; min-width:0; box-shadow:0 1px 4px rgba(0,0,0,0.06); }
.tracker-stat-icon { width:28px; height:28px; border-radius:6px; display:flex; align-items:center; justify-content:center; font-size:0.8rem; flex-shrink:0; }
.tracker-stat-number { font-size:1rem; font-weight:800; line-height:1.2; color:#0f172a; }
.tracker-stat-label { font-size:0.6rem; font-weight:600; color:#64748b; text-transform:uppercase; letter-spacing:0.3px; }

.tracker-card { background:#fff; border-radius:8px; box-shadow:0 1px 6px rgba(0,0,0,0.07); overflow:hidden; }
.tracker-card-header { padding:0.4rem 0.7rem; background:#5b21b6; color:#fff; font-size:0.8rem; font-weight:600; }
.tracker-card-header h5 { margin:0; font-size:0.85rem; font-weight:700; }
.tracker-card-body { padding:0; }

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

/* Override table-premium-compact to match CallingTracker sizes */
.table-premium-compact { width:auto; min-width:100%; table-layout:auto; }
.table-premium-compact thead th {
    padding:0.3rem 0.45rem !important;
    font-size:0.7rem !important;
    font-weight:800 !important;
    color:#1e293b !important;
    text-transform:uppercase !important;
    letter-spacing:0.3px !important;
    border-bottom:2px solid #cbd5e1 !important;
    background:#f1f5f9 !important;
    white-space:nowrap !important;
    border-right:1px solid #e2e8f0 !important;
}
.table-premium-compact thead th:last-child { border-right:none !important; }
.table-premium-compact tbody td {
    padding:0.22rem 0.45rem !important;
    font-size:0.92rem !important;
    font-weight:500 !important;
    vertical-align:middle !important;
    border-bottom:1px solid #e2e8f0 !important;
    white-space:nowrap !important;
    color:#0f172a !important;
    border-right:1px solid #f1f5f9 !important;
}
.table-premium-compact tbody td:last-child { border-right:none !important; }
.table-premium-compact tbody tr:hover { background:#eef2ff !important; }
.table-premium-compact .btn-action { width:26px; height:26px; padding:0 !important; border:none; border-radius:4px; font-size:0.7rem; color:#fff; display:inline-flex; align-items:center; justify-content:center; transition:all 0.15s; }
.table-premium-compact .btn-action:hover { transform:translateY(-1px); box-shadow:0 2px 6px rgba(0,0,0,0.15); }
