.topbar,
.topbar .top-navbar,
.topbar .navbar-header,
.topbar .navbar-collapse {
    background: #1e4db7 !important;
}

.topbar .nav-link,
.topbar .navbar-brand,
.topbar .logo-text {
    color: #ffffff !important;
}

.topbar .navbar-header {
    padding: 0 20px;
}

.topbar .navbar-brand,
.topbar .nav-link {
    display: flex;
    align-items: center;
}

.app-brand-icon {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 30px;
    overflow: hidden;
    border-radius: 9px;
    margin-right: 10px;
}

.app-brand-icon img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.app-logo-setting {
    display: flex;
    align-items: center;
    gap: 14px;
}

.app-logo-preview {
    width: 46px;
    height: 46px;
    padding: 8px;
    border: 1px solid #edf1f7;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 46px;
    background: #1e4db7;
}

.app-logo-preview img {
    width: 30px;
    height: 30px;
    display: block;
    border-radius: 9px;
    object-fit: cover;
}

.app-logo-cropper {
    margin-top: 14px;
    padding: 14px;
    border: 1px solid #edf1f7;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 18px;
    background: #f8fbff;
}

.app-logo-cropper-stage {
    position: relative;
    width: 220px;
    height: 220px;
    flex: 0 0 220px;
    overflow: hidden;
    border: 2px solid #1e4db7;
    border-radius: 18px;
    background: #ddebff;
    cursor: grab;
    touch-action: none;
}

.app-logo-cropper-stage.is-dragging {
    cursor: grabbing;
}

.app-logo-cropper-stage::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: inset 0 0 0 999px rgba(30, 77, 183, 0.08);
    pointer-events: none;
}

.app-logo-cropper-stage img {
    position: absolute;
    top: 0;
    left: 0;
    max-width: none;
    user-select: none;
    pointer-events: none;
    transform-origin: top left;
}

.app-logo-cropper-tools {
    width: 100%;
    max-width: 280px;
}

.login-brand-icon {
    width: 72px;
    height: 72px;
    padding: 12px;
    border-radius: 18px;
    background: #1e4db7;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-brand-icon img {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
}

.participant-brand-icon {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.15);
}

.participant-brand-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.topbar .topbar-action {
    width: auto;
    height: 32px !important;
    min-height: 32px !important;
    line-height: 32px !important;
    margin: 0 2px !important;
    padding: 0 8px !important;
    border: 1px solid transparent;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.topbar .navbar-nav .nav-item {
    display: flex;
    align-items: center;
}

.topbar .topbar-action .fs-5 {
    font-size: 1.1rem !important;
    line-height: 1;
}

.topbar .topbar-action:hover,
.topbar .topbar-action:focus {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.24);
    box-shadow: none;
}

.topbar-user-icon,
.topbar-chevron-icon {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.topbar-user-icon svg,
.topbar-chevron-icon svg {
    width: 20px;
    height: 20px;
    display: block;
}

.topbar-chevron-icon {
    width: 16px;
    height: 16px;
}

.topbar-chevron-icon svg {
    width: 16px;
    height: 16px;
}

.topbar .user-menu-toggle::after {
    display: none;
}

.mobile-user-menu {
    display: none;
}

.left-sidebar .scroll-sidebar {
    padding-top: 12px;
}

.app-loader {
    position: fixed;
    inset: 0;
    z-index: 20000;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: wait;
    pointer-events: auto;
}

.app-loader.d-none {
    display: none !important;
    pointer-events: none !important;
}

.app-loader-card {
    min-width: 190px;
    padding: 18px 22px;
    border: 1px solid #edf1f7;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 16px 35px rgba(17, 20, 45, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #11142d;
    font-weight: 600;
}

body {
    overflow-x: hidden;
}

.page-wrapper {
    display: block !important;
}

.app-content {
    width: 100%;
    max-width: 100%;
}

.app-page-header {
    padding: 18px 24px 0;
}

.page-header-card {
    padding: 0 0 16px;
    border-bottom: 1px solid #edf1f7;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.page-eyebrow {
    display: inline-block;
    margin-bottom: 4px;
    color: #1e4db7;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.page-title {
    margin: 0;
    color: #11142d;
    font-size: 1.25rem;
    font-weight: 700;
}

.page-subtitle {
    max-width: 640px;
    margin: 5px 0 0;
    color: #6c757d;
    font-size: 0.88rem;
}

.page-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.sidebar-link {
    gap: 12px;
}

.sidebar-icon {
    width: 22px;
    min-width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: currentColor;
}

.sidebar-icon svg {
    width: 20px;
    height: 20px;
    display: block;
}

#main-wrapper .left-sidebar,
#main-wrapper .page-wrapper,
#main-wrapper .navbar-header {
    transition: all 0.2s ease;
}

#main-wrapper.mini-sidebar .left-sidebar {
    width: 70px;
}

#main-wrapper.mini-sidebar .page-wrapper {
    margin-left: 70px;
}

#main-wrapper.mini-sidebar .navbar-header {
    width: 70px;
    padding: 0;
    justify-content: center;
}

#main-wrapper.mini-sidebar .navbar-brand {
    justify-content: center;
    padding-left: 0;
}

#main-wrapper.mini-sidebar .app-brand-icon {
    margin-right: 0;
}

#main-wrapper.mini-sidebar .logo-text,
#main-wrapper.mini-sidebar .hide-menu,
#main-wrapper.mini-sidebar .nav-small-cap {
    display: none !important;
}

#main-wrapper.mini-sidebar .sidebar-link {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

#main-wrapper.mini-sidebar .sidebar-icon {
    margin: 0 auto;
}

@media (min-width: 768px) {
    #main-wrapper[data-layout="vertical"][data-sidebartype="mini-sidebar"] .left-sidebar:hover {
        width: 70px !important;
    }

    #main-wrapper[data-layout="vertical"][data-sidebartype="mini-sidebar"] .left-sidebar:hover .scroll-sidebar {
        height: calc(100vh - 70px) !important;
        max-height: calc(100vh - 70px);
    }

    #main-wrapper[data-layout="vertical"][data-sidebartype="mini-sidebar"] .left-sidebar:hover .sidebar-nav .hide-menu,
    #main-wrapper[data-layout="vertical"][data-sidebartype="mini-sidebar"] .left-sidebar:hover .sidebar-nav .has-arrow:after,
    #main-wrapper[data-layout="vertical"][data-sidebartype="mini-sidebar"] .left-sidebar:hover .sidebar-nav .nav-small-cap,
    #main-wrapper[data-layout="vertical"][data-sidebartype="mini-sidebar"] .left-sidebar:hover .sidebar-footer {
        display: none !important;
    }

    #main-wrapper[data-layout="vertical"][data-sidebartype="mini-sidebar"] .left-sidebar:hover .sidebar-nav ul .sidebar-item .sidebar-link {
        justify-content: center !important;
        padding: 11px 0 !important;
    }

    #main-wrapper[data-layout="vertical"][data-sidebartype="mini-sidebar"] .left-sidebar:hover .sidebar-nav ul .sidebar-item .sidebar-link .feather,
    #main-wrapper[data-layout="vertical"][data-sidebartype="mini-sidebar"] .left-sidebar:hover .sidebar-nav ul .sidebar-item .sidebar-link i,
    #main-wrapper[data-layout="vertical"][data-sidebartype="mini-sidebar"] .left-sidebar:hover .sidebar-nav ul .sidebar-item .sidebar-link .sidebar-icon {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

.sidebar-backdrop {
    display: none;
}

.profile-summary-card {
    position: sticky;
    top: 92px;
}

.profile-avatar {
    width: 72px;
    height: 72px;
    margin-bottom: 18px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ddebff;
    color: #1e4db7;
    font-size: 1.7rem;
    font-weight: 700;
}

.profile-meta {
    display: grid;
    gap: 14px;
}

.profile-meta > div {
    padding-top: 14px;
    border-top: 1px solid #edf1f7;
}

.profile-meta-label {
    display: block;
    margin-bottom: 3px;
    color: #6c757d;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.profile-section-header {
    padding-bottom: 16px;
    border-bottom: 1px solid #edf1f7;
}

.profile-danger-card {
    background: #fffafa;
}

@media (max-width: 767.98px) {
    .topbar {
        position: fixed;
        inset: 0 0 auto 0;
        height: 64px;
        overflow: visible;
        z-index: 1035;
    }

    .topbar .top-navbar {
        display: flex;
        position: relative;
        align-items: center;
        width: 100%;
        height: 64px;
        min-height: 64px;
        padding: 0;
        flex-wrap: nowrap;
        overflow: visible;
    }

    .topbar .navbar-header {
        display: grid !important;
        grid-template-columns: 42px minmax(0, 1fr) 42px;
        column-gap: 14px;
        align-items: center;
        width: 100% !important;
        min-width: 0;
        max-width: none;
        height: 64px;
        padding: 0 12px;
        flex: 1 1 100%;
        border-right: 0 !important;
        justify-content: initial;
    }

    .topbar .nav-toggler {
        grid-column: 1;
    }

    .topbar .navbar-brand {
        min-width: 0;
        width: auto !important;
        grid-column: 2;
        justify-self: start;
        justify-content: flex-start !important;
        padding: 0 !important;
        margin-right: 0;
        margin-left: 0 !important;
    }

    .topbar .logo-text {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .topbar .navbar-collapse {
        display: none !important;
    }

    .mobile-user-menu {
        grid-column: 3;
        align-self: center;
        justify-self: end;
        z-index: 2;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-user-toggle {
        width: 42px !important;
        min-width: 42px !important;
        height: 42px !important;
        padding: 0 !important;
        margin: 0 !important;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        line-height: 1 !important;
    }

    .mobile-user-menu .dropdown-menu {
        min-width: 180px;
        margin-top: 6px !important;
        padding: 6px 0;
        border: 0;
        border-radius: 10px;
        box-shadow: 0 12px 24px rgba(17, 20, 45, 0.16);
    }

    .mobile-user-menu .dropdown-item,
    .mobile-user-menu .dropdown-item-text {
        min-height: auto;
        padding: 9px 16px;
        color: #67757c;
        font-size: 0.92rem;
        line-height: 1.3;
    }

    .mobile-user-menu .dropdown-divider {
        margin: 4px 0;
    }

    .topbar-user-icon {
        flex: 0 0 auto;
    }

    #main-wrapper .left-sidebar {
        position: fixed;
        top: 64px;
        left: 0;
        width: 260px;
        height: calc(100vh - 64px);
        z-index: 1030;
        transform: translateX(-100%);
        box-shadow: 0 14px 28px rgba(17, 20, 45, 0.18);
        transition: transform 0.2s ease;
    }

    #main-wrapper.show-sidebar .left-sidebar {
        transform: translateX(0);
    }

    #main-wrapper.mini-sidebar .left-sidebar {
        width: 260px;
    }

    #main-wrapper .page-wrapper {
        margin-left: 0 !important;
        padding-top: 64px;
        width: 100%;
        min-width: 0;
    }

    #main-wrapper.mini-sidebar .page-wrapper {
        margin-left: 0 !important;
    }

    #main-wrapper.mini-sidebar .logo-text,
    #main-wrapper.mini-sidebar .hide-menu {
        display: inline !important;
    }

    #main-wrapper.mini-sidebar .nav-small-cap {
        display: block !important;
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 64px 0 0;
        z-index: 1025;
        display: block;
        pointer-events: none;
        background: rgba(17, 20, 45, 0);
        transition: background-color 0.2s ease;
    }

    #main-wrapper.show-sidebar .sidebar-backdrop {
        pointer-events: auto;
        background: rgba(17, 20, 45, 0.42);
    }

    .app-page-header {
        padding: 18px 16px 0;
    }

    .page-header-card {
        align-items: flex-start;
        flex-direction: column;
        padding-bottom: 14px;
    }

    .page-actions {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
    }

    .page-actions .btn {
        width: 100%;
    }

    .app-content {
        padding: 16px;
    }

    .card-body {
        padding: 18px;
    }

    .profile-summary-card {
        position: static;
    }

    .profile-avatar {
        width: 58px;
        height: 58px;
        border-radius: 14px;
        font-size: 1.35rem;
    }

    .profile-form-actions {
        align-items: stretch !important;
        flex-direction: column;
    }
}

@media (max-width: 575.98px) {
    .page-title {
        font-size: 1.1rem;
    }

    .page-subtitle {
        font-size: 0.82rem;
    }

    .app-content {
        padding: 14px 12px;
    }

    .card-body {
        padding: 16px 14px;
    }
}

.participant-layout {
    min-height: 100vh;
    background: #f4f7fb;
}

.participant-header {
    background: #1e4db7;
    color: #ffffff;
    padding: 14px 0;
    box-shadow: 0 2px 8px rgba(30, 77, 183, 0.18);
}

.participant-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.participant-header-start {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.participant-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    padding: 6px 10px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 8px;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.participant-back-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.55);
}

.participant-brand {
    color: #ffffff;
    font-size: 1.15rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.participant-brand:hover {
    color: #ffffff;
    opacity: 0.9;
}

.participant-user-menu {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.participant-user-toggle {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    color: #ffffff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 36px;
    padding: 0 10px;
    margin: 0;
    border: 1px solid transparent;
    border-radius: 8px;
    line-height: 1;
    font: inherit;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.participant-user-toggle:hover,
.participant-user-toggle:focus,
.participant-user-toggle:focus-visible {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.28);
    outline: none;
    box-shadow: none;
}

.participant-user-icon,
.participant-user-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 0;
}

.participant-user-icon {
    width: 20px;
    height: 20px;
}

.participant-user-chevron {
    width: 14px;
    height: 14px;
    opacity: 0.9;
}

.participant-user-icon svg,
.participant-user-chevron svg {
    width: 100%;
    height: 100%;
    display: block;
}

.participant-user-name {
    display: inline-block;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1.2;
    color: #ffffff;
}

.participant-user-menu .dropdown-menu {
    min-width: 180px;
    margin-top: 8px;
}

@media (max-width: 575.98px) {
    .participant-user-name {
        display: none;
    }
}

.participant-loader {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.45);
}

.participant-loader.is-visible {
    display: flex;
}

.participant-loader-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 22px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.2);
    font-weight: 600;
    color: #11142d;
}

.participant-main {
    padding: 32px 16px 48px;
}

.participant-wizard-card {
    border: 0;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.participant-wizard-eyebrow {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #1e4db7;
}

.participant-wizard-title {
    font-size: 1.75rem;
    margin-bottom: 12px;
}

.participant-access-panel {
    padding: 16px;
    border: 1px solid #edf1f7;
    border-radius: 14px;
    background: #f8fbff;
}

.info-panel {
    padding: 14px 16px;
    border: 1px solid #edf1f7;
    border-radius: 12px;
    background: #f8fafc;
    color: #4f5467;
}

.info-panel-success {
    border-color: #b7e4c7;
    background: #ebfaf2;
    color: #1f5f3f;
}

.info-panel-warning {
    border-color: #f5d9a8;
    background: #fff4e5;
    color: #7a4d00;
}

.swal2-popup {
    border-radius: 16px;
    font-family: inherit;
}

.swal2-title {
    font-size: 1.35rem;
    color: #11142d;
}

.swal2-html-container {
    color: #4f5467;
    font-size: 0.95rem;
}

.swal2-actions {
    gap: 10px;
}

.swal2-styled.swal2-confirm,
.swal2-styled.swal2-cancel {
    border-radius: 8px;
    font-weight: 600;
    padding: 0.5rem 1.15rem;
}

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

.admin-data-table {
    width: 100%;
    min-width: 960px;
    margin-bottom: 0;
}

.admin-data-table th,
.admin-data-table td {
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    vertical-align: middle;
}

.admin-data-table th {
    white-space: nowrap;
}

.admin-data-table .text-nowrap {
    white-space: nowrap;
}

.group-members-search,
.admin-table-search {
    flex: 0 1 320px;
    min-width: 220px;
    max-width: 100%;
}

.group-members-search .input-group,
.admin-table-search .input-group {
    flex-wrap: nowrap;
}

.group-members-search .form-control,
.admin-table-search .form-control {
    min-width: 0;
}
