/* ── Variáveis ── */
:root {
  --mc-blue:    #1a73e8;
  --mc-green:   #34a853;
  --mc-yellow:  #fbbc04;
  --mc-red:     #ea4335;
  --mc-bg:      #f0f2f5;
  --sidebar-w:  240px;
  --sidebar-bg: #1e2227;
}

/* ── Reset / Base ── */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  background: var(--mc-bg);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

/* ── Layout wrapper (painéis com sidebar) ── */
.wrapper { display: flex; min-height: 100vh; width: 100%; }

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--sidebar-bg);
  color: #c8cdd3;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  transition: transform .25s ease;
  z-index: 300;
}
.sidebar-header { min-height: 70px; }
.sidebar .nav-link {
  color: #9aa0a6;
  font-size: .875rem;
  padding: .45rem .75rem;
  border-radius: .3rem;
  transition: background .15s, color .15s;
  white-space: nowrap;
  overflow: hidden;
}
.sidebar .nav-link:hover,
.sidebar .nav-link.active {
  background: rgba(255,255,255,.1);
  color: #fff;
}
.sidebar .nav-link.active { font-weight: 600; }
.nav-section-label {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  white-space: nowrap;
}

/* ── Backdrop mobile ── */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 299;
}
.sidebar-backdrop.show { display: block; }

/* ── Main content ── */
.main-content {
  flex: 1 1 0;
  min-width: 0;
  background: var(--mc-bg);
  display: flex;
  flex-direction: column;
}
.main-content .navbar {
  background: #fff;
  border-bottom: 1px solid #dee2e6;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  position: sticky;
  top: 0;
  z-index: 100;
}
.main-content .page-body {
  flex: 1;
  padding: 1rem;
  overflow-x: hidden;
}
@media (min-width: 768px) {
  .main-content .page-body { padding: 1.5rem; }
}

/* ── Stat cards ── */
.stat-card {
  border: 0;
  border-radius: .6rem;
  box-shadow: 0 1px 4px rgba(0,0,0,.1);
  transition: box-shadow .15s;
}
.stat-card:hover { box-shadow: 0 3px 12px rgba(0,0,0,.14); }
.icon-box {
  width: 44px; height: 44px;
  border-radius: .5rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0;
}
@media (min-width: 768px) {
  .icon-box { width: 48px; height: 48px; font-size: 1.3rem; }
}

/* ── Cards ── */
.card { border: 0; border-radius: .6rem; box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.card-header { background: #fff; border-bottom: 1px solid rgba(0,0,0,.08); font-size: .9rem; }
.table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: #6c757d; }
.table-responsive { -webkit-overflow-scrolling: touch; }

/* ── Mapa ── */
#map-home {
  height: 320px;
  border-radius: .5rem;
  box-shadow: 0 1px 4px rgba(0,0,0,.12);
}
#map-picker {
  height: 300px;
  border-radius: .5rem;
  border: 2px solid #dee2e6;
  cursor: crosshair;
}
#map-picker.has-pin { border-color: var(--mc-blue); }
#map-detalhe { height: 200px; border-radius: .4rem; border: 1px solid #dee2e6; }
@media (min-width: 768px) {
  #map-home   { height: 400px; }
  #map-picker { height: 360px; }
}

/* ── Login pages ── */
.login-wrapper {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 100%);
}
.login-card {
  width: 100%; max-width: 400px;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
  padding: 2rem 1.5rem;
}
@media (min-width: 480px) {
  .login-card { padding: 2.5rem 2rem; }
}
.login-logo { font-size: 1.3rem; font-weight: 700; color: var(--mc-blue); }
.google-btn {
  display: flex; align-items: center; justify-content: center; gap: .6rem;
  background: #fff; border: 1.5px solid #dadce0; color: #3c4043;
  font-weight: 500; padding: .55rem; border-radius: .4rem;
  transition: background .15s; text-decoration: none;
}
.google-btn:hover { background: #f8f9fa; color: #3c4043; }
.divider { display: flex; align-items: center; gap: .6rem; margin: .9rem 0; color: #80868b; font-size: .85rem; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: #dee2e6; }

/* ── Hero público ── */
.hero {
  background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 100%);
  color: #fff;
  padding: 2.5rem 1rem 2rem;
}
.hero h1 { font-size: clamp(1.5rem, 5vw, 2.4rem); font-weight: 700; }
@media (min-width: 768px) {
  .hero { padding: 4rem 0 3rem; }
}

/* ── Badge status ── */
.badge { font-size: .78rem; }

/* ── Timeline ── */
.timeline { position: relative; padding-left: 1.75rem; }
.timeline::before {
  content: '';
  position: absolute;
  left: .55rem; top: 0; bottom: 0;
  width: 2px;
  background: #dee2e6;
}
.timeline-item { position: relative; margin-bottom: 1.2rem; }
.timeline-dot {
  position: absolute; left: -1.8rem; top: .25rem;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--mc-blue); border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--mc-blue);
}

/* ── FAB (Floating Action Button) ── */
.btn-fab {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  width: 54px; height: 54px;
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
  z-index: 150;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  transition: transform .15s, box-shadow .15s;
}
.btn-fab:hover { transform: scale(1.08); box-shadow: 0 6px 20px rgba(0,0,0,.3); }

/* ── Mobile: sidebar posicionada como drawer ── */
@media (max-width: 991px) {
  .sidebar {
    position: fixed;
    top: 0; left: 0;
    height: 100%;
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0,0,0,.2);
  }
  .main-content { width: 100%; }
}

/* ── Responsividade geral ── */
@media (max-width: 575px) {
  .card-body { padding: .875rem; }
  .main-content .page-body { padding: .75rem; }
  .btn { font-size: .875rem; }
}

/* ── Sidebar text (hide no mobile drawer fechado) ── */
.sidebar-text { display: inline; }
