@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --bg-main: #070a13;
  --bg-surface: #0e1424;
  --bg-card: #131b2e;
  --bg-card-hover: #18223a;
  --text-main: #f8fafc;
  --text-muted: #8492a6;
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.16);
  --primary-blue: #3b82f6;
  --primary-glow: rgba(59, 130, 246, 0.28);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #05070d;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  background-image: url('/cat-bg.svg');
  background-size: var(--cat-size, 340px) var(--cat-size, 340px);
  background-repeat: repeat;
  opacity: 0.9;
  animation: catAmbientDrift 110s linear infinite;
  will-change: background-position;
  transition: background-size var(--cat-zoom-transition, 2.4s cubic-bezier(0.16, 1, 0.3, 1));
}

@keyframes catAmbientDrift {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 340px 680px;
  }
}

.hub-container {
  max-width: 980px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 20px 48px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: relative;
  z-index: 1;
}

/* HEADER */
.hub-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
  flex-shrink: 0;
}

.brand-cat-img {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  display: block;
}

.header-brand h1 {
  font-size: 1.55rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
}

.brand-sub {
  font-size: 0.84rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 2px;
}

.btn-notify-hub {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #fff;
  border: none;
  padding: 9px 18px;
  border-radius: 20px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.35);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
}

.btn-notify-hub svg {
  width: 16px;
  height: 16px;
}

.btn-notify-hub:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

/* BARRA DE MÉTRICAS */
.metrics-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.metric-item {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.2s;
}

.metric-item:hover {
  border-color: var(--border-hover);
}

.metric-header {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
}

.metric-header svg {
  width: 14px;
  height: 14px;
}

.metric-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.metric-value {
  font-size: 1.02rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 7px;
}

.status-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  display: inline-block;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.8);
}

/* CARDS DOS DASHBOARDS */
.dashboards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 20px;
}

.app-portal-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.app-portal-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
}

.card-glow-bg {
  position: absolute;
  top: -50px;
  right: -50px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.2;
  pointer-events: none;
  transition: opacity 0.3s;
}

.app-portal-card:hover .card-glow-bg {
  opacity: 0.45;
}

/* Cores específicas de cada Card */
.card-compras .card-glow-bg { background: #10b981; }
.card-compras:hover { border-color: rgba(16, 185, 129, 0.4); }

.card-lazer .card-glow-bg { background: #f59e0b; }
.card-lazer:hover { border-color: rgba(245, 158, 11, 0.4); }

.card-kanban .card-glow-bg { background: #6366f1; }
.card-kanban:hover { border-color: rgba(99, 102, 241, 0.4); }

.card-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.card-top-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
}

.card-cat-img {
  width: 100%;
  height: 100%;
  border-radius: 13px;
  display: block;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s ease;
}

.app-portal-card:hover .card-cat-img {
  transform: scale(1.08) translateY(-2px);
}

.card-compras:hover .card-cat-img {
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.45);
}

.card-lazer:hover .card-cat-img {
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.45);
}

.card-kanban:hover .card-cat-img {
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.45);
}

.card-meta-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.card-content h2 {
  font-size: 1.28rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
}

.card-content p {
  font-size: 0.88rem;
  color: #cbd5e1;
  line-height: 1.5;
  flex: 1;
}

.card-footer-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-pill {
  font-size: 0.76rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 4px 10px;
  border-radius: 20px;
  color: #e2e8f0;
}

.arrow-btn {
  font-size: 0.85rem;
  font-weight: 700;
  color: #60a5fa;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: transform 0.2s;
}

.arrow-btn svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s;
}

.app-portal-card:hover .arrow-btn svg {
  transform: translateX(3px);
}

/* FOOTER */
.hub-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.84rem;
  color: var(--text-muted);
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-backup-download {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: #93c5fd;
  text-decoration: none;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.2s;
}

.btn-backup-download svg {
  width: 15px;
  height: 15px;
}

.btn-backup-download:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: #3b82f6;
  color: #fff;
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.footer-link:hover {
  color: #fff;
}

.footer-sep {
  color: rgba(255, 255, 255, 0.2);
}
