:root{
  --navy:#081a31;
  --navy-2:#0d2747;
  --blue:#1667d9;
  --cyan:#19b5fe;
  --bg:#f3f6fb;
  --surface:#fff;
  --text:#14213d;
  --muted:#73809a;
  --border:#e7edf6;
  --shadow:0 12px 35px rgba(20,33,61,.08);
}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--text);font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif}
.app-shell{min-height:100vh}
.sidebar{position:fixed;inset:0 auto 0 0;width:260px;background:linear-gradient(180deg,var(--navy),#071426);padding:22px 16px;display:flex;flex-direction:column;z-index:1040;box-shadow:15px 0 45px rgba(4,18,38,.08)}
.brand{display:flex;align-items:center;gap:12px;padding:0 8px 24px;border-bottom:1px solid rgba(255,255,255,.08)}
.brand-mark{width:43px;height:43px;border-radius:13px;background:linear-gradient(135deg,#2ca5ff,#0d5fd1);color:#fff;display:grid;place-items:center;font-size:22px;box-shadow:0 10px 25px rgba(32,136,255,.28)}
.brand-name{color:#fff;font-weight:800;letter-spacing:.9px}
.brand-sub{color:#8fa7c6;font-size:12px}
.side-nav{gap:5px;margin-top:22px}
.side-nav .nav-link{display:flex;align-items:center;gap:12px;color:#a9bad0;border-radius:12px;padding:11px 13px;font-weight:600;transition:.2s}
.side-nav .nav-link i{font-size:18px;width:22px}
.side-nav .nav-link:hover{color:#fff;background:rgba(255,255,255,.06)}
.side-nav .nav-link.active{color:#fff;background:linear-gradient(135deg,#1469dd,#168cf0);box-shadow:0 12px 25px rgba(15,105,220,.3)}
.sidebar-footer{margin-top:auto;padding:16px 8px 2px;border-top:1px solid rgba(255,255,255,.08)}
.avatar{width:38px;height:38px;border-radius:50%;background:linear-gradient(135deg,#2a9df4,#1f66d5);display:grid;place-items:center;color:#fff;font-weight:800}
.main{margin-left:260px;min-height:100vh}
.topbar{height:88px;background:rgba(255,255,255,.92);backdrop-filter:blur(12px);border-bottom:1px solid var(--border);display:flex;align-items:center;padding:0 28px;gap:16px;position:sticky;top:0;z-index:1020}
.topbar-actions{margin-left:auto;display:flex;align-items:center;gap:10px}
.eyebrow{font-size:10px;letter-spacing:1.5px;font-weight:800;color:#7a89a3}
.page-title{font-size:21px;margin:2px 0 0;font-weight:800}
.content{padding:26px 28px 50px}
.btn{border-radius:10px;font-weight:650}
.btn-primary{background:linear-gradient(135deg,#1667d9,#168bea);border:0;box-shadow:0 8px 18px rgba(22,103,217,.2)}
.btn-icon{width:42px;height:42px;display:grid;place-items:center}
.notification-dot{position:absolute;top:-6px;right:-6px;min-width:20px;height:20px;padding:0 5px;border-radius:12px;background:#e63b3b;color:#fff;font-size:11px;display:grid;place-items:center;border:2px solid #fff}
.card-modern{background:var(--surface);border:1px solid var(--border);border-radius:18px;box-shadow:var(--shadow)}
.kpi-card{position:relative;overflow:hidden;padding:20px;min-height:132px}
.kpi-card::after{content:"";position:absolute;width:110px;height:110px;border-radius:50%;right:-35px;top:-38px;background:currentColor;opacity:.06}
.kpi-icon{width:46px;height:46px;border-radius:14px;display:grid;place-items:center;font-size:21px;background:rgba(22,103,217,.09)}
.kpi-label{font-size:13px;color:var(--muted);font-weight:700;margin-top:14px}
.kpi-value{font-size:31px;line-height:1;font-weight:850;margin-top:4px;letter-spacing:-1px}
.kpi-sub{font-size:12px;color:var(--muted);margin-top:7px}
.text-brand{color:var(--blue)!important}
.section-title{font-size:16px;font-weight:800;margin:0}
.section-sub{font-size:12px;color:var(--muted)}
.card-header-clean{padding:18px 20px;border-bottom:1px solid var(--border);display:flex;align-items:center;gap:10px}
.card-body-clean{padding:20px}
.chart-wrap{position:relative;min-height:300px}
.alert-row{display:flex;gap:12px;padding:13px 0;border-bottom:1px solid #edf1f7;align-items:flex-start}
.alert-row:last-child{border:0}
.alert-dot{width:10px;height:10px;border-radius:50%;margin-top:6px;flex:0 0 auto}
.badge-soft-danger{background:#fff0f1;color:#d83d49}
.badge-soft-warning{background:#fff7df;color:#a87100}
.badge-soft-info{background:#eaf7ff;color:#0b78b8}
.badge-soft-success{background:#eafaf1;color:#168654}
.badge-soft-secondary{background:#eef1f6;color:#5f6e85}
.table-modern{--bs-table-bg:transparent;margin-bottom:0}
.table-modern thead th{font-size:11px;text-transform:uppercase;letter-spacing:.5px;color:#7f8ca3;border-bottom:1px solid var(--border);padding:13px 12px;white-space:nowrap}
.table-modern td{padding:13px 12px;border-color:#edf1f7;vertical-align:middle}
.table-modern tbody tr:hover{background:#f9fbfe}
.customer-code{font-weight:800;color:#1c4d8d;font-size:12px}
.customer-name{font-weight:700;line-height:1.35}
.filters{background:#fff;border:1px solid var(--border);border-radius:16px;padding:16px;box-shadow:0 8px 25px rgba(20,33,61,.04)}
.form-control,.form-select{border-radius:10px;border-color:#dfe6f0;min-height:42px}
.form-control:focus,.form-select:focus{border-color:#69a9f1;box-shadow:0 0 0 .2rem rgba(22,103,217,.09)}
.form-label{font-size:12px;font-weight:750;color:#536179}
.progress-thin{height:6px;background:#eaf0f7;border-radius:99px}
.stat-pill{display:inline-flex;align-items:center;gap:6px;padding:6px 9px;border-radius:999px;font-size:12px;font-weight:700}
.hero-panel{background:linear-gradient(135deg,#0b2545,#123b70 58%,#1469dd);color:#fff;border-radius:22px;padding:26px;position:relative;overflow:hidden;box-shadow:0 18px 40px rgba(10,51,103,.23)}
.hero-panel::before,.hero-panel::after{content:"";position:absolute;border-radius:50%;border:1px solid rgba(255,255,255,.12)}
.hero-panel::before{width:240px;height:240px;right:-55px;top:-95px}
.hero-panel::after{width:150px;height:150px;right:75px;bottom:-105px}
.hero-number{font-size:42px;font-weight:900;letter-spacing:-1.5px}
.timeline-item{position:relative;padding-left:28px;padding-bottom:18px}
.timeline-item::before{content:"";position:absolute;left:7px;top:10px;bottom:-6px;width:1px;background:#dce5f0}
.timeline-item:last-child::before{display:none}
.timeline-dot{position:absolute;left:0;top:3px;width:15px;height:15px;border:3px solid #fff;border-radius:50%;box-shadow:0 0 0 2px currentColor}
.drop-zone{border:2px dashed #b7c7dc;border-radius:18px;padding:36px;text-align:center;background:#f9fbfe;transition:.2s;cursor:pointer}
.drop-zone.dragover{border-color:#1b78e4;background:#f0f7ff;transform:translateY(-2px)}
.drop-icon{font-size:42px;color:#2679dc}
.metric-bar{height:9px;background:#edf2f8;border-radius:99px;overflow:hidden}
.metric-bar>span{display:block;height:100%;border-radius:99px;background:linear-gradient(90deg,#1469dd,#27b4f6)}
.login-page{min-height:100vh;background:radial-gradient(circle at 18% 12%,rgba(31,131,247,.22),transparent 28%),linear-gradient(135deg,#061426,#0d2a4d 60%,#123d72);display:grid;place-items:center;padding:24px}
.login-card{width:min(960px,100%);min-height:570px;background:#fff;border-radius:26px;overflow:hidden;display:grid;grid-template-columns:1.08fr .92fr;box-shadow:0 35px 90px rgba(0,0,0,.28)}
.login-art{background:linear-gradient(145deg,#071c34,#0b3768);padding:48px;color:#fff;position:relative;overflow:hidden}
.login-art::before{content:"";position:absolute;width:430px;height:430px;border:1px solid rgba(255,255,255,.12);border-radius:50%;right:-210px;top:-120px}
.login-art::after{content:"";position:absolute;width:240px;height:240px;background:linear-gradient(135deg,rgba(34,150,255,.35),rgba(22,103,217,.05));border-radius:50%;right:-60px;bottom:-70px}
.login-form{padding:50px;display:flex;flex-direction:column;justify-content:center}
.login-logo{width:54px;height:54px;border-radius:16px;background:linear-gradient(135deg,#1590ee,#145ec9);display:grid;place-items:center;font-size:26px}
.dataTables_wrapper .dt-search input,.dataTables_wrapper .dt-length select{border:1px solid #dfe6f0;border-radius:8px;padding:6px 8px;background:#fff}
@media(max-width:991.98px){
  .sidebar{transform:translateX(-105%);transition:.25s}.sidebar.open{transform:none}.main{margin-left:0}
  .sidebar-backdrop{position:fixed;inset:0;background:rgba(5,18,38,.4);z-index:1030;opacity:0;visibility:hidden;transition:.2s}
  .sidebar-backdrop.show{opacity:1;visibility:visible}
  .content{padding:20px 15px 40px}.topbar{padding:0 15px}.login-card{grid-template-columns:1fr}.login-art{display:none}.login-form{padding:34px 24px}
}
@media print{
  .sidebar,.topbar,.no-print,.dt-search,.dt-length,.dt-paging{display:none!important}
  .main{margin-left:0}.content{padding:0}.card-modern,.filters{box-shadow:none!important}
}

/* ===== Contract Intelligence v2 ===== */
:root{--navy:#071d36;--navy2:#0b2f59;--blue2:#1c7fe8;--green:#22a878;--amber:#f5a524;--red:#df4e5a;--cyan:#31a9dc}
.content{max-width:1920px;margin:0 auto}
.min-w-0{min-width:0}
.executive-hero,.alert-hero,.report-cover{background:radial-gradient(circle at 86% 18%,rgba(62,159,255,.28),transparent 24%),linear-gradient(132deg,#071d36,#0c3564 58%,#126ad8);color:#fff;border-radius:24px;padding:28px 30px;box-shadow:0 22px 55px rgba(6,36,74,.22);position:relative;overflow:hidden}
.executive-hero:before,.alert-hero:before,.report-cover:before{content:"";position:absolute;width:280px;height:280px;border-radius:50%;border:1px solid rgba(255,255,255,.1);right:-90px;top:-140px}
.executive-kicker{font-size:11px;font-weight:850;letter-spacing:1.35px;color:rgba(255,255,255,.74);display:flex;align-items:center;gap:8px}
.live-dot{width:8px;height:8px;background:#59e1a7;border-radius:50%;box-shadow:0 0 0 5px rgba(89,225,167,.14);display:inline-block}
.executive-title{font-size:clamp(27px,3vw,42px);line-height:1.08;font-weight:900;letter-spacing:-1.4px;margin:12px 0 10px}.executive-copy{max-width:820px;color:rgba(255,255,255,.78);margin:0;font-size:14px}
.hero-metric-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.hero-metric{background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.13);border-radius:17px;padding:14px 15px;backdrop-filter:blur(8px)}.hero-metric span,.hero-metric small{display:block;color:rgba(255,255,255,.72);font-size:11px}.hero-metric strong{display:block;font-size:28px;line-height:1.15;margin:5px 0;font-weight:900}.hero-metric.danger{background:rgba(221,64,78,.2)}.hero-metric.warning{background:rgba(245,165,36,.16)}
.kpi-card-v2{transition:transform .2s ease,box-shadow .2s ease}.kpi-card-v2:hover{transform:translateY(-3px);box-shadow:0 18px 40px rgba(17,46,84,.12)}.kpi-link-icon{opacity:.25}.kpi-card-v2:hover .kpi-link-icon{opacity:.7}
.insight-pill{font-size:11px;color:#546581;background:#f1f5fa;border-radius:999px;padding:6px 10px;font-weight:750;white-space:nowrap}.insight-pill i{margin-right:5px}
.chart-lg{min-height:340px}.chart-mid{min-height:270px}.chart-sm{min-height:220px}
.gauge-wrap{height:210px;position:relative;display:grid;place-items:center}.gauge-wrap canvas{max-height:205px}.gauge-center{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;pointer-events:none}.gauge-center strong{font-size:34px;letter-spacing:-1px}.gauge-center span{font-size:12px;color:var(--muted)}
.mini-stat-row{display:flex;justify-content:space-between;gap:10px;padding:9px 0;border-bottom:1px solid #edf1f6;font-size:13px}.mini-stat-row:last-child{border-bottom:0}.dot{width:8px;height:8px;border-radius:50%;display:inline-block;margin-right:7px}.dot-success{background:#22a878}.dot-danger{background:#df4e5a}
.cliff-row{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #edf1f6;padding:10px 0}.cliff-row:last-child{border-bottom:0}.cliff-date{display:flex;gap:8px;align-items:center;font-weight:650}.cliff-date i{color:#7f91aa}.cliff-count{font-weight:850;background:#fff0f1;color:#c93a47;padding:5px 8px;border-radius:8px;font-size:12px}
.empty-soft{background:#f7f9fc;color:#718098;border:1px dashed #dbe4ef;border-radius:14px;padding:18px;text-align:center;font-size:13px}
.heatmap-wrap{overflow-x:auto}.heatmap-grid{min-width:720px;display:grid;grid-template-columns:180px repeat(var(--hm-cols),minmax(76px,1fr));gap:7px;align-items:stretch}.heatmap-corner,.heatmap-head,.heatmap-label{font-size:11px;font-weight:800;color:#687994}.heatmap-head{text-align:center;padding:8px}.heatmap-label{display:flex;align-items:center;padding:0 8px;color:#33435a}.heatmap-cell{height:48px;border-radius:11px;display:grid;place-items:center;border:1px solid #e8eef5;background:#f8fafc;color:#8592a6;transition:.15s}.heatmap-cell:hover{transform:translateY(-2px);box-shadow:0 6px 15px rgba(22,64,116,.08)}.heatmap-cell.lv1{background:#eaf4ff;color:#1768bd;border-color:#d9ebff}.heatmap-cell.lv2{background:#bfe0ff;color:#0c579d;border-color:#a8d4ff}.heatmap-cell.lv3{background:#6cb5f6;color:#fff;border-color:#5aa8ed}.heatmap-cell.lv4{background:#126ad8;color:#fff;border-color:#126ad8}
.followup-item{display:flex;align-items:center;gap:11px;padding:11px 0;border-bottom:1px solid #edf1f6}.followup-item:last-child{border-bottom:0}.followup-icon{width:35px;height:35px;border-radius:11px;display:grid;place-items:center;background:#eaf7ff;color:#0b78b8}.followup-icon.danger{background:#fff0f1;color:#d83d49}.followup-icon.info{background:#eaf7ff;color:#0b78b8}
.quality-card{display:flex;align-items:center;gap:13px;padding:16px;background:#f8fafc;border:1px solid #e8eef5;border-radius:15px}.quality-card>i{width:38px;height:38px;display:grid;place-items:center;border-radius:11px;background:#fff;color:#59708d;font-size:18px;box-shadow:0 4px 12px rgba(32,66,108,.05)}.quality-card strong,.quality-card span{display:block}.quality-card strong{font-size:21px}.quality-card span{font-size:11px;color:#718098}
.report-cover{display:flex;justify-content:space-between;align-items:center;gap:20px}.report-cover h2{font-weight:900;margin:7px 0 3px;font-size:28px}.report-cover p{margin:0;color:rgba(255,255,255,.72);font-size:13px}.report-score{min-width:250px;background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.15);border-radius:17px;padding:15px 18px}.report-score span,.report-score small{display:block;color:rgba(255,255,255,.7);font-size:11px}.report-score strong{font-size:34px;font-weight:900;display:block;line-height:1.2;margin:3px 0}.rate-chip{display:inline-block;padding:5px 8px;border-radius:9px;background:#eafaf1;color:#168654;font-weight:800;font-size:12px}.timeline-scroll{max-height:610px;overflow:auto}.quality-line{display:flex;justify-content:space-between;align-items:center;padding:11px 0;border-bottom:1px solid #edf1f6;font-size:13px}.quality-line:last-of-type{border-bottom:0}.status-dot{display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:8px}
.alert-hero{display:flex;align-items:center;justify-content:space-between;gap:30px}.alert-hero h2{font-size:30px;font-weight:900;margin:10px 0 6px}.alert-hero p{color:rgba(255,255,255,.75);margin:0;max-width:820px}.alert-hero-number{min-width:250px;text-align:right}.alert-hero-number span,.alert-hero-number small{display:block;color:rgba(255,255,255,.7);font-size:11px}.alert-hero-number strong{display:block;font-size:50px;line-height:1;font-weight:900;margin:6px 0}
.alert-kpi{padding:16px;display:flex;align-items:center;gap:12px}.alert-kpi-icon{width:42px;height:42px;border-radius:13px;display:grid;place-items:center;font-size:19px;flex:0 0 auto}.alert-kpi span{display:block;font-size:11px;color:#718098;font-weight:700}.alert-kpi strong{display:block;font-size:27px;line-height:1.1;margin-top:3px}
.alert-list-v2{max-height:850px;overflow:auto}.alert-card-v2{position:relative;display:flex;gap:16px;padding:16px 17px 16px 21px;border-bottom:1px solid #edf1f6;background:#fff}.alert-card-v2:hover{background:#fbfcfe}.severity-rail{position:absolute;left:0;top:11px;bottom:11px;width:4px;border-radius:0 5px 5px 0}.severity-danger .severity-rail{background:#df4e5a}.severity-warning .severity-rail{background:#f5a524}.severity-info .severity-rail{background:#31a9dc}.alert-main{flex:1;min-width:0}.alert-side{display:flex;align-items:flex-end;justify-content:center;flex-direction:column;gap:10px}.alert-meta{display:flex;flex-wrap:wrap;gap:10px 15px;margin-top:8px;color:#718098;font-size:11px}.alert-meta i{margin-right:5px}.next-action{display:flex;gap:7px;align-items:flex-start;background:#f7f9fc;border-radius:10px;padding:8px 10px;margin-top:9px;font-size:12px;color:#4d5f78}.next-action i{color:#f0a11d}.notif-unread{box-shadow:inset 3px 0 0 #247de2;background:#f7fbff!important}
@media(max-width:1199px){.hero-metric-grid{margin-top:5px}.report-cover,.alert-hero{align-items:flex-start;flex-direction:column}.report-score,.alert-hero-number{width:100%;text-align:left}}
@media(max-width:767px){.executive-hero,.alert-hero,.report-cover{padding:22px 18px;border-radius:19px}.hero-metric-grid{grid-template-columns:1fr 1fr}.alert-card-v2{flex-direction:column}.alert-side{align-items:flex-start;flex-direction:row}.chart-lg,.chart-wrap{min-height:270px}.report-score{min-width:0}}
@media(max-width:480px){.hero-metric-grid{grid-template-columns:1fr}.executive-title{font-size:27px}.alert-hero h2{font-size:25px}}
@media print{.report-cover{background:#fff!important;color:#111!important;border:1px solid #ddd;box-shadow:none}.report-cover p,.report-score span,.report-score small{color:#555!important}.report-score{border-color:#ddd}}
.badge-soft-dark{background:#e8edf3;color:#34445a}
