.crm2026h-portal{
/* Light, clean UI (Glovo/eMAG-ish) */
--crm-primary:#ffcc00;
--crm-accent:#0ea5e9;
--crm-bg:#f5f7fb;
--crm-card:#ffffff;
--crm-radius:16px;
--crm-text:#0f172a;
--crm-muted:#64748b;
--crm-title:#0f172a;
--crm-base:14px;
--crm-title-size:18px;
}
.crm2026h-portal *{box-sizing:border-box}
.crm2026h-portal{display:flex;min-height:72vh;gap:22px;padding:18px;border-radius:18px;background:var(--crm-bg); color:var(--crm-text); font-size:var(--crm-base)}
.crm2026h-sidebar{width:280px;background:rgba(255,255,255,.72);backdrop-filter: blur(12px);border:1px solid rgba(148,163,184,.25);border-radius:22px;padding:18px;box-shadow:0 12px 28px rgba(15,23,42,.08)}
.crm2026h-brand{display:flex;align-items:center;gap:12px;margin-bottom:16px}
.crm2026h-logo{width:44px;height:44px;border-radius:16px;overflow:hidden;display:flex;align-items:center;justify-content:center;background:color-mix(in srgb,var(--crm-primary) 14%, white)}
.crm2026h-logo img{width:100%;height:100%;object-fit:cover}
.crm2026h-logo-dot{width:18px;height:18px;border-radius:999px;background:var(--crm-primary)}
.crm2026h-brand-title{font-weight:900;letter-spacing:-.02em;color:var(--crm-title)}
.crm2026h-brand-sub{font-size:12px;color:var(--crm-muted)}
.crm2026h-nav{display:flex;flex-direction:column;gap:6px;margin-top:10px}
.crm2026h-nav-item{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:14px;color:var(--crm-text);text-decoration:none;font-weight:650}
.crm2026h-nav-item:hover{background:rgba(241,245,249,.9)}
.crm2026h-nav-item.active{background:color-mix(in srgb,var(--crm-primary) 13%, white);color:color-mix(in srgb,var(--crm-primary) 90%, #0f172a);font-weight:800}
.crm2026h-ico{display:inline-flex;width:18px;height:18px;align-items:center;justify-content:center;border-radius:6px;background:rgba(148,163,184,.18)}
.crm2026h-sidebar-footer{margin-top:18px;padding-top:12px;border-top:1px solid rgba(148,163,184,.22)}
.crm2026h-mini{font-size:12px;color:#334155;text-decoration:none}
.crm2026h-mini:hover{text-decoration:underline}

/* --- FixFlow UI2026 helpers (match PV native look) --- */
.fftop{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}
.fftop h2{margin:0;font-size:18px;letter-spacing:-.02em;color:#0f172a}
.ffrow{display:flex;gap:8px;flex-wrap:wrap}
.ffrow .btn{flex:1}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:12px 14px;border-radius:14px;border:1px solid rgba(37,99,235,.20);background:rgba(255,180,0,0.60);color:var(--crm-text);font-weight:900;cursor:pointer}
.btn:hover{filter:brightness(0.98)}
.btn.btn-danger{background:#ef4444;color:#fff;border-color:#ef4444}
.btn.btn-ghost{background:#fff;border-color:rgba(148,163,184,.35)}

.crm2026h-pipeline-settings{border:1px solid rgba(148,163,184,.25);border-radius:18px;background:rgba(255,255,255,.72);padding:10px}
.crm2026h-pipeline-settings > summary{list-style:none;outline:none}
.crm2026h-pipeline-settings > summary::-webkit-details-marker{display:none}
.crm2026h-pipeline-settings > summary{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:14px;background:#fff;border:1px solid rgba(148,163,184,.25)}
.crm2026h-pipeline-settings[open] > summary{margin-bottom:10px}

/* Pipeline settings: stack everything vertically (UI2026) */
.crm2026h-pipeline-settings-form{display:flex;flex-direction:column;gap:12px;align-items:flex-start}
.crm2026h-pipeline-settings-form > div{width:100%}

/* Pipeline top actions: stack "Clienți" and "Taskuri" one under another */
.crm2026h-pipeline-actions{flex-direction:column;align-items:flex-start}
.crm2026h-pipeline-actions .btn{flex:0 0 auto;width:auto}

.crm2026h-main{flex:1;min-width:0}
.crm2026h-topbar{display:flex;justify-content:space-between;align-items:center;margin:4px 2px 14px}
.crm2026h-search input{width:360px;max-width:56vw;padding:11px 12px;border:1px solid rgba(148,163,184,.35);border-radius:16px;background:rgba(255,255,255,.75);outline:none}
.crm2026h-user{display:flex;align-items:center;gap:10px;color:var(--crm-title);font-weight:800}
.crm2026h-badge{font-size:12px;padding:6px 10px;border-radius:999px;background:rgba(16,185,129,.12);color:#065f46;border:1px solid rgba(16,185,129,.25)}
.crm2026h-badge-warn{background:rgba(245,158,11,.12);color:#92400e;border:1px solid rgba(245,158,11,.25)}
.crm2026h-renew{display:inline-block;padding:8px 12px;border-radius:999px;background:#ef4444;color:#fff;text-decoration:none;font-weight:700;margin-right:10px}
.crm2026h-renew:hover{opacity:.92}
.crm2026h-renew-wrap{margin-top:10px;display:flex;flex-direction:column;gap:6px}
.crm2026h-renew-side{width:fit-content;margin-right:0;font-size:12px;padding:8px 10px}
.crm2026h-renew-hint{font-size:12px;color:#b91c1c;font-weight:700}
.crm2026h-ro-banner{margin:10px 0 14px 0;padding:10px 12px;border-radius:12px;background:rgba(245,158,11,.12);border:1px solid rgba(245,158,11,.25);color:#92400e;font-weight:600}

.crm2026h-card{background:var(--crm-card);border-radius:var(--crm-radius);padding:16px;box-shadow:0 14px 30px rgba(15,23,42,.08);border:1px solid rgba(148,163,184,.18);position:relative;overflow:hidden}
.crm2026h-card-top{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}
.crm2026h-card h3,.crm2026h-card h2{margin:0;letter-spacing:-.02em;color:var(--crm-title);font-size:var(--crm-title-size)}
.crm2026h-muted{color:var(--crm-muted)}
.crm2026h-pill{font-size:12px;padding:6px 10px;border-radius:999px;background:rgba(14,165,233,.10);border:1px solid rgba(14,165,233,.20);color:#075985;font-weight:700}
.crm2026h-btn{background:var(--crm-primary);color:#fff;border:none;padding:10px 14px;border-radius:999px;font-weight:800;cursor:pointer}
.crm2026h-btn-sm{padding:8px 12px;font-size:12px;border-radius:12px;line-height:1.2}
.crm2026h-btn.crm2026h-btn-green{background:#22c55e;color:#fff}
.crm2026h-btn.crm2026h-btn-green:hover{filter:brightness(0.95)}

/* Global danger/red button (UI 2026) */
.crm2026h-btn.crm2026h-btn-red{background:#ef4444;color:#fff;border-color:transparent}
.crm2026h-btn.crm2026h-btn-red:hover{filter:brightness(0.95)}
.crm2026h-btn.crm2026h-btn-red::before{content:"✕ ";font-weight:800}

/* Make sure buttons never become transparent due to theme overrides */
.crm2026h-wrap .crm2026h-btn,
.crm2026h-wrap button,
.crm2026h-wrap a.crm2026h-btn,
.crm2026h-wrap input[type=submit]{opacity:1}

/* File input button visibility */
.crm2026h-wrap input[type=file]::file-selector-button{background:#e2e8f0;border:1px solid rgba(15,23,42,.12);color:#0f172a;border-radius:12px;padding:10px 12px;cursor:pointer}
.crm2026h-wrap input[type=file]::file-selector-button:hover{filter:brightness(0.97)}

/* Legacy buttons used in some sections (Settings/Programări) – align to new colors */
.crm2026h-wrap .ffset-btn.primary{background:#22c55e !important;color:#fff !important;border-color:transparent !important;opacity:1 !important}
.crm2026h-wrap .ffset-btn.primary::before{content:""}
.crm2026h-wrap .ffset-btn{background:#ef4444 !important;color:#fff !important;border-color:transparent !important;opacity:1 !important}
.crm2026h-wrap .ffset-btn::before{content:"✕ ";font-weight:800}

.crm2026h-wrap .ffap-btn2.primary{background:#22c55e !important;color:#fff !important;border-color:transparent !important;opacity:1 !important}
.crm2026h-wrap .ffap-btn2.ghost{background:#ef4444 !important;color:#fff !important;border-color:transparent !important;opacity:1 !important}
.crm2026h-wrap .ffap-btn2.ghost::before{content:"✕ ";font-weight:800}

/* Tables: keep cells aligned and avoid button overlap */
.crm2026h-card table.widefat td,
.crm2026h-card table.widefat th{vertical-align:middle}
.crm2026h-btn.secondary{background:#0f172a}
.crm2026h-btn.ghost{background:transparent;border:1px solid rgba(148,163,184,.35);color:var(--crm-text)}
.crm2026h-btn:disabled{opacity:.55;cursor:not-allowed}

/* Table actions (avoid overlap) */
.crm2026h-actions{display:flex;flex-direction:column;gap:10px;align-items:stretch;justify-content:center}
.crm2026h-actions a{display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;width:100%}

/* --- Table UI fixes (clients list) --- */
.crm2026h-table td{vertical-align:middle}
.crm2026h-table td:last-child{min-width:130px}
.crm2026h-actions a{font-size:12px;padding:8px 10px}

/* Status pill alignment */
.crm2026h-pill{display:inline-flex;align-items:center;justify-content:center;line-height:1.25;white-space:nowrap}

/* Stronger overrides for WP/Elementor table styling */
.crm2026h-card .widefat td{vertical-align:middle}
.crm2026h-card .widefat td:last-child{min-width:140px}
.crm2026h-card .widefat td .crm2026h-actions{width:100%}
.crm2026h-card .widefat td .crm2026h-actions a{display:inline-flex !important;width:100% !important;margin:0 !important}

/* Cashbook widget spacing */
.crm2026h-widget-body .crm2026h-btn{margin-top:10px}

/* Make widget content scrollable and show a visible scrollbar */
.crm2026h-widget .crm2026h-widget-body{overflow:auto;scrollbar-gutter:stable}
.crm2026h-widget .crm2026h-widget-body::-webkit-scrollbar{width:10px;height:10px}
.crm2026h-widget .crm2026h-widget-body::-webkit-scrollbar-thumb{background:rgba(100,116,139,.35);border-radius:999px}
.crm2026h-widget .crm2026h-widget-body::-webkit-scrollbar-track{background:transparent}

/* Dashboard top bar: more compact and "app-like" */
.crm2026h-dashbar .crm2026h-card-top{padding:14px 16px}
.crm2026h-dashbar h2{margin:0;font-size:18px}
.crm2026h-dash-actions{display:flex;gap:10px;align-items:center}
.crm2026h-dash-actions .crm2026h-btn{padding:10px 14px}
/* Force the action buttons to stay on one line (some themes override buttons to full-width blocks) */
.crm2026h-card-top .crm2026h-dash-actions{display:flex !important;flex-direction:row !important;flex-wrap:wrap;align-items:center !important;justify-content:flex-end}
.crm2026h-card-top .crm2026h-dash-actions .crm2026h-btn{white-space:nowrap}

/* Grid */
.crm2026h-gridwrap{position:relative;border-radius:18px}
.crm2026h-gridwrap.editing{background-image: linear-gradient(to right, rgba(148,163,184,.18) 1px, transparent 1px), linear-gradient(to bottom, rgba(148,163,184,.14) 1px, transparent 1px); background-size: calc((100%)/12) 80px; padding: 10px;}
.crm2026h-grid{position:relative;min-height:320px}
.crm2026h-widget{position:absolute;touch-action:none}
.crm2026h-widget{display:flex;flex-direction:column}
.crm2026h-widget .crm2026h-card-top{flex:0 0 auto}
.crm2026h-widget .crm2026h-widget-body{flex:1 1 auto;overflow:auto;padding:14px;max-height:calc(100% - 56px)}
.crm2026h-widget .crm2026h-widget-body::-webkit-scrollbar{width:10px;height:10px}
.crm2026h-widget .crm2026h-widget-body::-webkit-scrollbar-thumb{background:rgba(148,163,184,.45);border-radius:10px}
.crm2026h-widget .crm2026h-widget-body::-webkit-scrollbar-track{background:transparent}
.crm2026h-widget .crm2026h-resize{display:none;position:absolute;right:10px;bottom:10px;width:14px;height:14px;border-radius:4px;background:rgba(15,23,42,.18);border:1px solid rgba(148,163,184,.35);cursor:nwse-resize}
.crm2026h-widget.editing{outline:2px dashed rgba(14,165,233,.35)}
.crm2026h-widget.editing .crm2026h-resize{display:block}
.crm2026h-widget.editing .crm2026h-dragbar{display:flex}
.crm2026h-dragbar{display:none;align-items:center;gap:8px;font-weight:900;color:var(--crm-muted)}
.crm2026h-dragbar span{cursor:grab}

/* v0.8.1 Desktop FULL WIDTH (escape theme containers)
   NOTE: 100vw breakout can slide content under the CRM sidebar in some themes.
   Keep portal stable by default.
*/
.crm2026h-fullwidth{
  width:100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.crm2026h-portal{
  width:100% !important;
  max-width:none !important;
}
.crm2026h-gridwrap{width:100% !important; max-width:none !important;}
/* Prevent horizontal clipping */
.crm2026h-fullwidth{overflow-x:hidden}

.crm2026h-gridwrap{position:relative;width:100%}

/* UI Polish: sidebar icons */
.crm2026h-nav-item{display:flex;align-items:center;gap:10px}
.crm2026h-ico{width:18px;height:18px;display:inline-flex;align-items:center;justify-content:center;flex:0 0 18px;opacity:.9}
.crm2026h-ico svg{width:18px;height:18px;display:block;fill:currentColor}
.crm2026h-nav-label{line-height:1.2}

/* FixFlow Business App Embed: hide CRM chrome when loaded inside /fixflow/app */
.crm-toolbar.ff-embed{display:none !important}
.crm2026h-portal.ff-embed{padding:0 !important;gap:0 !important;min-height:100vh !important;background:transparent !important;border-radius:0 !important}
.crm2026h-portal.ff-embed .crm2026h-sidebar{display:none !important}
.crm2026h-portal.ff-embed .crm2026h-topbar{display:none !important}
.crm2026h-portal.ff-embed .crm2026h-ro-banner{margin:0 0 10px !important;border-radius:0 !important}
.crm2026h-portal.ff-embed .crm2026h-main{margin:0 !important;padding:12px 12px 70px !important}

/* FixFlow Embed Mode (ff_embed=1): hide site/theme menus + admin bars so iframe shows only content */
body.ff-embed #wpadminbar,
body.ff-embed header,
body.ff-embed nav,
body.ff-embed footer,
body.ff-embed .site-header,
body.ff-embed .site-footer,
body.ff-embed #masthead,
body.ff-embed #colophon,
body.ff-embed .elementor-location-header,
body.ff-embed .elementor-location-footer,
body.ff-embed .header,
body.ff-embed .footer,
body.ff-embed .top-bar,
body.ff-embed .navbar,
body.ff-embed .menu,
body.ff-embed .main-navigation{display:none !important;}

body.ff-embed,
body.ff-embed #page,
body.ff-embed #content,
body.ff-embed .site,
body.ff-embed .site-content,
body.ff-embed .content-area,
body.ff-embed .entry-content,
body.ff-embed .container,
body.ff-embed .wrapper{max-width:none !important;width:100% !important;margin:0 !important;padding:0 !important;}

body.ff-embed{background:#f8fafc !important;overflow-x:hidden;}

/* UI Polish: widget scroll */
.crm-card-body{max-height:340px;overflow:auto}

/* Tasks form inputs */
.crm2026h-input{width:100%;padding:10px 12px;border:1px solid rgba(148,163,184,.35);border-radius:12px;background:rgba(255,255,255,.9)}
.crm2026h-input:focus{outline:none;border-color:rgba(59,130,246,.55);box-shadow:0 0 0 3px rgba(59,130,246,.15)}

/* File input */
.crm2026h-input[type=file]{padding:9px 10px}


/* === CRM2026H UI Polish v0.9.1.1 (Dashboard compact) === */

/* Dashboard toolbar (title + search) */
.crm2026h-dashboard .crm2026h-dash-left{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}
.crm2026h-dashboard .crm2026h-dash-search{
  height:32px;
  padding:0 10px;
  border-radius:12px;
  border:1px solid rgba(148,163,184,.35);
  background:rgba(255,255,255,.9);
  min-width:260px;
  max-width:46vw;
  font-size:12px;
  outline:none;
}
.crm2026h-dashboard .crm2026h-dash-search:focus{
  border-color: rgba(14,165,233,.55);
  box-shadow: 0 0 0 3px rgba(14,165,233,.12);
}

/* Compact buttons only on dashboard */
.crm2026h-dashboard .crm2026h-btn.crm2026h-btn-compact{
  padding:8px 12px;
  font-size:12px;
  border-radius:12px;
  line-height:1.2;
  font-weight:800;
}

/* Dash actions wrap nicely on small screens */
.crm2026h-dashboard .crm2026h-dash-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

/* Filtered items hint (optional) */
.crm2026h-dashboard .crm2026h-filter-item[style*="display: none"]{
  opacity:.25;
}

/* Smart highlight target (from ?hl=...) */
.crm2026h-hl-target.crm2026h-highlighted{
  outline:2px solid rgba(60,130,246,.9);
  border-radius:14px;
  box-shadow:0 0 0 6px rgba(60,130,246,.12);
  animation: crm2026hPulse 1.2s ease-in-out 0s 2;
}

@keyframes crm2026hPulse{
  0%{box-shadow:0 0 0 0 rgba(60,130,246,0)}
  50%{box-shadow:0 0 0 10px rgba(60,130,246,.14)}
  100%{box-shadow:0 0 0 0 rgba(60,130,246,0)}
}


/* =========================
   Pipeline / Kanban
   ========================= */
.crm2026h-kanban{
  display:grid;
  grid-template-columns: repeat(6, minmax(240px, 1fr));
  gap:12px;
  align-items:start;
  overflow:auto;
  padding-bottom:6px;
}

/* Warranty / Returns column highlight */
.crm2026h-kanban-col[data-status="warranty"]{
  border:2px solid rgba(245,158,11,.55);
  background: rgba(255,247,237,.92);
}
.crm2026h-kanban-col[data-status="warranty"] .crm2026h-kanban-col-head{
  background: rgba(255,247,237,.92);
  border-bottom:1px solid rgba(245,158,11,.35);
}

.crm2026h-kanban-col{
  background: var(--crm-card);
  border:1px solid rgba(0,0,0,.06);
  border-radius:18px;
  overflow:hidden;
  min-height: 360px;
  display:flex;
  flex-direction:column;
}

.crm2026h-kanban-col-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:10px 12px;
  border-bottom:1px solid rgba(0,0,0,.06);
  position:sticky;
  top:0;
  background: var(--crm-card);
  z-index:2;
}

.crm2026h-kanban-col-title{
  font-weight:800;
  font-size:13px;
}

.crm2026h-kanban-col-count{
  font-size:12px;
  padding:4px 8px;
  border-radius:999px;
  background: rgba(0,0,0,.06);
}

.crm2026h-kanban-dropzone{
  padding:10px 12px;
  display:flex;
  flex-direction:column;
  gap:10px;
  overflow:auto;
  max-height: calc(100vh - 260px);
  overscroll-behavior: contain;
}

.crm2026h-kanban-card{
  border:1px solid rgba(0,0,0,.08);
  border-radius:16px;
  padding:10px 10px;
  background:#fff;
  cursor:grab;
  user-select:none;
}

.crm2026h-kanban-card:active{ cursor:grabbing; }

.crm2026h-kanban-card-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.crm2026h-kanban-card-name{
  font-weight:800;
  font-size:13px;
}

.crm2026h-kanban-card-open{
  font-size:12px;
  text-decoration:none;
  padding:4px 8px;
  border-radius:10px;
  border:1px solid rgba(0,0,0,.10);
}

.crm2026h-kanban-card-meta{
  margin-top:6px;
  font-size:12px;
  opacity:.8;
}

.crm2026h-kanban-card-tags{
  margin-top:6px;
  font-size:12px;
  opacity:.75;
}

.crm2026h-kanban-card-actions{
  margin-top:10px;
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  align-items:center;
}

.crm2026h-kanban-card-actions-label{
  font-size:11px;
  opacity:.7;
  margin-right:2px;
}

.crm2026h-kb-move{
  font-size:11px;
  padding:4px 8px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.12);
  background:#fff;
  cursor:pointer;
}

.crm2026h-kb-move:disabled{
  opacity:.45;
  cursor:default;
}

.crm2026h-kanban-dropzone.crm2026h-drop-hover{
  outline:2px dashed rgba(60,130,246,.6);
  outline-offset:-6px;
  border-radius:14px;
}

@media (max-width: 1200px){
  .crm2026h-kanban{ grid-template-columns: repeat(6, minmax(220px, 1fr)); }
}


/* toast */
.crm2026h-toast{
  position: fixed;
  right: 16px;
  bottom: 16px;
  background: rgba(20,20,20,.92);
  color:#fff;
  padding:10px 12px;
  border-radius:14px;
  font-size:12px;
  opacity:0;
  transform: translateY(8px);
  transition: all .2s ease;
  z-index: 999999;
}
.crm2026h-toast.show{
  opacity:1;
  transform: translateY(0);
}

/* === Offers (CRUD) layout === */
.crm2026h-offers-layout{
  display:grid;
  grid-template-columns: minmax(320px, 520px) minmax(360px, 1fr);
  gap:14px;
  align-items:start;
  width:100%;
}
@media (max-width: 1200px){
  .crm2026h-offers-layout{grid-template-columns:1fr;}
}


/* === Offers mobile fixes === */
.crm2026h-offers-table td.crm2026h-col-active,
.crm2026h-offers-table th.crm2026h-col-active{
  width:64px;
  min-width:64px;
  text-align:center;
}
.crm2026h-offers-table input.crm2026h-active-toggle{
  transform: scale(1.25);
}
@media (max-width: 900px){
  .crm2026h-offer-active-wrap{
    justify-content:flex-start !important;
    align-items:center !important;
  }
  .crm2026h-offer-active-wrap input.crm2026h-active-toggle{
    transform: scale(1.35);
  }

  /* Offer form grid: make "Activ" visible on mobile */
  .crm2026h-offer-form-grid{
    grid-template-columns: 1fr 1fr !important;
  }
  .crm2026h-offer-form-grid .crm2026h-offer-active-wrap{
    grid-column: 1 / -1;
    padding-top: 6px;
  }
}

