/* Archivo: index.styles.css */
/* -- Variables -- */
:root{
  --bg: #f6f8fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #94a3b8;
  --shadow: 0 10px 30px rgba(2, 6, 23, 0.08);
  --radius: 16px;
  --teal: #1db6b6;
  --teal-100: #e6fbfb;
  --yellow: #facc15;
  --yellow-100: #fef9c3;
  --red: #ef4444;
  --red-100: #fee2e2;
  --orange: #fb923c;
  --orange-100: #ffedd5;
  --sidebar-width: 270px;
  --sidebar-collapsed-width: 85px;
}

/* Reset & base */
*{ box-sizing: border-box; }
html, body{ height: 100%; }
body{
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* MAIN CONTENT WRAPPER - Se ajusta según el estado del sidebar */
.main-content {
  margin-left: var(--sidebar-width);
  transition: margin-left 0.4s ease;
  min-height: 100vh;
}

/* Cuando el sidebar está colapsado */
body:has(.sidebar.collapsed) .main-content {
  margin-left: var(--sidebar-collapsed-width);
}

/* Layout */
.container{ max-width: 1200px; margin: 24px auto; padding: 0 16px; }
.cards{ display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }

/* Template-inspired cards */
.card{
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  min-height: 110px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-left: 8px solid transparent;
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover{ transform: translateY(-2px); box-shadow: 0 14px 34px rgba(2,6,23,.12); }

.card-header{ display:flex; align-items:center; justify-content:space-between; }
.card-info{ display:flex; flex-direction:column; gap:4px; }
.card-title{ font-size: 12px; letter-spacing:.6px; color:#64748b; font-weight:700; text-transform:uppercase; }
.card-value{ font-size: 26px; font-weight: 800; letter-spacing:.2px; }

.card-icon{
  width: 48px; height: 48px; border-radius: 12px;
  display:flex; align-items:center; justify-content:center;
  background: #f1f5f9;
  flex-shrink: 0;
}
.card-icon .material-symbols-outlined{ font-size: 26px; }

/* Progress (only for Meta Diaria) */
.progress-container{ margin-top: 0; }
.progress-bar{ height: 8px; background:#e2e8f0; border-radius:999px; overflow:hidden; }
.progress-fill{ height: 100%; background: var(--teal); }

/* Colored variants */
.border-teal{ border-left-color: var(--teal); }
.border-yellow{ border-left-color: var(--yellow); }
.border-red{ border-left-color: var(--red); }
.border-orange{ border-left-color: var(--orange); }

.card.meta .card-icon{ background: var(--teal-100); }
.card.suscripciones .card-icon{ background: var(--yellow-100); }
.card.vencidas .card-icon{ background: var(--red-100); }
.card.pendientes .card-icon{ background: var(--orange-100); }

.card.meta .card-icon .material-symbols-outlined{ color: var(--teal); }
.card.suscripciones .card-icon .material-symbols-outlined{ color: var(--yellow); }
.card.vencidas .card-icon .material-symbols-outlined{ color: var(--red); }
.card.pendientes .card-icon .material-symbols-outlined{ color: var(--orange); }

/* === SECTION NAVIGATION === */
.section-content {
  display: none;
}

.section-content.active {
  display: block;
}

/* === BREADCRUMB === */
.page-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  font-size: 0.85rem;
  color: #94a3b8;
  font-weight: 500;
}

.breadcrumb-icon {
  font-size: 18px;
  color: #94a3b8;
}

.breadcrumb-separator {
  color: #cbd5e1;
  font-size: 1rem;
}

.breadcrumb-item {
  color: #64748b;
  font-weight: 500;
}

.breadcrumb-link {
  color: #94a3b8;
  cursor: pointer;
  transition: color 0.2s;
}

.breadcrumb-link:hover {
  color: #0ea5e9;
}

/* Responsiveness */
@media (max-width: 1024px){
  .cards{ grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .card-value{ font-size: 24px; }
  .card-icon{ width: 44px; height: 44px; border-radius: 10px; }
  .card-icon .material-symbols-outlined{ font-size: 24px; }
}

/* === MOBILE SPECIFIC STYLES === */
@media (max-width: 768px){
  /* En móvil, el contenido principal ocupa todo el ancho */
  .main-content {
    margin-left: 0 !important;
  }
  
  /* Cards mobile */
  .cards{ grid-template-columns: 1fr; gap: 12px; }
  .card{ padding: 14px; min-height: 96px; gap: 10px; }
  .card-title{ font-size: 11px; }
  .card-value{ font-size: 22px; }
  .card-icon{ width: 40px; height: 40px; border-radius: 10px; }
  .card-icon .material-symbols-outlined{ font-size: 22px; }
  .progress-bar{ height: 7px; }
}