/* ninjax-clientarea-home.css
   Matches the NINJAX home style for the client-area tiles & cards
*/

/* ---------- Theme variables (same palette as homepage) ---------- */
.nx-ca,
.nx-ca * { box-sizing: border-box; }

.nx-ca {
  --nx-purple: #6d28d9;
  --nx-purple-600: #5b21b6;
  --nx-purple-700: #4c1d95;
  --nx-blue-600: #2563eb;

  --nx-text: #101114;
  --nx-muted: #2b2d31;
  --nx-soft: #6b7280;
  --nx-card-bg: rgba(109,40,217,0.08);
  --nx-stroke: rgba(109,40,217,0.18);
  --nx-page-bg: #f5f6f9;

  color: var(--nx-text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

/* ---------- Tiles (top quick stats) ---------- */
.tiles { margin-bottom: 24px; }
.tiles .row { margin: 0 -8px; }
.tiles .col-6 { padding: 0 8px 16px; }

.tile {
  display: block;
  text-decoration: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(250,250,251,0.96));
  border: 1px solid rgba(16,17,20,0.04);
  border-radius: 14px;
  padding: 18px 14px;
  min-height: 110px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
  color: var(--nx-text);
  box-shadow: 0 8px 20px rgba(11,12,14,0.05);
  position: relative;
  overflow: hidden;
}

/* tile hover / active */
.tile:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(16,17,20,0.09);
  border-color: rgba(37,99,235,0.12);
  background: linear-gradient(135deg, rgba(76,29,149,0.95), rgba(37,99,235,0.95));
  color: #fff;
}

/* Icon */
.tile i {
  font-size: 26px;
  display: block;
  margin-bottom: 8px;
  color: var(--nx-purple-700);
  transition: color .18s ease, transform .18s ease;
}
.tile:hover i { color: #fff; transform: translateY(-3px); }

/* stat number */
.tile .stat {
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

/* title/label under the number */
.tile .title {
  font-size: 13px;
  font-weight: 700;
  color: var(--nx-soft);
  text-transform: none;
}

/* coloured highlight bar - small bottom accent */
.tile .highlight {
  position: absolute;
  bottom: 8px;
  left: 12px;
  right: 12px;
  height: 6px;
  border-radius: 6px;
  opacity: 0.95;
  transition: opacity .18s ease;
}
.tile:hover .highlight { opacity: 0.5; }

/* highlight colours */
.tile .bg-color-blue { background: linear-gradient(90deg, var(--nx-purple-700), var(--nx-blue-600)); }
.tile .bg-color-green { background: linear-gradient(90deg, #10b981 0%, #06b6d4 100%); }
.tile .bg-color-red { background: linear-gradient(90deg, #ef4444, #f97316); }
.tile .bg-color-gold { background: linear-gradient(90deg, #f59e0b, #facc15); }

/* Responsive tweaks for tiles */
@media (max-width: 992px) {
  .tiles .col-6 { width: 50%; float: left; }
}
@media (max-width: 640px) {
  .tiles .col-6 { width: 100%; float: none; }
}

/* ---------- Client home cards (panels) ---------- */
.client-home-cards .card {
  border-radius: 14px;
  border: 1px solid var(--nx-stroke);
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(245,246,249,0.98));
  box-shadow: 0 12px 30px rgba(16,17,20,0.06);
  margin-bottom: 20px;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}

/* Accent color variants — map to class like card-accent-blue etc */
.card.card-accent-blue { border-color: rgba(37,99,235,0.12); }
.card.card-accent-green { border-color: rgba(16,185,129,0.10); }
.card.card-accent-red { border-color: rgba(239,68,68,0.10); }
.card.card-accent-gold { border-color: rgba(245,158,11,0.10); }

.client-home-cards .card:hover { transform: translateY(-6px); box-shadow: 0 22px 48px rgba(16,17,20,0.08); }

.card .card-header {
  padding: 14px 18px;
  background: transparent;
  border-bottom: 1px solid rgba(16,17,20,0.03);
}
.card .card-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--nx-text);
}
.card .card-title i { color: var(--nx-purple-700); margin-right: 8px; }

/* body */
.card .card-body {
  padding: 18px;
  color: var(--nx-muted);
  line-height: 1.6;
  font-size: 14px;
}

/* List-group items inside card (children) */
.card .list-group {
  border-top: 1px solid rgba(16,17,20,0.03);
}
.card .list-group .list-group-item {
  padding: 12px 16px;
  font-weight: 700;
  border: none;
  border-bottom: 1px solid rgba(16,17,20,0.03);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card .list-group .list-group-item:last-child { border-bottom: none; }
.card .list-group .list-group-item i { margin-right: 8px; color: var(--nx-purple-700); }
.card .list-group .list-group-item.active,
.card .list-group .list-group-item:hover {
  background: linear-gradient(90deg, rgba(109,40,217,0.06), rgba(37,99,235,0.04));
  color: var(--nx-text);
}

/* card footer */
.card .card-footer {
  padding: 12px 16px;
  background: transparent;
  border-top: 1px solid rgba(16,17,20,0.03);
  color: var(--nx-soft);
  font-size: 13px;
}

/* Badges */
.card .badge {
  background: linear-gradient(90deg, var(--nx-purple-700), var(--nx-blue-600));
  color: #fff;
  border-radius: 8px;
  padding: 4px 8px;
  font-weight: 800;
}

/* Buttons inside card header */
.card .btn.btn-default.bg-color-blue {
  background: linear-gradient(90deg, var(--nx-purple-700), var(--nx-blue-600));
  color: #fff;
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 700;
  border: none;
}

/* Make sure small icons and spacing are neat */
.client-home-cards i.fas, .client-home-cards i.far {
  font-size: 14px;
}

/* Responsive: stack the panels on narrow screens */
@media (max-width: 920px) {
  .client-home-cards .row { display: block; }
  .client-home-cards .col-md-6, .client-home-cards .col-lg-12, .client-home-cards .col-xl-6 {
    width: 100%;
    padding: 0 8px;
  }
}

/* Accessibility: focus-visible outlines */
.client-home-cards .list-group .list-group-item:focus, 
.card:focus-visible {
  outline: 3px solid rgba(37,99,235,0.18);
  outline-offset: 3px;
}
