/* ============================================================
   HYDROTECH V33 — REFERENCE SCALE + TYPOGRAPHY + OVERFLOW LOCK
   Approved dashboard language. +12% average type scale.
   ============================================================ */
:root{
  --h-blue:#085291;
  --h-blue2:#0c6fb0;
  --h-slate:#68737A;
  --h-anth:#26343b;
  --h-red:#c64045;
  --h-green:#15966a;
  --h-amber:#d58d27;
  --h-cyan:#19a8c2;
  --h-line:#d7e4eb;
  --h-bg:#f2f7fa;
}

/* hard overflow safety */
html.app-active,html.app-active body{overflow-x:hidden!important}
html.app-active #appShell,html.app-active .main-shell,html.app-active .content,
html.app-active .grid,html.app-active .grid>*,html.app-active .card,html.app-active .card>*,
html.app-active .table-card,html.app-active .table-scroll,html.app-active .page-head,
html.app-active .modal,html.app-active .modal-body,html.app-active .drawer,html.app-active .drawer-body,
html.app-active .form-grid,html.app-active .form-grid>*{min-width:0!important;max-width:100%}
html.app-active .content{overflow-x:hidden!important;padding:20px 22px 38px!important;background:var(--h-bg)!important}
html.app-active img,html.app-active svg{max-width:100%}
html.app-active h1,html.app-active h2,html.app-active h3,html.app-active h4,
html.app-active p,html.app-active label,html.app-active button,html.app-active input,
html.app-active select,html.app-active textarea,html.app-active th,html.app-active td{
  line-height:1.36!important;
}
html.app-active button,html.app-active input,html.app-active select,html.app-active textarea{
  font-family:"Segoe UI Variable Text","Segoe UI",Arial,sans-serif!important;
}

/* sidebar — closer to approved reference */
@media(min-width:761px){
  html.app-active #appShell.app-shell{grid-template-columns:244px minmax(0,1fr)!important}
  html.app-active #appShell>.sidebar{width:244px!important;min-width:244px!important;max-width:244px!important}
}
html.app-active .sidebar-brand{height:82px!important;padding:18px 18px!important}
html.app-active .sidebar-brand .wordmark{transform:scale(1.07);transform-origin:left center}
html.app-active .nav{padding:9px 10px 18px!important}
html.app-active .nav-section{
  margin:12px 0 5px!important;padding-left:15px!important;min-height:24px!important;
  font-size:11.7px!important;font-weight:400!important;letter-spacing:.045em!important;
}
html.app-active .nav-section::before{width:4px!important;left:4px!important;top:4px!important;bottom:4px!important}
html.app-active .nav-item{
  min-height:42px!important;padding:9px 11px!important;margin:1px 0!important;border-radius:10px!important;
  font-size:13.1px!important;font-weight:400!important;gap:10px!important;
}
html.app-active .nav-item>span:first-child{flex-basis:19px!important}
html.app-active .nav-item svg{width:18px!important;height:18px!important}
html.app-active .nav-item .count{font-size:10.3px!important;min-width:20px!important;height:20px!important;padding:0 5px!important}
html.app-active .nav-label{overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
html.app-active .developed span,html.app-active .developed small{font-size:9.8px!important}
html.app-active .developed strong{font-size:18px!important}
html.app-active .support{min-height:38px!important;font-size:12.5px!important}

/* topbar */
html.app-active .topbar{height:78px!important;padding:0 20px!important;gap:12px!important}
html.app-active .global-search{height:46px!important;max-width:760px!important;font-size:13.2px!important;border-radius:12px!important}
html.app-active .global-search kbd{font-size:10.5px!important}
html.app-active .icon-btn{width:40px!important;height:40px!important}
html.app-active .rate-chip{min-height:40px!important;padding:5px 8px!important}
html.app-active .rate-chip small{font-size:9px!important}.rate-chip strong{font-size:11px!important}.rate-chip em{font-size:8px!important}
html.app-active .profile{min-height:44px!important;padding:4px 8px!important;max-width:200px!important}
html.app-active .profile strong{font-size:12.4px!important}.profile small{font-size:9.8px!important}

/* dashboard hero */
html.app-active .dashboard-head{
  min-height:132px!important;padding:24px 26px!important;border-radius:18px!important;
  background:
    radial-gradient(circle at 86% 16%,rgba(25,168,194,.16),transparent 24%),
    linear-gradient(108deg,#fff 0%,#f8fbfd 51%,#e7f4f9 100%)!important;
}
html.app-active .dashboard-copy{max-width:650px!important}
html.app-active .welcome{font-size:34px!important;font-weight:400!important;letter-spacing:-1px!important;margin-bottom:6px!important;color:#1c2c36!important}
html.app-active .welcome span{font-weight:400!important;color:#0b2b45!important}
html.app-active .welcome-sub{font-size:14.8px!important;color:#627b8c!important}
html.app-active .dashboard-visual{right:9%!important;width:39%!important;opacity:1!important}
html.app-active .dashboard-visual img{right:19%!important;bottom:-43%!important;width:52%!important;max-height:225px!important;opacity:.82!important;filter:saturate(.86)!important}
html.app-active .dashboard-visual span{right:0!important;top:25%!important;font-size:13.2px!important;line-height:1.45!important;font-weight:400!important;color:#2c73a6!important}
html.app-active .dashboard-actions .btn{height:42px!important;font-size:12.4px!important;padding:0 12px!important;border-radius:10px!important}

/* KPI */
html.app-active .kpi-grid{gap:12px!important;margin:13px 0!important}
html.app-active .metric-card{min-height:158px!important;padding:17px 16px 15px!important;border-radius:15px!important}
html.app-active .metric-card::before{width:4px!important}
html.app-active .metric-icon{width:44px!important;height:44px!important;flex-basis:44px!important;border-radius:12px!important}
html.app-active .metric-icon svg{width:22px!important;height:22px!important}
html.app-active .metric-label{font-size:13.2px!important;font-weight:400!important;color:#2e3f4c!important}
html.app-active .metric-trend{font-size:10.5px!important;font-weight:400!important;padding:4px 7px!important;border-radius:999px!important}
html.app-active .metric-body{margin-top:13px!important;display:block!important}
html.app-active .metric-value{font-size:27px!important;font-weight:400!important;letter-spacing:-.6px!important;color:#132c3f!important;line-height:1.08!important}
html.app-active .metric-sub{display:block!important;margin-top:6px!important;font-size:11.3px!important;line-height:1.3!important;color:#718493!important}
html.app-active .metric-spark{right:13px!important;bottom:16px!important;width:72px!important;height:54px!important;gap:3px!important}

/* cards / dashboard panels */
html.app-active .card{border-radius:15px!important;border-color:var(--h-line)!important}
html.app-active .card-head{min-height:50px!important;padding:0 15px!important}
html.app-active .card-title{font-size:14.4px!important;font-weight:400!important;color:#263c4a!important}
html.app-active .card-title small{font-size:10.8px!important;margin-top:2px!important;line-height:1.3!important;color:#7b8e9b!important}
html.app-active .card-body{padding:14px!important}
html.app-active .sales-panel{min-height:330px!important}
html.app-active .chart-summary strong{font-size:28px!important;font-weight:400!important;color:#112f43!important}
html.app-active .chart-summary small,html.app-active .chart-summary span{font-size:10.8px!important}
html.app-active .bar-chart{height:210px!important}
html.app-active .bar-col label{font-size:10.5px!important}
html.app-active .chart-legend{font-size:10.8px!important}
html.app-active .funnel-row{font-size:10.8px!important;margin:9px 0!important;grid-template-columns:100px minmax(0,1fr) 28px!important;gap:9px!important}
html.app-active .funnel-row strong{font-size:10.8px!important}
html.app-active .progress{height:7px!important}
html.app-active .donut{width:132px!important;height:132px!important}
html.app-active .donut-center strong{font-size:16px!important}
html.app-active .donut-center small{font-size:9.5px!important}
html.app-active .legend-row{font-size:10.2px!important;gap:7px!important}.legend-row strong{font-size:10.2px!important}
html.app-active .dash-bottom{gap:12px!important}
html.app-active .activity-item,html.app-active .task-item{min-height:48px!important;padding:7px 0!important}
html.app-active .activity-icon{width:32px!important;height:32px!important;border-radius:8px!important}
html.app-active .activity-item strong,html.app-active .task-item strong{font-size:11.5px!important;font-weight:400!important}
html.app-active .activity-item small,html.app-active .task-item small,html.app-active .activity-time{font-size:9.7px!important}
html.app-active .task-check{width:21px!important;height:21px!important}
html.app-active .link-btn{font-size:10.8px!important}

/* generic page head */
html.app-active .page-head:not(.dashboard-head){padding:18px 20px!important;border-radius:15px!important}
html.app-active .eyebrow{font-size:9.8px!important;font-weight:400!important;letter-spacing:.08em!important}
html.app-active .page-title{font-size:25px!important;font-weight:400!important;letter-spacing:-.45px!important}
html.app-active .page-sub{font-size:12.5px!important;line-height:1.45!important}
html.app-active .page-actions .btn,html.app-active .btn{font-size:12.2px!important;min-height:38px!important;padding:0 12px!important}

/* tables */
html.app-active .table-card{border-radius:14px!important}
html.app-active .table-toolbar{min-height:58px!important;padding:10px 13px!important;gap:9px!important}
html.app-active .table-scroll{overflow:auto!important;max-width:100%!important}
html.app-active .table-scroll table{font-size:12.1px!important;min-width:760px}
html.app-active th{padding:10px 11px!important;font-size:10.6px!important;font-weight:400!important;letter-spacing:.02em!important;white-space:nowrap!important}
html.app-active td{padding:10px 11px!important;font-size:11.8px!important;line-height:1.35!important;vertical-align:middle!important}
html.app-active td strong,html.app-active .entity strong{font-size:12px!important;font-weight:400!important}
html.app-active .entity small,html.app-active .tiny{font-size:9.8px!important;line-height:1.3!important}
html.app-active .entity-avatar{width:31px!important;height:31px!important;font-size:9.5px!important;border-radius:8px!important}
html.app-active .tag,html.app-active .status,html.app-active .badge,html.app-active .pill{font-size:9.8px!important;line-height:1.2!important;padding:4px 7px!important;white-space:nowrap!important;border-radius:7px!important}
html.app-active .pagination{font-size:10.3px!important;min-height:42px!important}

/* forms / modal / drawer */
html.app-active .field label,html.app-active .form-field label,html.app-active .modal label{font-size:11.8px!important;font-weight:400!important;line-height:1.3!important;margin-bottom:6px!important}
html.app-active .input,html.app-active .select,html.app-active .search-field,
html.app-active input[type="text"],html.app-active input[type="email"],html.app-active input[type="tel"],html.app-active input[type="number"],html.app-active select{
  min-height:38px!important;font-size:12.2px!important;line-height:1.3!important;border-radius:8px!important;
}
html.app-active .textarea,html.app-active textarea{font-size:12.2px!important;line-height:1.45!important;min-height:88px!important;border-radius:8px!important}
html.app-active .modal{max-height:calc(100dvh - 24px)!important;overflow:hidden!important;border-radius:15px!important}
html.app-active .modal-header,html.app-active .drawer-head{min-height:58px!important;padding:10px 14px!important}
html.app-active .modal-title strong{font-size:14px!important;font-weight:400!important}.modal-title small{font-size:10px!important}
html.app-active .modal-body,html.app-active .drawer-body{overflow:auto!important;padding:14px!important;max-height:calc(100dvh - 130px)!important}
html.app-active .modal-footer{min-height:58px!important;padding:10px 14px!important;flex-wrap:wrap!important;gap:8px!important}
html.app-active .tab-btn{font-size:11.2px!important;min-height:38px!important;padding:0 10px!important}
html.app-active .section-title,html.app-active .info-card h3{font-size:13.2px!important;font-weight:400!important}
html.app-active .detail-cell strong{font-size:12px!important}

/* cards in non-dashboard pages */
html.app-active .mini-stat small,html.app-active .info-card p,html.app-active .deal-card p{font-size:10.5px!important;line-height:1.4!important}
html.app-active .mini-stat strong,html.app-active .big-money{font-size:20px!important;font-weight:400!important}
html.app-active .deal-card h4{font-size:12.5px!important;font-weight:400!important}.deal-card-foot{font-size:10.5px!important}
html.app-active .kanban-head{font-size:11.5px!important}.kanban-col{min-width:230px!important}

/* responsive / no-overflow */
@media(max-width:1500px) and (min-width:1181px){
  html.app-active .welcome{font-size:31px!important}
  html.app-active .metric-card{min-height:150px!important}
  html.app-active .metric-value{font-size:25px!important}
  html.app-active .dashboard-visual{right:7%!important}
}
@media(max-width:1180px) and (min-width:761px){
  html.app-active #appShell.app-shell{grid-template-columns:224px minmax(0,1fr)!important}
  html.app-active #appShell>.sidebar{width:224px!important;min-width:224px!important;max-width:224px!important}
  html.app-active .nav-item{font-size:12.2px!important}
  html.app-active .kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  html.app-active .dash-main{grid-template-columns:1fr!important}
  html.app-active .dash-bottom{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  html.app-active .dashboard-visual{opacity:.62!important}
}
@media(max-width:760px){
  html.app-active .content{padding:12px 12px 28px!important}
  html.app-active .page-title{font-size:22px!important}
  html.app-active .welcome{font-size:26px!important}
  html.app-active .welcome-sub{font-size:13px!important}
  html.app-active .dashboard-head{min-height:158px!important;padding:17px!important}
  html.app-active .kpi-grid{grid-template-columns:1fr 1fr!important;gap:9px!important}
  html.app-active .metric-card{min-height:142px!important}
  html.app-active .metric-value{font-size:23px!important}
  html.app-active .dash-bottom{grid-template-columns:1fr!important}
  html.app-active .table-scroll table{min-width:720px!important}
  html.app-active .modal{width:calc(100vw - 16px)!important;max-width:calc(100vw - 16px)!important}
}
@media(max-width:480px){
  html.app-active .kpi-grid{grid-template-columns:1fr!important}
}
