:root{
  --bg:#f3f6fb;
  --card:#ffffff;
  --line:#e6edf7;
  --text:#0f172a;
  --muted:#64748b;
  --blue:#2563eb;
  --blue2:#1d4ed8;
  --soft:#eef4ff;
  --shadow: 0 10px 30px rgba(15, 23, 42, .06);
  --radius: 18px;
}

*{ box-sizing:border-box; font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; }
body{ margin:0; background:var(--bg); color:var(--text); }

.topbar{
  position: sticky; top:0; z-index:10;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  padding: 14px 18px;
  display:flex; align-items:center; justify-content:space-between; gap:16px;
}

.brand{ display:flex; align-items:center; gap:14px; min-width: 240px; }
.brand img{ width:44px; height:44px; object-fit:contain; }
.brand h1{ font-size: 22px; margin:0; }
.brand p{ margin:2px 0 0; color:var(--muted); }

.top-actions{ display:flex; gap:10px; align-items:center; }
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding: 10px 14px;
  border-radius: 999px;
  border:1px solid var(--line);
  background:#fff;
  color:var(--text);
  text-decoration:none;
  font-weight:700;
  box-shadow: none;
}
.btn.primary{
  background: var(--blue);
  border-color: var(--blue);
  color:#fff;
}
.btn.primary:hover{ background: var(--blue2); }

.wrap{ max-width: 1100px; margin: 18px auto 40px; padding: 0 14px; }

.section{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin: 14px 0;
}

.section-head{
  display:flex; align-items:baseline; justify-content:space-between;
  gap:10px; padding: 2px 6px 14px;
  border-bottom: 1px dashed var(--line);
}
.section-head h2{ margin:0; font-size: 18px; }
.hint{ color:var(--muted); font-size: 13px; }

.grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 14px 4px 4px;
}

/* Tiles */
.tile{
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  text-decoration:none;
  color: var(--text);
  min-height: 92px;
  display:flex;
  flex-direction: column;
  justify-content:center;
  transition: transform .08s ease, border-color .08s ease, background .08s ease;
}
.tile:hover{
  transform: translateY(-1px);
  border-color: #cfe0ff;
  background: var(--soft);
}

.t-title{
  font-size: 18px;
  font-weight: 800;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.t-sub{ color: var(--muted); margin-top: 4px; font-size: 13px; }

.pill{
  font-size: 12px;
  font-weight: 900;
  padding: 4px 9px;
  border-radius: 999px;
  background: #e8f0ff;
  color: #1d4ed8;
  border: 1px solid #cfe0ff;
  min-width: 28px;
  text-align:center;
}

/* Tile especial: anexos */
.tile-files{ padding: 14px 16px; }
.files{ display:flex; gap:8px; flex-wrap:wrap; margin-top: 10px; }
.file{
  display:inline-flex;
  padding: 7px 10px;
  border-radius: 999px;
  border:1px solid #cfe0ff;
  background:#f3f7ff;
  color:#1d4ed8;
  text-decoration:none;
  font-weight:800;
  font-size: 13px;
}
.file:hover{ filter: brightness(0.98); }

.foot{
  color: var(--muted);
  font-size: 12px;
  padding: 10px 4px 0;
}

/* ✅ Desktop: más chico y entran más */
@media (min-width: 992px){
  .wrap{ max-width: 1200px; }
  .grid{
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
  }
  .tile{
    min-height: 78px;
    padding: 12px;
  }
  .t-title{ font-size: 15px; }
  .t-sub{ font-size: 12px; }
}

/* ✅ Móvil/Tablet: como lo tenías, grande y cómodo */
@media (max-width: 520px){
  .brand h1{ font-size: 18px; }
  .grid{ grid-template-columns: 1fr; }
}
