:root{
  --bg:#f4f7fb;
  --card:#ffffff;
  --primary:#008a45;
  --primary-light:#0bbf6a;
  --text:#1f2d3d;
  --muted:#6b7c93;
  --shadow:0 10px 25px rgba(0,0,0,0.08);
  --radius:14px;
}

*{box-sizing:border-box}

body{
  margin:0;
  font-family:'Segoe UI',Tahoma,sans-serif;
  background:var(--bg);
  color:var(--text);
}

/* HEADER */
.header{
  position:relative;
  overflow:hidden;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px 22px;
  flex-wrap:wrap;
  padding:16px 24px;
  background:linear-gradient(90deg,var(--primary),var(--primary-light));
  color:#fff;
  box-shadow:0 12px 30px rgba(0,0,0,0.12);
}

.header::before,
.header::after{
  content:"";
  position:absolute;
  border-radius:50%;
  background:rgba(255,255,255,0.08);
  pointer-events:none;
}

.header::before{
  width:160px;
  height:160px;
  top:-82px;
  right:-40px;
}

.header::after{
  width:110px;
  height:110px;
  bottom:-55px;
  left:20%;
  background:rgba(255,255,255,0.06);
}

.header-left,
.header-right,
.nav{
  position:relative;
  z-index:1;
}

.logo{
  color:#fff;
  text-decoration:none;
  font-weight:600;
  display:flex;
  gap:12px;
  align-items:center;
}

.logo-mark{
  width:44px;
  height:44px;
  border-radius:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(255,255,255,0.14);
  border:1px solid rgba(255,255,255,0.24);
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.18);
  font-size:18px;
}

.logo-copy{
  display:flex;
  flex-direction:column;
  gap:2px;
  line-height:1.15;
}

.logo-title{
  font-size:16px;
  font-weight:700;
  letter-spacing:.2px;
}

.logo-subtitle{
  font-size:12px;
  color:rgba(255,255,255,0.82);
}

/* CONTENIDO */
.container{
  padding:30px;
}

/* GRID */
.grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
  gap:20px;
}

/* CARD CLICKEABLE */
.card{
  display:block;
  text-decoration:none;
  color:inherit;
  background:var(--card);
  padding:20px;
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  transition:.25s;
}

.card:hover{
  transform:translateY(-6px);
  box-shadow:0 18px 40px rgba(0,0,0,0.12);
}

.icon{
  font-size:26px;
  margin-bottom:10px;
}

.card h3{
  margin:0 0 8px;
  font-size:16px;
}

.card p{
  margin:0;
  font-size:13px;
  color:var(--muted);
}

/* FOOTER */
.footer{
  text-align:center;
  padding:20px;
  font-size:12px;
  color:var(--muted);
}

/* NAVBAR */
.nav{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.nav a{
  color:#ffffffee;
  text-decoration:none;
  font-size:14px;
  font-weight:600;
  padding:9px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,0.22);
  background:rgba(255,255,255,0.10);
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:40px;
  transition:transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.nav a:hover{
  background:rgba(255,255,255,0.18);
  color:#fff;
  border-color:rgba(255,255,255,0.38);
  transform:translateY(-1px);
  box-shadow:0 10px 20px rgba(0,0,0,0.10);
}

.nav a.active{
  background:#ffffff;
  color:var(--primary);
  font-weight:700;
  border-color:transparent;
}

.header-right{
  display:flex;
  align-items:center;
}

.user{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:8px 12px;
  border-radius:12px;
  background:rgba(255,255,255,0.12);
  border:1px solid rgba(255,255,255,0.18);
  color:#fff;
}

.user i{
  opacity:.95;
}

#logout-btn{
  margin-left:4px !important;
}

#logout-btn.btn-outline-danger{
  color:#fff;
  border-color:rgba(255,255,255,0.42);
  background:rgba(220,53,69,0.18);
}

#logout-btn.btn-outline-danger:hover{
  background:#fff;
  color:#dc3545;
  border-color:#fff;
}

@media (max-width: 860px){
  .header{
    padding:14px 16px;
  }

  .nav{
    width:100%;
  }

  .header-right{
    width:100%;
  }
}

@media (max-width: 640px){
  .nav a{
    width:100%;
    justify-content:flex-start;
  }

  .user{
    width:100%;
    justify-content:space-between;
    flex-wrap:wrap;
  }
}


/* MODAL VER LIQUIDACION */
.modal-overlay{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.45);
    display:flex;
    align-items:center;
    justify-content:center;
    z-index:999;
}

.modal-box{
    width:900px;
    max-width:95%;
    max-height:90vh;
    background:#fff;
    border-radius:16px;
    overflow:hidden;
    display:flex;
    flex-direction:column;
    box-shadow:0 20px 60px rgba(0,0,0,.2);
}

.modal-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:16px 18px;
    border-bottom:1px solid #edf2f7;
}

.modal-header h2{
    margin:0;
    font-size:20px;
}

.modal-subtitle{
    font-size:13px;
    color:#64748b;
}

.modal-close{
    background:none;
    border:none;
    font-size:18px;
    cursor:pointer;
}

.modal-body{
    padding:18px;
    overflow:auto;
}

/* KPI */
.modal-kpis{
    display:flex;
    gap:10px;
    margin-bottom:18px;
}

.kpi-box{
    flex:1;
    background:#f8fafc;
    border:1px solid #e2e8f0;
    border-radius:10px;
    padding:10px;
    font-size:13px;
}

.kpi-box strong{
    display:block;
    margin-top:4px;
    font-size:16px;
}

/* Sections */
.modal-section{
    margin-top:16px;
}

.modal-section h3{
    margin-bottom:8px;
    font-size:15px;
}