#unifiedPanel > .unified-section:first-child {
    margin-top: 0 !important;
}
#unifiedPanel {
    padding-top: 0 !important;
}
#unifiedPanel .unified-section:first-of-type {
    margin-top: 0 !important;
}

#unifiedToggle {
    border-color: #ff0000 !important;
    color: #ff0000 !important;
    background: #ffffff !important;
    border-radius: 10px;
    font-weight: 600;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-right: 0 !important;
}

#workspaceTourPanelStart {
    width: 28px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    font-size: 1.1rem !important;
}

#unifiedPanel .unified-section {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

#unifiedPanel .unified-section h6 {
    display: block;
    width: 100%;
    margin: 0 0 10px;
    line-height: 1.25;
}

#unifiedPanel select.form-control,
#unifiedPanel button.btn,
#unifiedPanel a.btn {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    white-space: normal;
}

#unifiedPanel .impersonation-action-row {
    display: flex;
    align-items: stretch;
    gap: 10px;
    margin-top: 12px;
    margin-bottom: 10px;
}

#unifiedPanel .impersonation-action-row .btn {
    flex: 1 1 0;
    width: auto !important;
    margin-bottom: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 42px;
    line-height: 1.2;
}

#unifiedPanel #impSelect,
#unifiedPanel #impSelect + .select2,
#unifiedPanel #impSelect + .select2-container,
#unifiedPanel .select2-container {
    margin-bottom: 12px !important;
}

#unifiedPanel .form-control {
    margin-bottom: 22px !important;
    line-height: 1.5 !important;
    padding-top: 14px !important;
    padding-bottom: 14px !important;
    font-size: 1rem !important;
    height: auto !important;
    min-height: 48px !important;
    overflow: visible !important;
}
#unifiedPanel .form-control:last-of-type {
    margin-bottom: 18px !important;
}
.unified-section .form-control:last-of-type {
    margin-bottom: 0 !important;
}
/* --- Modern Workspace/Profile Panel Styling --- */
.unified-section {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    padding: 28px 22px 22px 22px;
    margin-bottom: 22px;
    border: 1px solid #e3e7ee;
}
.workspace-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}
.workspace-header-label {
    font-size: 1.18rem;
    font-weight: 700;
    color: #232b3b;
    margin-bottom: 0;
    background: none !important;
    padding: 0;
    border: none;
    box-shadow: none;
    display: block;
    width: 100%;
}
.form-control, .user-name-label {
    border-radius: 10px;
    border: 1.5px solid #e3e7ee;
    font-size: 1.08rem;
    margin-bottom: 26px;
    /* padding: 12px 16px; */
    background: #f8fafc;
    transition: border 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 2px rgba(31, 75, 153, 0.03);
    color: #25324a;
    width: 100%;
    box-sizing: border-box;
}
.form-control:focus {
    border-color: #3b82f6;
    background: #fff;
    box-shadow: 0 0 0 2px #c7e2ff;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.user-name-label {
    pointer-events: none;
    font-weight: 500;
    margin-bottom: 16px;
}
.workspace-help-btn {
    background: none;
    border: none;
    padding: 0;
    margin-left: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: box-shadow 0.2s;
    border-radius: 50%;
}
.workspace-help-btn:focus, .workspace-help-btn:hover {
    box-shadow: 0 0 0 2px #d1e3fa;
    outline: none;
}
.unified-section .btn {
    border-radius: 10px;
    font-size: 1.08rem;
    font-weight: 600;
    padding: 12px 0;
    margin-bottom: 12px;
    transition: background 0.2s, color 0.2s;
}
.unified-section .btn-danger {
    background: #e53935;
    color: #fff;
    border: none;
}
.unified-section .btn-danger:hover {
    background: #b71c1c;
}
.unified-section .btn-outline-primary {
    border: 1.5px solid #4f5b6b;
    color: #4f5b6b;
    background: #fff;
}
.unified-section .btn-outline-primary:hover {
    background: #4f5b6b;
    color: #fff;
}
.unified-divider {
    border-top: 1.5px solid #e3e7ee;
    margin: 20px 0;
}
.ck-editor__editable,
textarea {
    min-height: 150px;
}

.datatable {
    width: 100% !important;
}

table.dataTable tbody td.select-checkbox::before,
table.dataTable tbody td.select-checkbox::after,
table.dataTable tbody th.select-checkbox::before,
table.dataTable tbody th.select-checkbox::after {
    top: 50%;
}

.dataTables_length,
.dataTables_filter,
.dt-buttons {
    margin-bottom: 0.333em;
    margin-top: .2rem;
}

.dataTables_filter {
    margin-right: .2rem;
}

.dt-buttons .btn {
    margin-left: 0.333em;
    border-radius: 0;
}

.table.datatable {
    box-sizing: border-box;
    border-collapse: collapse;
}

table.dataTable thead th {
    border-bottom: 2px solid #c8ced3;
}

.dataTables_wrapper.no-footer .dataTables_scrollBody {
    border-bottom: 1px solid #c8ced3;
}

@media (max-width: 575.98px) {
    .table-mobile-cards {
        width: 100% !important;
        min-width: 0 !important;
        border: 0;
    }

    .table-mobile-cards thead {
        display: none;
    }

    .table-mobile-cards tbody tr:not(.child) {
        display: block;
        margin-bottom: .75rem;
        border: 1px solid #d5dbe3;
        border-radius: .45rem;
        overflow: hidden;
        background: #fff;
    }

    .table-mobile-cards tbody tr:not(.child):last-child {
        margin-bottom: 0;
    }

    .table-mobile-cards tbody tr:not(.child) > td,
    .table-mobile-cards tbody tr:not(.child) > th {
        display: block;
        width: 100% !important;
        border: 0 !important;
        border-top: 1px solid #edf0f5 !important;
        padding: .5rem .6rem;
        white-space: normal !important;
        word-break: break-word;
        overflow-wrap: anywhere;
    }

    .table-mobile-cards tbody tr:not(.child) > td:first-child,
    .table-mobile-cards tbody tr:not(.child) > th:first-child {
        border-top: 0 !important;
    }

    .table-mobile-cards tbody tr:not(.child) > td[data-label=''],
    .table-mobile-cards tbody tr:not(.child) > th[data-label=''] {
        display: none;
    }

    .table-mobile-cards tbody tr:not(.child) > td::before,
    .table-mobile-cards tbody tr:not(.child) > th::before {
        content: attr(data-label);
        display: block;
        margin-bottom: .25rem;
        font-weight: 600;
        color: #4f5b6b;
        line-height: 1.25;
    }

    .table-mobile-cards tbody tr:not(.child) > td:last-child .btn,
    .table-mobile-cards tbody tr:not(.child) > th:last-child .btn,
    .table-mobile-cards tbody tr:not(.child) > td:last-child form,
    .table-mobile-cards tbody tr:not(.child) > th:last-child form {
        display: inline-flex;
        align-items: center;
        margin: 0 .25rem .25rem 0 !important;
    }

    .table-mobile-cards tbody img {
        max-width: 100%;
        height: auto;
    }

    .table-mobile-cards-wrapper .row {
        margin-left: 0;
        margin-right: 0;
    }

    .table-mobile-cards-wrapper .row > [class*='col-'] {
        flex: 0 0 100%;
        max-width: 100%;
        padding-left: 0;
        padding-right: 0;
        text-align: left;
    }

    .table-mobile-cards-wrapper .dataTables_filter {
        float: none !important;
        width: 100% !important;
        margin-top: .35rem;
        margin-bottom: .4rem;
        text-align: left !important;
    }

    .table-mobile-cards-wrapper .dataTables_filter label {
        width: 100%;
        margin: 0;
        display: grid !important;
        grid-template-columns: 1fr;
        gap: .35rem;
        font-size: 0;
    }

    .table-mobile-cards-wrapper .dataTables_filter input {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        font-size: .92rem;
    }

    .table-mobile-cards-wrapper .dataTables_length,
    .table-mobile-cards-wrapper .dataTables_paginate,
    .table-mobile-cards-wrapper .dataTables_info {
        float: none !important;
        width: 100% !important;
        margin-top: .45rem;
        text-align: left !important;
    }
}

.select2 {
    max-width: 100%;
    width: 100% !important;
}

.select2-selection__rendered {
    padding-bottom: 5px !important;
}

.has-error .invalid-feedback {
    display: block !important;
}

.btn-info,
.badge-info {
    color: white;
}

table.dataTable thead .sorting,
table.dataTable thead .sorting_asc,
table.dataTable thead .sorting_desc {
    background-image: none;
}

.sidebar .nav-item {
    cursor: pointer;
}

.btn-default {
    color: #23282c;
    background-color: #f0f3f5;
    border-color: #f0f3f5;
}

.btn-default.focus,
.btn-default:focus {
    box-shadow: 0 0 0 .2rem rgba(209, 213, 215, .5);
}

.btn-default:hover {
    color: #23282c;
    background-color: #d9e1e6;
    border-color: #d1dbe1;
}

.btn-group-xs > .btn,
.btn-xs {
    padding: 1px 5px;
    font-size: 12px;
    line-height: 1.5;
    border-radius: 3px;
}

.datatable-User th,
.datatable-User td {
    padding: .22rem .45rem !important;
    line-height: 1.2;
    vertical-align: middle !important;
}

.datatable-User thead th {
    padding-top: .55rem !important;
    padding-bottom: .55rem !important;
    line-height: 1.25;
    vertical-align: middle !important;
}

.datatable-User th.user-select-col,
.datatable-User td.user-select-col,
.datatable-User th.select-checkbox,
.datatable-User td.select-checkbox {
    width: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    text-align: center !important;
    padding-left: .2rem !important;
    padding-right: .2rem !important;
}

.datatable-User th.user-id-col,
.datatable-User td.user-id-col,
.datatable-User th.id-col,
.datatable-User td.id-col,
.datatable-User th:nth-child(2),
.datatable-User td:nth-child(2) {
    width: 58px !important;
    min-width: 58px !important;
    max-width: 58px !important;
    white-space: nowrap;
    text-align: center !important;
}

.datatable-User th:nth-child(3),
.datatable-User td:nth-child(3) {
    min-width: 160px;
}

.datatable-User th:last-child,
.datatable-User td:last-child {
    width: 44px !important;
    min-width: 44px;
    max-width: 44px !important;
    text-align: center;
    white-space: nowrap;
    overflow: visible;
    position: relative;
}

.datatable-User th.user-checkbox-col,
.datatable-User td.user-checkbox-col {
    text-align: center !important;
    vertical-align: middle !important;
}

.datatable-User th.user-role-col,
.datatable-User td.user-role-col,
.datatable-User th:nth-child(4),
.datatable-User td:nth-child(4) {
    text-align: center !important;
}

.datatable-User .user-role-col .user-role-select {
    text-align: center;
    text-align-last: center;
}

.datatable-User .form-control,
.datatable-User .form-control-sm,
.datatable-User .custom-select,
.datatable-User .custom-select.form-control-sm,
.datatable-User .user-role-select {
    height: 28px !important;
    min-height: 28px !important;
    margin-bottom: 0 !important;
    padding: .15rem 1.45rem .15rem .45rem !important;
    font-size: .9rem !important;
    line-height: 1.2 !important;
}

.datatable-User input[type="checkbox"] {
    width: 15px;
    height: 15px;
    margin: 0;
    vertical-align: middle;
}

.datatable-User .user-actions-menu {
    display: inline-flex;
    position: relative;
}

.datatable-User .user-actions-toggle {
    width: 28px;
    height: 28px;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #cfd7e3;
    background: #ffffff;
    color: #17233b;
    border-radius: .35rem;
}

.datatable-User .user-actions-toggle::after {
    display: none;
}

.datatable-User .user-actions-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 150px;
    padding: .35rem;
    background: #ffffff;
    border: 1px solid #c0cad8;
    border-radius: .45rem;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .16);
    z-index: 1050;
    text-align: left;
}

.datatable-User .user-actions-menu.is-open .user-actions-dropdown {
    display: block;
}

.datatable-User .user-actions-dropdown .btn,
.datatable-User .user-actions-dropdown form,
.datatable-User .user-actions-dropdown input[type="submit"] {
    width: 100%;
    margin: 0 0 .3rem !important;
}

.datatable-User .user-actions-dropdown .btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: .35rem;
    padding: .25rem .45rem !important;
    text-align: left;
    white-space: nowrap;
}

.datatable-User .user-actions-dropdown form {
    display: block !important;
}

.datatable-User .user-actions-dropdown input[type="submit"] {
    display: block;
    padding: .25rem .45rem !important;
    text-align: left;
}

.datatable-User .user-actions-dropdown > :last-child,
.datatable-User .user-actions-dropdown form:last-child input[type="submit"] {
    margin-bottom: 0 !important;
}

.searchable-title {
    font-weight: bold;
}
.searchable-fields {
    padding-left:5px;
}
.searchable-link {
    padding:0 5px 0 5px;
}
.searchable-link:hover   {
    cursor: pointer;
    background: #eaeaea;
}
.select2-results__option {
    padding-left: 0px;
    padding-right: 0px;
}

.form-group .required::after {
    content: " *";
    color: red;
}

.form-check.is-invalid ~ .invalid-feedback {
    display: block;
}

.c-sidebar-brand .c-sidebar-brand-full,
.c-sidebar-brand .c-sidebar-brand-full:visited,
.c-sidebar-brand .c-sidebar-brand-full:hover,
.c-sidebar-brand .c-sidebar-brand-full:focus {
    color: #ffffff !important;
    text-decoration: none;
}

.sidebar-brand-line {
    font-size: 1rem;
    color: #ffffff;
    text-decoration: none;
    margin-top: 8px;
    margin-bottom: 2px;
    line-height: 1.1;
    display: block;
}

.sidebar-user-line {
    font-size: 0.85rem;
    color: #ffffff;
    text-decoration: none;
    margin-top: 2px;
    line-height: 1.1;
    display: block;
}

.sidebar-brand-line:hover,
.sidebar-user-line:hover {
    text-decoration: none;
    color: #ffffff;
}

.custom-select.form-control-sm {
    padding: 0.25rem 1.5rem;
}
.form-control:disabled, .form-control[readonly] {
    background-color: #fff;
    opacity: 1;
}

/* Admin sidebar hover to match landing palette */
.c-sidebar .c-sidebar-nav-link:hover,
.c-sidebar .c-sidebar-nav-dropdown-toggle:hover {
    background: rgba(255, 0, 0, 0.15);
    color: #ff0000;
}

.c-sidebar .c-sidebar-nav-link:hover .c-sidebar-nav-icon,
.c-sidebar .c-sidebar-nav-dropdown-toggle:hover .c-sidebar-nav-icon {
    color: #ff0000;
}

/* Remove stray header separators/lines on the right edge */
.c-header,
.c-header::after,
.c-header-nav .c-header-nav-item,
.c-header-nav .c-header-nav-item::after {
    border-right: none !important;
}

#unifiedToggle {
    border-color: #ff0000;
    color: #ff0000;
    margin-right: 12px;
}

#unifiedToggle:hover,
#unifiedToggle:focus {
    background: #ff0000;
    color: #ffffff;
}

#unifiedToggle:hover .fa,
#unifiedToggle:focus .fa {
    color: #ffffff;
}

.btn-primary {
    color: rgb(255, 255, 255);
    background-color: rgb(31, 150, 219);
    border-color: rgb(208, 215, 167);
}

.text-light {
    align-content: center;
    text-align: center;
    font-size: .875rem;
    color: rgb(8, 8, 8)!important;
}

/* Slide Panel */
.workspace-panel {
    position: fixed;
    top: 0;
    right: -320px;
    width: 320px;
    height: 100vh;
    background: #fff;
    border-left: 1px solid #dee2e6;
    box-shadow: -4px 0 8px rgba(0,0,0,0.1);
    transition: right 0.35s ease;
    z-index: 1050;
    padding: 15px;
}

.workspace-panel.open {
    right: 0;
}

.workspace-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    margin-bottom: 15px;
    border-bottom: 1px solid #f1f1f1;
    padding-bottom: 10px;
}

.workspace-body {
    overflow-y: auto;
    height: calc(100vh - 80px);
}

#sidebar {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

#sidebar .c-sidebar-nav {
    flex: 1 1 auto;
}

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.08);
}

/* Admin theme polish to match landing aesthetic */
body.c-app {
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
    color: #111417;
    background: linear-gradient(120deg, #f7f2eb 0%, #f0efe7 55%, #e9f4f4 100%);
}


.app-footer {
    position: sticky;
    bottom: 0;
    z-index: 20;
    width: 100%;
    padding: 10px 16px;
    background: #ffffff;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    text-align: center;
    font-size: 0.9rem;
}

.app-footer__text {
    color: #6c757d;
}

.app-footer__links {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    margin-left: 10px;
}

.app-footer__text a {
    color: #1f4b99;
    font-weight: 600;
    text-decoration: none;
}

.app-footer__text a:hover {
    text-decoration: underline;
}

.rating-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #6c757d;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: #ffffff;
}

.rating-btn--active {
    color: #1f4b99;
    border-color: rgba(31, 75, 153, 0.5);
    background: rgba(31, 75, 153, 0.08);
}

.plan-choice {
    cursor: pointer;
    border: 1px solid #e1e4e8;
}

.plan-choice input[type='radio'] {
    transform: scale(1.1);
}

.workspace-btn {
    position: fixed;
    top: 10px;
    right: 40px;
    z-index: 1040;
}

/* Make table columns fit content */
.datatable th.col-fit,
.datatable td.col-fit {
    width: 1%;
    white-space: nowrap;
}

.datatable th.id-col,
.datatable td.id-col,
table.dataTable th.id-col,
table.dataTable td.id-col {
    width: 1% !important;
    max-width: 1px;
    white-space: nowrap;
}

table.dataTable.datatable-User th.user-id-col,
table.dataTable.datatable-User td.user-id-col,
table.dataTable.datatable-User th.id-col,
table.dataTable.datatable-User td.id-col {
    width: 58px !important;
    min-width: 58px !important;
    max-width: 58px !important;
    text-align: center !important;
}

table.dataTable.datatable-User th.user-select-col,
table.dataTable.datatable-User td.user-select-col,
table.dataTable.datatable-User th.select-checkbox,
table.dataTable.datatable-User td.select-checkbox {
    width: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    text-align: center !important;
}
