/* Executive Master Console & Multi-Tenant UI styles (isolated to Master Portal; .qt-desktop-mode unaffected) */
.mc-shell{display:flex;flex-direction:column;gap:10px;direction:rtl}
.mc-hero{
 display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;
 padding:12px 18px;border-radius:12px;
 background:linear-gradient(135deg,#173b66 0%,#244875 62%,#2d5c94 100%);color:#fff;
 box-shadow:0 6px 18px rgba(23,59,102,.14)
}
.mc-hero-title{display:flex;flex-direction:column;gap:4px}
.mc-hero-title h2{margin:0;color:#fff;font-size:20px;font-weight:900}
.mc-hero-title p{margin:0;color:rgba(255,255,255,.84);font-size:13px}
.mc-hero-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.mc-hero-actions .button.mc-cta{background:#1aa158;border-color:#1aa158;color:#fff;font-weight:800}
.mc-hero-actions .button.mc-cta:hover{background:#138849;border-color:#138849}
.mc-hero-actions .button.mc-ghost{background:rgba(255,255,255,.14);border-color:rgba(255,255,255,.28);color:#fff}
.mc-hero-actions .button.mc-ghost:hover{background:rgba(255,255,255,.24)}

.mc-kpi-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px}
.mc-kpi-card{
 display:flex;flex-direction:column;gap:4px;padding:12px 14px;border-radius:12px;
 background:#fff;border:1px solid #d7e2ee;border-top:3px solid #244875;
 box-shadow:0 2px 8px rgba(15,35,60,.04);min-width:0
}
@media(max-width:1180px){
 .mc-kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
.mc-kpi-card.is-success{border-top-color:#1aa158}
.mc-kpi-card.is-warn{border-top-color:#e89b1a}
.mc-kpi-card.is-danger{border-top-color:#d63930}
.mc-kpi-card small{font-size:12px;font-weight:700;color:#5a6e85}
.mc-kpi-card strong{font-size:26px;font-weight:900;color:#173b66;line-height:1.15;direction:ltr;text-align:right}
.mc-kpi-card span{font-size:11px;color:#72859c}

.mc-tabs{
 display:flex;flex-wrap:wrap;gap:6px;padding:6px;border-radius:11px;
 background:#eef3f8;border:1px solid #d4e0ec
}
.mc-tab{
 border:1px solid transparent;border-radius:8px;background:transparent;color:#355274;
 padding:8px 15px;font-size:13px;font-weight:800;cursor:pointer
}
.mc-tab:hover{background:rgba(255,255,255,.65);color:#173b66}
.mc-tab.active{background:#fff;color:#173b66;border-color:#c6d5e6;box-shadow:0 2px 6px rgba(23,59,102,.08)}

.mc-filters{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin:8px 0}
.mc-chip{
 border:1px solid #cad7e6;border-radius:999px;background:#f7fafd;color:#2c4a6e;
 padding:5px 12px;font-size:12px;font-weight:700;cursor:pointer
}
.mc-chip.active{background:#244875;border-color:#244875;color:#fff}

.mc-badge{
 display:inline-flex;align-items:center;padding:2px 8px;border-radius:999px;
 font-size:11px;font-weight:700;white-space:nowrap
}
.mc-badge.ok{background:#e6f6ee;color:#117a41}
.mc-badge.warn{background:#fff4e0;color:#9b6200}
.mc-badge.bad{background:#fdeceb;color:#b22720}
.mc-badge.neutral{background:#edf2f7;color:#475d75}

.mc-modal-backdrop{
 position:fixed;inset:0;z-index:9900;background:rgba(15,32,54,.55);
 display:flex;align-items:center;justify-content:center;padding:16px
}
.mc-modal-panel{
 width:min(960px,100%);max-height:90dvh;overflow:auto;direction:rtl;
 background:#fff;border-radius:14px;border:1px solid #c6d5e6;padding:18px 20px;
 box-shadow:0 18px 48px rgba(15,32,54,.24);display:flex;flex-direction:column;gap:14px
}
.mc-modal-head{display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid #e2eaf2;padding-bottom:10px}
.mc-modal-head h3{margin:0;color:#173b66;font-size:18px;font-weight:900}

.mc-tree{display:flex;flex-direction:column;gap:10px}
.mc-biz-card{border:1px solid #d4e0ec;border-radius:10px;background:#fafcfe;padding:12px;display:flex;flex-direction:column;gap:8px}
.mc-biz-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px}
.mc-branch-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:8px}
.mc-branch-item{
 background:#fff;border:1px solid #dbe5f0;border-radius:8px;padding:9px 11px;
 display:flex;align-items:center;justify-content:space-between;gap:8px
}
.mc-branch-meta{display:flex;flex-direction:column;gap:2px;font-size:12px;min-width:0}
.mc-branch-meta strong{color:#173b66}
.mc-branch-meta small{color:#6a7f96}

.mc-plan-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:12px}
.mc-plan-card{
 border:1px solid #d5e1ed;border-radius:12px;background:#fff;padding:14px;
 display:flex;flex-direction:column;gap:8px
}
.mc-plan-price{font-size:22px;font-weight:900;color:#174f86}
.mc-inline-form{display:flex;flex-wrap:wrap;gap:8px;align-items:end;padding:12px;background:#f5f8fc;border:1px solid #dce6f1;border-radius:10px}
.mc-inline-form label{display:flex;flex-direction:column;gap:4px;font-size:12px;font-weight:700;color:#274469;flex:1 1 150px}

.mc-audit-list{display:flex;flex-direction:column;gap:6px}
.mc-audit-row{
 display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;
 padding:9px 12px;border:1px solid #e1eaf3;border-radius:9px;background:#fff;font-size:12px
}
.mc-audit-main{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.mc-audit-pager{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:10px}
.mc-audit-filters{margin-bottom:10px}

.mc-tenants-table{width:100%;border-collapse:collapse;font-size:12px}
.mc-tenants-table thead th{background:#173b66;color:#fff;font-size:11.5px;font-weight:800;padding:8px 6px;text-align:right;position:sticky;top:0;z-index:2;white-space:nowrap}
.mc-tenants-table tbody tr:nth-child(even){background:#f8fafd}
.mc-tenants-table tbody tr:hover{background:#eef4fb}
.mc-tenants-table td{vertical-align:top;padding:8px 6px;border-bottom:1px solid #e4ecf5;white-space:normal}
.mc-license-ops{display:flex;flex-direction:column;gap:4px;min-width:155px}
.mc-license-ops :is(select,input,button){height:28px;min-height:28px;padding:2px 6px;font-size:11px}
#body-content:has(.mc-shell) .panel{margin-top:0;padding:12px 14px;border-radius:12px;border:1px solid #d4e0ec;box-shadow:0 2px 10px rgba(15,35,60,.04)}
#body-content:has(.mc-shell) .panel:has(.mc-tenants-table){display:flex!important;flex-direction:column!important;gap:8px!important}
#body-content:has(.mc-shell) .panel:has(.mc-tenants-table)>:is(h2,p.muted,p.hint,button.primary){display:none!important}
#body-content:has(.mc-shell) .panel:has(.mc-tenants-table)>div:has(form.form){display:flex!important;flex-wrap:wrap!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;width:100%!important}
#body-content:has(.mc-shell) .panel:has(.mc-tenants-table) form.form{display:flex!important;flex-direction:row!important;align-items:center!important;gap:8px!important;margin:0!important;flex:1 1 360px!important}
#body-content:has(.mc-shell) .panel:has(.mc-tenants-table) form.form>label{display:flex!important;flex-direction:row!important;align-items:center!important;gap:8px!important;flex:1 1 240px!important;margin:0!important;white-space:nowrap!important}
#body-content:has(.mc-shell) .panel:has(.mc-tenants-table) form.form input{height:34px!important;min-height:34px!important;padding:4px 10px!important;flex:1 1 auto!important}
#body-content:has(.mc-shell) .panel:has(.mc-tenants-table) form.form button{height:34px!important;min-height:34px!important;padding:4px 16px!important;width:auto!important;flex:0 0 auto!important;background:#244875!important;color:#fff!important}
#body-content:has(.mc-shell) .panel:has(.mc-tenants-table)>div:has(form.form)>div{display:flex!important;align-items:center!important;gap:6px!important;margin:0!important;flex-wrap:nowrap!important}
#body-content:has(.mc-shell) .panel:has(.mc-tenants-table) .mc-filters{margin:0!important}
#body-content:has(.mc-shell) .panel:has(.mc-tenants-table)>.table-scroll{width:100%!important}
.mc-sub-slug{display:block;font-size:11px;color:#64748b;direction:ltr;text-align:right;margin-top:2px}
.mc-host-link{color:#1d4ed8;font-weight:700;text-decoration:none;direction:ltr;display:inline-block}
.mc-host-link:hover{text-decoration:underline}
.mc-license-ops{display:flex;flex-direction:column;gap:5px;min-width:190px}
.mc-tenant-actions{display:flex;flex-wrap:wrap;gap:5px;min-width:250px}

.mc-drawer-title-wrap{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.mc-quick-launch{display:flex;flex-wrap:wrap;gap:8px;padding:10px 12px;background:#eef5fc;border:1px solid #c6daf0;border-radius:10px}
.mc-drawer-body{display:flex;flex-direction:column;gap:14px}
.mc-drawer-metrics{display:grid;grid-template-columns:repeat(auto-fill,minmax(145px,1fr));gap:8px}
.mc-metric-box{
 background:#f8fafc;border:1px solid #d7e2ee;border-radius:10px;padding:10px 12px;
 display:flex;flex-direction:column;gap:3px
}
.mc-metric-box small{font-size:11px;color:#5a6e85;font-weight:700}
.mc-metric-box strong{font-size:16px;font-weight:900;color:#173b66}
.mc-drawer-card{
 border:1px solid #d7e2ee;border-radius:12px;background:#fff;padding:14px;
 display:flex;flex-direction:column;gap:10px
}
.mc-drawer-card h4{margin:0;color:#173b66;font-size:14px;font-weight:800}
.mc-quick-actions{display:flex;flex-wrap:wrap;gap:8px}

.mc-create-helpers{
 display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;
 padding:10px 14px;border-radius:10px;background:#f0f6fc;border:1px solid #c6daf0;margin:8px 0
}
.mc-domain-preview{font-size:13px;font-weight:800;color:#173b66;direction:ltr}
.mc-duration-presets{display:flex;flex-wrap:wrap;gap:6px;align-items:center}

@media(max-width:768px){
 .mc-hero{padding:14px}
 .mc-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .mc-drawer-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
 .mc-license-ops,.mc-tenant-actions{min-width:160px}
}
