/* AgencyLead Commercial UI v1.0 */
:root{
  --al-bg:#f4f7fb;
  --al-surface:#ffffff;
  --al-surface-soft:#f8fafc;
  --al-text:#152238;
  --al-muted:#68778d;
  --al-line:#dfe7f1;
  --al-line-strong:#cbd7e6;
  --al-primary:#1557b0;
  --al-primary-2:#1e6bd6;
  --al-primary-soft:#eaf2ff;
  --al-success:#087a55;
  --al-success-soft:#e9f8f1;
  --al-warning:#a85b08;
  --al-warning-soft:#fff7e8;
  --al-danger:#b42318;
  --al-danger-soft:#fff0ef;
  --al-violet:#6941c6;
  --al-teal:#087f8c;
  --al-shadow:0 10px 30px rgba(31,55,88,.07);
  --al-shadow-lg:0 22px 60px rgba(25,50,85,.12);
  --al-radius:14px;
  --al-radius-sm:10px;
  --al-font:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}
html{scroll-behavior:smooth;background:var(--al-bg)}
body{font-family:var(--al-font)!important;background:var(--al-bg)!important;color:var(--al-text)!important;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
a{color:var(--al-primary);text-underline-offset:2px}a:hover{color:#0b448f}
::selection{background:#dceaff;color:#123a72}

/* Containers / page rhythm */
.wrap{width:min(1420px,calc(100% - 36px));max-width:1420px!important;margin:24px auto!important;padding-left:0!important;padding-right:0!important}
body>.wrap:first-child{padding-bottom:40px}
h1,h2,h3{color:#13233b;letter-spacing:-.02em}h1{font-weight:800!important}h2{font-weight:750!important}p{line-height:1.55}
.muted,.hint,.help,.small{color:var(--al-muted)!important}

/* Common surfaces */
.card,.panel,.section,.box,.snapshot,.intro,.fact,.service,.stage,.profile-row{
  border-color:var(--al-line)!important;
  box-shadow:0 1px 2px rgba(15,23,42,.02);
}
.card,.panel,.section,.box{border-radius:var(--al-radius)!important;background:var(--al-surface)!important}
.card:hover{border-color:#cdd9e8}

/* Main product header */
.header{
  max-width:1480px!important;
  margin:0 auto 18px!important;
  padding:14px 18px!important;
  border:1px solid var(--al-line)!important;
  border-radius:0 0 18px 18px!important;
  background:rgba(255,255,255,.94)!important;
  box-shadow:0 9px 28px rgba(21,47,82,.07)!important;
  backdrop-filter:blur(14px);
}
.brand-block,.brand{gap:12px!important}.brand-logo,.brand img,.logo{object-fit:contain}
.brand-logo{width:158px!important;max-height:58px!important}.brand-title h1{font-size:22px!important;margin:0 0 3px!important}
.brand-title .muted{font-size:12px!important}
.header-actions{gap:8px!important}.nav-group{gap:6px!important;padding:3px!important;border-radius:10px}
.user-pill{border:1px solid #cfe0f6!important;background:#f3f7fd!important;color:#36577d!important;border-radius:999px!important;padding:7px 10px!important}

/* Navigation / actions */
.button,.btn,button,input[type=submit]{
  min-height:36px;
  border-radius:9px!important;
  font-family:var(--al-font)!important;
  font-weight:700!important;
  letter-spacing:-.005em;
  transition:transform .12s ease,box-shadow .12s ease,border-color .12s ease,background .12s ease!important;
}
.button,.btn{display:inline-flex!important;align-items:center;justify-content:center;gap:6px;text-decoration:none!important}
.button:hover,.btn:hover,button:hover,input[type=submit]:hover{transform:translateY(-1px);box-shadow:0 6px 14px rgba(25,63,112,.12)}
.button:active,.btn:active,button:active{transform:translateY(0)}
.button.primary,.btn.primary,button,input[type=submit]{background:var(--al-primary)!important;border-color:var(--al-primary)!important;color:#fff!important}
.button.success,.green,.btn.green{background:var(--al-success)!important;border-color:var(--al-success)!important;color:#fff!important}
.button.attention{background:var(--al-warning)!important;border-color:var(--al-warning)!important}
.button.danger,.btn.danger,.danger.button{background:var(--al-danger)!important;border-color:var(--al-danger)!important;color:#fff!important}
.button.violet{background:var(--al-violet)!important;border-color:var(--al-violet)!important}
.button.teal{background:var(--al-teal)!important;border-color:var(--al-teal)!important}
.button.dark,.button.secondary,.btn.secondary,.secondary.btn{background:#526176!important;border-color:#526176!important;color:#fff!important}
.button.logout{background:#fff!important;color:var(--al-danger)!important;border:1px solid #f2c7c3!important}
.button.logout:hover{background:var(--al-danger-soft)!important}
.top-actions,.actions,.toolbar,.head>div:last-child,.top>div:last-child{display:flex;gap:8px;align-items:center;flex-wrap:wrap}

/* Forms */
label{color:#273851;font-weight:700!important;font-size:13px!important}
input,select,textarea{
  border:1px solid var(--al-line-strong)!important;
  border-radius:9px!important;
  background:#fff!important;
  color:var(--al-text)!important;
  min-height:40px;
  padding:9px 11px!important;
  outline:none!important;
  transition:border-color .12s ease,box-shadow .12s ease!important;
}
textarea{min-height:92px;resize:vertical}
input:focus,select:focus,textarea:focus{border-color:#6ea2e6!important;box-shadow:0 0 0 3px rgba(21,87,176,.10)!important}
input::placeholder,textarea::placeholder{color:#9aa7b8}
input[type=checkbox],input[type=radio]{min-height:0;width:auto!important;accent-color:var(--al-primary)}
form.card,form.panel{padding:18px!important}

/* Dashboard summaries */
.summary-grid,.cards{gap:11px!important}
.summary-card,.stat,.metric.card{
  position:relative;
  overflow:hidden;
  border:1px solid var(--al-line)!important;
  border-radius:13px!important;
  background:linear-gradient(180deg,#fff,#fbfcfe)!important;
  box-shadow:0 3px 12px rgba(20,46,80,.035)!important;
}
.summary-card:before,.metric.card:before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:#c7d7ec}
.summary-card.attention:before,.attention.card:before{background:#f59e0b}.summary-card.danger:before,.danger.card:before{background:#e1493f}
.summary-card strong,.stat strong,.metric.card strong{color:#10233f;font-variant-numeric:tabular-nums}

/* Messages */
.message,.notice,.ok,.err,.error,.queue-alert,.warning{
  border-radius:11px!important;
  border-width:1px!important;
  box-shadow:none!important;
}
.message,.ok{background:var(--al-success-soft)!important;border-color:#b8e7d4!important;color:#17624a!important}
.error,.err{background:var(--al-danger-soft)!important;border-color:#f2c2bd!important;color:#9f2520!important}
.warning,.queue-alert{background:var(--al-warning-soft)!important;border-color:#f1d7a7!important;color:#7d4b13!important}

/* Filters */
.filters,.lead-export-bar,.toolbar{
  border:1px solid var(--al-line)!important;
  border-radius:13px!important;
  background:var(--al-surface)!important;
  box-shadow:0 2px 10px rgba(20,46,80,.035)!important;
}
.filters{padding:13px!important;gap:9px!important}
.filter-note{padding:0 3px}
.lead-export-bar{padding:11px 13px!important}

/* Tables */
.table-wrap,.table{
  border:1px solid var(--al-line)!important;
  border-radius:14px!important;
  background:#fff!important;
  box-shadow:0 4px 16px rgba(20,46,80,.04)!important;
  overflow:auto!important;
}
table{border-collapse:separate!important;border-spacing:0!important;background:#fff}
th{background:#f4f7fb!important;color:#4b5f78!important;text-transform:uppercase;letter-spacing:.035em;font-size:11px!important;font-weight:800!important;border-bottom:1px solid var(--al-line-strong)!important}
td{border-bottom-color:#edf1f6!important;color:#23364f}
tbody tr{transition:background .1s ease}tbody tr:hover td{background:#fafcff}
tbody tr:last-child td{border-bottom:0!important}
.table-wrap::-webkit-scrollbar{height:9px;width:9px}.table-wrap::-webkit-scrollbar-thumb{background:#c9d4e2;border-radius:99px}.table-wrap::-webkit-scrollbar-track{background:#f4f7fa}

/* Badges */
.badge,.score-badge,.follow-badge,.status-badge{border-radius:999px!important;border:1px solid transparent;font-weight:750!important}
.score-high{background:#fff0ef!important;color:#a52b22!important;border-color:#f5cbc7!important}
.score-medium{background:#fff7e7!important;color:#96530b!important;border-color:#f2dbad!important}
.score-low{background:#eaf8f1!important;color:#166247!important;border-color:#c2e8d6!important}
.score-pending,.follow-none,.follow-closed{background:#eff3f7!important;color:#58687c!important;border-color:#dde5ee!important}
.follow-overdue{background:#fff0ef!important;color:#a52b22!important}.follow-today{background:#fff7e7!important;color:#8f520e!important}.follow-upcoming{background:#edf4ff!important;color:#285b99!important}

/* Compact action control */
.compact-actions{min-width:188px!important}.compact-actions .lead-action-select{width:132px!important;min-height:34px!important;padding:6px 8px!important;font-size:12px!important}.compact-actions .open-lead-action{min-height:34px!important;padding:7px 10px!important;font-size:12px!important}
.contact-actions a{border:1px solid #d8e5f6!important;background:#f3f7fd!important;border-radius:7px!important;text-decoration:none!important}

/* Settings & admin pages */
.head,.top{margin-bottom:16px}.head h1,.top h1{margin-bottom:5px!important}
.grid>.card[href],a.card{transition:transform .14s ease,border-color .14s ease,box-shadow .14s ease!important}
.grid>a.card:hover{transform:translateY(-2px);border-color:#b9cee8!important;box-shadow:var(--al-shadow)!important}
.metric-line{border-color:#edf1f6!important}

/* Login page */
body.agencylead-login{background:linear-gradient(140deg,#f2f6fc 0%,#eef4fb 48%,#e8f0fa 100%)!important}
.login-shell{width:min(980px,calc(100% - 32px));margin:auto;display:grid;grid-template-columns:1.08fr .92fr;background:#fff;border:1px solid var(--al-line);border-radius:22px;overflow:hidden;box-shadow:var(--al-shadow-lg)}
.login-showcase{padding:46px;background:linear-gradient(145deg,#0e3d7a,#1557b0 62%,#2773cf);color:#fff;position:relative;overflow:hidden}
.login-showcase:after{content:"";position:absolute;width:300px;height:300px;border-radius:50%;background:rgba(255,255,255,.08);right:-120px;bottom:-110px}
.login-showcase img{max-width:205px;max-height:86px;object-fit:contain;background:#fff;padding:8px 10px;border-radius:11px;filter:none!important;opacity:1;box-shadow:0 8px 24px rgba(0,0,0,.12)}.login-showcase h1{color:#fff;margin:38px 0 10px;font-size:34px}.login-showcase p{color:#dbe9fb;max-width:470px}.login-features{display:grid;gap:10px;margin-top:28px}.login-feature{padding:10px 0;border-bottom:1px solid rgba(255,255,255,.14);font-weight:650;color:#f3f8ff}.login-panel{padding:44px 40px;display:flex;align-items:center}.login-panel-inner{width:100%}.login-eyebrow{text-transform:uppercase;letter-spacing:.09em;color:var(--al-primary);font-weight:800;font-size:12px}.login-panel h2{font-size:27px;margin:8px 0}.login-panel .sub{margin:0 0 24px;text-align:left!important}.login-panel button{width:100%;min-height:44px}.login-security{margin-top:18px;color:var(--al-muted);font-size:12px;text-align:center}

/* Mobile nav */
.mobile-nav-toggle{display:none!important;background:#eef4fb!important;color:#174b88!important;border:1px solid #d4e1f0!important;min-height:34px!important;padding:6px 10px!important}

/* Responsive */
@media(max-width:1100px){
  .wrap{width:min(100% - 28px,1420px)!important;margin:18px auto!important}
  .header{margin:0 10px 15px!important;border-radius:0 0 15px 15px!important}
  .header-actions{width:100%!important}
}
@media(max-width:820px){
  .mobile-nav-toggle{display:inline-flex!important}
  .header{align-items:center!important;flex-direction:row!important;flex-wrap:wrap!important;gap:10px!important}
  .header-actions{display:none!important;padding-top:8px;border-top:1px solid var(--al-line);margin-top:2px}
  .header-actions.is-open{display:flex!important}
  .nav-group{width:100%;justify-content:flex-start!important}
  .header-actions .button{font-size:12px!important;min-height:34px!important;padding:7px 9px!important}
  .login-shell{grid-template-columns:1fr}.login-showcase{display:none}.login-panel{padding:34px 26px}
  .grid,.grid2,.grid3{grid-template-columns:1fr!important}
  table{font-size:13px}
}
@media(max-width:600px){
  body{padding-left:0!important;padding-right:0!important}
  .wrap{width:calc(100% - 20px)!important;margin:12px auto!important}
  .header{margin:0 0 12px!important;border-left:0!important;border-right:0!important;border-radius:0 0 14px 14px!important;padding:11px 12px!important}
  .brand-logo{width:130px!important}.brand-title h1{font-size:19px!important}.brand-title .muted{display:none}
  .summary-grid,.cards{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}.summary-card,.card.metric{padding:12px!important}.summary-card strong,.card.metric strong{font-size:21px!important}
  .filters{grid-template-columns:1fr!important;padding:10px!important}.filters .search-field{grid-column:auto!important}
  .lead-export-bar{align-items:flex-start!important}.export-actions{width:100%}.export-actions .button{flex:1;min-width:145px;text-align:center}
  .top,.head{align-items:flex-start!important;flex-direction:column!important}.top>div:last-child,.head>div:last-child{width:100%}
  .button,.btn,button{font-size:13px}
  .card,.panel,.section{padding:15px!important}
  h1{font-size:24px!important}h2{font-size:18px!important}
}

@media print{
  .mobile-nav-toggle{display:none!important}
}

/* =========================================================
   AgencyLead UI polish v1.3 — consistency / density pass
   ========================================================= */
body{font-size:14px!important;line-height:1.45!important}

/* One predictable product header across pages */
.header{
  width:min(1440px,calc(100% - 32px))!important;
  display:flex!important;
  justify-content:space-between!important;
  align-items:center!important;
  gap:16px!important;
  padding:12px 16px!important;
  margin:16px auto 18px!important;
  border:1px solid var(--al-line)!important;
  border-radius:16px!important;
  background:#fff!important;
  box-shadow:0 5px 20px rgba(23,47,79,.055)!important;
}
.brand,.brand-block{display:flex!important;align-items:center!important;gap:12px!important;min-width:0!important}
.brand-logo,.brand img{width:118px!important;height:46px!important;max-width:118px!important;max-height:46px!important;object-fit:contain!important;flex:0 0 auto!important}
.brand-title h1,.brand h1{font-size:20px!important;line-height:1.15!important;margin:0 0 3px!important;white-space:nowrap}
.brand-title .muted,.brand .muted{font-size:11.5px!important;white-space:nowrap}
.header-actions{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:7px!important;flex-wrap:wrap!important}
.nav-group{display:flex!important;align-items:center!important;gap:5px!important;flex-wrap:wrap!important;padding:3px!important;border:1px solid #e5ebf3!important;background:#f8fafc!important;border-radius:10px!important}

/* Buttons: same height, type and radius everywhere */
.button,.btn,button,input[type=submit]{
  min-height:34px!important;
  height:auto!important;
  padding:7px 11px!important;
  border-radius:8px!important;
  font-size:12.5px!important;
  line-height:1.15!important;
  white-space:nowrap;
}
.header .button,.header .btn,.header button{min-height:31px!important;padding:6px 9px!important;font-size:11.5px!important}
.user-pill{min-height:31px!important;padding:6px 9px!important;font-size:11.5px!important}

/* Typography */
h1{font-size:26px!important;line-height:1.18!important;margin-top:0}
h2{font-size:18px!important;line-height:1.25!important}h3{font-size:15px!important;line-height:1.3!important}

/* Forms: compact, predictable, accessible */
label{font-size:12px!important;line-height:1.3!important}
input:not([type=checkbox]):not([type=radio]),select,textarea{
  width:100%;
  min-height:38px!important;
  padding:8px 10px!important;
  font-size:13px!important;
  line-height:1.3!important;
}
textarea{min-height:86px!important}

/* Cards and page surfaces */
.card,.panel,.section,.box{border:1px solid var(--al-line)!important;border-radius:13px!important}
.card{padding:18px!important}
.page-shell,.page-wrap,.users-wrap{width:min(1180px,calc(100% - 32px))!important;margin:0 auto 42px!important}
.page-kicker{font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.08em;color:var(--al-primary);margin-bottom:5px}
.page-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:14px;margin:0 0 15px}
.page-heading h1{margin:0 0 4px!important}.page-heading p{margin:0;color:var(--al-muted);font-size:12.5px}

/* Users module */
.users-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:14px}
.user-stat{padding:14px 16px!important;background:linear-gradient(180deg,#fff,#fbfcfe)!important}
.user-stat .label{font-size:11px;color:var(--al-muted);font-weight:700;text-transform:uppercase;letter-spacing:.045em}
.user-stat strong{display:block;margin-top:4px;font-size:22px;line-height:1.05;color:#10233f}
.user-stat .sub{margin-top:5px;font-size:11px;color:var(--al-muted)}
.users-card{margin:0 0 14px!important}
.users-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:14px;padding-bottom:12px;border-bottom:1px solid #edf1f6}
.users-card-head h2{margin:0 0 3px!important}.users-card-head p{margin:0;font-size:12px;color:var(--al-muted)}
.users-form-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 14px;align-items:end}
.users-form-grid .field{min-width:0}.users-form-grid .field label{display:block;margin:0 0 5px}
.users-form-actions{display:flex;justify-content:flex-end;margin-top:13px}
.user-license-note{display:inline-flex;align-items:center;gap:6px;padding:6px 9px;border-radius:999px;background:#edf4ff;color:#23558f;font-size:11.5px;font-weight:750}
.users-table-wrap{overflow:auto;border:1px solid var(--al-line);border-radius:11px}
.users-table-wrap table{width:100%;min-width:760px;margin:0!important}
.users-table-wrap th,.users-table-wrap td{padding:10px 12px!important;vertical-align:middle!important}
.user-name{font-weight:800;color:#142844}.user-meta{display:block;margin-top:2px;font-size:11.5px;color:var(--al-muted)}
.user-status{display:inline-flex;align-items:center;padding:4px 8px;border-radius:999px;font-size:11px;font-weight:800}
.user-status.active{background:var(--al-success-soft);color:var(--al-success)}
.user-status.disabled{background:#eef2f6;color:#64748b}
.user-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.user-actions .button,.user-actions button,.user-actions .btn{min-height:31px!important;padding:6px 9px!important;font-size:11.5px!important}
.reset-details{position:relative}.reset-details summary::-webkit-details-marker{display:none}.reset-details summary{list-style:none}
.reset-panel{margin-top:7px;padding:10px;border:1px solid var(--al-line);border-radius:9px;background:#f8fafc;min-width:230px}
.reset-panel input{min-height:34px!important}.reset-panel button{margin-top:7px;width:100%}

/* Add-lead: same component rhythm as the rest of the product */
.page-wrap{margin-top:0!important}
.page-intro{display:flex!important;align-items:flex-end!important;justify-content:space-between!important;gap:14px!important;margin:0 0 14px!important}
.page-intro h2{font-size:19px!important;margin:0 0 3px!important}.page-intro p{font-size:12.5px!important;max-width:820px}
.form-stack{gap:12px!important}.form-section{padding:16px!important}
.section-heading{margin-bottom:13px!important;padding-bottom:10px!important}
.section-index{width:25px!important;height:25px!important;border-radius:7px!important;font-size:11px!important}
.section-heading h2{font-size:15px!important;margin:0 0 2px!important}.section-heading p{font-size:11px!important}
.form-grid{gap:12px 14px!important}.field label{margin-bottom:5px!important}.field-note{font-size:10.5px!important;margin-top:4px!important}
.inline-check{font-size:11.5px!important}.form-actions{padding:12px 14px!important}
.form-actions-copy strong{font-size:12.5px!important}.form-actions-copy span{font-size:10.8px!important}
.quick-note{font-size:12px!important;border-left:3px solid var(--al-primary)!important}

/* Desktop density: stop forms/cards from becoming unnecessarily tall */
@media(min-width:1101px){
  .wrap{width:min(1360px,calc(100% - 40px))!important;margin:18px auto 36px!important}
}
@media(max-width:900px){
  .header{width:calc(100% - 22px)!important;margin:11px auto 14px!important;align-items:flex-start!important;flex-direction:column!important}
  .header-actions{width:100%!important;justify-content:flex-start!important}
  .brand-title .muted,.brand .muted{white-space:normal!important}
  .users-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .users-summary{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:640px){
  .header{width:100%!important;margin:0 0 12px!important;border-left:0!important;border-right:0!important;border-radius:0 0 13px 13px!important;padding:10px 11px!important}
  .brand-logo,.brand img{width:98px!important;height:39px!important}.brand-title h1,.brand h1{font-size:18px!important}.brand-title .muted,.brand .muted{font-size:10.5px!important}
  .header-actions{gap:5px!important}.nav-group{width:100%!important;padding:2px!important}
  .header .button,.header .btn,.header button{flex:0 0 auto!important}
  .page-shell,.page-wrap,.users-wrap{width:calc(100% - 18px)!important;margin-bottom:28px!important}
  .users-summary{grid-template-columns:1fr!important}.users-form-grid{grid-template-columns:1fr!important}
  .users-card-head,.page-heading,.page-intro{align-items:flex-start!important;flex-direction:column!important}
  .users-form-actions{justify-content:stretch}.users-form-actions button{width:100%}
  .form-grid,.form-grid.three{grid-template-columns:1fr!important}
  .form-actions-buttons{width:100%}.form-actions-buttons .button,.form-actions-buttons button{flex:1}
  h1{font-size:22px!important}h2{font-size:17px!important}
}

/* ========================================================================
   AgencyLead Commercial UI v3 — product shell inspired by modern SaaS CRMs
   ======================================================================== */
:root{
  --al-sidebar:#07182f;
  --al-sidebar-2:#0b2343;
  --al-sidebar-text:#d9e7f8;
  --al-sidebar-muted:#88a2c2;
  --al-topbar-h:70px;
  --al-sidebar-w:238px;
  --al-shell-bg:#f5f7fb;
  --al-blue:#0d5fc7;
  --al-blue-2:#1974df;
  --al-blue-soft:#eaf3ff;
  --al-cyan:#16a6d9;
  --al-green:#12a36d;
  --al-yellow:#e7a81b;
  --al-red:#df4b4b;
}

body.al-shell-ready{
  margin:0!important;
  padding:calc(var(--al-topbar-h) + 22px) 28px 42px calc(var(--al-sidebar-w) + 28px)!important;
  min-height:100vh;
  background:var(--al-shell-bg)!important;
}
body.al-shell-ready .al-legacy-header{display:none!important}

.al-sidebar{
  position:fixed;z-index:1200;inset:0 auto 0 0;width:var(--al-sidebar-w);
  display:flex;flex-direction:column;
  background:linear-gradient(180deg,var(--al-sidebar) 0%,#081d38 60%,#07172b 100%);
  color:#fff;border-right:1px solid rgba(255,255,255,.07);
  box-shadow:10px 0 34px rgba(8,27,52,.08);
}
.al-sidebar-brand{height:76px;display:flex;align-items:center;gap:11px;padding:13px 16px;border-bottom:1px solid rgba(255,255,255,.075)}
.al-brand-mark{width:43px;height:43px;border-radius:11px;background:#fff;display:grid;place-items:center;overflow:hidden;box-shadow:0 6px 20px rgba(0,0,0,.14)}
.al-brand-mark img{width:39px;height:39px;object-fit:contain;padding:2px}
.al-brand-copy{min-width:0;display:flex;flex-direction:column;line-height:1.15}
.al-brand-copy strong{font-size:18px;letter-spacing:-.02em;color:#fff}
.al-brand-copy span{margin-top:4px;font-size:10.5px;color:#9db4cf;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:145px}
.al-sidebar-nav{padding:13px 10px 16px;overflow-y:auto;overscroll-behavior:contain;flex:1}
.al-sidebar-nav::-webkit-scrollbar{width:5px}.al-sidebar-nav::-webkit-scrollbar-thumb{background:rgba(255,255,255,.13);border-radius:99px}
.al-nav-section{margin-bottom:13px}.al-nav-label{padding:5px 10px 7px;text-transform:uppercase;letter-spacing:.105em;font-size:9.5px;font-weight:800;color:#6f8cac}
.al-nav-item{display:flex;align-items:center;gap:10px;min-height:39px;padding:8px 10px;margin:2px 0;border-radius:9px;color:var(--al-sidebar-text)!important;text-decoration:none!important;font-size:12.5px;font-weight:650;transition:.14s ease}
.al-nav-item:hover{background:rgba(255,255,255,.065);color:#fff!important;transform:none!important}
.al-nav-item.is-active{background:linear-gradient(135deg,#0c5cc4,#1676dc);color:#fff!important;box-shadow:0 7px 20px rgba(8,94,203,.25)}
.al-icon{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none}
.al-nav-item.is-active .al-icon{stroke-width:2}
.al-license-mini{margin:8px 11px 10px;padding:10px 11px;border:1px solid rgba(121,169,224,.19);border-radius:10px;background:rgba(17,73,135,.28);display:flex;justify-content:space-between;gap:8px;align-items:center}
.al-license-mini span{font-size:9.5px;color:#8ea9c8;text-transform:uppercase;font-weight:800;letter-spacing:.05em}.al-license-mini strong{font-size:10.5px;color:#dceaff}
.al-sidebar-user{margin:0 10px 12px;padding:10px;display:grid;grid-template-columns:34px 1fr 27px;gap:9px;align-items:center;border-radius:11px;background:rgba(255,255,255,.055);border:1px solid rgba(255,255,255,.06)}
.al-user-avatar,.al-top-avatar{display:grid;place-items:center;border-radius:50%;background:linear-gradient(135deg,#1270df,#1cb2dc);color:white;font-weight:800}
.al-user-avatar{width:34px;height:34px;font-size:11px}.al-user-copy{min-width:0;display:flex;flex-direction:column}.al-user-copy strong{font-size:11px;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.al-user-copy span{font-size:9.5px;color:#91a9c4;margin-top:2px}.al-user-settings{width:27px;height:27px;border-radius:7px;display:grid;place-items:center;color:#91abc9!important}.al-user-settings:hover{background:rgba(255,255,255,.08);color:#fff!important}.al-user-settings .al-icon{width:14px;height:14px}

.al-topbar{
  position:fixed;z-index:1100;left:var(--al-sidebar-w);right:0;top:0;height:var(--al-topbar-h);
  background:rgba(255,255,255,.95);backdrop-filter:blur(14px);border-bottom:1px solid #e4eaf2;
  display:grid;grid-template-columns:minmax(220px,.9fr) minmax(280px,1.2fr) minmax(260px,.9fr);align-items:center;gap:20px;padding:0 28px;
}
.al-topbar-left,.al-topbar-actions{display:flex;align-items:center;gap:11px}.al-topbar-actions{justify-content:flex-end}
.al-sidebar-toggle{display:none!important;width:36px!important;height:36px!important;min-height:36px!important;padding:0!important;border:1px solid #dce4ee!important;background:#fff!important;color:#31445e!important;box-shadow:none!important}.al-sidebar-toggle .al-icon{width:18px}
.al-page-heading{min-width:0;display:flex;flex-direction:column}.al-page-heading strong{font-size:17px;color:#12243b;letter-spacing:-.02em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.al-page-heading span{font-size:10.5px;color:#7d8da0;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:310px}
.al-global-search{height:38px;max-width:500px;margin:0 auto;display:grid;grid-template-columns:19px 1fr auto;align-items:center;gap:7px;padding:0 10px;border:1px solid #e0e7f0;border-radius:9px;background:#f7f9fc;box-shadow:inset 0 1px 0 rgba(255,255,255,.8)}
.al-global-search .al-icon{width:15px;height:15px;color:#8b9aab}.al-global-search input{border:0!important;box-shadow:none!important;background:transparent!important;min-height:34px!important;padding:0!important;font-size:11.5px!important}.al-global-search kbd{font:600 10px/1 var(--al-font);color:#8d9bad;background:#fff;border:1px solid #dfe6ef;border-bottom-width:2px;border-radius:5px;padding:4px 6px}
.al-quick-button{height:36px;min-height:36px!important;border-radius:8px;display:inline-flex;align-items:center;gap:6px;padding:0 10px;text-decoration:none!important;font-size:11.5px;font-weight:750;border:1px solid #dce4ef;color:#506176!important;background:#fff}.al-quick-button .al-icon{width:15px}.al-quick-button.is-primary{background:linear-gradient(135deg,#0c5fc8,#1777df)!important;border-color:#0f64cb!important;color:#fff!important}.al-quick-button.is-ghost{width:36px;padding:0;justify-content:center}
.al-top-user{display:flex;align-items:center;gap:8px;padding-left:7px;border-left:1px solid #e4e9f0}.al-top-avatar{width:30px;height:30px;font-size:10px}.al-top-user div{display:flex;flex-direction:column;line-height:1.15;max-width:112px}.al-top-user strong{font-size:10.5px;color:#263a53;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.al-top-user span{font-size:9px;color:#8a98a8;margin-top:2px}
.al-sidebar-overlay{display:none;position:fixed;z-index:1150;inset:0;background:rgba(8,20,38,.46);backdrop-filter:blur(2px)}

/* Main app canvas */
body.al-shell-ready>.wrap,body.al-shell-ready>.container,body.al-shell-ready>.page,body.al-shell-ready>.main{
  width:min(1480px,100%)!important;max-width:1480px!important;margin:0 auto!important;
}
body.al-shell-ready>.summary-grid,body.al-shell-ready>.cards,body.al-shell-ready>.filters,body.al-shell-ready>.filter-bar,body.al-shell-ready>.table-wrap,body.al-shell-ready>.table,body.al-shell-ready>.card,body.al-shell-ready>.panel,body.al-shell-ready>.message,body.al-shell-ready>.error,body.al-shell-ready>.success,body.al-shell-ready>.queue-alert,body.al-shell-ready>.lead-export-bar,body.al-shell-ready>section{
  width:min(1480px,100%);margin-left:auto;margin-right:auto;
}
body.al-shell-ready h1{font-size:24px!important}body.al-shell-ready h2{font-size:17px!important}body.al-shell-ready h3{font-size:14px!important}
body.al-shell-ready .card,body.al-shell-ready .panel,body.al-shell-ready .section,body.al-shell-ready .box{border:1px solid #e3e9f1!important;border-radius:12px!important;box-shadow:0 2px 10px rgba(24,44,70,.035)!important}
body.al-shell-ready .card{padding:15px!important}
body.al-shell-ready .button,body.al-shell-ready .btn,body.al-shell-ready button,body.al-shell-ready input[type=submit]{min-height:32px!important;padding:6px 10px!important;border-radius:7px!important;font-size:11.5px!important}
body.al-shell-ready input,body.al-shell-ready select,body.al-shell-ready textarea{font-size:12px!important;border-radius:8px!important;min-height:38px!important}
body.al-shell-ready label{font-size:11.5px!important}
body.al-shell-ready .muted,body.al-shell-ready .hint,body.al-shell-ready .help,body.al-shell-ready .small{font-size:10.5px!important}
body.al-shell-ready th{font-size:9.5px!important;padding:9px 10px!important;background:#f6f8fb!important;color:#64748b!important}
body.al-shell-ready td{font-size:11px!important;padding:10px!important}
body.al-shell-ready .table-wrap,body.al-shell-ready .table{border-radius:11px!important;box-shadow:none!important}
body.al-shell-ready .badge,body.al-shell-ready .score-badge,body.al-shell-ready .status-badge,body.al-shell-ready .follow-badge{font-size:9.5px!important;padding:4px 7px!important}

/* Dashboard */
body.al-shell-ready .summary-grid{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:10px!important;margin-bottom:14px!important}
body.al-shell-ready .summary-card{min-height:82px!important;padding:13px 14px!important;border:1px solid #e3e9f2!important;border-radius:11px!important;background:#fff!important;box-shadow:0 2px 8px rgba(26,49,77,.035)!important}
body.al-shell-ready .summary-card:before{width:0!important}.summary-card span{font-size:10.5px!important;color:#718196!important;font-weight:650}.summary-card strong{font-size:22px!important;line-height:1.1!important;margin-top:7px!important;display:block}.summary-card .muted{margin-top:4px!important}
.al-dashboard-insights{display:grid;grid-template-columns:1.1fr 1fr 1fr;gap:12px;width:min(1480px,100%);margin:0 auto 14px}
.al-insight-card{background:#fff;border:1px solid #e3e9f1;border-radius:12px;padding:16px;min-height:205px;box-shadow:0 2px 10px rgba(25,47,73,.035)}
.al-insight-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:13px}.al-insight-head h3{margin:0!important;font-size:13px!important}.al-insight-head a{font-size:10px;font-weight:700;text-decoration:none}.al-donut-wrap{display:grid;grid-template-columns:135px 1fr;gap:16px;align-items:center}.al-donut{width:126px;height:126px;border-radius:50%;display:grid;place-items:center;position:relative;background:conic-gradient(var(--al-green) 0 var(--al-high-pct),var(--al-yellow) var(--al-high-pct) var(--al-med-pct),#e86c58 var(--al-med-pct) var(--al-low-pct),#dfe6ef var(--al-low-pct) 100%)}.al-donut:after{content:"";position:absolute;width:82px;height:82px;background:#fff;border-radius:50%}.al-donut-center{z-index:1;text-align:center}.al-donut-center strong{display:block;font-size:20px;color:#16304e}.al-donut-center span{font-size:9px;color:#8a98a9}.al-legend{display:grid;gap:7px}.al-legend-row{display:grid;grid-template-columns:9px 1fr auto;align-items:center;gap:7px;font-size:10.5px;color:#5d6e82}.al-dot{width:8px;height:8px;border-radius:50%}.al-dot.high{background:var(--al-green)}.al-dot.med{background:var(--al-yellow)}.al-dot.low{background:#e86c58}.al-dot.pending{background:#dfe6ef}.al-legend-row strong{color:#2c4058}
.al-pipeline-list,.al-service-list{display:grid;gap:8px}.al-pipeline-row,.al-service-row{display:grid;grid-template-columns:90px 1fr 28px;gap:8px;align-items:center;font-size:10.5px}.al-pipeline-row>span:first-child,.al-service-row>span:first-child{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#5b6c80}.al-mini-track{height:7px;border-radius:99px;background:#eef2f6;overflow:hidden}.al-mini-fill{height:100%;border-radius:99px;background:linear-gradient(90deg,#0d62c9,#26a6dc)}.al-pipeline-row strong,.al-service-row strong{text-align:right;color:#2d425b;font-size:10px}
.al-quick-stack{display:grid;grid-template-columns:1fr 1fr;gap:9px}.al-quick-tile{display:flex;gap:10px;align-items:center;padding:11px;border:1px solid #e5ebf2;border-radius:9px;background:#fbfcfe;text-decoration:none!important;color:#29415d!important;transition:.13s ease}.al-quick-tile:hover{border-color:#bfd4ec;background:#f5f9ff;transform:translateY(-1px)}.al-quick-icon{width:31px;height:31px;border-radius:9px;display:grid;place-items:center;background:#eaf3ff;color:#1165c9}.al-quick-icon .al-icon{width:16px}.al-quick-tile strong{font-size:10.5px;display:block}.al-quick-tile span{font-size:9.5px;color:#8190a2;display:block;margin-top:2px}

/* Filters and lead table become toolbar-like */
body.al-shell-ready .filters{padding:10px!important;border-radius:10px!important;background:#fff!important;display:flex!important;align-items:center;gap:7px!important;box-shadow:none!important}.filters .search-field{min-width:230px!important;flex:1 1 230px!important}.lead-export-bar{padding:9px 11px!important;border-radius:10px!important}.queue-alert{padding:10px 12px!important;font-size:11px!important}

/* Cleaner settings grids / admin pages */
body.al-shell-ready .grid{gap:11px!important}.grid>a.card{min-height:110px}.metric.card,.cards .card{min-height:76px}

/* Login uses Rankupar/AgencyLead colors while staying independent of shell */
body.agencylead-login .login-showcase{background:linear-gradient(145deg,#071d3b,#0b58b7 58%,#109ed0)!important}.login-logo{filter:none!important;background:#fff;border-radius:12px;padding:8px!important;max-width:190px!important}.login-card button{background:linear-gradient(135deg,#0c5fc8,#1777df)!important}

@media(max-width:1250px){
  body.al-shell-ready .summary-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .al-dashboard-insights{grid-template-columns:1fr 1fr}.al-dashboard-insights>.al-insight-card:last-child{grid-column:1/-1}
  .al-topbar{grid-template-columns:minmax(190px,.8fr) minmax(240px,1fr) auto;gap:12px;padding:0 18px}.al-top-user div{display:none}
}
@media(max-width:1023px){
  body.al-shell-ready{padding:calc(var(--al-topbar-h) + 18px) 16px 32px!important}
  .al-sidebar{transform:translateX(-102%);transition:transform .2s ease;box-shadow:20px 0 50px rgba(0,0,0,.22)}
  body.al-nav-open .al-sidebar{transform:translateX(0)}body.al-nav-open .al-sidebar-overlay{display:block}
  .al-topbar{left:0;grid-template-columns:auto minmax(220px,1fr) auto}.al-sidebar-toggle{display:grid!important;place-items:center}.al-page-heading span{display:none}
  .al-dashboard-insights{grid-template-columns:1fr}.al-dashboard-insights>.al-insight-card:last-child{grid-column:auto}
}
@media(max-width:760px){
  :root{--al-topbar-h:62px}
  body.al-shell-ready{padding:78px 10px 26px!important}
  .al-topbar{padding:0 10px;grid-template-columns:auto 1fr auto;gap:8px}.al-topbar-center{display:none}.al-page-heading strong{font-size:14px}.al-quick-button span,.al-top-user{display:none}.al-quick-button{width:34px;padding:0;justify-content:center}.al-topbar-actions{gap:6px}
  body.al-shell-ready .summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important}.summary-card strong{font-size:18px!important}.summary-card{min-height:72px!important}
  .al-donut-wrap{grid-template-columns:110px 1fr}.al-donut{width:104px;height:104px}.al-donut:after{width:69px;height:69px}.al-donut-center strong{font-size:16px}
  .al-quick-stack{grid-template-columns:1fr}.filters .search-field{min-width:100%!important}.filters select,.filters .button,.filters button{flex:1 1 calc(50% - 7px)}
  body.al-shell-ready .card{padding:12px!important}.al-insight-card{padding:13px;min-height:auto}
  body.al-shell-ready table{min-width:880px}
}
@media print{.al-sidebar,.al-topbar,.al-sidebar-overlay{display:none!important}body.al-shell-ready{padding:0!important;background:#fff!important}}

/* =========================================================
   AgencyLead UI v4.0 — persistent application shell + form safety
   ========================================================= */
*,*::before,*::after{box-sizing:border-box}
html,body{max-width:100%;overflow-x:hidden}
:root{--al-sidebar-collapsed-w:72px}

/* Prevent every grid/flex based form from overflowing its own column. */
form,fieldset,.field,.form-field,.form-group,.grid>*,.grid2>*,.grid3>*,.form-grid>*,.users-form-grid>*,.filters>*,.facts>*,.row>*{min-width:0}
input:not([type=checkbox]):not([type=radio]),select,textarea{max-width:100%!important;min-width:0!important}
label{max-width:100%}
img,svg,video,canvas{max-width:100%}

body.al-shell-ready{
  max-width:none!important;
  width:auto!important;
  min-height:100vh!important;
  margin:0!important;
  padding:calc(var(--al-topbar-h) + 22px) 28px 42px calc(var(--al-sidebar-w) + 28px)!important;
  transition:padding-left .18s ease;
}
body.al-sidebar-collapsed{padding-left:calc(var(--al-sidebar-collapsed-w) + 28px)!important}
body.al-sidebar-collapsed .al-sidebar{width:var(--al-sidebar-collapsed-w)}
body.al-sidebar-collapsed .al-topbar{left:var(--al-sidebar-collapsed-w)}

.al-sidebar{transition:width .18s ease,transform .2s ease}
.al-sidebar-brand{position:relative;overflow:visible}
.al-sidebar-collapse{
  position:absolute!important;right:-13px;top:24px;z-index:3;
  width:27px!important;height:27px!important;min-height:27px!important;padding:0!important;
  display:grid!important;place-items:center;border-radius:50%!important;
  border:1px solid #d8e2ee!important;background:#fff!important;color:#24405f!important;
  box-shadow:0 4px 14px rgba(5,27,51,.18)!important;cursor:pointer
}
.al-sidebar-collapse:hover{background:#f4f8fd!important;transform:none!important}
.al-sidebar-collapse .al-icon{width:15px;height:15px}

body.al-sidebar-collapsed .al-brand-copy,
body.al-sidebar-collapsed .al-nav-label,
body.al-sidebar-collapsed .al-nav-item span,
body.al-sidebar-collapsed .al-license-mini,
body.al-sidebar-collapsed .al-user-copy,
body.al-sidebar-collapsed .al-user-settings{display:none!important}
body.al-sidebar-collapsed .al-sidebar-brand{justify-content:center;padding-left:10px;padding-right:10px}
body.al-sidebar-collapsed .al-brand-mark{width:42px;height:42px;flex:0 0 42px}
body.al-sidebar-collapsed .al-sidebar-nav{padding-left:9px;padding-right:9px}
body.al-sidebar-collapsed .al-nav-section{margin-bottom:7px}
body.al-sidebar-collapsed .al-nav-item{justify-content:center;padding:8px!important;gap:0}
body.al-sidebar-collapsed .al-nav-item .al-icon{width:18px;height:18px;margin:0}
body.al-sidebar-collapsed .al-sidebar-user{display:flex;justify-content:center;padding:8px;margin-left:9px;margin-right:9px}
body.al-sidebar-collapsed .al-user-avatar{flex:0 0 34px}

/* Sidebar replaces duplicated page-level navigation; contextual actions stay visible. */
body.al-shell-ready .al-legacy-header,
body.al-shell-ready .al-redundant-nav-link,
body.al-shell-ready .al-redundant-nav-group{display:none!important}

/* Pages written before the shell often constrained BODY itself. Neutralize that safely. */
body.al-shell-ready>.wrap,
body.al-shell-ready>.container,
body.al-shell-ready>.page,
body.al-shell-ready>.main,
body.al-shell-ready>.page-wrap,
body.al-shell-ready>.page-shell,
body.al-shell-ready>.users-wrap{
  width:min(1480px,100%)!important;
  max-width:1480px!important;
  margin-left:auto!important;margin-right:auto!important;
}

/* Universal professional form geometry. */
body.al-shell-ready form{max-width:100%;min-width:0}
body.al-shell-ready :is(.grid,.grid2,.grid3,.form-grid,.users-form-grid,.facts,.filters){min-width:0}
body.al-shell-ready :is(.grid,.grid2,.grid3,.form-grid,.users-form-grid,.facts,.filters)>*{min-width:0;max-width:100%}
body.al-shell-ready label{display:block;min-width:0}
body.al-shell-ready input:not([type=checkbox]):not([type=radio]),
body.al-shell-ready select,
body.al-shell-ready textarea{display:block;width:100%!important;max-width:100%!important;min-width:0!important}
body.al-shell-ready .users-form-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;align-items:start!important}
body.al-shell-ready .users-form-grid .field{width:100%;min-width:0}
body.al-shell-ready .users-form-grid .field label{margin:0 0 6px!important}
body.al-shell-ready .users-form-grid input,
body.al-shell-ready .users-form-grid select{height:40px!important;min-height:40px!important}

/* Reduce old page chrome without hiding meaningful contextual controls. */
body.al-shell-ready>.top,
body.al-shell-ready>.head{width:min(1480px,100%)!important;margin-left:auto!important;margin-right:auto!important}
body.al-shell-ready .top-actions:empty,
body.al-shell-ready .actions:empty,
body.al-shell-ready .nav:empty{display:none!important}

/* Form grids stay readable on laptop widths instead of colliding. */
@media(max-width:1250px) and (min-width:901px){
  body.al-shell-ready .users-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.al-shell-ready form .grid3{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:900px){
  body.al-shell-ready .users-form-grid,
  body.al-shell-ready form .grid,
  body.al-shell-ready form .grid2,
  body.al-shell-ready form .grid3,
  body.al-shell-ready form .form-grid{grid-template-columns:1fr!important}
}

/* Mobile uses a drawer; desktop collapse state must not shrink the mobile canvas. */
@media(max-width:1023px){
  body.al-shell-ready,body.al-sidebar-collapsed{padding:calc(var(--al-topbar-h) + 18px) 16px 32px!important}
  body.al-sidebar-collapsed .al-sidebar{width:var(--al-sidebar-w)}
  body.al-sidebar-collapsed .al-brand-copy,
  body.al-sidebar-collapsed .al-nav-label,
  body.al-sidebar-collapsed .al-nav-item span,
  body.al-sidebar-collapsed .al-license-mini,
  body.al-sidebar-collapsed .al-user-copy,
  body.al-sidebar-collapsed .al-user-settings{display:initial!important}
  body.al-sidebar-collapsed .al-sidebar-user{display:grid!important;justify-content:initial;padding:10px;margin:0 10px 12px}
  body.al-sidebar-collapsed .al-nav-item{justify-content:flex-start;padding:8px 10px!important;gap:10px}
  .al-sidebar-collapse{display:none!important}
}
@media(max-width:640px){
  body.al-shell-ready,body.al-sidebar-collapsed{padding:78px 10px 26px!important}
}
@media(max-width:1023px){
  body.al-sidebar-collapsed .al-brand-copy{display:flex!important}
  body.al-sidebar-collapsed .al-nav-label{display:block!important}
  body.al-sidebar-collapsed .al-nav-item span{display:inline!important}
  body.al-sidebar-collapsed .al-license-mini{display:block!important}
  body.al-sidebar-collapsed .al-user-copy{display:flex!important}
  body.al-sidebar-collapsed .al-user-settings{display:grid!important}
}


/* AgencyLead mobile login brand fix */
.login-mobile-brand{display:none;margin:0 0 22px;text-align:center}
.login-mobile-brand img{display:block;max-width:190px;max-height:78px;width:auto;height:auto;object-fit:contain;margin:0 auto;filter:none!important;opacity:1!important}
@media (max-width:760px){
  body.agencylead-login{padding:16px!important}
  .login-shell{width:min(100%,520px)!important}
  .login-mobile-brand{display:block}
  .login-panel{padding:30px 24px!important}
}

/* Universal compact delete action on lead rows */
.lead-delete-inline{display:inline-flex!important;align-items:center;justify-content:center;margin-top:8px;padding:6px 9px!important;border-radius:7px!important;border:1px solid #fecaca!important;background:#fff!important;color:#b91c1c!important;font-size:11.5px!important;font-weight:750!important;text-decoration:none!important}
.lead-delete-inline:hover{background:#fef2f2!important;border-color:#fca5a5!important}

/* AgencyLead v5.0 — buyer subscription + always-visible logout */
@media(max-width:1023px){.al-sidebar-collapse{display:grid!important;right:10px}.al-sidebar-brand{padding-right:45px}.al-nav-open{overflow:hidden}}
@media print{body.al-shell-ready,body.al-sidebar-collapsed{padding:0!important;margin:0!important}.al-sidebar,.al-topbar,.al-sidebar-overlay{display:none!important}}
.al-logout-button{height:36px;min-height:36px!important;display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:0 11px;border:1px solid #d7e1ec;border-radius:999px;background:#fff;color:#173a66!important;text-decoration:none!important;font-size:11.5px;font-weight:800;box-shadow:0 2px 7px rgba(19,50,84,.05)}
.al-logout-button:hover{background:#f5f9ff;color:#0d5fc7!important;border-color:#bfd4ec}.al-logout-button .al-icon{width:15px;height:15px}.al-plan-button{border-radius:999px!important;background:#f7faff!important;color:#31506f!important}.al-plan-button:hover{background:#edf5ff!important;color:#0d5fc7!important}
@media(max-width:760px){.al-logout-button{width:36px;padding:0}.al-logout-button span,.al-plan-button span{display:none}.al-plan-button{width:36px!important;padding:0!important;justify-content:center}}

/* Keep account actions inside the viewport, including long page titles. */
.al-topbar{grid-template-columns:minmax(0,.8fr) minmax(0,1fr) auto}
.al-topbar-left,.al-topbar-center,.al-topbar-actions{min-width:0}
.al-topbar-actions>a,.al-sidebar-toggle{flex-shrink:0}
.al-sidebar-brand{flex-shrink:0}
@media(max-width:1200px){.al-topbar-center{display:none}.al-topbar{grid-template-columns:minmax(0,1fr) auto;gap:10px}}
@media(max-width:1023px){body.al-sidebar-collapsed .al-topbar{left:0}}
@media(max-width:760px){.al-topbar-actions .is-ghost{display:none}.al-topbar-left{gap:7px}.al-page-heading{overflow:hidden}}
