/* XtremeX R6.6.77 unified branding + logo size fix */
/* Sidebar: the uploaded logo replaces the old Xtreme'x / ISP MANAGER brand area, without growing it. */
.sidebar-brand.xtx-has-brand-image{min-width:0;gap:0;overflow:hidden;align-items:center}
.xtx-sidebar-brand-img{display:block!important;width:152px!important;height:40px!important;max-width:calc(100% - 2px)!important;max-height:40px!important;object-fit:contain!important;object-position:left center!important;flex:0 1 152px;margin:0!important}
.sidebar.collapsed .sidebar-brand.xtx-has-brand-image{justify-content:center;padding-left:8px;padding-right:8px}
.sidebar.collapsed .xtx-sidebar-brand-img{width:34px!important;height:34px!important;max-width:34px!important;max-height:34px!important;object-position:center!important;flex:0 0 34px}

/* Login: same main company logo, centered at the top of the login box. */
.xt-card-brand{display:flex!important;align-items:center!important;justify-content:center!important;min-height:56px!important;margin-bottom:8px!important;overflow:hidden}
.xt-card-brand .xtx-login-brand-img{display:block!important;width:180px!important;height:52px!important;max-width:82%!important;max-height:52px!important;object-fit:contain!important;object-position:center!important;margin:0 auto!important}
.xt-page-brand{overflow:hidden}
.xt-page-brand .xtx-login-brand-img{display:block!important;width:170px!important;height:48px!important;max-width:42vw!important;max-height:48px!important;object-fit:contain!important;object-position:left center!important;margin:0!important}

/* System Settings: compact preview; never render the original uploaded pixel size. */
.brand-lock-note{display:flex;gap:10px;align-items:flex-start;padding:12px 14px;margin-bottom:15px;border:1px solid rgba(14,165,233,.25);background:rgba(14,165,233,.08);border-radius:12px;color:var(--text-muted)}
.brand-lock-note i{color:#0ea5e9;margin-top:2px}
.brand-upload-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,360px));gap:12px;margin-top:12px;justify-content:start}
.brand-upload-card{border:1px solid var(--border-color,var(--border-dark));border-radius:12px;padding:12px;background:rgba(127,127,127,.035);max-width:360px}
.brand-upload-card>label{display:block;font-weight:700;margin-bottom:8px}
.brand-preview{height:54px!important;min-height:54px!important;display:flex;align-items:center;justify-content:center;border:1px dashed rgba(148,163,184,.55);border-radius:10px;margin-bottom:9px;background:rgba(255,255,255,.55);overflow:hidden;padding:5px}
.brand-preview img{display:block!important;width:132px!important;height:38px!important;max-width:90%!important;max-height:38px!important;object-fit:contain!important;object-position:center!important;margin:0 auto!important}
.brand-preview .brand-preview-empty{font-size:11px;color:#94a3b8;text-align:center}
.brand-upload-actions{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.brand-upload-actions input[type=file]{width:100%;font-size:11px}
.brand-upload-card .form-control{font-size:11px;margin-top:7px}
.brand-upload-card small{display:block;color:#94a3b8;margin-top:6px;line-height:1.35}

/* Invoice/receipt/PDF common logo sizing. */
.xtx-invoice-brand{display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap;margin-bottom:5px}
.xtx-invoice-brand-logo,.xtx-pdf-brand-logo{display:block;width:170px!important;height:48px!important;max-width:60%!important;max-height:48px!important;object-fit:contain!important;object-position:center!important;margin:0 auto 5px!important}
@media print{.xtx-invoice-brand-logo,.xtx-pdf-brand-logo{width:160px!important;height:44px!important;max-height:44px!important}}

.xtx-brand-mini-icon{width:26px!important;height:26px!important;object-fit:contain!important;border-radius:5px}
.xt-login-top-company{font-size:11px;opacity:.78;margin-top:2px}
.xtx-login-text-brand{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;line-height:1.05}
.xt-card-brand .xtx-login-text-brand{align-items:center}
.xtx-login-text-brand strong{font-size:26px;font-weight:800;color:#fff;letter-spacing:-.4px}
.xtx-login-text-brand small{margin-top:5px;font-size:11px;color:#d7edf9;letter-spacing:.2px}

@media (max-width:640px){
  .xt-card-brand .xtx-login-brand-img{width:160px!important;height:46px!important;max-height:46px!important}
  .xt-page-brand .xtx-login-brand-img{width:145px!important;height:42px!important;max-height:42px!important}
  .xtx-sidebar-brand-img{width:138px!important;height:38px!important;max-height:38px!important}
  .brand-upload-grid{grid-template-columns:1fr}
  .brand-upload-card{max-width:none}
}
