@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Outfit:wght@600;700;800&display=swap");
:root{--bg:#f4f7fb;--panel:#ffffff;--panel-alt:#f8fafc;--text:#17325c;--text-strong:#183063;--muted:#7084a3;--line:#e2e8f2;--primary:#23439B;--primary-dark:#173272;--primary-soft:#e9efff;--accent:#BAC9E3;--shadow:0 18px 48px rgba(18,46,104,.08);--radius:22px}
*{box-sizing:border-box}
html,body{margin:0;padding:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:var(--bg);color:var(--text)}
a{text-decoration:none;color:inherit} h1,h2,h3{margin:0;color:var(--text-strong)} p{margin:0}
input,select,textarea,button{font:inherit}
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]),
select,
textarea{
  width:100%;
  padding:14px 16px;
  border:1px solid #d9e2ef;
  border-radius:16px;
  background:#fff;
  color:var(--text);
}
input[type="checkbox"],
input[type="radio"]{
  width:auto;
  max-width:none;
  min-height:0;
  padding:0;
  margin:0;
  border:none;
  border-radius:4px;
  background:transparent;
  box-shadow:none;
  vertical-align:middle;
  accent-color:var(--primary);
}
textarea{resize:vertical}
input:focus:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]),
select:focus,
textarea:focus{outline:none;border-color:var(--primary);box-shadow:0 0 0 4px rgba(35,67,155,.12)}
input[type="checkbox"]:focus-visible,
input[type="radio"]:focus-visible{outline:2px solid var(--primary);outline-offset:2px;box-shadow:none}
.auth-body{min-height:100vh;display:grid;place-items:center;background:radial-gradient(circle at 10% 10%,rgba(186,201,227,.65),transparent 25%),radial-gradient(circle at 90% 20%,rgba(35,67,155,.12),transparent 30%),var(--bg);padding:32px}
.auth-shell{display:grid;grid-template-columns:1.1fr .9fr;max-width:1100px;width:100%;background:rgba(255,255,255,.45);border:1px solid rgba(255,255,255,.5);box-shadow:var(--shadow);border-radius:32px;overflow:hidden;backdrop-filter:blur(20px)}
.auth-panel{padding:54px;background:linear-gradient(160deg,#18326d 0%, #23439B 46%, #3f66c7 100%);color:#fff}
.auth-brand{display:flex;align-items:center;gap:18px;margin-bottom:36px}
.auth-logo{width:64px;height:64px;border-radius:18px;background:rgba(255,255,255,.16);display:grid;place-items:center;font-size:34px;font-weight:900}
.auth-title{font-size:2rem;font-weight:800}.auth-sub{opacity:.82}
.feature-list{display:flex;flex-direction:column;gap:18px;margin-top:46px}
.feature-item{display:flex;gap:12px;align-items:center;font-size:1rem;opacity:.95}
.feature-icon{width:34px;height:34px;border-radius:12px;background:rgba(255,255,255,.14);display:grid;place-items:center}
.auth-card{padding:54px;background:#fff}
.chip,.role-chip,.soft-chip,.pill{display:inline-flex;align-items:center;gap:8px;padding:8px 12px;border-radius:999px;font-size:.85rem;font-weight:700}
.chip{background:var(--primary-soft);color:var(--primary);margin-bottom:16px}.role-chip{background:#eef3ff;color:var(--primary)}.soft-chip{background:#f4f6fb;color:var(--muted)}
.pill{background:#eef3ff;color:var(--primary)}.pill-score{background:#e9fbff;color:#0f766e}
.alert{background:#fff3f3;border:1px solid #ffcfcf;color:#b91c1c;padding:12px 14px;border-radius:14px}
.stack{display:flex;flex-direction:column;gap:14px}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:none;border-radius:16px;padding:13px 18px;font-weight:700;cursor:pointer;transition:.18s ease}
.btn:hover{transform:translateY(-1px)} .btn-primary{background:linear-gradient(135deg,var(--primary),#3158bf);color:#fff;box-shadow:0 12px 28px rgba(35,67,155,.22)} .btn-secondary{background:#f1f5ff;color:var(--primary)} .btn-ghost{background:#fff;border:1px solid var(--line);color:var(--text)}
.btn-sm{padding:8px 12px;border-radius:12px;font-size:.88rem}.btn-full{width:100%}.btn-inline{margin-top:8px}
.layout{display:grid;grid-template-columns:294px 1fr;min-height:100vh}
.sidebar{background:#fff;border-right:1px solid var(--line);display:flex;flex-direction:column;justify-content:space-between}
.brandbar{padding:22px 18px 16px;border-bottom:1px solid var(--line)}
.brandbox{display:flex;align-items:center;gap:12px;margin-bottom:12px}
.brandlogo{width:42px;height:42px;border-radius:14px;background:linear-gradient(135deg,var(--primary),#5677cb);color:#fff;display:grid;place-items:center;font-weight:900;font-size:24px;box-shadow:0 12px 20px rgba(35,67,155,.18)}
.brandname{font-weight:800;color:var(--text-strong);font-size:1.08rem}.brandmini{font-size:.82rem;color:var(--muted)}
.sidenav{padding:18px 14px;display:flex;flex-direction:column;gap:14px}

.navgroup{display:flex;flex-direction:column;gap:8px}
.navgroup-toggle{display:flex;align-items:center;justify-content:space-between;background:transparent;border:none;padding:6px 10px 0;color:var(--muted);font-weight:800;letter-spacing:.06em;text-transform:uppercase;font-size:.74rem;cursor:pointer}
.navgroup-chevron{width:18px;height:18px;display:inline-flex;align-items:center;justify-content:center;transition:transform .18s ease;color:#97a7c3}
.navgroup-chevron svg{width:18px;height:18px}
.navgroup.open .navgroup-chevron{transform:rotate(90deg)}
.navgroup-items{display:none;flex-direction:column;gap:10px}
.navgroup.open .navgroup-items{display:flex}
.navsection-title{padding:0}

.navitem{display:flex;align-items:center;gap:14px;padding:14px 14px;border-radius:18px;color:#42597c;font-weight:700}
.navitem:hover,.navitem.active{background:var(--primary);color:#fff;box-shadow:0 10px 20px rgba(35,67,155,.18)}
.navicon{width:20px;height:20px;display:inline-flex;align-items:center;justify-content:center;flex:0 0 20px}
.navicon svg,.iconbtn svg{width:20px;height:20px}
.sidefooter{padding:16px;border-top:1px solid var(--line)}
.userrow{display:flex;align-items:center;gap:12px}
.avatar{width:40px;height:40px;border-radius:50%;background:#d7dff0;color:var(--primary-dark);display:grid;place-items:center;font-weight:800}
.avatar-lg{width:46px;height:46px}.avatar-territory{width:48px;height:48px;border-radius:14px;background:linear-gradient(135deg,#103f61,#2f6da4);color:#fff}
.main{padding:26px 28px 44px}
.topbar{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;margin-bottom:26px}
.eyebrow{font-size:.92rem;font-weight:700;color:var(--muted);margin-bottom:8px}
.topbar h1{font-size:2.25rem;line-height:1.05;max-width:720px}
.topactions{display:flex;align-items:center;gap:12px}
.iconbtn{width:44px;height:44px;border-radius:14px;border:1px solid var(--line);background:#fff;display:inline-flex;align-items:center;justify-content:center;color:var(--text-strong);box-shadow:var(--shadow)}
.profilechip{display:flex;align-items:center;gap:10px;padding:8px 12px;border:1px solid var(--line);border-radius:16px;background:#fff}
.profile-name{font-size:.95rem}
.section{margin-bottom:24px}
.stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}
.metric-card{background:#fff;border:1px solid var(--line);border-radius:26px;padding:26px;box-shadow:var(--shadow)}
.metric-primary{background:linear-gradient(135deg,#173272,#23439B);color:#fff}
.metric-primary .metric-label,.metric-primary .metric-sub{color:#dce8ff}
.metric-label{font-size:1rem;color:var(--muted);margin-bottom:10px}.metric-value{font-size:3rem;font-weight:800;line-height:1}.metric-sub{margin-top:14px;color:var(--muted)}
.card{background:#fff;border:1px solid var(--line);border-radius:26px;box-shadow:var(--shadow)} .panel{padding:22px}
.panel-head,.section-head,.territory-head{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;margin-bottom:16px}
.territory-card{padding:22px}.territory-list{display:flex;flex-direction:column;gap:14px}
.territory-item{border:1px solid #e3eaf5;border-radius:20px;padding:16px;background:#fff}.territory-top{display:flex;gap:12px;align-items:center;margin-bottom:12px}
.filter-strip{padding:16px;display:grid;grid-template-columns:1.2fr .8fr .8fr auto;gap:14px}
.grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.grid3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.table-card{overflow:hidden}.table{width:100%;border-collapse:collapse}
.table th,.table td{padding:16px 14px;border-bottom:1px solid #eef2f8;text-align:left;vertical-align:top}
.table th{background:#f9fbfe;color:var(--primary);position:sticky;top:0;font-weight:800}.table tr:hover td{background:#fbfdff}
.small{font-size:.88rem}.muted{color:var(--muted)}.strong{font-weight:800;color:var(--text-strong)}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.form-actions{display:flex;gap:12px;grid-column:1/-1}
.modal-row.hidden{display:none}.modal-card{padding:6px 2px 10px}
.timeline,.template-list{display:flex;flex-direction:column;gap:12px}
.timeline-item,.template-card{display:flex;justify-content:space-between;align-items:center;gap:16px;border:1px solid #e5ecf5;border-radius:18px;padding:14px 16px;background:#fbfdff}
.template-card{flex-direction:column;align-items:flex-start}.template-top{display:flex;justify-content:space-between;gap:12px;width:100%}
.template-swatch{display:flex;gap:10px;margin-top:8px}.swatch{width:28px;height:28px;border-radius:999px;border:2px solid #fff;box-shadow:0 0 0 1px var(--line)}
.empty{color:var(--muted)}
@media (max-width:1420px){.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.grid3{grid-template-columns:1fr}}
@media (max-width:1120px){.layout{grid-template-columns:1fr}.sidebar{position:relative}.grid2,.form-grid,.filter-strip,.auth-shell{grid-template-columns:1fr}.topbar,.panel-head,.section-head,.territory-head{flex-direction:column}.topactions{flex-wrap:wrap}}

.campaign-builder-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.mini-card{border:1px solid #e5ecf5;border-radius:20px;padding:16px;background:#fbfdff}
.sequence-list{display:flex;flex-direction:column;gap:10px;margin-top:12px}
.sequence-item{display:flex;gap:12px;align-items:flex-start;padding:12px;border-radius:16px;background:#fff;border:1px solid #edf2f8}
.workflow-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.workflow-step{border:1px solid #e5ecf5;border-radius:20px;padding:18px;background:#fbfdff;display:flex;flex-direction:column;gap:8px}
.builder-toolbar{display:flex;flex-direction:column;gap:10px}
.variable-pills{display:flex;flex-wrap:wrap;gap:8px}
.mail-preview-shell{display:flex;flex-direction:column;gap:14px}
.mail-preview-top{padding:14px 16px;border:1px solid var(--line);border-radius:18px;background:#fbfdff}
.mail-preview-subject{font-weight:800;color:var(--text-strong);margin-bottom:4px}
.mail-preview-preheader{font-size:.9rem;color:var(--muted)}
.mail-preview-card{border:1px solid var(--line);border-radius:24px;overflow:hidden;background:#fff;box-shadow:var(--shadow)}
.mail-preview-header{padding:22px 24px;background:linear-gradient(135deg,#23439B,#18326d)}
.mail-preview-logo-wrap{display:flex;align-items:center;gap:12px}
.mail-preview-logo{max-height:42px;max-width:160px;border-radius:8px;background:#fff;padding:4px}
.mail-preview-brand{font-weight:800;color:#fff;font-size:1.1rem}
.mail-preview-body{padding:24px;line-height:1.7;min-height:220px}
.mail-preview-accent{height:8px;background:#BAC9E3}
.mail-preview-footer{padding:18px 24px;color:var(--muted);font-size:.9rem}
.hidden{display:none!important}
.preview-switcher{margin-top:18px}
@media (max-width: 1420px){.workflow-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width: 1120px){.campaign-builder-grid,.workflow-grid{grid-template-columns:1fr}}

.sidefooter-static{display:flex;align-items:center;justify-content:flex-start}
.topactions{position:relative}
.usermenu{position:relative}
.usermenu-trigger{display:flex;align-items:center;gap:10px;padding:8px 12px;border:1px solid var(--line);border-radius:18px;background:#fff;box-shadow:var(--shadow);cursor:pointer;color:var(--text-strong)}
.usermenu-trigger .avatar{width:42px;height:42px}
.caret{font-size:14px;color:var(--muted)}
.usermenu-dropdown{position:absolute;top:calc(100% + 10px);right:0;width:260px;background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:0 24px 48px rgba(20,40,90,.14);padding:10px;z-index:50}
.usermenu-item{display:flex;align-items:center;justify-content:space-between;padding:12px 14px;border-radius:12px;color:var(--text-strong);font-weight:700}
.usermenu-item:hover{background:#f4f7ff}
.usermenu-section{padding:8px 10px 12px}
.usermenu-label{font-size:.82rem;color:var(--muted);font-weight:700;margin-bottom:10px}
.lang-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.lang-grid--wide{grid-template-columns:repeat(5,minmax(0,1fr))}
@media (max-width:420px){.lang-grid--wide{grid-template-columns:repeat(3,minmax(0,1fr))}}
.lang-btn.active{font-weight:700}
a.lang-btn{text-decoration:none;display:inline-flex;align-items:center;justify-content:center}
.lang-btn{border:1px solid var(--line);background:#fff;border-radius:12px;padding:8px 0;font-weight:800;cursor:pointer;color:var(--text-strong)}
.lang-btn.active,.lang-btn:hover{background:var(--primary);color:#fff;border-color:var(--primary)}
.usermenu-divider{height:1px;background:var(--line);margin:4px 0 6px}
.usermenu-logout{color:#b42318}
.usermenu-logout:hover{background:#fff5f5}
.hidden{display:none!important}

.account-page{display:flex;flex-direction:column;gap:16px}
.account-alert{padding:14px 18px;border-radius:16px;font-weight:700}
.account-alert.success{background:#ecfdf3;color:#027a48;border:1px solid #abefc6}
.account-alert.error{background:#fef3f2;color:#b42318;border:1px solid #fecdca}
.account-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.account-field{display:flex;flex-direction:column;gap:8px}
.account-field label{font-size:.85rem;font-weight:700;color:var(--muted)}
.account-actions{display:flex;justify-content:flex-end}
.checkrow{display:flex;align-items:center;gap:10px;padding:10px 12px;border:1px solid #e5ecf5;border-radius:14px;background:#fbfdff;font-weight:700;color:var(--text-strong)}
.checkrow input{width:auto}
@media (max-width:1120px){.account-grid{grid-template-columns:1fr}}

.dashboard-grid{align-items:stretch}
.map-panel{min-height:540px}
.worldmap-card{display:flex;flex-direction:column;gap:16px}
.worldmap-stage{background:#f8fbff;border:1px solid var(--line);border-radius:24px;padding:18px}
.worldmap-svg{width:100%;height:auto;display:block}
.continent-fill path{fill:#e6edf7;stroke:#c7d3e5;stroke-width:2}
.map-dot{fill:rgba(35,67,155,.22);stroke:#23439B;stroke-width:2}
.map-dot-core{fill:#23439B}
.worldmap-legend{display:flex;align-items:center;justify-content:center;gap:12px;color:var(--muted)}
.legend-scale{display:flex;gap:8px}
.legend-scale span{width:18px;height:18px;border-radius:8px;background:#dbe6ff}
.legend-scale span:nth-child(2){background:#b8cbff}
.legend-scale span:nth-child(3){background:#7fa1ef}
.legend-scale span:nth-child(4){background:#23439B}
.legend-pill{font-size:.84rem;font-weight:700}
.ranking-list,.barlist{display:flex;flex-direction:column;gap:12px}
.ranking-item{display:flex;align-items:center;justify-content:space-between;border:1px solid var(--line);background:#fbfdff;border-radius:16px;padding:14px 16px}
.ranking-name{font-weight:800;color:var(--text-strong)}
.dashboard-lower{grid-template-columns:1.2fr 1.2fr .9fr}
.baritem{display:flex;flex-direction:column;gap:8px}
.barhead{display:flex;align-items:center;justify-content:space-between;font-weight:700;color:var(--text-strong)}
.bartrack{height:12px;background:#edf3fb;border-radius:999px;overflow:hidden}
.barfill{height:100%;border-radius:999px;background:linear-gradient(90deg,#6d8ee9,#23439B)}
.platform-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.platform-card{border:1px solid var(--line);background:#fbfdff;border-radius:18px;padding:16px}
.platform-value{font-size:2rem;font-weight:900;color:var(--text-strong);line-height:1}
@media (max-width:1320px){.dashboard-lower{grid-template-columns:1fr}.platform-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:900px){.platform-grid{grid-template-columns:1fr}}

.choropleth-map{width:100%;min-height:420px;border:1px solid var(--line);border-radius:24px;background:#f8fbff;overflow:hidden}
.worldmap-fallback{display:flex;flex-direction:column;gap:12px}

.geo-info-banner{padding:10px 14px;border:1px solid #dbe6ff;background:#f5f9ff;color:#46618d;border-radius:14px;font-size:.9rem}

.dashboard-pro{gap:22px}
.dashboard-toolbar{display:flex;align-items:center;justify-content:space-between;gap:18px}
.toolbar-actions{display:flex;gap:12px;align-items:center}
.full-map-panel{padding-bottom:18px}
.head-chips{display:flex;gap:10px;align-items:center}
.map-meta-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:8px 0 16px}
.mini-kpi{border:1px solid var(--line);background:#fbfdff;border-radius:18px;padding:14px 16px;display:flex;flex-direction:column;gap:6px}
.mini-kpi-label{font-size:.78rem;color:var(--muted);font-weight:700}
.worldmap-card.fullwidth{display:flex;flex-direction:column;gap:14px}
.choropleth-map.large{min-height:520px}
.dashboard-grid-3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:18px}
.platform-grid.wide{grid-template-columns:repeat(4,minmax(0,1fr))}
.modal-shell{position:fixed;inset:0;background:rgba(15,23,42,.42);display:grid;place-items:center;padding:24px;z-index:200}
.modal-card{width:min(920px,100%);background:#fff;border-radius:24px;border:1px solid var(--line);box-shadow:0 28px 80px rgba(19,46,99,.25);overflow:hidden}
.modal-head{display:flex;align-items:center;justify-content:space-between;padding:18px 22px;border-bottom:1px solid var(--line)}
.modal-close{width:40px;height:40px;border-radius:12px;border:1px solid var(--line);background:#fff;color:var(--text-strong);font-size:1.5rem;cursor:pointer}
.modal-body{padding:22px;display:flex;flex-direction:column;gap:18px}
.modal-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.modal-columns{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.ranking-list.compact{gap:10px}
.geo-settings-text{display:flex;flex-direction:column;gap:12px;color:var(--text)}
@media (max-width:1280px){.dashboard-grid-3{grid-template-columns:1fr}.platform-grid.wide{grid-template-columns:repeat(2,minmax(0,1fr))}.map-meta-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.modal-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:920px){.dashboard-toolbar,.modal-columns{grid-template-columns:1fr;display:grid}.platform-grid.wide,.modal-kpi-grid,.map-meta-grid{grid-template-columns:1fr}}

.head-chips,.toolbar-actions{display:flex;gap:10px;align-items:center}
.choropleth-map .hoverlayer text{font-weight:700}

.scanner-grid{align-items:start}
.discovery-grid{display:grid;grid-template-columns:1.1fr 1fr 1fr 1.1fr .6fr auto;gap:12px;align-items:center}
.workflow-strip{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin-top:18px}
.workflow-step{border:1px solid var(--line);background:#fbfdff;border-radius:18px;padding:14px 16px;display:flex;gap:10px;align-items:center}
.workflow-step strong{width:34px;height:34px;border-radius:999px;background:#23439B;color:#fff;display:grid;place-items:center}
.btn-small{padding:10px 14px;border-radius:12px}
.account-actions.dual{display:flex;align-items:center;justify-content:space-between}
.inline-actions{display:flex;gap:12px}
.btn-danger{background:#b42318;color:#fff;border-color:#b42318}
.btn-danger:hover{background:#981b13}
@media (max-width:1280px){.discovery-grid{grid-template-columns:1fr 1fr}.workflow-strip{grid-template-columns:1fr 1fr}}
@media (max-width:820px){.discovery-grid,.workflow-strip{grid-template-columns:1fr}}

.discovery-inline{display:flex;gap:12px;align-items:center}
.checkrow.compact{padding:10px 12px;min-height:46px}
.inline-actions{display:flex;gap:8px;flex-wrap:wrap}

.discovery-grid.user-first{display:grid;grid-template-columns:1.2fr 1fr 1fr 1fr;gap:14px;align-items:end}
.discovery-grid.user-first .span-2{grid-column:span 2}
.discovery-grid.user-first .actions-row{display:flex;align-items:end}
.discovery-grid.user-first .actions-row .btn{width:100%}
.checkfield{display:flex;flex-direction:column;gap:8px}
.icon-actions{gap:8px}
.iconbtn{width:38px;height:38px;border-radius:12px;display:inline-flex;align-items:center;justify-content:center;background:#f1f5ff;color:var(--primary);border:1px solid #dce6fb}
.iconbtn:hover{background:var(--primary);color:#fff;box-shadow:0 10px 20px rgba(35,67,155,.18)}
.iconbtn svg{width:18px;height:18px}
@media (max-width:1200px){.discovery-grid.user-first{grid-template-columns:1fr 1fr}.discovery-grid.user-first .span-2{grid-column:span 2}}
@media (max-width:760px){.discovery-grid.user-first{grid-template-columns:1fr}.discovery-grid.user-first .span-2{grid-column:span 1}}

.dashboard-toolbar .btn{background:#f1f5ff !important;color:var(--primary) !important;border:1px solid #dce6fb;box-shadow:none}
.dashboard-toolbar .btn:hover{background:var(--primary) !important;color:#fff !important}
.dashboard-toolbar .toolbar-actions{display:flex;gap:12px;align-items:center}
.choropleth-map.large{min-height:420px}
.discovery-debug{padding:14px 18px}

.country-live-card{border:1px solid var(--line);background:#fbfdff;border-radius:20px;padding:16px 18px;display:flex;flex-direction:column;gap:14px}
.country-live-head{display:flex;align-items:center;justify-content:space-between;gap:14px}
.compact-live-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
.dashboard-toolbar{margin-bottom:8px}

.navsection-title{margin:18px 14px 8px;font-size:12px;font-weight:800;letter-spacing:.04em;color:#7a8cab;text-transform:uppercase;}

/* FINAL MAIN-APP STYLE ALIGNMENT */
:root{
  --bg:#f3f6fb;
  --panel:#ffffff;
  --panel-alt:#f8fbff;
  --text:#17325c;
  --text-strong:#10264d;
  --muted:#7084a3;
  --line:#dfe7f2;
  --primary:#23439B;
  --primary-dark:#173272;
  --primary-soft:#edf3ff;
  --accent:#BAC9E3;
  --shadow:0 18px 48px rgba(18,46,104,.10);
  --shadow-strong:0 24px 60px rgba(18,46,104,.16);
}

body{
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif !important;
  color:var(--text);
  background:
    radial-gradient(circle at 10% 10%,rgba(186,201,227,.45),transparent 22%),
    radial-gradient(circle at 90% 20%,rgba(35,67,155,.10),transparent 28%),
    var(--bg);
}

h1,h2,h3,.brandname,.auth-title{
  font-family:Outfit,Inter,ui-sans-serif,system-ui,sans-serif !important;
  letter-spacing:-.02em;
}

.auth-shell{
  background:rgba(255,255,255,.58) !important;
  border:1px solid rgba(255,255,255,.65) !important;
  box-shadow:var(--shadow-strong) !important;
  backdrop-filter:blur(20px) !important;
}

.auth-panel{
  background:linear-gradient(160deg,#102a63 0%,#23439B 48%,#4a73d5 100%) !important;
}

.auth-card,
.metric-card,
.card,
.panel,
.platform-card,
.territory-item,
.ranking-item,
.workflow-step,
.mini-card{
  box-shadow:var(--shadow) !important;
}

.auth-logo,
.brandlogo{
  background:linear-gradient(135deg,#23439B,#5677cb) !important;
  color:#fff !important;
  box-shadow:0 14px 28px rgba(35,67,155,.22) !important;
}

.auth-logo{
  border:none !important;
}

.auth-card{
  border-left:1px solid rgba(223,231,242,.7);
}

.btn{
  transition:all .18s ease !important;
}

.btn:hover,
.iconbtn:hover,
.navitem:hover{
  transform:translateY(-1px);
}

.btn-primary{
  background:linear-gradient(135deg,#23439B,#3158bf) !important;
  color:#fff !important;
  box-shadow:0 12px 28px rgba(35,67,155,.24) !important;
}

.btn-primary:hover{
  filter:brightness(.98);
}

.iconbtn{
  background:#fff !important;
  border:1px solid var(--line) !important;
  box-shadow:0 10px 22px rgba(18,46,104,.08) !important;
}

.navitem{
  transition:all .18s ease !important;
}

.navitem:hover,
.navitem.active{
  background:linear-gradient(135deg,#23439B,#3158bf) !important;
  color:#fff !important;
  box-shadow:0 12px 22px rgba(35,67,155,.18) !important;
}

.navgroup-toggle:hover{
  color:var(--text-strong);
}

.usermenu-trigger{
  box-shadow:0 10px 22px rgba(18,46,104,.08) !important;
}

.usermenu-dropdown{
  box-shadow:0 24px 48px rgba(20,40,90,.16) !important;
}

.table th{
  background:#f6f9ff !important;
}

.table tr:hover td{
  background:#f9fbff !important;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]),
select,
textarea{
  background:#fff !important;
}

input:focus:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]),
select:focus,
textarea:focus{
  border-color:#23439B !important;
  box-shadow:0 0 0 4px rgba(35,67,155,.12) !important;
}

/* UI STEP 2 */
.sidebar{
  background:rgba(255,255,255,.88) !important;
  backdrop-filter:blur(16px) !important;
  box-shadow:8px 0 30px rgba(15,35,80,.06) !important;
}

.brandbar{
  padding:26px 20px 18px !important;
  border-bottom:1px solid #e6edf7 !important;
  background:linear-gradient(180deg,rgba(248,251,255,.96),rgba(255,255,255,.92)) !important;
}

.brandname{
  font-family:Outfit,Inter,sans-serif !important;
  font-size:1.15rem !important;
  letter-spacing:-.02em !important;
}

.brandmini{
  font-size:.84rem !important;
  color:#7c8fad !important;
}

.role-chip{
  background:linear-gradient(135deg,#eef4ff,#dfeaff) !important;
  border:1px solid #d7e3fb !important;
  box-shadow:0 8px 18px rgba(35,67,155,.08) !important;
}

.sidenav{
  padding:20px 14px 18px !important;
}

.navsection-title{
  margin:18px 12px 10px !important;
  color:#8091ad !important;
  letter-spacing:.08em !important;
}

.navgroup-toggle{
  padding:4px 8px 0 !important;
}

.navitem{
  min-height:50px !important;
  border:1px solid transparent !important;
}

.navitem:hover{
  border-color:#dce7fb !important;
}

.navitem.active{
  border-color:rgba(255,255,255,.18) !important;
}

.main{
  padding:30px 32px 48px !important;
  background:
    radial-gradient(circle at top right, rgba(186,201,227,.16), transparent 22%),
    linear-gradient(180deg,#f6f9fd 0%,#f3f7fb 100%) !important;
}

.topbar{
  margin-bottom:30px !important;
  padding:0 2px !important;
}

.eyebrow{
  text-transform:uppercase !important;
  letter-spacing:.08em !important;
  font-size:.8rem !important;
}

.topbar h1{
  font-family:Outfit,Inter,sans-serif !important;
  font-size:2.45rem !important;
  color:#10264d !important;
}

.iconbtn{
  width:46px !important;
  height:46px !important;
  border-radius:16px !important;
}

.usermenu-trigger{
  min-height:58px !important;
  padding:8px 14px !important;
}

.card,.panel,.metric-card,.territory-item,.ranking-item,.mini-card,.workflow-step,.platform-card{
  border-color:#e3ebf5 !important;
  box-shadow:0 16px 38px rgba(18,46,104,.08) !important;
}

.table th{
  background:#f4f8ff !important;
}

.table-card,.card{
  overflow:hidden !important;
}

/* UI STEP 3 */
.stats-grid{
  gap:22px !important;
}

.metric-card{
  border-radius:28px !important;
  padding:30px !important;
  background:linear-gradient(180deg,#ffffff 0%,#fbfdff 100%) !important;
}

.metric-primary{
  background:linear-gradient(135deg,#102a63,#23439B) !important;
  box-shadow:0 22px 48px rgba(16,42,99,.24) !important;
}

.metric-label{
  font-size:.95rem !important;
  text-transform:uppercase !important;
  letter-spacing:.06em !important;
}

.metric-value{
  font-family:Outfit,Inter,sans-serif !important;
  font-size:3.2rem !important;
  letter-spacing:-.03em !important;
}

.metric-sub{
  margin-top:16px !important;
}

.card,
.table-card,
.panel{
  border-radius:28px !important;
}

.panel{
  padding:24px !important;
}

.panel-head,
.section-head,
.territory-head{
  margin-bottom:20px !important;
}

.section-head h2,
.panel-head h2,
.territory-head h2,
.card h2,
.card h3{
  font-family:Outfit,Inter,sans-serif !important;
  letter-spacing:-.02em !important;
  color:#10264d !important;
}

.table{
  border-collapse:separate !important;
  border-spacing:0 !important;
}

.table th{
  padding:18px 16px !important;
  font-size:.82rem !important;
  text-transform:uppercase !important;
  letter-spacing:.06em !important;
  border-bottom:1px solid #e4ecf7 !important;
}

.table td{
  padding:18px 16px !important;
  border-bottom:1px solid #edf2f8 !important;
}

.table tr:hover td{
  background:#f7fbff !important;
}

.table tr:last-child td{
  border-bottom:none !important;
}

.filter-strip{
  padding:18px !important;
  border:1px solid #e3ebf5 !important;
  border-radius:22px !important;
  background:linear-gradient(180deg,#fbfdff 0%,#f6faff 100%) !important;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]),
select,
textarea{
  min-height:50px !important;
}

.btn{
  min-height:46px !important;
}

.btn-sm{
  min-height:38px !important;
}

.territory-item,
.template-card,
.timeline-item,
.ranking-item,
.platform-card,
.mini-card,
.workflow-step{
  border-radius:20px !important;
  background:linear-gradient(180deg,#ffffff 0%,#fbfdff 100%) !important;
}

.territory-item:hover,
.template-card:hover,
.timeline-item:hover,
.ranking-item:hover,
.platform-card:hover,
.mini-card:hover{
  transform:translateY(-1px);
  box-shadow:0 18px 34px rgba(18,46,104,.10) !important;
}

.bartrack{
  height:14px !important;
}

.barfill{
  background:linear-gradient(90deg,#88a6f2,#23439B) !important;
}

.worldmap-stage,
.choropleth-map,
.worldmap-card,
.map-panel{
  border-radius:28px !important;
}

.mini-kpi,
.country-live-card{
  border-radius:20px !important;
  background:linear-gradient(180deg,#ffffff 0%,#fafdff 100%) !important;
}

/* KPI buttons */
.stats-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:18px;
  margin:22px 0 24px;
}
.kpi-card-btn{
  appearance:none;
  -webkit-appearance:none;
  border:1px solid #d9e3f3;
  background:#ffffff;
  border-radius:22px;
  padding:22px 20px;
  text-align:left;
  width:100%;
  display:flex;
  flex-direction:column;
  gap:8px;
  cursor:pointer;
  box-shadow:0 12px 30px rgba(35,67,155,.08);
  transition:transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.kpi-card-btn:hover{
  transform:translateY(-2px);
  box-shadow:0 16px 36px rgba(35,67,155,.14);
  border-color:#b9c9ec;
}
.kpi-card-btn:focus{
  outline:none;
  border-color:#23439B;
  box-shadow:0 0 0 3px rgba(35,67,155,.12), 0 16px 36px rgba(35,67,155,.14);
}
.kpi-card-btn .stat-label,
.kpi-card-btn .stat-value,
.kpi-card-btn .stat-sub{
  display:block;
}
.kpi-card-btn.featured{
  background:linear-gradient(180deg,#ffffff 0%,#f7faff 100%);
}

/* KPI FINAL FIX START */
.kpi-stats-grid{
  display:grid !important;
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  gap:18px !important;
  margin:24px 0 28px !important;
  align-items:stretch !important;
}
.kpi-card-btn{
  appearance:none !important;
  -webkit-appearance:none !important;
  width:100% !important;
  min-width:0 !important;
  min-height:132px !important;
  padding:22px 20px !important;
  border:1px solid #d9e3f3 !important;
  border-radius:24px !important;
  background:#fff !important;
  display:flex !important;
  flex-direction:column !important;
  justify-content:center !important;
  align-items:flex-start !important;
  gap:8px !important;
  text-align:left !important;
  cursor:pointer !important;
  box-shadow:0 8px 24px rgba(35,67,155,.06) !important;
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease !important;
}
.kpi-card-btn:hover{
  transform:translateY(-2px) !important;
  box-shadow:0 14px 30px rgba(35,67,155,.10) !important;
  border-color:#b8caec !important;
}
.kpi-card-btn:focus{
  outline:none !important;
  border-color:#23439B !important;
  box-shadow:0 0 0 3px rgba(35,67,155,.12), 0 14px 30px rgba(35,67,155,.10) !important;
}
.kpi-card-btn .stat-label{
  display:block !important;
  font-size:15px !important;
  line-height:1.2 !important;
}
.kpi-card-btn .stat-value{
  display:block !important;
  font-size:38px !important;
  line-height:1 !important;
  font-weight:800 !important;
}
.kpi-card-btn .stat-sub{
  display:block !important;
  font-size:14px !important;
  line-height:1.4 !important;
}
.kpi-card-btn.featured{
  background:linear-gradient(180deg,#ffffff 0%,#f7faff 100%) !important;
}
@media (max-width:1200px){
  .kpi-stats-grid{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
}
@media (max-width:700px){
  .kpi-stats-grid{
    grid-template-columns:1fr !important;
    gap:14px !important;
  }
  .kpi-card-btn{
    min-height:110px !important;
    padding:18px 16px !important;
    border-radius:18px !important;
  }
  .kpi-card-btn .stat-value{
    font-size:32px !important;
  }
}
/* KPI FINAL FIX END */
\n\n/* PHASE 1 UI START */
.scanner-page{gap:22px}
.scanner-hero{padding:28px}
.scanner-hero-head{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;flex-wrap:wrap}
.scanner-hero-copy{max-width:760px}
.scanner-hero-kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;min-width:min(100%,420px)}
.hero-kpi{border:1px solid #d9e3f3;border-radius:18px;padding:14px 16px;background:#fff}
.hero-kpi span{display:block;font-size:12px;color:#667085;margin-bottom:6px}
.hero-kpi strong{font-size:22px;line-height:1;color:#101828}
.scanner-tabs{display:flex;gap:10px;flex-wrap:wrap;margin-top:20px}
.scanner-tab{appearance:none;-webkit-appearance:none;border:1px solid #d9e3f3;background:#fff;border-radius:999px;padding:12px 18px;font-weight:700;cursor:pointer;transition:.18s ease}
.scanner-tab:hover{border-color:#b7c9f0;transform:translateY(-1px)}
.scanner-tab.is-active{background:#23439B;color:#fff;border-color:#23439B;box-shadow:0 10px 22px rgba(35,67,155,.18)}
.scanner-tab-panels{margin-top:20px}
.scanner-tab-panel{display:none}
.scanner-tab-panel.is-active{display:block}
.scanner-panel-grid{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(320px,.7fr);gap:18px}
.discovery-panel-grid{grid-template-columns:minmax(0,1.5fr) minmax(320px,.5fr)}
.scanner-work-card,.scanner-help-card{height:100%}
.compact-head{margin-bottom:16px}
.compact-strip{margin-top:10px}
.stacked-strip{display:grid;gap:10px}
.scanner-recent-item{align-items:center}
.discovery-job-list{display:grid;gap:14px}
.discovery-job-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px;align-items:start;border:1px solid #d9e3f3;border-radius:22px;padding:18px;background:#fff}
.discovery-job-topline{display:flex;justify-content:space-between;gap:14px;align-items:flex-start;flex-wrap:wrap;margin-bottom:12px}
.discovery-job-kpis{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:10px}
.job-chip{display:flex;align-items:center;gap:8px;border:1px solid #e2e8f5;border-radius:999px;padding:8px 12px;background:#f8fbff}
.job-chip span{font-size:12px;color:#667085}
.job-chip strong{font-size:13px;color:#101828}
.status-badge{display:inline-flex;align-items:center;justify-content:center;border-radius:999px;padding:7px 12px;font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.02em}
.status-queued,.status-running{background:#eff6ff;color:#175cd3}
.status-completed,.status-accepted{background:#ecfdf3;color:#027a48}
.status-failed,.status-rejected{background:#fef3f2;color:#b42318}
.status-archived,.status-cancelled{background:#f2f4f7;color:#475467}
.status-open{background:#fff7e6;color:#b54708}
.discovery-job-actions{justify-content:flex-end}
.discovery-status-strip{display:flex;gap:12px;flex-wrap:wrap;align-items:center;margin:18px 0 8px}
.phase1-detail-grid{align-items:start}
.discovery-candidate-table .status-badge{text-transform:none;letter-spacing:0}
@media (max-width: 1100px){
  .scanner-panel-grid,.discovery-panel-grid{grid-template-columns:1fr}
  .discovery-job-row{grid-template-columns:1fr}
  .scanner-hero-kpis{grid-template-columns:repeat(3,minmax(0,1fr));min-width:100%}
}
@media (max-width: 760px){
  .scanner-hero{padding:20px}
  .scanner-hero-kpis{grid-template-columns:1fr}
  .scanner-tabs{display:grid;grid-template-columns:1fr 1fr}
  .scanner-tab{width:100%;text-align:center}
  .discovery-job-kpis{display:grid;grid-template-columns:1fr 1fr}
}
@media (max-width: 560px){
  .scanner-tabs{grid-template-columns:1fr}
  .discovery-job-kpis{grid-template-columns:1fr}
}
/* PHASE 1 UI END */\n

/* PHASE 2 UI START */
.scanner-profile-toolbar{display:flex;justify-content:space-between;gap:14px;align-items:end;flex-wrap:wrap;margin-bottom:16px}
.scanner-profile-select-wrap{min-width:260px;display:flex;flex-direction:column;gap:6px}
.scanner-csv-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.discovery-toolbar,.discovery-candidate-toolbar{display:flex;justify-content:space-between;gap:14px;align-items:center;flex-wrap:wrap;margin-bottom:16px}
.discovery-toolbar input,.discovery-candidate-filters input[type="text"]{min-width:260px;max-width:420px;width:100%}
.discovery-status-filters{display:flex;gap:8px;flex-wrap:wrap}
.status-filter{appearance:none;-webkit-appearance:none;border:1px solid #d9e3f3;background:#fff;border-radius:999px;padding:9px 14px;font-weight:700;cursor:pointer}
.status-filter.is-active{background:#23439B;color:#fff;border-color:#23439B}
.discovery-bulk-toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.discovery-candidate-filters{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.discovery-candidate-table th:first-child,.discovery-candidate-table td:first-child{width:42px;text-align:center}
@media (max-width: 960px){
  .scanner-csv-grid{grid-template-columns:1fr}
  .discovery-toolbar,.discovery-candidate-toolbar,.scanner-profile-toolbar{align-items:stretch}
  .discovery-bulk-toolbar,.discovery-candidate-filters{width:100%}
}
@media (max-width: 640px){
  .discovery-status-filters{width:100%}
  .status-filter{flex:1 1 calc(50% - 8px);text-align:center}
  .discovery-toolbar input,.discovery-candidate-filters input[type="text"]{max-width:none}
}
/* PHASE 2 UI END */

/* PHASE 3 UI START */
.automation-note{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}
.auto-status-pill{display:inline-flex;align-items:center;justify-content:center;border-radius:999px;padding:7px 12px;font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.02em;margin-bottom:8px}
.auto-review{background:#fff7e6;color:#b54708}
.auto-qualified{background:#ecfdf3;color:#027a48}
.auto-outbound_ready{background:#eff6ff;color:#175cd3}
.candidate-badges{display:flex;gap:6px;flex-wrap:wrap}
.candidate-badge{display:inline-flex;align-items:center;border:1px solid #d9e3f3;border-radius:999px;padding:4px 8px;background:#fff;font-size:11px;font-weight:600;color:#344054}
.discovery-candidate-table td:nth-child(8),.discovery-candidate-table td:nth-child(9){min-width:160px}
@media (max-width: 960px){
  .candidate-badges{max-width:220px}
}
/* PHASE 3 UI END */

/* PHASE 3.1 POLISH START */
.status-badge{min-width:132px;text-align:center}
.discovery-job-topline .ranking-name{padding-right:8px}
.discovery-candidate-table td{vertical-align:top}
.discovery-candidate-table .inline-actions{gap:6px}
.auto-status-pill{min-width:128px;text-align:center}
@media (max-width:760px){
  .status-badge,.auto-status-pill{min-width:auto;width:100%}
}
/* PHASE 3.1 POLISH END */

/* PHASE 3.2 POLISH START */
.discovery-candidate-table td:nth-child(9){min-width:180px}
.discovery-candidate-table td:nth-child(10){min-width:150px}
.discovery-candidate-table .muted.small{line-height:1.35}
.auto-status-pill{white-space:nowrap}
@media (max-width:960px){
  .discovery-candidate-table td:nth-child(9),
  .discovery-candidate-table td:nth-child(10){min-width:auto}
}
/* PHASE 3.2 POLISH END */

/* PHASE 3.4 FINAL POLISH START */
.scanner-hero-copy{font-size:15px;line-height:1.55}
.scanner-hero-kpis .hero-kpi strong{font-size:24px}
.discovery-job-row{box-shadow:0 8px 24px rgba(16,24,40,.04)}
.discovery-job-row:hover{box-shadow:0 14px 30px rgba(16,24,40,.08);transform:translateY(-1px)}
.discovery-job-actions .btn,.inline-actions .btn{white-space:nowrap}
.discovery-candidate-toolbar,.discovery-toolbar{padding-top:4px}
.discovery-bulk-toolbar select{min-width:190px}
.table-wrap{overflow:auto}
@media (max-width:960px){
  .discovery-bulk-toolbar select{min-width:100%}
}
@media (max-width:640px){
  .scanner-hero-head{gap:14px}
  .hero-kpi{padding:12px 14px}
}
/* PHASE 3.4 FINAL POLISH END */

/* PHASE 3.5 UX FINISH START */
.scanner-hero-kpis{grid-template-columns:repeat(4,minmax(0,1fr))}
.hero-kpi{min-height:84px;display:flex;flex-direction:column;justify-content:center}
.muted.tiny{font-size:12px;line-height:1.35}
.bulk-selection-info{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:40px;
  padding:0 12px;
  border:1px solid #d9e3f3;
  border-radius:12px;
  background:#f8fbff;
  color:#344054;
  font-size:13px;
  font-weight:700;
}
.discovery-bulk-toolbar{
  align-items:center;
}
@media (max-width:1100px){
  .scanner-hero-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:640px){
  .scanner-hero-kpis{grid-template-columns:1fr}
  .bulk-selection-info{width:100%}
}
/* PHASE 3.5 UX FINISH END */

/* PHASE 3.6 FINISH START */
.discovery-job-row,
.hero-kpi,
.status-filter,
.scanner-tab,
.bulk-selection-info{
  transition:all .18s ease;
}
.discovery-job-row{
  border:1px solid #e6ebf5;
}
.discovery-job-row:hover{
  border-color:#cfdaf0;
}
.scanner-tab:focus,
.status-filter:focus{
  outline:none;
  box-shadow:0 0 0 3px rgba(35,67,155,.12);
}
.discovery-bulk-toolbar button,
.discovery-job-actions .btn,
.inline-actions .btn{
  min-height:38px;
}
.discovery-candidate-table th{
  white-space:nowrap;
}
@media (max-width:760px){
  .discovery-job-actions,
  .inline-actions.wrap-actions{
    width:100%;
  }
  .discovery-job-actions .btn,
  .inline-actions.wrap-actions .btn{
    flex:1 1 calc(50% - 6px);
    justify-content:center;
  }
}
/* PHASE 3.6 FINISH END */

/* CLEAN APP UI FIX START */

/* nur sichere Basis */
html, body { overflow-x: hidden; }
.main, .section, .card, .panel, .subcard, .table-wrap { min-width: 0; }
.scanner-page *, .discovery-job-page * { box-sizing: border-box; }
.scanner-page h1, .discovery-job-page h1 { font-size: clamp(36px, 3vw, 56px); line-height: 1.08; }
.scanner-page h2, .discovery-job-page h2 { font-size: clamp(24px, 2vw, 36px); line-height: 1.12; margin: 0; }
.scanner-page h3, .discovery-job-page h3 { font-size: clamp(18px, 1.4vw, 26px); line-height: 1.15; margin: 0; }
.scanner-page .muted, .discovery-job-page .muted,
.scanner-page .ranking-name, .discovery-job-page .ranking-name,
.scanner-page .small, .discovery-job-page .small,
.scanner-page .tiny, .discovery-job-page .tiny {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* einheitliche Radien */
.scanner-page .card, .scanner-page .panel, .scanner-page .subcard,
.discovery-job-page .card, .discovery-job-page .panel, .discovery-job-page .subcard,
.scanner-page .hero-kpi, .discovery-job-page .hero-kpi,
.scanner-page .workflow-step, .discovery-job-page .workflow-step,
.scanner-page .discovery-job-row, .discovery-job-page .discovery-job-row,
.discovery-job-page .discovery-profile-card, .discovery-job-page .discovery-bulk-card,
.scanner-page .scanner-work-card, .scanner-page .scanner-help-card,
.scanner-page .table-wrap, .discovery-job-page .table-wrap {
  border-radius: 22px !important;
}
.scanner-page input:not([type="checkbox"]):not([type="radio"]),
.scanner-page select,
.scanner-page textarea,
.discovery-job-page input:not([type="checkbox"]):not([type="radio"]),
.discovery-job-page select,
.discovery-job-page textarea {
  border-radius: 14px !important;
}

/* Checkbox/Radio in Lead-Suche & Discovery-Job: nicht wie große Textfelder stylen */
.scanner-page input[type="checkbox"],
.scanner-page input[type="radio"],
.discovery-job-page input[type="checkbox"],
.discovery-job-page input[type="radio"] {
  width: 1rem !important;
  height: 1rem !important;
  min-width: 1rem !important;
  min-height: 1rem !important;
  max-width: 1rem !important;
  max-height: 1rem !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  border-radius: 3px !important;
  box-shadow: none !important;
  vertical-align: middle !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
}
.scanner-page .btn, .discovery-job-page .btn,
.scanner-page .scanner-tab, .discovery-job-page .status-filter,
.discovery-job-page .status-badge, .discovery-job-page .auto-status-pill,
.discovery-job-page .candidate-badge, .discovery-job-page .job-chip,
.discovery-job-page .bulk-selection-info, .scanner-page .soft-chip {
  border-radius: 14px !important;
}

/* scanner layout */
.scanner-page .scanner-hero { padding: 18px; }
.scanner-page .scanner-hero-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  flex-wrap: wrap;
}
.scanner-page .scanner-hero-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  min-width: min(100%, 460px);
}
.scanner-page .hero-kpi {
  min-height: 84px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.scanner-page .scanner-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.scanner-page .scanner-tab {
  min-height: 44px;
  padding: 10px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.scanner-page .scanner-tab-panels { margin-top: 16px; }
.scanner-page .scanner-panel-grid,
.scanner-page .discovery-panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.55fr);
  gap: 16px;
  align-items: stretch;
}
.scanner-page .scanner-work-card,
.scanner-page .scanner-help-card {
  min-width: 0;
  padding: 18px;
  height: 100%;
}
.scanner-page .scanner-help-card .workflow-strip,
.scanner-page .scanner-help-card .compact-strip,
.scanner-page .scanner-help-card .stacked-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.scanner-page .scanner-help-card .workflow-step {
  flex: 1 1 140px;
  min-width: 140px;
  min-height: 96px;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}
.scanner-page .scanner-help-card .workflow-step strong {
  margin: 0 auto 10px auto;
}
.scanner-page .scanner-csv-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.scanner-page .discovery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.scanner-page .discovery-grid .span-2 { grid-column: span 2; }
.scanner-page .actions-row { display: flex; align-items: end; }
.scanner-page .actions-row .btn { width: 100%; }

/* discovery jobs liste */
.scanner-page .discovery-job-list { display: grid; gap: 14px; }
.scanner-page .discovery-job-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 18px;
}
.scanner-page .discovery-job-main { min-width: 0; }
.scanner-page .discovery-job-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.scanner-page .discovery-job-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.scanner-page .discovery-job-actions,
.discovery-job-page .inline-actions,
.discovery-job-page .inline-actions.wrap-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.scanner-page .discovery-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.scanner-page .discovery-status-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* discovery detail */
.discovery-job-page .discovery-hero {
  padding: 18px;
}
.discovery-job-page .discovery-hero-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}
.discovery-job-page .discovery-top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.discovery-job-page .discovery-status-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 14px 0;
}
.discovery-job-page .discovery-stat-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.discovery-job-page .discovery-stat-cards .stat-card {
  min-width: 0;
  padding: 14px 16px;
}
.discovery-job-page .phase1-detail-grid,
.discovery-job-page .discovery-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}
.discovery-job-page .discovery-profile-card,
.discovery-job-page .discovery-bulk-card {
  padding: 16px;
  min-width: 0;
  height: 100%;
}
.discovery-job-page .discovery-kv-list {
  display: grid;
  gap: 8px;
}
.discovery-job-page .discovery-kv-row {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}
.discovery-job-page .discovery-candidate-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.9fr);
  gap: 16px;
  align-items: start;
  margin-bottom: 14px;
}
.discovery-job-page .discovery-candidate-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.discovery-job-page .discovery-bulk-toolbar {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(170px, 1fr) minmax(170px, 1fr) auto;
  gap: 10px;
  align-items: start;
}
.discovery-job-page .bulk-selection-info {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 12px;
}
.discovery-job-page .table-wrap {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.discovery-job-page .data-table {
  width: 100%;
  table-layout: auto;
  border-collapse: separate;
  border-spacing: 0;
}
.discovery-job-page .data-table th,
.discovery-job-page .data-table td {
  white-space: normal;
  vertical-align: middle;
}
.discovery-job-page .discovery-candidate-table th:first-child,
.discovery-job-page .discovery-candidate-table td:first-child {
  text-align: center;
}
.discovery-job-page .debug-box,
.discovery-job-page details {
  max-width: 100%;
  overflow: hidden;
}
.discovery-job-page .debug-box .muted,
.discovery-job-page details .muted {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* responsive */
@media (max-width: 1440px) {
  .scanner-page .scanner-panel-grid,
  .scanner-page .discovery-panel-grid,
  .discovery-job-page .discovery-candidate-toolbar {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 1200px) {
  .scanner-page .scanner-hero-kpis,
  .discovery-job-page .discovery-stat-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .scanner-page .scanner-csv-grid,
  .scanner-page .discovery-grid,
  .discovery-job-page .phase1-detail-grid,
  .discovery-job-page .discovery-detail-grid {
    grid-template-columns: 1fr 1fr;
  }
  .scanner-page .discovery-grid .span-2 { grid-column: span 2; }
  .discovery-job-page .discovery-bulk-toolbar {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 900px) {
  .scanner-page .scanner-hero-kpis,
  .discovery-job-page .discovery-stat-cards,
  .scanner-page .scanner-csv-grid,
  .scanner-page .discovery-grid,
  .discovery-job-page .phase1-detail-grid,
  .discovery-job-page .discovery-detail-grid,
  .discovery-job-page .discovery-bulk-toolbar {
    grid-template-columns: 1fr;
  }
  .scanner-page .discovery-grid .span-2 { grid-column: span 1; }
  .scanner-page .discovery-job-row {
    grid-template-columns: 1fr;
  }
  .discovery-job-page .discovery-kv-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
@media (max-width: 640px) {
  .scanner-page .scanner-tabs,
  .scanner-page .discovery-status-filters {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .scanner-page .scanner-tab,
  .scanner-page .status-filter,
  .scanner-page .btn,
  .discovery-job-page .btn {
    width: 100%;
  }
  .scanner-page .scanner-help-card .workflow-step {
    flex: 1 1 100%;
    min-width: 100%;
  }
}

/* CLEAN APP UI FIX END */

/* Discovery Candidate Detail + Icon Actions */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.discovery-kv-list {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 8px 16px;
}

.discovery-kv-row {
  display: contents;
}

.discovery-kv-row .k,
.discovery-kv-row .v {
  min-width: 0;
  word-break: break-word;
}

.discovery-candidate-table th,
.discovery-candidate-table td {
  vertical-align: middle;
}

.discovery-candidate-table td:last-child {
  min-width: 220px;
}

.discovery-candidate-table .inline-actions.wrap-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.icon-btn {
  min-width: 44px;
  min-height: 36px;
  padding: 8px 10px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 12px !important;
}

.icon-btn .icon-only {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-btn .icon-only svg {
  width: 16px;
  height: 16px;
  display: block;
}

@media (max-width: 1450px) {
  .discovery-candidate-table th:nth-child(4),
  .discovery-candidate-table td:nth-child(4),
  .discovery-candidate-table th:nth-child(9),
  .discovery-candidate-table td:nth-child(9),
  .discovery-candidate-table th:nth-child(10),
  .discovery-candidate-table td:nth-child(10) {
    display: none;
  }
}

@media (max-width: 1180px) {
  .discovery-detail-grid,
  .phase1-detail-grid {
    grid-template-columns: 1fr !important;
  }

  .discovery-candidate-toolbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .discovery-candidate-filters,
  .discovery-bulk-toolbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .discovery-candidate-table thead {
    display: none;
  }

  .discovery-candidate-table,
  .discovery-candidate-table tbody,
  .discovery-candidate-table tr,
  .discovery-candidate-table td {
    display: block;
    width: 100%;
  }

  .discovery-candidate-table tr {
    background: #fff;
    border: 1px solid #dbe4f3;
    border-radius: 18px;
    padding: 14px;
    margin-bottom: 14px;
  }

  .discovery-candidate-table td {
    padding: 6px 0 !important;
    border: 0 !important;
    min-width: 0;
  }

  .discovery-candidate-table td:last-child {
    min-width: 0;
  }
}

/* === DISCOVERY FULL FIX START === */
.discovery-job-page .discovery-detail-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(320px,1fr);
  gap:20px;
  align-items:start;
}

.discovery-profile-card,
.discovery-bulk-card,
.discovery-kv-list,
.discovery-kv-row{
  min-width:0;
}

.discovery-kv-list{
  display:grid;
  gap:12px;
}

.discovery-kv-row{
  display:grid;
  grid-template-columns:140px minmax(0,1fr);
  gap:12px;
  align-items:start;
}

.discovery-kv-row,
.discovery-kv-row *{
  writing-mode:horizontal-tb !important;
  text-orientation:mixed !important;
  white-space:normal;
  word-break:break-word;
  overflow-wrap:anywhere;
}

.discovery-kv-row .k{
  color:#64748b;
  font-size:14px;
  line-height:1.35;
}

.discovery-kv-row .v{
  color:#172b4d;
  font-size:14px;
  line-height:1.35;
  min-width:0;
}

.discovery-bulk-form{
  gap:12px;
}

.discovery-candidate-toolbar{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:16px;
  align-items:start;
  margin:10px 0 18px;
}

.discovery-candidate-filters{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  align-items:center;
}

.discovery-candidate-filters input[type="text"]{
  flex:1 1 320px;
  min-width:280px;
}

.discovery-bulk-toolbar{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
  justify-content:flex-end;
}

.bulk-selection-info{
  min-width:180px;
  padding:12px 14px;
  border:1px solid #dbe4f0;
  border-radius:12px;
  background:#f8fbff;
  color:#334155;
  font-size:13px;
  font-weight:600;
  text-align:center;
}

.discovery-candidate-table{
  min-width:1240px;
  width:100%;
}

.discovery-candidate-table th{
  padding:12px 8px;
  font-size:13px;
  white-space:nowrap;
  vertical-align:middle;
}

.discovery-candidate-table td{
  padding:10px 8px;
  font-size:14px;
  vertical-align:middle;
}

.discovery-candidate-table td,
.discovery-candidate-table th{
  border-top:1px solid #eef3fa;
}

.discovery-candidate-table tbody tr:first-child td{
  border-top:none;
}

.discovery-candidate-table .candidate-check-col{
  width:48px;
  min-width:48px;
  text-align:center;
}

.discovery-candidate-table input[type="checkbox"]{
  width:17px !important;
  height:17px !important;
  min-width:17px !important;
  min-height:17px !important;
  max-width:17px !important;
  max-height:17px !important;
  margin:0 !important;
  padding:0 !important;
  border:none !important;
  box-shadow:none !important;
  accent-color:#2343a9;
  cursor:pointer;
  vertical-align:middle;
}

.shop-name{
  font-size:14px;
  font-weight:700;
  line-height:1.2;
}

.shop-domain{
  font-size:12px;
  color:#64748b;
  line-height:1.25;
  margin-top:2px;
}

.detail-line{
  color:#64748b;
  font-size:13px;
  line-height:1.3;
}

.score{
  font-size:14px;
  font-weight:700;
  line-height:1.15;
}

.auto-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:72px;
  padding:4px 10px;
  border-radius:999px;
  background:#eef4ff;
  color:#1e3a8a;
  font-size:12px;
  font-weight:700;
  letter-spacing:.02em;
}

.status-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:104px;
  padding:6px 12px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  line-height:1;
  text-transform:lowercase;
}

.status-pill.status-open{
  background:#fff7ed;
  color:#b45309;
}

.status-pill.status-accepted{
  background:#dcfce7;
  color:#15803d;
}

.status-pill.status-rejected,
.status-pill.status-archived{
  background:#fee2e2;
  color:#b91c1c;
}

.action-icon-group{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:8px;
  min-width:210px;
}

.icon-btn{
  width:40px;
  height:40px;
  min-width:40px;
  min-height:40px;
  padding:0 !important;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:12px;
}

.icon-btn svg{
  width:17px;
  height:17px;
}

.discovery-job-page .btn.btn-small{
  font-size:13px;
}

.discovery-job-page .btn{
  min-height:40px;
}

.discovery-job-page .panel-head h2,
.discovery-job-page .panel-head h3{
  font-size:18px;
}

.discovery-job-page .muted.small{
  font-size:13px;
  line-height:1.4;
}

.discovery-job-page .table-wrap{
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}

.discovery-candidate-page .btn,
.discovery-candidate-detail .btn,
.discovery-candidate-page .inline-actions .btn{
  min-height:42px;
  font-size:14px;
}

.discovery-candidate-page .inline-actions,
.discovery-candidate-detail .inline-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

@media (max-width: 1380px){
  .discovery-candidate-toolbar{
    grid-template-columns:1fr;
  }

  .discovery-bulk-toolbar{
    justify-content:flex-start;
  }
}

@media (max-width: 1120px){
  .discovery-job-page .discovery-detail-grid{
    grid-template-columns:1fr;
  }

  .discovery-kv-row{
    grid-template-columns:130px minmax(0,1fr);
  }
}

@media (max-width: 920px){
  .discovery-candidate-filters,
  .discovery-bulk-toolbar{
    width:100%;
  }

  .discovery-candidate-filters input[type="text"],
  .discovery-bulk-toolbar select,
  .discovery-bulk-toolbar .bulk-selection-info,
  .discovery-bulk-toolbar button{
    width:100%;
    min-width:0;
  }
}

@media (max-width: 720px){
  .discovery-kv-row{
    grid-template-columns:1fr;
    gap:6px;
  }

  .discovery-candidate-table{
    min-width:980px;
  }

  .action-icon-group{
    min-width:unset;
  }

  .icon-btn{
    width:38px;
    height:38px;
    min-width:38px;
    min-height:38px;
  }

  .discovery-job-page .panel-head h2,
  .discovery-job-page .panel-head h3{
    font-size:16px;
  }

  .discovery-job-page .muted.small,
  .detail-line,
  .shop-domain{
    font-size:12px;
  }
}
/* === DISCOVERY FULL FIX END === */

/* === DISCOVERY PROFILE LAYOUT HARD FIX START === */

/* Suchprofil + Bulk Cards */
.discovery-job-page .phase1-detail-grid,
.discovery-job-page .discovery-detail-grid.phase1-detail-grid{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr) !important;
  gap:16px !important;
  align-items:start !important;
}

.discovery-job-page .discovery-profile-card,
.discovery-job-page .discovery-bulk-card{
  min-width:0 !important;
  width:100% !important;
  overflow:hidden !important;
}

/* Linke Profil-Liste */
.discovery-job-page .discovery-profile-card .discovery-kv-list{
  display:grid !important;
  grid-template-columns:repeat(2, minmax(280px,1fr)) !important;
  gap:14px 24px !important;
  align-items:start !important;
  width:100% !important;
  min-width:0 !important;
}

/* Jede Zeile = Label links, Wert rechts */
.discovery-job-page .discovery-profile-card .discovery-kv-row{
  display:grid !important;
  grid-template-columns:140px minmax(0,1fr) !important;
  column-gap:12px !important;
  row-gap:4px !important;
  align-items:start !important;
  width:100% !important;
  min-width:0 !important;
  max-width:100% !important;

  writing-mode:horizontal-tb !important;
  text-orientation:mixed !important;
  transform:none !important;
  rotate:none !important;
  white-space:normal !important;
  word-break:normal !important;
  overflow-wrap:normal !important;
}

.discovery-job-page .discovery-profile-card .discovery-kv-row > .k,
.discovery-job-page .discovery-profile-card .discovery-kv-row > .v{
  display:block !important;
  min-width:0 !important;
  max-width:100% !important;
  width:auto !important;

  writing-mode:horizontal-tb !important;
  text-orientation:mixed !important;
  transform:none !important;
  rotate:none !important;
  letter-spacing:normal !important;
  white-space:normal !important;
  word-break:normal !important;
  overflow-wrap:break-word !important;
  hyphens:auto !important;
}

.discovery-job-page .discovery-profile-card .discovery-kv-row > .k{
  font-size:14px !important;
  line-height:1.35 !important;
  font-weight:600 !important;
  color:#6b7a99 !important;
}

.discovery-job-page .discovery-profile-card .discovery-kv-row > .v{
  font-size:15px !important;
  line-height:1.4 !important;
  font-weight:700 !important;
  color:#132b63 !important;
  text-align:left !important;
}

/* Bulk Card stabil */
.discovery-job-page .discovery-bulk-form{
  display:grid !important;
  gap:14px !important;
  min-width:0 !important;
}

.discovery-job-page .discovery-bulk-card .account-field{
  min-width:0 !important;
}

.discovery-job-page .discovery-bulk-card select,
.discovery-job-page .discovery-bulk-card .btn{
  width:100% !important;
  min-width:0 !important;
}

/* Candidate Toolbar responsive */
.discovery-job-page .discovery-candidate-toolbar{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto !important;
  gap:16px !important;
  align-items:start !important;
}

.discovery-job-page .discovery-candidate-filters,
.discovery-job-page .discovery-bulk-toolbar{
  min-width:0 !important;
}

.discovery-job-page .discovery-bulk-toolbar{
  display:flex !important;
  flex-wrap:wrap !important;
  gap:10px !important;
  align-items:center !important;
  justify-content:flex-end !important;
}

.discovery-job-page .discovery-bulk-toolbar > *{
  min-width:0 !important;
}

/* Kandidatenliste Actions */
.discovery-job-page .discovery-candidate-table td:last-child,
.discovery-job-page .discovery-candidate-table th:last-child{
  width:1% !important;
  white-space:nowrap !important;
}

.discovery-job-page .inline-actions.wrap-actions{
  display:flex !important;
  flex-wrap:wrap !important;
  gap:8px !important;
  align-items:center !important;
}

.discovery-job-page .icon-btn{
  width:40px !important;
  height:40px !important;
  min-width:40px !important;
  padding:0 !important;
  border-radius:12px !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
}

.discovery-job-page .icon-btn svg{
  width:16px !important;
  height:16px !important;
  display:block !important;
}

/* Status Pills */
.discovery-job-page .status-pill,
.discovery-job-page .auto-status-pill{
  min-width:106px !important;
  justify-content:center !important;
  text-align:center !important;
  white-space:nowrap !important;
}

/* Responsive */
@media (max-width: 1280px){
  .discovery-job-page .discovery-profile-card .discovery-kv-list{
    grid-template-columns:1fr !important;
  }

  .discovery-job-page .discovery-candidate-toolbar{
    grid-template-columns:1fr !important;
  }

  .discovery-job-page .discovery-bulk-toolbar{
    justify-content:flex-start !important;
  }
}

@media (max-width: 920px){
  .discovery-job-page .phase1-detail-grid,
  .discovery-job-page .discovery-detail-grid.phase1-detail-grid{
    grid-template-columns:1fr !important;
  }

  .discovery-job-page .discovery-profile-card .discovery-kv-row{
    grid-template-columns:1fr !important;
    gap:4px !important;
  }

  .discovery-job-page .discovery-profile-card .discovery-kv-row > .k{
    font-size:13px !important;
  }

  .discovery-job-page .discovery-profile-card .discovery-kv-row > .v{
    font-size:14px !important;
  }
}

/* Harte Kill-Switches gegen alte kaputte Discovery-Regeln */
.discovery-job-page .discovery-profile-card .discovery-kv-row,
.discovery-job-page .discovery-profile-card .discovery-kv-row *,
.discovery-job-page .discovery-profile-card .discovery-kv-list,
.discovery-job-page .discovery-profile-card .discovery-kv-list *{
  writing-mode:horizontal-tb !important;
  text-orientation:mixed !important;
}

/* === DISCOVERY PROFILE LAYOUT HARD FIX END === */

/* === DATA TABLES (shared; avoid global nth-child widths — tables differ by page) === */

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table td {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.data-table td:last-child {
  white-space: nowrap;
}

.data-table input[type="checkbox"] {
  width: 17px !important;
  height: 17px !important;
  min-width: 17px !important;
  min-height: 17px !important;
  max-width: 17px !important;
  max-height: 17px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  box-shadow: none !important;
  accent-color: #2343a9;
  cursor: pointer;
  vertical-align: middle;
  flex-shrink: 0;
}

.table-row-actions {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
}

.table-row-actions form {
  margin: 0;
  display: inline-flex;
}

/* Leads list: checkbox + 7 data columns */
.leads-page .table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  border-radius: 12px;
  border: 1px solid #eef2f7;
  background: #fff;
}

.leads-page .data-table {
  table-layout: fixed;
  min-width: 680px;
}

.leads-page .data-table th,
.leads-page .data-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #eef2f7;
  text-align: left;
  vertical-align: middle;
}

.leads-page .data-table thead th {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  background: #f8fafc;
}

.leads-page .data-table col.leads-col-check {
  width: 48px;
}

.leads-page .data-table th:nth-child(1),
.leads-page .data-table td:nth-child(1) {
  width: 48px;
  min-width: 48px;
  max-width: 48px;
  text-align: center;
  box-sizing: border-box;
}

.leads-page .data-table th:nth-child(2),
.leads-page .data-table td:nth-child(2) {
  width: 64px;
}

.leads-page .data-table th:nth-child(3) {
  width: 18%;
  min-width: 110px;
}

.leads-page .data-table th:nth-child(4) {
  width: 18%;
  min-width: 110px;
}

.leads-page .data-table th:nth-child(5) {
  width: 10%;
  min-width: 72px;
}

.leads-page .data-table th:nth-child(6) {
  width: 10%;
  min-width: 72px;
}

.leads-page .data-table th:nth-child(7) {
  width: 17%;
  min-width: 130px;
}

.leads-page .data-table th:nth-child(8),
.leads-page .data-table td:nth-child(8) {
  width: 148px;
  min-width: 148px;
}

/* Tabellen-Cards: kein overflow:hidden — sonst wirkt Header/Body oft „versetzt“ beim Scrollen */
.card.panel.panel-has-table {
  overflow: visible;
}

/* Domain Suche: feste Spalten = Header/Zellen bleiben synchron; schmal scrollen auf kleinen Viewports */
.scanner-page .table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  border-radius: 12px;
  border: 1px solid #eef2f7;
  background: #fff;
}

.scanner-page .data-table {
  table-layout: fixed !important;
  width: 100%;
  min-width: 720px;
  border-collapse: collapse !important;
}

.scanner-page .data-table th,
.scanner-page .data-table td {
  padding: 10px 10px;
  border-bottom: 1px solid #eef2f7;
  text-align: left;
  vertical-align: middle;
}

.scanner-page .data-table thead th {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  background: #f8fafc;
}

/* Letzte Suchen — 6 Spalten */
.scanner-page .scanner-jobs-table th:nth-child(1),
.scanner-page .scanner-jobs-table td:nth-child(1) {
  width: 52px;
  white-space: nowrap;
}

.scanner-page .scanner-jobs-table th:nth-child(2),
.scanner-page .scanner-jobs-table td:nth-child(2) {
  width: 11%;
}

.scanner-page .scanner-jobs-table th:nth-child(3),
.scanner-page .scanner-jobs-table td:nth-child(3) {
  width: 13%;
}

.scanner-page .scanner-jobs-table th:nth-child(4),
.scanner-page .scanner-jobs-table td:nth-child(4) {
  width: 11%;
}

.scanner-page .scanner-jobs-table th:nth-child(5),
.scanner-page .scanner-jobs-table td:nth-child(5) {
  width: 32%;
}

.scanner-page .scanner-jobs-table th:nth-child(6),
.scanner-page .scanner-jobs-table td:nth-child(6) {
  width: 148px;
}

/* Gefundene Shops (Scanner) — 7 Spalten */
.scanner-page .scanner-candidates-table col.scanner-col-check {
  width: 40px;
}

.scanner-page .scanner-candidates-table th:nth-child(1),
.scanner-page .scanner-candidates-table td:nth-child(1) {
  width: 40px;
  min-width: 40px;
  max-width: 44px;
  text-align: center;
  box-sizing: border-box;
}

.scanner-page .scanner-candidates-table th:nth-child(2),
.scanner-page .scanner-candidates-table td:nth-child(2) {
  width: 22%;
}

.scanner-page .scanner-candidates-table th:nth-child(3),
.scanner-page .scanner-candidates-table td:nth-child(3) {
  width: 11%;
}

.scanner-page .scanner-candidates-table th:nth-child(4),
.scanner-page .scanner-candidates-table td:nth-child(4) {
  width: 9%;
}

.scanner-page .scanner-candidates-table th:nth-child(5),
.scanner-page .scanner-candidates-table td:nth-child(5) {
  width: 11%;
}

.scanner-page .scanner-candidates-table th:nth-child(6),
.scanner-page .scanner-candidates-table td:nth-child(6) {
  width: 9%;
}

.scanner-page .scanner-candidates-table th:nth-child(7),
.scanner-page .scanner-candidates-table td:nth-child(7) {
  width: 156px;
  white-space: nowrap;
}

.scanner-page .data-table th:last-child,
.scanner-page .data-table td:last-child {
  white-space: nowrap;
}

/* Discovery Candidate Detail — eine Aktionszeile (inkl. Löschen), umbrechend */
.discovery-candidate-page .discovery-candidate-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #eef2f7;
}

.discovery-candidate-page .discovery-candidate-delete-form {
  display: inline-flex;
  margin: 0;
}

.discovery-candidate-page .workspace-admin-grid .span-3 {
  grid-column: 1 / -1;
}

@media (min-width: 1101px) {
  .discovery-candidate-page .workspace-admin-grid .span-3 {
    grid-column: span 3;
  }
}

/* =========================================================
   LEADS 2.0 ENTERPRISE LAYOUT
   ========================================================= */

:root{
  --l20-bg:#f5f8ff;
  --l20-card:#ffffff;
  --l20-border:#dbe4f2;
  --l20-text:#15305f;
  --l20-muted:#6f86ad;
  --l20-primary:#2647b8;
  --l20-primary-2:#3156cf;
  --l20-danger:#c92b1b;
  --l20-chip:#eef3ff;
  --l20-shadow:0 10px 24px rgba(38,71,184,.10);
  --l20-radius:18px;
  --l20-radius-sm:12px;
  --l20-font:13px;
  --l20-font-sm:12px;
  --l20-font-xs:11px;
  --l20-row-h:72px;
  --l20-sticky-top:84px;
}

.leads20-page,
.leads20-page *{
  box-sizing:border-box;
}

.leads20-page{
  width:100%;
  min-width:0;
}

.leads20-toolbar{
  position:sticky;
  top:16px;
  z-index:25;
  display:grid;
  grid-template-columns:minmax(220px,1.3fr) minmax(180px,.9fr) minmax(160px,.8fr) auto;
  gap:12px;
  align-items:center;
  margin:10px 0 14px;
  padding:12px;
  background:rgba(255,255,255,.78);
  backdrop-filter:blur(10px);
  border:1px solid var(--l20-border);
  border-radius:20px;
  box-shadow:var(--l20-shadow);
}

.leads20-toolbar .field,
.leads20-toolbar .select,
.leads20-toolbar .button{
  min-width:0;
}

.leads20-toolbar input,
.leads20-toolbar select{
  width:100%;
  height:44px;
  padding:0 14px;
  border:1px solid #cfd9ec;
  border-radius:14px;
  background:#fff;
  color:var(--l20-text);
  font-size:14px;
  outline:none;
}

.leads20-toolbar .button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  height:44px;
  padding:0 16px;
  border:0;
  border-radius:14px;
  background:linear-gradient(180deg,var(--l20-primary-2),var(--l20-primary));
  color:#fff;
  font-weight:700;
  font-size:14px;
  box-shadow:0 10px 20px rgba(38,71,184,.18);
  cursor:pointer;
}

.leads20-stats{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:0 0 14px;
}

.leads20-chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:34px;
  padding:8px 12px;
  border:1px solid var(--l20-border);
  border-radius:999px;
  background:#fff;
  color:var(--l20-text);
  font-size:12px;
  font-weight:700;
  cursor:pointer;
  user-select:none;
}

.leads20-chip.is-active{
  background:var(--l20-primary);
  color:#fff;
  border-color:var(--l20-primary);
  box-shadow:0 8px 18px rgba(38,71,184,.18);
}

.leads20-bulkbar{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
  justify-content:space-between;
  margin:0 0 12px;
  padding:10px 12px;
  border:1px solid var(--l20-border);
  border-radius:16px;
  background:#fff;
}

.leads20-bulkbar-left,
.leads20-bulkbar-right{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
}

.leads20-bulk-count{
  min-width:140px;
  padding:9px 12px;
  border:1px solid var(--l20-border);
  border-radius:12px;
  background:#f8fbff;
  color:var(--l20-text);
  font-size:12px;
  font-weight:700;
  text-align:center;
}

.leads20-bulkbar select{
  height:40px;
  min-width:170px;
  padding:0 12px;
  border:1px solid #cfd9ec;
  border-radius:12px;
  background:#fff;
  color:var(--l20-text);
  font-size:13px;
}

.leads20-bulkbar .run{
  height:40px;
  padding:0 16px;
  border:0;
  border-radius:12px;
  background:linear-gradient(180deg,var(--l20-primary-2),var(--l20-primary));
  color:#fff;
  font-size:13px;
  font-weight:700;
  cursor:pointer;
}

.leads20-table-wrap{
  width:100%;
  min-width:0;
  overflow:auto;
  border:1px solid var(--l20-border);
  border-radius:20px;
  background:#fff;
  box-shadow:var(--l20-shadow);
}

.leads20-table{
  width:100%;
  min-width:1200px;
  table-layout:fixed;
  border-collapse:separate;
  border-spacing:0;
  background:#fff;
}

.leads20-table thead th{
  position:sticky;
  top:0;
  z-index:10;
  padding:14px 12px;
  background:#f6f9ff;
  border-bottom:1px solid var(--l20-border);
  color:var(--l20-text);
  font-size:11px;
  line-height:1.2;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.02em;
  white-space:normal;
}

.leads20-table th,
.leads20-table td{
  min-width:0;
  vertical-align:middle;
  overflow:hidden;
}

.leads20-table tbody td{
  padding:12px;
  height:var(--l20-row-h);
  border-bottom:1px solid #edf2fb;
  color:var(--l20-text);
  font-size:13px;
  line-height:1.35;
  word-break:break-word;
  overflow-wrap:anywhere;
}

.leads20-table tbody tr{
  transition:background .15s ease;
}

.leads20-table tbody tr:hover{
  background:#f9fbff;
}

.leads20-table tbody tr.is-selected{
  background:#eef4ff;
}

.leads20-table .is-hidden-col{
  display:none !important;
}

.leads20-table .cell-company strong,
.leads20-table .cell-domain strong{
  display:block;
  font-size:13px;
  line-height:1.25;
  font-weight:800;
  color:var(--l20-text);
}

.leads20-table .cell-company .sub,
.leads20-table .cell-domain .sub,
.leads20-table .cell-owner .sub{
  display:block;
  margin-top:2px;
  color:var(--l20-muted);
  font-size:12px;
  line-height:1.25;
}

.leads20-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:58px;
  padding:5px 10px;
  border-radius:999px;
  font-size:11px;
  font-weight:800;
  line-height:1;
  white-space:nowrap;
}

.leads20-badge.status-new,
.leads20-badge.status-open{
  background:#f6ecd8;
  color:#b45a00;
}

.leads20-badge.status-qualified,
.leads20-badge.status-contacted{
  background:#e9f1ff;
  color:#2b5bd7;
}

.leads20-badge.status-won,
.leads20-badge.status-accepted{
  background:#dff5e7;
  color:#0a8a54;
}

.leads20-badge.status-lost,
.leads20-badge.status-rejected,
.leads20-badge.status-archived{
  background:#fde8e5;
  color:#b53728;
}

.leads20-score-dot{
  display:inline-flex;
  width:10px;
  height:10px;
  border-radius:999px;
  background:#9ec9c7;
  margin-right:8px;
  flex:0 0 auto;
}

.leads20-check,
.leads20-check-head{
  width:20px;
  height:20px;
  accent-color:var(--l20-primary);
  cursor:pointer;
}

.leads20-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
  justify-content:flex-end;
}

.leads20-iconbtn{
  width:38px;
  height:38px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid var(--l20-border);
  border-radius:12px;
  background:#f6f9ff;
  color:var(--l20-primary);
  text-decoration:none;
  cursor:pointer;
  box-shadow:none;
  transition:transform .12s ease, box-shadow .12s ease, background .12s ease;
}

.leads20-iconbtn:hover{
  transform:translateY(-1px);
  box-shadow:0 8px 18px rgba(38,71,184,.12);
  background:#fff;
}

.leads20-iconbtn.danger{
  background:var(--l20-danger);
  color:#fff;
  border-color:var(--l20-danger);
}

.leads20-iconbtn.primary{
  background:var(--l20-primary);
  color:#fff;
  border-color:var(--l20-primary);
}

.leads20-iconbtn svg{
  width:16px;
  height:16px;
  stroke:currentColor;
  fill:none;
  stroke-width:1.9;
  stroke-linecap:round;
  stroke-linejoin:round;
  pointer-events:none;
}

.leads20-col-resizer{
  position:absolute;
  top:0;
  right:-3px;
  width:8px;
  height:100%;
  cursor:col-resize;
  user-select:none;
}

.leads20-drawer{
  position:fixed;
  top:0;
  right:0;
  width:min(560px, 96vw);
  height:100dvh;
  background:#fff;
  border-left:1px solid var(--l20-border);
  box-shadow:-20px 0 50px rgba(16,36,82,.16);
  z-index:120;
  transform:translateX(100%);
  transition:transform .22s ease;
  display:flex;
  flex-direction:column;
}

.leads20-drawer.is-open{
  transform:translateX(0);
}

.leads20-drawer-backdrop{
  position:fixed;
  inset:0;
  background:rgba(11,24,54,.28);
  z-index:110;
  opacity:0;
  pointer-events:none;
  transition:opacity .2s ease;
}

.leads20-drawer-backdrop.is-open{
  opacity:1;
  pointer-events:auto;
}

.leads20-drawer-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding:18px 18px 14px;
  border-bottom:1px solid var(--l20-border);
}

.leads20-drawer-title{
  margin:0;
  color:var(--l20-text);
  font-size:22px;
  line-height:1.2;
  font-weight:900;
}

.leads20-drawer-sub{
  margin-top:4px;
  color:var(--l20-muted);
  font-size:13px;
}

.leads20-drawer-close{
  width:40px;
  height:40px;
  border:1px solid var(--l20-border);
  border-radius:12px;
  background:#fff;
  cursor:pointer;
  color:var(--l20-text);
}

.leads20-drawer-body{
  padding:16px 18px 18px;
  overflow:auto;
  min-height:0;
  display:grid;
  gap:14px;
}

.leads20-drawer-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}

.leads20-card{
  padding:14px;
  border:1px solid var(--l20-border);
  border-radius:16px;
  background:#fbfdff;
}

.leads20-card h4{
  margin:0 0 10px;
  font-size:13px;
  line-height:1.2;
  color:var(--l20-text);
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.02em;
}

.leads20-kv{
  display:grid;
  grid-template-columns:120px 1fr;
  gap:8px 10px;
}

.leads20-kv .k{
  color:var(--l20-muted);
  font-size:12px;
  font-weight:700;
}

.leads20-kv .v{
  color:var(--l20-text);
  font-size:13px;
  font-weight:700;
  word-break:break-word;
}

.leads20-inline-form{
  display:grid;
  gap:10px;
}

.leads20-inline-form label{
  display:grid;
  gap:6px;
  font-size:12px;
  font-weight:800;
  color:var(--l20-text);
}

.leads20-inline-form input,
.leads20-inline-form select,
.leads20-inline-form textarea{
  width:100%;
  min-width:0;
  border:1px solid #cfd9ec;
  border-radius:12px;
  background:#fff;
  color:var(--l20-text);
  font-size:13px;
  padding:10px 12px;
  outline:none;
}

.leads20-inline-form .row2{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}

.leads20-inline-form .actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  justify-content:flex-end;
}

.leads20-inline-form .save{
  height:40px;
  padding:0 16px;
  border:0;
  border-radius:12px;
  background:linear-gradient(180deg,var(--l20-primary-2),var(--l20-primary));
  color:#fff;
  font-size:13px;
  font-weight:800;
  cursor:pointer;
}

.leads20-inline-form .ghost{
  height:40px;
  padding:0 14px;
  border:1px solid var(--l20-border);
  border-radius:12px;
  background:#fff;
  color:var(--l20-text);
  font-size:13px;
  font-weight:700;
  cursor:pointer;
}

.leads20-empty{
  padding:22px;
  color:var(--l20-muted);
  font-size:13px;
  text-align:center;
}

.leads20-table th[data-col-key="score"],
.leads20-table td[data-col-key="score"]{
  display:none !important;
}

.leads20-table th[data-col-key="id"]{width:48px}
.leads20-table th[data-col-key="company"]{width:22%}
.leads20-table th[data-col-key="domain"]{width:15%}
.leads20-table th[data-col-key="country"]{width:10%}
.leads20-table th[data-col-key="platform"]{width:10%}
.leads20-table th[data-col-key="email"]{width:16%}
.leads20-table th[data-col-key="status"]{width:10%}
.leads20-table th[data-col-key="owner"]{width:10%}
.leads20-table th[data-col-key="action"]{width:160px}

@media (max-width: 1400px){
  .leads20-toolbar{
    grid-template-columns:1fr 1fr;
  }
}

@media (max-width: 980px){
  .leads20-toolbar{
    grid-template-columns:1fr;
    top:10px;
  }

  .leads20-bulkbar{
    flex-direction:column;
    align-items:stretch;
  }

  .leads20-bulkbar-left,
  .leads20-bulkbar-right{
    width:100%;
  }

  .leads20-bulkbar select,
  .leads20-bulkbar .run,
  .leads20-bulk-count{
    width:100%;
  }

  .leads20-drawer-grid,
  .leads20-inline-form .row2{
    grid-template-columns:1fr;
  }
}

@media (max-width: 760px){
  .leads20-page .panel,
  .leads20-page .card{
    border-radius:16px;
  }

  .leads20-table{
    min-width:980px;
  }
}
/* ========================================================= */

/* LEADS20_UX_PATCH */
.leads20-page{
  gap:18px;
}

.leads20-filter-strip{
  display:grid;
  grid-template-columns:minmax(220px,1.2fr) minmax(180px,.8fr) minmax(160px,.8fr) auto;
  gap:14px;
  align-items:center;
  padding:14px 16px;
  border-radius:20px;
}

.leads20-filter-strip input,
.leads20-filter-strip select{
  min-height:48px;
  border-radius:14px;
}

.leads20-filter-strip .btn{
  min-height:48px;
  padding:0 18px;
  border-radius:14px;
  font-size:14px;
  font-weight:700;
}

.leads20-table-card{
  padding:0;
  overflow:hidden;
  border-radius:22px;
}

.leads20-table-wrap{
  overflow:auto;
  border-radius:22px;
}

.leads20-table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  table-layout:fixed;
  min-width:1100px;
}

.leads20-table thead th{
  position:sticky;
  top:0;
  z-index:2;
  background:#f4f8ff;
  color:var(--primary);
  font-size:12px;
  line-height:1.2;
  letter-spacing:.04em;
  text-transform:uppercase;
  font-weight:800;
  padding:14px 14px;
  border-bottom:1px solid #dfe8f7;
  white-space:nowrap;
}

.leads20-table tbody td{
  padding:14px 14px;
  font-size:14px;
  line-height:1.35;
  vertical-align:top;
  border-bottom:1px solid #e8eef8;
  color:var(--text);
  word-break:break-word;
}

.leads20-table tbody tr:hover{
  background:#fafcff;
}

.leads20-table th:nth-child(1),
.leads20-table td:nth-child(1){
  width:70px;
}

.leads20-table th:nth-child(2),
.leads20-table td:nth-child(2){
  width:220px;
}

.leads20-table th:nth-child(3),
.leads20-table td:nth-child(3){
  width:190px;
}

.leads20-table th:nth-child(4),
.leads20-table td:nth-child(4){
  width:150px;
}

.leads20-table th:nth-child(5),
.leads20-table td:nth-child(5){
  width:140px;
}

.leads20-table th:nth-child(6),
.leads20-table td:nth-child(6){
  width:230px;
}

.leads20-table th:nth-child(7),
.leads20-table td:nth-child(7){
  width:150px;
}

.leads20-table th:nth-child(8),
.leads20-table td:nth-child(8){
  width:140px;
}

.lead-id{
  font-weight:700;
  white-space:nowrap;
}

.lead-main{
  font-weight:700;
  font-size:15px;
  line-height:1.25;
}

.lead-domain a{
  font-weight:600;
  text-decoration:none;
}

.lead-email,
.lead-owner{
  color:var(--muted);
}

.actions-col{
  text-align:right;
}

.lead-actions{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:8px;
  flex-wrap:nowrap;
}

.icon-btn{
  width:38px;
  height:38px;
  min-width:38px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid #dfe6f2;
  border-radius:12px;
  background:#f7f9fe;
  color:#4460b3;
  text-decoration:none;
  transition:.18s ease;
}

.icon-btn:hover{
  background:#eef3ff;
  border-color:#cfd9ef;
  color:#2343a0;
  transform:translateY(-1px);
}

.icon-btn svg{
  width:16px;
  height:16px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.9;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.table-empty{
  text-align:center;
  color:var(--muted);
  padding:32px 16px !important;
}

@media (max-width: 1200px){
  .leads20-filter-strip{
    grid-template-columns:1fr 1fr;
  }

  .leads20-filter-strip .btn{
    width:100%;
  }
}

@media (max-width: 760px){
  .leads20-filter-strip{
    grid-template-columns:1fr;
  }

  .leads20-table{
    min-width:900px;
  }

  .leads20-table thead th,
  .leads20-table tbody td{
    padding:12px 10px;
    font-size:13px;
  }

  .icon-btn{
    width:34px;
    height:34px;
    min-width:34px;
    border-radius:10px;
  }
}

/* ===== LEADS 2.0 ENTERPRISE LAYOUT FIX ===== */
.leads20-page{
  gap: 14px !important;
}

.leads20-filter-strip{
  border-radius: 24px !important;
  padding: 12px !important;
  gap: 12px !important;
}

.leads20-table-card{
  padding: 0 !important;
  border-radius: 24px !important;
  overflow: hidden !important;
}

.leads20-table-wrap{
  border-radius: 24px !important;
  overflow: auto !important;
}

.leads20-table{
  width: 100% !important;
  table-layout: fixed !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  background: #fff !important;
}

.leads20-table col.col-select{ width: 56px !important; }
.leads20-table col.col-id{ width: 72px !important; }
.leads20-table col.col-company{ width: 20% !important; }
.leads20-table col.col-domain{ width: 16% !important; }
.leads20-table col.col-country{ width: 11% !important; }
.leads20-table col.col-platform{ width: 11% !important; }
.leads20-table col.col-email{ width: 18% !important; }
.leads20-table col.col-owner{ width: 12% !important; }
.leads20-table col.col-action{ width: 96px !important; }

.leads20-table thead th{
  position: sticky !important;
  top: 0 !important;
  z-index: 3 !important;
  background: #f4f8ff !important;
  color: var(--primary) !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  letter-spacing: .06em !important;
  text-transform: uppercase !important;
  padding: 16px 16px !important;
  border-bottom: 1px solid #e4ecf7 !important;
  white-space: nowrap !important;
}

.leads20-table tbody td{
  padding: 18px 16px !important;
  font-size: 14px !important;
  line-height: 1.35 !important;
  vertical-align: middle !important;
  border-bottom: 1px solid #edf2fb !important;
  color: var(--text) !important;
  white-space: normal !important;
  word-break: break-word !important;
  overflow-wrap: anywhere !important;
}

.leads20-table thead th:first-child,
.leads20-table tbody td:first-child{
  padding-left: 18px !important;
}

.leads20-table thead th:last-child,
.leads20-table tbody td:last-child{
  padding-right: 18px !important;
}

.leads20-table tbody tr:last-child td{
  border-bottom: 0 !important;
}

.lead-main{
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
}

.lead-domain a,
.lead-email,
.lead-owner{
  font-size: 14px !important;
  line-height: 1.35 !important;
}

.actions-col{
  text-align: center !important;
}

.lead-actions{
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  min-width: 84px !important;
}

.icon-btn{
  width: 34px !important;
  height: 34px !important;
  border-radius: 12px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  border: 1px solid #dbe5f3 !important;
  background: #f7faff !important;
  box-shadow: none !important;
}

.icon-btn svg{
  width: 15px !important;
  height: 15px !important;
}

.leads20-bulkbar{
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 12px !important;
  border: 1px solid #e4ecf7 !important;
  border-radius: 20px !important;
  background: #fff !important;
}

@media (max-width: 1440px){
  .leads20-table col.col-company{ width: 18% !important; }
  .leads20-table col.col-domain{ width: 15% !important; }
  .leads20-table col.col-email{ width: 17% !important; }
  .leads20-table tbody td,
  .leads20-table thead th{
    padding: 16px 14px !important;
  }
}

@media (max-width: 1200px){
  .leads20-filter-strip{
    grid-template-columns: 1fr !important;
  }
  .leads20-bulkbar{
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .leads20-table{
    min-width: 1100px !important;
  }
}
/* ===== /LEADS 2.0 ENTERPRISE LAYOUT FIX ===== */

/* ===== LEAD GROUP ASSIGN FIX ===== */
.lead-group-assign-page .panel-head h1{
  font-size: 24px;
  line-height: 1.15;
  margin: 0;
}

.assign-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:16px 18px;
  border-radius:22px;
}

.assign-toolbar-right{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}

.assign-table-card{
  padding:0;
  overflow:hidden;
  border-radius:24px;
}

.assign-table{
  width:100%;
  table-layout:fixed;
}

.assign-table thead th{
  font-size:13px;
  line-height:1.2;
  padding:16px 14px;
  vertical-align:middle;
}

.assign-table tbody td{
  font-size:15px;
  line-height:1.35;
  padding:16px 14px;
  vertical-align:middle;
}

.assign-table .assign-col-check{
  width:56px;
  text-align:center;
}

.assign-table .assign-col-id{
  width:72px;
}

.assign-table .assign-col-company{
  width:26%;
}

.assign-table .assign-col-domain{
  width:16%;
}

.assign-table .assign-col-country{
  width:12%;
}

.assign-table .assign-col-platform{
  width:12%;
}

.assign-table .assign-col-email{
  width:22%;
}

.assign-table input[type="checkbox"]{
  width:22px;
  height:22px;
  border-radius:8px;
}

.assign-table a{
  word-break:break-word;
}

.assign-table td,
.assign-table th{
  word-break:break-word;
}

@media (max-width: 1200px){
  .assign-table{
    table-layout:auto;
    min-width:980px;
  }
}

@media (max-width: 820px){
  .assign-toolbar{
    flex-direction:column;
    align-items:stretch;
  }

  .assign-toolbar-right{
    justify-content:stretch;
  }

  .assign-toolbar-right .btn{
    width:100%;
    justify-content:center;
  }
}

/* ===== LEAD GROUPS SYNC FIX ===== */
.lead-groups-table,
.lead-group-detail-table{
  width:100%;
  table-layout:fixed;
}

.lead-groups-table th,
.lead-groups-table td,
.lead-group-detail-table th,
.lead-group-detail-table td{
  vertical-align:middle;
  word-break:break-word;
}

.lead-groups-table .col-id,
.lead-group-detail-table .col-id{
  width:72px;
}

.lead-groups-table .col-name{
  width:26%;
}

.lead-groups-table .col-description{
  width:30%;
}

.lead-groups-table .col-leads{
  width:90px;
}

.lead-groups-table .col-status{
  width:120px;
}

.lead-groups-table .col-actions{
  width:210px;
}

.lead-group-detail-table .col-company{
  width:24%;
}

.lead-group-detail-table .col-domain{
  width:18%;
}

.lead-group-detail-table .col-country{
  width:12%;
}

.lead-group-detail-table .col-platform{
  width:12%;
}

.lead-group-detail-table .col-email{
  width:22%;
}

.lead-group-detail-table .col-actions{
  width:90px;
}

.table-icon-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.table-icon-actions form{
  margin:0;
}

.icon-btn{
  width:40px;
  height:40px;
  border-radius:14px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:#f4f7ff;
  border:1px solid #d7e0f3;
  color:#2f55b8;
  text-decoration:none;
  cursor:pointer;
  transition:all .18s ease;
}

.icon-btn:hover{
  background:#eaf0ff;
  border-color:#c6d4f0;
}

.icon-btn svg{
  width:18px;
  height:18px;
  stroke:currentColor;
  stroke-width:1.9;
  fill:none;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.icon-btn.danger{
  color:#c62828;
  background:#fff4f4;
  border-color:#f0c9c9;
}

.icon-btn.danger:hover{
  background:#ffeaea;
  border-color:#e7b5b5;
}

@media (max-width: 1200px){
  .lead-groups-table,
  .lead-group-detail-table{
    table-layout:auto;
    min-width:980px;
  }
}

/* ===== CAMPAIGNS SUITE V1 ===== */
.templates-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:22px;
}

.preview-subject-box{
  border:1px solid #dbe4f0;
  border-radius:16px;
  padding:14px 16px;
  background:#f8fbff;
  margin-bottom:12px;
}

.email-preview-frame{
  border:1px solid #dbe4f0;
  border-radius:18px;
  overflow:hidden;
  background:#fff;
  min-height:320px;
}

.variable-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.saved-template-list{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.saved-template-item{
  border:1px solid #dbe4f0;
  border-radius:16px;
  padding:14px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  background:#fff;
}

.sequence-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}

.step-box{
  border:1px solid #dbe4f0;
  border-radius:16px;
  padding:14px 16px;
  background:#fff;
  display:flex;
  flex-direction:column;
  gap:8px;
}

@media (max-width: 1100px){
  .templates-grid{
    grid-template-columns:1fr;
  }
  .sequence-grid{
    grid-template-columns:1fr;
  }
}

/* ===== CAMPAIGNS SUITE V1.2 ===== */
.campaign-menu-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:18px;
}

.campaign-menu-card{
  text-decoration:none;
  color:inherit;
}

.campaign-menu-card:hover{
  transform:translateY(-1px);
}

@media (max-width: 1100px){
  .campaign-menu-grid{
    grid-template-columns:1fr 1fr;
  }
}

@media (max-width: 700px){
  .campaign-menu-grid{
    grid-template-columns:1fr;
  }
}

/* ===== CAMPAIGNS SUITE 1.3 ===== */
.group-picker-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:14px;
}

.group-pick-card{
  display:flex;
  align-items:flex-start;
  gap:12px;
  border:1px solid #dbe4f0;
  border-radius:16px;
  padding:14px 16px;
  background:#fff;
  cursor:pointer;
}

.group-pick-card input{
  margin-top:3px;
}

@media (max-width: 1100px){
  .group-picker-grid{
    grid-template-columns:1fr 1fr;
  }
}

@media (max-width: 700px){
  .group-picker-grid{
    grid-template-columns:1fr;
  }
}

/* ===== CAMPAIGNS SUITE 1.3 ===== */
.group-picker-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:14px;
}

.group-pick-card{
  display:flex;
  align-items:flex-start;
  gap:12px;
  border:1px solid #dbe4f0;
  border-radius:16px;
  padding:14px 16px;
  background:#fff;
  cursor:pointer;
}

.group-pick-card input{
  margin-top:3px;
}

@media (max-width: 1100px){
  .group-picker-grid{
    grid-template-columns:1fr 1fr;
  }
}

@media (max-width: 700px){
  .group-picker-grid{
    grid-template-columns:1fr;
  }
}

/* ===== TEMPLATE BUILDER 2.0 ===== */
.templates-builder-page textarea{
  min-height:120px;
}

.email-preview-frame{
  max-height:980px;
  overflow:auto;
}

.preview-subject-box{
  border:1px solid #dbe4f0;
  border-radius:16px;
  padding:14px 16px;
  background:#f8fbff;
  margin-bottom:14px;
}

/* ===== EMAIL QA TABLE FIX ===== */
.qa-table{
  table-layout: fixed;
  width: 100%;
}

.qa-table th,
.qa-table td{
  padding: 16px 18px !important;
  vertical-align: middle;
}

.qa-table th.col-id{ width: 72px; }
.qa-table th.col-company{ width: 28%; }
.qa-table th.col-domain{ width: 18%; }
.qa-table th.col-problem{ width: 12%; }
.qa-table th.col-email{ width: 24%; }
.qa-table th.col-action{ width: 140px; }

.qa-id,
.qa-domain,
.qa-problem{
  white-space: nowrap;
}

.qa-company{
  line-height: 1.35;
  word-break: break-word;
}

.qa-form{
  margin: 0;
}

.qa-input{
  width: 100%;
  min-width: 0;
}

.qa-action{
  text-align: right;
}

.qa-save-btn{
  min-width: 120px;
}

@media (max-width: 1100px){
  .qa-table th.col-company{ width: 24%; }
  .qa-table th.col-domain{ width: 16%; }
  .qa-table th.col-email{ width: 28%; }
}

@media (max-width: 820px){
  .qa-table th,
  .qa-table td{
    padding: 12px 12px !important;
  }

  .qa-table th.col-id{ width: 56px; }
  .qa-table th.col-action{ width: 110px; }

  .qa-save-btn{
    min-width: 96px;
  }
}

/* ===== TEMPLATE BUILDER 3.0 UI BLOCK 2 ===== */
.templates-grid-3{
  display:grid;
  grid-template-columns:1.15fr 1fr 1fr;
  gap:22px;
}

.block-palette{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.builder-actions-row{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
}

.layout-json-editor{
  min-height:420px;
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;
  font-size:13px;
  line-height:1.5;
}

.preview-iframe-wrap{
  margin-top:16px;
  border:1px solid #dbe4f0;
  border-radius:18px;
  overflow:hidden;
  background:#fff;
}

.template-preview-iframe{
  width:100%;
  min-height:460px;
  border:0;
  display:block;
  background:#fff;
}

@media (max-width: 1400px){
  .templates-grid-3{
    grid-template-columns:1fr 1fr;
  }
}

@media (max-width: 980px){
  .templates-grid-3{
    grid-template-columns:1fr;
  }
}

/* ===== TEMPLATE SUITE 4.0 ===== */
.template-suite-page{
  gap:20px;
}

.template-suite-nav{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
}

.suite-tab{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  padding:0 18px;
  border:1px solid #dbe4f0;
  border-radius:999px;
  background:#fff;
  color:#16325c;
  text-decoration:none;
  font-weight:800;
}

.suite-tab.active{
  background:#23439B;
  color:#fff;
  border-color:#23439B;
}

.template-step-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) 340px;
  gap:22px;
  align-items:start;
}

.template-step-main textarea,
.builder-canvas-main textarea,
.builder-json-side textarea{
  min-height:140px;
}

.template-step-side{
  position:sticky;
  top:24px;
}

.template-design-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:20px;
}

.builder-tool-sidebar{
  position:sticky;
  top:24px;
}

.builder-canvas-main .workspace-form-grid,
.workspace-form-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:16px;
}

.builder-canvas-main .span-2,
.workspace-form-grid .span-2{
  grid-column:span 2;
}

.template-toolbox-strip{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

@media (max-width: 1500px){
  .template-design-grid{
    grid-template-columns:280px minmax(0,1fr);
  }
}

@media (max-width: 1200px){
  .template-step-grid,
  .template-design-grid{
    grid-template-columns:1fr;
  }

  .template-step-side,
  .builder-tool-sidebar{
    position:static;
  }
}

@media (max-width: 980px){
  .builder-canvas-main .workspace-form-grid,
  .workspace-form-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media (max-width: 700px){
  .builder-canvas-main .workspace-form-grid,
  .workspace-form-grid{
    grid-template-columns:1fr;
  }

  .builder-canvas-main .span-2,
  .workspace-form-grid .span-2{
    grid-column:auto;
  }

  .suite-tab{
    width:100%;
  }
}

/* ===== TEMPLATE SUITE 4.0 ===== */
.template-suite-page{ gap:20px; }

.template-suite-nav{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
}

.suite-tab{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  padding:0 18px;
  border:1px solid #dbe4f0;
  border-radius:999px;
  background:#fff;
  color:#16325c;
  text-decoration:none;
  font-weight:800;
}

.suite-tab.active{
  background:#23439B;
  color:#fff;
  border-color:#23439B;
}

.template-step-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) 340px;
  gap:22px;
  align-items:start;
}

.template-step-side,
.builder-tool-sidebar,
.builder-json-side{
  position:sticky;
  top:24px;
}

.template-design-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:20px;
}

.template-design-grid-3{
  grid-template-columns:300px minmax(0,1fr) 420px;
  align-items:start;
}

.workspace-form-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:16px;
}

.workspace-form-grid .span-2{
  grid-column:span 2;
}

.template-toolbox-strip{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.builder-canvas-main textarea,
.builder-json-side textarea,
.template-step-main textarea{
  min-height:140px;
}

.design-canvas-placeholder{
  border:1px dashed #cbd7e7;
  border-radius:20px;
  background:#f8fbff;
  padding:18px;
  margin-bottom:18px;
}

.design-canvas-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:14px;
}

.canvas-device-switch{
  display:flex;
  gap:10px;
  margin-bottom:14px;
}

.canvas-dropzone{
  min-height:220px;
  border:1px dashed #dbe4f0;
  border-radius:18px;
  background:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  color:#6a7d98;
  padding:24px;
}

.tool-section{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-bottom:18px;
}

.tool-title{
  font-size:13px;
  font-weight:800;
  color:#62789a;
  text-transform:uppercase;
  letter-spacing:.04em;
}

.tool-list{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.tool-chip,
.font-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:38px;
  padding:0 14px;
  border:1px solid #dbe4f0;
  border-radius:12px;
  background:#fff;
  color:#1f3358;
  font-weight:700;
  cursor:pointer;
}

.font-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}

.preview-lab-grid{
  display:grid;
  grid-template-columns:minmax(0,1.3fr) 440px;
  gap:20px;
}

.email-preview-frame-xl{
  min-height:820px;
}

.saved-template-link{
  text-decoration:none;
  color:inherit;
}

.mobile-preview-shell{
  max-width:390px;
  margin:0 auto;
  border:10px solid #0f172a;
  border-radius:28px;
  overflow:hidden;
  background:#fff;
}

.mobile-template-preview{
  width:100%;
  min-height:620px;
  border:0;
  display:block;
  background:#fff;
}

@media (max-width: 1500px){
  .template-design-grid-3{
    grid-template-columns:280px minmax(0,1fr);
  }
  .builder-json-side{
    grid-column:1 / -1;
    position:static;
  }
}

@media (max-width: 1200px){
  .template-step-grid,
  .template-design-grid,
  .template-design-grid-3,
  .preview-lab-grid{
    grid-template-columns:1fr;
  }

  .template-step-side,
  .builder-tool-sidebar,
  .builder-json-side{
    position:static;
  }
}

@media (max-width: 980px){
  .workspace-form-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media (max-width: 700px){
  .workspace-form-grid{
    grid-template-columns:1fr;
  }

  .workspace-form-grid .span-2{
    grid-column:auto;
  }

  .suite-tab{
    width:100%;
  }

  .font-grid{
    grid-template-columns:1fr;
  }
}

/* ===== UX OVERHAUL: TEMPLATE DESIGN / MAILING LISTS / AUDIENCE ===== */
.design-studio-grid{
  display:grid;
  grid-template-columns:280px minmax(0,1fr) 360px;
  gap:20px;
  align-items:start;
}

.design-studio-sidebar,
.design-studio-inspector{
  position:sticky;
  top:24px;
}

.design-studio-canvas{
  min-height:780px;
}

.studio-search-wrap{
  margin-bottom:18px;
}

.studio-search-input{
  width:100%;
  min-height:46px;
  border:1px solid #dbe4f0;
  border-radius:14px;
  padding:0 14px;
  background:#fff;
}

.design-canvas-shell{
  border:1px solid #e4ebf5;
  border-radius:24px;
  background:linear-gradient(180deg,#fbfdff 0%,#f6f9fd 100%);
  padding:18px;
  margin-bottom:22px;
}

.design-canvas-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:14px;
}

.canvas-status-pill{
  display:inline-flex;
  align-items:center;
  min-height:36px;
  padding:0 12px;
  border-radius:999px;
  background:#eef3fb;
  color:#23439B;
  font-weight:700;
}

.design-canvas-dropzone{
  min-height:420px;
  border:1px dashed #ced9ea;
  border-radius:22px;
  background:#fff;
  padding:24px;
  display:flex;
  align-items:center;
  justify-content:center;
}

.dropzone-empty-state{
  max-width:520px;
  text-align:center;
  color:#6b7d97;
}

.dropzone-empty-state strong{
  display:block;
  margin-bottom:8px;
  color:#17335d;
  font-size:18px;
}

.visual-block-card{
  width:100%;
  border:1px solid #e4ebf5;
  border-radius:16px;
  background:#f8fbff;
  padding:16px;
  margin-bottom:12px;
}

.visual-block-top{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:6px;
}

.visual-block-index{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:34px;
  height:34px;
  border-radius:10px;
  background:#23439B;
  color:#fff;
  font-weight:800;
  font-size:13px;
}

.design-controls-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:16px;
}

.design-controls-grid .span-2{
  grid-column:span 2;
}

.studio-mini-stats{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}

.studio-stat-box{
  border:1px solid #e3ebf6;
  border-radius:16px;
  padding:14px 16px;
  background:#f8fbff;
  display:flex;
  flex-direction:column;
  gap:6px;
}

.studio-stat-box span{
  color:#6c7f99;
  font-size:12px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.04em;
}

.studio-stat-box strong{
  color:#17335d;
  font-size:18px;
}

.mailing-lists-hero,
.audience-builder-hero{
  padding:22px 22px 16px !important;
}

.mailing-builder-grid{
  display:grid;
  grid-template-columns:1.1fr 2.2fr 1.1fr;
  gap:16px;
}

.mailing-builder-grid .span-2{
  grid-column:span 2;
}

.mailing-builder-layout{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px;
}

.group-picker-grid-lg{
  grid-template-columns:1fr;
  gap:12px;
}

.group-pick-card-lg{
  min-height:78px;
  padding:16px 18px;
  border-radius:18px;
}

.mailing-builder-bottom{
  display:grid;
  grid-template-columns:320px minmax(0,1fr);
  gap:18px;
  align-items:start;
}

.mailing-flag-card{
  min-height:86px;
  border-radius:18px;
}

.mailing-summary-card{
  border-radius:20px;
}

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

.filter-pill-list{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.mailing-lists-table th,
.mailing-lists-table td{
  padding-top:18px !important;
  padding-bottom:18px !important;
}

.audience-builder-toolbar{
  display:grid;
  grid-template-columns:minmax(280px,420px) 1fr;
  gap:16px;
  align-items:center;
  margin-top:8px;
}

.audience-toolbar-note{
  color:#6b7d97;
  font-size:14px;
}

.audience-card-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:18px;
}

.audience-source-card{
  border:1px solid #e3ebf6;
  border-radius:22px;
  background:#fff;
  padding:20px;
  display:flex;
  flex-direction:column;
  gap:16px;
  box-shadow:0 8px 24px rgba(25,42,70,.04);
}

.audience-source-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.audience-source-top h3{
  margin:2px 0 0;
  font-size:24px;
  line-height:1.15;
}

.audience-live-badge{
  display:inline-flex;
  align-items:center;
  min-height:38px;
  padding:0 14px;
  border-radius:999px;
  background:#eef3fb;
  color:#23439B;
  font-weight:800;
  white-space:nowrap;
}

.audience-source-body{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.audience-source-line{
  display:flex;
  flex-direction:column;
  gap:4px;
  padding:12px 14px;
  border:1px solid #edf2f8;
  border-radius:14px;
  background:#f9fbff;
}

.audience-source-line span{
  font-size:12px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.04em;
  color:#6c7f99;
}

.audience-source-line strong{
  color:#17335d;
}

.audience-source-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:auto;
}

@media (max-width: 1550px){
  .design-studio-grid{
    grid-template-columns:260px minmax(0,1fr);
  }
  .design-studio-inspector{
    grid-column:1 / -1;
    position:static;
  }
  .audience-card-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media (max-width: 1200px){
  .design-studio-grid,
  .mailing-builder-layout,
  .mailing-builder-bottom,
  .audience-builder-toolbar{
    grid-template-columns:1fr;
  }

  .design-studio-sidebar,
  .design-studio-inspector{
    position:static;
  }

  .mailing-builder-grid{
    grid-template-columns:1fr 1fr;
  }

  .mailing-builder-grid .span-2{
    grid-column:span 2;
  }

  .mailing-summary-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .audience-card-grid{
    grid-template-columns:1fr;
  }
}

@media (max-width: 820px){
  .design-controls-grid,
  .mailing-builder-grid{
    grid-template-columns:1fr;
  }

  .design-controls-grid .span-2,
  .mailing-builder-grid .span-2{
    grid-column:auto;
  }

  .mailing-summary-grid{
    grid-template-columns:1fr;
  }
}

/* ===== REAL TOOLS / MAILING LISTS FIX ===== */
.tool-stack{
  display:flex;
  flex-direction:column;
  gap:18px;
}

.tool-group{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.tool-card-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}

.tool-card{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:54px;
  padding:12px 14px;
  border:1px solid #dbe4f0;
  border-radius:16px;
  background:#fff;
  color:#17335d;
  font-weight:800;
  text-align:left;
  cursor:pointer;
}

.tool-card:hover,
.font-card:hover{
  background:#f7fbff;
  border-color:#c9d7ea;
}

.tool-icon{
  width:22px;
  height:22px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:#23439B;
  flex:0 0 22px;
}

.tool-icon svg{
  width:22px;
  height:22px;
}

.tool-icon-mini{
  font-size:18px;
  line-height:1;
}

.font-card-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}

.font-card{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:50px;
  padding:0 14px;
  border:1px solid #dbe4f0;
  border-radius:16px;
  background:#fff;
  color:#17335d;
  font-weight:800;
  cursor:pointer;
}

.clean-group-picker{
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
}

.clean-group-card{
  position:relative;
  display:grid;
  grid-template-columns:28px 1fr;
  gap:14px;
  align-items:center;
  min-height:74px;
  padding:16px 18px;
  border:1px solid #dbe4f0;
  border-radius:18px;
  background:#fff;
}

.clean-group-card input{
  position:absolute;
  opacity:0;
  pointer-events:none;
}

.clean-check{
  width:28px;
  height:28px;
  border:2px solid #aebfd8;
  border-radius:10px;
  background:#fff;
  display:inline-block;
  position:relative;
}

.clean-group-card input:checked + .clean-check{
  background:#1f6feb;
  border-color:#1f6feb;
}

.clean-group-card input:checked + .clean-check::after{
  content:"";
  position:absolute;
  left:8px;
  top:3px;
  width:8px;
  height:14px;
  border:solid #fff;
  border-width:0 3px 3px 0;
  transform:rotate(45deg);
}

.clean-group-content{
  min-width:0;
}

.clean-group-content strong{
  display:block;
  margin-bottom:4px;
}

.clean-flag-card{
  max-width:none !important;
}

.success-banner{
  margin:0 0 14px;
  padding:14px 16px;
  border:1px solid #cfe6d5;
  border-radius:14px;
  background:#edf9f0;
  color:#22603a;
  font-weight:700;
}

@media (max-width: 1200px){
  .tool-card-grid,
  .font-card-grid{
    grid-template-columns:1fr 1fr;
  }
}

@media (max-width: 820px){
  .tool-card-grid,
  .font-card-grid{
    grid-template-columns:1fr;
  }
}

/* ===== MAILING LISTS PADDING / ACTIONS FINAL FIX ===== */
.subcard-padded{
  padding:22px !important;
}

.subcard-padded .panel-head{
  margin-bottom:14px;
}

.mailing-lists-hero{
  padding:18px 18px 14px !important;
}

.mailing-lists-existing-card{
  padding:18px 18px 8px !important;
}

.mailing-builder-layout .subcard,
.mailing-summary-card{
  padding:18px !important;
  border-radius:22px;
}

.clean-group-picker{
  margin-top:8px;
}

.clean-group-card{
  padding:16px 18px !important;
}

.mailing-summary-grid{
  margin-top:10px;
}

.filter-pill-list{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  padding-right:12px;
}

.mailing-lists-table th,
.mailing-lists-table td{
  padding:18px 14px !important;
  vertical-align:middle;
}

.table-action-row{
  display:flex;
  align-items:center;
  gap:10px;
}

.icon-action-btn{
  width:42px;
  height:42px;
  border:1px solid #dbe4f0;
  border-radius:12px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:#f7faff;
  color:#23439B;
  text-decoration:none;
  cursor:pointer;
}

.icon-action-btn svg{
  width:18px;
  height:18px;
}

.icon-action-btn:hover{
  background:#eef4ff;
  border-color:#c8d7ee;
}

.icon-action-btn.danger{
  color:#b42318;
  background:#fff7f7;
  border-color:#f0c8c8;
}

.icon-action-btn.danger:hover{
  background:#ffecec;
}

@media (max-width: 900px){
  .mailing-lists-hero,
  .mailing-lists-existing-card,
  .subcard-padded{
    padding:16px !important;
  }

  .mailing-lists-table th,
  .mailing-lists-table td{
    padding:14px 10px !important;
  }
}

/* ===== TEMPLATE DESIGN TOOLBAR / MAILING TABLE SYNC ===== */
.design-studio-grid-v2{
  grid-template-columns:minmax(0,1fr) 360px;
}

.design-studio-canvas-wide{
  min-width:0;
}

.builder-toolbar-shell{
  display:flex;
  flex-direction:column;
  gap:14px;
  padding:18px;
  border:1px solid #e3ebf6;
  border-radius:22px;
  background:#f8fbff;
  margin-bottom:18px;
}

.builder-toolbar-row{
  display:flex;
  flex-wrap:wrap;
  gap:14px;
  align-items:end;
}

.builder-toolbar-group{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.builder-toolbar-label{
  font-size:12px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.04em;
  color:#6b7d97;
}

.builder-toolbar-inline{
  display:flex;
  gap:10px;
  align-items:center;
}

.builder-select{
  min-width:220px;
  min-height:44px;
  border:1px solid #dbe4f0;
  border-radius:12px;
  padding:0 12px;
  background:#fff;
}

.builder-toolbar-chips{
  align-items:center;
}

.tool-card-inline{
  min-height:46px;
  padding:10px 14px;
}

.design-canvas-dropzone.dragover{
  border-color:#23439B;
  background:#eef4ff;
}

.mailing-lists-table th,
.mailing-lists-table td{
  text-align:left;
  vertical-align:middle;
}

.mailing-lists-table td{
  white-space:normal;
}

@media (max-width: 1400px){
  .design-studio-grid-v2{
    grid-template-columns:1fr;
  }
}

@media (max-width: 900px){
  .builder-toolbar-inline{
    flex-direction:column;
    align-items:stretch;
  }

  .builder-select{
    min-width:0;
    width:100%;
  }
}

/* ===== DESIGN STUDIO V3 ===== */
.design-studio-grid-v3{
  display:grid;
  grid-template-columns:minmax(0,1fr) 360px;
  gap:20px;
  align-items:start;
}

.design-studio-main-v3{
  min-width:0;
}

.builder-toolbar-v3{
  display:flex;
  flex-direction:column;
  gap:14px;
  padding:18px;
  border:1px solid #e3ebf6;
  border-radius:22px;
  background:#f8fbff;
  margin-bottom:18px;
}

.builder-toolbar-v3-row{
  display:flex;
  flex-wrap:wrap;
  gap:14px;
  align-items:end;
}

.builder-toolbar-drag-row{
  align-items:center;
}

.drag-tools-title{
  min-height:44px;
  display:inline-flex;
  align-items:center;
  font-size:13px;
  font-weight:800;
  color:#6b7d97;
  text-transform:uppercase;
  letter-spacing:.04em;
  padding-right:6px;
}

.toolbar-control{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.toolbar-control label{
  font-size:12px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.04em;
  color:#6b7d97;
}

.builder-select.wide{
  min-width:260px;
}

.toolbar-button-row{
  display:flex;
  align-items:center;
  gap:10px;
}

.toolbar-btn-icon{
  width:16px;
  height:16px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.toolbar-btn-icon svg{
  width:16px;
  height:16px;
}

.drag-tool-btn{
  display:inline-flex;
  align-items:center;
  gap:10px;
  min-height:46px;
  padding:10px 14px;
  border:1px solid #dbe4f0;
  border-radius:14px;
  background:#fff;
  color:#17335d;
  font-weight:800;
  cursor:pointer;
}

.drag-tool-btn:hover{
  background:#f7fbff;
  border-color:#c9d7ea;
}

@media (max-width: 1400px){
  .design-studio-grid-v3{
    grid-template-columns:1fr;
  }
}

@media (max-width: 900px){
  .builder-select.wide{
    min-width:0;
    width:100%;
  }
}

/* ===== CAMPAIGN BUILDER 2.0 ===== */
.campaign-links-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:16px;
}

.quick-link-card{
  text-decoration:none;
  color:inherit;
  min-height:84px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:4px;
}

.quick-link-card span{
  color:#6b7d97;
  font-size:14px;
}

.campaign-builder-grid{
  display:grid;
  grid-template-columns:1.05fr .95fr;
  gap:18px;
  align-items:start;
}

.campaign-form-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
}

.campaign-form-grid .span-2{
  grid-column:span 2;
}

.campaign-settings-card{
  border:1px solid #e3ebf6;
  border-radius:18px;
  background:#f8fbff;
  padding:16px;
}

.campaign-settings-card h3{
  margin:0 0 14px;
}

.campaign-switches-row{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.switch-chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:40px;
  padding:0 14px;
  border:1px solid #dbe4f0;
  border-radius:999px;
  background:#fff;
  font-weight:700;
}

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

.review-list{
  display:flex;
  flex-direction:column;
  gap:10px;
  color:#17335d;
}

@media (max-width: 1300px){
  .campaign-links-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .campaign-builder-grid,
  .review-grid{
    grid-template-columns:1fr;
  }
}

@media (max-width: 900px){
  .campaign-form-grid{
    grid-template-columns:1fr;
  }

  .campaign-form-grid .span-2{
    grid-column:auto;
  }

  .campaign-links-grid{
    grid-template-columns:1fr;
  }
}

/* ===== CAMPAIGNS UI FIX ===== */
.campaign-builder-grid-v2{
  display:grid;
  grid-template-columns:1.2fr .8fr;
  gap:20px;
  align-items:start;
}

.campaign-builder-card-v2,
.campaign-overview-card-v2{
  padding:20px !important;
}

.campaign-form-v2{
  gap:18px;
}

.campaign-section-card{
  border:1px solid #e3ebf6;
  border-radius:22px;
  background:#ffffff;
  padding:18px;
}

.campaign-section-card-soft{
  background:#f8fbff;
}

.campaign-section-head{
  margin-bottom:14px;
}

.campaign-section-head h3{
  margin:0 0 4px;
  font-size:22px;
}

.campaign-form-grid-v2{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
}

.campaign-form-grid-v2 .span-2{
  grid-column:span 2;
}

.campaign-form-grid-v2 .span-3{
  grid-column:span 3;
}

.campaign-switches-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
}

.campaign-switch-card{
  position:relative;
  display:grid;
  grid-template-columns:46px 1fr;
  gap:14px;
  align-items:center;
  min-height:88px;
  padding:16px 18px;
  border:1px solid #dbe4f0;
  border-radius:18px;
  background:#fff;
  cursor:pointer;
}

.campaign-switch-card input{
  position:absolute;
  opacity:0;
  pointer-events:none;
}

.campaign-switch-ui{
  width:46px;
  height:28px;
  border-radius:999px;
  background:#d9e4f2;
  position:relative;
  transition:.2s ease;
}

.campaign-switch-ui::after{
  content:"";
  position:absolute;
  top:4px;
  left:4px;
  width:20px;
  height:20px;
  border-radius:50%;
  background:#fff;
  box-shadow:0 1px 3px rgba(0,0,0,.12);
  transition:.2s ease;
}

.campaign-switch-card input:checked + .campaign-switch-ui{
  background:#1f6feb;
}

.campaign-switch-card input:checked + .campaign-switch-ui::after{
  left:22px;
}

.campaign-submit-row{
  display:flex;
  justify-content:flex-start;
  padding-top:4px;
}

.campaign-submit-row .btn{
  min-width:260px;
}

.campaign-overview-table th,
.campaign-overview-table td{
  padding-top:16px !important;
  padding-bottom:16px !important;
  vertical-align:middle;
}

@media (max-width: 1400px){
  .campaign-builder-grid-v2{
    grid-template-columns:1fr;
  }
}

@media (max-width: 980px){
  .campaign-form-grid-v2,
  .campaign-switches-grid{
    grid-template-columns:1fr;
  }

  .campaign-form-grid-v2 .span-2,
  .campaign-form-grid-v2 .span-3{
    grid-column:auto;
  }

  .campaign-submit-row .btn{
    width:100%;
    min-width:0;
  }
}

/* ===== TEMPLATE LIBRARY SYNC FIX ===== */
.templates-library-card{
  padding:20px !important;
}

.templates-library-table{
  table-layout:fixed;
  width:100%;
}

.templates-library-table th,
.templates-library-table td{
  padding:18px 12px !important;
  vertical-align:middle;
  text-align:left;
}

.templates-library-table th:nth-child(1),
.templates-library-table td:nth-child(1){
  width:60px;
}

.templates-library-table th:nth-child(2),
.templates-library-table td:nth-child(2){
  width:220px;
}

.templates-library-table th:nth-child(3),
.templates-library-table td:nth-child(3){
  width:220px;
}

.templates-library-table th:nth-child(4),
.templates-library-table td:nth-child(4){
  width:150px;
}

.templates-library-table th:nth-child(5),
.templates-library-table td:nth-child(5){
  width:200px;
}

.templates-library-table th:nth-child(6),
.templates-library-table td:nth-child(6){
  width:220px;
}

.templates-library-table td{
  word-break:break-word;
}

.table-action-row{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.icon-action-btn{
  width:42px;
  height:42px;
  border:1px solid #dbe4f0;
  border-radius:12px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:#f7faff;
  color:#23439B;
  text-decoration:none;
  cursor:pointer;
}

.icon-action-btn svg{
  width:18px;
  height:18px;
}

.icon-action-btn:hover{
  background:#eef4ff;
  border-color:#c8d7ee;
}

.icon-action-btn.danger{
  color:#b42318;
  background:#fff7f7;
  border-color:#f0c8c8;
}

.icon-action-btn.danger:hover{
  background:#ffecec;
}

/* ===== TEMPLATE TEST + WORKSPACE FIX ===== */
.template-test-grid-v2{
  display:grid;
  grid-template-columns:minmax(0,1fr) 420px;
  gap:20px;
  align-items:start;
}

.preview-switch-row{
  display:flex;
  gap:10px;
  margin-top:8px;
}

.preview-stage{
  margin-top:14px;
  border:1px solid #dbe4f0;
  border-radius:24px;
  background:#f7fbff;
  padding:20px;
}

.preview-stage-inner{
  width:100%;
  min-height:900px;
}

.template-preview-frame{
  width:100%;
  border:0;
  background:#fff;
}

.desktop-frame{
  min-height:900px;
  border-radius:18px;
}

.mobile-preview-shell{
  display:none;
}

.mobile-preview-device{
  width:380px;
  max-width:100%;
  height:640px;
  margin:0 auto 18px;
  padding:10px;
  border-radius:34px;
  background:#0f172a;
  box-sizing:border-box;
}

.mobile-frame{
  width:100%;
  height:100%;
  border:0;
  border-radius:24px;
  background:#fff;
}

.template-selection-box{
  margin-top:20px;
}

.template-mini-card{
  margin-top:10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:14px 16px;
  border:1px solid #dbe4f0;
  border-radius:16px;
  background:#fff;
}

.workspace-canvas{
  display:none;
  min-height:420px;
  border:1px dashed #c9d7ea;
  border-radius:26px;
  background:#fff;
  padding:22px;
}

.workspace-canvas.is-active{
  display:block;
}

.workspace-mobile{
  max-width:420px;
  margin:0 auto;
  border-radius:34px;
  border:10px solid #0f172a;
  min-height:620px;
  background:#fff;
}

.workspace-empty-state{
  min-height:360px;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  color:#6b7d97;
  text-align:center;
}

.workspace-block{
  margin-bottom:16px;
  border:1px solid #dbe4f0;
  border-radius:18px;
  background:#f8fbff;
  padding:18px;
}

.workspace-block:last-child{
  margin-bottom:0;
}

.hero-block{
  background:linear-gradient(135deg,#eef4ff,#f8fbff);
}

.image-block .workspace-image-placeholder{
  min-height:180px;
  border-radius:16px;
  background:linear-gradient(135deg,#dbe7fb,#eef4ff);
  display:flex;
  align-items:center;
  justify-content:center;
  color:#5b7091;
  font-weight:700;
}

.columns-2,
.columns-3{
  display:grid;
  gap:12px;
}

.columns-2{
  grid-template-columns:1fr 1fr;
}

.columns-3{
  grid-template-columns:1fr 1fr 1fr;
}

.columns-2 > div,
.columns-3 > div{
  min-height:88px;
  border-radius:14px;
  background:#fff;
  border:1px solid #dbe4f0;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
}

.design-canvas-dropzone.dragover{
  border-color:#23439B;
  background:#eef4ff;
}

@media (max-width: 1300px){
  .template-test-grid-v2{
    grid-template-columns:1fr;
  }
}

@media (max-width: 900px){
  .desktop-frame{
    min-height:700px;
  }

  .preview-stage-inner{
    min-height:700px;
  }

  .columns-2,
  .columns-3{
    grid-template-columns:1fr;
  }
}

/* ===== MAILING LIST ACTIONS ROW FIX ===== */
.mailing-lists-table .table-action-row{
  display:flex !important;
  flex-direction:row !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:10px !important;
  flex-wrap:nowrap !important;
}

.mailing-lists-table td:last-child{
  white-space:nowrap !important;
}

.mailing-lists-table td:last-child form{
  display:inline-block !important;
  margin:0 !important;
}

.mailing-lists-table .icon-action-btn{
  flex:0 0 42px !important;
}

.mailing-lists-table tr{
  height:auto !important;
}

.mailing-lists-table td{
  vertical-align:middle !important;
}

/* ===== TEMPLATE LIBRARY FINAL ===== */
.templates-library-card{
  padding:20px !important;
}

.templates-library-table{
  table-layout:fixed;
  width:100%;
}

.templates-library-table th,
.templates-library-table td{
  padding:18px 12px !important;
  vertical-align:middle;
  text-align:left;
}

.templates-library-table th:nth-child(1),
.templates-library-table td:nth-child(1){ width:70px; }

.templates-library-table th:nth-child(2),
.templates-library-table td:nth-child(2){ width:260px; }

.templates-library-table th:nth-child(3),
.templates-library-table td:nth-child(3){ width:260px; }

.templates-library-table th:nth-child(4),
.templates-library-table td:nth-child(4){ width:220px; }

.templates-library-table th:nth-child(5),
.templates-library-table td:nth-child(5){ width:220px; }

.templates-library-table th:nth-child(6),
.templates-library-table td:nth-child(6){ width:220px; }

.templates-library-table td{
  word-break:break-word;
}

.templates-library-table .table-action-row{
  display:flex !important;
  flex-direction:row !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:10px !important;
  flex-wrap:nowrap !important;
}

.templates-library-table td:last-child{
  white-space:nowrap !important;
}

.templates-library-table td:last-child form{
  display:inline-block !important;
  margin:0 !important;
}

.templates-library-table .icon-action-btn{
  width:42px;
  height:42px;
  border:1px solid #dbe4f0;
  border-radius:12px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:#f7faff;
  color:#23439B;
  text-decoration:none;
  cursor:pointer;
  flex:0 0 42px !important;
}

.templates-library-table .icon-action-btn svg{
  width:18px;
  height:18px;
}

.templates-library-table .icon-action-btn:hover{
  background:#eef4ff;
  border-color:#c8d7ee;
}

.templates-library-table .icon-action-btn.danger{
  color:#b42318;
  background:#fff7f7;
  border-color:#f0c8c8;
}

.templates-library-table .icon-action-btn.danger:hover{
  background:#ffecec;
}

.editor-bottom-save-row{
  display:flex;
  justify-content:flex-end;
  padding-top:12px;
  border-top:1px solid #e3ebf6;
  margin-top:16px;
}

@media (max-width: 1200px){
  .templates-library-table{
    table-layout:auto;
  }
}

/* ===== WORKSPACE ADMIN SUITE 1.0 ===== */
.workspace-admin-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
}

.workspace-admin-grid .span-2{
  grid-column:span 2;
}

.workspace-admin-table th,
.workspace-admin-table td{
  vertical-align:middle;
}

@media (max-width: 1100px){
  .workspace-admin-grid{
    grid-template-columns:1fr;
  }

  .workspace-admin-grid .span-2{
    grid-column:auto;
  }
}

/* ===== LEADMACHINE SALES ENGINE 1.0 ===== */
.workspace-admin-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
}

.workspace-admin-grid .span-2{
  grid-column:span 2;
}

.workspace-admin-table th,
.workspace-admin-table td{
  vertical-align:middle;
}

@media (max-width: 1100px){
  .workspace-admin-grid{
    grid-template-columns:1fr;
  }

  .workspace-admin-grid .span-2{
    grid-column:auto;
  }
}

/* ===== LEADMACHINE SALES ENGINE 1.0 ===== */
.workspace-admin-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
}

.workspace-admin-grid .span-2{
  grid-column:span 2;
}

.workspace-admin-table th,
.workspace-admin-table td{
  vertical-align:middle;
}

@media (max-width: 1100px){
  .workspace-admin-grid{
    grid-template-columns:1fr;
  }

  .workspace-admin-grid .span-2{
    grid-column:auto;
  }
}

/* ===== Lead System V2 ===== */

.lead-system-v2-card {
  margin-bottom: 18px;
}

.stats-grid .stat-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 16px 18px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.stats-grid .stat-card strong {
  display: block;
  font-size: 28px;
  line-height: 1;
  color: #0f172a;
  margin-bottom: 8px;
}

.stats-grid .stat-card span {
  display: block;
  font-size: 13px;
  color: #64748b;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

.table thead th {
  text-align: left;
  font-size: 12px;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: #64748b;
  padding: 12px 14px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.table tbody td {
  padding: 14px;
  border-bottom: 1px solid #eef2f7;
  vertical-align: top;
}

.table tbody tr:hover {
  background: #fafcff;
}

.empty-state {
  padding: 20px;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  background: #f8fafc;
  color: #64748b;
}

.page-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.page-header h1 {
  margin: 0 0 6px 0;
}

.card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 22px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
  overflow: hidden;
}

.card-header {
  padding: 16px 20px 10px;
  border-bottom: 1px solid #eef2f7;
}

.card-header h3 {
  margin: 0;
}

.card-body {
  padding: 18px 20px 20px;
}

.card label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}

.card input[type="text"],
.card input[type="number"],
.card input[type="file"],
.card select,
.card textarea {
  width: 100%;
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  background: #fff;
}

.card textarea {
  min-height: 120px;
  resize: vertical;
}

.btn-small {
  padding: 8px 12px;
  font-size: 12px;
  border-radius: 10px;
}

.muted {
  color: #64748b;
}

@media (max-width: 960px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr !important;
  }
}

@media (max-width: 640px) {
  .stats-grid {
    grid-template-columns: 1fr !important;
  }
}

/* === CLEAN SIDEBAR LAYOUT === */
html, body {
  margin: 0;
  min-height: 100%;
}

.layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
}

.sidebar {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #ffffff;
  border-right: 1px solid var(--line);
  overflow: hidden;
}

.sidebar > div:first-child {
  flex: 1 1 auto;
  min-height: 0;
}

.brandbar {
  padding: 22px 18px 16px;
  border-bottom: 1px solid var(--line);
}

.brandbox {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.sidenav {
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sidefooter,
.sidefooter-static {
  margin-top: auto;
  padding: 16px 18px;
  border-top: 1px solid var(--line);
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.main {
  min-width: 0;
}

.topbar {
  align-items: flex-start;
}

@media (max-width: 1120px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    min-height: auto;
  }

  .sidefooter,
  .sidefooter-static {
    margin-top: 0;
  }
}

/* --- Dashboard + template steps + library (2026-03) --- */
.template-suite-nav--steps {
  align-items: center;
  padding: 4px 0 12px;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 8px;
}

.suite-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  margin-right: 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.suite-tab.active .suite-step-num {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.dashboard-home {
  max-width: 1180px;
  margin: 0 auto;
}

.dashboard-home .dash-hero {
  padding: 28px 26px;
  border-radius: 22px;
  border: 1px solid #e5e7eb;
  background: linear-gradient(135deg, #f8fafc 0%, #eef4ff 100%);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.06);
  margin-bottom: 20px;
}

.dashboard-home .dash-hero h1 {
  margin: 0 0 6px 0;
  font-size: clamp(1.5rem, 2.5vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.dash-kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.dash-kpi {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.05);
  border-left: 4px solid #23439b;
}

.dash-kpi--mail {
  border-left-color: #0d9488;
}

.dash-kpi .lbl {
  font-size: 12px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.dash-kpi .val {
  font-size: 1.65rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
}

.dash-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.dash-action-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 22px;
  border-radius: 18px;
  border: 1px solid #e5e7eb;
  background: #fff;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.05);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dash-action-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}

.dash-action-card .eyebrow {
  font-size: 11px;
  font-weight: 800;
  color: #23439b;
  letter-spacing: 0.06em;
}

.dash-action-card h2 {
  margin: 0;
  font-size: 1.05rem;
}

.dash-action-card .muted {
  flex: 1;
  font-size: 13px;
}

.dash-two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

@media (max-width: 960px) {
  .dash-two-col {
    grid-template-columns: 1fr;
  }
}

.dash-activity {
  margin: 0;
  padding: 0;
  list-style: none;
}

.dash-activity li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 0;
  border-bottom: 1px solid #eef2f7;
  font-size: 13px;
  color: #475569;
}

.tmpl-lib-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

@media (max-width: 900px) {
  .tmpl-lib-shell {
    grid-template-columns: 1fr;
  }
}

.tmpl-lib-side {
  position: sticky;
  top: 20px;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #fff;
  padding: 16px 14px;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.04);
}

.tmpl-lib-side h3 {
  margin: 0 0 12px 0;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}

.tmpl-cat-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  margin-bottom: 6px;
  border: none;
  border-radius: 12px;
  background: transparent;
  font: inherit;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
}

.tmpl-cat-btn:hover,
.tmpl-cat-btn.active {
  background: #eef4ff;
  color: #1e3a8a;
}

.tmpl-lib-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}

.tmpl-lib-toolbar input[type="search"] {
  flex: 1;
  min-width: 200px;
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  padding: 10px 14px;
  font: inherit;
}

.tmpl-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.tmpl-card {
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
}

.tmpl-card-preview {
  height: 140px;
  min-height: 120px;
  background: linear-gradient(145deg, #f1f5f9, #e2e8f0);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.tmpl-card-preview--live {
  display: block;
  padding: 0;
  position: relative;
  overflow: hidden;
  background: #f8fafc;
}

.tmpl-lib-preview-iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 280%;
  height: 500%;
  border: 0;
  transform: scale(calc(1 / 2.8));
  transform-origin: 0 0;
  pointer-events: none;
}

.tmpl-card-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.tmpl-card-body strong {
  font-size: 15px;
}

.tmpl-card-meta {
  font-size: 12px;
  color: #64748b;
}

.tmpl-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

/* Sidebar subgroup labels (Rapidmail-style IA) */
.navSubgroupTitle {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  padding: 10px 12px 6px 14px;
  margin-top: 4px;
}

.navgroup-items .navSubgroupTitle:first-child {
  margin-top: 0;
  padding-top: 4px;
}

.nav-vorlagen-steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  padding: 6px 14px 12px 14px;
  margin: 0 4px 4px;
  border-radius: 12px;
  background: #f1f5f9;
  font-size: 13px;
  font-weight: 600;
}
.nav-vorlagen-steps a {
  color: #475569;
  text-decoration: none;
  padding: 4px 6px;
  border-radius: 8px;
}
.nav-vorlagen-steps a:hover {
  color: #1e293b;
  background: #e2e8f0;
}
.nav-vorlagen-steps a.is-active {
  color: #1d4ed8;
  background: #e0e7ff;
}
.nav-vorlagen-dot {
  color: #94a3b8;
  user-select: none;
}

/* Dashboard spacing + world map */
.dashboard-home--padded {
  padding-bottom: 8px;
}

.layout .main {
  padding: 28px 40px 56px;
}

.layout .main.main--dashboard {
  padding: 14px 16px 32px;
}

.layout .main.main--dashboard .topbar {
  margin-bottom: 16px;
}

@media (min-width: 1100px) {
  .layout .main.main--dashboard {
    padding: 16px 22px 40px;
  }
}

.main--dashboard .dashboard-home {
  max-width: none;
  margin: 0;
}

.dash-hero--toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.dash-hero-actions {
  flex-shrink: 0;
}

.dash-panel-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 10px 0;
}

.dash-map-legend-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 8px 0;
  padding: 8px 12px;
  background: #f1f5f9;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.dash-legend-scale {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.dash-legend-scale i {
  display: block;
  width: 18px;
  height: 9px;
  border-radius: 2px;
}

.dash-legend-scale i:nth-child(1) {
  background: #bfdbfe;
}
.dash-legend-scale i:nth-child(2) {
  background: #60a5fa;
}
.dash-legend-scale i:nth-child(3) {
  background: #2563eb;
}
.dash-legend-scale i:nth-child(4) {
  background: #1e3a8a;
}

.dash-prefs-card {
  width: min(520px, calc(100vw - 32px));
}

.dash-prefs-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.dash-pref-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 14px;
  color: #334155;
  cursor: pointer;
}

.dash-prefs-divider {
  height: 1px;
  background: var(--line);
  margin: 18px 0 14px;
}

.dash-prefs-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.layout .main.main--leads {
  padding: 14px 16px 32px;
}

@media (min-width: 1100px) {
  .layout .main.main--leads {
    padding: 16px 22px 40px;
  }
}

.leads-toolbar-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 10px;
}

.leads-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.leads-import-details {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px 16px;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.leads-import-summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  color: #334155;
  letter-spacing: 0.02em;
}

.leads-import-summary::marker,
.leads-import-summary::-webkit-details-marker {
  color: #64748b;
}

.leads-import-form {
  margin-top: 14px;
}

/* CSV-Import: kompakte feste Spalten — nicht über volle Kartenbreite */
.leads-page .leads-import-grid {
  display: grid;
  grid-template-columns:
    minmax(200px, 240px)
    minmax(132px, 168px)
    minmax(132px, 168px);
  gap: 12px 14px;
  align-items: end;
  justify-content: start;
  width: fit-content;
  max-width: 100%;
}

.leads-page .leads-import-grid .account-field input[type="text"],
.leads-page .leads-import-grid .account-field input[type="file"] {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.leads-page .leads-import-cell--company {
  grid-column: 1 / 2;
}

.leads-page .leads-import-actions {
  grid-column: 2 / 4;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  gap: 8px;
}

.leads-page .leads-import-actions .btn {
  min-width: 0;
  white-space: nowrap;
  padding-left: 1rem;
  padding-right: 1rem;
}

.leads-page .leads-filter-form {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #e2e8f0;
}

.leads-page .leads-filter-head {
  margin-bottom: 10px;
}

.leads-page .leads-filter-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

/* Filter: schmale Spalten (Land / Plattform / Score) + Aktionen */
.leads-page .leads-filter-grid {
  display: grid;
  grid-template-columns:
    minmax(88px, 112px)
    minmax(140px, 200px)
    minmax(80px, 104px)
    auto;
  gap: 12px 14px;
  align-items: end;
  justify-content: start;
  width: fit-content;
  max-width: 100%;
}

.leads-page .leads-filter-grid .account-field input[type="text"],
.leads-page .leads-filter-grid .account-field input[type="number"] {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.leads-page .leads-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
  padding-left: 4px;
}

.leads-page .leads-filter-actions .btn {
  min-width: 0;
  white-space: nowrap;
  padding-left: 0.9rem;
  padding-right: 0.9rem;
}

@media (max-width: 960px) {
  .leads-page .leads-import-grid {
    grid-template-columns: minmax(0, 320px);
    width: 100%;
    justify-content: stretch;
  }

  .leads-page .leads-import-cell--company,
  .leads-page .leads-import-actions {
    grid-column: 1 / -1;
  }

  .leads-page .leads-import-actions {
    justify-content: flex-start;
  }

  .leads-page .leads-import-actions .btn {
    width: auto;
  }

  .leads-page .leads-filter-grid {
    grid-template-columns: minmax(0, 320px);
    width: 100%;
    justify-content: stretch;
  }

  .leads-page .leads-filter-actions {
    grid-column: 1 / -1;
    padding-left: 0;
    justify-content: flex-start;
  }

  .leads-page .leads-filter-actions .btn {
    flex: 0 1 auto;
  }
}

.leads-email-cell {
  font-size: 13px;
  line-height: 1.35;
  word-break: break-word;
}

.dash-map-panel {
  padding: 22px 24px 20px;
}

.dash-map-wrap {
  position: relative;
  margin-top: 8px;
  border-radius: 18px;
  border: 1px solid #cbd5e1;
  background: linear-gradient(180deg, #eef2f7 0%, #f8fafc 55%, #e2e8f0 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
  overflow: hidden;
}

.dash-map-object {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(520px, 58vh);
  min-height: 320px;
  filter: contrast(1.06) saturate(1.08);
}

.dash-map-tooltip {
  position: fixed;
  z-index: 2000;
  max-width: 280px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #0f172a;
  color: #f8fafc;
  font-size: 13px;
  line-height: 1.45;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.35);
  pointer-events: none;
}

.dash-map-tooltip.hidden {
  display: none;
}

.dash-map-tooltip .dash-tip-muted {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  color: #94a3b8;
}

.disc-tier {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
}

.disc-tier--high {
  background: #d1fae5;
  color: #065f46;
}

.disc-tier--medium {
  background: #fef3c7;
  color: #92400e;
}

.disc-tier--low {
  background: #fee2e2;
  color: #991b1b;
}

.disc-tier--na {
  background: #f1f5f9;
  color: #64748b;
}

.dashboard-pro-v2 {
  --dash-region-on: #2563eb;
}

.dash-sofort-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 12px 16px;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.dash-sofort-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  margin-right: 4px;
}

.dash-sofort-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: #1e3a8a;
  background: #fff;
  border: 1px solid #dbe4f0;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.dash-sofort-pill:hover {
  background: #eef4ff;
  border-color: #c7d7f7;
  transform: translateY(-1px);
}

.dash-panel {
  margin-bottom: 4px;
}

.dash-kpi--click {
  cursor: pointer;
  text-align: left;
  font: inherit;
  width: 100%;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.dash-kpi--click:hover,
.dash-kpi--click:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.1);
  border-color: #cbd5e1;
  outline: none;
}

.dash-kpi--click:focus-visible {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.35);
}

.dash-kpi-hint {
  display: block;
  margin-top: 10px;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.04em;
}

.dash-globe-card {
  background: linear-gradient(180deg, #f1f5f9 0%, #fff 28%);
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 36px rgba(15, 23, 42, 0.06);
}

.dash-globe-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 6px;
}

.dash-globe-head-left {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.dash-globe-pin {
  color: #23439b;
  flex-shrink: 0;
  margin-top: 2px;
}

.dash-globe-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.dash-globe-link {
  flex-shrink: 0;
}

.dash-globe-kpi-line {
  margin: 0 0 10px 0;
  font-size: 14px;
  font-weight: 600;
  color: #334155;
}

.dash-legend-scale--5 i:nth-child(5) {
  background: #172554;
}

.dash-region-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.dash-region-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #fff;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: box-shadow 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.dash-region-card:hover,
.dash-region-card:focus-visible {
  border-color: #c7d7f7;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
  outline: none;
}

.dash-region-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dash-region-name {
  font-size: 12px;
  font-weight: 700;
  color: #475569;
}

.dash-region-val {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
}

.dash-region-sub {
  font-size: 11px;
  line-height: 1.35;
}

.dash-map-tooltip--rich {
  max-width: 300px;
  padding: 14px 16px;
}

.dash-map-tip-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.dash-map-tip-pin {
  font-size: 14px;
  line-height: 1;
}

.dash-map-tip-title {
  font-weight: 800;
  font-size: 14px;
}

.dash-map-tip-region {
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 8px;
}

.dash-map-tip-sep {
  height: 1px;
  background: rgba(148, 163, 184, 0.45);
  margin: 0 0 10px 0;
}

.dash-map-tip-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  font-size: 12px;
}

.dash-map-tip-metrics div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dash-map-tip-metrics span {
  color: #94a3b8;
  font-size: 11px;
}

.dash-map-tip-metrics strong {
  font-size: 13px;
  font-weight: 700;
  color: #f8fafc;
}

.dash-map-tip-empty {
  margin: 0;
  font-size: 13px;
  color: #cbd5e1;
}

.dash-map-tip-aliases {
  margin-top: 10px;
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.35;
}

.dash-kpi-modal-card {
  width: min(520px, calc(100vw - 28px));
  max-height: min(85vh, 640px);
  display: flex;
  flex-direction: column;
}

.dash-kpi-modal-card .modal-body {
  overflow: auto;
}

.dash-modal-dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 20px;
  margin: 0;
  font-size: 14px;
}

.dash-modal-dl dt {
  margin: 0;
  color: #64748b;
  font-weight: 600;
}

.dash-modal-dl dd {
  margin: 0;
  font-weight: 800;
  color: #0f172a;
  text-align: right;
}

.dash-modal-kv {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  font-size: 13px;
}

.dash-modal-kv li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9;
}

.dash-modal-kv li:last-child {
  border-bottom: none;
}

.dash-modal-kv strong {
  font-weight: 800;
  color: #0f172a;
}

@media (max-width: 720px) {
  .layout .main {
    padding: 20px 16px 40px;
  }
}

/* —— Global table readability + campaigns —— */
.main .data-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

.campaigns-page-v3 .data-table-wrap {
  overflow-x: auto;
  max-width: 100%;
}

.campaigns-page-v3 .campaigns-table {
  table-layout: fixed;
  width: 100%;
  min-width: 680px;
}

.campaigns-page-v3 .campaigns-table th,
.campaigns-page-v3 .campaigns-table td {
  vertical-align: top;
  word-break: break-word;
  hyphens: auto;
}

.campaigns-page-v3 .campaigns-table th:nth-child(1),
.campaigns-page-v3 .campaigns-table td:nth-child(1) {
  width: 26%;
}

.campaigns-page-v3 .campaigns-table th:nth-child(2),
.campaigns-page-v3 .campaigns-table td:nth-child(2) {
  width: 20%;
}

.campaigns-page-v3 .campaigns-table th:nth-child(3),
.campaigns-page-v3 .campaigns-table td:nth-child(3) {
  width: 18%;
}

.campaigns-page-v3 .campaigns-table th:nth-child(4),
.campaigns-page-v3 .campaigns-table td:nth-child(4) {
  width: 14%;
}

.campaigns-page-v3 .campaigns-table th:nth-child(5),
.campaigns-page-v3 .campaigns-table td:nth-child(5) {
  width: 22%;
}

.campaigns-page-v3 .campaigns-table .action-row .btn,
.campaigns-page-v3 .campaigns-table .action-row .btn-small {
  white-space: normal;
  text-align: center;
}

/* Sidebar: avoid overflow from long localized labels */
.sidenav .navitem {
  align-items: flex-start;
}

.sidenav .navitem .navicon {
  margin-top: 2px;
}

.sidenav .navitem span:not(.navicon) {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.35;
}

