/*
  BlueGym – Trang chủ (public/home.html)
  Dark-theme landing/dashboard page
*/

/* ── Variables ─────────────────────────────────────── */
:root {
  --h-primary:      #6366f1;
  --h-primary-dark: #4f46e5;
  --h-secondary:    #0ea5e9;
  --h-success:      #10b981;
  --h-warning:      #f59e0b;
  --h-danger:       #ef4444;
  --h-dark:         #0f172a;
  --h-gray:         #64748b;
  --h-light:        #f1f5f9;
  --h-text:         #e2e8f0;
}

/* ── Reset ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Body ──────────────────────────────────────────── */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  min-height: 100vh;
  color: var(--h-text);
  overflow-x: hidden;
}

/* ── Animated background blobs ─────────────────────── */
.bg-pattern {
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 80%, rgba(99,102,241,.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(14,165,233,.15) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(244,63,94,.08) 0%, transparent 40%);
  z-index: 0;
  pointer-events: none;
}

/* ── Container ─────────────────────────────────────── */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ── Header ────────────────────────────────────────── */
header {
  padding: 18px 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.logo {
  display: flex;
  align-items: center;
  gap: 14px;
}
.logo-icon {
  /* width/height được set bằng inline style từ thuong_hieu.logo_admin_*_px */
  border-radius: 13px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.logo-icon img { width: 100%; height: 100%; object-fit: contain; }
.logo-text h1 {
  font-size: 20px;
  font-weight: 800;
  background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -.5px;
  line-height: 1.2;
}
.logo-text span { font-size: 11px; color: var(--h-gray); font-weight: 500; }

.header-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ── Buttons ───────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all .25s ease;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}
.btn-ghost {
  background: rgba(255,255,255,.05);
  color: var(--h-text);
  border: 1px solid rgba(255,255,255,.1);
}
.btn-ghost:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); }
.btn-primary {
  background: linear-gradient(135deg, var(--h-primary), var(--h-primary-dark));
  color: #fff;
  box-shadow: 0 4px 18px rgba(99,102,241,.4);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(99,102,241,.5); }
.btn-large { padding: 14px 28px; font-size: 15px; border-radius: 13px; }
.btn-glow {
  background: linear-gradient(135deg, var(--h-primary), #8b5cf6);
  color: #fff;
  box-shadow: 0 0 36px rgba(99,102,241,.4);
}
.btn-glow:hover { box-shadow: 0 0 56px rgba(99,102,241,.6); }

/* ── Hero ──────────────────────────────────────────── */
.hero { padding: 70px 0 50px; text-align: center; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  background: rgba(99,102,241,.15);
  border: 1px solid rgba(99,102,241,.3);
  border-radius: 50px;
  font-size: 11px;
  font-weight: 600;
  color: #a5b4fc;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 22px;
}
.hero-badge::before {
  content: '';
  width: 7px;
  height: 7px;
  background: var(--h-success);
  border-radius: 50%;
  animation: hpulse 2s infinite;
}
@keyframes hpulse {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:.5; transform:scale(1.25); }
}
.hero h2 {
  font-size: clamp(32px, 4.5vw, 52px);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 18px;
  letter-spacing: -1px;
}
.hero h2 .gradient-text {
  background: linear-gradient(135deg, #6366f1 0%, #0ea5e9 50%, #10b981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p {
  font-size: 17px;
  color: var(--h-gray);
  max-width: 580px;
  margin: 0 auto 28px;
  line-height: 1.7;
}
.hero-buttons { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ── Stats row ─────────────────────────────────────── */
.stats {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 18px;
  margin-bottom: 36px;
}
@media (max-width:900px) { .stats { grid-template-columns: repeat(2,1fr); } }
@media (max-width:480px) { .stats { grid-template-columns: 1fr; } }

.stat-card {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 20px;
  padding: 22px;
  text-align: center;
  transition: all .3s;
}
.stat-card:hover {
  background: rgba(255,255,255,.06);
  transform: translateY(-4px);
  border-color: rgba(99,102,241,.25);
}
.stat-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  background: rgba(99,102,241,.12);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.stat-value { font-size: 30px; font-weight: 800; color: #fff; margin-bottom: 4px; }
.stat-label { font-size: 12px; color: var(--h-gray); font-weight: 500; }
.stat-compare { font-size: 11px; color: rgba(148,163,184,.6); margin-top: 7px; }
.stat-card--checkin { border-color: rgba(16,185,129,.2); }
.stat-card--checkin:hover { border-color: rgba(16,185,129,.45); }
.stat-card--checkin .stat-value { color: #34d399; }
.stat-card--customer-new { border-color: rgba(59,130,246,.2); }
.stat-card--customer-new:hover { border-color: rgba(59,130,246,.45); }
.stat-card--customer-new .stat-value { color: #60a5fa; }
.stat-card--membership-new { border-color: rgba(245,158,11,.2); }
.stat-card--membership-new:hover { border-color: rgba(245,158,11,.45); }
.stat-card--membership-new .stat-value { color: #fbbf24; }
.stat-card--pt-confirmed { border-color: rgba(236,72,153,.2); }
.stat-card--pt-confirmed:hover { border-color: rgba(236,72,153,.45); }
.stat-card--pt-confirmed .stat-value { color: #f472b6; }

/* ── Section header ────────────────────────────────── */
.section-header { margin-bottom: 24px; }
.section-title { font-size: 20px; font-weight: 700; color: #fff; }
.section-title-sm {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 11px;
  font-size: 11px;
  font-weight: 700;
}
.section-count-warn  { background: rgba(245,158,11,.25); color: #fbbf24; }
.section-count-empty { background: rgba(16,185,129,.2);  color: #34d399; }

/* ── Expiry alert panels ───────────────────────────── */
.expiry-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 44px;
}
@media (max-width:900px) { .expiry-grid { grid-template-columns: 1fr; } }

.expiry-panel {
  background: rgba(255,255,255,.025);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 20px;
  overflow: hidden;
}
.expiry-panel--the  { border-top: 3px solid #f59e0b; }
.expiry-panel--tu   { border-top: 3px solid #f97316; }
.expiry-panel--ok   { border-top: 3px solid #10b981; }

.expiry-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.expiry-panel-head-left { display: flex; align-items: center; gap: 10px; }
.expiry-panel-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}
.expiry-panel-icon--the  { background: rgba(245,158,11,.18); }
.expiry-panel-icon--tu   { background: rgba(249,115,22,.18); }
.expiry-panel-icon--ok   { background: rgba(16,185,129,.15); }

.expiry-panel-body { overflow-x: auto; }

.expiry-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.expiry-table th {
  padding: 8px 14px;
  text-align: left;
  color: var(--h-gray);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .4px;
  background: rgba(0,0,0,.15);
  white-space: nowrap;
}
.expiry-table td {
  padding: 8px 14px;
  border-top: 1px solid rgba(255,255,255,.04);
  color: var(--h-text);
  vertical-align: middle;
}
.expiry-table tr:hover td { background: rgba(255,255,255,.03); }

.expiry-days {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  padding: 3px 9px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.expiry-days--today  { background: rgba(239,68,68,.25);  color: #fca5a5; }
.expiry-days--near   { background: rgba(245,158,11,.2);  color: #fcd34d; }
.expiry-days--normal { background: rgba(99,102,241,.18); color: #a5b4fc; }

.expiry-name  { font-weight: 600; color: #fff; }
.expiry-phone { font-size: 11px; color: var(--h-gray); margin-top: 1px; }

.expiry-empty {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 18px;
  color: var(--h-gray);
  font-size: 13px;
}

/* ── Features grid ─────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 20px;
  margin-bottom: 48px;
}
@media (max-width:1000px) { .features-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width:600px)  { .features-grid { grid-template-columns: 1fr; } }

.feature-card {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 22px;
  padding: 26px;
  text-decoration: none;
  color: inherit;
  transition: all .35s;
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--h-primary), var(--h-secondary));
  opacity: 0;
  transition: opacity .3s;
}
.feature-card:hover { transform: translateY(-7px); background: rgba(255,255,255,.06); box-shadow: 0 18px 50px rgba(0,0,0,.3); }
.feature-card:hover::before { opacity: 1; }

.feature-card.blue   { --card-color: #3b82f6; }
.feature-card.cyan   { --card-color: #06b6d4; }
.feature-card.green  { --card-color: #10b981; }
.feature-card.amber  { --card-color: #f59e0b; }
.feature-card.pink   { --card-color: #ec4899; }
.feature-card.purple { --card-color: #8b5cf6; }

.feature-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.feature-icon {
  width: 46px;
  height: 46px;
  background: linear-gradient(135deg, var(--card-color), rgba(255,255,255,.1));
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
}
.feature-badge {
  padding: 5px 10px;
  background: rgba(255,255,255,.07);
  border-radius: 7px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--h-gray);
}
.feature-title  { font-size: 17px; font-weight: 700; margin-bottom: 7px; color: #fff; }
.feature-desc   { font-size: 12.5px; color: var(--h-gray); line-height: 1.6; margin-bottom: 14px; }
.feature-stats  { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.06); }
.feature-stat   { font-size: 12px; color: var(--h-gray); }
.feature-stat strong { color: #fff; font-weight: 600; }
.feature-arrow {
  position: absolute;
  bottom: 22px; right: 22px;
  width: 30px; height: 30px;
  background: rgba(255,255,255,.05);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--h-gray);
  font-size: 14px;
  transition: all .3s;
}
.feature-card:hover .feature-arrow { background: var(--h-primary); color: #fff; transform: translateX(3px); }

/* ── Quick actions ─────────────────────────────────── */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 14px;
  margin-bottom: 48px;
}
@media (max-width:800px) { .quick-actions { grid-template-columns: repeat(2,1fr); } }

.quick-action {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px 18px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 15px;
  text-decoration: none;
  color: inherit;
  transition: all .3s;
}
.quick-action:hover {
  background: rgba(99,102,241,.14);
  border-color: rgba(99,102,241,.28);
  transform: translateY(-2px);
}
.quick-action-icon { font-size: 22px; }
.quick-action-text { font-size: 13.5px; font-weight: 600; color: #fff; }
.quick-action-text span { display: block; font-size: 11px; font-weight: 400; color: var(--h-gray); margin-top: 2px; }

/* ── Expiry pagination ─────────────────────────────── */
.expiry-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding: 8px 14px;
  border-top: 1px solid rgba(255,255,255,.05);
}
.expiry-pagination button {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  color: var(--h-text);
  font-size: 13px;
  cursor: pointer;
  transition: background .2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.expiry-pagination button:hover:not(:disabled) { background: rgba(99,102,241,.25); border-color: rgba(99,102,241,.4); }
.expiry-pagination button:disabled { opacity: .3; cursor: default; }
.expiry-pagination .pg-info {
  font-size: 12px;
  color: var(--h-gray);
  min-width: 52px;
  text-align: center;
}
.expiry-pagination .pg-dots { font-size: 11px; color: var(--h-gray); padding: 0 2px; }

/* ── Footer ────────────────────────────────────────── */
footer {
  padding: 36px 0;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,.06);
  margin-top: 32px;
}
footer p { font-size: 12px; color: var(--h-gray); }
footer a { color: var(--h-primary); text-decoration: none; }
footer a:hover { text-decoration: underline; }
