:root{
    --btm-primary:#af2400;
    --btm-primary-2:#d14a1f;
    --btm-accent:#2c3e55;
    --btm-accent-2:#3f5876;
    --btm-white:#ffffff;
    --btm-border:#d8dee8;
    --btm-muted:#7d889a;
    --btm-bg:#f6f7fb;
    --btm-soft:#fff4ef;
}

/* ===== Sidebar fixed ===== */
.btm-layout{
    display:block;
    min-height:100vh;
    background:var(--btm-bg);
}

.btm-sidebar{
    position:fixed;
    top:0;
    left:0;
    width:280px;
    height:100vh;
    z-index:1000;
    background:linear-gradient(180deg,#1f3148 0%, #2c3e55 100%);
    color:#fff;
    display:flex;
    flex-direction:column;
    justify-content:space-between;
    padding:18px 16px;
    border-right:1px solid rgba(255,255,255,.08);
    overflow-y:auto;
    overflow-x:hidden;
}

.btm-sidebar::-webkit-scrollbar{
    width:8px;
}
.btm-sidebar::-webkit-scrollbar-thumb{
    background:rgba(255,255,255,.18);
    border-radius:999px;
}

.btm-logo-box{
    display:flex;
    align-items:center;
    gap:14px;
    padding:8px 10px 18px;
    border-bottom:1px solid rgba(255,255,255,.08);
}

.btm-logo-icon{
    width:44px;
    height:44px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:12px;
    background:linear-gradient(135deg,var(--btm-primary),var(--btm-primary-2));
    box-shadow:0 10px 24px rgba(175,36,0,.28);
}

.btm-logo-icon .dashicons{
    font-size:24px;
    width:24px;
    height:24px;
}

.btm-logo-text{
    display:flex;
    flex-direction:column;
    line-height:1.1;
}

.btm-logo-text strong{
    font-size:20px;
    color:#fff;
}

.btm-logo-text span{
    font-size:16px;
    color:#d8e1ec;
}

.btm-sidebar-nav{
    padding-top:14px;
    display:flex;
    flex-direction:column;
    gap:10px;
}

.btm-nav-item{
    display:flex;
    align-items:center;
    gap:12px;
    text-decoration:none;
    color:#eef3fb;
    padding:15px 16px;
    border-radius:14px;
    transition:all .25s ease;
    font-weight:600;
}

.btm-nav-item:hover{
    background:rgba(255,255,255,.08);
    color:#fff;
}

.btm-nav-item.is-active{
    background:linear-gradient(135deg,var(--btm-primary),var(--btm-primary-2));
    box-shadow:0 12px 24px rgba(175,36,0,.28);
    color:#fff;
}

.btm-nav-item .dashicons{
    font-size:20px;
    width:20px;
    height:20px;
}

.btm-sidebar-bottom{
    padding-top:20px;
    border-top:1px solid rgba(255,255,255,.08);
}

/* ===== Main wrap ===== */
.btm-manager-wrap,
.btm-urm-wrap{
    margin-left:280px;
    min-height:100vh;
    padding:24px 26px 32px;
}

.btm-manager-header{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:16px;
    margin-bottom:22px;
}

.btm-manager-header h2{
    margin:0 0 8px;
    font-size:28px;
    line-height:1.2;
    color:var(--btm-accent);
    font-weight:800;
}

.btm-urm-subtitle{
    margin:0;
    color:#6b7280;
    font-size:15px;
    line-height:1.7;
    max-width:780px;
}

.btm-urm-header-actions{
    display:flex;
    gap:12px;
    align-items:center;
    flex-wrap:wrap;
}

.btm-add-trip-btn,
.btm-btn-primary{
    height:46px;
    border:none;
    border-radius:12px;
    background:linear-gradient(135deg,var(--btm-primary),var(--btm-primary-2));
    color:#fff;
    padding:0 18px !important;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    font-weight:700;
    cursor:pointer;
    box-shadow:0 12px 24px rgba(175,36,0,.2);
    transition:all .25s ease;
}

.btm-add-trip-btn:hover,
.btm-btn-primary:hover{
    transform:translateY(-1px);
    box-shadow:0 16px 30px rgba(175,36,0,.26);
}

.btm-btn-secondary{
    height:46px;
    border-radius:12px;
    border:1px solid rgba(44,62,85,.12);
    background:#fff;
    color:var(--btm-accent);
    padding:0 16px !important;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    font-weight:700;
    cursor:pointer;
    transition:all .25s ease;
}

.btm-btn-secondary:hover{
    border-color:var(--btm-primary);
    color: #FFF;
    box-shadow:0 10px 20px rgba(175,36,0,.08);
}

.btm-btn-link{
    border:none;
    background:transparent;
    color:#6f7480;
    font-weight:700;
    padding:10px 14px;
    cursor:pointer;
}

/* ===== Grid cards ===== */
.btm-urm-grid{
    display:grid;
    grid-template-columns:minmax(0, 1.05fr) minmax(0, 1.35fr);
    gap:20px;
    align-items:start;
}

.btm-urm-card{
    background:#fff;
    border:1px solid #eadfd9;
    border-radius:22px;
    padding:20px;
    box-shadow:0 10px 24px rgba(44,62,85,.06);
}

.btm-urm-card-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    margin-bottom:16px;
    flex-wrap:wrap;
}

.btm-urm-card-head h3{
    margin:0;
    color:var(--btm-accent);
    font-size:20px;
    font-weight:800;
}

/* ===== Search ===== */
.btm-urm-search{
    position:relative;
    width:min(100%, 340px);
}

.btm-urm-search .dashicons{
    position:absolute;
    left:14px;
    top:50%;
    transform:translateY(-50%);
    color:#8792a5;
}

.btm-urm-search input,
.btm-form-group input,
.btm-form-group select{
    width:100% !important;
    height:48px !important;
    border:1px solid var(--btm-border) !important;
    border-radius:12px !important;
    background:#fff !important;
    box-sizing:border-box !important;
    padding:0 14px !important;
    font-size:15px !important;
    transition:all .2s ease;
    margin:0 !important;
    color:var(--btm-accent) !important;
}

.btm-urm-search input{
    padding-left:42px !important;
}

.btm-urm-search input:focus,
.btm-form-group input:focus,
.btm-form-group select:focus{
    outline:none !important;
    border-color:var(--btm-primary) !important;
    box-shadow:0 0 0 4px rgba(175,36,0,.08) !important;
}

/* ===== User list ===== */
.btm-urm-user-list{
    display:grid;
    gap:14px;
}

.btm-urm-user-item{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    padding:16px;
    border:1px solid #efe1db;
    border-radius:18px;
    background:linear-gradient(180deg,#fffaf8 0%, #fff 100%);
    transition:all .22s ease;
}

.btm-urm-user-item:hover{
    box-shadow:0 14px 28px rgba(44,62,85,.08);
    border-color:#e1c5bc;
    transform:translateY(-1px);
}

.btm-urm-user-main{
    display:flex;
    align-items:center;
    gap:14px;
    min-width:0;
    flex:1;
}

.btm-urm-avatar{
    width:52px;
    height:52px;
    border-radius:16px;
    background:linear-gradient(135deg,var(--btm-primary),var(--btm-primary-2));
    color:#fff;
    font-weight:800;
    display:flex;
    align-items:center;
    justify-content:center;
    flex:0 0 52px;
    box-shadow:0 10px 22px rgba(175,36,0,.22);
}

.btm-urm-user-meta{
    min-width:0;
    flex:1;
}

.btm-urm-user-name{
    font-size:17px;
    font-weight:800;
    color:var(--btm-accent);
    line-height:1.3;
}

.btm-urm-user-sub{
    margin-top:4px;
    display:flex;
    gap:8px;
    flex-wrap:wrap;
    color:#7d889a;
    font-size:13px;
}

.btm-urm-user-role-badge{
    margin-top:10px;
    display:inline-flex;
    align-items:center;
    min-height:34px;
    padding:6px 12px;
    border-radius:999px;
    background:#eef3fb;
    color:#2c3e55;
    font-size:13px;
    font-weight:700;
    border:1px solid #d8e3f2;
}

.btm-urm-user-actions{
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:wrap;
}

.btm-urm-mini-btn{
    height:40px;
    font-size:13px;
    padding:0 14px !important;
}

.btm-icon-btn{
    width:40px;
    height:40px;
    border:none;
    border-radius:12px;
    background:#fff3ee;
    color:var(--btm-accent);
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    transition:all .2s ease;
}

.btm-icon-btn:hover{
    background:var(--btm-primary);
    color:#fff;
}

/* ===== Role list ===== */
.btm-role-list{
    display:grid;
    gap:18px;
}

.btm-role-item{
    border:1px solid #efe1db;
    border-radius:18px;
    padding:18px;
    background:linear-gradient(180deg,#fffaf8 0%, #fff 100%);
}

.btm-role-item-top{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:12px;
    margin-bottom:16px;
}

.btm-role-top-actions{
    display:flex;
    gap:8px;
    align-items:center;
    flex-wrap:wrap;
}

.btm-role-name{
    font-size:18px;
    font-weight:800;
    color:var(--btm-accent);
}

.btm-role-key{
    font-size:13px;
    color:#7d889a;
    margin-top:4px;
    word-break:break-word;
}

.btm-role-badge{
    display:inline-flex;
    align-items:center;
	line-height: 1;
    min-height:34px;
    padding:6px 12px;
    border-radius:999px;
    background:linear-gradient(135deg,var(--btm-primary),var(--btm-primary-2));
    color:#fff;
    font-size:12px;
    font-weight:700;
}

.btm-role-section + .btm-role-section{
    margin-top:18px;
}

.btm-role-section-title{
    font-size:14px;
    font-weight:800;
    color:var(--btm-accent);
    margin-bottom:10px;
}

.btm-role-menu-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit, minmax(230px, 1fr));
    gap:12px;
}

.btm-checkbox-card{
    display:flex;
    align-items:flex-start;
    gap:10px;
    min-height:56px;
    padding:12px 14px;
    border:1px solid #eadfd9;
    border-radius:14px;
    background:#fff;
    cursor:pointer;
    transition:all .2s ease;
}

.btm-checkbox-card:hover{
    border-color:#d9b1a3;
    box-shadow:0 8px 16px rgba(175,36,0,.06);
}

.btm-checkbox-card input{
    width:18px !important;
    height:18px !important;
    margin:2px 0 0 !important;
    flex:0 0 18px;
}

.btm-checkbox-card span{
    font-size:14px;
    font-weight:600;
    color:var(--btm-accent);
    line-height:1.45;
}

.btm-role-actions{
    margin-top:18px;
    display:flex;
    justify-content:flex-end;
    align-items:center;
    gap:12px;
    flex-wrap:wrap;
}

.btm-role-note{
    color:#7d889a;
    font-size:14px;
    font-weight:600;
    line-height:1.5;
}

/* ===== Modal ===== */
.btm-modal{
    position:fixed;
    inset:0;
    z-index:9999;
    display:none;
}

.btm-modal.is-open{
    display:block;
}

.btm-modal-overlay{
    position:absolute;
    inset:0;
    background:rgba(44,62,85,.45);
    backdrop-filter:blur(4px);
}

.btm-modal-dialog{
    position: relative;
    z-index: 2;
    width: min(100%, 760px);
    margin: 4vh auto 0;
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 30px 70px rgba(44,62,85,.22);
    border: 1px solid #efe1db;

    display: flex;
    flex-direction: column;

    max-height: 92vh;
    overflow: hidden;
}

.btm-modal-header{
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid #f1e5e0;
    background: linear-gradient(180deg,#fffaf8 0%, #ffffff 100%);
}

.btm-modal-body{
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 24px;
}

.btm-modal-footer{
    flex: 0 0 auto;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    padding: 16px 24px 20px;
    border-top: 1px solid #f1e5e0;
    background: #fff;
    flex-wrap: wrap;
}

.btm-modal-header h3{
    margin:0;
    color:var(--btm-accent);
    font-size:18px;
    font-weight:800;
}

.btm-modal-close{
    border:none;
    background:transparent;
    font-size:24px;
    color:#8a93a7;
    cursor:pointer;
    line-height:1;
    padding:0;
    min-height:unset;
}

.btm-form-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:18px;
}

.btm-form-group label{
    display:flex;
    margin-bottom:8px;
    color:var(--btm-accent);
    font-weight:700;
    font-size:15px;
}

.btm-col-2{
    grid-column:1 / -1;
}

/* ===== Swal ===== */
.btm-swal-popup{
    border-radius:18px !important;
    padding:20px 18px !important;
}

.btm-swal-confirm{
    background:linear-gradient(135deg,var(--btm-primary),var(--btm-primary-2)) !important;
    color:#fff !important;
    border:none !important;
    border-radius:12px !important;
    padding:10px 18px !important;
    font-weight:700 !important;
    box-shadow:0 12px 24px rgba(175,36,0,.2) !important;
}

.btm-swal-cancel{
    background:#eef2f7 !important;
    color:var(--btm-accent) !important;
    border:none !important;
    border-radius:12px !important;
    padding:10px 18px !important;
    font-weight:700 !important;
}

/* ===== Responsive ===== */
@media (max-width: 1200px){
    .btm-urm-grid{
        grid-template-columns:1fr;
    }
}

@media (max-width: 991px){
    .btm-sidebar{
        position:relative;
        top:auto;
        left:auto;
        width:100%;
        height:auto;
        min-height:auto;
        border-right:none;
    }
	
	.qltx-wrap {
		padding: 15px;
		margin-left: 0;
	}

    .btm-manager-wrap,
    .btm-urm-wrap{
        margin-left:0;
        min-height:auto;
        padding:18px;
    }

    .btm-manager-header{
        flex-direction:column;
        align-items:stretch;
    }

    .btm-urm-header-actions{
        width:100%;
    }

    .btm-role-menu-grid{
        grid-template-columns:repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px){
    .btm-manager-wrap,
    .btm-urm-wrap{
        padding:16px;
    }

    .btm-manager-header h2{
        font-size:24px;
    }

    .btm-urm-header-actions{
        flex-direction:column;
        align-items:stretch;
    }

    .btm-urm-header-actions .btm-add-trip-btn,
    .btm-urm-header-actions .btm-btn-secondary{
        width:100%;
    }

    .btm-urm-card{
        padding:16px;
        border-radius:18px;
    }

    .btm-urm-card-head{
        flex-direction:column;
        align-items:stretch;
    }

    .btm-urm-search{
        width:100%;
    }

    .btm-urm-user-item{
        flex-direction:column;
        align-items:stretch;
    }

    .btm-urm-user-actions{
        justify-content:flex-start;
    }

    .btm-form-grid{
        grid-template-columns:1fr;
    }

    .btm-col-2{
        grid-column:auto;
    }

    .btm-role-item-top{
        flex-direction:column;
        align-items:stretch;
    }

    .btm-role-menu-grid{
        grid-template-columns:1fr;
    }

    .btm-role-actions .btm-btn-primary{
        width:100%;
    }

    .btm-modal-dialog{
        width:calc(100% - 20px);
        margin:16px auto 0;
    }

    .btm-modal-footer{
        justify-content:stretch;
    }

    .btm-modal-footer .btm-btn-primary,
    .btm-modal-footer .btm-btn-link{
        width:100%;
        justify-content:center;
        text-align:center;
    }
}
.btm-role-list{
    display:grid;
    gap:16px;
}

.btm-role-item{
    border:1px solid #efe1db;
    border-radius:20px;
    background:linear-gradient(180deg,#fffaf8 0%, #fff 100%);
    overflow:hidden;
    transition:all .25s ease;
    box-shadow:0 8px 18px rgba(44,62,85,.04);
}

.btm-role-item:hover{
    border-color:#e1c5bc;
    box-shadow:0 14px 30px rgba(44,62,85,.08);
}

.btm-role-item.is-open{
    border-color:#dfc2b8;
    box-shadow:0 18px 38px rgba(44,62,85,.10);
}

.btm-role-toggle{
    width:100%;
    border:none;
    background:transparent;
    padding:18px 20px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    text-align:left;
    cursor:pointer;
}

.btm-role-toggle-left{
    min-width:0;
    flex:1;
}

.btm-role-toggle-right{
    display:flex;
    align-items:center;
    gap:12px;
    flex-shrink:0;
}

.btm-role-name{
    font-size:16px;
    font-weight:800;
    color:var(--btm-accent);
    line-height:1.3;
    margin:0;
	text-transform: capitalize;
}

.btm-role-key{
	font-size: 10px;
    color: #7d889a;
    margin-top: 6px;
    line-height: 1;
    word-break: break-word;
	text-transform: none;
}

.btm-role-toggle-icon{
    width:38px;
    height:34px;
    border-radius:12px;
    background:#fff3ee;
    color:var(--btm-primary);
    display:inline-flex;
    align-items:center;
    justify-content:center;
    transition:all .25s ease;
    box-shadow:inset 0 0 0 1px rgba(175,36,0,.08);
}

.btm-role-toggle-icon .dashicons{
    font-size:18px;
    width:18px;
    height:18px;
    transition:transform .25s ease;
}

.btm-role-item.is-open .btm-role-toggle-icon{
    background:linear-gradient(135deg,var(--btm-primary),var(--btm-primary-2));
    color:#fff;
    box-shadow:0 10px 24px rgba(175,36,0,.22);
}

.btm-role-item.is-open .btm-role-toggle-icon .dashicons{
    transform:rotate(180deg);
}

.btm-role-collapse{
    display:grid;
    grid-template-rows:0fr;
    transition:grid-template-rows .3s ease;
}

.btm-role-item.is-open .btm-role-collapse{
    grid-template-rows:1fr;
}

.btm-role-collapse-inner{
    overflow:hidden;
    padding:0 20px 0;
}

.btm-role-item.is-open .btm-role-collapse-inner{
    padding: 0 0 20px;
}

.btm-role-top-actions{
    display:flex;
    justify-content:flex-end;
    gap:8px;
    margin-bottom:16px;
	margin-top: 16px;
    flex-wrap:wrap;
}

.btm-role-section + .btm-role-section{
    margin-top:18px;
}

.btm-role-section-title{
    font-size:14px;
    font-weight:800;
    color:var(--btm-accent);
    margin-bottom:10px;
}

.btm-role-menu-grid{
    display:grid;
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap:12px;
}

.btm-checkbox-card{
    display:flex;
    align-items:flex-start;
    gap:10px;
    min-height: max-content;
    padding:14px 14px;
    border:1px solid #eadfd9;
    border-radius:16px;
    background:#fff;
    cursor:pointer;
    transition:all .2s ease;
}

.btm-checkbox-card:hover{
    border-color:#d9b1a3;
    box-shadow:0 8px 16px rgba(175,36,0,.06);
    transform:translateY(-1px);
}

.btm-checkbox-card input{
    width:18px !important;
    height:18px !important;
    margin:2px 0 0 !important;
    flex:0 0 18px;
}

.btm-checkbox-card span{
    font-size:15px;
    font-weight:700;
    color:var(--btm-accent);
    line-height:1.45;
}

.btm-role-actions{
    margin-top:18px;
    display:flex;
    justify-content:flex-end;
    align-items:center;
    gap:12px;
    flex-wrap:wrap;
}

@media (max-width: 991px){
    .btm-role-menu-grid{
        grid-template-columns:repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px){
    .btm-role-toggle{
        padding:16px;
        align-items:flex-start;
    }

    .btm-role-name{
        font-size:18px;
    }

    .btm-role-toggle-right{
        gap:8px;
    }

    .btm-role-collapse-inner{
        padding:0 16px 0;
    }

    .btm-role-item.is-open .btm-role-collapse-inner{
        padding:0 16px 16px;
    }

    .btm-role-menu-grid{
        grid-template-columns:1fr;
    }

    .btm-checkbox-card{
        min-height:auto;
        padding:12px;
    }

    .btm-role-actions .btm-btn-primary{
        width:100%;
    }
}

/* ===== Mobile topbar + offcanvas sidebar ===== */
.btm-mobile-topbar{
    display:none;
}

.btm-sidebar-overlay{
    display:none;
}

.btm-sidebar-mobile-head{
    display:none;
}

@media (max-width: 991px){
    .btm-mobile-topbar{
        position:sticky;
        top:0;
        z-index:1002;
        display:flex;
        align-items:center;
        justify-content:space-between;
        gap:12px;
        padding:12px 16px;
        background:linear-gradient(180deg,#1f3148 0%, #2c3e55 100%);
        border-bottom:1px solid rgba(255,255,255,.08);
    }

    .btm-mobile-menu-toggle,
    .btm-mobile-menu-close{
        width:42px;
        height:42px;
        border:none;
        border-radius:12px;
        background:rgba(255,255,255,.1);
        color:#fff;
        display:inline-flex;
        align-items:center;
        justify-content:center;
        cursor:pointer;
        flex:0 0 42px;
    }

    .btm-mobile-menu-toggle .dashicons,
    .btm-mobile-menu-close .dashicons{
        font-size:20px;
        width:20px;
        height:20px;
    }

    .btm-mobile-logo-right{
        margin-left:auto;
        display:flex;
        justify-content:flex-end;
        min-width:0;
        flex:1;
    }

    .btm-mobile-logo-right .btm-logo-box{
        border-bottom:none;
        padding:0;
        gap:10px;
    }

    .btm-mobile-logo-right .btm-logo-icon{
        width:38px;
        height:38px;
        border-radius:10px;
    }

    .btm-mobile-logo-right .btm-logo-text strong{
        font-size:17px;
    }

    .btm-mobile-logo-right .btm-logo-text span{
        font-size:13px;
    }

    .btm-sidebar{
        position:fixed;
        top:0;
        left:0;
        width:290px;
        max-width:86vw;
        height:100vh;
        z-index:1003;
        transform:translateX(-100%);
        transition:transform .3s ease;
        border-right:none;
        box-shadow:0 20px 50px rgba(0,0,0,.18);
    }

    .btm-sidebar.is-open{
        transform:translateX(0);
    }

    .btm-sidebar-overlay{
        position:fixed;
        inset:0;
        background:rgba(18,24,33,.45);
        z-index:1001;
        opacity:0;
        visibility:hidden;
        transition:all .25s ease;
    }

    .btm-sidebar-overlay.is-open{
        display:block;
        opacity:1;
        visibility:visible;
    }

    .btm-sidebar-mobile-head{
        display:flex;
        align-items:center;
        justify-content:space-between;
        gap:12px;
        padding:0 0 16px;
        margin-bottom:8px;
        border-bottom:1px solid rgba(255,255,255,.08);
    }

    .btm-sidebar-mobile-head .btm-logo-box{
        border-bottom:none;
        padding:0;
        flex:1;
        min-width:0;
    }

    .btm-desktop-logo{
        display:none;
    }

    .btm-manager-wrap,
    .btm-urm-wrap{
        margin-left:0;
        min-height:auto;
        padding:18px 16px 24px;
    }
}
body.btm-mobile-menu-open{
    overflow:hidden;
}
@media (min-width: 992px){
    .btm-mobile-topbar,
    .btm-sidebar-overlay,
    .btm-sidebar-mobile-head{
        display:none !important;
    }
}