:root {
    --primary-color: #0078d4;
    --primary-dark: #005a9e;
    --primary-light: #eff6fc;
    --success-color: #107c10;
    --success-light: #dff6dd;
    --info-color: #0078d4;
    --info-light: #eff6fc;
    --warning-color: #ffb900;
    --danger-color: #a4262c;
    --danger-light: #fde7e9;
    --text-main: #323130;
    --text-muted: #605e5d;
    --bg-app: #f3f2f1;
    --primary-bg: #ffffff;
    --border-color: #edebe9;
    --card-shadow: none;
    --card-shadow-hover: none;
    --radius-mis: 5px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Montserrat", "Segoe UI", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    background-color: var(--primary-bg);
    color: var(--primary-text);
    line-height: 1.5;
    font-size: 0.9rem;
}

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

ul {
    list-style: none;
}

/* Bootstrap compatibility */
.container-fluid {
    width: 100%;
    padding-right: 0;
    padding-left: 0;
    margin-right: auto;
    margin-left: auto;
}

.bg-primary {
    background-color: var(--primary-button) !important;
}

.bg-secondary {
    background-color: #818486 !important;
}

.bg-success {
    background-color: #e2ffe4 !important;
    color: var(--primary-color) !important;
}

.bg-danger {
    background-color: #fa9aa3 !important;
    color: black !important;
}

.bg-warning {
    background-color: #eeca5d !important;
    color: black !important;
}

.bg-info {
    background-color: #17a2b8 !important;
}

.bg-light {
    background-color: #f8f9fa !important;
}

.bg-dark {
    background-color: #6c6d70 !important;
}

.bg-white {
    background-color: #ffffff !important;
}

.bg-transparent {
    background-color: transparent !important;
}

.text-primary {
    color: #195ca0 !important;
}

.text-secondary {
    color: #6c757d !important;
}

.text-success {
    color: #27724f !important;
}

.text-danger {
    color: #dc3545 !important;
}

.text-warning {
    color: #c2a03b !important;
}

.text-info {
    color: #2b96ac !important;
}

.text-light {
    color: #f8f9fa !important;
}

.text-dark {
    color: #212529 !important;
}

.text-white {
    color: #fff !important;
}

.text-muted {
    color: #6c757d !important;
}

.text-center {
    text-align: center !important;
}

.fw-light {
    font-weight: 300 !important;
}

.fw-normal {
    font-weight: 400 !important;
}

.fw-medium {
    font-weight: 500 !important;
}

.fw-semibold {
    font-weight: 600 !important;
}

.fw-bold {
    font-weight: 700 !important;
}

.fw-bolder {
    font-weight: bolder !important;
}

.fw-lighter {
    font-weight: lighter !important;
}

.badge {
    display: inline-block;
    padding: 0.35em 0.65em;
    font-size: 0.75em;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.375rem;
    /* Default rounded corners */
}

.d-block {
    display: block !important;
}

.badge.bg-primary {
    background-color: #195ca0;
    color: #fff;
}

.badge.bg-secondary {
    background-color: #6c757d;
    color: #fff;
}

.badge.bg-success {
    background-color: #198754;
    color: #fff;
}

.badge.bg-danger {
    background-color: #dc3545;
    color: #fff;
}

.badge.bg-warning {
    background-color: #c9a457;
    color: #212529;
}

.badge.bg-info {
    background-color: #0dcaf0;
    color: #fff;
}

.badge.bg-light {
    background-color: #f8f9fa;
    color: #212529;
}

.badge.bg-dark {
    background-color: #212529;
    color: #fff;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -0.5rem;
    /* Negative margin for gutter alignment */
    margin-left: -0.5rem;
}

@media (min-width: 576px) {
    .col-sm {
        flex: 1 0 0%;
    }

    .col-sm-auto {
        flex: 0 0 auto;
        width: auto;
    }

    .col-sm-1 {
        flex: 0 0 8.33%;
        max-width: 8.33%;
    }

    .col-sm-2 {
        flex: 0 0 16.66%;
        max-width: 16.66%;
    }

    .col-sm-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }

    .col-sm-4 {
        flex: 0 0 33.33%;
        max-width: 33.33%;
    }

    .col-sm-5 {
        flex: 0 0 41.66%;
        max-width: 41.66%;
    }

    .col-sm-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .col-sm-7 {
        flex: 0 0 58.33%;
        max-width: 58.33%;
    }

    .col-sm-8 {
        flex: 0 0 66.66%;
        max-width: 66.66%;
    }

    .col-sm-9 {
        flex: 0 0 75%;
        max-width: 75%;
    }

    .col-sm-10 {
        flex: 0 0 83.33%;
        max-width: 83.33%;
    }

    .col-sm-11 {
        flex: 0 0 91.66%;
        max-width: 91.66%;
    }

    .col-sm-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

@media (min-width: 768px) {
    .col-md {
        flex: 1 0 0%;
    }

    .col-md-auto {
        flex: 0 0 auto;
        width: auto;
    }

    .pe-md-2 {
        padding-right: 0.5rem !important;
    }

    .pe-md-3 {
        padding-right: 1rem !important;
    }

    .pe-md-4 {
        padding-right: 1.5rem !important;
    }

    .pe-md-5 {
        padding-right: 3rem !important;
    }

    .ps-md-2 {
        padding-left: 0.5rem !important;
    }

    .ps-md-3 {
        padding-left: 1rem !important;
    }

    .ps-md-4 {
        padding-left: 1.5rem !important;
    }

    .ps-md-5 {
        padding-left: 3rem !important;
    }

    .col-md-1 {
        flex: 0 0 8.33%;
        max-width: 8.33%;
    }

    .col-md-2 {
        flex: 0 0 16.66%;
        max-width: 16.66%;
    }

    .col-md-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }

    .col-md-4 {
        flex: 0 0 33.33%;
        max-width: 33.33%;
    }

    .col-md-5 {
        flex: 0 0 41.66%;
        max-width: 41.66%;
    }

    .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .col-md-7 {
        flex: 0 0 58.33%;
        max-width: 58.33%;
    }

    .col-md-8 {
        flex: 0 0 66.66%;
        max-width: 66.66%;
    }

    .col-md-9 {
        flex: 0 0 75%;
        max-width: 75%;
    }

    .col-md-10 {
        flex: 0 0 83.33%;
        max-width: 83.33%;
    }

    .col-md-11 {
        flex: 0 0 91.66%;
        max-width: 91.66%;
    }

    .col-md-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mb-1 {
    margin-bottom: 0.25rem !important;
}

.mb-2 {
    margin-bottom: 0.5rem !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

.mb-5 {
    margin-bottom: 3rem !important;
}

.mt-0 {
    margin-top: 0 !important;
}

.mt-1 {
    margin-top: 0.25rem !important;
}

.mt-2 {
    margin-top: 0.5rem !important;
}

.mt-3 {
    margin-top: 1rem !important;
}

.mt-4 {
    margin-top: 1.5rem !important;
}

.mt-5 {
    margin-top: 3rem !important;
}

.mr-0 {
    margin-right: 0 !important;
}

.mr-1 {
    margin-right: 0.25rem !important;
}

.mr-2 {
    margin-right: 0.5rem !important;
}

.mr-3 {
    margin-right: 1rem !important;
}

.mr-4 {
    margin-right: 1.5rem !important;
}

.mr-5 {
    margin-right: 3rem !important;
}

.ml-0 {
    margin-left: 0 !important;
}

.ml-1 {
    margin-left: 0.25rem !important;
}

.ml-2 {
    margin-left: 0.5rem !important;
}

.ml-3 {
    margin-left: 1rem !important;
}

.ml-4 {
    margin-left: 1.5rem !important;
}

.ml-5 {
    margin-left: 3rem !important;
}

.mx-0 {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.mx-1 {
    margin-left: 0.25rem !important;
    margin-right: 0.25rem !important;
}

.mx-2 {
    margin-left: 0.5rem !important;
    margin-right: 0.5rem !important;
}

.mx-3 {
    margin-left: 1rem !important;
    margin-right: 1rem !important;
}

.mx-4 {
    margin-left: 1.5rem !important;
    margin-right: 1.5rem !important;
}

.mx-5 {
    margin-left: 3rem !important;
    margin-right: 3rem !important;
}

.my-0 {
    margin-top: 0 !important;
}

.my-1 {
    margin-top: 0.25rem !important;
}

.my-2 {
    margin-top: 0.5rem !important;
}

.my-3 {
    margin-top: 1rem !important;
}

.my-4 {
    margin-top: 1.5rem !important;
}

.my-5 {
    margin-top: 3rem !important;
}

.mb-auto {
    margin-bottom: auto !important;
}

.p-0 {
    padding: 0 !important;
}

.p-1 {
    padding: 0.25rem !important;
}

.p-2 {
    padding: 0.5rem !important;
}

.p-3 {
    padding: 1rem !important;
}

.p-4 {
    padding: 1.5rem !important;
}

.p-5 {
    padding: 3rem !important;
}

.form-select {
    display: block;
    width: 100%;
    /* padding: 0.375rem 2.25rem 0.375rem 0.75rem; */
    padding: 0.75rem 2.5rem;
    font-size: 0.7rem;
    /* 16px */
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    appearance: none;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

/* Dropdown arrow (Bootstrap uses a background image) */
.form-select::after {
    position: absolute;
    top: 50%;
    right: 0.75rem;
    transform: translateY(-50%);
    pointer-events: none;
}

/* Focus State */
.form-select:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: none !important;
}

/* Disabled State */
.form-select:disabled {
    background-color: #e9ecef;
    opacity: 1;
}

/* Small Size */
.form-select-sm {
    padding: 0.25rem 1.75rem 0.25rem 0.5rem;
    font-size: 0.875rem;
    /* 14px */
    border-radius: 0.25rem;
}

/* Large Size */
.form-select-lg {
    padding: 0.5rem 2.75rem 0.5rem 1rem;
    font-size: 1.25rem;
    /* 20px */
    border-radius: 0.5rem;
}

.form-select {
    display: block;
    width: 100%;
    /* padding: 0.375rem 2.25rem 0.375rem 0.75rem;
     */
    padding: 0.49rem 2.5rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0;
    /* Removed rounded corners */
    appearance: none;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-select:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: none !important;
}

.form-select:disabled {
    background-color: #e9ecef;
    opacity: 1;
}

/* Small Size */
.form-select-sm {
    padding: 0.25rem 1.75rem 0.25rem 0.5rem;
    font-size: 0.875rem;
    border-radius: 0;
    /* Removed rounded corners */
}

/* Large Size */
.form-select-lg {
    padding: 0.5rem 2.75rem 0.5rem 1rem;
    font-size: 1.25rem;
    border-radius: 0;
    /* Removed rounded corners */
}

.d-flex {
    display: flex !important;
}

.justify-content-between {
    justify-content: space-between !important;
}

.align-items-center {
    align-items: center !important;
}

.justify-content-center {
    justify-content: center !important;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1100;
}

/* Modal Sidebar */
.modal-sidebar {
    position: fixed;
    top: 0;
    right: -700px;
    height: 100%;
    background-color: white;
    box-shadow: none !important;
    z-index: 1200;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    /* CRITICAL: flex layout so header/footer are sticky and content scrolls */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    width: 420px;
    max-width: 95vw;
}

.modal-sidebar.active {
    right: 0;
}

/* Modal Header - sticky at top */
.modal-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #edebe9;
    background-color: #f3f2f1;
    flex-shrink: 0;
}

.modal-sidebar-header h5 {
    font-weight: 600;
    color: #323130;
    margin: 0;
    font-size: 1rem;
}

.close-modal-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #a4262c;
    padding: 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.close-modal-btn:hover {
    background-color: #fde7e9;
    color: #a4262c;
}

/* Modal Content - scrollable body */
.modal-sidebar-content {
    padding: 1.25rem 1.5rem;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
}

.content-section {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eaeaea;
}

.content-section:last-child {
    border-bottom: none;
}

/* Added for button alignment */
.modal-action-buttons {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 15px;
}

/* Modal Footer - sticky at bottom */
.modal-sidebar-footer {
    display: flex;
    justify-content: flex-end;
    padding: 1rem 1.5rem;
    background-color: #ffffff;
    border-top: 1px solid #edebe9;
    gap: 12px;
    flex-shrink: 0;
}

/* Responsive styles */
@media screen and (max-width: 768px) {
    .modal-sidebar {
        width: 90%;
        max-width: 480px;
        min-width: unset;
        right: -100%;
    }

    .modal-sidebar.active {
        right: 0;
    }

    .modal-sidebar-header,
    .modal-sidebar-content,
    .modal-sidebar-footer {
        padding: 16px;
    }
}

@media screen and (max-width: 480px) {
    .modal-sidebar {
        width: 100%;
        min-width: unset;
        max-width: unset;
    }

    .modal-sidebar-footer {
        flex-direction: column;
    }

    .modal-btn {
        width: 100%;
        margin-bottom: 8px;
    }
}

/* Header Styles */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    height: 48px;
    background-color: var(--header-bg);
    color: var(--light-text);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
}

.menu-toggle {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 18px;
    cursor: pointer;
    margin-right: 15px;
}

.app-logo {
    display: flex;
    align-items: center;
    font-size: 18px;
    font-weight: 600;
}

.app-logo i {
    margin-right: 10px;
}

/* Search Bar */
.search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: rgba(255, 255, 255, 0.18);
    border: 1.5px solid rgba(21, 76, 135, 0.35);
    border-radius: 4px;
    padding: 8px 12px;
    flex: 1;
    max-width: 600px;
    margin: 0 20px;
}

.search-bar i {
    color: #154c87;
    font-size: 16px;
}

.search-bar input {
    background: none;
    border: none;
    color: #154c87;
    width: 100%;
    outline: none;
    font-size: 14px;
}

.search-bar input::placeholder {
    color: rgba(21, 76, 135, 0.6);
}

.header-right {
    display: flex;
    align-items: center;
}

/* Header dropdown styles */
.header-dropdown {
    position: relative;
    margin-left: 5px;
}

.header-dropdown-toggle {
    cursor: pointer;
    user-select: none;
}

.header-icon-btn {
    background: none;
    border: none;
    color: var(--light-text);
    font-size: 16px;
    padding: 8px;
    cursor: pointer;
    border-radius: 4px;
    position: relative;
}

.header-icon-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.header-dropdown-menu {
    position: absolute;
    right: 0;
    top: 100%;
    background-color: var(--primary-bg) !important;
    min-width: 250px;
    border-radius: 8px;
    box-shadow: none !important;
    padding: 10px 0;
    display: none;
    z-index: 2000;
    border: 1px solid #edebe9;
}

.message-sender {
    font-weight: bold;
}

.message-preview {
    color: var(--secondary-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px;
}

.header-dropdown.show .header-dropdown-menu {
    display: block;
}

/* Notification Badge Styles */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #dc3545;
    /* Danger/red color */
    color: white;
    border-radius: 50%;
    padding: 0 5px;
    font-size: 10px;
    min-width: 15px;
    height: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: var(--primary-text);
    cursor: pointer;
}

.dropdown-item:hover {
    background-color: var(--hover-bg);
}

.dropdown-item i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.dropdown-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 5px 0;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    margin-left: 10px;
    cursor: pointer;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* App Container */
.app-container {
    display: flex;
    margin-top: 48px;
    height: calc(100vh - 48px);
}

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: #f8f8f8;
    border-right: 1px solid var(--border-color);
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.07);
    overflow-y: auto;
    height: 100%;
    transition: all 0.3s;
    position: fixed;
    left: 0;
    top: 48px;
    bottom: 0;
    z-index: 1000;
}

.sidebar.collapsed {
    width: 60px;
}

.nav-list {
    padding: 10px 0px;
}

.nav-item a {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    color: var(--primary-text);
    text-decoration: none;
}

.nav-item.active>a {
    color: var(--primary-color);
    background-color: #f3f2f1;
    position: relative;
    font-weight: 600;
}

.nav-item.active>a::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: var(--primary-color);
}

.nav-item.expanded>a .submenu-toggle {
    transform: rotate(180deg);
}

.submenu {
    position: relative;
    margin-left: 15px;
    padding-left: 10px;
    border-left: 1px solid var(--border-color);
    margin-top: 2px;
    margin-bottom: 2px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.nav-item.expanded .submenu {
    max-height: 1000px;
}

.submenu-item {
    position: relative;
    padding: 1px 0;
    margin-bottom: 0;
}

.submenu-item::before {
    content: "";
    position: absolute;
    left: -10px;
    top: 50%;
    width: 10px;
    height: 1px;
    background-color: var(--border-color);
}

.submenu-item a {
    padding: 4px 12px;
    font-size: 14px;
    color: var(--secondary-text);
}

.submenu-item.active a {
    color: var(--primary-color);
    font-weight: 600;
}

/* Hover effects */
.nav-item a:hover {
    color: var(--accent-color);
}

.submenu-item a:hover {
    color: var(--accent-color);
}

/* Collapsed sidebar adjustments */
.sidebar.collapsed .submenu {
    margin-left: 0;
    border-left: none;
    background-color: var(--sidebar-bg);
    box-shadow: none !important;
    border: 1px solid var(--border-color);
    padding: 5px;
}

.sidebar.collapsed .submenu-item::before {
    display: none;
}

.sidebar.collapsed .nav-item span,
.sidebar.collapsed .submenu-toggle {
    display: none;
}

.sidebar.collapsed .nav-item i {
    margin-right: 0;
    width: 100%;
    text-align: center;
    font-size: 18px;
}

.sidebar.collapsed .nav-item a {
    padding: 15px 0;
    justify-content: center;
}

.sidebar.collapsed .submenu {
    position: absolute;
    left: 60px;
    top: auto;
    width: 190px;
    background-color: var(--sidebar-bg);
    border: 1px solid var(--border-color);
    border-radius: 0 4px 4px 0;
    box-shadow: none !important;
    z-index: 1000;
}

.sidebar.collapsed .has-submenu:hover .submenu {
    max-height: 1000px;
    display: block;
}

/* Ensure submenu shows at correct position */
.sidebar.collapsed .has-submenu {
    position: relative;
}

/* Prevent submenu from showing at top of sidebar when collapsed */
.sidebar.collapsed .nav-item.has-submenu .submenu {
    display: none;
}

/* Show submenu only on hover in collapsed mode */
.sidebar.collapsed .nav-item.has-submenu:hover .submenu {
    display: block;
    max-height: none;
}

.sidebar.collapsed .submenu-item {
    padding-left: 10px;
}

.nav-item i {
    width: 24px;
    margin-right: 10px;
    text-align: center;
}

.nav-item:hover a {
    background-color: var(--hover-bg);
}

.submenu-toggle {
    margin-left: auto;
    font-size: 12px;
}

/* Submenu styles */
.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.nav-item.expanded .submenu {
    max-height: 1000px;
    /* Large enough to fit content */
}

.submenu-item {
    padding-left: 15px;
    margin-bottom: 0;
}

.submenu-item a {
    padding: 6px 16px;
    text-decoration: none;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 0;
    overflow-y: auto;
    overflow-x: hidden;
    background-color: var(--bg-color);
    margin-left: 250px;
    width: calc(100% - 250px);
    min-width: 0;
    transition: margin-left 0.3s, width 0.3s;
}

body.sidebar-collapsed .main-content {
    margin-left: 60px;
    width: calc(100% - 60px);
}

@media (max-width: 991px) {
    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
    }
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    background-color: var(--primary-bg);
    padding: 10px 20px;
    border-radius: 0;
    box-shadow: none !important;
    border-bottom: 1px solid var(--border-color);
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 576px) {
    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .content-header .d-flex.gap-2 {
        flex-wrap: wrap;
        width: 100%;
    }

    .content-header .btn {
        flex: 1 1 auto;
        text-align: center;
    }
}


/* Padding wrapper for tab content & rows inside main content */
.main-content .row {
    padding: 16px 20px 0;
    margin-left: 0;
    margin-right: 0;
}

/* Remove padding for rows that are already inside a card body */
.card-body .row,
.modal-sidebar-content .row {
    padding: 0;
}

.view-controls,
.action-buttons {
    display: flex;
    align-items: center;
}

.btn-view,
.btn-more {
    display: flex;
    align-items: center;
    padding: 0.375rem 0.875rem;
    background-color: var(--primary-bg);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    margin-right: 10px;
    cursor: pointer;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--primary-text);
    transition: background-color 0.15s;
}

/* Action button — visible outlined blue (Add new role, Add new permission, etc.) */
.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.375rem 0.875rem;
    background-color: transparent;
    border: 1px solid #154c87;
    border-radius: 3px;
    color: #154c87;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.5;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
    margin-right: 10px;
    text-decoration: none;
    white-space: nowrap;
}

.btn-action i {
    margin-right: 0;
    font-size: 12px;
}

.btn-action:hover {
    background-color: #154c87;
    color: #ffffff;
}

.btn-view i,
.btn-view i:last-child {
    margin-right: 8px;
    margin-left: 0;
}

.btn-view:hover,
.btn-more:hover {
    background-color: var(--hover-bg);
}

.btn {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;

    font-size: 0.875rem;
    line-height: 1.5;
    border-radius: 2px;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out,
        border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.btn-primary {
    color: #fff;
    background-color: #154c87;
    border-color: #154c87;
}

.btn-primary:hover {
    color: #fff;
    background-color: #103d6e;
    border-color: #103d6e;
}

.btn-primary:focus {
    box-shadow: none !important;
}

.btn-secondary {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}

.btn-secondary:hover {
    color: #fff;
    background-color: #5a6268;
    border-color: #545b62;
}

.btn-secondary:focus {
    box-shadow: none !important;
}

.btn-success {
    background-color: #198754;
    border-color: #198754;
    color: white;
}

.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

.btn-warning {
    background-color: #c9a457;
    border-color: #c9a457;
    color: black;
}

.btn-info {
    background-color: #0dcaf0;
    border-color: #0dcaf0;
    color: black;
}

.btn-light {
    background-color: #f8f9fa;
    border-color: #f8f9fa;
    color: black;
}

.btn-dark {
    background-color: #212529;
    border-color: #212529;
    color: white;
}

/* outline variants — each has its own color */
.btn-outline-primary {
    background-color: transparent;
    border: 1px solid #154c87;
    color: #154c87;
}

.btn-outline-primary:hover {
    background-color: #154c87;
    color: #fff;
}

/* Close/Cancel button — red border and text everywhere */
.btn-outline-secondary {
    background-color: transparent;
    border: 1px solid #a4262c;
    color: #a4262c;
}

.btn-outline-secondary:hover {
    background-color: #a4262c;
    color: #fff;
}

.btn-outline-success {
    background-color: transparent;
    border: 1px solid #198754;
    color: #198754;
}

.btn-outline-danger {
    background-color: transparent;
    border: 1px solid #dc3545;
    color: #dc3545;
}

.btn-outline-warning {
    background-color: transparent;
    border: 1px solid #c9a457;
    color: #c9a457;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    border-radius: 0.2rem;
}

.btn-outline-primary {
    color: #0d6efd;
    border-color: #0d6efd;
}

.btn-outline-primary:hover {
    background-color: #0d6efd;
    color: #fff;
}

.btn-outline-success {
    color: #198754;
    border-color: #198754;
}

.btn-outline-success:hover {
    background-color: #198754;
    color: #fff;
}

.btn-outline-danger {
    color: #dc3545;
    border-color: #dc3545;
}

.btn-outline-danger:hover {
    background-color: #dc3545;
    color: #fff;
}

.btn-outline-warning {
    color: #ffc107;
    border-color: #ffc107;
}

.btn-outline-warning:hover {
    background-color: #ffc107;
    color: #000;
}

.btn-outline-secondary {
    color: #6c757d;
    border-color: #6c757d;
    background-color: transparent;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}

.btn-outline-info {
    color: #0dcaf0;
    border-color: #0dcaf0;
}

.btn-outline-info:hover {
    background-color: #0dcaf0;
    color: #000;
}

.btn-outline-dark {
    color: #212529;
    border-color: #212529;
}

.btn-outline-dark:hover {
    background-color: #212529;
    color: #fff;
}

.organization-label {
    font-weight: 600;
    color: var(--accent-color);
}

/* Welcome Section */
.welcome-section {
    margin-bottom: 30px;
}

.welcome-heading {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 10px;
}

.welcome-text {
    color: var(--secondary-text);
}

/* pagination  */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    padding: 0.5rem 0;
    list-style: none;
    gap: 0.45rem;
    margin: 0;
}

/* Reset spacing */
.page-item {
    margin-top: 0.5rem;
}

/* Page links: numbers, arrows, etc. */
.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 30px;
    padding: 0 10px;
    font-size: 13px;
    color: #195ca0;
    background-color: #f1f5f9;
    border: 1px solid #d1d5db;
    border-radius: 3px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

/* Hover effect */
.page-link:hover {
    background-color: #e2e8f0;
    color: #0056b3;
}

/* Active page style */
.page-item.active .page-link {
    background-color: #195ca0;
    color: #ffffff;
    border-color: #195ca0;
    font-weight: 600;
    box-shadow: none !important;
}

/* Disabled buttons like "Previous" on first page */
.page-item.disabled .page-link {
    background-color: #f1f5f9;
    color: #9ca3af;
    border-color: #d1d5db;
    pointer-events: none;
    opacity: 0.65;
}

/* spinners  */
.spinner-border {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    vertical-align: text-bottom;
    border: 0.25em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.2em;
}

.spinner-grow {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    vertical-align: text-bottom;
    background-color: currentColor;
    border-radius: 50%;
    opacity: 0;
    animation: spinner-grow 0.75s linear infinite;
}

@keyframes spinner-border {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes spinner-grow {
    0% {
        transform: scale(0);
    }

    50% {
        opacity: 1;
    }
}

/* Content Sections */
.content-section {
    background-color: var(--primary-bg);
    border-radius: 0px;
    box-shadow: none !important;
    margin-bottom: 30px;
    padding: 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 20px;
    font-weight: 600;
}

.link-more {
    color: var(--accent-color);
}

/* Card Grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* ==========================================================================
   PREMIUM MIS DESIGN SYSTEM
   ========================================================================== */

/* Ultra-Minimized Dashboard Header - Final 100% Fix */
.welcome-banner {
    background: #ffffff !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-mis) !important;
    padding: 1.25rem 1.5rem !important;
    box-shadow: none !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.6rem !important;
    width: 100% !important;
    min-width: 100% !important;
    position: relative !important;
}

.welcome-msg {
    font-size: 1.25rem !important;
    font-weight: 500 !important;
    color: var(--primary-color) !important;
    letter-spacing: -0.01em !important;
    margin: 0 !important;
    text-transform: lowercase !important;
    /* Small letter styled */
}

.welcome-msg span {
    font-weight: 700 !important;
    color: var(--text-main) !important;
}

.mis-header-top {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    margin-bottom: 0.25rem !important;
}

.mis-breadcrumb {
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    color: var(--text-muted) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
}

.mis-header-date {
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    color: var(--text-muted) !important;
}

/* Premium Chart Legends */
.mis-chart-legend {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8rem;
    width: 100%;
}

.legend-item .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-item .label {
    color: var(--text-muted);
    font-weight: 600;
}

.legend-item .value {
    margin-left: auto;
    font-weight: 700;
    color: var(--text-main);
}

/* Premium Stat Cards - Compact Version */
.mis-stat-card {
    background: #ffffff !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-mis) !important;
    padding: 1rem !important;
    /* Managed padding */
    height: auto !important;
    /* Compact height */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: flex !important;
    flex-direction: column !important;
    box-shadow: none !important;
}

.mis-stat-card:hover {
    transform: translateY(-2px) !important;
    box-shadow: none !important;
    border-color: var(--primary-light) !important;
}

.mis-stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    /* Tighter spacing */
}

.mis-stat-label {
    font-size: 0.8rem !important;
    /* Smaller label */
    font-weight: 700 !important;
    color: var(--text-muted) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.03em !important;
}

.mis-stat-value {
    font-size: 1.5rem !important;
    /* More balanced size */
    font-weight: 800 !important;
    color: var(--text-main) !important;
    line-height: 1 !important;
    margin: 0.15rem 0 !important;
}

.mis-icon-box-premium {
    width: 38px !important;
    /* Smaller icon box */
    height: 38px !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1rem !important;
    background: var(--primary-light);
    color: var(--primary-color);
}

.mis-stat-footer {
    padding-top: 0.6rem !important;
    /* Tighter footer */
    margin-top: 0.6rem !important;
    border-top: 1px dashed var(--border-color);
}

.mis-stat-link-premium {
    font-size: 0.75rem !important;
    /* Smaller link font */
    font-weight: 600 !important;
    color: var(--primary-color) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
    transition: all 0.2s !important;
    text-decoration: none !important;
}

.mis-stat-link-premium:hover {
    gap: 0.6rem !important;
    color: var(--primary-dark) !important;
}

/* Color Accents */
.mis-accent-success .mis-icon-box-premium {
    background: var(--success-light);
    color: var(--success-color);
}

.mis-accent-info .mis-icon-box-premium {
    background: var(--info-light);
    color: var(--info-color);
}

/* Utility Grid */
.mis-grid-3 {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 1.5rem !important;
    width: 100% !important;
    margin-bottom: 2rem !important;
}

.mis-grid-4 {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 1.5rem !important;
    width: 100% !important;
    margin-bottom: 2rem !important;
}

@media (max-width: 1199px) {
    .mis-grid-4 {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 991px) {

    .mis-grid-3,
    .mis-grid-4 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 767px) {

    .mis-grid-3,
    .mis-grid-4 {
        grid-template-columns: 1fr !important;
    }
}


/* Specific grid for User Roles in Overview */
.mis-grid-roles {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 1rem !important;
    width: 100% !important;
}

@media (max-width: 991px) {
    .mis-grid-roles {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 480px) {
    .mis-grid-roles {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }

    .mis-grid-roles .mis-stat-card {
        padding: 0.75rem !important;
    }
}


.bg-primary-light {
    background-color: var(--primary-light) !important;
}

.bg-success-light {
    background-color: rgba(16, 185, 129, 0.1) !important;
}

.bg-info-light {
    background-color: rgba(6, 182, 212, 0.1) !important;
}

/* Landing Page (Welcome) Specific Redesign via Global CSS */
.hero-title {
    font-size: 2.25rem !important;
    font-weight: 800 !important;
    color: var(--primary) !important;
    line-height: 1.2 !important;
}

.stats-container {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 1.25rem !important;
    justify-content: center !important;
}

.stat-card {
    min-width: 280px !important;
    flex: 1 !important;
    border-radius: var(--card-radius) !important;
}

@media (max-width: 991px) {
    .stat-card {
        min-width: 100% !important;
    }

    .hero-title {
        font-size: 1.75rem !important;
    }
}

.card-body {
    overflow: visible !important;
}

/* Ensure cards and rows fill the full available width */
.card {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--border-color);
    border-radius: 2px;
    background-color: #ffffff;
    margin-bottom: 1rem;
}

.row {
    width: 100% !important;
    box-sizing: border-box;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-responsive .table {
    margin-bottom: 0;
}

/* Ensure headers don't wrap, forcing horizontal scroll on mobile if content is too wide */
.table-responsive th {
    white-space: nowrap !important;
}

@media (max-width: 767.98px) {
    .table-responsive .table {
        min-width: 800px;
        /* Force minimum width to trigger scrolling on mobile */
    }
}

.col-12,
.col-md-12 {
    width: 100%;
    box-sizing: border-box;
}

.list-group {
    display: flex;
    flex-direction: column;
    padding-left: 0;
    margin-bottom: 0;
    border-radius: 0.375rem;
}

.list-group-flush .list-group-item {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
}

.list-group-item {
    position: relative;
    display: block;
    padding: 0.75rem 1.25rem;
    color: #212529;
    text-decoration: none;
    background-color: #fff;
    border: 1px solid rgba(0, 0, 0, 0.125);
}

.list-group-item-action {
    width: 100%;
    color: #495057;
    text-align: inherit;
}

.list-group-item-action:hover,
.list-group-item-action:focus {
    color: #495057;
    text-decoration: none;
    background-color: #f8f9fa;
}

.list-group-item-action:active {
    color: #212529;
    background-color: #e9ecef;
}

.card:hover {
    box-shadow: none !important;
}

.card-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.card-icon {
    font-size: 24px;
    color: var(--accent-color);
    background-color: rgba(0, 120, 212, 0.1);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.card-menu {
    color: var(--secondary-text);
    cursor: pointer;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
}

.card-text {
    color: var(--secondary-text);
    font-size: 14px;
}

/* Organization Menu */
/* Organization Menu (Tabs) */
.organization-menu {
    display: flex;
    overflow-x: auto;
    padding: 0 20px;
    margin-bottom: 0;
    border-bottom: 1px solid var(--border-color);
    background-color: #ffffff;
    width: 100%;
    box-sizing: border-box;
}

.org-menu-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    white-space: nowrap;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.org-menu-item i {
    margin-right: 8px;
}

.org-menu-item.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    font-weight: 600;
}

.org-menu-item:hover {
    background-color: #f3f3f3;
}

/* Support Panel Styles */
.support-panel {
    position: fixed;
    bottom: 20px;
    right: 0;
    background-color: #195ca0;
    box-shadow: none !important;
    z-index: 1000;
    border-radius: 4px 0 0 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.support-panel.collapsed {
    transform: translateX(calc(100% - 40px));
}

.support-panel.collapsed .help-text {
    display: none;
}

.support-panel.collapsed .support-toggle {
    display: none;
}

.support-panel.expanded {
    transform: translateX(0);
}

.support-option {
    display: flex;
    align-items: center;
    padding: 10px 8px;
    color: #ffffff;
    white-space: nowrap;
    gap: 8px;
}

.help-text {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
}

.help-text:hover {
    color: #ffffff;
    text-decoration: underline;
}

.toggle-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
    cursor: pointer;
}

.support-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    color: #ffffff;
    font-size: 14px;
    padding: 0;
    transition: background-color 0.2s ease;
}

.support-toggle:hover,
.toggle-icon:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Support Panel Mobile Styles */
@media (max-width: 768px) {
    .support-panel {
        bottom: 16px;
    }

    .support-panel:not(.collapsed) {
        right: 16px;
        border-radius: 4px;
    }

    .support-panel.collapsed {
        transform: translateX(calc(100% - 40px));
    }

    .support-option {
        padding: 8px;
    }

    .help-text {
        font-size: 13px;
    }

    /* Initially collapsed on mobile */
    .support-panel {
        transform: translateX(calc(100% - 40px));
    }

    .support-panel.expanded {
        transform: translateX(0);
    }
}

/* Bootstrap Table Styles */
.table,
.vsla-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    border: none;
    margin-bottom: 1rem;
}

.table thead,
.vsla-table thead {
    background-color: #f3f3f3;
    border-bottom: 1px solid var(--border-color);
}

.table th,
.vsla-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-main);
    border: none;
}

.table td,
.vsla-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
    color: var(--text-main);
}

.table tbody tr:hover,
.vsla-table tbody tr:hover,
.table-hover tbody tr:hover {
    background-color: #f9f9f9;
}

.table tbody tr:last-child td,
.vsla-table tbody tr:last-child td {
    border-bottom: none;
}

/* ==============================
   Permissions Table Component
   ============================== */

/* Section header for "Permissions for [role]" */
.permissions-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #edebe9;
    background-color: #faf9f8;
    flex-wrap: wrap;
    /* Added for responsiveness */
    gap: 12px;
    /* Added for responsiveness */
}

@media (max-width: 576px) {
    .permissions-section-header {
        padding: 12px 16px;
    }

    .permissions-title {
        width: 100%;
        margin-bottom: 4px;
        font-size: 0.85rem;
    }

    .permissions-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

.permissions-title {
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    font-weight: 600;
    color: #323130;
    min-width: 0;
    /* Prevents overflow */
}

.permissions-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Permissions table specific tweaks */
.permissions-table th,
.permissions-table td {
    padding: 12px 20px;
    vertical-align: middle;
}

.permissions-table .permission-name {
    font-size: 0.875rem;
    color: #323130;
    font-weight: 500;
}

.permission-assigned-row {
    background-color: #f0faf0 !important;
}

/* Status badges */
.perm-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
}

.perm-badge-assigned {
    background-color: #dff6dd;
    color: #107c10;
    border: 1px solid #b7e0b6;
}

.perm-badge-unassigned {
    background-color: #f3f2f1;
    color: #605e5c;
    border: 1px solid #d2d0ce;
}

/* Toggle switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    margin: 0;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background-color: #d2d0ce;
    border-radius: 22px;
    transition: background-color 0.2s ease;
}

.toggle-slider::before {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    left: 3px;
    top: 3px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: none !important;
}

.toggle-switch input:checked+.toggle-slider {
    background-color: #154c87;
}

.toggle-switch input:checked+.toggle-slider::before {
    transform: translateX(18px);
}

.toggle-switch:hover .toggle-slider {
    filter: brightness(0.95);
}

/* 📱 Mobile - make sure it stays 100% width */
@media (max-width: 768px) {

    .table,
    .vsla-table {
        width: 100%;
        table-layout: fixed;
        /* again, force full width */
    }
}

.status-active {
    color: #38a169;
    font-weight: 500;
}

.status-late {
    color: #e53e3e;
    font-weight: 500;
}

/* Table Responsive */
@media (max-width: 768px) {

    .table,
    .vsla-table {
        font-size: 12px;
    }

    .table th,
    .table td,
    .vsla-table th,
    .vsla-table td {
        padding: 6px 8px;
    }
}

/* Page Templates */
.template-page {
    padding: 20px;
}

.page-title {
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 600;
}

/* Progress Steps */
.progress-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2.5rem auto;
    position: relative;
    max-width: 280px;
    padding: 0;
}

.progress-steps::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 60px;
    right: 60px;
    height: 2px;
    background-color: #e9ecef;
    z-index: 1;
    transform: translateY(-50%);
}

.step {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #fff;
    border: 2px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 1rem;
    color: #6c757d;
    transition: all 0.3s ease;
}

.step-label {
    font-size: 0.9rem;
    color: #6c757d;
    white-space: nowrap;
    font-weight: 500;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background-color: #195ca0;
    border-color: #195ca0;
    color: white;
}

.step.active .step-label {
    color: #195ca0;
    font-weight: 600;
}

.step.completed .step-number {
    background-color: #195ca0;
    border-color: #195ca0;
    color: white;
}

.step.completed .step-label {
    color: #195ca0;
}

.step-divider {
    width: 60px;
    height: 2px;
    background-color: #e9ecef;
    margin: 0 5px;
    position: relative;
    z-index: 1;
}

.step-divider.active {
    background-color: #195ca0;
}

/* Adjust spacing between steps */
.step:not(:last-child) {
    margin-right: 20px;
}

@media (max-width: 576px) {
    .progress-steps {
        max-width: 240px;
    }

    .step-number {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    .step-label {
        font-size: 0.8rem;
    }

    .step-divider {
        width: 40px;
    }

    .progress-steps::before {
        left: 50px;
        right: 50px;
    }
}

/* Login and Registration Styles */
.login-container {
    display: flex;
    min-height: 100vh;
    background: #f8f9fa;
}

.login-form-container {
    flex: 1;
    padding: 2rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 50%;
    max-width: none;
    margin: 0;
    background: #ffffff;
    box-shadow: none !important;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    padding: 0.5rem 0;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-image {
    height: 40px;
    width: auto;
}

.company-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: #195ca0;
}

.login-link,
.header-right a {
    color: #195ca0;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 2px;
    border: 1px solid #195ca0;
    transition: all 0.2s ease;
    margin-top: 0.5rem;
}

.login-link:hover,
.header-right a:hover {
    background: #195ca0;
    color: #ffffff;
}

/* Alert Refinements */
.registration-alert {
    background: rgba(25, 92, 160, 0.05);
    border-left: 3px solid #195ca0;
    padding: 1rem;
    margin: 1.5rem 0;
    border-radius: 2px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.registration-alert i {
    color: #195ca0;
    font-size: 1.25rem;
}

/* Form Refinements */
.login-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: #6c757d;
    margin-bottom: 0em;
    padding-bottom: 1rem;
    /* border-bottom: 1px solid #e9ecef; */
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2c3e50;
}

.form-group label.required::after {
    content: " *";
    color: #dc3545;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.input-group .form-control {
    width: 100%;
    padding: 0.65rem 2.5rem;
    font-size: 0.95rem;
    border: 1px solid #dee2e6;
    border-radius: 2px;
    transition: all 0.2s ease;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    z-index: 10;
}

.toggle-password {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    cursor: pointer;
    z-index: 10;
}

.toggle-password:hover {
    color: #195ca0;
}

.form-control:focus+.input-icon {
    color: #195ca0;
}

.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.forgot-password {
    margin-left: auto;
}

.forgot-password a {
    color: #195ca0;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.forgot-password a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.form-control {
    width: 100%;
    padding: 0.65rem 1rem 0.65rem 0.65rem;
    font-size: 0.95rem;
    border: 1px #dee2e6 solid;
    border-radius: 5px;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: #195ca0;
    box-shadow: none !important;
    outline: none;
}

.form-control:focus+.input-icon {
    color: #195ca0;
}

/* Button Refinements */
.btn {
    padding: 0.35rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 2px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
}

.btn-primary {
    background: #195ca0;
    border: 1px solid #195ca0;
    color: #ffffff;
}

.btn-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.input-group .border-danger {
    border: 1px solid #dc3545;
}

.btn-secondary {
    background: #6c757d;
    border: 1px solid #6c757d;
    color: #ffffff;
}

.btn-secondary:hover {
    background: #5a6268;
    border-color: #5a6268;
}

/* Image Container Refinements */
.image-container {
    flex: 1;
    width: 100%;
    background-image: url("../images/auth/login-bg.jpg");
    background-size: cover;
    background-position: center;
    position: relative;
    display: block;
}

.image-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
}

.image-container-footer {
    position: absolute;
    bottom: 1.5rem;
    left: 0;
    right: 0;
    text-align: center;
    color: #ffffff;
    font-size: 0.9rem;
    z-index: 1;
}

/* Support Panel Refinements */
.support-panel {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #46535f;
    border-radius: 2px;
    box-shadow: none !important;
    z-index: 1000;
}

.support-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.support-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Responsive Refinements */
@media (min-width: 992px) {
    .image-container {
        display: block;
    }
}

@media (max-width: 992px) {
    .login-form-container {
        width: 100%;
    }

    .image-container {
        display: none;
    }
}

@media (max-width: 768px) {
    .login-form-container {
        width: 100%;
        padding: 1.5rem;
    }

    .header-container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        margin-bottom: 2rem;
    }

    .logo-wrapper {
        justify-content: center;
    }

    .btn {
        width: 100%;
    }

    .form-group {
        margin-bottom: 1rem;
        padding-right: 0;
    }

    .input-group {
        margin-right: 0;
    }

    .form-control {
        padding-right: 1rem;
    }

    .row {
        margin-right: 0;
        margin-left: 0;
    }

    .app-logo {
        display: flex !important;
    }

    .search-bar {
        display: none !important;
    }
}

/* Progress Steps Refinements */
.progress-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2rem auto;
    position: relative;
    max-width: 400px;
}

.progress-steps::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 60px;
    right: 60px;
    height: 2px;
    background: #e9ecef;
    transform: translateY(-50%);
    z-index: 1;
}

.step {
    position: relative;
    z-index: 2;
    background: #ffffff;
    padding: 0 1rem;
}

.step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #6c757d;
    margin: 0 auto 0.5rem;
    transition: all 0.2s ease;
}

.step.active .step-number {
    background: #195ca0;
    border-color: #195ca0;
    color: #ffffff;
}

.step-label {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
    white-space: nowrap;
}

.step.active .step-label {
    color: #195ca0;
    font-weight: 600;
}

/* Improved Ikimina List Styles */
.ikimina-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
    margin-top: 1rem;
}

.ikimina-item {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    width: 100%;
    background: #f6f6f6;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    padding: 1.1rem 1.5rem;
    transition: box-shadow 0.2s, border-color 0.2s, background 0.2s;
    cursor: pointer;
    box-shadow: none !important;
    position: relative;
}

.ikimina-item.selected {
    border-color: #195ca0;
    background: #eaf2fa;
    box-shadow: none !important;
}

.ikimina-item:hover {
    border-color: #195ca0;
    background: #f0f6fb;
}

.ikimina-logo {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 8px;
    box-shadow: none !important;
    font-size: 2rem;
    color: #195ca0;
    overflow: hidden;
}

.ikimina-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.ikimina-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
}

.ikimina-name {
    font-size: 1rem;
    font-weight: 600;
    color: #222;
    margin-bottom: 0.1rem;
}

.ikimina-role {
    font-size: 0.78rem;
    color: #195ca0;
    font-weight: 500;
    background: #eaf2fa;
    border-radius: 5px;
    padding: 2px 10px;
    margin-top: 2px;
    letter-spacing: 0.01em;
}

@media (max-width: 600px) {
    .ikimina-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 1rem;
    }

    .ikimina-logo {
        width: 30px;
        height: 30px;
        font-size: 1.5rem;
    }

    .ikimina-name {
        font-size: 1rem;
    }

    .ikimina-role {
        font-size: 0.92rem;
    }
}

/* Custom Radio Styles */
.password-options {
    margin-top: 0.5rem;
}

.custom-radio {
    padding: 0.75rem 1rem;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
}

.custom-radio:hover {
    background-color: #f8f9fa;
}

.custom-radio input[type="radio"] {
    margin-right: 10px;
}

.custom-radio label {
    margin-bottom: 0;
    cursor: pointer;
    width: 100%;
}

.custom-radio input[type="radio"]:checked+label {
    color: #195ca0;
    font-weight: 500;
}

.custom-radio:has(input[type="radio"]:checked) {
    border-color: #195ca0;
    background-color: #f8f9fa;
}

/* Loading State Styles */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 1rem 0;
    box-shadow: none !important;
}

.loading-state .spinner-border {
    width: 2rem;
    height: 2rem;
    border-width: 0.2em;
    margin-bottom: 1rem;
}

.loading-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.message-text {
    font-weight: 500;
    color: #195ca0;
    font-size: 1.1rem;
    text-align: center;
}

.message-text.text-danger {
    color: #dc3545;
}

.retry-text {
    font-size: 0.9rem;
    color: #6c757d;
    text-align: center;
}

/* Keep form elements left-aligned */
.form-group {
    text-align: left;
}

.input-group {
    text-align: left;
}

.validation-error {
    text-align: left;
}

/* Button alignment */
.d-flex {
    display: flex !important;
}

.justify-content-end {
    justify-content: flex-end !important;
}

.ms-auto {
    margin-left: auto !important;
}

/* Gaps  */
.gap-0 {
    gap: 0 !important;
}

.gap-1 {
    gap: 0.25rem !important;
    /* 4px */
}

.gap-2 {
    gap: 0.5rem !important;
    /* 8px */
}

.gap-3 {
    gap: 1rem !important;
    /* 16px */
}

.gap-4 {
    gap: 1.5rem !important;
    /* 24px */
}

.gap-5 {
    gap: 3rem !important;
    /* 48px */
}

.row-gap-0 {
    row-gap: 0 !important;
}

.row-gap-1 {
    row-gap: 0.25rem !important;
}

.row-gap-2 {
    row-gap: 0.5rem !important;
}

.row-gap-3 {
    row-gap: 1rem !important;
}

.row-gap-4 {
    row-gap: 1.5rem !important;
}

.row-gap-5 {
    row-gap: 3rem !important;
}

.column-gap-0 {
    column-gap: 0 !important;
}

.column-gap-1 {
    column-gap: 0.25rem !important;
}

.column-gap-2 {
    column-gap: 0.5rem !important;
}

.column-gap-3 {
    column-gap: 1rem !important;
}

.column-gap-4 {
    column-gap: 1.5rem !important;
}

.column-gap-5 {
    column-gap: 3rem !important;
}

/* Network Status Styles */
.network-status-container {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1050;
    width: auto;
    pointer-events: none;
}

.network-alert {
    padding: 0.75rem 1.25rem;
    border-radius: 4px;
    box-shadow: none !important;
    background: white;
    margin-bottom: 1rem;
    pointer-events: auto;
    transition: all 0.3s ease;
}

.network-alert.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.network-alert.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.alert-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Timeout specific styles */
[x-cloak] {
    display: none !important;
}

/* Alert Modal Styles */
.alert-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alert-modal {
    background-color: var(--primary-bg);
    border-radius: 4px;
    box-shadow: none !important;
    width: 100%;
    max-width: 400px;
    margin: 0 20px;
    overflow: hidden;
}

.alert {
    position: relative;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.25rem;
}

.alert-modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-modal-header i {
    font-size: 20px;
    color: var(--accent-color);
}

.alert-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-text);
}

.alert-modal-content {
    padding: 20px;
    color: var(--secondary-text);
    line-height: 1.5;
}

.alert-modal-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.alert-modal-footer .btn {
    min-width: 100px;
}

/* Alert Modal Animations */
.alert-modal-enter {
    opacity: 0;
    transform: scale(0.95);
}

.alert-modal-enter-active {
    opacity: 1;
    transform: scale(1);
    transition: opacity 300ms, transform 300ms;
}

.alert-modal-exit {
    opacity: 1;
    transform: scale(1);
}

.alert-modal-exit-active {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 300ms, transform 300ms;
}

/* Mobile styles */
@media (max-width: 991px) {
    .sidebar {
        transform: translateX(-100%);
        width: 250px;
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .sidebar.collapsed {
        width: 250px;
    }

    body.sidebar-open {
        overflow: hidden;
    }
}

/* Search Modal Styles */
.search-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-modal-box {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: none !important;
    width: 90%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.search-modal-box input[type="text"] {
    width: 100%;
    padding: 10px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.search-modal-close {
    align-self: flex-end;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #333;
    cursor: pointer;
}

/* Alpine.js Dropdown Styles */
.relative {
    position: relative;
}

.inline-block {
    display: inline-block;
}

.inline-flex {
    display: inline-flex;
    align-items: center;
}

button.text-primary {
    background: none;
    border: none;
    color: var(--accent-color);
    cursor: pointer;
    padding: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.2s;
}

button.text-primary:hover {
    opacity: 0.8;
}

.absolute {
    position: absolute;
}

.right-0 {
    right: 0;
}

.mt-2 {
    margin-top: 0.5rem;
}

.w-48 {
    width: 12rem;
}

.rounded-md {
    border-radius: 0.375rem;
}

.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
        0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.bg-white {
    background-color: #ffffff;
}

.ring-1 {
    box-shadow: none !important;
}

.z-50 {
    z-index: 50;
}

.py-1 {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.text-sm {
    font-size: 0.875rem;
}

.hover\:bg-gray-100:hover {
    background-color: #f3f4f6;
}

/* Transition Classes */
.transition {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.duration-75 {
    transition-duration: 75ms;
}

.duration-100 {
    transition-duration: 100ms;
}

.transform {
    transform: translateZ(0);
}

.scale-95 {
    transform: scale(0.95);
}

.scale-100 {
    transform: scale(1);
}

.opacity-0 {
    opacity: 0;
}

.opacity-100 {
    opacity: 1;
}

/* Mobile Search */
.mobile-search {
    display: none;
    /* Hidden by default */
    width: 100%;
    align-items: center;
    gap: 10px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 6px 12px;
}

.mobile-search i {
    color: var(--light-text);
    font-size: 16px;
}

.mobile-search input {
    background: none;
    border: none;
    color: var(--light-text);
    width: 100%;
    outline: none;
    font-size: 14px;
}

.mobile-search input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

/* Media Queries */
@media (max-width: 768px) {
    .mobile-search {
        display: flex;
        /* Show on mobile */
    }

    .desktop-filters {
        display: none;
        /* Hide on mobile */
    }

    .search-bar {
        max-width: none;
        margin: 0 10px;
        background: none;
        padding: 0;
    }
}

@media (min-width: 769px) {
    .mobile-search {
        display: none;
        /* Hide on desktop */
    }

    .desktop-filters {
        display: flex;
        /* Show on desktop */
    }
}

/* Desktop Filters */
.desktop-filters {
    display: flex;
    align-items: center;
    width: 100%;
}

.desktop-filters i {
    color: var(--light-text);
    margin-right: 10px;
}

.desktop-filters input {
    background: none;
    border: none;
    color: var(--light-text);
    width: 100%;
    outline: none;
    margin-left: 10px;
}

.desktop-filters input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

/* Table dropdown fixes, refresh  */
[x-cloak] {
    display: none !important;
}

.dot-anim {
    display: inline-block;
    width: 1.5em;
    text-align: left;
}

.dot-anim:after {
    content: "...";
    animation: dots 1.2s steps(3, end) infinite;
}

@keyframes dots {

    0%,
    20% {
        color: rgba(0, 0, 0, 0);
        text-shadow: 0.3em 0 0 rgba(0, 0, 0, 0), 0.6em 0 0 rgba(0, 0, 0, 0);
    }

    40% {
        color: var(--primary-color);
        text-shadow: 0.3em 0 0 rgba(0, 0, 0, 0), 0.6em 0 0 rgba(0, 0, 0, 0);
    }

    60% {
        text-shadow: 0.3em 0 0 var(--primary-color), 0.6em 0 0 rgba(0, 0, 0, 0);
    }

    80%,
    100% {
        text-shadow: 0.3em 0 0 var(--primary-color), 0.6em 0 0 var(--primary-color);
    }
}

.fa-spin {
    animation: fa-spin 1s infinite linear;
}

@keyframes fa-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.dropdown-menu-list li a {
    display: block;
    padding: 8px 12px;
    font-size: 14px;
    color: var(--text-main);
    border-radius: 2px;
    transition: background 0.1s;
}

.dropdown-menu-list li a:hover {
    background-color: #f3f3f3;
    color: var(--primary-color);
}

.dropdown-menu-list li a:hover {
    background: #f1f5fa;
}

/* Premium Form & Stepper Redesign (Flat Design - 5px Radius) */
.mis-form-layout {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.mis-form-sidebar {
    width: 250px;
    flex-shrink: 0;
    position: sticky;
    top: 1.5rem;
}

.mis-form-content {
    flex-grow: 1;
}

.mis-stepper {
    background: #ffffff;
    border-radius: 5px;
    padding: 1rem;
    border: 1px solid #e2e8f0;
}

.mis-step-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 5px;
    margin-bottom: 0.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.mis-step-item:hover {
    background-color: #f8fafc;
    border-color: #e2e8f0;
}

.mis-step-item.active {
    background-color: #f0f7ff;
    border-color: rgba(0, 120, 212, 0.1);
}

.mis-step-indicator {
    width: 26px;
    height: 26px;
    border-radius: 5px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    margin-right: 0.75rem;
    flex-shrink: 0;
    border: 1px solid #d1d5db;
    color: #64748b;
    background: #ffffff;
}

/* Modern Registration Stepper Layout */
.registration-stepper-container {
    display: flex;
    flex-direction: column;
    background: #f8fafc;
    border-radius: 0px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    margin-bottom: 2rem;
}

.stepper-sidebar {
    width: 100%;
    background: #ffffff;
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
    padding: 1.25rem 1.75rem;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.sidebar-header h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0;
    letter-spacing: -0.025em;
}

.sidebar-header p {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 0;
    line-height: 1.5;
}

.stepper-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    gap: 0.25rem;
    padding-bottom: 0.25rem;
    scrollbar-width: none;
}

.stepper-nav::-webkit-scrollbar {
    display: none;
}

.stepper-nav li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.875rem;
    flex-shrink: 0;
    border-radius: 0px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    white-space: nowrap;
}

.stepper-nav li:hover {
    background: #f1f5f9;
}

.stepper-nav li.active {
    background: #f0f9ff;
    box-shadow: inset 0 0 0 1px #bae6fd;
}

.stepper-nav li.active::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: #0078d4;
    border-radius: 0;
}

.stepper-nav li.active .step-indicator {
    background: #0078d4;
    border-color: #0078d4;
    color: #fff;
    transform: scale(1.05);
}

.stepper-nav li.active span {
    color: #0078d4;
    font-weight: 700;
}

.stepper-nav li.completed .step-indicator {
    background: #10b981;
    border-color: #10b981;
    color: #fff;
}

/* Step error state — shown when validation fails after submit */
.stepper-nav li.has-error .step-indicator {
    background: #ef4444;
    border-color: #ef4444;
    color: #fff;
    animation: pulse-error 1.5s ease-in-out 3;
}

.stepper-nav li.has-error span {
    color: #dc2626;
    font-weight: 600;
}

.stepper-nav li.has-error::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: #ef4444;
    border-radius: 0;
}

@keyframes pulse-error {

    0%,
    100% {
        transform: scale(1);
        box-shadow: none;
    }

    50% {
        transform: scale(1.12);
        box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.25);
    }
}

.step-indicator {
    width: 28px;
    height: 28px;
    border-radius: 0px !important;
    border: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 800;
    color: #94a3b8;
    flex-shrink: 0;
    background: #fff;
    transition: all 0.3s;
}

.stepper-nav li span {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #475569;
}

.step-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #475569;
}

.stepper-content-wrapper {
    flex: 1;
    background: #ffffff;
    padding: 3.5rem;
    position: relative;
    overflow-y: auto;
}

/* Form Sections */
.mis-form-section {
    width: 100%;
    /* Cover 100% width */
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.section-title i {
    font-size: 1.25rem;
    /* Reduced icon size */
    color: #0078d4;
}

.section-title span {
    font-size: 1.125rem;
    /* Reduced text size */
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.01em;
}

/* High-Fidelity Input Fields (M365 Style) */
.mis-field-group {
    margin-bottom: 1.25rem;
}

.mis-field-group .form-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #475569;
    text-transform: capitalize;
    letter-spacing: normal;
    margin-bottom: 0.5rem;
    display: block;
}

.mis-field-group .form-control,
.mis-field-group .form-select {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-bottom: 2px solid #cbd5e1;
    border-radius: 0px;
    padding: 0 1.25rem;
    /* Increased side padding */
    height: 48px;
    font-size: 1rem;
    color: #1e293b;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
}

/* Ensure horizontal spacing between columns */
.mis-form-section .col-md-4 {
    padding-right: 2.5rem !important;
    /* Forces horizontal gap */
}

.mis-form-section .col-md-4:last-child {
    padding-right: calc(var(--bs-gutter-x) / 2) !important;
}

.mis-field-group .form-control:focus,
.mis-field-group .form-select:focus {
    background-color: #ffffff;
    border-color: #0078d4;
    border-bottom-color: #0078d4;
    box-shadow: 0 4px 12px rgba(0, 120, 212, 0.08);
    outline: none;
}

.mis-field-group .form-control::placeholder {
    color: #94a3b8;
    opacity: 0.7;
}

/* Radio / Checkbox vertical option groups */
.mis-radio-group {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.4rem;
    margin-top: 0.25rem;
}

.mis-radio-group .form-check {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    padding-left: 0;
    margin-bottom: 0;
}

.mis-radio-group .form-check-input {
    position: relative;
    flex-shrink: 0;
    margin-top: 0;
    margin-left: 0;
}

/* Stepper Footer */
.stepper-footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid #f1f5f9;
    width: 100%;
    /* Cover 100% width */
}

.mis-btn-prev {
    background: transparent;
    border: 1px solid #e2e8f0;
    color: #64748b;
    font-weight: 600;
    padding: 0.625rem 1.25rem;
    border-radius: 0px;
}

.mis-btn-prev:hover {
    background: #f8fafc;
    color: #1e293b;
}

.mis-btn-next {
    background: #0078d4;
    border: none;
    color: #fff;
    font-weight: 600;
    padding: 0.625rem 1.75rem;
    border-radius: 0px;
    transition: all 0.2s;
}

.mis-btn-next:hover {
    background: #005a9e;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 120, 212, 0.2);
}

.mis-btn-save {
    background: #10b981;
    border: none;
    color: #fff;
    font-weight: 700;
    padding: 0.625rem 2.25rem;
    border-radius: 0px;
}

.mis-btn-save:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

/* Custom Checkbox/Radio Styling */
.form-check-input:checked {
    background-color: #0078d4;
    border-color: #0078d4;
}

.radio-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-top: 1.25rem;
}

.radio-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.25rem;
}

/* Modern Table */
.mis-table-modern {
    width: 100%;
}

.mis-table-modern th {
    background: #f8fafc;
    font-size: 0.75rem;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    padding: 1.25rem 1rem;
    border-bottom: 2px solid #e2e8f0;
}

.mis-table-modern td {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid #f1f5f9;
}

@media (max-width: 767px) {
    .mis-form-section .col-md-4 {
        padding-right: calc(var(--bs-gutter-x) / 2) !important;
        /* Reset padding for mobile */
        width: 100% !important;
        /* Explicitly cover 100% width on mobile */
    }
}

@media (max-width: 991px) {
    .stepper-sidebar {
        padding: 1rem;
    }

    .stepper-content-wrapper {
        padding: 1.5rem 1rem;
    }

    .mis-form-section .col-md-4 {
        padding-right: calc(var(--bs-gutter-x) / 2) !important;
        width: 100% !important;
        margin-bottom: 0.5rem;
    }

    .section-title {
        margin-bottom: 1.25rem;
        padding-bottom: 0.75rem;
    }

    .sidebar-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}