/* ============================================================
   HYDROTECH V31 — PREMIUM ENTERPRISE UI SYSTEM
   Reference language: soft enterprise, strong hierarchy, no shadows.
   Brand: #085291 / #68737A + red / anthracite + semantic accents.
   ============================================================ */
:root{
  --hydro:#085291;
  --hydro-700:#064477;
  --hydro-100:#e8f2f8;
  --hydro-050:#f3f8fb;
  --slate:#68737A;
  --slate-700:#4d565c;
  --slate-100:#eef1f2;
  --anth:#273238;
  --anth-2:#344047;
  --danger:#c64045;
  --danger-soft:#fff0f0;
  --success:#169c6c;
  --success-soft:#eaf8f2;
  --amber:#d9942e;
  --amber-soft:#fff6e7;
  --cyan:#17a9c3;
  --cyan-soft:#e9f9fb;
  --purple:#7663a8;
  --purple-soft:#f3effb;
  --bg:#f3f7fa!important;
  --surface:#ffffff!important;
  --surface-soft:#f8fbfd!important;
  --text:#25343e!important;
  --muted:#72838f!important;
  --line:#dfe8ee!important;
  --primary:#085291!important;
  --primary-dark:#064477!important;
  --blue-soft:#e8f2f8!important;
  --green:#169c6c!important;
  --orange:#d9942e!important;
  --red:#c64045!important;
  --purple:#7663a8!important;
  --cyan:#17a9c3!important;
  --navy:#273238!important;
  --r:16px!important;
  --r-sm:10px!important;
  --shadow:none!important;
  --shadow-sm:none!important;
  --shadow-lg:none!important;
}

/* Core typography / canvas */
html.app-active body{background:var(--bg)!important;color:var(--text)!important;font-weight:450;letter-spacing:-.006em}
html.app-active .content{padding:22px 24px 38px!important;background:
  radial-gradient(circle at 85% 2%,rgba(8,82,145,.055),transparent 24%),
  linear-gradient(180deg,#f6f9fb 0%,#f3f7fa 100%)!important}
html.app-active h1,html.app-active h2,html.app-active h3,html.app-active h4{color:var(--anth)!important}
html.app-active .page-title{font-size:26px!important;font-weight:400!important;letter-spacing:-.75px!important;color:var(--anth)!important}
html.app-active .page-sub{font-size:12.5px!important;color:#738490!important;line-height:1.5!important}
html.app-active .eyebrow{font-size:9px!important;font-weight:400!important;letter-spacing:.16em!important;color:var(--hydro)!important}
html.app-active .welcome{font-size:30px!important;font-weight:400!important;letter-spacing:-1px!important;color:var(--anth)!important}
html.app-active .welcome span{font-weight:400!important;color:#142a39!important}
html.app-active .welcome-sub{font-size:13px!important;color:#718592!important;line-height:1.5!important}

/* Sidebar */
html.app-active .sidebar{background:#fbfdfe!important;border-right:1px solid #dbe6ec!important}
html.app-active .sidebar-brand{height:82px!important;padding:21px 19px!important;background:#fbfdfe!important;border-bottom:1px solid #e5edf2!important}
html.app-active .wordmark.compact .hydro{color:var(--hydro)!important;font-weight:400!important}
html.app-active .wordmark.compact .tech{color:var(--slate)!important;font-weight:430!important}
html.app-active .nav{padding:10px 9px 14px!important}
html.app-active .nav-section{font-size:9px!important;font-weight:400!important;letter-spacing:.17em!important;margin:13px 0 5px!important;padding:0 10px!important;position:relative!important}
html.app-active .nav-section:nth-of-type(1),html.app-active .nav-section:nth-of-type(2){color:var(--hydro)!important}
html.app-active .nav-section:nth-of-type(3),html.app-active .nav-section:nth-of-type(4){color:#61727d!important}
html.app-active .nav-section:nth-of-type(5){color:var(--danger)!important}
html.app-active .nav-section:nth-of-type(6),html.app-active .nav-section:nth-of-type(7){color:var(--anth)!important}
html.app-active .nav-section:nth-of-type(8){color:var(--hydro)!important}
html.app-active .nav-section:nth-of-type(9){color:var(--slate)!important}
html.app-active .nav-item{height:38px!important;border-radius:10px!important;padding:0 10px!important;color:#586b78!important;font-size:11.5px!important;font-weight:400!important;position:relative!important;transition:.15s ease!important}
html.app-active .nav-item>span:first-child{color:#7d93a3!important}
html.app-active .nav-item:hover{background:#f0f6f9!important;color:var(--hydro)!important}
html.app-active .nav-item.active{background:#e9f3f8!important;color:var(--hydro)!important;font-weight:400!important}
html.app-active .nav-item.active:before{content:"";position:absolute;left:-9px;top:7px;bottom:7px;width:3px;border-radius:0 4px 4px 0;background:var(--hydro)}
html.app-active .nav-item.active>span:first-child{color:var(--hydro)!important}
html.app-active .nav-item .count{background:#edf2f5!important;color:#637581!important;font-weight:400!important}
html.app-active .nav-item .count.alert{background:#fff0f0!important;color:var(--danger)!important}
html.app-active .developed{border-color:#dfe8ee!important;background:#fff!important;border-radius:12px!important}
html.app-active .developed strong{color:#213a5b!important;font-weight:400!important}

/* Top bar */
html.app-active .topbar{height:70px!important;background:rgba(250,253,254,.96)!important;border-bottom:1px solid #dfe8ee!important;backdrop-filter:blur(12px)!important}
html.app-active .global-search{height:40px!important;border-color:#dde7ed!important;background:#fff!important;border-radius:12px!important;color:#738693!important;font-size:11.5px!important}
html.app-active .global-search:focus-within{border-color:#aac8db!important}
html.app-active .icon-btn,html.app-active .rate-chip{border-color:#dfe8ee!important;background:#fff!important;border-radius:11px!important}
html.app-active .icon-btn{color:#445d6b!important}
html.app-active .rate-chip strong{color:#31444f!important;font-weight:400!important}
html.app-active .profile strong{font-weight:400!important;color:#263943!important}

/* Dashboard hero / page heads */
html.app-active .page-head{margin-bottom:16px!important}
html.app-active .dashboard-head{position:relative!important;overflow:hidden!important;min-height:112px!important;align-items:center!important;padding:22px 23px!important;border:1px solid #dbe7ed!important;border-radius:18px!important;background:
 linear-gradient(105deg,rgba(255,255,255,.98) 0%,rgba(247,251,253,.98) 58%,rgba(226,241,249,.95) 100%)!important}
html.app-active .dashboard-head:before{content:"";position:absolute;right:-20px;top:-75px;width:470px;height:230px;border-radius:50%;border:1px solid rgba(8,82,145,.12);transform:rotate(-8deg);pointer-events:none}
html.app-active .dashboard-head:after{content:"";position:absolute;right:42px;bottom:-78px;width:310px;height:190px;background:linear-gradient(135deg,rgba(8,82,145,.06),rgba(23,169,195,.13));border-radius:48% 52% 0 0;transform:rotate(-10deg);pointer-events:none}
html.app-active .dashboard-head>div,html.app-active .dashboard-head .page-actions{position:relative;z-index:2}
html.app-active .page-head:not(.dashboard-head){padding:16px 18px!important;border:1px solid #e0e9ee!important;border-radius:15px!important;background:rgba(255,255,255,.74)!important;align-items:center!important}

/* Buttons */
html.app-active .btn{height:36px!important;border-radius:9px!important;border:1px solid #d8e3e9!important;background:#fff!important;color:#445965!important;font-size:10.8px!important;font-weight:400!important;padding:0 13px!important}
html.app-active .btn:hover{background:#f5f9fb!important;border-color:#bed1dc!important;color:var(--hydro)!important}
html.app-active .btn.primary{background:var(--hydro)!important;border-color:var(--hydro)!important;color:#fff!important}
html.app-active .btn.primary:hover{background:var(--hydro-700)!important;border-color:var(--hydro-700)!important}
html.app-active .btn.soft{background:var(--hydro-050)!important;border-color:#cfe1eb!important;color:var(--hydro)!important}
html.app-active .filter-chip{height:32px!important;padding:0 11px!important;border:1px solid #dbe6ec!important;border-radius:9px!important;background:#fff!important;color:#586b77!important;font-size:9.5px!important;font-weight:400!important}
html.app-active .mini-btn{border:1px solid #dce6ec!important;background:#fff!important;color:#5b7180!important;border-radius:8px!important}
html.app-active .link-btn{color:var(--hydro)!important;font-weight:400!important}

/* KPI cards — brand + semantic accents */
html.app-active .kpi-grid{gap:11px!important;margin-bottom:11px!important}
html.app-active .metric-card{min-height:112px!important;border:1px solid #dce7ed!important;border-radius:15px!important;background:#fff!important;padding:14px 15px 13px!important;position:relative!important;overflow:hidden!important}
html.app-active .metric-card:after{content:"";position:absolute;right:-18px;bottom:-26px;width:84px;height:84px;border-radius:50%;background:#f3f8fa;pointer-events:none}
html.app-active .metric-head{gap:9px!important;position:relative;z-index:2}
html.app-active .metric-icon{width:36px!important;height:36px!important;border:0!important;border-radius:11px!important}
html.app-active .metric-icon svg{width:19px!important;height:19px!important;stroke-width:1.8!important}
html.app-active .metric-icon.tone-blue{background:#e5f2f8!important;color:var(--hydro)!important}
html.app-active .metric-icon.tone-purple{background:var(--slate-100)!important;color:var(--slate-700)!important}
html.app-active .metric-icon.tone-green{background:var(--success-soft)!important;color:var(--success)!important}
html.app-active .metric-icon.tone-orange{background:var(--amber-soft)!important;color:var(--amber)!important}
html.app-active .metric-icon.tone-cyan{background:var(--cyan-soft)!important;color:var(--cyan)!important}
html.app-active .metric-icon.tone-red{background:var(--danger-soft)!important;color:var(--danger)!important}
html.app-active .metric-label{font-size:11px!important;color:#536873!important;font-weight:400!important}
html.app-active .metric-trend{font-size:9px!important;font-weight:400!important;color:var(--success)!important;background:var(--success-soft)!important;border-radius:999px!important;padding:3px 6px!important}
html.app-active .metric-body{position:relative;z-index:2;margin-top:12px!important;display:block!important}
html.app-active .metric-value{font-size:24px!important;line-height:1.05!important;font-weight:400!important;color:#172d3b!important;letter-spacing:-.5px!important;display:block!important}
html.app-active .metric-sub{display:block!important;margin-top:5px!important;font-size:9.5px!important;color:#82919a!important;font-weight:400!important}

/* Cards */
html.app-active .card,html.app-active .table-card,html.app-active .info-card,html.app-active .mapping-card,html.app-active .migration-source,html.app-active .mail-list,html.app-active .mail-view,html.app-active .ai-panel{border:1px solid #dce7ed!important;border-radius:15px!important;background:#fff!important;box-shadow:none!important}
html.app-active .card-head{min-height:50px!important;padding:0 15px!important;border-bottom:1px solid #e7eef2!important;background:linear-gradient(180deg,#fff,#fbfdfe)!important;border-radius:15px 15px 0 0!important}
html.app-active .card-title{font-size:12px!important;font-weight:400!important;color:#243945!important;letter-spacing:-.1px!important}
html.app-active .card-title small{font-size:9px!important;font-weight:400!important;color:#84939c!important;margin-top:3px!important}
html.app-active .card-body{padding:14px!important}
html.app-active .dash-main{gap:11px!important;margin-bottom:11px!important}
html.app-active .dash-bottom{gap:11px!important}
html.app-active .sales-panel{min-height:300px!important}
html.app-active .chart-summary strong{font-size:25px!important;font-weight:400!important;color:#192f3d!important}
html.app-active .chart-summary span{font-size:9px!important;font-weight:400!important;color:var(--success)!important;background:var(--success-soft)!important;padding:4px 7px!important;border-radius:999px!important}
html.app-active .bar-chart{height:190px!important}
html.app-active .bar.light{background:#cfe4ef!important}
html.app-active .bar.dark{background:var(--hydro)!important}
html.app-active .bar-col label{font-size:9px!important;color:#84939c!important;font-weight:400!important}
html.app-active .progress{height:6px!important;background:#edf2f5!important;border-radius:999px!important}
html.app-active .progress>span{background:linear-gradient(90deg,var(--hydro),var(--cyan))!important}
html.app-active .funnel-row{font-size:9.5px!important;color:#657985!important}
html.app-active .funnel-row strong{font-weight:400!important;color:#334955!important}

/* Dashboard lists */
html.app-active .activity-item,html.app-active .task-item{min-height:46px!important;padding:7px 0!important;border-bottom-color:#edf2f5!important}
html.app-active .activity-icon{width:31px!important;height:31px!important;border-radius:9px!important}
html.app-active .activity-item strong,html.app-active .task-item strong{font-size:10px!important;font-weight:400!important;color:#304550!important}
html.app-active .activity-item small,html.app-active .task-item small,html.app-active .activity-time{font-size:8.5px!important;color:#8a99a3!important}

/* Compact stat rows used across CRM / quotes / finance */
html.app-active .stat-row{gap:10px!important;margin-bottom:11px!important}
html.app-active .mini-stat{border:1px solid #dce7ed!important;border-radius:13px!important;background:#fff!important;padding:12px 14px!important;min-height:74px!important;position:relative!important;overflow:hidden!important}
html.app-active .mini-stat:before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:var(--hydro)}
html.app-active .mini-stat:nth-child(2):before{background:var(--slate)}
html.app-active .mini-stat:nth-child(3):before{background:var(--amber)}
html.app-active .mini-stat:nth-child(4):before{background:var(--success)}
html.app-active .mini-stat small{font-size:9px!important;font-weight:400!important;color:#7b8b95!important}
html.app-active .mini-stat strong{font-size:20px!important;font-weight:400!important;color:#243945!important;margin-top:5px!important;display:block!important}

/* Tables */
html.app-active .table-card{overflow:hidden!important}
html.app-active .table-toolbar{min-height:58px!important;padding:10px 13px!important;border-bottom:1px solid #e5edf2!important;background:#fcfeff!important}
html.app-active .search-field{height:34px!important;border-radius:9px!important;border:1px solid #dbe6ec!important;background:#fff!important}
html.app-active .search-field input{font-size:10.5px!important}
html.app-active .table-scroll table{font-size:10px!important}
html.app-active th{padding:10px 10px!important;background:#f1f6f9!important;color:#617581!important;font-size:8.8px!important;font-weight:400!important;text-transform:uppercase!important;letter-spacing:.05em!important;border-bottom:1px solid #dce7ed!important}
html.app-active td{padding:10px!important;color:#536873!important;font-size:9.8px!important;border-bottom:1px solid #edf2f5!important}
html.app-active tbody tr:hover td{background:#f8fbfd!important}
html.app-active td strong,html.app-active .entity strong{font-weight:400!important;color:#2c414c!important}
html.app-active .mono{color:#46616f!important}

/* Tags / semantic statuses */
html.app-active .tag{font-size:8.5px!important;font-weight:400!important;border-radius:999px!important;padding:4px 8px!important;border:1px solid transparent!important}
html.app-active .tag.blue{background:#e8f2f8!important;color:var(--hydro)!important;border-color:#cee2ec!important}
html.app-active .tag.green{background:var(--success-soft)!important;color:var(--success)!important;border-color:#ccecdf!important}
html.app-active .tag.orange{background:var(--amber-soft)!important;color:#b27621!important;border-color:#f3dfba!important}
html.app-active .tag.red{background:var(--danger-soft)!important;color:var(--danger)!important;border-color:#f0cccc!important}
html.app-active .tag.purple{background:var(--purple-soft)!important;color:var(--purple)!important;border-color:#ddd4f0!important}
html.app-active .tag.gray{background:#f0f3f5!important;color:#62727c!important;border-color:#e1e7ea!important}

/* Product / Kanban / info cards */
html.app-active .product-card,html.app-active .deal-card{border:1px solid #dce7ed!important;border-radius:14px!important;background:#fff!important;box-shadow:none!important}
html.app-active .product-card strong,html.app-active .deal-card h4{font-weight:400!important;color:#273d49!important}
html.app-active .info-card{padding:16px!important}
html.app-active .info-card h3{font-size:12px!important;font-weight:400!important;color:#2c414d!important;margin:10px 0 6px!important}
html.app-active .info-card p{font-size:9.6px!important;color:#7b8b95!important;line-height:1.5!important}
html.app-active .big-money{font-size:24px!important;font-weight:400!important;color:#243945!important}
html.app-active .kanban-col{border:1px solid #dce7ed!important;border-radius:14px!important;background:#f8fbfc!important;overflow:hidden!important}
html.app-active .kanban-head{background:#f1f6f9!important;border-bottom:1px solid #dce7ed!important}
html.app-active .kanban-head strong{font-weight:400!important;color:#354b57!important}

/* Mail / automation */
html.app-active .mail-list-head,html.app-active .ai-head,html.app-active .mail-view-head{background:#f5f9fb!important;border-bottom-color:#dfe8ed!important}
html.app-active .mail-item.active{background:#eaf3f8!important;border-left:3px solid var(--hydro)!important}
html.app-active .mail-item strong{font-weight:400!important;color:#304651!important}
html.app-active .extract-group h4{font-weight:400!important;color:#334a56!important}
html.app-active .ai-status{background:#f1f8fb!important;border-color:#d7e7ee!important}

/* Finance / accounting / migration */
html.app-active .integration-hero{border:1px solid #d7e5eb!important;border-radius:16px!important;background:linear-gradient(115deg,#f8fbfd 0%,#edf6fa 65%,#f7fbfd 100%)!important}
html.app-active .integration-hero h2{font-size:21px!important;font-weight:400!important;color:#243b47!important}
html.app-active .source-logo{background:var(--hydro)!important;border-radius:12px!important}
html.app-active .source-logo.edm{background:var(--slate)!important}
html.app-active .migration-stats>div,html.app-active .mapping-grid>div{background:#f7fafc!important;border-color:#dfe8ed!important;border-radius:9px!important}
html.app-active .migration-stats strong,html.app-active .mapping-grid strong{font-weight:400!important;color:#304753!important}
html.app-active .statement-list strong{font-weight:400!important;color:#2e4450!important}
html.app-active .account-row{border-color:#e5edf1!important;background:#fbfdfe!important}

/* Inputs */
html.app-active .field label{font-size:9.4px!important;font-weight:400!important;color:#617581!important}
html.app-active .input,html.app-active .select,html.app-active .textarea{border-color:#d8e4ea!important;border-radius:8px!important;background:#fff!important;color:#344b57!important}
html.app-active .input:focus,html.app-active .select:focus,html.app-active .textarea:focus{border-color:#9ebfd2!important;outline:none!important}

/* Modal / drawer */
html.app-active .overlay{background:rgba(28,45,55,.28)!important;backdrop-filter:blur(2px)!important}
html.app-active .modal,html.app-active .drawer{border-color:#d6e3e9!important;background:#fff!important;box-shadow:none!important}
html.app-active .modal{border-radius:15px!important;overflow:hidden!important}
html.app-active .modal-header,html.app-active .drawer-head{min-height:58px!important;padding:10px 14px!important;background:linear-gradient(180deg,#f8fbfd,#f0f6f9)!important;border-bottom:1px solid #dce7ed!important}
html.app-active .modal-title-icon{width:34px!important;height:34px!important;border-radius:10px!important;background:#e5f2f8!important;color:var(--hydro)!important}
html.app-active .modal-title strong{font-size:12px!important;font-weight:400!important;color:#293f4b!important}
html.app-active .modal-title small{font-size:8.5px!important;color:#81919a!important}
html.app-active .modal-body{padding:15px!important}
html.app-active .modal-footer{min-height:56px!important;padding:10px 14px!important;background:#fbfdfe!important;border-top:1px solid #e1eaef!important}
html.app-active .tab-btn{font-size:9.5px!important;font-weight:400!important;color:#71838f!important}
html.app-active .tab-btn.active{color:var(--hydro)!important;font-weight:400!important;border-bottom-color:var(--hydro)!important}
html.app-active .detail-cell,html.app-active .section-block,html.app-active .quote-lines,html.app-active .quote-summary{border-color:#dfe8ed!important;border-radius:11px!important;background:#fbfdfe!important}
html.app-active .section-title{font-size:11.5px!important;font-weight:400!important;color:#314752!important}

/* Dashboard donut uses semantic colors */
html.app-active .donut{background:conic-gradient(var(--danger) 0 51%,var(--amber) 51% 83%,var(--success) 83% 100%)!important}
html.app-active .donut-center strong{font-size:15px!important;font-weight:400!important;color:#2b414c!important}
html.app-active .legend-row strong{font-weight:400!important;color:#435a66!important}

/* Responsive */
@media(max-width:1250px){
  html.app-active .dashboard-head{min-height:100px!important}
  html.app-active .metric-card{min-height:106px!important}
}
@media(max-width:760px){
  html.app-active .content{padding:14px 12px 28px!important}
  html.app-active .page-head,html.app-active .dashboard-head{padding:14px!important;border-radius:13px!important}
  html.app-active .welcome{font-size:23px!important}
  html.app-active .page-title{font-size:22px!important}
  html.app-active .metric-card{min-height:98px!important}
  html.app-active .metric-value{font-size:21px!important}
  html.app-active .card,html.app-active .table-card,html.app-active .info-card{border-radius:12px!important}
}
