/* AcnoFin TeamAct CRM — approved light reference UI, real CRM markup.
   Design-only override. Existing application controls and backend actions remain intact.
   Reference palette/layout are from the user-supplied AcnoFin prototype.
*/
:root{
  --red:#ec182a;--red-dark:#c90d20;--red-light:#fff0f1;
  --teal:#04a6b6;--teal-deep:#087d93;--teal-light:#e9fafb;
  --page:#f3f8fc;--surface:#fff;--surface-soft:#f9fcff;--surface-strong:#edf6fa;
  --ink:#172e42;--muted:#64788c;--line:#e2ebf3;--line-strong:#d6e3ec;
  --nav:#fff;--nav-soft:#f0f7fa;--brand:#ec182a;--brand-dark:#c90d20;
  --brand-light:#fff0f1;--shadow:0 2px 12px rgba(32,79,112,.055);
  --large-shadow:0 22px 60px #06182c28;--radius:14px;--sidebar-width:244px;
  --good:#0b996a;--good-bg:#e5faf2;--warn:#976419;--warn-bg:#fff7e9;
  --bad:#ca2235;--bad-bg:#fff0f1;
}
body{background:var(--page);color:var(--ink);font:14px/1.45 Inter,ui-sans-serif,system-ui,-apple-system,'Segoe UI',Arial,sans-serif}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,a:focus-visible{outline:3px solid #7acbd8;outline-offset:2px}
.boot-brand{width:min(245px,80vw);height:auto;object-fit:contain}
/* Sidebar uses the original logo PNG itself, never recreated text or a cropped slice. */
.shell{background:var(--page)}
.sidebar{width:244px;min-width:244px;padding:13px 13px 17px;gap:0;background:#fff;color:#345167;border-right:1px solid var(--line);box-shadow:none}
.sidebar-brand{height:78px;min-height:78px;border-bottom:1px solid #eff3f7;margin:0 0 15px;padding:0 3px 8px;display:flex;align-items:center;justify-content:center;overflow:hidden}
.sidebar-brand .brand-logo{display:block;max-width:100%;width:194px;max-height:48px;height:auto;object-fit:contain;object-position:center}
.sidebar nav{padding:0;gap:5px;scrollbar-color:#d2e0e8 transparent}
.sidebar nav button{color:#345167;font-size:12px;min-height:43px;padding:11px 13px;border:0;gap:13px;border-radius:10px;font-weight:650}
.sidebar nav button svg{width:19px;height:19px;color:inherit;opacity:1}
.sidebar nav button:hover{background:#f0f7fa;color:#173c54}
.sidebar nav button.active,.sidebar nav button.special.active{background:linear-gradient(105deg,#f52a38,#d8081c);border:0;color:#fff;box-shadow:0 5px 10px rgba(232,25,44,.16)}
.sidebar nav button.active svg{color:#fff}
.sidebar nav button.special{border-top:0;border-radius:10px;margin-top:0;padding-top:11px}
.sidebar-spacer{min-height:11px}
.side-card{border:0;border-radius:13px;padding:16px 14px;min-height:142px;background:linear-gradient(148deg,#d8edfc 0%,#edf7ff 55%,#cfe7f7);position:relative;overflow:hidden}
.side-card:before{content:"";position:absolute;border:1px solid #ffffff91;width:175px;height:175px;border-radius:55px;transform:rotate(45deg);top:-100px;right:-95px;pointer-events:none}
.side-card-star{font-size:26px;color:var(--teal);position:relative;line-height:1}
.side-card strong{display:block;position:relative;color:#172e42;font-size:17px;line-height:1.24;font-weight:800;margin:10px 0 11px;white-space:normal;overflow:visible}
.side-card strong:after{content:"";display:block;height:3px;width:31px;background:var(--red);margin-top:10px}
.side-card small{position:relative;color:#34556a;font-size:11px;line-height:1.5}
.sidebar-bottom{text-align:center;color:#7d91a1;font-size:10px;margin-top:12px;padding:0}
/* App top bar and searchable, real on-page table filter. */
.main{width:calc(100% - 244px);max-width:none;min-width:0}
.topbar{height:66px;padding:0 23px;background:#fff;border-bottom:1px solid var(--line);gap:14px}
.topbar-left{flex:1;gap:13px}
.hamburger{display:grid;width:37px;height:37px;padding:9px;border:0;background:#fff;color:#34566a;place-items:center;border-radius:9px;min-height:37px}
.hamburger svg{height:18px;width:18px}
.hamburger:hover{background:#f0f7fa}
.top-search{display:flex;align-items:center;gap:10px;position:relative;max-width:550px;width:100%;padding:0 12px;border:1px solid var(--line);background:#f7fafc;color:#688095;border-radius:9px;min-width:150px}
.top-search svg{width:17px;height:17px;flex:none}
.top-search input{height:38px;min-height:38px;min-width:0;padding:0;border:0;box-shadow:none!important;background:transparent;color:var(--ink);font-size:12px}
.top-search kbd{white-space:nowrap;border:1px solid var(--line);background:#fff;padding:3px 7px;border-radius:6px;color:#63788d;font-size:10px}
.top-search-status:not(:empty){position:absolute;left:0;top:43px;border:1px solid var(--line);border-radius:9px;padding:8px 10px;background:#fff;box-shadow:var(--shadow);z-index:40;color:#426277;font-size:11px}
.topbar-actions{gap:9px;flex:none}
.local-badge{font-size:10px;font-weight:800;border:1px solid #ffdda1;background:#fff9ed;color:#8c5908;border-radius:100px;padding:6px 9px;white-space:nowrap}
.topbar .icon-button{border:0;border-radius:8px;background:#fff;color:#36556c;width:36px;height:36px}
.topbar .icon-button:hover{background:#f1f7fa;color:var(--red)}
.topbar #security,.topbar #logout{border:1px solid var(--line);background:#fff;color:#345167;font-weight:700}
.topbar #security:hover,.topbar #logout:hover{background:#f0f7fa!important;color:#345167}
.top-user{border-left:1px solid var(--line);margin:0;padding-left:12px}
.top-user .avatar{background:linear-gradient(135deg,#04a6b6,#087d93);border-radius:50%;width:35px;height:35px}
.top-user strong{font-size:12px;max-width:130px}
.top-user small{font-size:10px}
.workspace{max-width:1700px;padding:16px 20px 24px}
.workspace.is-home .page-heading{display:none}
.page-heading{align-items:center;margin:5px 0 17px}
.page-heading h1{font-size:23px;letter-spacing:-.5px}
.page-eyebrow{color:var(--red)}
.page-tag{background:var(--teal-light);border-color:#c8eaf0;color:var(--teal-deep)}
/* Keep all existing forms, table events, confirmation flows and permissions. */
.card{border:1px solid var(--line);border-radius:14px;background:#fff;box-shadow:var(--shadow);padding:17px;margin-bottom:14px}
.card h2{color:var(--ink);font-size:15px;letter-spacing:-.25px}
.card h2:before{background:var(--red);width:4px;height:16px}
.card .card{box-shadow:none}
.grid{gap:14px}
button:not(.icon-button):not(.action-tile):not(.hamburger):not([data-nav]){background:var(--red);color:#fff;border-radius:9px}
button:not(.icon-button):not(.action-tile):not(.hamburger):not([data-nav]):hover:not(:disabled){background:var(--red-dark)}
button.secondary:not(.icon-button),button#enableAll{background:#fff;color:#415a70;border:1px solid var(--line)}
button.secondary:hover:not(:disabled),button#enableAll:hover{background:#f0f6fa!important;color:#28566d}
button.danger:not(.icon-button),button#disableAll{background:var(--bad-bg);color:var(--bad);border:1px solid #f9cbd3}
button.danger:hover:not(:disabled),button#disableAll:hover{background:#ffe1e6!important;color:#b22943}
.field label{color:#486075}
input,select,textarea{border:1px solid var(--line-strong);background:#fff;color:var(--ink)}
input:focus,select:focus,textarea:focus{border-color:#7acbd8;box-shadow:0 0 0 3px #7acbd822}
input[type=checkbox]{accent-color:var(--teal)}
.note{background:#eef8fb;color:#526b7f;border:1px solid #d4eef2}
.note.good{background:#e8faf3;border-color:#bde8db;color:#187f68}
.pill{background:#e6f2ff;border-color:transparent;color:#0965a7;border-radius:6px}
.tablewrap th{background:#f4f8fc;color:#465e74}
.tablewrap td{border-bottom-color:#eaf0f5}
.table-tools,.tabs{border-color:var(--line)}
.lead-action-button{white-space:normal}
.lead-action-icon{object-fit:contain}
.footer{color:#71869a}
/* Dashboard: same sidebar/banner/cards/2-column composition as approved UI.
   Values, chart and feeds are sourced exclusively from real API response objects. */
.live-notice{font-size:11px;line-height:1.6;border:1px solid #ffdda1;background:#fff9ed;color:#855400;border-radius:10px;padding:9px 13px;margin-bottom:14px}
.live-notice b{font-weight:850}
.exact-dashboard .dashboard-intro{min-height:118px;padding:20px 27px;margin-bottom:14px;box-shadow:none;border:1px solid #e6f0f8;border-radius:12px;background:linear-gradient(115deg,#ffe2e6 0%,#fff6f7 35%,#dbf3ff 75%,#bde6f3);color:var(--ink)}
.exact-dashboard .dashboard-intro:after{width:260px;height:170px;right:5%;top:auto;bottom:-92px;border-color:#ffffffaa;border-radius:50%;box-shadow:0 0 0 28px #ffffff16,0 0 0 56px #ffffff12}
.exact-dashboard .dashboard-intro h2{font-size:clamp(21px,2.3vw,28px);letter-spacing:-.8px;color:var(--ink);margin:0 0 4px}
.exact-dashboard .dashboard-intro p{font-size:13px;color:#446074}
.banner-quote{align-self:center;text-align:right;font-size:13px;font-weight:750;font-style:italic;max-width:250px;position:relative;z-index:1}
.banner-quote small{display:block;font-size:11px;color:#647f91;font-style:normal;font-weight:500;margin-top:6px}
.exact-layout{display:grid;grid-template-columns:minmax(0,1.72fr) minmax(310px,.78fr);gap:14px;align-items:start}
.exact-left,.exact-right{min-width:0;display:grid;align-content:start;gap:14px}
.exact-dashboard .dashboard-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.exact-dashboard .stat-box{margin:0;min-height:124px;padding:15px 13px;border-radius:14px}
.exact-dashboard .stat-box .stat{font-size:23px;letter-spacing:-.65px;margin:8px 0 0}
.exact-dashboard .stat-title{font-size:11px;color:#476075;font-weight:650}
.exact-dashboard .stat-box .stat-foot{color:#6d8191;font-size:10px;line-height:1.35;margin-top:8px}
.exact-dashboard .stat-icon{width:39px;height:39px;background:var(--red-light);color:var(--red);border-radius:10px}
.exact-dashboard .stat-box:nth-child(even) .stat-icon{background:var(--teal-light);color:var(--teal-deep)}
.exact-dashboard .stat-box:nth-child(odd) .stat-icon{background:var(--red-light);color:var(--red)}
.exact-mid{display:grid;grid-template-columns:minmax(0,1.52fr) minmax(265px,.85fr);gap:14px;align-items:stretch}
.exact-dashboard .card:not(.stat-box){margin:0;padding:0;min-width:0}
.exact-card-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:16px 18px 8px}
.exact-card-head h2{display:flex;align-items:center;gap:8px;font-size:15px;letter-spacing:-.25px;font-weight:800;border:0;padding:0;margin:0}
.exact-card-head h2:before{display:none}
.exact-card-head svg{width:19px;height:19px;color:var(--red)}
.exact-card-head>span{font-size:10px;color:#64788c;white-space:nowrap}
.exact-link{border:0!important;background:transparent!important;color:#0c7192!important;font-size:11px!important;font-weight:800!important;white-space:nowrap;padding:4px 0!important;min-height:24px!important}
.exact-link:hover{background:transparent!important;text-decoration:underline}
.exact-chart{min-height:283px}
.chart-legend{display:flex;align-items:center;gap:10px;padding:4px 18px 2px;font-size:10px;color:#4d6578}
.chart-legend span{display:flex;align-items:center;gap:4px}.chart-legend i{width:8px;height:8px;border-radius:50%;display:inline-block}
.chart-legend .red-dot{background:var(--red)}.chart-legend .teal-dot{background:var(--teal)}.chart-legend small{margin-left:auto;font-size:9px}
.exact-chart-svg{display:block;width:100%;height:auto;max-height:230px;padding:0 13px}
.chart-grid line{stroke:#e1ebf3;stroke-width:1}.chart-axis text{fill:#8091a4;font-size:11px}
.chart-disclaimer{font-size:10px;color:#78899a;margin:0;padding:2px 14px 12px;line-height:1.5}
.chart-empty{padding:36px 16px;text-align:center;font-size:12px;color:var(--muted)}
.team-performance{padding:4px 15px 14px;display:grid;gap:15px}
.performance-item{display:grid;grid-template-columns:28px minmax(58px,1fr) minmax(40px,1fr) 25px;align-items:center;gap:7px;font-size:10px}
.avatar-sm{width:27px;height:27px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(135deg,#04a6b6,#087d93);color:white;font-size:9px;font-weight:800}
.performance-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:700}
.performance-item strong{font-size:10px;text-align:right}
.progress{height:8px;background:#dfebf3;border-radius:30px;overflow:hidden}.progress>span{display:block;height:100%;border-radius:30px;background:linear-gradient(90deg,#087f97,#08b3c0)}
.exact-quick .dash-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px;padding:12px 15px 14px}
.exact-quick .action-tile{justify-content:center;min-width:0;min-height:53px;padding:9px 7px;border-radius:9px;box-shadow:none;background:linear-gradient(120deg,#f02436,#d8081a);color:#fff;border:0;font-size:12px;font-weight:750;gap:7px;text-align:center}
.exact-quick .action-tile:nth-child(even){background:linear-gradient(110deg,#0ab6c4,#087e97)}
.exact-quick .action-tile:nth-child(4){background:#fff;border:1px solid var(--line);color:var(--ink)}
.exact-quick .action-tile .tile-icon{background:transparent;color:inherit;width:18px;height:18px}
.exact-quick .action-tile .tile-icon svg{width:17px;height:17px}
.exact-quick .action-tile small,.exact-quick .action-tile .tile-arrow{display:none}
.exact-quick .action-tile:hover{transform:translateY(-1px);box-shadow:0 4px 12px #173d5218}
.exact-feed .feed-list{padding:2px 15px 13px;margin:0}
.feed-item{display:flex;gap:10px;align-items:center;border-bottom:1px solid var(--line);padding:10px 0}
.feed-item:last-child{border:0}
.feed-icon{width:32px;height:32px;display:grid;place-items:center;background:#e5faf2;color:#05a36b;border-radius:10px;flex:none}
.feed-icon svg{width:16px;height:16px}
.feed-item>div{min-width:0;flex:1}.feed-item strong{display:block;font-size:11px;font-weight:800;overflow-wrap:anywhere}.feed-item p{font-size:10px;color:#577184;margin:1px 0 0}
.feed-item time{white-space:nowrap;align-self:flex-start;margin-left:auto;color:#7890a2;font-size:10px}
.exact-overview{padding-bottom:12px!important}.exact-overview .inline-stat{margin:0 15px;font-size:11px}
.exact-leads .tablewrap{margin:0 14px 12px;max-width:calc(100% - 28px)}
.exact-leads .tablewrap table{width:100%;border-collapse:collapse;white-space:normal;text-align:left}
.exact-leads .tablewrap th{padding:10px 8px;font-size:10px}
.exact-leads .tablewrap td{padding:10px 8px;font-size:11px}
.exact-leads .tablewrap td small{display:block;color:var(--muted);margin-top:3px}
/* Login mirrors light corporate brand, never modifies authentication JS or server. */
.auth-showcase{background:linear-gradient(130deg,#fff0f1,#f4fbff 65%,#cfe7f7);color:var(--ink)}
.auth-showcase:before,.auth-showcase:after{border-color:#9ad4e531}
.auth-head .login-brand-logo{display:block;width:min(290px,100%);height:auto;max-height:85px;object-fit:contain}
.auth-eyebrow{color:var(--teal-deep)}.auth-copy h2{color:var(--ink)}.auth-copy h2 span{color:var(--red)}
.auth-copy p,.auth-bottom{color:#486779}.auth-points span{color:#36566b;border-color:#bedce9;background:#ffffff99}
.login .login-emblem{background:var(--red-light);color:var(--red)}
/* The original prototype is light. Dark mode remains a browser-only optional control. */
html.theme-dark{--page:#0f1c2b;--surface:#172c3b;--surface-soft:#203546;--surface-strong:#254254;--ink:#eaf5fb;--muted:#a6bccb;--line:#344c5c;--line-strong:#476275;--nav:#172c3b;--brand:#ff5260;--brand-dark:#eb3345;--brand-light:#432d3b}
html.theme-dark .sidebar,html.theme-dark .topbar,html.theme-dark .card,html.theme-dark input,html.theme-dark select,html.theme-dark textarea{background:var(--surface);color:var(--ink)}
html.theme-dark .sidebar nav button,html.theme-dark .top-user strong{color:var(--ink)}
html.theme-dark .sidebar nav button.active{color:#fff}
html.theme-dark .side-card,html.theme-dark .dashboard-intro{color:#172e42}
html.theme-dark .exact-dashboard .dashboard-intro h2{color:#172e42}
html.theme-dark .exact-dashboard .dashboard-intro p{color:#446074}
html.theme-dark .top-search{background:var(--surface-soft)}
html.theme-dark .top-search input,html.theme-dark .top-search kbd{background:transparent;color:var(--ink)}
html.theme-dark .local-badge,html.theme-dark .live-notice{background:#47381f;color:#ffe2b6;border-color:#766344}
html.theme-dark .exact-leads .tablewrap th{background:var(--surface-soft);color:var(--ink)}
@media(max-width:1450px){.exact-layout{grid-template-columns:minmax(0,1.3fr) minmax(265px,.7fr)}.exact-mid{grid-template-columns:1fr}.exact-dashboard .dashboard-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.local-badge{display:none}}
@media(max-width:1100px){.exact-layout{grid-template-columns:1fr}.exact-right{grid-template-columns:1fr 1fr}.exact-overview{grid-column:1/-1}.exact-dashboard .dashboard-stats{grid-template-columns:repeat(4,minmax(0,1fr))}.exact-mid{grid-template-columns:1.4fr 1fr}.top-search{max-width:330px}}
@media(max-width:900px){.exact-mid{grid-template-columns:1fr}.exact-dashboard .dashboard-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.top-search{max-width:220px}.topbar #security{display:none}.sidebar{min-width:244px}}
@media(max-width:800px){.sidebar{position:fixed;min-width:0;width:min(280px,84vw);height:100dvh}.main{width:100%}.topbar{height:60px;padding:0 12px;gap:8px}.top-search kbd{display:none}.topbar-actions{gap:5px}.top-user{padding-left:8px}.workspace{padding:12px}.exact-layout,.exact-right,.exact-mid{grid-template-columns:1fr}.exact-overview{grid-column:auto}.banner-quote{display:none}.exact-card-head{padding:13px 12px 6px}.exact-dashboard .dashboard-intro{padding:19px}.topbar #logout span{display:none}.topbar #logout{padding:9px!important;width:38px;height:38px}.topbar .top-user .user-info{display:none}}
@media(max-width:390px){.exact-dashboard .dashboard-stats{gap:7px}.exact-dashboard .stat-box{padding:12px 9px}.exact-dashboard .stat-box .stat{font-size:20px}.exact-dashboard .stat-icon{width:32px;height:32px}.exact-quick .dash-actions{gap:7px;padding:10px}.exact-quick .action-tile{font-size:10px}.chart-legend small{display:none}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}

/* Integration v2: preserve approved centered modal styling over generic theme button rules. */
.crm-dialog,.crm-result-dialog{position:fixed!important;inset:0!important;margin:auto!important;max-height:calc(100dvh - 24px);overflow-y:auto;}
.crm-dialog::backdrop,.crm-result-dialog::backdrop{background:rgba(9,20,41,.56)!important;backdrop-filter:blur(3px);}
.crm-dialog button.crm-dialog-x,.crm-result-dialog button.crm-result-x{background:transparent!important;color:#64748b!important;}
.crm-dialog button.crm-dialog-cancel{background:#fff!important;color:#475569!important;border:1px solid #d7e2ee!important;}
.crm-dialog button.crm-dialog-primary{background:#5656df!important;color:#fff!important;}
.crm-dialog.crm-dialog-danger button.crm-dialog-primary{background:#bd3546!important;}
.crm-result-dialog button.crm-result-ok{background:#5656df!important;color:#fff!important;}
.crm-dialog button.crm-dialog-x:hover,.crm-result-dialog button.crm-result-x:hover{background:#f1f5f9!important;}
.crm-dialog button.crm-dialog-cancel:hover{background:#f1f5f9!important;}
.crm-dialog button.crm-dialog-primary:hover,.crm-result-dialog button.crm-result-ok:hover{filter:brightness(.92);}
@media(max-width:540px){.crm-dialog,.crm-result-dialog{max-width:calc(100vw - 24px);}}
