/* ============================================================
   home.css — Estilos de la página de inicio (index.php)
   Requiere: base.css cargado antes
   ============================================================ */

/* ── Setup inicial ── */
.setup-wrap {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1rem 4rem;
}
.setup-wrap .inner { width: 100%; max-width: 660px; }

.setup-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: .35rem;
}
.setup-sub {
  color: var(--muted);
  font-size: .88rem;
  margin-bottom: 2rem;
  line-height: 1.5;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1.1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.step-badge {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  border-radius: 99px;
  padding: .15rem .55rem;
}

ol { padding-left: 1.3rem; }
ol li {
  font-size: .875rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: .25rem;
}
ol li strong { color: var(--text); }

.copy-box {
  background: #0f1117;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .7rem 1rem;
  font-family: monospace;
  font-size: .83rem;
  color: var(--accent);
  word-break: break-all;
  margin: .5rem 0 .9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}
.copy-btn {
  flex-shrink: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  font-size: .75rem;
  padding: .3rem .65rem;
  cursor: pointer;
  transition: color .2s;
}
.copy-btn:hover { color: var(--text); }

/* ── Topbar ── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .9rem 2rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  z-index: 9999;
  box-sizing: border-box;
}
.topbar-logo {
  font-size: 1.05rem;
  font-weight: 700;
}
a.topbar-logo, a.topbar-logo:visited {
  color: inherit !important;
  text-decoration: none !important;
}

.topbar-user { display: flex; align-items: center; gap: .75rem; }
.user-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 2px solid var(--border);
  object-fit: cover;
}
.user-avatar-placeholder {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--card);
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; color: var(--muted);
}
.user-name  { font-size: .88rem; color: var(--text); }
.user-email { font-size: .75rem; color: var(--muted); }
.logout-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  font-size: .78rem;
  padding: .35rem .75rem;
  cursor: pointer;
  transition: color .2s, border-color .2s;
  text-decoration: none;
  display: inline-block;
}
.logout-btn:hover { color: var(--text); border-color: var(--text); }

/* ── Login ── */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 380px;
  text-align: center;
}
.login-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: .4rem;
}
.login-sub {
  color: var(--muted);
  font-size: .88rem;
  margin-bottom: 2rem;
  line-height: 1.5;
}
.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  width: 100%;
  padding: .85rem 1.25rem;
  background: #fff;
  border: none;
  border-radius: var(--radius);
  color: #1f1f1f;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: opacity .2s, box-shadow .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
}
.google-btn:hover { opacity: .93; box-shadow: 0 3px 8px rgba(0,0,0,.4); }
.google-logo { width: 20px; height: 20px; flex-shrink: 0; }
.alert-denied {
  background: rgba(239,68,68,.12);
  border: 1px solid rgba(239,68,68,.35);
  color: #fca5a5;
  border-radius: 8px;
  padding: .8rem 1rem;
  font-size: .85rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}
.login-note { color: var(--muted); font-size: .75rem; margin-top: 1.5rem; line-height: 1.5; }

/* ── Panel principal ── */
.main { padding: 4.5rem 2rem 2.5rem; max-width: 900px; margin: 0 auto; }
.greeting { font-size: 1.3rem; font-weight: 600; margin-bottom: .35rem; }
.greeting-sub { color: var(--muted); font-size: .9rem; margin-bottom: 2rem; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}
.app-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-decoration: none;
  color: var(--text);
  transition: border-color .2s, transform .15s, background .2s;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.app-card:hover {
  border-color: var(--card-border, var(--border));
  background: var(--card-bg, var(--card));
  transform: translateY(-2px);
}
.app-card.blue  { --card-border: var(--blue-border);  --card-bg: rgba(30,58,95,.35); }
.app-card.green { --card-border: var(--green-border); --card-bg: rgba(26,58,42,.35); }
.app-card.amber { --card-border: var(--amber-border); --card-bg: rgba(58,42,10,.35); }
.app-card.coral  { --card-border: var(--coral-border);  --card-bg: rgba(58,26,26,.35); }
.app-card.purple { --card-border: var(--purple-border); --card-bg: rgba(42,26,74,.35); }
.app-card.teal   { --card-border: var(--teal-border);   --card-bg: rgba(15,46,46,.35); }

.app-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.app-icon.blue  { background: var(--blue-fill);  color: #4f8ef7; }
.app-icon.green { background: var(--green-fill); color: #22c55e; }
.app-icon.amber { background: var(--amber-fill); color: #f59e0b; }
.app-icon.coral  { background: var(--coral-fill);  color: #f87171; }
.app-icon.purple { background: var(--purple-fill); color: #a78bfa; }
.app-icon.teal   { background: var(--teal-fill);   color: #2dd4bf; }
.app-icon svg { width: 22px; height: 22px; }

.app-title { font-size: 1rem; font-weight: 600; }
.app-desc  { font-size: .83rem; color: var(--muted); line-height: 1.5; flex: 1; }
.app-arrow { font-size: .8rem; color: var(--muted); align-self: flex-end; margin-top: .25rem; }

/* .sub: subtítulo genérico (login card) */
.sub {
  color: var(--muted);
  font-size: .85rem;
  margin-bottom: 1.75rem;
}

/* .wrap: contenedor del setup (alias de .inner para compatibilidad) */
.wrap { width: 100%; max-width: 660px; }



.category-label {
    grid-column: 1 / -1;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin: 2.5rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-weight: 600;
}
.category-label:first-child { margin-top: 0.5rem; }

.section-label {
  grid-column: 1 / -1; /* Esto hace que el título ocupe todo el ancho de la grilla */
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
  margin: 2.5rem 0 1rem; /* Más espacio arriba para separar bien los grupos */
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--border);
}

/* Para que el primer título no tenga tanto espacio arriba */
.section-label:first-of-type {
  margin-top: 0.5rem;
}
