/* ═══════════════════════════════════════════════════════════════
   SysAgenda — Design System Principal
   Palette: Preto Elegante + Dourado + Branco
═══════════════════════════════════════════════════════════════ */

:root {
  --sa-primary:      #FFB400;
  --sa-primary-dark: #E6A200;
  --sa-primary-light:#FFD060;
  --sa-dark:         #111111;
  --sa-dark-2:       #1A1A1A;
  --sa-dark-3:       #242424;
  --sa-gray:         #6C757D;
  --sa-light:        #F8F9FA;
  --sa-white:        #FFFFFF;
  --sa-success:      #28A745;
  --sa-danger:       #DC3545;
  --sa-info:         #17A2B8;

  --sa-font-sans:    'Inter', 'Segoe UI', sans-serif;
  --sa-font-display: 'Playfair Display', Georgia, serif;

  --sa-radius:       10px;
  --sa-radius-lg:    18px;
  --sa-shadow:       0 4px 24px rgba(0,0,0,.12);
  --sa-shadow-lg:    0 8px 48px rgba(0,0,0,.20);
  --sa-transition:   .25s ease;
}

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sa-font-sans);
  background: var(--sa-white);
  color: #333;
  line-height: 1.65;
}

a { color: var(--sa-primary); text-decoration: none; transition: color var(--sa-transition); }
a:hover { color: var(--sa-primary-dark); }

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--sa-dark-2); }
::-webkit-scrollbar-thumb { background: var(--sa-primary); border-radius: 3px; }

/* ── Utilitários de Cor ─────────────────────────────────────── */
.text-gold   { color: var(--sa-primary) !important; }
.bg-gold     { background: var(--sa-primary) !important; }
.bg-dark-sa  { background: var(--sa-dark) !important; }
.border-gold { border-color: var(--sa-primary) !important; }

/* ── Botões ─────────────────────────────────────────────────── */
.btn-gold {
  background: var(--sa-primary);
  color: var(--sa-dark);
  font-weight: 700;
  border: none;
  border-radius: var(--sa-radius);
  padding: .65rem 1.6rem;
  transition: background var(--sa-transition), transform var(--sa-transition), box-shadow var(--sa-transition);
  letter-spacing: .3px;
}
.btn-gold:hover {
  background: var(--sa-primary-dark);
  color: var(--sa-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255,180,0,.35);
}
.btn-outline-gold {
  border: 2px solid var(--sa-primary);
  color: var(--sa-primary);
  background: transparent;
  border-radius: var(--sa-radius);
  padding: .6rem 1.5rem;
  font-weight: 600;
  transition: all var(--sa-transition);
}
.btn-outline-gold:hover {
  background: var(--sa-primary);
  color: var(--sa-dark);
}
.btn-dark-sa {
  background: var(--sa-dark);
  color: var(--sa-white);
  border: none;
  border-radius: var(--sa-radius);
  padding: .65rem 1.6rem;
  font-weight: 600;
  transition: background var(--sa-transition);
}
.btn-dark-sa:hover { background: var(--sa-dark-3); color: var(--sa-primary); }

/* ── Navbar ─────────────────────────────────────────────────── */
.navbar-sa {
  background: rgba(17, 17, 17, 0.97);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,180,0,.18);
  padding: .8rem 0;
  position: sticky;
  top: 0;
  z-index: 1030;
}
.navbar-sa .navbar-brand {
  font-family: var(--sa-font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--sa-primary) !important;
  letter-spacing: .5px;
}
.navbar-sa .nav-link {
  color: rgba(255,255,255,.85) !important;
  font-weight: 500;
  padding: .4rem .9rem !important;
  border-radius: 6px;
  transition: color var(--sa-transition), background var(--sa-transition);
}
.navbar-sa .nav-link:hover,
.navbar-sa .nav-link.active {
  color: var(--sa-primary) !important;
  background: rgba(255,180,0,.08);
}
.navbar-sa .navbar-toggler { border-color: var(--sa-primary); }
.navbar-sa .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255%2C180%2C0%2C1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ── Hero / Carrossel ───────────────────────────────────────── */
#heroCarousel { height: 92vh; min-height: 520px; }
#heroCarousel .carousel-item { height: 92vh; min-height: 520px; }
#heroCarousel .carousel-item img,
#heroCarousel .carousel-item video {
  width: 100%; height: 100%; object-fit: cover;
}
.carousel-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(17,17,17,.75) 0%, rgba(17,17,17,.35) 100%);
}
.carousel-caption-sa {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  top: 50%;
  transform: translateY(-50%);
  text-align: center;
  padding: 2rem;
  color: var(--sa-white);
}
.carousel-caption-sa h1 {
  font-family: var(--sa-font-display);
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 700;
  text-shadow: 0 2px 12px rgba(0,0,0,.5);
}
.carousel-caption-sa p {
  font-size: clamp(1rem, 2vw, 1.3rem);
  opacity: .9;
  max-width: 680px;
  margin: .8rem auto 1.6rem;
}
.carousel-indicators [data-bs-target] {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(255,180,0,.5);
}
.carousel-indicators .active { background: var(--sa-primary); }

/* ── Cards de Serviço ───────────────────────────────────────── */
.card-servico {
  border: none;
  border-radius: var(--sa-radius-lg);
  box-shadow: var(--sa-shadow);
  transition: transform var(--sa-transition), box-shadow var(--sa-transition);
  overflow: hidden;
  background: var(--sa-white);
}
.card-servico:hover {
  transform: translateY(-8px);
  box-shadow: var(--sa-shadow-lg);
}
.card-servico .icon-box {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sa-primary), var(--sa-primary-light));
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: var(--sa-dark);
  margin: 0 auto 1rem;
}

/* ── Seção Stats ─────────────────────────────────────────────── */
.stats-section { background: var(--sa-dark); color: var(--sa-white); }
.stat-number {
  font-family: var(--sa-font-display);
  font-size: 3rem;
  font-weight: 700;
  color: var(--sa-primary);
  line-height: 1;
}

/* ── Sidebar Admin / Client ─────────────────────────────────── */
.sidebar-sa {
  background: var(--sa-dark);
  min-height: 100vh;
  width: 260px;
  position: fixed;
  left: 0; top: 0; bottom: 0;
  overflow-y: auto;
  z-index: 1000;
  transition: width var(--sa-transition);
}
.sidebar-sa .sidebar-brand {
  font-family: var(--sa-font-display);
  color: var(--sa-primary);
  font-size: 1.25rem;
  font-weight: 700;
  padding: 1.5rem 1.25rem 1rem;
  border-bottom: 1px solid rgba(255,180,0,.15);
  display: block;
}
.sidebar-sa .nav-link {
  color: rgba(255,255,255,.75);
  padding: .65rem 1.25rem;
  border-radius: 8px;
  margin: .1rem .5rem;
  font-size: .92rem;
  font-weight: 500;
  transition: all var(--sa-transition);
  display: flex; align-items: center; gap: .65rem;
}
.sidebar-sa .nav-link:hover,
.sidebar-sa .nav-link.active {
  background: rgba(255,180,0,.12);
  color: var(--sa-primary);
}
.sidebar-sa .nav-link i { font-size: 1.1rem; min-width: 1.4rem; }

.main-content-sa {
  margin-left: 260px;
  min-height: 100vh;
  background: #F4F5F7;
}

/* ── Topbar ─────────────────────────────────────────────────── */
.topbar-sa {
  background: var(--sa-white);
  border-bottom: 1px solid #E8E8E8;
  padding: .75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 900;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

/* ── Cards Dashboard ────────────────────────────────────────── */
.card-stat {
  border: none;
  border-radius: var(--sa-radius-lg);
  padding: 1.5rem;
  background: var(--sa-white);
  box-shadow: var(--sa-shadow);
  position: relative;
  overflow: hidden;
}
.card-stat .stat-icon {
  width: 56px; height: 56px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
}
.card-stat .stat-value {
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--sa-dark);
  line-height: 1.1;
}
.card-stat .stat-label {
  font-size: .82rem;
  color: var(--sa-gray);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.card-stat::after {
  content: '';
  position: absolute;
  top: -20px; right: -20px;
  width: 100px; height: 100px;
  border-radius: 50%;
  opacity: .06;
}
.card-stat.gold::after  { background: var(--sa-primary); }
.card-stat.green::after { background: var(--sa-success); }
.card-stat.blue::after  { background: var(--sa-info); }
.card-stat.red::after   { background: var(--sa-danger); }

/* ── Tabelas ────────────────────────────────────────────────── */
.table-sa { border-collapse: separate; border-spacing: 0; }
.table-sa thead th {
  background: var(--sa-dark);
  color: var(--sa-primary);
  font-weight: 600;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .5px;
  border: none;
  padding: .85rem 1rem;
}
.table-sa thead th:first-child { border-radius: 10px 0 0 0; }
.table-sa thead th:last-child  { border-radius: 0 10px 0 0; }
.table-sa tbody tr {
  transition: background var(--sa-transition);
}
.table-sa tbody tr:hover { background: rgba(255,180,0,.04); }
.table-sa tbody td {
  padding: .85rem 1rem;
  border-bottom: 1px solid #F0F0F0;
  vertical-align: middle;
}

/* ── Badges ─────────────────────────────────────────────────── */
.badge-sa {
  padding: .35em .75em;
  border-radius: 6px;
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .3px;
}

/* ── Formulários ────────────────────────────────────────────── */
.form-control-sa, .form-select-sa {
  border: 1.5px solid #E0E0E0;
  border-radius: var(--sa-radius);
  padding: .65rem 1rem;
  font-size: .95rem;
  transition: border-color var(--sa-transition), box-shadow var(--sa-transition);
  background: var(--sa-white);
}
.form-control-sa:focus, .form-select-sa:focus {
  border-color: var(--sa-primary);
  box-shadow: 0 0 0 3px rgba(255,180,0,.18);
  outline: none;
}

/* ── Auth Pages ─────────────────────────────────────────────── */
.auth-wrapper {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--sa-dark) 0%, var(--sa-dark-3) 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 2rem;
}
.auth-card {
  background: var(--sa-white);
  border-radius: var(--sa-radius-lg);
  box-shadow: var(--sa-shadow-lg);
  padding: 2.5rem;
  width: 100%;
  max-width: 460px;
}
.auth-logo {
  font-family: var(--sa-font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--sa-primary);
  text-align: center;
  margin-bottom: 1.5rem;
}

/* ── Status Corrida ─────────────────────────────────────────── */
.status-timeline {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 1.5rem 0;
}
.status-step {
  flex: 1;
  text-align: center;
  position: relative;
}
.status-step::before {
  content: '';
  position: absolute;
  top: 16px; left: -50%; right: 50%;
  height: 2px;
  background: #E0E0E0;
  z-index: 0;
}
.status-step:first-child::before { display: none; }
.status-step .step-icon {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: #E0E0E0;
  color: #999;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .9rem;
  position: relative; z-index: 1;
  transition: all var(--sa-transition);
}
.status-step.done .step-icon  { background: var(--sa-success); color: #fff; }
.status-step.active .step-icon { background: var(--sa-primary); color: var(--sa-dark); }
.status-step .step-label {
  font-size: .72rem;
  color: var(--sa-gray);
  margin-top: .3rem;
  display: block;
}
.status-step.done  .step-label  { color: var(--sa-success); }
.status-step.active .step-label { color: var(--sa-primary); font-weight: 600; }

/* ── Mapa Live ──────────────────────────────────────────────── */
#live-map { width: 100%; height: 70vh; min-height: 400px; border-radius: var(--sa-radius-lg); }

/* ── WhatsApp Float Button ──────────────────────────────────── */
.wa-float {
  position: fixed;
  bottom: 1.5rem; right: 1.5rem;
  width: 58px; height: 58px;
  background: #25D366;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 1.7rem;
  box-shadow: 0 4px 20px rgba(37,211,102,.4);
  z-index: 9999;
  transition: transform var(--sa-transition), box-shadow var(--sa-transition);
  text-decoration: none;
}
.wa-float:hover {
  transform: scale(1.12);
  box-shadow: 0 6px 30px rgba(37,211,102,.55);
  color: #fff;
}

/* ── Footer ─────────────────────────────────────────────────── */
.footer-sa {
  background: var(--sa-dark);
  color: rgba(255,255,255,.7);
  padding: 3.5rem 0 1.5rem;
}
.footer-sa h6 {
  color: var(--sa-primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-bottom: 1rem;
}
.footer-sa a { color: rgba(255,255,255,.65); font-size: .9rem; }
.footer-sa a:hover { color: var(--sa-primary); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  margin-top: 2rem;
  padding-top: 1rem;
  font-size: .82rem;
  color: rgba(255,255,255,.4);
}

/* ── Animações ──────────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity:0; transform: translateY(30px); }
  to   { opacity:1; transform: translateY(0); }
}
.animate-in { animation: fadeInUp .6s ease both; }
.delay-1 { animation-delay: .1s; }
.delay-2 { animation-delay: .2s; }
.delay-3 { animation-delay: .3s; }

/* ── Responsividade Sidebar ─────────────────────────────────── */
@media (max-width: 991.98px) {
  .sidebar-sa { position: fixed; left: -260px; transition: left var(--sa-transition); }
  .sidebar-sa.show { left: 0; }
  .main-content-sa { margin-left: 0; }
}

/* ── Seção Destaque ─────────────────────────────────────────── */
.section-title {
  font-family: var(--sa-font-display);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  color: var(--sa-dark);
}
.section-title span { color: var(--sa-primary); }
.section-divider {
  width: 60px; height: 4px;
  background: var(--sa-primary);
  border-radius: 2px;
  margin: .75rem auto 2rem;
}

/* ── Testimonials ───────────────────────────────────────────── */
.card-testimonial {
  border: none;
  border-radius: var(--sa-radius-lg);
  box-shadow: var(--sa-shadow);
  padding: 1.8rem;
  background: var(--sa-white);
}
.stars-gold { color: var(--sa-primary); letter-spacing: 2px; }

/* ── How It Works ───────────────────────────────────────────── */
.how-step {
  text-align: center;
  padding: 2rem 1rem;
}
.how-step .step-num {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sa-primary), var(--sa-primary-light));
  color: var(--sa-dark);
  font-size: 1.5rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem;
  box-shadow: 0 4px 16px rgba(255,180,0,.3);
}

/* ── Utilitários Tipografia ──────────────────────────────────── */
.fw-600 { font-weight: 600 !important; }
.fw-700 { font-weight: 700 !important; }

/* ── Sidebar mobile show ─────────────────────────────────────── */
@media (max-width: 991.98px) {
  .sidebar-sa.show { box-shadow: 4px 0 30px rgba(0,0,0,.4); }
}

/* ── Form select inherit ─────────────────────────────────────── */
.form-select.form-control-sa { padding: .65rem 2.5rem .65rem 1rem; }

/* ── Responsive tables ───────────────────────────────────────── */
@media (max-width: 767px) {
  .table-sa thead { display: none; }
  .table-sa tbody td { display: block; text-align: right; padding: .4rem 1rem; }
  .table-sa tbody td::before { content: attr(data-label); float: left; font-weight: 600; }
  .table-sa tbody tr { border-bottom: 2px solid #E0E0E0; display: block; margin-bottom: .5rem; }
}

/* ── Services lista ──────────────────────────────────────────── */
.service-filter-btn { font-size: .88rem; }
.service-filter-btn.active { background: var(--sa-primary); color: var(--sa-dark); border-color: var(--sa-primary); }

/* ── Admin relatorios ────────────────────────────────────────── */
.report-card { border-left: 4px solid var(--sa-primary); }

/* ── Pagination custom ───────────────────────────────────────── */
.page-link { color: var(--sa-primary); border-color: #dee2e6; }
.page-link:hover { background: rgba(255,180,0,.08); color: var(--sa-primary-dark); border-color: var(--sa-primary); }
.page-item.active .page-link { background: var(--sa-primary); border-color: var(--sa-primary); color: var(--sa-dark); font-weight: 700; }

/* ── Sidebar overlay z-index ─────────────────────────────────── */
#sidebarOverlay { z-index: 999; }

/* ── Skeleton / placeholder ──────────────────────────────────── */
.skeleton { background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%); background-size: 200% 100%; animation: skeleton-loading 1.5s infinite; border-radius: 6px; }
@keyframes skeleton-loading { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── Print ───────────────────────────────────────────────────── */
@media print {
  .sidebar-sa, .topbar-sa, .wa-float, .navbar-sa { display: none !important; }
  .main-content-sa { margin-left: 0 !important; }
}
