/* ============================================================
   RISE ERP — Sistema de diseño base — VERSION-CHECK-002
   Fiel al Manual de Identidad Visual 2025 (Brand Guideline)
   ============================================================ */

:root {
  /* Colores oficiales del manual de marca */
  --rise-verde-medianoche: #003b4a;   /* color principal / textos fuertes */
  --rise-naranja-griega:   #e07114;   /* color de acento / CTA secundarios */
  --rise-celeste-cielo:    #08bfe0;   /* color de acento / CTA primarios */
  --rise-gris:             #d5d5d5;   /* fondos neutros */

  /* Variaciones derivadas para UI (no están en el manual, son utilitarias) */
  --rise-verde-50:   #e8f0f2;
  --rise-verde-100:  #c2d6db;
  --rise-celeste-50: #e3f8fc;
  --rise-celeste-100:#bdedf6;
  --rise-naranja-50: #fdf0e4;
  --rise-gris-50:    #f7f7f7;
  --rise-gris-100:   #ececec;

  /* Estados (no son del manual, son convención de sistema) */
  --estado-pagado:    #15803d;
  --estado-pendiente: #b45309;
  --estado-vencido:   #b42318;
  --estado-bloqueado: #6b7280;

  /* Tipografía: Space Grotesk (oficial del manual) */
  --font-rise: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;

  --radio-pastilla: 14px;  /* el manual usa formas redondeadas tipo "pastilla" */
  --radio-chip: 8px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-rise);
  background: var(--rise-gris-50);
  color: var(--rise-verde-medianoche);
}

/* ── Sidebar lateral ── */
.rise-sidebar {
  position: fixed;
  top: 0; left: 0;
  width: 240px;
  height: 100vh;
  background: var(--rise-verde-medianoche);
  display: flex;
  flex-direction: column;
  z-index: 100;
}
.rise-sidebar .logo-area {
  padding: 24px 22px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.rise-sidebar .logo-area .isotipo {
  width: 34px; height: 34px;
  background: rgba(255,255,255,0.08);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.rise-sidebar .logo-area .marca-nombre {
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.1;
}
.rise-sidebar .logo-area .marca-sub {
  color: var(--rise-naranja-griega);
  font-size: 10.5px;
  font-weight: 500;
}

.rise-sidebar .nav-section {
  padding: 18px 14px 4px;
}
.rise-sidebar .nav-label {
  color: #6b8e96;
  font-size: 10.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0 12px 8px;
}
.rise-sidebar nav { padding: 0 14px; }
.rise-sidebar nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 14px;
  margin-bottom: 2px;
  border-radius: 10px;
  color: #b8d4d9;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: background 0.18s, color 0.18s;
}
.rise-sidebar nav a svg {
  width: 17px;
  height: 17px;
  min-width: 17px;
  flex-shrink: 0;
  opacity: 0.85;
}
.rise-sidebar nav a:hover { background: rgba(255,255,255,0.06); color: #fff; }
.rise-sidebar nav a.active {
  background: var(--rise-celeste-cielo);
  color: var(--rise-verde-medianoche);
}
.rise-sidebar nav a.active svg { opacity: 1; }

.rise-sidebar .usuario-area {
  margin-top: auto;
  padding: 16px 18px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 10px;
}
.rise-sidebar .usuario-area .avatar {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: var(--rise-naranja-griega);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  font-weight: 700;
  flex-shrink: 0;
}
.rise-sidebar .usuario-area .info { flex: 1; min-width: 0; }
.rise-sidebar .usuario-area .nombre {
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rise-sidebar .usuario-area .rol {
  color: #6b8e96;
  font-size: 11px;
}
.rise-sidebar .usuario-area a.logout-icon {
  color: #6b8e96;
  display: flex;
  align-items: center;
  transition: color 0.15s;
}
.rise-sidebar .usuario-area a.logout-icon:hover { color: var(--rise-naranja-griega); }

/* ── Área de contenido principal ── */
.rise-main {
  margin-left: 240px;
  min-height: 100vh;
  animation: rise-fade-in 0.28s ease;
}
@keyframes rise-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Contenedor general ── */
.rise-container {
  max-width: 1180px;
  margin: 0;
  padding: 32px 40px 60px;
}

.rise-page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}
.rise-page-header h1 {
  font-size: 24px;
  font-weight: 700;
  margin: 0;
  color: var(--rise-verde-medianoche);
}
.rise-page-header p.subtitulo {
  margin: 4px 0 0;
  font-size: 13.5px;
  color: #5b6b70;
}

/* ── Botones (estilo "pastilla" del manual) ── */
.rise-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radio-pastilla);
  font-family: var(--font-rise);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: opacity .15s, transform .1s;
}
.rise-btn:active { transform: scale(0.98); }
.rise-btn-primario {
  background: var(--rise-celeste-cielo);
  color: var(--rise-verde-medianoche);
}
.rise-btn-primario:hover { opacity: 0.88; }
.rise-btn-secundario {
  background: var(--rise-naranja-griega);
  color: #fff;
}
.rise-btn-secundario:hover { opacity: 0.88; }
.rise-btn-outline {
  background: transparent;
  border: 1.5px solid var(--rise-verde-medianoche);
  color: var(--rise-verde-medianoche);
}
.rise-btn-outline:hover { background: var(--rise-verde-50); }

/* ── Tarjetas / cards ── */
.rise-card {
  background: #fff;
  border: 1px solid var(--rise-gris-100);
  border-radius: 16px;
  padding: 22px;
}

/* ── Tabla de datos ── */
.rise-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,59,74,0.06);
}
.rise-table thead {
  background: var(--rise-verde-medianoche);
}
.rise-table thead th {
  color: #fff;
  text-align: left;
  padding: 13px 16px;
  font-size: 12.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.rise-table tbody td {
  padding: 13px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--rise-gris-100);
}
.rise-table tbody tr:hover { background: var(--rise-celeste-50); }
.rise-table tbody tr:last-child td { border-bottom: none; }

/* ── Badges de estado (pastilla pequeña) ── */
.rise-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
}
.rise-badge-pagado    { background: #dcfce7; color: var(--estado-pagado); }
.rise-badge-pendiente { background: #fef3c7; color: var(--estado-pendiente); }
.rise-badge-vencido   { background: #fee2e2; color: var(--estado-vencido); }
.rise-badge-bloqueado { background: #e5e7eb; color: var(--estado-bloqueado); }

/* ── Formularios ── */
.rise-form-group { margin-bottom: 16px; }
.rise-form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--rise-verde-medianoche);
}
.rise-form-group input,
.rise-form-group select,
.rise-form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--rise-gris-100);
  border-radius: 10px;
  font-family: var(--font-rise);
  font-size: 14px;
  color: var(--rise-verde-medianoche);
  background: #fff;
}
.rise-form-group input:focus,
.rise-form-group select:focus,
.rise-form-group textarea:focus {
  outline: none;
  border-color: var(--rise-celeste-cielo);
  box-shadow: 0 0 0 3px var(--rise-celeste-50);
}

/* ── Patrón decorativo circular (recurso gráfico del manual) ── */
.rise-pattern-bg {
  position: relative;
  overflow: hidden;
}
.rise-pattern-bg::before {
  content: '';
  position: absolute;
  width: 260px; height: 260px;
  border-radius: 50%;
  background: var(--rise-celeste-cielo);
  opacity: 0.08;
  top: -120px; right: -80px;
}

/* ── Stat cards (estilo dashboard) ── */
.rise-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.rise-stat-card {
  background: #fff;
  border: 1px solid var(--rise-gris-100);
  border-radius: 16px;
  padding: 20px;
}
.rise-stat-card .icono {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.rise-stat-card .icono svg { width: 19px; height: 19px; }
.rise-stat-card .icono.celeste { background: var(--rise-celeste-50); }
.rise-stat-card .icono.naranja { background: var(--rise-naranja-50); }
.rise-stat-card .icono.verde   { background: #dcfce7; }
.rise-stat-card .etiqueta {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #5b6b70;
  margin-bottom: 6px;
}
.rise-stat-card .valor {
  font-size: 26px;
  font-weight: 700;
  color: var(--rise-verde-medianoche);
  line-height: 1.1;
}
.rise-stat-card .detalle {
  font-size: 12px;
  color: #94a3a8;
  margin-top: 4px;
}

/* ── Utilidades ── */
.rise-flex { display: flex; align-items: center; gap: 10px; }
.rise-text-muted { color: #5b6b70; font-size: 13px; }
.rise-empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #5b6b70;
}
