body{margin:0;font-family:Segoe UI,Arial;background:#eef2f7;color:#172033}header{background:#101828;color:#fff;padding:16px 24px;display:flex;justify-content:space-between}nav,main{max-width:1400px;margin:auto}nav{padding:12px 20px;display:flex;gap:8px}nav a,.btn{padding:9px 12px;border:1px solid #d0d5dd;border-radius:8px;background:#fff;text-decoration:none;color:#344054;font-weight:700}.primary{background:#175cd3;color:#fff}.card{background:#fff;border:1px solid #d0d5dd;border-radius:12px;padding:16px}.mt{margin-top:14px}.grid4{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.grid3{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.grid2{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}label{display:block;font-size:12px;font-weight:700;margin:8px 0 5px}input,select,textarea{width:100%;padding:9px;border:1px solid #d0d5dd;border-radius:8px;box-sizing:border-box}textarea{min-height:90px}table{width:100%;border-collapse:collapse}th,td{padding:9px;border-bottom:1px solid #eaecf0;text-align:left;font-size:12px}.alert{padding:10px;border-radius:8px}.ok{background:#ecfdf3}.kpi{font-size:32px;font-weight:800}@media(max-width:900px){.grid4,.grid3,.grid2{grid-template-columns:1fr 1fr}}@media(max-width:600px){.grid4,.grid3,.grid2{grid-template-columns:1fr}}

.calendar-head{display:flex;justify-content:space-between;align-items:center}.legend{display:flex;gap:12px;flex-wrap:wrap}.legend span{display:flex;align-items:center;gap:5px}.legend i{width:14px;height:14px;border-radius:50%;display:inline-block}.calendar{display:grid;grid-template-columns:repeat(7,1fr);gap:1px;background:#d0d5dd;border-radius:12px;overflow:hidden}.weekday{background:#101828;color:white;padding:9px;text-align:center}.day{background:white;min-height:150px;padding:8px}.day.empty{background:#f2f4f7}.event{display:block;border:1px solid #eaecf0;border-left:5px solid #175cd3;border-radius:7px;padding:6px;margin:6px 0;text-decoration:none;color:#172033}.event strong,.event small,.event em{display:block}.company{display:inline-block;color:white;padding:2px 5px;border-radius:4px;font-size:10px}.badge{padding:4px 8px;border-radius:999px;font-size:11px;font-weight:800}.badge.ok{background:#ecfdf3;color:#067647}.badge.warn{background:#fffaeb;color:#b54708}.badge.danger{background:#fef3f2;color:#b42318}

.event-actions{display:flex;gap:6px;align-items:center;margin-bottom:8px}
.event-actions form{margin:0;flex:1}
.event-actions select{font-size:10px;padding:5px}
.dangerbtn{background:#b42318!important;color:#fff!important;border-color:#b42318!important}

main{padding:0 14px 30px}.dashboard-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.alerts-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}.doc-alert{padding:10px;border-radius:8px}.dangerbox{background:#fef3f2;color:#b42318}.warnbox{background:#fffaeb;color:#b54708}.table-wrap,.calendar-scroll{overflow-x:auto}.color-dot{display:inline-block;width:12px;height:12px;border-radius:50%;margin-right:6px}.logout{color:white;text-decoration:none;font-weight:700}header div{display:flex;gap:12px;align-items:center}header span{font-size:12px;opacity:.75}
@media(max-width:700px){header{padding:12px;align-items:center}header div{display:block}nav{overflow-x:auto;white-space:nowrap;padding:8px}nav a{display:inline-block}main{padding:0 8px 20px}.dashboard-grid{grid-template-columns:1fr 1fr}.alerts-grid{grid-template-columns:1fr}.calendar{min-width:980px}.day{min-height:120px}.card{padding:12px}.kpi{font-size:26px}}

.brand-logo{width:40px;height:40px;object-fit:contain;vertical-align:middle;margin-right:8px}
.metrics-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:12px;margin-bottom:16px}
.metric-box{background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:16px;text-decoration:none;color:inherit;display:flex;flex-direction:column}
.metric-box b{font-size:28px}.metric-box small{color:#64748b}
.dashboard-main{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:16px}
.calendar-card,.side-card{background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:16px}
.calendar-head{display:flex;justify-content:space-between;align-items:center;gap:10px}.calendar-head button{padding:8px 12px;border:1px solid #d1d5db;border-radius:8px;background:#fff}
.weekdays,.calendar-grid{display:grid;grid-template-columns:repeat(7,1fr)}.weekdays span{text-align:center;font-weight:600;padding:8px}
.cal-day{min-height:112px;border:1px solid #e5e7eb;padding:5px}.outside{background:#f8fafc;color:#94a3b8}.day-num{text-align:right;font-size:12px}
.cal-event{display:block;border-radius:6px;padding:5px;margin-top:4px;font-size:11px;text-decoration:none;border:1px solid}
.ev-green{background:#ecfdf5;border-color:#86efac;color:#166534}.ev-orange{background:#fff7ed;border-color:#fdba74;color:#9a3412}.ev-red{background:#fef2f2;border-color:#fca5a5;color:#b91c1c}.ev-gray{background:#f1f5f9;border-color:#cbd5e1;color:#475569}
.right-col{display:flex;flex-direction:column;gap:16px}.side-card a{display:block;padding:9px 0;border-bottom:1px solid #eef2f7;text-decoration:none;color:inherit}.next-item{display:flex!important;flex-direction:column}.next-item small{color:#64748b}
.legend{display:flex;gap:14px;flex-wrap:wrap;margin-top:10px;font-size:12px}
@media(max-width:900px){.metrics-grid{grid-template-columns:repeat(2,1fr)}.dashboard-main{grid-template-columns:1fr}.calendar-card{overflow-x:auto}.weekdays,.calendar-grid{min-width:700px}}


/* ======================================================
   V8.6.2 - HOME NOVA E&P
   ====================================================== */
.ep-brand{display:flex;align-items:center;gap:9px}
.ep-brand img{width:42px;height:42px;object-fit:contain}
.ep-dashboard{display:flex;flex-direction:column;gap:16px}
.ep-notify-card,.ep-calendar-card,.ep-side-card,.ep-alerts{
  background:#fff;border:1px solid #e2e8f0;border-radius:14px;
}
.ep-notify-card{padding:18px}
.ep-section-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}
.ep-section-title h2,.ep-side-card h3{margin:0}
.ep-section-title a,.ep-more{text-decoration:none;color:#175cd3}
.ep-metrics{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:0}
.ep-metric{
  display:grid;grid-template-columns:38px 1fr;gap:10px;padding:10px 16px;
  text-decoration:none;color:#0f172a;border-right:1px solid #e5e7eb
}
.ep-metric:last-child{border-right:0}
.ep-metric strong{display:block;font-size:24px}
.ep-metric b,.ep-metric small{display:block}.ep-metric small{color:#64748b;margin-top:2px}
.ep-icon{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;font-weight:bold}
.ep-icon.danger{background:#fee2e2;color:#dc2626}.ep-icon.warning{background:#fef3c7;color:#d97706}
.ep-icon.info{background:#dbeafe;color:#2563eb}.ep-icon.success{background:#dcfce7;color:#16a34a}
.ep-main-grid{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:16px}
.ep-calendar-card{padding:16px}
.ep-calendar-toolbar{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:10px;margin-bottom:14px}
.ep-calendar-toolbar h2{margin:0;text-align:center;text-transform:none}
.ep-nav-buttons{display:flex;gap:8px}.ep-btn{border:1px solid #d7dee8;border-radius:8px;padding:8px 12px;text-decoration:none;color:#0f172a;background:#fff}
.ep-view-tabs{justify-self:end;display:flex;border:1px solid #d7dee8;border-radius:8px;overflow:hidden}
.ep-view-tabs span{padding:8px 12px;border-right:1px solid #d7dee8}.ep-view-tabs span:last-child{border-right:0}.ep-view-tabs .active{background:#0f2747;color:#fff}
.ep-week,.ep-calendar{display:grid;grid-template-columns:repeat(7,1fr)}
.ep-week div{text-align:center;padding:8px;font-weight:700;border-bottom:1px solid #dbe3ee}
.ep-day{min-height:122px;border-right:1px solid #dbe3ee;border-bottom:1px solid #dbe3ee;padding:6px}
.ep-day:nth-child(7n+1){border-left:1px solid #dbe3ee}.ep-day.empty{background:#f8fafc}
.ep-day-number{text-align:right;font-size:12px;font-weight:700;margin-bottom:5px}
.ep-event{display:block;text-decoration:none;border:1px solid;border-radius:7px;padding:6px;margin:4px 0;font-size:11px;line-height:1.25}
.ep-event strong,.ep-event span,.ep-event small{display:block}
.ep-event.ready{background:#ecfdf5;border-color:#86efac;color:#166534}
.ep-event.pending{background:#fff7ed;border-color:#fdba74;color:#9a3412}
.ep-event.today{background:#fef2f2;border-color:#fca5a5;color:#b91c1c}
.ep-event.done{background:#f1f5f9;border-color:#cbd5e1;color:#475569}
.ep-legend{display:flex;gap:14px;flex-wrap:wrap;margin-top:14px;font-size:12px;color:#475569}
.lg{display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:5px}.lg.ready{background:#22c55e}.lg.pending{background:#f59e0b}.lg.today{background:#ef4444}.lg.done{background:#94a3b8}
.ep-sidebar{display:flex;flex-direction:column;gap:16px}
.ep-side-card{padding:16px}
.ep-next{display:flex;flex-direction:column;text-decoration:none;color:#0f172a;padding:10px;border-radius:9px;background:#f8fafc;margin:8px 0;border:1px solid #e2e8f0}
.ep-next.today{background:#fef2f2;border-color:#fecaca}.ep-next span{color:#64748b;font-size:12px;margin-top:3px}
.ep-action{display:flex;flex-direction:column;padding:12px 0;border-bottom:1px solid #eef2f7;text-decoration:none;color:#0f172a}
.ep-action:last-child{border-bottom:0}.ep-action span,.ep-muted{color:#64748b;font-size:12px;margin-top:3px}
.ep-alerts{padding:12px;display:grid;grid-template-columns:1fr 1fr;gap:10px}
.ep-alert{padding:12px;border-radius:9px;display:flex;flex-direction:column}.ep-alert.danger{background:#fef2f2;color:#991b1b}.ep-alert.warning{background:#fffbeb;color:#92400e}

@media(max-width:980px){
 .ep-metrics{grid-template-columns:repeat(2,1fr)}.ep-metric{border-right:0;border-bottom:1px solid #e5e7eb}
 .ep-main-grid{grid-template-columns:1fr}.ep-sidebar{display:grid;grid-template-columns:1fr 1fr}
}
@media(max-width:650px){
 .ep-metrics{grid-template-columns:1fr 1fr}.ep-calendar-card{overflow-x:auto}
 .ep-week,.ep-calendar{min-width:760px}.ep-sidebar{grid-template-columns:1fr}
 .ep-calendar-toolbar{grid-template-columns:1fr}.ep-calendar-toolbar h2{text-align:left}.ep-view-tabs{justify-self:start}
 .ep-alerts{grid-template-columns:1fr}
}


/* ============================================================
   V8.6.3 — LAYOUT LATERAL APROVADO
   ============================================================ */
html,body{min-height:100%;margin:0}
body.ep-app{background:#f5f7fb;color:#0f172a}
.main-sidebar{
  position:fixed;left:0;top:0;bottom:0;width:160px;
  background:linear-gradient(180deg,#062947 0%,#04253f 100%);
  color:#fff;display:flex;flex-direction:column;z-index:1000;
  box-shadow:2px 0 9px rgba(15,23,42,.08)
}
.sidebar-brand{
  min-height:142px;display:flex;align-items:center;justify-content:center;
  padding:14px
}
.sidebar-brand img{
  width:108px;height:108px;object-fit:contain;
  filter:drop-shadow(0 4px 8px rgba(0,0,0,.18))
}
.sidebar-menu{display:flex;flex-direction:column;padding:4px 5px;gap:4px}
.sidebar-menu a{
  color:#fff;text-decoration:none;display:flex;align-items:center;gap:12px;
  padding:13px 15px;border-radius:0 8px 8px 0;font-weight:650;
  border-left:3px solid transparent;transition:.15s
}
.sidebar-menu a:hover{background:rgba(255,255,255,.07)}
.sidebar-menu a.active{
  background:#123d64;border-left-color:#f2b632;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.03)
}
.menu-icon{font-size:22px;width:24px;text-align:center}
.sidebar-footer{margin-top:auto;padding:16px 14px 20px;display:flex;flex-direction:column;gap:12px}
.sidebar-footer a{color:#fff;text-decoration:none;font-size:13px}
.sidebar-footer small{color:#d5dfeb;font-size:11px}

.app-content{
  min-height:100vh;margin-left:160px;display:flex;flex-direction:column
}
.top-header{
  min-height:86px;background:#fff;border-bottom:1px solid #e6ebf1;
  display:flex;align-items:center;justify-content:space-between;
  padding:0 28px;box-sizing:border-box
}
.top-header h1{font-size:24px;margin:0;color:#0b2442;letter-spacing:-.3px}
.top-header>div:first-child>span{font-size:13px;color:#64748b}
.top-user{display:flex;align-items:center;gap:12px}
.notification-bell{font-size:22px}
.user-avatar{
  width:38px;height:38px;border-radius:50%;display:grid;place-items:center;
  background:#092746;color:#fff;font-weight:700
}
.user-info{display:flex;flex-direction:column;line-height:1.15}
.user-info small{font-size:11px;color:#64748b}
.top-logout{
  margin-left:12px;text-decoration:none;color:#0f172a;font-weight:650;
  border-left:1px solid #e2e8f0;padding-left:15px
}
.page-content{padding:16px 20px 22px;flex:1;box-sizing:border-box;max-width:none}
.app-footer{
  display:flex;justify-content:space-between;gap:15px;
  padding:10px 24px;color:#64748b;font-size:11px;background:#fff;
  border-top:1px solid #e8edf3
}
.agenda-heading{font-size:16px;margin:0 0 14px 3px;color:#0f172a}

/* aproximações visuais do mockup */
.ep-notify-card,.ep-calendar-card,.ep-side-card{
  box-shadow:0 2px 10px rgba(15,23,42,.035)
}
.ep-main-grid{grid-template-columns:minmax(0,1fr) 295px}
.ep-calendar{background:#fff}
.ep-day{min-height:128px}
.ep-calendar-toolbar{padding:0 2px}

/* outras páginas continuam usando os cards antigos dentro do novo shell */
.page-content>.card,.page-content .card{box-shadow:0 2px 8px rgba(15,23,42,.025)}

@media(max-width:800px){
  .main-sidebar{width:72px}
  .sidebar-brand{min-height:92px;padding:8px}
  .sidebar-brand img{width:60px;height:60px}
  .sidebar-menu a{justify-content:center;padding:13px 8px;border-radius:0}
  .sidebar-menu a span:last-child{display:none}
  .menu-icon{font-size:22px}
  .sidebar-footer a{font-size:0;text-align:center}
  .sidebar-footer a span{font-size:16px}
  .sidebar-footer small{font-size:9px;text-align:center}
  .app-content{margin-left:72px}
  .top-header{padding:0 14px;min-height:72px}
  .top-header h1{font-size:18px}
  .user-info{display:none}.notification-bell{display:none}
}
@media(max-width:520px){
  .main-sidebar{width:58px}
  .app-content{margin-left:58px}
  .sidebar-brand img{width:49px;height:49px}
  .page-content{padding:10px}
  .top-logout{margin-left:2px;padding-left:8px;font-size:12px}
}


/* =============================================================
   V8.6.4 - CORREÇÃO DEFINITIVA DO MENU LATERAL
   ============================================================= */
body.ep-app aside.main-sidebar{
  width:168px!important;
  background:#062947!important;
  color:#fff!important;
  padding:0!important;
  overflow:hidden!important;
}
body.ep-app .main-sidebar .sidebar-brand{
  width:100%!important;min-height:132px!important;padding:14px!important;
  box-sizing:border-box!important;background:transparent!important;
}
body.ep-app .main-sidebar .sidebar-brand img{
  display:block!important;width:110px!important;height:110px!important;
  max-width:110px!important;object-fit:contain!important;margin:auto!important;
}
body.ep-app .main-sidebar nav.sidebar-menu{
  display:flex!important;flex-direction:column!important;
  width:100%!important;padding:0!important;margin:0!important;gap:2px!important;
  background:transparent!important;border:0!important;
}
body.ep-app .main-sidebar nav.sidebar-menu a{
  display:flex!important;align-items:center!important;justify-content:flex-start!important;
  width:100%!important;min-height:48px!important;box-sizing:border-box!important;
  padding:11px 13px!important;margin:0!important;gap:11px!important;
  background:transparent!important;color:#fff!important;border:0!important;
  border-left:4px solid transparent!important;border-radius:0!important;
  box-shadow:none!important;text-decoration:none!important;font-weight:650!important;
}
body.ep-app .main-sidebar nav.sidebar-menu a:hover{
  background:#0d3557!important;color:#fff!important;
}
body.ep-app .main-sidebar nav.sidebar-menu a.active{
  background:#123d64!important;color:#fff!important;
  border-left-color:#e7b334!important;
}
body.ep-app .main-sidebar nav.sidebar-menu a .menu-icon{
  display:inline-flex!important;width:25px!important;min-width:25px!important;
  justify-content:center!important;color:#fff!important;font-size:21px!important;
}
body.ep-app .main-sidebar nav.sidebar-menu a span:last-child{
  display:inline!important;color:#fff!important;white-space:nowrap!important;
}
body.ep-app .sidebar-footer{
  background:transparent!important;color:#fff!important;width:100%!important;
  box-sizing:border-box!important;
}
body.ep-app .app-content{margin-left:168px!important}

@media(max-width:800px){
 body.ep-app aside.main-sidebar{width:68px!important}
 body.ep-app .app-content{margin-left:68px!important}
 body.ep-app .main-sidebar .sidebar-brand{min-height:82px!important;padding:8px!important}
 body.ep-app .main-sidebar .sidebar-brand img{width:54px!important;height:54px!important}
 body.ep-app .main-sidebar nav.sidebar-menu a{
   justify-content:center!important;padding:11px 5px!important
 }
 body.ep-app .main-sidebar nav.sidebar-menu a span:last-child{display:none!important}
}


/* =============================================================
   V8.6.5 TESTE — AJUSTE VISUAL + CORES POR EMPRESA
   ============================================================= */
body.ep-app{font-size:14px!important;background:#f4f7fb!important}
body.ep-app aside.main-sidebar{width:184px!important}
body.ep-app .app-content{margin-left:184px!important}
body.ep-app .main-sidebar .sidebar-brand{min-height:150px!important}
body.ep-app .main-sidebar .sidebar-brand img{
 width:126px!important;height:126px!important;background:transparent!important
}
body.ep-app .main-sidebar nav.sidebar-menu a{
 min-height:54px!important;font-size:15px!important;padding:12px 16px!important
}
body.ep-app .menu-icon svg{
 width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.8;
 stroke-linecap:round;stroke-linejoin:round;display:block
}
body.ep-app .top-header{min-height:88px!important;padding:0 30px!important}
body.ep-app .top-header h1{font-size:25px!important}
body.ep-app .page-content{padding:20px 24px 26px!important}
body.ep-app .ep-notify-card{padding:20px!important}
body.ep-app .ep-main-grid{grid-template-columns:minmax(0,1fr) 315px!important;gap:18px!important}
body.ep-app .ep-calendar-card{padding:18px!important}
body.ep-app .ep-side-card{padding:18px!important}
body.ep-app .ep-day{min-height:138px!important}

/* Cor principal = empresa participante */
body.ep-app .ep-event.empresa-astro{
 background:#e8f2ff!important;border:1px solid #4a90e2!important;color:#103e72!important
}
body.ep-app .ep-event.empresa-dpmar{
 background:#fff0df!important;border:1px solid #ed8b2c!important;color:#7b3d00!important
}
body.ep-app .ep-event.empresa-orion{
 background:#e8eef7!important;border:1px solid #163b68!important;color:#092a50!important
}
body.ep-app .ep-event.empresa-discword{
 background:#f2e9ff!important;border:1px solid #8551c7!important;color:#4b237a!important
}
body.ep-app .ep-event.empresa-outra{
 background:#edf8ef!important;border:1px solid #55aa69!important;color:#245c31!important
}

/* Status é secundário: não troca a cor da empresa */
body.ep-app .ep-event.status-hoje{
 box-shadow:inset 4px 0 0 #d93025,0 0 0 1px rgba(217,48,37,.18)!important
}
body.ep-app .ep-event.status-pendente::after{
 content:"⚠";position:absolute;right:3px;top:2px;font-size:10px
}
body.ep-app .ep-event{position:relative!important}

/* Legenda por empresa */
.ep-company-legend{
 display:flex;align-items:center;flex-wrap:wrap;gap:18px;
 padding:13px 4px 1px;font-size:12px;color:#475569
}
.ep-company-legend span{display:inline-flex;align-items:center;gap:6px}
.legend-dot{width:10px;height:10px;border-radius:50%;display:inline-block}
.legend-dot.astro{background:#4a90e2}
.legend-dot.dpmar{background:#ed8b2c}
.legend-dot.orion{background:#163b68}
.legend-dot.discword{background:#8551c7}
.legend-note{margin-left:auto;color:#64748b}

/* Impede regras antigas de gerar blocos brancos no menu */
body.ep-app aside.main-sidebar *{box-sizing:border-box}
body.ep-app aside.main-sidebar .sidebar-menu,
body.ep-app aside.main-sidebar .sidebar-menu li,
body.ep-app aside.main-sidebar .sidebar-menu div{
 background:transparent!important;border:0!important;box-shadow:none!important
}

@media(max-width:800px){
 body.ep-app aside.main-sidebar{width:72px!important}
 body.ep-app .app-content{margin-left:72px!important}
 body.ep-app .main-sidebar .sidebar-brand{min-height:90px!important}
 body.ep-app .main-sidebar .sidebar-brand img{width:58px!important;height:58px!important}
 body.ep-app .ep-main-grid{grid-template-columns:1fr!important}
}


/* =============================================================
   V8.6.6 TESTE — CORREÇÃO DAS CORES NO CALENDÁRIO
   ============================================================= */
body.ep-app .ep-event.empresa-astro,
body.ep-app .ep-next.empresa-astro{
  background:#e7f1ff!important;
  border-color:#3f82d4!important;
  color:#123d72!important;
}
body.ep-app .ep-event.empresa-dpmar,
body.ep-app .ep-next.empresa-dpmar{
  background:#fff0df!important;
  border-color:#e9821c!important;
  color:#7b3b00!important;
}
body.ep-app .ep-event.empresa-orion,
body.ep-app .ep-next.empresa-orion{
  background:#e5edf7!important;
  border-color:#0e3159!important;
  color:#08284a!important;
}
body.ep-app .ep-event.empresa-discword,
body.ep-app .ep-next.empresa-discword{
  background:#f1e8ff!important;
  border-color:#7b45bd!important;
  color:#45216f!important;
}
body.ep-app .ep-event.empresa-outra,
body.ep-app .ep-next.empresa-outra{
  background:#eef8ef!important;
  border-color:#4ca660!important;
  color:#245c31!important;
}
body.ep-app .ep-next{
  border-width:1px!important;
  border-style:solid!important;
}
body.ep-app .ep-event.status-hoje,
body.ep-app .ep-next.status-hoje{
  box-shadow:inset 5px 0 0 #d93025,0 0 0 1px rgba(217,48,37,.15)!important;
}
body.ep-app .ep-event.status-pendente::after{
  content:"⚠";
  position:absolute;
  right:4px;
  top:3px;
  font-size:11px;
  color:#b45309;
}
body.ep-app .ep-event strong{
  font-size:11px!important;
  line-height:1.2!important;
}
body.ep-app .ep-event span{
  font-weight:700!important;
}
body.ep-app .ep-event small{
  opacity:.9!important;
}


/* =============================================================
   V8.6.7 TESTE — VÍNCULO EMPRESA × CERTAME
   ============================================================= */
body.ep-app .ep-event.empresa-astro,
body.ep-app .ep-next.empresa-astro{
  background:#dcecff!important;
  border-color:#2f78c8!important;
  color:#0d3f75!important;
}
body.ep-app .ep-event.empresa-dpmar,
body.ep-app .ep-next.empresa-dpmar{
  background:#ffe8cc!important;
  border-color:#e47b12!important;
  color:#7a3700!important;
}
body.ep-app .ep-event.empresa-orion,
body.ep-app .ep-next.empresa-orion{
  background:#dfe7f2!important;
  border-color:#0c315d!important;
  color:#07294f!important;
}
body.ep-app .ep-event.empresa-discword,
body.ep-app .ep-next.empresa-discword{
  background:#eee2ff!important;
  border-color:#7643b5!important;
  color:#44206d!important;
}
body.ep-app .ep-event.empresa-sem_empresa,
body.ep-app .ep-next.empresa-sem_empresa,
body.ep-app .ep-event.empresa-sem-empresa,
body.ep-app .ep-next.empresa-sem-empresa{
  background:#f1f5f9!important;
  border-color:#94a3b8!important;
  color:#475569!important;
}
body.ep-app .ep-event strong,
body.ep-app .ep-next strong{
  font-weight:800!important;
}


/* V8.6.8 TESTE MANUAL */
.legend-dot.semempresa{background:#94a3b8}
body.ep-app .ep-event.empresa-sem_empresa,
body.ep-app .ep-next.empresa-sem_empresa{
  background:#f1f5f9!important;
  border-color:#94a3b8!important;
  color:#475569!important;
}
body.ep-app .ep-event strong:first-child{
  text-transform:uppercase;
}

.info-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.info-grid div{padding:10px;border:1px solid #e5e7eb;border-radius:10px}
.info-grid small,.info-grid strong{display:block}
@media(max-width:700px){.info-grid{grid-template-columns:1fr}}

.certame-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}
.head-actions{display:flex;gap:8px;flex-wrap:wrap}
.section-title{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:12px}
.section-title h2{margin:0}
.status-pill{padding:6px 10px;border-radius:999px;background:#eef4ff;color:#173e70;font-size:12px;font-weight:700}
.certame-info{grid-template-columns:repeat(4,minmax(0,1fr))}
.object-box{margin-top:14px;padding:14px;border:1px solid #e5e7eb;background:#f8fafc;border-radius:10px}
.analysis-summary{display:flex;gap:10px;flex-wrap:wrap}
.mini-kpi{min-width:105px;padding:12px;border:1px solid #e5e7eb;border-radius:10px}
.mini-kpi b{display:block;font-size:22px}.mini-kpi span{font-size:11px;color:#64748b}
.row-note{display:block;color:#64748b;margin-top:3px}
.doc-list{display:flex;flex-direction:column;gap:7px}
.doc-line{display:flex;justify-content:space-between;gap:12px;padding:9px 10px;border:1px solid #e7ebf1;border-radius:8px}
.doc-line span{color:#64748b;font-size:12px;text-align:right}
.form-grid-3,.grid-3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.history-search{display:flex;align-items:end;gap:12px}.history-search .grow{flex:1}
.ata-card{display:flex;justify-content:space-between;gap:16px;align-items:center;padding:14px;border:1px solid #dfe5ee;border-radius:12px;margin:10px 0}
.ata-card h3{margin:3px 0}.ata-card p{margin:4px 0}.ata-card span,.ata-card small{color:#64748b}
.history-warning{padding:12px;margin-top:12px;background:#fff7e6;border:1px solid #ffd38a;border-radius:10px;color:#7a4b00}
.ata-modal{position:fixed;inset:0;background:rgba(15,23,42,.48);z-index:2000;padding:4vh 4vw;overflow:auto}
.ata-modal-card{max-width:980px;margin:auto;background:white;border-radius:16px;padding:20px}
.detail-kpis div{text-align:center;padding:14px;border:1px solid #e5e7eb;border-radius:10px}
.detail-kpis b{display:block;font-size:26px}.detail-kpis span{font-size:12px;color:#64748b}
@media(max-width:1050px){.certame-info{grid-template-columns:repeat(2,1fr)}}
@media(max-width:720px){.certame-head{flex-direction:column}.certame-info,.form-grid-3,.grid-3{grid-template-columns:1fr}.history-search{flex-direction:column;align-items:stretch}.ata-card{flex-direction:column;align-items:stretch}}

.pncp-certame{display:grid;grid-template-columns:1fr auto;gap:10px;align-items:center;padding:12px;margin-top:8px;border:1px solid #e0e6ef;border-radius:10px;background:#fff}
.pncp-certame span,.pncp-certame small{display:block;color:#64748b;margin-top:3px}
.pncp-candidatos{grid-column:1/-1}
.pncp-candidato{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:10px;margin-top:8px;border:1px solid #bfd3ef;border-radius:9px;background:#f7fbff}
.pncp-candidato code{display:block;margin-top:5px;font-size:11px}
.pncp-ok{padding:10px;border:1px solid #86d5a3;background:#effcf4;border-radius:8px;color:#176b38}
.error-text{color:#b42318}
@media(max-width:720px){.pncp-certame{grid-template-columns:1fr}.pncp-candidato{flex-direction:column;align-items:stretch}}

.history-tabs{display:flex;gap:6px;margin:14px 0}
.tab-btn{border:1px solid #d7dee8;background:#fff;padding:10px 16px;border-radius:9px;font-weight:700;cursor:pointer}
.tab-btn.active{background:#0d3158;color:#fff;border-color:#0d3158}
.history-tab[hidden]{display:none!important}

.history-source-note{padding:10px 12px;margin:10px 0;background:#eef7ff;border:1px solid #bdd9f4;border-radius:9px;color:#244b70}
.history-value{display:block;margin-top:8px;color:#0b5b35}

.pncp-actions{display:flex;gap:8px;margin:10px 0 14px}
.pncp-loading{padding:14px;border:1px solid #d9e3ef;background:#f8fbff;border-radius:9px;color:#42566e}
.pncp-result-card{padding:14px;border:1px solid #dbe4ef;border-radius:11px;margin:10px 0;background:#fff}
.pncp-result-card h3{margin:4px 0}
.pncp-result-card p{margin:5px 0}
.pncp-result-card span{display:block;color:#64748b;margin-top:5px}
.confirmed-badge{display:inline-block;color:#176b38;background:#effcf4;border:1px solid #9bd7ae;padding:4px 7px;border-radius:999px}
.pncp-empty{padding:14px;border:1px dashed #cbd5e1;border-radius:10px;background:#fafcff;margin-top:10px}
.pncp-friendly-warning{padding:12px;margin-top:12px;background:#fff7e6;border:1px solid #f2c46d;border-radius:10px;color:#704a0b}

.pncp-meta{display:flex;flex-direction:column;gap:4px;margin-top:9px;padding-top:8px;border-top:1px solid #edf1f5}
.pncp-meta span{font-size:12px;color:#526477}
.ata-link-info{color:#7a4b00!important;background:#fff7e6;padding:5px 7px;border-radius:6px}
.status-financeiro{display:inline-block;padding:4px 8px;border-radius:999px;background:#eef4ff;color:#173e70;font-size:11px;font-weight:700}

.empresa-history-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:12px}
.empresa-history-card{display:grid;grid-template-columns:10px 1fr auto;align-items:center;gap:12px;padding:16px;background:#fff;border:1px solid #dfe6ef;border-radius:12px;text-decoration:none;color:inherit}
.empresa-history-card:hover{box-shadow:0 6px 18px rgba(15,23,42,.08)}
.empresa-dot{width:10px;height:42px;border-radius:999px}
.history-tabs.wrap{flex-wrap:wrap}
.search-source-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:12px}
.source-card{border:1px solid #dfe6ef;border-radius:11px;padding:14px;background:#fafcff}
.source-card input{width:100%;margin:5px 0}
.search-result-card{display:grid;grid-template-columns:auto 1fr;gap:10px;align-items:flex-start;padding:12px;margin-top:8px;border:1px solid #dfe6ef;border-radius:10px;background:#fff}
.search-result-card small,.search-result-card span{display:block;color:#64748b;margin-top:4px}
.search-results-toolbar{display:flex;justify-content:flex-end;margin:12px 0}
.grid-5{display:grid;grid-template-columns:repeat(5,1fr);gap:10px}
@media(max-width:900px){.grid-5{grid-template-columns:repeat(2,1fr)}}

/* ============================================================
   V10.1.3 - CORRECAO RESPONSIVA FINAL DO LAYOUT
   ============================================================ */

/* Impede que o conteudo ultrapasse a area disponivel */
body.ep-app .app-content{
    width:auto !important;
    max-width:none !important;
    min-width:0 !important;
    box-sizing:border-box !important;
}

body.ep-app .page-content{
    width:100% !important;
    max-width:none !important;
    min-width:0 !important;
    box-sizing:border-box !important;
}

/* Dashboard inteiro pode encolher corretamente */
body.ep-app .ep-dashboard{
    width:100% !important;
    max-width:none !important;
    min-width:0 !important;
    box-sizing:border-box !important;
}

/* Calendario + coluna lateral */
body.ep-app .ep-main-grid{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) minmax(250px,315px) !important;
    gap:18px !important;
    width:100% !important;
    min-width:0 !important;
    align-items:start !important;
}

/* Fundamental para o calendario nao empurrar a pagina */
body.ep-app .ep-calendar-card{
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
    box-sizing:border-box !important;
    overflow:hidden !important;
}

body.ep-app .ep-sidebar{
    width:100% !important;
    min-width:0 !important;
    max-width:315px !important;
    box-sizing:border-box !important;
}

/* Calendario ocupa exatamente a largura disponivel */
body.ep-app .ep-week,
body.ep-app .ep-calendar{
    width:100% !important;
    min-width:0 !important;
    grid-template-columns:repeat(7,minmax(0,1fr)) !important;
}

/* Cada dia pode realmente diminuir */
body.ep-app .ep-day{
    min-width:0 !important;
    overflow:hidden !important;
}

/* Eventos nao podem aumentar a largura da coluna */
body.ep-app .ep-event{
    min-width:0 !important;
    max-width:100% !important;
    box-sizing:border-box !important;
    overflow:hidden !important;
    overflow-wrap:anywhere !important;
    word-break:break-word !important;
}

/* Textos longos */
body.ep-app .ep-event strong,
body.ep-app .ep-event span,
body.ep-app .ep-event small{
    max-width:100% !important;
    overflow-wrap:anywhere !important;
}

/* Barra superior do calendario */
body.ep-app .ep-calendar-toolbar{
    min-width:0 !important;
}

/* ============================================================
   NOTEBOOK / JANELA MENOR
   ============================================================ */

@media(max-width:1200px){

    body.ep-app .ep-main-grid{
        grid-template-columns:minmax(0,1fr) 260px !important;
        gap:12px !important;
    }

    body.ep-app .ep-sidebar{
        max-width:260px !important;
    }

    body.ep-app .page-content{
        padding:16px !important;
    }

    body.ep-app .ep-calendar-card,
    body.ep-app .ep-side-card{
        padding:14px !important;
    }

    body.ep-app .ep-day{
        min-height:120px !important;
        padding:4px !important;
    }

    body.ep-app .ep-event{
        padding:4px !important;
        font-size:10px !important;
    }
}

/* ============================================================
   TABLET / TELA ESTREITA
   Coluna direita desce automaticamente
   ============================================================ */

@media(max-width:1000px){

    body.ep-app .ep-main-grid{
        grid-template-columns:1fr !important;
    }

    body.ep-app .ep-sidebar{
        max-width:none !important;
        width:100% !important;
        display:grid !important;
        grid-template-columns:repeat(2,minmax(0,1fr)) !important;
        gap:12px !important;
    }

    body.ep-app .ep-calendar-card{
        overflow-x:auto !important;
    }
}

/* ============================================================
   CELULAR
   ============================================================ */

@media(max-width:700px){

    body.ep-app .ep-sidebar{
        grid-template-columns:1fr !important;
    }

    body.ep-app .ep-calendar-card{
        overflow-x:auto !important;
    }

    body.ep-app .ep-week,
    body.ep-app .ep-calendar{
        min-width:700px !important;
    }

    body.ep-app .ep-calendar-toolbar{
        grid-template-columns:1fr !important;
        gap:8px !important;
    }

    body.ep-app .ep-calendar-toolbar h2{
        text-align:left !important;
    }

    body.ep-app .ep-view-tabs{
        justify-self:start !important;
    }
}


/* ============================================================
   V10.1.3 - CALIBRACAO FINAL RESPONSIVA DA HOME
   ============================================================ */

/* Tela intermediaria */
@media (max-width:1100px){

  body.ep-app .ep-main-grid{
    grid-template-columns:minmax(0,1fr) 230px !important;
    gap:12px !important;
  }

  body.ep-app .ep-sidebar{
    max-width:230px !important;
  }
}

/* Janela pequena: lateral passa para baixo */
@media (max-width:900px){

  body.ep-app .ep-main-grid{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) !important;
    gap:14px !important;
  }

  body.ep-app .ep-sidebar{
    width:100% !important;
    max-width:none !important;

    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:12px !important;
  }

  body.ep-app .ep-calendar-card{
    width:100% !important;
    max-width:100% !important;
  }
}

/* Tela ainda menor */
@media (max-width:650px){

  body.ep-app .ep-sidebar{
    grid-template-columns:1fr !important;
  }

  body.ep-app .ep-calendar-card{
    overflow-x:auto !important;
  }

  body.ep-app .ep-week,
  body.ep-app .ep-calendar{
    min-width:700px !important;
  }
}


/* ============================================================
   V10.1.3 - AJUSTE BREAKPOINT HOME
   Em telas menores, prioriza largura do calendario
   ============================================================ */

@media (max-width:1150px){

  body.ep-app .ep-main-grid{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) !important;
    gap:14px !important;
  }

  body.ep-app .ep-sidebar{
    width:100% !important;
    max-width:none !important;
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:12px !important;
  }

  body.ep-app .ep-calendar-card{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
  }
}

/* Celular */
@media (max-width:650px){

  body.ep-app .ep-sidebar{
    grid-template-columns:1fr !important;
  }

}


/* ============================================================
   V10.1.3 - HOME RESPONSIVA DEFINITIVA
   Calendario prioritario + lateral adaptativa
   ============================================================ */

/* Estrutura principal */
body.ep-app .ep-main-grid{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) 300px !important;
    gap:16px !important;
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    box-sizing:border-box !important;
    align-items:start !important;
}

/* Calendario */
body.ep-app .ep-calendar-card{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    box-sizing:border-box !important;
    overflow:hidden !important;
}

/* Coluna direita */
body.ep-app .ep-sidebar{
    width:300px !important;
    max-width:300px !important;
    min-width:0 !important;
    box-sizing:border-box !important;
    display:flex !important;
    flex-direction:column !important;
    gap:16px !important;
}

/* Grade do calendario */
body.ep-app .ep-week,
body.ep-app .ep-calendar{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    grid-template-columns:repeat(7,minmax(0,1fr)) !important;
}

/* Permite que cada dia diminua sem estourar */
body.ep-app .ep-day{
    min-width:0 !important;
    overflow:hidden !important;
}

/* Textos dos eventos não podem aumentar a coluna */
body.ep-app .ep-event,
body.ep-app .ep-event strong,
body.ep-app .ep-event span,
body.ep-app .ep-event small{
    min-width:0 !important;
    max-width:100% !important;
    overflow-wrap:anywhere !important;
    word-break:break-word !important;
    box-sizing:border-box !important;
}


/* ============================================================
   JANELA INTERMEDIARIA
   Mantemos a lateral enquanto houver espaço real
   ============================================================ */

@media (max-width:1200px) and (min-width:1001px){

    body.ep-app .ep-main-grid{
        grid-template-columns:minmax(0,1fr) 245px !important;
        gap:12px !important;
    }

    body.ep-app .ep-sidebar{
        width:245px !important;
        max-width:245px !important;
    }

    body.ep-app .ep-calendar-card{
        padding:12px !important;
    }

    body.ep-app .ep-day{
        padding:4px !important;
    }

    body.ep-app .ep-event{
        padding:4px !important;
        font-size:10px !important;
    }
}


/* ============================================================
   JANELA PEQUENA
   Calendario passa a usar toda a largura.
   Blocos laterais descem.
   ============================================================ */

@media (max-width:1000px){

    body.ep-app .ep-main-grid{
        grid-template-columns:minmax(0,1fr) !important;
        gap:14px !important;
    }

    body.ep-app .ep-sidebar{
        width:100% !important;
        max-width:100% !important;
        display:grid !important;
        grid-template-columns:repeat(2,minmax(0,1fr)) !important;
        gap:12px !important;
    }

    body.ep-app .ep-calendar-card{
        width:100% !important;
        max-width:100% !important;
    }
}


/* ============================================================
   CELULAR
   ============================================================ */

@media (max-width:650px){

    body.ep-app .ep-sidebar{
        grid-template-columns:1fr !important;
    }

    body.ep-app .ep-calendar-card{
        overflow-x:auto !important;
    }

    body.ep-app .ep-week,
    body.ep-app .ep-calendar{
        min-width:700px !important;
    }
}


/* ============================================================
   V10.1.3 - BREAKPOINT FINAL HOME
   Em largura intermediaria, lateral desce para liberar calendario
   ============================================================ */

@media (max-width:1350px){

  body.ep-app .ep-main-grid{
    grid-template-columns:minmax(0,1fr) !important;
    gap:16px !important;
  }

  body.ep-app .ep-sidebar{
    width:100% !important;
    max-width:100% !important;
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:16px !important;
  }

  body.ep-app .ep-calendar-card{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
  }
}

@media (max-width:700px){

  body.ep-app .ep-sidebar{
    grid-template-columns:1fr !important;
  }

}


/* ============================================================
   CENTRAL DE SESSOES - FASES DO CERTAME
   ============================================================ */

.ss-fases{
  display:grid;
  grid-template-columns:repeat(3,minmax(150px,1fr));
  gap:8px;
  margin-top:12px;
  padding-top:10px;
  border-top:1px solid #e2e8f0;
}

.ss-fase{
  min-width:0;
}

.ss-fase label{
  display:block;
  margin-bottom:4px;
  font-size:9px;
  font-weight:900;
  color:#64748b;
  letter-spacing:.3px;
}

.ss-fase form{
  margin:0;
}

.ss-select-fase{
  width:100%;
  min-width:0;
  height:32px;
  padding:4px 7px;
  border:1px solid #cbd5e1;
  border-radius:7px;
  background:#f8fafc;
  color:#0f172a;
  font-size:10px;
  font-weight:700;
  cursor:pointer;
  box-sizing:border-box;
}

.ss-select-fase:focus{
  outline:none;
  border-color:#2563eb;
  box-shadow:0 0 0 2px rgba(37,99,235,.10);
}

@media(max-width:850px){
  .ss-fases{
    grid-template-columns:1fr;
  }
}


/* CENTRAL DE SESSOES - FILTROS DAS FASES */

.ss-filtros{
  grid-template-columns:2fr 1fr 1fr 1fr 1fr 1fr !important;
}

@media(max-width:1200px){
  .ss-filtros{
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  }

  #ss_busca{
    grid-column:span 2;
  }
}

@media(max-width:750px){
  .ss-filtros{
    grid-template-columns:1fr !important;
  }

  #ss_busca{
    grid-column:auto;
  }
}


/* ============================================================
   CENTRAL DE SESSOES - AJUSTE VISUAL DOS FILTROS
   ============================================================ */

.ss-filtros{
  display:grid !important;
  grid-template-columns:
    minmax(220px,2fr)
    minmax(150px,1fr)
    minmax(150px,1fr)
    minmax(170px,1fr)
    minmax(190px,1.2fr)
    minmax(165px,1fr) !important;

  gap:8px !important;
  align-items:center !important;
}

.ss-filtros input,
.ss-filtros select{
  width:100% !important;
  min-width:0 !important;
  box-sizing:border-box !important;
  font-size:11px !important;
}

@media(max-width:1250px){

  .ss-filtros{
    grid-template-columns:
      minmax(220px,2fr)
      repeat(2,minmax(170px,1fr)) !important;
  }

  #ss_busca{
    grid-column:span 1 !important;
  }
}

@media(max-width:850px){

  .ss-filtros{
    grid-template-columns:1fr 1fr !important;
  }

  #ss_busca{
    grid-column:1 / -1 !important;
  }
}

@media(max-width:600px){

  .ss-filtros{
    grid-template-columns:1fr !important;
  }

  #ss_busca{
    grid-column:auto !important;
  }
}

