/* Layout mais rico, paleta da marca: navy, branco e verde-água */

body {
  background:
    radial-gradient(900px 420px at 88% -10%, rgba(18, 184, 134, 0.08), transparent 55%),
    var(--ca-bg);
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(18,184,134,.12) 0%, transparent 28%),
    #0c1220;
  border-right: 1px solid rgba(255,255,255,.06);
}
.sidebar-nav a {
  border-radius: 12px;
}
.sidebar-nav a.active {
  box-shadow: inset 3px 0 0 #12b886;
}

.topbar {
  background: color-mix(in srgb, var(--ca-surface) 88%, transparent);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
}
.topbar-search input {
  border-radius: 999px;
}

.card, .home-card, .stat, .finance-panel, .loc-card {
  border-radius: 18px;
}

.home {
  max-width: 1240px;
  gap: 20px;
}

.home-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.home-head h1 {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0;
}
.home-head p {
  margin-top: 4px;
  color: var(--ca-text-muted);
  font-size: 13px;
}

.home-cta {
  background: linear-gradient(180deg, #2dd4a8 0%, var(--ca-blue) 48%, var(--ca-blue-dark) 100%);
  color: #fff;
  box-shadow: 0 8px 20px rgba(18, 184, 134, 0.28);
}
.home-cta-icon svg { stroke: #fff; }
.home-cta--ghost {
  background: rgba(255,255,255,.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,.2);
  box-shadow: none;
}
.home-cta--ghost .home-cta-icon svg { stroke: #5eead4; }
.home-cta--ghost:hover {
  background: rgba(255,255,255,.14);
  color: #fff;
}
.home-cta-row .home-cta--ghost {
  background: var(--ca-surface);
  color: var(--ca-blue-dark);
  border-color: var(--ca-blue-border);
}
.home-cta-row .home-cta--ghost .home-cta-icon svg { stroke: var(--ca-blue-dark); }

.home-metrics { gap: 14px; }
.home-metric {
  background: var(--ca-surface);
  border: 1px solid var(--ca-border);
  box-shadow: var(--shadow);
  color: var(--ca-text);
  min-height: 148px;
  position: relative;
  overflow: hidden;
}
.home-metric strong { color: var(--ca-text); }
.home-metric-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.home-metric--hours,
.home-metric--records,
.home-metric--pay,
.home-metric--late {
  background: var(--ca-surface);
  color: var(--ca-text);
}
.home-metric--hours .home-metric-icon { background: #e8f8ec; color: #147a32; }
.home-metric--records .home-metric-icon { background: #e8f2fd; color: #1565b8; }
.home-metric--pay .home-metric-icon { background: #ece8fb; color: #5b4dc0; }
.home-metric--late .home-metric-icon { background: #fdecea; color: #c62828; }
.metric-delta {
  font-size: 11px;
  font-weight: 700;
}
.metric-delta--up { color: #1b8a38; }
.metric-delta--down { color: #c62828; }
.metric-delta--flat { color: var(--ca-text-muted); font-weight: 500; }
.metric-spark { margin-top: auto; align-self: flex-end; opacity: .9; }

.home-split {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 18px;
}
.home-split > * { min-width: 0; }

.home-promo {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 220px;
  padding: 22px;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  color: #fff;
  background:
    linear-gradient(180deg, transparent 20%, #0c1220 92%),
    repeating-linear-gradient(90deg, #16324a 0 14px, #12283c 14px 16px),
    #0c1220;
  border: 1px solid rgba(18,184,134,.2);
}
.home-promo h2 {
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
  max-width: 16ch;
}
.home-promo p {
  margin: 8px 0 14px;
  color: rgba(255,255,255,.72);
  font-size: 13px;
  max-width: 36ch;
}

.main-auth {
  background: radial-gradient(1200px 520px at 12% -8%, #163528 0%, #0c1220 42%, #070b12 100%);
}
.login-shell {
  display: flex;
  width: 100%;
  max-width: none;
  margin: 0;
  grid-template-columns: none;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
}
.login-aside {
  display: none;
}

[data-theme="dark"] .home-metric-icon { background: var(--ca-surface-2); color: var(--ca-text-muted); }
[data-theme="dark"] .home-metric--hours .home-metric-icon,
[data-theme="dark"] .home-metric--records .home-metric-icon,
[data-theme="dark"] .home-metric--pay .home-metric-icon,
[data-theme="dark"] .home-metric--late .home-metric-icon {
  background: var(--ca-surface-2);
  color: var(--ca-text-muted);
}
[data-theme="dark"] .metric-delta--up { color: #6ee7b7; }
[data-theme="dark"] .metric-delta--down { color: #f0a8a8; }
[data-theme="dark"] .sidebar { background: #08090c; }
[data-theme="dark"] body {
  background: #08090c;
}

@media (max-width: 960px) {
  .home-split { grid-template-columns: 1fr; }
  .home-cta-row--desktop { display: none; }
  .home-promo { display: none; }
  .metric-spark { display: none; }
  .home-metric { min-height: 0; padding: 12px; }
  .home-head h1 { font-size: 1.35rem; }
}
@media (min-width: 900px) {
  .home-cta-row { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
}
@media (max-width: 899px) {
  .home-cta-row { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .bottom-nav-plus {
    position: relative;
  }
  .bottom-nav-plus .bottom-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(180deg, #2dd4a8, var(--ca-blue));
    color: #fff;
    margin-top: -18px;
    box-shadow: 0 8px 16px rgba(18, 184, 134, .35);
  }
  .bottom-nav-plus .bottom-icon svg {
    stroke: #fff;
    width: 22px;
    height: 22px;
  }
  .bottom-nav-plus .bottom-label {
    color: var(--ca-blue);
    font-weight: 700;
  }
  .bottom-nav a.bottom-nav-plus.active .bottom-icon svg { stroke: #fff; }
  .page-content {
    padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px));
  }
}
