:root {
    --emex-primary: #38588c;
    --emex-primary-dark: #29446f;
    --emex-primary-soft: #eef3fa;

    --emex-accent: #f4c542;
    --emex-accent-soft: #fff8df;

    --emex-bg: #f5f7fa;
    --emex-surface: #ffffff;

    --emex-text: #1f2937;
    --emex-text-muted: #6b7280;

    --emex-border: #e5e7eb;
    --emex-border-soft: #eef0f3;

    --emex-success: #198754;
    --emex-danger: #dc3545;
    --emex-warning: #d89b00;

    --emex-sidebar-width: 245px;
    --emex-radius: 10px;
    --emex-radius-sm: 7px;

    --emex-shadow:
        0 2px 8px rgba(15, 23, 42, 0.05);
}

/* ---------------------------------------------------------
   Base
--------------------------------------------------------- */

html {
    font-size: 14px;
}

body {
    margin: 0;
    background: var(--emex-bg);
    color: var(--emex-text);
    font-family:
        Inter,
        "Segoe UI",
        Arial,
        sans-serif;
}

a {
    text-decoration: none;
}

/* ---------------------------------------------------------
   Application Shell
--------------------------------------------------------- */

.emex-app {
    min-height: 100vh;
    display: flex;
}

.emex-sidebar {
    width: var(--emex-sidebar-width);
    min-height: 100vh;

    background:
        linear-gradient(
            180deg,
            #314f80 0%,
            #243b61 100%
        );

    color: #fff;

    position: fixed;
    inset: 0 auto 0 0;

    display: flex;
    flex-direction: column;

    z-index: 1040;

    box-shadow:
        4px 0 18px rgba(15, 23, 42, 0.08);
}

.emex-main {
    width: calc(100% - var(--emex-sidebar-width));
    margin-left: var(--emex-sidebar-width);
    min-height: 100vh;
}

/* ---------------------------------------------------------
   Logo
--------------------------------------------------------- */

.emex-brand {
    min-height: 78px;

    display: flex;
    align-items: center;

    padding: 14px 18px;

    border-bottom:
        1px solid rgba(255, 255, 255, 0.12);
}

.emex-brand img {
    max-width: 190px;
    height: auto;
    display: block;
}

/* ---------------------------------------------------------
   Sidebar Navigation
--------------------------------------------------------- */

.emex-nav {
    padding: 14px 10px 24px;
    overflow-y: auto;
}

.emex-nav-section {
    margin-top: 18px;
    margin-bottom: 7px;
    padding: 0 10px;

    font-size: 10px;
    font-weight: 700;

    color: rgba(255, 255, 255, 0.5);

    letter-spacing: 0.085em;
    text-transform: uppercase;
}

.emex-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;

    min-height: 38px;

    padding: 8px 11px;
    margin-bottom: 3px;

    border-radius: 7px;

    color: rgba(255, 255, 255, 0.88);

    font-size: 12.8px;
    font-weight: 500;

    transition:
        background-color 0.16s ease,
        color 0.16s ease,
        transform 0.16s ease;
}

.emex-nav-link i {
    width: 18px;
    font-size: 15px;
    text-align: center;
}

.emex-nav-link:hover {
    color: #fff;

    background:
        rgba(255, 255, 255, 0.09);
}

.emex-nav-link.active {
    color: #fff;

    background:
        rgba(255, 255, 255, 0.14);

    box-shadow:
        inset 3px 0 0 var(--emex-accent);
}

.emex-nav-divider {
    margin: 14px 10px;

    border-color:
        rgba(255, 255, 255, 0.1);
}

/* ---------------------------------------------------------
   Topbar
--------------------------------------------------------- */

.emex-topbar {
    height: 62px;

    background: rgba(255, 255, 255, 0.96);

    border-bottom:
        1px solid var(--emex-border);

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 24px;

    position: sticky;
    top: 0;

    z-index: 1020;
}

.emex-topbar-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--emex-text);
}

.emex-user-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.emex-user-name {
    font-size: 12.5px;
    font-weight: 600;
}

.emex-user-role {
    font-size: 10.5px;
    color: var(--emex-text-muted);
}

.emex-avatar {
    width: 34px;
    height: 34px;

    display: grid;
    place-items: center;

    border-radius: 50%;

    background: var(--emex-primary-soft);
    color: var(--emex-primary);

    font-size: 12px;
    font-weight: 700;
}

/* ---------------------------------------------------------
   Main Content
--------------------------------------------------------- */

.emex-content {
    padding: 22px 24px 40px;
}

.emex-page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;

    margin-bottom: 18px;
}

.emex-page-title {
    margin: 0;

    font-size: 20px;
    font-weight: 750;
    letter-spacing: -0.02em;
}

.emex-page-subtitle {
    margin-top: 4px;
    margin-bottom: 0;

    color: var(--emex-text-muted);
    font-size: 12.5px;
}

/* ---------------------------------------------------------
   Cards
--------------------------------------------------------- */

.emex-card {
    background: var(--emex-surface);

    border:
        1px solid var(--emex-border-soft);

    border-radius: var(--emex-radius);

    box-shadow: var(--emex-shadow);
}

.emex-card-header {
    padding: 13px 16px;

    border-bottom:
        1px solid var(--emex-border-soft);
}

.emex-card-title {
    margin: 0;

    font-size: 13px;
    font-weight: 700;
}

.emex-card-body {
    padding: 17px;
}

/* ---------------------------------------------------------
   Forms
--------------------------------------------------------- */

.emex-form-label {
    margin-bottom: 5px;

    font-size: 11.5px;
    font-weight: 650;

    color: #374151;
}

.emex-form-control,
.emex-form-select {
    min-height: 38px;

    padding:
        7px 10px;

    border:
        1px solid #d7dce2;

    border-radius:
        var(--emex-radius-sm);

    font-size: 12.5px;

    background: #fff;
}

.emex-form-control:focus,
.emex-form-select:focus {
    border-color: #7e9bc7;

    box-shadow:
        0 0 0 3px rgba(56, 88, 140, 0.12);

    outline: none;
}

textarea.emex-form-control {
    min-height: 88px;
}

.emex-form-help {
    display: block;

    margin-top: 4px;

    color: var(--emex-text-muted);

    font-size: 10.5px;
}

/* ---------------------------------------------------------
   Buttons
--------------------------------------------------------- */

.emex-btn-primary {
    border: 0;

    border-radius: 7px;

    padding: 8px 14px;

    background: var(--emex-primary);
    color: #fff;

    font-size: 12px;
    font-weight: 650;
}

.emex-btn-primary:hover {
    background: var(--emex-primary-dark);
    color: #fff;
}

.emex-btn-light {
    border:
        1px solid var(--emex-border);

    border-radius: 7px;

    padding: 7px 12px;

    background: #fff;
    color: var(--emex-text);

    font-size: 12px;
}

/* ---------------------------------------------------------
   Status
--------------------------------------------------------- */

.emex-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;

    padding: 5px 8px;

    border-radius: 999px;

    font-size: 10.5px;
    font-weight: 700;
}

.emex-status.active {
    background: #e9f7ef;
    color: #157347;
}

/* ---------------------------------------------------------
   Mobile Navigation
--------------------------------------------------------- */

.emex-menu-toggle {
    display: none;

    border: 0;
    background: transparent;

    font-size: 20px;
}

/* ---------------------------------------------------------
   Mobile
--------------------------------------------------------- */

@media (max-width: 991.98px) {

    .emex-sidebar {
        transform: translateX(-100%);
        transition: transform 0.2s ease;
    }

    .emex-sidebar.show {
        transform: translateX(0);
    }

    .emex-main {
        width: 100%;
        margin-left: 0;
    }

    .emex-menu-toggle {
        display: inline-flex;
    }

    .emex-content {
        padding: 16px;
    }

    .emex-topbar {
        padding: 0 15px;
    }

    .emex-user-role {
        display: none;
    }
}

@media (max-width: 575.98px) {

    html {
        font-size: 13px;
    }

    .emex-page-head {
        flex-direction: column;
    }

    .emex-content {
        padding: 14px 12px 28px;
    }

    .emex-card-body {
        padding: 14px;
    }

    .emex-page-title {
        font-size: 18px;
    }

    .emex-user-name {
        display: none;
    }
}

/* ---------------------------------------------------------
   System Tables
--------------------------------------------------------- */

.emex-table {
    font-size: 12px;
}

.emex-table thead th {
    padding: 10px 14px;

    background: #f8fafc;

    border-bottom: 1px solid var(--emex-border);

    color: #64748b;

    font-size: 10.5px;
    font-weight: 700;

    letter-spacing: 0.025em;
    text-transform: uppercase;

    white-space: nowrap;
}

.emex-table tbody td {
    padding: 10px 14px;

    border-color: var(--emex-border-soft);

    vertical-align: middle;
}

.emex-table tbody tr:hover {
    background: #fafcff;
}


/* ---------------------------------------------------------
   Icon Actions
--------------------------------------------------------- */

.emex-icon-btn {
    width: 31px;
    height: 31px;

    display: inline-grid;
    place-items: center;

    border: 1px solid var(--emex-border);
    border-radius: 6px;

    background: #fff;
    color: #475569;

    font-size: 12px;

    transition: 0.15s ease;
}

button.emex-icon-btn {
    padding: 0;
}

.emex-icon-btn:hover {
    background: var(--emex-primary-soft);
    border-color: #c7d4e7;
    color: var(--emex-primary);
}


/* ---------------------------------------------------------
   Status Variants
--------------------------------------------------------- */

.emex-status.inactive {
    background: #f1f3f5;
    color: #6b7280;
}


/* ---------------------------------------------------------
   Mobile Records
--------------------------------------------------------- */

.emex-mobile-record {
    padding: 14px;

    border-bottom:
        1px solid var(--emex-border-soft);
}

.emex-mobile-record:last-child {
    border-bottom: 0;
}

.emex-record-code {
    color: var(--emex-primary);

    font-size: 10.5px;
    font-weight: 750;

    letter-spacing: 0.04em;
}

.emex-soft-badge {
    display: inline-flex;
    align-items: center;

    padding: 3px 6px;

    border-radius: 5px;

    background: var(--emex-primary-soft);
    color: var(--emex-primary);

    font-size: 10px;
    font-weight: 750;

    letter-spacing: 0.03em;
}

.emex-info-panel {
    display: flex;
    align-items: flex-start;
    gap: 9px;

    padding: 10px 12px;

    border: 1px solid #dbe5f2;
    border-radius: 7px;

    background: #f5f8fc;
    color: #4b6487;

    font-size: 11.5px;
}

.emex-status.open {
    background: #eaf3ff;
    color: #315f9b;
}

.emex-status.soft_closed {
    background: #fff5dc;
    color: #946c00;
}

.emex-status.closed {
    background: #eef0f3;
    color: #596273;
}

.emex-status.archived {
    background: #f0f1f3;
    color: #777f89;
}

.emex-option-card {
    height: 100%;

    padding: 11px 12px;

    border:
        1px solid var(--emex-border);

    border-radius: 7px;

    background: #fafbfc;
}

.emex-option-card .form-check-input {
    margin-top: 0.15rem;
}

.emex-account-code {
    font-family:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        monospace;

    color: var(--emex-primary);

    font-size: 11.5px;
    font-weight: 750;

    letter-spacing: 0.025em;
}

.emex-account-indent-1 {
    padding-left: 22px !important;
}

.emex-account-indent-2 {
    padding-left: 38px !important;
}

.emex-account-indent-3 {
    padding-left: 54px !important;
}

.emex-account-header {
    background: #fafbfc;
}

.emex-account-header td {
    font-weight: 650;
}

.emex-account-type {
    display: inline-flex;

    padding: 4px 7px;

    border-radius: 5px;

    font-size: 10px;
    font-weight: 700;
}

.emex-account-type.asset {
    background: #eaf3ff;
    color: #315f9b;
}

.emex-account-type.liability {
    background: #fff1ef;
    color: #a34d43;
}

.emex-account-type.equity {
    background: #f3edff;
    color: #7050a0;
}

.emex-account-type.revenue {
    background: #eaf7ef;
    color: #28754b;
}

.emex-account-type.expense {
    background: #fff5dc;
    color: #8a680f;
}

.emex-bank-icon {
    width: 34px;
    height: 34px;

    display: grid;
    place-items: center;

    flex: 0 0 auto;

    border-radius: 8px;

    background: var(--emex-primary-soft);
    color: var(--emex-primary);

    font-size: 14px;
}

.emex-currency-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 42px;

    padding: 4px 7px;

    border-radius: 6px;

    background: #f2f4f7;
    color: #475569;

    font-size: 10.5px;
    font-weight: 750;

    letter-spacing: 0.04em;
}

.emex-posting-preview {
    font-size: 11.5px;
}

.emex-posting-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;

    padding: 11px 0;

    border-bottom:
        1px solid var(--emex-border-soft);
}

.emex-posting-line:last-child {
    border-bottom: 0;
}

.emex-posting-side {
    display: inline-grid;
    place-items: center;

    width: 26px;
    height: 24px;

    border-radius: 5px;

    font-size: 9px;
    font-weight: 800;
}

.emex-posting-side.debit {
    background: #eaf3ff;
    color: #315f9b;
}

.emex-posting-side.credit {
    background: #eaf7ef;
    color: #28754b;
}

.emex-status.draft {
    background: #fff5dc;
    color: #8a680f;
}

.emex-status.posted {
    background: #e9f7ef;
    color: #157347;
}

.emex-status.reversed {
    background: #fbeaec;
    color: #a23b48;
}

.emex-status.pending {
    background: #eef2ff;
    color: #4b5fc7;
}

.emex-status.approved {
    background: #e8f7ee;
    color: #187744;
}

/* ============================================================
   EMEX USERS & ROLES
   ============================================================ */

.emex-user-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.emex-user-stat {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
    padding: 13px 14px;
    background: #fff;
    border: 1px solid #e8edf3;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .035);
}

.emex-user-stat-icon {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #eef4ff;
    color: #2456a6;
    font-size: 16px;
}

.emex-user-stat-icon.success {
    background: #ecf9f1;
    color: #198754;
}

.emex-user-stat-icon.muted {
    background: #f2f4f7;
    color: #667085;
}

.emex-user-stat-icon.admin {
    background: #f4efff;
    color: #6941c6;
}

.emex-user-stat-value {
    font-size: 17px;
    line-height: 1.1;
    font-weight: 700;
    color: #172033;
}

.emex-user-stat-label {
    margin-top: 3px;
    font-size: 10.5px;
    color: #7b8494;
}


/* Filters */

.emex-user-filters {
    display: grid;
    grid-template-columns:
        minmax(220px, 1fr)
        190px
        150px
        auto
        auto;
    gap: 8px;
    align-items: center;
}

.emex-user-search {
    position: relative;
}

.emex-user-search > i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #98a2b3;
    font-size: 13px;
    pointer-events: none;
}

.emex-user-search input {
    width: 100%;
    height: 36px;
    padding: 6px 12px 6px 34px;
    border: 1px solid #dfe5ec;
    border-radius: 8px;
    outline: none;
    background: #fff;
    color: #273142;
    font-size: 12px;
    transition:
        border-color .15s ease,
        box-shadow .15s ease;
}

.emex-user-search input:focus {
    border-color: #94aee0;
    box-shadow: 0 0 0 3px rgba(45, 94, 170, .08);
}

.emex-filter-select {
    height: 36px;
    min-height: 36px;
    font-size: 11.5px;
    border-color: #dfe5ec;
    border-radius: 8px;
}


/* Table */

.emex-users-table {
    vertical-align: middle;
}

.emex-users-table thead th {
    padding: 9px 14px;
    border-bottom: 1px solid #e9edf2;
    background: #fafbfc;
    color: #697386;
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .045em;
    white-space: nowrap;
}

.emex-users-table tbody td {
    padding: 10px 14px;
    border-color: #edf0f4;
    color: #344054;
    font-size: 11.5px;
}

.emex-users-table tbody tr {
    transition: background-color .12s ease;
}

.emex-users-table tbody tr:hover {
    background: #fbfcfe;
}


/* User */

.emex-user-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 210px;
}

.emex-user-avatar {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: linear-gradient(
        145deg,
        #edf3fb,
        #e4ebf5
    );
    color: #274d7e;
    border: 1px solid #dce5f0;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .02em;
}

.emex-user-identity {
    min-width: 0;
}

.emex-user-name {
    display: block;
    color: #182230;
    font-size: 11.5px;
    line-height: 1.3;
    font-weight: 700;
    text-decoration: none;
}

a.emex-user-name:hover {
    color: #2456a6;
}

.emex-user-email {
    margin-top: 2px;
    max-width: 260px;
    overflow: hidden;
    color: #8a94a5;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* Role */

.emex-role-badge {
    display: inline-flex;
    align-items: center;
    max-width: 190px;
    padding: 4px 8px;
    border: 1px solid #dce5f0;
    border-radius: 999px;
    background: #f6f8fb;
    color: #46566d;
    font-size: 9.5px;
    line-height: 1;
    font-weight: 650;
    white-space: nowrap;
}

.emex-role-badge.empty {
    border-color: #eaecf0;
    background: #fafafa;
    color: #98a2b3;
}


/* Status */

.emex-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 9.5px;
    line-height: 1;
    font-weight: 700;
}

.emex-status-pill > span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.emex-status-pill.active {
    background: #ecf9f1;
    color: #18794e;
}

.emex-status-pill.active > span {
    background: #22a06b;
}

.emex-status-pill.inactive {
    background: #f2f4f7;
    color: #667085;
}

.emex-status-pill.inactive > span {
    background: #98a2b3;
}


/* Last login */

.emex-login-time {
    color: #475467;
    font-size: 10.5px;
    font-weight: 600;
}

.emex-login-date {
    margin-top: 2px;
    color: #98a2b3;
    font-size: 9px;
}

.emex-never-login {
    color: #98a2b3;
    font-size: 10px;
}


/* Table actions */

.emex-table-action {
    width: 29px;
    height: 29px;
    display: inline-grid;
    place-items: center;
    border: 1px solid #e2e7ed;
    border-radius: 7px;
    background: #fff;
    color: #667085;
    font-size: 11px;
    text-decoration: none;
    transition: all .12s ease;
}

.emex-table-action:hover {
    border-color: #cbd8e8;
    background: #f7f9fc;
    color: #2456a6;
}


/* Empty state */

.emex-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: #98a2b3;
    text-align: center;
}

.emex-empty-state > i {
    margin-bottom: 5px;
    font-size: 25px;
    color: #c3cad4;
}

.emex-empty-state strong {
    color: #475467;
    font-size: 12px;
}

.emex-empty-state span {
    font-size: 10.5px;
}


/* Mobile */

.emex-users-mobile {
    display: none;
}

.emex-mobile-user-card {
    display: block;
    padding: 12px;
    border-bottom: 1px solid #edf0f4;
    color: inherit;
    text-decoration: none;
}

.emex-mobile-user-card:last-child {
    border-bottom: 0;
}

.emex-mobile-user-top {
    display: flex;
    align-items: center;
    gap: 10px;
}

.emex-mobile-user-main {
    flex: 1;
    min-width: 0;
}

.emex-mobile-chevron {
    color: #b0b8c4;
    font-size: 11px;
}

.emex-mobile-user-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 9px 0 0 44px;
}

.emex-mobile-last-login {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 8px 0 0 44px;
    color: #98a2b3;
    font-size: 9.5px;
}


/* Pagination */

.emex-pagination-wrap {
    padding: 12px 14px;
    border-top: 1px solid #edf0f4;
}


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 991.98px) {

    .emex-user-stats {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .emex-user-filters {
        grid-template-columns:
            minmax(0, 1fr)
            170px
            140px
            auto;
    }

    .emex-user-filters .emex-btn-ghost {
        grid-column: 1 / -1;
        justify-self: start;
    }
}


@media (max-width: 767.98px) {

    .emex-user-stats {
        gap: 7px;
    }

    .emex-user-stat {
        padding: 10px;
        border-radius: 10px;
    }

    .emex-user-stat-icon {
        width: 31px;
        height: 31px;
        flex-basis: 31px;
        font-size: 13px;
    }

    .emex-user-stat-value {
        font-size: 14px;
    }

    .emex-user-stat-label {
        font-size: 9px;
    }


    .emex-user-filters {
        grid-template-columns: 1fr;
    }

    .emex-filter-select,
    .emex-user-search input {
        width: 100%;
    }


    .emex-users-desktop {
        display: none;
    }

    .emex-users-mobile {
        display: block;
    }

}


@media (max-width: 420px) {

    .emex-user-stats {
        grid-template-columns: 1fr 1fr;
    }

    .emex-user-stat {
        gap: 7px;
        padding: 9px;
    }

    .emex-user-stat-icon {
        display: none;
    }

}

/* ============================================================
   USER ADMINISTRATION FORMS
   ============================================================ */

.emex-section-icon {
    width: 31px;
    height: 31px;
    display: grid;
    place-items: center;
    flex: 0 0 31px;
    border: 1px solid #e3e9f1;
    border-radius: 8px;
    background: #f7f9fc;
    color: #536b8c;
    font-size: 13px;
}

.emex-field-help {
    margin-top: 5px;
    color: #98a2b3;
    font-size: 9.5px;
}


/* Role explainer */

.emex-role-explainer {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 10px 11px;
    border: 1px solid #e2e9f2;
    border-radius: 9px;
    background: #f8fafd;
}

.emex-role-explainer-icon {
    margin-top: 1px;
    color: #5273a7;
    font-size: 12px;
}

.emex-role-explainer strong {
    display: block;
    margin-bottom: 2px;
    color: #344054;
    font-size: 10.5px;
}

.emex-role-explainer span {
    display: block;
    color: #7b8494;
    font-size: 9.5px;
    line-height: 1.45;
}


/* Password */

.emex-password-field {
    position: relative;
}

.emex-password-field .form-control {
    padding-right: 40px;
}

.emex-password-toggle {
    position: absolute;
    top: 50%;
    right: 5px;
    width: 30px;
    height: 28px;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #8490a3;
    font-size: 12px;
}

.emex-password-toggle:hover {
    background: #f0f3f7;
    color: #425b7e;
}


/* Settings */

.emex-setting-option {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    cursor: pointer;
}

.emex-setting-copy {
    flex: 1;
}

.emex-setting-copy strong {
    display: block;
    color: #344054;
    font-size: 10.5px;
    font-weight: 700;
}

.emex-setting-copy span {
    display: block;
    margin-top: 3px;
    color: #8a94a5;
    font-size: 9.5px;
    line-height: 1.45;
}

.emex-setting-divider {
    height: 1px;
    margin: 14px 0;
    background: #edf0f4;
}


/* Security note */

.emex-security-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 16px;
    padding: 10px;
    border: 1px solid #dce9df;
    border-radius: 9px;
    background: #f5faf6;
    color: #407153;
}

.emex-security-note > i {
    margin-top: 1px;
    font-size: 12px;
}

.emex-security-note strong {
    display: block;
    font-size: 10px;
}

.emex-security-note span {
    display: block;
    margin-top: 2px;
    color: #6d8375;
    font-size: 9px;
    line-height: 1.4;
}


/* Role guide */

.emex-role-guide-row {
    padding: 9px 13px;
    border-bottom: 1px solid #edf0f4;
}

.emex-role-guide-row:last-child {
    border-bottom: 0;
}

.emex-role-guide-row strong {
    display: block;
    color: #344054;
    font-size: 9.5px;
}

.emex-role-guide-row span {
    display: block;
    margin-top: 2px;
    color: #8b95a5;
    font-size: 8.8px;
    line-height: 1.35;
}


/* Sticky control card */

.emex-sticky-card {
    position: sticky;
    top: 78px;
}


/* Form action bar */

.emex-form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
    padding: 12px 0;
}


/* Switch */

.emex-setting-option .form-check-input {
    width: 34px;
    height: 18px;
    margin-top: 1px;
    cursor: pointer;
}


/* Mobile */

@media (max-width: 1199.98px) {

    .emex-sticky-card {
        position: static;
    }

}


@media (max-width: 767.98px) {

    .emex-form-actions {
        position: sticky;
        bottom: 0;
        z-index: 20;
        margin-right: -12px;
        margin-left: -12px;
        padding: 10px 12px;
        border-top: 1px solid #e7ebf0;
        background: rgba(255, 255, 255, .96);
        backdrop-filter: blur(8px);
    }

    .emex-form-actions > * {
        flex: 1;
        justify-content: center;
    }

}
/* ============================================================
   USER DETAIL / CONTROL CENTRE
   ============================================================ */

.emex-user-profile-hero {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px;
}

.emex-user-profile-avatar {
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    display: grid;
    place-items: center;
    border: 1px solid #dce5f0;
    border-radius: 15px;
    background: linear-gradient(
        145deg,
        #edf3fb,
        #e3eaf4
    );
    color: #284e7f;
    font-size: 16px;
    font-weight: 800;
}

.emex-user-profile-main {
    min-width: 0;
}

.emex-user-profile-name {
    margin: 0;
    color: #182230;
    font-size: 18px;
    font-weight: 750;
}

.emex-user-profile-email {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
    color: #7d8797;
    font-size: 10.5px;
}

.emex-user-profile-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    margin-top: 9px;
}

.emex-profile-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #8a94a5;
    font-size: 9.5px;
}

.emex-current-user-badge {
    padding: 3px 7px;
    border-radius: 999px;
    background: #eef4ff;
    color: #315f9e;
    font-size: 8.5px;
    font-weight: 700;
}


/* Details */

.emex-detail-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    border: 1px solid #edf0f4;
    border-radius: 10px;
    overflow: hidden;
}

.emex-detail-item {
    min-width: 0;
    padding: 11px 13px;
    border-right: 1px solid #edf0f4;
    border-bottom: 1px solid #edf0f4;
}

.emex-detail-item:nth-child(2n) {
    border-right: 0;
}

.emex-detail-item:nth-last-child(-n+2) {
    border-bottom: 0;
}

.emex-detail-label {
    display: block;
    margin-bottom: 3px;
    color: #98a2b3;
    font-size: 8.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.emex-detail-value {
    display: block;
    overflow-wrap: anywhere;
    color: #344054;
    font-size: 10.5px;
    font-weight: 650;
}

.emex-detail-helper {
    display: block;
    margin-top: 2px;
    color: #98a2b3;
    font-size: 8.5px;
}


/* Permissions */

.emex-count-badge {
    display: inline-flex;
    min-width: 25px;
    height: 23px;
    align-items: center;
    justify-content: center;
    padding: 0 7px;
    border-radius: 999px;
    background: #f1f4f8;
    color: #536174;
    font-size: 9px;
    font-weight: 700;
}

.emex-permission-group + .emex-permission-group {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #edf0f4;
}

.emex-permission-group-title {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    color: #475467;
    font-size: 10px;
    font-weight: 750;
}

.emex-permission-group-title small {
    display: inline-flex;
    min-width: 18px;
    height: 18px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #f2f4f7;
    color: #8a94a5;
    font-size: 8px;
}

.emex-permission-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.emex-permission-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 7px;
    border: 1px solid #e3e8ef;
    border-radius: 7px;
    background: #fafbfc;
    color: #596579;
    font-size: 8.8px;
}

.emex-permission-chip i {
    color: #4f8b69;
}


/* Security */

.emex-security-status {
    display: flex;
    align-items: flex-start;
    gap: 9px;
}

.emex-security-status-icon {
    width: 31px;
    height: 31px;
    flex: 0 0 31px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #f2f5fa;
    color: #58708f;
    font-size: 12px;
}

.emex-security-status strong,
.emex-account-state strong {
    display: block;
    color: #344054;
    font-size: 10px;
}

.emex-security-status span,
.emex-account-state span {
    display: block;
    margin-top: 2px;
    color: #8a94a5;
    font-size: 9px;
    line-height: 1.4;
}

.emex-control-panel {
    padding: 11px;
    border: 1px solid #e4e9ef;
    border-radius: 9px;
    background: #fafbfc;
}


/* Account state */

.emex-account-state {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 10px;
    border-radius: 9px;
}

.emex-account-state > i {
    margin-top: 1px;
    font-size: 13px;
}

.emex-account-state.active {
    border: 1px solid #dcecdf;
    background: #f5faf6;
}

.emex-account-state.active > i {
    color: #37865a;
}

.emex-account-state.inactive {
    border: 1px solid #e6e8ec;
    background: #f7f7f8;
}

.emex-account-state.inactive > i {
    color: #7b8494;
}


/* Soft danger */

.emex-btn-danger-soft {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 34px;
    padding: 7px 11px;
    border: 1px solid #f0caca;
    border-radius: 8px;
    background: #fff7f7;
    color: #b54747;
    font-size: 10px;
    font-weight: 650;
    text-decoration: none;
}

.emex-btn-danger-soft:hover {
    border-color: #e9b8b8;
    background: #fff1f1;
    color: #9d3636;
}


/* Protection */

.emex-protection-notice,
.emex-admin-protection {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px;
    border: 1px solid #dfe7f2;
    border-radius: 9px;
    background: #f7f9fc;
    color: #5b6f8a;
    font-size: 9px;
    line-height: 1.45;
}

.emex-admin-protection > i {
    margin-top: 1px;
    color: #526fa0;
    font-size: 13px;
}

.emex-admin-protection strong {
    display: block;
    margin-bottom: 2px;
    color: #415675;
    font-size: 9.5px;
}

.emex-admin-protection span {
    display: block;
    color: #78869a;
    font-size: 9px;
}


/* Responsive */

@media (max-width: 767.98px) {

    .emex-user-profile-hero {
        align-items: flex-start;
        padding: 14px;
    }

    .emex-user-profile-avatar {
        width: 45px;
        height: 45px;
        flex-basis: 45px;
        border-radius: 12px;
        font-size: 13px;
    }

    .emex-user-profile-name {
        font-size: 15px;
    }

    .emex-detail-grid {
        grid-template-columns: 1fr;
    }

    .emex-detail-item {
        border-right: 0;
        border-bottom: 1px solid #edf0f4;
    }

    .emex-detail-item:nth-last-child(-n+2) {
        border-bottom: 1px solid #edf0f4;
    }

    .emex-detail-item:last-child {
        border-bottom: 0;
    }

}

/* ============================================================
   EDIT USER
   ============================================================ */

.emex-edit-user-summary {
    display: flex;
    align-items: center;
    gap: 10px;
}

.emex-edit-user-summary strong {
    display: block;
    color: #344054;
    font-size: 11px;
}

.emex-edit-user-summary span {
    display: block;
    margin-top: 2px;
    color: #8a94a5;
    font-size: 9.5px;
    overflow-wrap: anywhere;
}

.emex-edit-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 0;
}

.emex-edit-summary-row > span:first-child {
    color: #8a94a5;
    font-size: 9.5px;
}

.emex-edit-summary-row > strong {
    color: #475467;
    font-size: 9.5px;
    font-weight: 650;
    text-align: right;
}

.grid-column-full {
    grid-column: 1 / -1;
}

/* ============================================================
   EMEX AUTHENTICATION
   ============================================================ */

.emex-auth-body {
    margin: 0;
    min-height: 100vh;
    background: #f4f6f9;
    color: #1d2939;
    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

.emex-auth-shell {
    display: grid;
    grid-template-columns:
        minmax(370px, 44%)
        minmax(420px, 56%);
    min-height: 100vh;
}


/* ============================================================
   BRAND PANEL
   ============================================================ */

.emex-auth-brand-panel {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    background:
        radial-gradient(
            circle at 20% 20%,
            rgba(255, 255, 255, .09),
            transparent 30%
        ),
        linear-gradient(
            145deg,
            #15375f 0%,
            #183f70 45%,
            #245286 100%
        );
}

.emex-auth-brand-panel::before {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    right: -230px;
    top: -150px;
    border: 1px solid
        rgba(255, 255, 255, .08);
    border-radius: 50%;
}

.emex-auth-brand-panel::after {
    content: "";
    position: absolute;
    width: 520px;
    height: 520px;
    left: -340px;
    bottom: -280px;
    border: 1px solid
        rgba(255, 255, 255, .06);
    border-radius: 50%;
}

.emex-auth-brand-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 560px;
    padding: 55px 58px;
}


/* Logo */

.emex-auth-logo {
    display: flex;
    align-items: center;
    min-height: 60px;
    margin-bottom: 55px;
}

.emex-auth-logo img {
    display: block;
    max-width: 190px;
    max-height: 80px;
    object-fit: contain;
    object-position: left center;
}


/* Brand copy */

.emex-auth-eyebrow {
    margin-bottom: 13px;
    color: rgba(255, 255, 255, .65);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.emex-auth-brand-copy h1 {
    max-width: 440px;
    margin: 0;
    color: #fff;
    font-size: clamp(33px, 4vw, 52px);
    line-height: 1.03;
    font-weight: 720;
    letter-spacing: -.035em;
}

.emex-auth-brand-copy h1 span {
    color: #a9c7ed;
}

.emex-auth-brand-copy p {
    max-width: 430px;
    margin: 18px 0 0;
    color: rgba(255, 255, 255, .68);
    font-size: 12px;
    line-height: 1.75;
}


/* Features */

.emex-auth-feature-list {
    display: grid;
    gap: 12px;
    max-width: 430px;
    margin-top: 43px;
}

.emex-auth-feature {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 11px 0;
}

.emex-auth-feature-icon {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    display: grid;
    place-items: center;
    border: 1px solid
        rgba(255, 255, 255, .13);
    border-radius: 9px;
    background:
        rgba(255, 255, 255, .07);
    color: rgba(255, 255, 255, .87);
    font-size: 12px;
}

.emex-auth-feature strong {
    display: block;
    color: rgba(255, 255, 255, .94);
    font-size: 10px;
    font-weight: 700;
}

.emex-auth-feature span {
    display: block;
    margin-top: 2px;
    color: rgba(255, 255, 255, .55);
    font-size: 9.5px;
    line-height: 1.45;
}

.emex-auth-brand-footer {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 45px;
    color: rgba(255, 255, 255, .45);
    font-size: 8.5px;
    letter-spacing: .04em;
    text-transform: uppercase;
}


/* ============================================================
   LOGIN PANEL
   ============================================================ */

.emex-auth-login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 45px;
    background:
        radial-gradient(
            circle at 100% 0%,
            rgba(39, 83, 135, .04),
            transparent 30%
        ),
        #f7f8fa;
}

.emex-auth-login-wrap {
    width: 100%;
    max-width: 390px;
}

.emex-auth-mobile-logo {
    display: none;
}

.emex-auth-login-heading {
    margin-bottom: 28px;
}

.emex-auth-small-label {
    margin-bottom: 7px;
    color: #315d90;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.emex-auth-login-heading h2 {
    margin: 0;
    color: #192231;
    font-size: 25px;
    font-weight: 730;
    letter-spacing: -.025em;
}

.emex-auth-login-heading p {
    margin: 7px 0 0;
    color: #7d8796;
    font-size: 10.5px;
}


/* ============================================================
   ALERTS
   ============================================================ */

.emex-auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 17px;
    padding: 10px 11px;
    border-radius: 9px;
    font-size: 9.5px;
    line-height: 1.45;
}

.emex-auth-alert > i {
    margin-top: 1px;
}

.emex-auth-alert.success {
    border: 1px solid #d4eadb;
    background: #f3faf5;
    color: #397352;
}

.emex-auth-alert.danger {
    border: 1px solid #f0d2d2;
    background: #fff6f6;
    color: #a34141;
}


/* ============================================================
   FORM
   ============================================================ */

.emex-auth-form {
    width: 100%;
}

.emex-auth-field + .emex-auth-field {
    margin-top: 16px;
}

.emex-auth-label {
    display: block;
    margin-bottom: 6px;
    color: #485467;
    font-size: 9.5px;
    font-weight: 700;
}

.emex-auth-input-wrap {
    position: relative;
}

.emex-auth-input-wrap > i:first-child {
    position: absolute;
    z-index: 2;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #98a2b3;
    font-size: 12px;
    pointer-events: none;
}

.emex-auth-input-wrap input {
    width: 100%;
    height: 43px;
    padding: 8px 42px 8px 36px;
    border: 1px solid #dce2e9;
    border-radius: 9px;
    outline: none;
    background: #fff;
    color: #293646;
    font-size: 11px;
    transition:
        border-color .15s ease,
        box-shadow .15s ease,
        background-color .15s ease;
}

.emex-auth-input-wrap input::placeholder {
    color: #abb3bf;
}

.emex-auth-input-wrap input:focus {
    border-color: #8ba8cc;
    box-shadow:
        0 0 0 3px
        rgba(50, 94, 148, .08);
}

.emex-auth-input-wrap input.is-invalid {
    border-color: #d99191;
}


/* Password toggle */

.emex-auth-password-toggle {
    position: absolute;
    z-index: 3;
    right: 6px;
    top: 50%;
    width: 31px;
    height: 31px;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #8d98a8;
    font-size: 11px;
}

.emex-auth-password-toggle:hover {
    background: #f3f5f8;
    color: #516880;
}


/* Forgot */

.emex-auth-forgot {
    color: #416e9f;
    font-size: 9px;
    font-weight: 650;
    text-decoration: none;
}

.emex-auth-forgot:hover {
    color: #244e7c;
    text-decoration: underline;
}


/* Options */

.emex-auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-top: 15px;
}

.emex-auth-remember {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #697586;
    font-size: 9.5px;
    cursor: pointer;
}

.emex-auth-remember input {
    width: 14px;
    height: 14px;
    margin: 0;
    accent-color: #315f94;
}

.emex-auth-secure-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #98a2b3;
    font-size: 8.5px;
}


/* Submit */

.emex-auth-submit {
    width: 100%;
    height: 43px;
    margin-top: 21px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 0;
    border-radius: 9px;
    background:
        linear-gradient(
            135deg,
            #214d7c,
            #326aa4
        );
    color: #fff;
    box-shadow:
        0 6px 18px
        rgba(33, 77, 124, .16);
    font-size: 10.5px;
    font-weight: 700;
    transition:
        transform .12s ease,
        box-shadow .12s ease,
        opacity .12s ease;
}

.emex-auth-submit:hover {
    transform: translateY(-1px);
    box-shadow:
        0 9px 22px
        rgba(33, 77, 124, .20);
}

.emex-auth-submit:disabled {
    cursor: wait;
    opacity: .75;
    transform: none;
}


/* ============================================================
   HELP
   ============================================================ */

.emex-auth-help {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 24px;
    padding: 10px;
    border: 1px solid #e4e8ee;
    border-radius: 9px;
    background: #fafbfc;
}

.emex-auth-help > i {
    margin-top: 1px;
    color: #74879c;
    font-size: 11px;
}

.emex-auth-help strong {
    display: block;
    color: #596579;
    font-size: 9px;
}

.emex-auth-help span {
    display: block;
    margin-top: 2px;
    color: #929baa;
    font-size: 8.7px;
    line-height: 1.45;
}


/* Footer */

.emex-auth-login-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 25px;
    color: #a0a8b3;
    font-size: 8px;
}

.emex-auth-footer-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #ccd1d8;
}


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 991.98px) {

    .emex-auth-shell {
        grid-template-columns:
            minmax(320px, 42%)
            minmax(380px, 58%);
    }

    .emex-auth-brand-inner {
        padding: 45px 38px;
    }

    .emex-auth-brand-copy h1 {
        font-size: 36px;
    }

}


@media (max-width: 767.98px) {

    .emex-auth-body {
        background: #f7f8fa;
    }

    .emex-auth-shell {
        display: block;
    }

    .emex-auth-brand-panel {
        display: none;
    }

    .emex-auth-login-panel {
        min-height: 100vh;
        align-items: flex-start;
        padding: 38px 20px 30px;
    }

    .emex-auth-login-wrap {
        max-width: 440px;
        margin: auto;
    }

    .emex-auth-mobile-logo {
        display: flex;
        min-height: 62px;
        align-items: center;
        margin-bottom: 35px;
    }

    .emex-auth-mobile-logo img {
        display: block;
        max-width: 155px;
        max-height: 65px;
        object-fit: contain;
        object-position: left center;
    }

    .emex-auth-login-heading h2 {
        font-size: 23px;
    }

}


@media (max-width: 420px) {

    .emex-auth-login-panel {
        padding: 28px 16px 25px;
    }

    .emex-auth-options {
        align-items: flex-start;
        flex-direction: column;
        gap: 9px;
    }

}

.emex-table-action-danger {
    color: #b54747;
}

.emex-table-action-danger:hover {
    border-color: #efcaca;
    background: #fff6f6;
    color: #9d3636;
}

/* ============================================================
   ROLE PERMISSION EDITOR
   ============================================================ */

.emex-role-permission-group + .emex-role-permission-group {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #edf0f4;
}

.emex-role-permission-header {
    margin-bottom: 9px;
}

.emex-role-permission-header strong {
    display: block;
    color: #344054;
    font-size: 10.5px;
}

.emex-role-permission-header span {
    display: block;
    margin-top: 2px;
    color: #98a2b3;
    font-size: 8.8px;
}

.emex-group-toggle {
    border: 0;
    background: transparent;
    color: #426b9d;
    font-size: 8.8px;
    font-weight: 650;
}

.emex-group-toggle:hover {
    text-decoration: underline;
}


.emex-role-permission-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 7px;
}

.emex-permission-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid #e5e9ef;
    border-radius: 8px;
    background: #fafbfc;
    cursor: pointer;
}

.emex-permission-option:hover {
    border-color: #d8e0ea;
    background: #f7f9fc;
}

.emex-permission-option strong {
    display: block;
    color: #475467;
    font-size: 9px;
    overflow-wrap: anywhere;
}

.emex-permission-option span {
    display: block;
    margin-top: 2px;
    color: #98a2b3;
    font-size: 8px;
}

.emex-permission-option .form-check-input {
    width: 32px;
    height: 17px;
    cursor: pointer;
}

.emex-permission-option .form-check-input:disabled {
    opacity: .65;
    cursor: not-allowed;
}


.emex-role-edit-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 12px 14px;
    border-top: 1px solid #edf0f4;
    background: #fafbfc;
}


.emex-role-user-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid #edf0f4;
    color: inherit;
    text-decoration: none;
}

.emex-role-user-row:first-child {
    padding-top: 0;
}

.emex-role-user-row:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.emex-role-user-row strong {
    display: block;
    color: #344054;
    font-size: 9.5px;
}

.emex-role-user-row span:not(.emex-status-pill) {
    display: block;
    margin-top: 2px;
    color: #98a2b3;
    font-size: 8.5px;
}


@media (max-width: 767.98px) {

    .emex-role-permission-grid {
        grid-template-columns: 1fr;
    }

    .emex-role-edit-footer {
        position: sticky;
        bottom: 0;
        z-index: 20;
    }

}
