/*
=====================================================
EVIDA
Modulo Planeacion
=====================================================
*/

.planeacion-page{
    width:100%;
}

/*==========================
TOPBAR
==========================*/

.planeacion-topbar{
    align-items:center;
    min-height:86px;
}

.planeacion-topbar p{
    margin:6px 0 0;
    color:var(--muted, #9badc8);
    font-size:13px;
}

.planeacion-actions{
    display:flex;
    gap:10px;
    align-items:center;
    flex-wrap:wrap;
}

.planeacion-role{
    border:1px solid var(--line, #36506e);
    border-radius:22px;
    background:var(--inputA, #152438);
    color:var(--accent, #b9d7ff);
    padding:10px 16px;
    font-size:12px;
    font-weight:700;
}

/*==========================
KPIs
==========================*/

.planeacion-kpis{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:16px;
    margin-bottom:20px;
}

.planeacion-kpi{
    background:var(--cardA, #111d30);
    border:1px solid var(--line, #2b3b58);
    border-radius:16px;
    padding:18px;
}

.planeacion-kpi span{
    display:block;
    color:var(--muted, #9badc8);
    font-size:12px;
}

.planeacion-kpi strong{
    display:block;
    margin-top:8px;
    font-size:28px;
    color:var(--text, #ffffff);
}

.planeacion-kpi small{
    color:var(--accent, #8fb4ff);
}

/*==========================
CARD
==========================*/

.planeacion-card{
    overflow:hidden;
}

.planeacion-card-head{

    padding:18px;

    border-bottom:1px solid var(--line, #263850);

    display:flex;

    justify-content:space-between;

    align-items:center;

    gap:16px;

    flex-wrap:wrap;

}

.planeacion-filters{

    display:flex;

    gap:10px;

    align-items:center;

    flex-wrap:wrap;

}

.planeacion-field{

    min-width:170px;

    padding:11px 14px;

    background:var(--inputA, #0f1a2c);

    color:var(--text, #ffffff);

    border-radius:10px;

    border:1px solid var(--line, #32435d);

}

.planeacion-field:focus{

    outline:none;

    border-color:var(--accent, #5fa7ff);

}

/*==========================
LEYENDA
==========================*/

.planeacion-legend{

    display:flex;

    gap:15px;

    flex-wrap:wrap;

    color:var(--muted, #9badc8);

    font-size:12px;

}

.planeacion-legend i{

    width:10px;

    height:10px;

    display:inline-block;

    border-radius:50%;

    margin-right:5px;

}

/*==========================
TIMELINE
==========================*/

.planeacion-planner{

    padding:16px;

}

.planeacion-timeline{

    overflow:auto;

    border-radius:14px;

    border:1px solid var(--line, #2a3b56);

    background:var(--panelA, #101a2b);

}

.planeacion-grid{

    display:grid;

    min-width:1300px;

}

.planeacion-grid .cell{

    min-height:42px;

    padding:8px;

    border-right:1px solid var(--line, rgba(255,255,255,.06));

    border-bottom:1px solid var(--line, rgba(255,255,255,.06));

}

.planeacion-grid .header{

    position:sticky;

    top:0;

    z-index:5;

    background:var(--card2, #182437);

    color:var(--text, #d6e4f9);

    text-align:center;

    font-weight:700;

}

.planeacion-grid .left{

    position:sticky;

    left:0;

    z-index:4;

    background:var(--card, #162235);

}

.planeacion-grid .header.left{

    z-index:10;

}

.project{

    background:#ebf2fc !important;

    color:#081321;

    font-weight:bold;

    text-transform:uppercase;

}

.rolecell{

    color:var(--text, #ffffff);

}

.rolecell small{

    color:var(--muted, #8fa4c3);

}

.weekend{

    background:rgba(246,198,77,.20);

}

.blank{

    background:transparent;

}

.empty-state{

    color:var(--muted, #9badc8);

    display:flex;

    align-items:center;

}

/*==========================
BARRAS GANTT
==========================*/

.barwrap{

    align-self:center;

    padding:7px;

}

.bar{

    height:26px;

    border-radius:7px;

    padding:5px 10px;

    font-size:12px;

    font-weight:700;

    overflow:hidden;

    white-space:nowrap;

    text-overflow:ellipsis;

    cursor:pointer;

    transition:.2s;

}

.bar:hover{

    transform:scale(1.03);

}

.b-blue{

    background:#9db5dd;

    color:#081321;

}

.b-green{

    background:#9ed28f;

    color:#102b14;

}

.b-red{

    background:#ff9393;

    color:#3f0707;

}

.b-gray{

    background:#a2a2a2;

    color:#111;

}

.b-cyan{

    background:#89d9ee;

    color:#04232d;

}

/*==========================
PANELES
==========================*/

.planeacion-sidepanels{

    display:grid;

    grid-template-columns:1.3fr .7fr;

    gap:16px;

    margin-top:18px;

}

.planeacion-list{

    padding:16px;

}

.planeacion-list h3{

    margin-top:0;

}

.planeacion-row{

    display:grid;

    grid-template-columns:1fr auto;

    gap:10px;

    padding:12px 0;

    border-bottom:1px solid var(--line, #263850);

}

.planeacion-row:last-child{

    border-bottom:none;

}

.planeacion-row small{

    display:block;

    color:var(--muted, #9badc8);

}

.planeacion-progress{

    margin-top:8px;

    height:10px;

    border-radius:999px;

    overflow:hidden;

    background:var(--inputA, #081220);

}

.planeacion-progress i{

    display:block;

    height:100%;

    background:linear-gradient(90deg,#4b8cff,#31c981);

}

.planeacion-badge{

    display:inline-flex;

    align-items:center;

    justify-content:center;

    min-width:58px;

    padding:6px 12px;

    border-radius:16px;

    font-weight:700;

}

.planeacion-badge.ok{

    background:#0d3a2a;

    color:#63f4a9;

}

.planeacion-badge.warn{

    background:#45340c;

    color:#ffd96f;

}

.planeacion-badge.bad{

    background:#45181f;

    color:#ffacb5;

}

.planeacion-empty{

    color:var(--muted, #8fa4c3);

}

.planeacion-foot{

    margin-top:28px;

    color:var(--muted, #7d95b8);

    font-size:12px;

}

/*==========================
RESPONSIVE
==========================*/

@media(max-width:1100px){

.planeacion-kpis{

grid-template-columns:repeat(2,1fr);

}

}

@media(max-width:900px){

.planeacion-topbar{

flex-direction:column;

align-items:flex-start;

}

.planeacion-sidepanels{

grid-template-columns:1fr;

}

}

@media(max-width:700px){

.planeacion-kpis{

grid-template-columns:1fr;

}

}

/*==========================
TEMA CLARO
==========================*/

html[data-theme="light"] .planeacion-role,
html[data-theme="light"] .planeacion-kpi,
html[data-theme="light"] .planeacion-field,
html[data-theme="light"] .planeacion-timeline,
html[data-theme="light"] .planeacion-grid .header,
html[data-theme="light"] .planeacion-grid .left,
html[data-theme="light"] .planeacion-progress{
    color:var(--text);
}

html[data-theme="light"] .planeacion-grid .header{
    background:var(--card2);
}

html[data-theme="light"] .planeacion-grid .left{
    background:var(--card);
}

html[data-theme="light"] .planeacion-timeline{
    background:var(--panelA);
}

html[data-theme="light"] .planeacion-field{
    background:var(--inputA);
}

html[data-theme="light"] .planeacion-kpi{
    background:var(--cardA);
}

/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *



 */

/* =========================================================
   EVIDA - Seguridad global del Tema Claro/Obscuro
   Este bloque funciona como fallback para vistas que utilicen
   application.html.erb en lugar del layout home.
   ========================================================= */
html[data-theme="dark"] {
  color-scheme: dark;
  background-color: #0b1220;
}

html[data-theme="light"] {
  color-scheme: light;
  background-color: #f6f8ff;
}

html[data-theme="dark"] body {
  background-color: #0b1220;
}

html[data-theme="light"] body {
  background-color: #f6f8ff;
}

html, body {
  min-height: 100%;
}

