/* Contratos Jurídico — implementação fiel ao conceito azul Cena + linho + cobre */
html:not(.dark) #content.jlc-contracts-page{
  --jlc-navy:#082f4f;
  --jlc-navy2:#0c3d62;
  --jlc-blue:#11639a;
  --jlc-copper:#cf7b2d;
  --jlc-gold:#e5ad65;
  --jlc-cream:#fbf8f2;
  --jlc-linen:#f2ece3;
  --jlc-ink:#0d2d4b;
  --jlc-muted:#69788a;
  position:relative;
  isolation:isolate;
  padding:22px 22px 36px!important;
  background:
    radial-gradient(circle at 48% -12%,rgba(255,255,255,.96),rgba(255,255,255,0) 39%),
    linear-gradient(135deg,rgba(255,252,246,.96),rgba(243,236,226,.94));
  overflow-x:hidden;
}
html:not(.dark) #content.jlc-contracts-page::before{
  content:"";position:absolute;z-index:-2;pointer-events:none;
  width:520px;height:520px;right:18%;top:-90px;
  background:url('card-juris.webp') center 28%/cover no-repeat;
  opacity:.105;filter:grayscale(1) sepia(.22) contrast(.86) brightness(1.24);
  -webkit-mask-image:linear-gradient(90deg,transparent 0,#000 28%,#000 72%,transparent 100%);
  mask-image:linear-gradient(90deg,transparent 0,#000 28%,#000 72%,transparent 100%);
}
html:not(.dark) #content.jlc-contracts-page::after{
  content:"";position:absolute;z-index:-1;pointer-events:none;inset:0;
  background:
    repeating-radial-gradient(ellipse at 52% -10%,transparent 0 62px,rgba(169,117,65,.025) 64px,transparent 67px 126px),
    linear-gradient(115deg,transparent 0 55%,rgba(255,255,255,.3) 55.2%,transparent 55.5%);
}

/* Cabeçalho */
html:not(.dark) #content.jlc-contracts-page>.pageheader{
  position:relative;margin:0 0 16px;padding:12px 8px 14px 24px;min-height:90px;
  border-bottom:1px solid rgba(113,86,58,.12);background:transparent;
}
html:not(.dark) #content.jlc-contracts-page>.pageheader::before{
  content:"";position:absolute;left:4px;top:18px;width:4px;height:42px;border-radius:99px;
  background:linear-gradient(180deg,#efb262,#c76f25);box-shadow:0 0 14px rgba(207,123,45,.2);
}
html:not(.dark) #content.jlc-contracts-page>.pageheader h1{
  margin:0!important;color:var(--jlc-ink)!important;font:500 36px/1.05 Georgia,'Times New Roman',serif!important;letter-spacing:-.025em;
}
html:not(.dark) #content.jlc-contracts-page>.pageheader .desc{margin-top:6px!important;color:#617386!important;font-size:13px!important}
html:not(.dark) #content.jlc-contracts-page>.pageheader .actions{gap:10px!important;align-items:center}
html:not(.dark) #content.jlc-contracts-page>.pageheader .btn{
  min-height:42px!important;border-radius:12px!important;font-weight:650!important;box-shadow:0 8px 18px -14px rgba(12,47,78,.4)!important;
}
html:not(.dark) #content.jlc-contracts-page>.pageheader .btn.pri{
  color:#fff!important;border-color:#0c426a!important;background:linear-gradient(180deg,#124f79,#082f4f)!important;
  box-shadow:inset 0 1px rgba(255,255,255,.18),0 12px 24px -15px rgba(4,33,55,.75)!important;
}
html:not(.dark) #content.jlc-contracts-page>.pageheader .btn.sec{
  color:#9a571d!important;border-color:rgba(199,116,43,.35)!important;background:rgba(255,251,245,.88)!important;
}

/* KPI */
.jlc-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:0 0 14px}
.jlc-kpi{
  min-height:98px;padding:16px 16px;border:1px solid rgba(120,91,57,.14);border-radius:16px;
  display:flex;align-items:center;gap:13px;background:linear-gradient(145deg,rgba(255,255,255,.88),rgba(250,245,237,.8));
  box-shadow:0 15px 32px -27px rgba(50,35,20,.55),inset 0 1px rgba(255,255,255,.9);backdrop-filter:blur(16px);
}
.jlc-kpi-icon{width:46px;height:46px;border-radius:14px;display:grid;place-items:center;flex:0 0 auto;color:#c96f25;border:1px solid rgba(211,132,57,.2);background:linear-gradient(145deg,#fff9ef,#f5e8d7);box-shadow:inset 0 1px #fff,0 8px 15px -13px #7d4a1f}
.jlc-kpi-icon svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.55;stroke-linecap:round;stroke-linejoin:round}
.jlc-kpi strong{display:block;color:#0b2c4a;font:500 26px/1 Georgia,'Times New Roman',serif}
.jlc-kpi span{display:block;margin-top:4px;color:#566b81;font-size:10px;font-weight:700;letter-spacing:.14em;text-transform:uppercase}
.jlc-kpi small{display:block;margin-top:5px;color:#c47029;font-size:10px}

/* Toolbar real */
html:not(.dark) #content.jlc-contracts-page>.toolbar{
  display:grid!important;grid-template-columns:minmax(250px,1fr) 160px 190px 180px!important;gap:9px!important;
  padding:11px!important;margin:0 0 14px!important;border:1px solid rgba(123,94,60,.14)!important;border-radius:15px!important;
  background:rgba(255,252,247,.79)!important;box-shadow:0 13px 30px -27px rgba(35,26,17,.5)!important;backdrop-filter:blur(18px);
}
html:not(.dark) #content.jlc-contracts-page>.toolbar input,
html:not(.dark) #content.jlc-contracts-page>.toolbar select{
  height:43px!important;border-radius:11px!important;border:1px solid rgba(117,102,84,.16)!important;
  color:#173650!important;background:rgba(255,255,255,.74)!important;box-shadow:inset 0 1px rgba(255,255,255,.88)!important;font-size:12px!important;
}
html:not(.dark) #content.jlc-contracts-page>.toolbar input:focus,
html:not(.dark) #content.jlc-contracts-page>.toolbar select:focus{border-color:rgba(207,123,45,.55)!important;box-shadow:0 0 0 3px rgba(207,123,45,.08)!important}

/* O conteúdo legado continua funcional, mas fica como fonte de dados invisível */
#content.jlc-contracts-page #ct-table.jlc-source{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;opacity:0!important;pointer-events:none!important;clip-path:inset(100%)!important}

/* Workspace */
.jlc-workspace{display:grid;grid-template-columns:minmax(0,1fr) 325px;gap:14px;align-items:start}
.jlc-contracts-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px;align-content:start}
.jlc-contract-card{
  position:relative;min-height:150px;padding:17px 17px 14px;border:1px solid rgba(101,83,63,.15);border-radius:16px;text-align:left;color:#17334e;
  background:linear-gradient(145deg,rgba(255,255,255,.93),rgba(248,242,233,.91));
  box-shadow:0 15px 30px -26px rgba(40,29,18,.58),inset 0 1px rgba(255,255,255,.95);cursor:pointer;overflow:hidden;
  transition:transform .2s ease,border-color .2s ease,box-shadow .2s ease;
}
.jlc-contract-card::before{content:"";position:absolute;left:0;top:18px;bottom:18px;width:3px;border-radius:0 4px 4px 0;background:linear-gradient(#d5873c,#e8b36d);opacity:.7}
.jlc-contract-card::after{content:"";position:absolute;width:120px;height:120px;right:-44px;bottom:-60px;border:1px solid rgba(14,70,105,.055);border-radius:50%;box-shadow:0 0 0 24px rgba(14,70,105,.025),0 0 0 48px rgba(14,70,105,.018)}
.jlc-contract-card:hover{transform:translateY(-2px);border-color:rgba(199,116,43,.35);box-shadow:0 20px 36px -26px rgba(54,34,18,.54),0 0 0 1px rgba(211,136,63,.04)}
.jlc-contract-card.is-selected{border-color:rgba(207,123,45,.7);box-shadow:0 0 0 1px rgba(207,123,45,.18),0 18px 36px -24px rgba(45,30,16,.62)}
.jlc-contract-card.is-selected::before{width:4px;opacity:1;box-shadow:0 0 12px rgba(207,123,45,.3)}
.jlc-card-top{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;margin-bottom:10px}
.jlc-card-doc{width:39px;height:39px;display:grid;place-items:center;border-radius:11px;color:#c56e25;background:#fbefe0;border:1px solid rgba(207,123,45,.16);box-shadow:inset 0 1px #fff}
.jlc-card-doc svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.55;stroke-linecap:round;stroke-linejoin:round}
.jlc-card-menu{width:28px;height:28px;border:0;background:transparent;color:#7a8794;font-size:19px;line-height:1;cursor:pointer}
.jlc-contract-card h3{position:relative;z-index:1;margin:0 0 5px;color:#102e4b;font:600 17px/1.2 Georgia,'Times New Roman',serif;letter-spacing:-.012em}
.jlc-contract-card .jlc-meta{position:relative;z-index:1;min-height:30px;color:#6c7886;font-size:11px;line-height:1.4}
.jlc-card-foot{position:relative;z-index:1;display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-top:12px;padding-top:11px;border-top:1px solid rgba(108,91,72,.1)}
.jlc-pill{display:inline-flex;align-items:center;min-height:25px;padding:0 9px;border-radius:999px;font-size:9px;font-weight:750;letter-spacing:.045em;text-transform:uppercase;border:1px solid rgba(91,107,122,.15);color:#35536c;background:#edf3f7}
.jlc-pill.review{color:#a44834;background:#fff0ec;border-color:#efb4a7}
.jlc-pill.signature{color:#94611f;background:#fff4df;border-color:#efd2a1}
.jlc-pill.signed{color:#307051;background:#edf8f1;border-color:#b9dec8}
.jlc-card-date{margin-left:auto;color:#82909d;font-size:10px}

/* Painel lateral */
.jlc-detail{
  position:sticky;top:12px;min-height:565px;border:1px solid rgba(121,91,57,.16);border-radius:19px;
  padding:18px 16px 16px;background:linear-gradient(150deg,rgba(255,252,247,.95),rgba(248,242,232,.92));
  box-shadow:0 24px 46px -33px rgba(43,29,17,.58),inset 0 1px #fff;backdrop-filter:blur(20px);overflow:hidden;
}
.jlc-detail::before{content:"";position:absolute;right:-55px;top:-52px;width:190px;height:190px;border-radius:50%;border:1px solid rgba(207,123,45,.07);box-shadow:0 0 0 28px rgba(207,123,45,.025),0 0 0 56px rgba(17,80,119,.018);pointer-events:none}
.jlc-detail-head{position:relative;display:flex;justify-content:space-between;gap:10px;align-items:flex-start;padding-bottom:13px;border-bottom:1px solid rgba(107,87,67,.12)}
.jlc-detail-head h3{margin:0;color:#102d49;font:600 19px/1.15 Georgia,'Times New Roman',serif}
.jlc-detail-head p{margin:6px 0 0;color:#778390;font-size:10px;line-height:1.35}
.jlc-detail-status{flex:0 0 auto;padding:6px 9px;border-radius:999px;color:#9c5b1e;background:#fff0dd;border:1px solid #edc995;font-size:9px;font-weight:750}
.jlc-tabs{display:grid;grid-template-columns:repeat(3,1fr);margin:11px 0 13px;border-bottom:1px solid rgba(108,88,66,.1)}
.jlc-tabs button{height:34px;border:0;background:transparent;color:#6f7e8c;font-size:10px;cursor:default}
.jlc-tabs button.on{color:#173a59;font-weight:750;border-bottom:2px solid #cf7b2d}
.jlc-detail-section{padding:2px 4px 12px}
.jlc-fact{display:flex;gap:10px;align-items:flex-start;padding:8px 0}
.jlc-fact .jlc-miniicon{width:27px;height:27px;border-radius:8px;display:grid;place-items:center;color:#c56e25;background:#fff4e6;flex:0 0 auto}
.jlc-miniicon svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.jlc-fact span{display:block;color:#7b8793;font-size:9px}
.jlc-fact b{display:block;margin-top:3px;color:#17334d;font-size:11px;font-weight:650}
.jlc-time{margin:5px 2px 15px;padding:13px 0;border-top:1px solid rgba(109,89,68,.1);border-bottom:1px solid rgba(109,89,68,.1)}
.jlc-time h4,.jlc-next h4{margin:0 0 9px;color:#17334c;font-size:11px}
.jlc-time p{position:relative;margin:0 0 0 6px;padding:0 0 12px 17px;color:#6d7b88;font-size:9px;border-left:1px solid rgba(207,123,45,.32)}
.jlc-time p:last-child{padding-bottom:0}
.jlc-time i{position:absolute;width:7px;height:7px;left:-4px;top:2px;border:1px solid #cf7b2d;border-radius:50%;background:#fff9f0}
.jlc-time b{display:block;color:#344e64;font-size:10px;margin-bottom:2px}
.jlc-next{margin-bottom:14px}
.jlc-next p{display:flex;align-items:center;gap:8px;margin:0;padding:8px 0;border-bottom:1px solid rgba(103,86,69,.08);color:#526778;font-size:10px}
.jlc-next p b{margin-left:auto;color:#c26c26}
.jlc-primary,.jlc-secondary{width:100%;height:43px;border-radius:11px;font-weight:750;font-size:11px;cursor:pointer}
.jlc-primary{border:1px solid #082f4f;color:#fff;background:linear-gradient(180deg,#124e76,#072c49);box-shadow:inset 0 1px rgba(255,255,255,.17),0 13px 22px -15px rgba(3,31,52,.7)}
.jlc-secondary{margin-top:8px;border:1px solid rgba(203,118,44,.45);color:#a15c21;background:rgba(255,251,245,.7)}
.jlc-empty{padding:50px 20px;text-align:center;border:1px dashed rgba(111,92,72,.2);border-radius:16px;color:#758391;background:rgba(255,255,255,.38)}

/* Topbar no padrão do mockup */
html:not(.dark) .app.on:not(.hubview):has(.sidebar[data-system="juris"]) .topbar{
  min-height:68px!important;padding:9px 20px 9px 24px!important;border-bottom:1px solid rgba(128,99,65,.13)!important;
  background:rgba(252,249,244,.94)!important;backdrop-filter:blur(20px)!important;box-shadow:0 8px 30px -28px rgba(34,24,15,.5)!important;
}
html:not(.dark) .app.on:not(.hubview):has(.sidebar[data-system="juris"]) .gsearch{max-width:520px!important}
html:not(.dark) .app.on:not(.hubview):has(.sidebar[data-system="juris"]) .gsearch input{height:45px!important;border:1px solid rgba(113,96,78,.16)!important;border-radius:13px!important;background:rgba(255,255,255,.72)!important;color:#173650!important;box-shadow:inset 0 1px #fff!important}

@media(max-width:1350px){.jlc-workspace{grid-template-columns:minmax(0,1fr) 295px}.jlc-contracts-grid{grid-template-columns:1fr}.jlc-kpis{grid-template-columns:repeat(2,1fr)}}
@media(max-width:1020px){.jlc-workspace{grid-template-columns:1fr}.jlc-detail{position:relative;top:auto;min-height:0}.jlc-contracts-grid{grid-template-columns:repeat(2,1fr)}html:not(.dark) #content.jlc-contracts-page>.toolbar{grid-template-columns:1fr 1fr!important}.jlc-kpis{grid-template-columns:repeat(2,1fr)}}
@media(max-width:700px){#content.jlc-contracts-page{padding:14px!important}.jlc-kpis,.jlc-contracts-grid{grid-template-columns:1fr}html:not(.dark) #content.jlc-contracts-page>.toolbar{grid-template-columns:1fr!important}html:not(.dark) #content.jlc-contracts-page>.pageheader{padding-left:18px}.jlc-detail{border-radius:15px}}
