
:root{
  --bg:#f6f7f9;
  --panel:#ffffff;
  --panel-soft:#fafbfc;
  --line:#e7e9ee;
  --line-strong:#d9dde5;
  --text:#171a21;
  --muted:#717784;
  --muted-2:#9aa0aa;
  --ink:#101318;
  --sidebar:#121419;
  --sidebar-soft:#191c22;
  --accent:#4f6df5;
  --accent-soft:#eef1ff;
  --green:#1f9d70;
  --green-soft:#eaf8f2;
  --amber:#c88919;
  --amber-soft:#fff6e5;
  --red:#d24b4b;
  --red-soft:#feeeee;
  --purple:#805ad5;
  --purple-soft:#f4efff;
  --shadow:0 1px 2px rgba(16,19,24,.03),0 12px 28px rgba(16,19,24,.055);
  --shadow-lg:0 22px 60px rgba(20,25,35,.10);
  --radius:14px;
  --radius-sm:9px;
}
*{box-sizing:border-box}
html{background:var(--bg)}
body{
  margin:0;min-height:100vh;background:var(--bg);color:var(--text);
  font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  -webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility
}
button,input,select,textarea{font:inherit}
button{cursor:pointer}
::selection{background:#dfe5ff;color:#111827}

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

/* Sidebar */
.sidebar{
  height:100vh;position:sticky;top:0;display:flex;flex-direction:column;z-index:40;
  background:var(--sidebar);border-right:1px solid #22262d;padding:12px 10px;color:#fff
}
.profile-block{
  display:grid;grid-template-columns:36px 1fr;grid-template-rows:auto auto;column-gap:10px;
  align-items:center;padding:9px 9px 14px;margin-bottom:4px;border-bottom:1px solid #24272e
}
.profile-ring{grid-row:1/3;width:36px;height:36px;border-radius:10px;padding:1px;background:#2b3039}
.profile-avatar{
  width:34px;height:34px;border-radius:9px;display:grid;place-items:center;background:#242832;
  color:#f7f8fb;font-size:11px;font-weight:750;letter-spacing:.02em
}
.profile-block strong{font-size:12.5px;font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.profile-block small{font-size:10.5px;color:#8f96a3;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.sidebar-nav{display:flex;flex-direction:column;gap:2px;padding:8px 0;overflow:auto;scrollbar-width:none}
.sidebar-nav::-webkit-scrollbar{display:none}
.sidebar-nav button{
  border:0;background:transparent;color:#9ca3af;min-height:35px;border-radius:8px;padding:7px 9px;
  display:flex;align-items:center;gap:9px;text-align:left;font-size:11.5px;transition:.16s ease
}
.sidebar-nav button:hover{background:#1b1f26;color:#f5f7fa}
.sidebar-nav button.active{background:#23272f;color:#fff;box-shadow:inset 0 0 0 1px #2d323c}
.nav-ico{width:18px;text-align:center;color:#747c89;font-size:13px}
.sidebar-nav button.active .nav-ico{color:#aebcff}
.side-footer{
  margin-top:auto;display:grid;grid-template-columns:28px 1fr 24px;align-items:center;gap:8px;
  padding:10px 7px 3px;border-top:1px solid #24272e;color:#89919d;font-size:10.5px
}
.brand-mini{width:27px;height:27px;border-radius:8px;background:#eef1ff;color:#3f57d6;display:grid;place-items:center;font-weight:800}
.side-footer a{color:#89919d;text-decoration:none;text-align:center;font-size:13px}

/* Main shell */
.main{min-width:0;background:var(--bg)}
.topbar{
  height:64px;position:sticky;top:0;z-index:30;background:rgba(246,247,249,.91);
  backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);
  border-bottom:1px solid rgba(220,223,229,.8);display:flex;align-items:center;justify-content:space-between;
  padding:0 22px
}
.title-group{display:flex;align-items:center;gap:10px}
.title-group h1{font-size:15px;line-height:1.2;margin:1px 0 0;font-weight:680;letter-spacing:-.01em}
.breadcrumb,.eyebrow{font-size:12.5px;font-weight:750;letter-spacing:.11em;text-transform:uppercase;color:var(--muted-2)}
.menu-toggle{display:none;border:0;background:transparent;color:var(--text)}
.top-actions{display:flex;align-items:center;gap:7px}
.search-box{
  width:255px;height:34px;border:1px solid var(--line);background:rgba(255,255,255,.86);
  border-radius:9px;display:flex;align-items:center;gap:7px;padding:0 10px;color:#9aa0aa
}
.search-box input{border:0;outline:0;background:transparent;width:100%;font-size:11.5px;color:var(--text)}
.search-box input::placeholder{color:#9aa0aa}
.top-icon{
  width:34px;height:34px;border:1px solid var(--line);border-radius:9px;background:#fff;color:#5f6671;
  display:grid;place-items:center;position:relative;transition:.15s
}
.top-icon:hover{border-color:#cdd2dc;background:#fafbfc;color:#22262d}
.notify-dot{width:6px;height:6px;background:#d94b4b;border-radius:50%;position:absolute;right:7px;top:7px;border:1.5px solid #fff}

.page{padding:22px 24px 34px;max-width:1580px;margin:0 auto}
.loading{min-height:300px;display:grid;place-items:center;color:var(--muted);font-size:12.5px}

/* Core components */
.card{
  background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);
  padding:15px;box-shadow:0 1px 1px rgba(16,19,24,.015)
}
.card:hover{border-color:#dde1e8}
.section-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:13px}
.section-head h3{margin:3px 0 0;font-size:12px;font-weight:650;letter-spacing:-.01em}
.section-description{font-size:11px;color:var(--muted);line-height:1.55;margin:4px 0 0}

.module-head,.module-header{
  display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:16px
}
.module-head h2,.module-header h2{font-size:21px;letter-spacing:-.025em;margin:0;font-weight:690}
.module-head p,.module-header p{font-size:11.5px;line-height:1.55;color:var(--muted);margin:4px 0 0;max-width:760px}

.btn{
  border:0;border-radius:8px;padding:8px 11px;font-size:11px;font-weight:650;
  transition:transform .12s ease,background .12s ease,border-color .12s ease
}
.btn:active{transform:translateY(1px)}
.btn.primary,.btn-primary{background:var(--ink);color:#fff}
.btn.primary:hover,.btn-primary:hover{background:#242831}
.btn-secondary{background:#fff;color:#4e5561;border:1px solid var(--line)}
.btn-secondary:hover{background:#fafbfc;border-color:#d8dce4}
.btn-block{width:100%}

.badge{display:inline-flex;align-items:center;gap:4px;border-radius:999px;padding:4px 7px;font-size:12.5px;font-weight:700}
.badge.success{background:var(--green-soft);color:#167a55}
.badge.warning{background:var(--amber-soft);color:#a06b12}
.badge.danger{background:var(--red-soft);color:#b33d3d}
.badge.info{background:var(--accent-soft);color:#445cd1}
.progress{height:5px;border-radius:999px;background:#edf0f4;overflow:hidden}
.progress i{display:block;height:100%;border-radius:999px;background:var(--accent)}

.grid-2{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(320px,.75fr);gap:12px}
.cards-3,.module-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.stack{display:grid;gap:12px}

/* New premium dashboard */
.exec-hero{
  min-height:150px;margin-bottom:12px;display:grid;grid-template-columns:minmax(0,1fr) auto;
  align-items:end;gap:22px;padding:23px 24px;border:1px solid #e5e7ec;border-radius:16px;
  background:
    radial-gradient(circle at 88% 18%,rgba(79,109,245,.12),transparent 26%),
    linear-gradient(135deg,#fff 0%,#fbfbfd 65%,#f5f6ff 100%);
  overflow:hidden;position:relative
}
.exec-hero:after{content:"";position:absolute;width:210px;height:210px;border:1px solid rgba(79,109,245,.09);border-radius:50%;right:-55px;top:-115px}
.exec-hero h2{font-size:25px;line-height:1.08;margin:5px 0 8px;letter-spacing:-.035em;font-weight:710}
.exec-hero p{font-size:12px;line-height:1.65;color:var(--muted);max-width:650px;margin:0}
.hero-status{display:flex;align-items:center;gap:11px;background:#fff;border:1px solid var(--line);border-radius:12px;padding:11px 13px;box-shadow:var(--shadow);z-index:1}
.status-ring{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:conic-gradient(var(--green) 0 86%,#e9edf1 86% 100%);position:relative}
.status-ring:after{content:"";position:absolute;inset:5px;background:#fff;border-radius:50%}
.status-ring strong{z-index:1;font-size:11.5px}
.hero-status span,.hero-status strong,.hero-status small{display:block}
.hero-status>div>span{font-size:9.5px;color:var(--muted);text-transform:uppercase;letter-spacing:.08em}
.hero-status>div>strong{font-size:11px;margin-top:2px}
.hero-status>div>small{font-size:12.5px;color:var(--green);margin-top:1px}

.premium-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:12px}
.metric-card{padding:14px 15px;min-height:112px}
.metric-top{display:flex;justify-content:space-between;align-items:center}
.metric-label{font-size:10.5px;color:var(--muted);font-weight:620}
.metric-icon{width:27px;height:27px;border-radius:8px;display:grid;place-items:center;background:#f5f6f8;color:#626a76;font-size:11px}
.metric-value{font-size:25px;font-weight:710;letter-spacing:-.03em;margin:12px 0 7px}
.metric-foot{display:flex;justify-content:space-between;gap:8px;align-items:center;font-size:12.5px;color:var(--muted)}
.trend-up{color:var(--green);font-weight:700}.trend-warn{color:var(--amber);font-weight:700}

.dashboard-main{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(300px,.75fr);gap:12px;margin-bottom:12px}
.operation-card{min-height:338px}
.range-tabs{display:flex;gap:2px;background:#f4f5f7;border-radius:8px;padding:2px}
.range-tabs button{border:0;background:transparent;color:#8a919c;border-radius:6px;padding:5px 7px;font-size:9.5px}
.range-tabs button.active{background:#fff;color:#252a31;box-shadow:0 1px 3px rgba(20,25,35,.08)}
.chart-stage{height:230px;display:flex;align-items:flex-end;gap:8px;padding:18px 4px 4px;border-bottom:1px solid #edf0f3;position:relative}
.chart-stage:before,.chart-stage:after{content:"";position:absolute;left:4px;right:4px;border-top:1px dashed #edf0f3}
.chart-stage:before{top:70px}.chart-stage:after{top:145px}
.month-col{flex:1;height:100%;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:7px;z-index:1}
.month-bars{height:180px;display:flex;align-items:flex-end;gap:3px}
.month-bars i{display:block;width:7px;border-radius:4px 4px 2px 2px;background:#dfe4ff}
.month-bars i:last-child{background:var(--accent)}
.month-col small{font-size:9.5px;color:#9097a2}
.chart-caption{display:flex;justify-content:space-between;gap:12px;margin-top:10px;font-size:12.5px;color:var(--muted)}
.legend-dot{width:6px;height:6px;border-radius:50%;display:inline-block;margin-right:4px;background:var(--accent)}
.legend-dot.soft{background:#dfe4ff}

.side-intel{display:grid;gap:12px}
.ai-brief{padding:17px;background:var(--ink);color:#fff;border-color:var(--ink);position:relative;overflow:hidden}
.ai-brief:after{content:"✦";position:absolute;right:-4px;bottom:-30px;font-size:104px;color:rgba(255,255,255,.025)}
.ai-brief .eyebrow{color:#9ba5b3}
.ai-brief h3{font-size:15px;line-height:1.25;margin:7px 0 9px;max-width:250px}
.ai-brief p{font-size:11px;line-height:1.6;color:#aeb6c1;margin:0 0 14px}
.ai-brief .btn{background:#fff;color:#16191e}
.action-list{display:grid;gap:0}
.action-item{display:grid;grid-template-columns:7px minmax(0,1fr) auto;gap:9px;padding:10px 0;border-bottom:1px solid #eef0f3;align-items:start}
.action-item:last-child{border-bottom:0}
.action-severity{width:7px;height:7px;border-radius:50%;margin-top:4px;background:var(--amber)}
.action-severity.red{background:var(--red)}.action-severity.green{background:var(--green)}
.action-item strong{display:block;font-size:11px;font-weight:650}
.action-item small{display:block;font-size:12.5px;color:var(--muted);line-height:1.45;margin-top:2px}
.action-item time{font-size:9.5px;color:#9aa0aa}

.dashboard-bottom{display:grid;grid-template-columns:1.15fr 1fr;gap:12px}
.area-list{display:grid;gap:11px}
.area-row{display:grid;grid-template-columns:115px 1fr 36px;align-items:center;gap:10px}
.area-row span{font-size:10.5px;color:#525965}
.area-row strong{font-size:10.5px;text-align:right}
.area-row .progress{height:6px}
.project-mini-list{display:grid;gap:8px}
.project-mini{padding:10px;border:1px solid #edf0f3;border-radius:10px;background:#fcfcfd}
.project-mini-top{display:flex;justify-content:space-between;gap:8px;margin-bottom:8px}
.project-mini strong{font-size:11px}.project-mini small{font-size:9.5px;color:var(--muted)}
.project-mini .progress{height:4px}

/* Generic existing screens */
.kpi-grid,.master-kpis,.kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:12px}
.kpi-card,.kpi{min-height:100px}
.kpi-card span,.kpi span{font-size:10.5px;color:var(--muted)}
.kpi-card strong,.kpi strong{display:block;font-size:24px;letter-spacing:-.025em;margin:10px 0 2px}
.kpi-card small,.kpi small{font-size:12.5px;color:var(--muted)}
.chart-shell{overflow:hidden}.chart-legend{display:flex;gap:12px;flex-wrap:wrap;font-size:9.5px;color:var(--muted)}
.chart-legend i{display:inline-block;width:6px;height:6px;border-radius:50%;margin-right:4px}
.health-wrap{display:flex;align-items:center;gap:18px}.health-wrap.compact{gap:14px}
.donut{width:92px;height:92px;border-radius:50%;display:grid;place-items:center;position:relative;background:conic-gradient(var(--accent) 0 76%,#eef0f4 76%)}
.donut:after{content:"";position:absolute;inset:11px;background:#fff;border-radius:50%}
.donut>div{z-index:1;text-align:center}.donut strong,.donut small{display:block}.donut strong{font-size:15px}.donut small{font-size:9.5px;color:var(--muted)}
.health-list{flex:1;display:grid;gap:7px}.health-list>div{display:flex;justify-content:space-between;font-size:10.5px}.health-list span{color:var(--muted)}
.bar-week{height:175px;display:flex;align-items:flex-end;justify-content:space-between;gap:6px;padding-top:14px}
.bar-week>div{flex:1;height:100%;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:4px}
.bar-week i{width:62%;max-width:18px;background:#dfe4ff;border-radius:5px 5px 2px 2px}.bar-week span,.bar-week small{font-size:9.5px;color:var(--muted)}

.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:11px}
table{width:100%;border-collapse:collapse;min-width:720px;background:#fff}
th,td{padding:10px 11px;text-align:left;border-bottom:1px solid #edf0f3;font-size:10.5px}
th{font-size:9.5px;text-transform:uppercase;letter-spacing:.07em;color:#8e949e;background:#fafbfc}
td{color:#424852}.table-wrap tr:last-child td{border-bottom:0}

.ai-panel,.ai-card{
  margin-top:12px;border:1px solid #dfe3ee;background:#f9faff;border-radius:12px;padding:14px
}
.ai-panel{display:grid;grid-template-columns:34px minmax(0,1fr) auto;gap:10px;align-items:center}
.ai-mark{width:34px;height:34px;border-radius:9px;background:#232831;color:#fff;display:grid;place-items:center}
.ai-panel h3,.ai-card h3{font-size:12.5px;margin:0 0 2px}.ai-panel p,.ai-card p{font-size:10.5px;color:var(--muted);line-height:1.5;margin:0}
.ai-panel button{border:0;background:var(--ink);color:#fff;border-radius:8px;padding:8px 10px;font-size:10.5px}
.ai-card-head{display:flex;justify-content:space-between;gap:10px}

/* Projects */
.project-intro{
  display:flex;justify-content:space-between;align-items:center;gap:18px;margin-bottom:12px;padding:18px 19px;
  background:linear-gradient(135deg,#fff,#fafbff);border-color:#e2e5ec
}
.project-intro h3{font-size:15px;margin:4px 0}.project-intro p{font-size:11px;color:var(--muted);line-height:1.55;max-width:820px;margin:0}
.project-list{display:grid;gap:9px}.project-line{padding:13px 14px}.project-line-head{display:flex;justify-content:space-between;gap:10px}
.project-line h3{font-size:12.5px;margin:3px 0}.project-line small{font-size:12.5px;color:var(--muted)}
.project-card-actions{display:flex;gap:6px;margin-top:10px}

.project-master-head{margin-bottom:13px}
.back-link{border:0;background:transparent;color:#5d6571;padding:3px 0 8px;font-size:10.5px}
.back-link:hover{color:var(--accent)}
.project-master-title{display:flex;justify-content:space-between;align-items:flex-start;gap:18px}
.project-master-title h2{font-size:23px;letter-spacing:-.025em;margin:4px 0 5px}
.project-master-title p{font-size:11px;color:var(--muted);line-height:1.55;max-width:800px;margin:0}
.master-actions{display:flex;gap:7px}
.stage-card,.elaboration-card{margin-bottom:12px}
.stage-track{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px}
.stage-step{
  min-height:67px;border:1px solid var(--line);background:#fff;color:#777e89;border-radius:9px;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;padding:7px;font-size:12.5px
}
.stage-step.done{color:#177c58;background:#f5fbf8;border-color:#d7eee4}
.stage-step.active{color:#445bd0;background:#f6f7ff;border-color:#dce2ff;box-shadow:inset 0 0 0 1px #edf0ff}
.stage-check{font-size:13px}
.integrity-badge{min-width:68px;border-radius:10px;background:#f7f8fa;border:1px solid var(--line);padding:8px;text-align:center}
.integrity-badge strong,.integrity-badge small{display:block}.integrity-badge strong{font-size:15px}.integrity-badge small{font-size:9.5px;color:var(--muted)}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.form-grid label,.metric-inputs label,.field-block{display:grid;gap:5px}
.form-grid label span,.metric-inputs label span,.field-block>span{font-size:12.5px;color:#68707d;font-weight:650}
.form-grid input,.form-grid textarea,.form-grid select,.metric-inputs input,.field-block textarea{
  border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--text);padding:8px 9px;font-size:11px;outline:0;width:100%
}
.form-grid input:focus,.form-grid textarea:focus,.form-grid select:focus,.metric-inputs input:focus,.field-block textarea:focus{border-color:#aab7f7;box-shadow:0 0 0 3px #f0f2ff}
.form-grid textarea,.field-block textarea{min-height:68px;resize:vertical}.span-2{grid-column:span 2}
.integrity-alert{margin-top:11px;background:var(--amber-soft);border:1px solid #f1dfb8;border-radius:9px;padding:10px 11px;display:flex;justify-content:space-between;align-items:center;gap:10px}
.integrity-alert strong,.integrity-alert small{display:block}.integrity-alert strong{font-size:10.5px;color:#9a6615}.integrity-alert small{font-size:12.5px;color:#8a7d63;margin-top:2px}

.areas-master{margin-bottom:12px}.area-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}
.area-project-card{min-height:245px;padding:13px}.area-card-head{display:grid;grid-template-columns:32px 1fr auto;gap:7px;align-items:center}
.area-symbol{width:32px;height:32px;border-radius:9px;background:#f1f3f7!important;color:#555f6e!important;display:grid;place-items:center;font-size:12.5px;font-weight:750}
.area-card-head h3{font-size:11px;margin:0}.area-card-head small{font-size:12px;color:var(--muted)}.area-card-head>strong{font-size:12.5px}
.area-project-card ul{list-style:none;padding:0;margin:11px 0;display:grid;gap:5px}.area-project-card li{font-size:12.5px;color:#68707c}
.timeline{display:grid}.timeline>div{position:relative;border-left:1px solid #e4e7eb;margin-left:4px;padding:8px 7px 8px 18px}
.timeline>div:before{content:"";position:absolute;left:-4px;top:12px;width:7px;height:7px;border-radius:50%;background:#79859a}
.timeline b,.timeline span{display:block}.timeline b{font-size:9.5px}.timeline span{font-size:12.5px;color:var(--muted);margin-top:2px}
.metric-inputs{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}
.requirements-list{display:grid;gap:7px;margin-bottom:12px}.requirement-row{display:flex;gap:8px;padding:9px;border:1px solid var(--line);border-radius:9px;background:#fff}
.requirement-row strong,.requirement-row small{display:block}.requirement-row strong{font-size:10.5px}.requirement-row small{font-size:9.5px;color:var(--muted);margin-top:2px}
.field-block{margin-top:10px}.file-drop{min-height:115px;border:1px dashed #cfd4dd;border-radius:10px;background:#fafbfc;display:grid;place-items:center;text-align:center;padding:18px;color:#606977}
.file-drop strong,.file-drop small{display:block}.file-drop strong{font-size:10.5px}.file-drop small{font-size:9.5px;color:var(--muted);max-width:300px}
.file-list{display:grid;gap:6px;margin-top:8px}.file-list>div{display:flex;justify-content:space-between;gap:8px;padding:8px 9px;border:1px solid var(--line);border-radius:8px;font-size:12.5px}.file-list small{color:var(--muted)}

.report-toolbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}
.report-page{max-width:980px;margin:0 auto;background:#fff;border:1px solid var(--line);border-radius:14px;padding:34px;box-shadow:var(--shadow-lg)}
.report-cover{background:#15181d;color:#fff;border-radius:12px;padding:28px;margin-bottom:24px}
.report-cover span{font-size:9.5px;letter-spacing:.14em;color:#aeb5c0}.report-cover h1{font-size:28px;letter-spacing:-.03em;margin:7px 0}.report-cover p{font-size:11.5px;color:#aeb5c0}
.report-section{margin:22px 0}.report-section h2{font-size:14px;border-bottom:1px solid #e8eaee;padding-bottom:7px}.report-section p{font-size:11.5px;line-height:1.7;color:#434b57}
.report-metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.report-metrics>div{border:1px solid #e7e9ed;border-radius:9px;padding:12px}
.report-metrics span,.report-metrics strong{display:block}.report-metrics span{font-size:9.5px;color:#777e89}.report-metrics strong{font-size:17px;margin-top:4px}
.report-table{width:100%;border-collapse:collapse}.report-table th,.report-table td{border-bottom:1px solid #eceef1;padding:8px;font-size:12.5px;text-align:left}.report-table th{color:#7c838e;background:#fafbfc}
.report-placeholder{height:110px;border:1px dashed #d2d6dd;border-radius:9px;display:grid;place-items:center;color:#9299a3;font-size:10.5px}

/* AI drawer */
.drawer{position:fixed;inset:0;pointer-events:none;z-index:90}
.drawer.open{pointer-events:auto}.drawer-backdrop{position:absolute;inset:0;background:rgba(13,16,21,.32);opacity:0;transition:.2s}.drawer.open .drawer-backdrop{opacity:1}
.drawer-panel{position:absolute;right:0;top:0;height:100%;width:min(440px,94vw);background:#fff;box-shadow:-30px 0 80px rgba(10,15,25,.13);transform:translateX(102%);transition:.24s ease;display:flex;flex-direction:column}
.drawer.open .drawer-panel{transform:none}.drawer-header{padding:16px 17px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center}
.drawer-header h2{font-size:15px;margin:2px 0}.ai-thread{flex:1;overflow:auto;padding:17px;background:#f8f9fb}
.bubble{max-width:88%;border-radius:11px;padding:10px 11px;font-size:11px;line-height:1.55;margin-bottom:8px}.ai-bubble{background:#fff;border:1px solid var(--line)}.user-bubble{background:#20242b;color:#fff;margin-left:auto}
.suggestions{padding:0 17px 10px;display:flex;gap:5px;flex-wrap:wrap}.suggestions button{border:1px solid var(--line);background:#fff;border-radius:999px;padding:6px 8px;font-size:12.5px;color:#5f6671}
.ai-form{display:grid;grid-template-columns:1fr auto;gap:7px;padding:12px 17px 17px;border-top:1px solid var(--line)}
.ai-form textarea{resize:none;border:1px solid var(--line);border-radius:9px;padding:9px;outline:0;font-size:11px}

.toast{position:fixed;z-index:100;bottom:22px;left:50%;transform:translate(-50%,14px);opacity:0;background:#171a1f;color:#fff;border-radius:9px;padding:9px 12px;font-size:10.5px;transition:.18s;pointer-events:none}
.toast.show{opacity:1;transform:translate(-50%,0)}

/* Login */
.login-body{background:#f3f4f6;min-height:100vh;display:grid;place-items:center;padding:20px}
.login-shell{width:min(980px,100%);display:grid;grid-template-columns:1.15fr 410px;background:#fff;border:1px solid #e3e5e9;border-radius:18px;overflow:hidden;box-shadow:0 35px 90px rgba(17,24,39,.12)}
.login-brand{padding:54px;background:#14171c;color:#fff;position:relative;overflow:hidden}
.login-brand:after{content:"";position:absolute;width:360px;height:360px;border:1px solid #2a2f37;border-radius:50%;right:-170px;bottom:-180px}
.login-brand h1{font-size:31px;letter-spacing:-.035em;margin:22px 0 9px}.login-brand p{font-size:12.5px;color:#aeb6c0;line-height:1.7;max-width:440px}
.login-feature{font-size:11px;color:#d6dbe1;margin:11px 0}.login-card{padding:38px;display:flex;flex-direction:column;justify-content:center}.login-card .muted{font-size:10.5px;color:var(--muted)}
.login-card form{display:grid;gap:8px}.login-card label{font-size:10.5px;font-weight:650}.login-card input{border:1px solid var(--line);border-radius:8px;padding:9px;outline:0}
.demo-box{margin-top:15px;padding:10px;background:#f8f9fb;border:1px solid var(--line);border-radius:9px}.demo-box strong,.demo-box code{display:block;font-size:9.5px}.demo-box code{margin-top:4px;color:#6f7682}
.alert{padding:9px 10px;border-radius:8px;font-size:10.5px}.alert-danger{background:var(--red-soft);color:#ad3d3d;border:1px solid #f3d0d0}

@media(max-width:1200px){
  .area-grid{grid-template-columns:repeat(3,1fr)}
  .stage-track{grid-template-columns:repeat(4,1fr)}
}
@media(max-width:1020px){
  .app-shell{grid-template-columns:1fr}.sidebar{position:fixed;left:0;top:0;width:226px;transform:translateX(-105%);transition:.22s}.sidebar.open{transform:none}
  .menu-toggle{display:block}.dashboard-main,.grid-2,.dashboard-bottom{grid-template-columns:1fr}.premium-kpis,.kpi-grid,.master-kpis,.kpis{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:720px){
  .page{padding:14px}.topbar{padding:0 12px}.search-box{display:none}
  .exec-hero{grid-template-columns:1fr;align-items:start;padding:18px}.hero-status{width:max-content}.exec-hero h2{font-size:21px}
  .premium-kpis,.kpi-grid,.master-kpis,.kpis,.cards-3,.module-grid{grid-template-columns:1fr}
  .area-grid{grid-template-columns:1fr}.stage-track{grid-template-columns:repeat(2,1fr)}
  .form-grid,.metric-inputs{grid-template-columns:1fr}.span-2{grid-column:span 1}
  .project-master-title,.module-head,.module-header,.project-intro{flex-direction:column}
  .report-metrics{grid-template-columns:repeat(2,1fr)}.report-page{padding:18px}.master-actions{width:100%}
  .login-shell{grid-template-columns:1fr}.login-brand{display:none}.login-card{padding:28px}
}
@media print{
  body{background:#fff}.sidebar,.topbar,.no-print,.ai-panel{display:none!important}.app-shell{display:block}.main,.page{background:#fff;padding:0}.report-page{border:0;box-shadow:none;border-radius:0;max-width:none}
  .report-cover{-webkit-print-color-adjust:exact;print-color-adjust:exact}
}


/* ===== LEGIBILIDAD V2 ===== */
body{font-size:14px;line-height:1.45}
.page{padding:26px 28px 38px}
.title-group h1{font-size:18px}
.breadcrumb,.eyebrow{font-size:10px;letter-spacing:.09em}
.sidebar{width:auto}
.sidebar-nav button{font-size:12px;min-height:40px;padding:9px 10px}
.profile-block strong{font-size:12px}
.profile-block small{font-size:10px}
.side-footer{font-size:10px}

.module-head h2,.module-header h2{font-size:26px}
.module-head p,.module-header p{font-size:13px;line-height:1.6}
.section-head h3{font-size:16px}
.section-description{font-size:12px}
.btn{font-size:11px;padding:10px 13px}
.badge{font-size:10px;padding:5px 8px}

.metric-label{font-size:11px}
.metric-value{font-size:30px}
.metric-foot{font-size:10px}
.exec-hero h2{font-size:30px}
.exec-hero p{font-size:13px}
.hero-status>div>span{font-size:10px}
.hero-status>div>strong{font-size:13px}
.hero-status>div>small{font-size:10px}

.action-item strong{font-size:11px}
.action-item small{font-size:10px}
.action-item time{font-size:9px}
.chart-caption{font-size:10px}
.month-col small{font-size:9px}
.range-tabs button{font-size:9px}

.area-row span,.area-row strong{font-size:11px}
.project-mini strong{font-size:11px}
.project-mini small{font-size:10px}

.kpi-card span,.kpi span{font-size:11px}
.kpi-card strong,.kpi strong{font-size:28px}
.kpi-card small,.kpi small{font-size:10px}
table th{font-size:10px}
table td{font-size:11px}
.ai-panel h3,.ai-card h3{font-size:12px}
.ai-panel p,.ai-card p{font-size:11px}
.ai-panel button{font-size:10px}

.project-intro h3{font-size:18px}
.project-intro p{font-size:12px}
.project-line h3{font-size:13px}
.project-line small{font-size:11px}

.back-link{font-size:11px}
.project-master-title h2{font-size:28px}
.project-master-title p{font-size:12px;line-height:1.6}
.stage-step{min-height:76px;font-size:11px;padding:10px 8px}
.stage-check{font-size:16px}
.integrity-badge strong{font-size:18px}
.integrity-badge small{font-size:10px}

.form-grid label span,.metric-inputs label span,.field-block>span{font-size:11px}
.form-grid input,.form-grid textarea,.form-grid select,.metric-inputs input,.field-block textarea{
  font-size:12px;padding:10px 11px;min-height:40px
}
.form-grid textarea,.field-block textarea{min-height:92px}
.integrity-alert strong{font-size:11px}
.integrity-alert small{font-size:10px}

.area-project-card{min-height:260px}
.area-symbol{font-size:13px}
.area-card-head h3{font-size:12px;line-height:1.25}
.area-card-head small{font-size:10px}
.area-card-head>strong{font-size:13px}
.area-project-card li{font-size:11px;line-height:1.45}
.area-project-card .btn{font-size:10px}

.timeline b{font-size:10px}
.timeline span{font-size:11px}
.requirement-row strong{font-size:11px}
.requirement-row small{font-size:10px}
.file-drop strong{font-size:11px}
.file-drop small{font-size:10px}
.file-list>div{font-size:10.5px}

.report-cover span{font-size:10px}
.report-cover h1{font-size:32px}
.report-cover p{font-size:12px}
.report-section h2{font-size:18px}
.report-section p{font-size:12px}
.report-metrics span{font-size:10px}
.report-metrics strong{font-size:20px}
.report-table th,.report-table td{font-size:10.5px}
.report-placeholder{font-size:11px}

.drawer-header h2{font-size:17px}
.bubble{font-size:11px}
.suggestions button{font-size:10px}
.ai-form textarea{font-size:11px}

.login-brand p{font-size:12px}
.login-feature{font-size:11px}
.login-card .muted{font-size:10px}
.login-card label{font-size:11px}
.demo-box strong,.demo-box code{font-size:10px}

@media(max-width:1200px){
  .area-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:760px){
  body{font-size:15px}
  .page{padding:16px}
  .module-head h2,.module-header h2{font-size:23px}
  .stage-step{font-size:12px}
  .area-grid{grid-template-columns:1fr}
}


/* ===== ALIANZA BRANDING ===== */
:root{
  --bg:#f7f8fb;
  --panel:#ffffff;
  --panel-soft:#fafbfd;
  --line:#e5e8ef;
  --line-strong:#d8dde8;
  --text:#161d2e;
  --muted:#6f7788;
  --muted-2:#8f97a6;
  --ink:#0a2385;
  --sidebar:#0a2385;
  --sidebar-soft:#09206f;
  --accent:#0a2385;
  --accent-soft:#eef2ff;
  --green:#1f9d70;
  --green-soft:#eaf8f2;
  --amber:#c89a11;
  --amber-soft:#fff7dc;
  --red:#cf4b4b;
  --red-soft:#feeeee;
  --purple:#5467b9;
  --purple-soft:#eff2ff;
}

/* Sidebar and brand */
.sidebar{
  background:linear-gradient(180deg,#0a2385 0%, #081d6f 100%);
  border-right:1px solid rgba(255,255,255,.10);
}
.sidebar-brand{
  padding:10px 8px 14px;
  border-bottom:1px solid rgba(255,255,255,.12);
  margin-bottom:8px;
}
.sidebar-brand-logo{
  display:block;
  width:100%;
  max-width:182px;
  height:auto;
  margin:0 auto;
  filter:drop-shadow(0 4px 16px rgba(0,0,0,.18));
}
.profile-block{
  border-bottom:1px solid rgba(255,255,255,.10);
}
.profile-ring{
  background:#f6d80a;
}
.profile-avatar{
  background:#0a2385;
  color:#fff;
}
.sidebar-nav button{
  color:#dfe7ff;
}
.nav-ico{
  color:#b7c4ff;
}
.sidebar-nav button:hover{
  background:rgba(246,216,10,.14);
  color:#fff;
}
.sidebar-nav button.active{
  background:#f6d80a;
  color:#0a2385;
  box-shadow:none;
}
.sidebar-nav button.active .nav-ico{
  color:#0a2385;
}
.side-footer{
  border-top:1px solid rgba(255,255,255,.12);
  color:#dfe7ff;
}
.brand-mini{
  background:#f6d80a;
  color:#0a2385;
}

/* Topbar / buttons */
.topbar{
  background:rgba(247,248,251,.92);
}
.search-box{
  background:#fff;
}
.btn.primary,.btn-primary{
  background:#0a2385;
}
.btn.primary:hover,.btn-primary:hover{
  background:#091d6d;
}
.btn-secondary:hover{
  border-color:#cdd5e8;
}
.badge.info{
  background:#eef2ff;
  color:#0a2385;
}

/* Premium blocks */
.exec-hero{
  background:
    radial-gradient(circle at 88% 18%,rgba(246,216,10,.22),transparent 24%),
    linear-gradient(135deg,#fff 0%,#fbfcff 65%,#f6f8ff 100%);
}
.exec-hero:after{
  border-color:rgba(10,35,133,.10);
}
.hero-status{
  border-color:#e3e7f0;
}
.status-ring{
  background:conic-gradient(#f6d80a 0 86%,#ebedf1 86% 100%);
}
.metric-icon{
  background:#fff6d7;
  color:#0a2385;
}
.progress i{
  background:#0a2385;
}
.ai-brief{
  background:#0a2385;
  border-color:#0a2385;
}
.ai-brief .btn{
  background:#f6d80a;
  color:#0a2385;
}
.action-severity{
  background:#f6d80a;
}

/* Project master */
.project-intro{
  background:linear-gradient(135deg,#fff,#fafcff);
  border-left:4px solid #f6d80a;
}
.stage-step.active{
  color:#0a2385;
  background:#f5f7ff;
  border-color:#dbe3fb;
}
.integrity-badge strong{
  color:#0a2385;
}
.file-drop{
  background:#fffdf3;
  border-color:#eadc8d;
  color:#0a2385;
}

/* Report */
.report-cover{
  background:#0a2385;
}
.report-metrics strong{
  color:#0a2385;
}

/* Login */
.login-brand{
  background:#0a2385;
}
.login-brand:after{
  border-color:rgba(246,216,10,.18);
}
.login-logo{
  display:block;
  width:100%;
  max-width:340px;
  height:auto;
  margin-bottom:22px;
  background:transparent;
}
@media(max-width:720px){
  .sidebar-brand-logo{
    max-width:160px;
  }
  .login-logo{
    max-width:280px;
  }
}


/* ===== LOGO ALIANZA BLANCO - VISIBILIDAD SIDEBAR ===== */
.sidebar-brand{
  padding:14px 8px 16px;
  min-height:98px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-bottom:1px solid rgba(255,255,255,.14);
}
.sidebar-brand-logo{
  display:block!important;
  width:100%!important;
  max-width:195px!important;
  height:auto!important;
  object-fit:contain!important;
  opacity:1!important;
  visibility:visible!important;
  filter:none!important;
}
.login-logo{
  display:block!important;
  width:100%!important;
  max-width:360px!important;
  height:auto!important;
  object-fit:contain!important;
  opacity:1!important;
  visibility:visible!important;
  filter:none!important;
}
@media(max-width:720px){
  .sidebar-brand{min-height:90px}
  .sidebar-brand-logo{max-width:178px!important}
}


/* ===== DASHBOARD COLOR V3 ===== */
:root{
  --brand-blue:#0a2385;
  --brand-yellow:#f6d80a;
  --c-cyan:#0ea5e9;
  --c-green:#16a34a;
  --c-orange:#f59e0b;
  --c-purple:#7c3aed;
  --c-red:#dc2626;
  --c-teal:#0f766e;
}

/* Hero más vivo pero corporativo */
.exec-hero{
  background:
    radial-gradient(circle at 90% 10%,rgba(246,216,10,.30),transparent 24%),
    radial-gradient(circle at 72% 90%,rgba(14,165,233,.14),transparent 26%),
    linear-gradient(135deg,#ffffff 0%,#f8faff 55%,#f3f6ff 100%);
  border-color:#dfe5f2;
}
.hero-status{
  box-shadow:0 8px 24px rgba(10,35,133,.10);
}

/* Tarjetas KPI con identidad por categoría */
.premium-kpis .metric-card{
  position:relative;
  overflow:hidden;
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.premium-kpis .metric-card:hover{
  transform:translateY(-2px);
  box-shadow:0 12px 28px rgba(20,30,60,.10);
}
.premium-kpis .metric-card:before{
  content:"";
  position:absolute;
  left:0;top:0;bottom:0;
  width:5px;
  border-radius:14px 0 0 14px;
}
.premium-kpis .metric-card:nth-child(1):before{background:var(--c-cyan)}
.premium-kpis .metric-card:nth-child(2):before{background:var(--c-purple)}
.premium-kpis .metric-card:nth-child(3):before{background:var(--c-green)}
.premium-kpis .metric-card:nth-child(4):before{background:var(--c-orange)}

.premium-kpis .metric-card:nth-child(1) .metric-icon{background:#e9f7fe;color:var(--c-cyan)}
.premium-kpis .metric-card:nth-child(2) .metric-icon{background:#f2ebff;color:var(--c-purple)}
.premium-kpis .metric-card:nth-child(3) .metric-icon{background:#eaf8ef;color:var(--c-green)}
.premium-kpis .metric-card:nth-child(4) .metric-icon{background:#fff5df;color:var(--c-orange)}

.premium-kpis .metric-card:nth-child(1) .metric-value{color:#0369a1}
.premium-kpis .metric-card:nth-child(2) .metric-value{color:#6d28d9}
.premium-kpis .metric-card:nth-child(3) .metric-value{color:#15803d}
.premium-kpis .metric-card:nth-child(4) .metric-value{color:#b45309}

/* Gráfica con más contraste */
.month-bars i:first-child{background:#dbe8ff}
.month-bars i:last-child{background:linear-gradient(180deg,#2563eb,#0a2385)}
.chart-stage:before,.chart-stage:after{border-top-color:#e3e8f2}

/* IA gerencial con gradiente */
.ai-brief{
  background:
    radial-gradient(circle at 90% 10%,rgba(246,216,10,.18),transparent 22%),
    linear-gradient(135deg,#0a2385 0%,#16369f 60%,#1f4bb8 100%);
  border-color:#0a2385;
}
.ai-brief .btn{
  background:var(--brand-yellow);
  color:var(--brand-blue);
}
.ai-brief .btn:hover{
  background:#ffe640;
}

/* Prioridades */
.action-item{
  border-radius:9px;
  padding:10px 8px;
}
.action-item:hover{background:#fafbfe}
.action-severity{background:var(--c-orange)}
.action-severity.red{background:var(--c-red)}
.action-severity.green{background:var(--c-green)}

/* Cumplimiento por área */
.area-list .area-row:nth-child(1) .progress i{background:var(--c-cyan)}
.area-list .area-row:nth-child(2) .progress i{background:var(--c-purple)}
.area-list .area-row:nth-child(3) .progress i{background:var(--c-green)}
.area-list .area-row:nth-child(4) .progress i{background:var(--c-orange)}
.area-list .area-row:nth-child(5) .progress i{background:var(--brand-blue)}

.area-list .area-row:nth-child(1) strong{color:#0369a1}
.area-list .area-row:nth-child(2) strong{color:#6d28d9}
.area-list .area-row:nth-child(3) strong{color:#15803d}
.area-list .area-row:nth-child(4) strong{color:#b45309}
.area-list .area-row:nth-child(5) strong{color:var(--brand-blue)}


.project-mini{
  position:relative;
  overflow:hidden;
}
.project-mini:nth-child(1){background:linear-gradient(90deg,#fff,#f5f8ff)}
.project-mini:nth-child(2){background:linear-gradient(90deg,#fff,#fff8e8)}
.project-mini:nth-child(3){background:linear-gradient(90deg,#fff,#f6f0ff)}
.project-mini:nth-child(1) .progress i{background:var(--brand-blue)}
.project-mini:nth-child(2) .progress i{background:var(--c-orange)}
.project-mini:nth-child(3) .progress i{background:var(--c-purple)}

/* Badges generales más vivos */
.badge.success{background:#e9f8ef;color:#15803d}
.badge.warning{background:#fff4dd;color:#b45309}
.badge.danger{background:#feecec;color:#b91c1c}
.badge.info{background:#eaf2ff;color:#1d4ed8}

/* Tarjetas de secciones */
.dashboard-bottom > .card:first-child{
  border-top:4px solid #0ea5e9;
}
.dashboard-bottom > .card:last-child{
  border-top:4px solid #7c3aed;
}
.operation-card{
  border-top:4px solid var(--brand-blue);
}

/* Inputs/topbar discretamente más alineados con marca */
.search-box:focus-within{
  border-color:#b7c3f1;
  box-shadow:0 0 0 3px rgba(10,35,133,.06);
}
.top-icon:hover{
  color:var(--brand-blue);
  border-color:#cbd4ef;
}

/* Sidebar activo con amarillo, hover azul más brillante */
.sidebar-nav button:hover{
  background:rgba(246,216,10,.12);
}
.sidebar-nav button.active{
  background:linear-gradient(90deg,#f6d80a,#ffe03a);
  color:#0a2385;
}


/* ===== PERFORMANCE / CARGA PERCIBIDA ===== */
.dashboard-skeleton{display:grid;gap:12px}
.skeleton{
  position:relative;overflow:hidden;
  background:#e9edf4;border-radius:14px;
}
.skeleton:after{
  content:"";position:absolute;inset:0;transform:translateX(-100%);
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.65),transparent);
  animation:mc-shimmer 1.1s infinite;
}
.hero-skeleton{height:150px}
.skeleton-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}
.kpi-skeleton{height:112px}
.content-skeleton{height:330px}
@keyframes mc-shimmer{100%{transform:translateX(100%)}}
@media(max-width:1020px){.skeleton-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:720px){.skeleton-grid{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){.skeleton:after{animation:none}}



.project-create-form{padding:20px}
.project-create-section{margin-top:20px;padding-top:18px;border-top:1px solid var(--line)}
.area-selector{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.area-choice{
  display:flex;gap:11px;align-items:flex-start;padding:13px;
  border:1px solid var(--line);border-radius:11px;background:#fff;
  transition:border-color .15s,background .15s,box-shadow .15s
}
.area-choice:hover{border-color:#bac6eb;box-shadow:0 6px 18px rgba(10,35,133,.06)}
.area-choice:has(input:checked){background:#f5f7ff;border-color:#b9c6f5}
.area-choice input{margin-top:2px;accent-color:#0a2385}
.area-choice strong,.area-choice small{display:block}
.area-choice strong{font-size:12px;color:#172033}
.area-choice small{font-size:10px;color:var(--muted);margin-top:3px;line-height:1.45}
.training-choice{display:flex;gap:9px;align-items:center;margin-top:14px;padding:12px;background:#fff9dc;border:1px solid #eddda0;border-radius:9px;font-size:11px}
.training-choice input,.inline-check input{accent-color:#0a2385}
.form-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:20px;padding-top:15px;border-top:1px solid var(--line)}
.empty-project-state{text-align:center;padding:40px 20px}
.empty-project-icon{width:54px;height:54px;margin:0 auto 12px;border-radius:14px;display:grid;place-items:center;background:#eef2ff;color:#0a2385;font-size:25px}
.empty-project-state h3{font-size:16px;margin:0 0 5px}
.empty-project-state p{font-size:11px;color:var(--muted);margin:0 auto 15px;max-width:470px}
.inline-check{display:flex!important;align-items:center;gap:8px;min-height:40px;padding:9px;border:1px solid var(--line);border-radius:8px}
.inline-check span{font-size:11px!important}
@media(max-width:780px){
  .area-selector{grid-template-columns:1fr}
  .form-actions{flex-direction:column-reverse}
  .form-actions .btn{width:100%}
}


/* ===== PRESENTACIÓN DEL PROYECTO ===== */
.btn-stage-next{background:linear-gradient(90deg,#f6d80a,#ffe45a);color:#0a2385;border:1px solid #e4c900;font-weight:800}
.stage-ready-card{display:flex;align-items:center;justify-content:space-between;gap:18px;border-left:5px solid #16a34a;background:linear-gradient(90deg,#f3fbf6,#fff);margin-bottom:14px}
.stage-ready-card h3{margin:4px 0;font-size:16px}.stage-ready-card p{margin:0;color:var(--muted);font-size:11px;line-height:1.5}
.presentation-card{border-top:4px solid #7c3aed;margin-bottom:14px;background:linear-gradient(180deg,#fcfbff,#fff 120px)}
.presentation-note{margin-top:14px;padding:12px 14px;border-radius:10px;background:#f3f0ff;border:1px solid #ddd5ff;color:#51437c;font-size:11px;line-height:1.5}
.presentation-note strong{color:#4c1d95}
.ai-panel,.ai-brief,[data-open-ai],#quickAiBtn,#aiDrawer{display:none!important}
.executive-brief{background:radial-gradient(circle at 92% 10%,rgba(246,216,10,.18),transparent 25%),linear-gradient(135deg,#0a2385,#173ba3);color:#fff;border-color:#0a2385}
.executive-brief .eyebrow,.executive-brief p{color:rgba(255,255,255,.78)}.executive-brief h3{color:#fff}
@media(max-width:780px){.stage-ready-card{align-items:stretch;flex-direction:column}.stage-ready-card .btn{width:100%}}


/* ===== VISTA PREVIA DEL INFORME PARA PRESENTACIÓN ===== */
.report-preview-shell{
  border-top:4px solid #0a2385;
  margin-bottom:14px;
  background:#fff;
}
.report-preview-shell[hidden]{display:none!important}
.report-preview-actions,.presentation-head-actions{
  display:flex;gap:8px;align-items:center;flex-wrap:wrap
}
.project-report-preview{
  max-width:1050px;margin:12px auto 0;
  background:#fff;border:1px solid #e3e7ef;border-radius:14px;
  padding:28px;box-shadow:0 12px 30px rgba(20,30,60,.06)
}
.report-cover{
  display:flex;justify-content:space-between;gap:24px;
  padding-bottom:20px;border-bottom:3px solid #0a2385;margin-bottom:18px
}
.report-cover h1{font-size:25px;margin:4px 0;color:#14213d}
.report-cover p{margin:0;color:#667085}
.report-cover-meta{display:grid;gap:8px;min-width:260px}
.report-cover-meta span{display:grid;gap:2px;font-size:11px;color:#667085}
.report-cover-meta strong{font-size:9px;text-transform:uppercase;letter-spacing:.06em;color:#0a2385}
.report-section{padding:14px 0;border-bottom:1px solid #eef1f5}
.report-section h2{font-size:13px;margin:0 0 7px;color:#0a2385}
.report-section p{font-size:11px;color:#394150;line-height:1.65;white-space:pre-wrap;margin:0}
.report-grid-two{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.report-table-wrap{overflow:auto}
.report-table{width:100%;border-collapse:collapse}
.report-table th,.report-table td{
  border:1px solid #e1e5eb;padding:9px;font-size:10px;vertical-align:top;text-align:left
}
.report-table th{background:#f5f7fb;color:#344054;font-weight:700}
.report-signoff{border-bottom:0}
.report-status-box{
  display:flex;flex-direction:column;gap:4px;padding:12px 14px;
  background:#f3f7ff;border:1px solid #d7e0f5;border-radius:10px
}
.report-status-box strong{color:#0a2385;font-size:11px}
.report-status-box span{font-size:10px;color:#667085}
@media(max-width:850px){
  .report-cover{flex-direction:column}
  .report-cover-meta{min-width:0}
  .report-grid-two{grid-template-columns:1fr}
  .presentation-head-actions{align-items:flex-start}
}


/* ===== VISTA PREVIA FLOTANTE ===== */
body.modal-open{overflow:hidden}
.report-modal-backdrop{
  position:fixed;
  inset:0;
  z-index:9999;
  background:rgba(15,23,42,.58);
  backdrop-filter:blur(6px);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
}
.report-modal-backdrop[hidden]{display:none!important}
.report-modal{
  width:min(1180px,96vw);
  height:min(88vh,920px);
  background:#fff;
  border-radius:18px;
  box-shadow:0 30px 80px rgba(15,23,42,.30);
  border:1px solid rgba(255,255,255,.35);
  display:flex;
  flex-direction:column;
  overflow:hidden;
  animation:reportModalIn .18s ease-out;
}
.report-modal-head{
  display:flex;
  justify-content:space-between;
  gap:18px;
  align-items:center;
  padding:18px 20px;
  border-bottom:1px solid #e7eaf0;
  background:
    radial-gradient(circle at 92% 15%,rgba(246,216,10,.18),transparent 24%),
    linear-gradient(180deg,#fff,#f8faff);
}
.report-modal-head h3{
  margin:3px 0 2px;
  font-size:17px;
  color:#15213d;
}
.report-modal-head p{
  margin:0;
  font-size:10px;
  color:#667085;
}
.report-modal-actions{
  display:flex;
  align-items:center;
  gap:8px;
}
.report-modal-close{
  width:38px;
  height:38px;
  border:1px solid #dfe4ec;
  border-radius:10px;
  background:#fff;
  color:#344054;
  font-size:24px;
  line-height:1;
  cursor:pointer;
}
.report-modal-close:hover{
  background:#f6f7f9;
  border-color:#cfd5df;
}
.report-modal-body{
  flex:1;
  overflow:auto;
  padding:22px;
  background:#eef2f7;
}
.report-modal-body .project-report-preview{
  margin:0 auto;
  max-width:980px;
  min-height:100%;
  border-radius:12px;
  box-shadow:0 12px 32px rgba(15,23,42,.09);
}
@keyframes reportModalIn{
  from{opacity:0;transform:translateY(10px) scale(.99)}
  to{opacity:1;transform:translateY(0) scale(1)}
}
@media(max-width:780px){
  .report-modal-backdrop{padding:0}
  .report-modal{
    width:100vw;
    height:100vh;
    border-radius:0;
  }
  .report-modal-head{
    align-items:flex-start;
    flex-direction:column;
  }
  .report-modal-actions{
    width:100%;
    justify-content:space-between;
  }
  .report-modal-body{
    padding:12px;
  }
}


/* ===== INFORME FLOTANTE: CONTRASTE Y LEGIBILIDAD ===== */

/* Fondo del modal */
.report-modal-body{
  background:#edf1f7 !important;
}

/* Documento */
.project-report-preview{
  background:#ffffff !important;
  color:#172033 !important;
  border:1px solid #d8dee9 !important;
}

/* Portada */
.report-cover{
  background:linear-gradient(135deg,#0a2385 0%,#173da6 100%) !important;
  color:#ffffff !important;
  padding:24px !important;
  border-radius:12px !important;
  border-bottom:0 !important;
}
.report-cover .eyebrow{
  color:#f6d80a !important;
}
.report-cover h1{
  color:#ffffff !important;
  font-size:26px !important;
  line-height:1.2 !important;
}
.report-cover p{
  color:#dfe6ff !important;
}
.report-cover-meta{
  background:rgba(255,255,255,.10) !important;
  border:1px solid rgba(255,255,255,.18) !important;
  border-radius:10px !important;
  padding:12px !important;
}
.report-cover-meta span{
  color:#edf2ff !important;
}
.report-cover-meta strong{
  color:#f6d80a !important;
}

/* Secciones */
.report-section{
  background:#ffffff !important;
  color:#172033 !important;
}
.report-section h2{
  color:#0a2385 !important;
  font-size:14px !important;
  font-weight:800 !important;
  letter-spacing:0 !important;
}
.report-section p{
  color:#273247 !important;
  font-size:12px !important;
  line-height:1.7 !important;
}

/* Dos columnas */
.report-grid-two .report-section{
  background:#f8faff !important;
  border:1px solid #e2e7f0 !important;
  border-radius:10px !important;
  padding:14px !important;
}

/* Tabla */
.report-table{
  color:#172033 !important;
  background:#ffffff !important;
}
.report-table th{
  background:#0a2385 !important;
  color:#ffffff !important;
  font-weight:800 !important;
}
.report-table td{
  background:#ffffff !important;
  color:#273247 !important;
}
.report-table tr:nth-child(even) td{
  background:#f7f9fc !important;
}
.report-table th,
.report-table td{
  border-color:#d6dce7 !important;
  font-size:11px !important;
}

/* Estatus */
.report-status-box{
  background:#fff8d8 !important;
  border:1px solid #e8d86d !important;
}
.report-status-box strong{
  color:#0a2385 !important;
}
.report-status-box span{
  color:#4a5568 !important;
}

/* Encabezado del modal */
.report-modal-head{
  background:#ffffff !important;
  color:#172033 !important;
}
.report-modal-head .eyebrow{
  color:#0a2385 !important;
}
.report-modal-head h3{
  color:#172033 !important;
}
.report-modal-head p{
  color:#596579 !important;
}

/* Botones */
.report-modal-actions .btn-secondary{
  background:#ffffff !important;
  color:#0a2385 !important;
  border-color:#c8d2ea !important;
}
.report-modal-actions .btn-primary{
  background:#0a2385 !important;
  color:#ffffff !important;
}
.report-modal-close{
  color:#172033 !important;
  background:#ffffff !important;
}

/* Impresión: evitar textos claros sobre fondo blanco */
@media print{
  .report-cover{
    background:#ffffff !important;
    color:#172033 !important;
    border:2px solid #0a2385 !important;
  }
  .report-cover .eyebrow,
  .report-cover h1,
  .report-cover p,
  .report-cover-meta span,
  .report-cover-meta strong{
    color:#172033 !important;
  }
  .report-cover-meta{
    background:#ffffff !important;
    border:1px solid #cfd6e3 !important;
  }
  .report-table th{
    background:#eef2ff !important;
    color:#172033 !important;
  }
}


/* ===== BOTÓN GERENCIA GENERAL ===== */
.general-approval-wrap{
  display:flex;
  justify-content:flex-end;
  margin-top:14px;
}
.btn-general-approval{
  background:linear-gradient(90deg,#0a2385,#163ba4);
  color:#ffffff;
  border:1px solid #0a2385;
  font-weight:800;
  box-shadow:0 8px 18px rgba(10,35,133,.14);
}
.btn-general-approval:hover{
  transform:translateY(-1px);
  filter:brightness(1.04);
}

.preview-general-approval{
  align-items:center;
  gap:10px;
}
.preview-general-approval small{
  color:#667085;
  font-size:10px;
}


/* ===== FLUJO DE ETAPAS: ESTADO VISUAL ===== */
.stage-step{
  transition:all .18s ease;
}
.stage-step.active{
  background:#eaf8ef !important;
  border-color:#86d8a1 !important;
  color:#166534 !important;
  box-shadow:0 0 0 2px rgba(22,163,74,.06);
}
.stage-step.active .stage-check{
  background:#16a34a !important;
  border-color:#16a34a !important;
  color:#ffffff !important;
}
.stage-step.done{
  background:#f1fbf4 !important;
  border-color:#a7dfb9 !important;
  color:#166534 !important;
}
.stage-step.done .stage-check{
  background:#16a34a !important;
  border-color:#16a34a !important;
  color:#ffffff !important;
  font-weight:900 !important;
}
.stage-step.pending{
  background:#ffffff !important;
  border-color:#d8dee8 !important;
  color:#667085 !important;
}
.stage-step.locked{
  opacity:.58;
}
.stage-step.done span:last-child,
.stage-step.active span:last-child{
  font-weight:800;
}

/* ===== AUTORIZACIÓN ===== */
.authorization-card{
  border-top:4px solid #16a34a;
  margin-bottom:14px;
}
.authorization-approved{
  display:flex;
  align-items:center;
  gap:12px;
  padding:14px;
  border-radius:11px;
  background:#edf9f1;
  border:1px solid #b9e4c7;
}
.authorization-check{
  width:38px;
  height:38px;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:#16a34a;
  color:#fff;
  font-weight:900;
  font-size:20px;
}
.authorization-approved strong{
  display:block;
  color:#166534;
  font-size:12px;
}
.authorization-approved p{
  margin:3px 0 0;
  color:#5b6b62;
  font-size:10px;
}
.authorization-pending{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  padding:14px;
  background:#fff9e8;
  border:1px solid #eadca5;
  border-radius:11px;
}
.authorization-pending p{
  margin:0;
  color:#6b5a22;
  font-size:11px;
}
.general-approval-wrap{
  flex-wrap:wrap;
  align-items:center;
  gap:9px;
}
.general-approval-wrap small{
  color:#667085;
  font-size:10px;
}
.btn-general-approval.approved{
  background:#16a34a !important;
  border-color:#16a34a !important;
  opacity:1 !important;
}
.training-ready-card{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  border-left:5px solid #16a34a;
  background:linear-gradient(90deg,#effaf3,#fff);
  margin-bottom:14px;
}
.training-ready-card h3{
  margin:3px 0;
  color:#166534;
}
.training-ready-card p{
  margin:0;
  color:#667085;
  font-size:11px;
}
.training-stage-badge{
  background:#16a34a;
  color:#fff;
  font-size:10px;
  font-weight:800;
  padding:8px 11px;
  border-radius:999px;
}
@media(max-width:780px){
  .authorization-pending,.training-ready-card{
    flex-direction:column;
    align-items:stretch;
  }
}

.stage-head-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.btn-xs{padding:7px 9px!important;font-size:9px!important}


/* ===== TRANSICIÓN AUTORIZACIÓN -> CAPACITACIÓN ===== */
.stage-step.done{
  background:#eefaf2 !important;
  border-color:#8bd1a1 !important;
  color:#166534 !important;
}
.stage-step.done .stage-check{
  background:#16a34a !important;
  color:#fff !important;
  border-color:#16a34a !important;
}
.stage-step.active{
  background:#e8f8ee !important;
  border-color:#73c98f !important;
  color:#166534 !important;
}
.stage-step.active .stage-check{
  background:#16a34a !important;
  color:#fff !important;
  border-color:#16a34a !important;
}
.training-ready-card{
  border-left:5px solid #16a34a !important;
}

.btn-general-approval.continue{
  background:linear-gradient(90deg,#f6d80a,#ffe55d)!important;
  color:#0a2385!important;
  border-color:#e2c800!important;
}
.authorization-next{
  display:flex;
  justify-content:flex-end;
  margin-top:12px;
}


/* ===== V1.0 LIMPIA: CAPACITACIÓN ===== */
.training-card{
  border-top:4px solid #16a34a;
  margin-bottom:14px;
  background:linear-gradient(180deg,#f7fff9,#fff 140px);
}
.training-complete-choice{
  display:flex!important;
  align-items:center;
  gap:9px;
  min-height:42px;
  padding:10px 12px;
  border:1px solid #bfe4ca;
  background:#eefaf2;
  border-radius:9px;
}
.training-complete-choice input{accent-color:#16a34a}
.training-complete-choice span{font-size:11px!important;color:#166534}
.training-not-required{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:14px;
  background:#f7f9fc;
  border:1px solid #e0e5ed;
  border-radius:10px;
}
.training-not-required p{margin:0;font-size:11px;color:#5b6474}
@media(max-width:780px){
  .training-not-required{flex-direction:column;align-items:stretch}
}

.single-dashboard-block{grid-template-columns:1fr!important}
