/* ── Home page ── */
.home-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #f5f6fa;
}

/* Header */
.home-header {
  background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
  color: #fff;
  padding: 40px 24px 48px;
}

.home-header-inner {
  max-width: 960px;
  margin: 0 auto;
}

.home-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.home-brand-icon { font-size: 2rem; }
.home-brand-name {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -.02em;
}

.home-tagline {
  font-size: 1rem;
  opacity: .85;
  margin-left: 2px;
}

/* Main */
.home-main {
  flex: 1;
  max-width: 960px;
  width: 100%;
  margin: -24px auto 0;
  padding: 0 16px 48px;
}

/* Grid */
.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

@media (max-width: 400px) {
  .home-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

/* App card */
.home-card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
  padding: 20px 16px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: transform .18s ease, box-shadow .18s ease;
  -webkit-tap-highlight-color: transparent;
}

.home-card:hover,
.home-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(108,92,231,.18);
  outline: none;
}

.home-card:active { transform: translateY(-1px); }

/* Icon */
.home-card-icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  object-fit: cover;
  flex-shrink: 0;
}

.home-card-icon-placeholder {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: linear-gradient(135deg, #ede9fe, #c7d2fe);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
}

.home-card-name {
  font-size: .9rem;
  font-weight: 700;
  color: #2d3436;
  line-height: 1.3;
  word-break: break-word;
}

.home-card-desc {
  font-size: .78rem;
  color: #636e72;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Loading spinner */
.home-loading {
  display: flex;
  justify-content: center;
  padding: 48px 0;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #ede9fe;
  border-top-color: #6c5ce7;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Empty state */
.home-empty {
  text-align: center;
  padding: 64px 24px;
  color: #b2bec3;
}

.home-empty span {
  font-size: 3rem;
  display: block;
  margin-bottom: 12px;
}

.home-empty p { font-size: 1rem; }

/* Footer */
.home-footer {
  text-align: center;
  padding: 16px;
  border-top: 1px solid #dfe6e9;
  background: #fff;
}

.home-admin-link {
  font-size: .8rem;
  color: #b2bec3;
  text-decoration: none;
  transition: color .2s;
}

.home-admin-link:hover { color: #6c5ce7; }
