:root {
  --primary: #0f9d58;
  --primary-dark: #0b6f3e;
  --bg: #f3f4f6;
  --text: #111827;
  --muted: #6b7280;
  --danger: #e53935;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Inter", sans-serif;
  background: radial-gradient(circle at top left, #e6f4ea 0, #f3f4f6 40%, #ffffff 100%);
  min-height: 100vh;
  color: var(--text);
}

header {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #ffffff;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 10px 25px rgba(15,157,88,0.45);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-logo {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 20px;
}

.header-title h1 {
  font-size: 18px;
}

.header-title span {
  font-size: 12px;
  opacity: 0.9;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  font-size: 12px;
}

.user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255,255,255,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}

.btn-header {
  border: none;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  background: #b71c1c;   /* vermelho */
  color: #ffffff;        /* texto branco */
}

main {
  padding: 18px 16px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.menu-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.menu-btn {
  border: none;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
  background: #e5e7eb;
  color: #111827;
}

.menu-btn-primary {
  background: rgba(15,157,88,0.08);
  color: #065f46;
}

.menu-btn[hidden] {
  display: none !important;
}

.section-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 10px;
}

.card-box {
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(15,23,42,0.08);
  padding: 14px 14px 16px;
}

.pontos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.ponto-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 12px 12px 10px;
  border: 1px solid #e5e7eb;
}

.ponto-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ponto-name {
  font-size: 14px;
  font-weight: 600;
}

.badge-status {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
}

.badge-status-on {
  background: rgba(22,163,74,0.12);
  color: #166534;
}

.badge-status-on .badge-status-dot {
  background: #22c55e;
}

.badge-status-off {
  background: rgba(220,38,38,0.08);
  color: #b91c1c;
}

.badge-status-off .badge-status-dot {
  background: #ef4444;
}

.dias-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.dia-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 999px;
  font-weight: 500;
}

.dia-on {
  background: rgba(22,163,74,0.12);
  color: #166534;
}

.dia-off {
  background: rgba(220,38,38,0.08);
  color: #b91c1c;
}

.ponto-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted);
}

.btn-mini {
  border: none;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  cursor: pointer;
  background: rgba(15,157,88,0.08);
  color: #065f46;
}

.status-bar {
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
}

.status-bar.error {
  color: var(--danger);
}

@media (max-width: 640px) {
  header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

/* Botão de abrir menu no header */
.btn-menu-toggle {
  border: none;
  background: transparent;
  color: #ffffff;
  font-size: 20px;
  cursor: pointer;
  margin-right: 12px;
}

/* Sidebar e overlay */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
  z-index: 90;
}

.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 260px;
  height: 100vh;
  background: #1f2933;
  color: #ffffff;
  transform: translateX(-100%);
  transition: transform 0.2s ease;
  z-index: 100;
  display: flex;
  flex-direction: column;
  padding: 16px 0;
}

.sidebar.active {
  transform: translateX(0);
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header span {
  font-weight: 600;
}

.sidebar-close {
  border: none;
  background: transparent;
  color: #ffffff;
  font-size: 20px;
  cursor: pointer;
}

.sidebar-nav {
  padding: 12px 0;
  overflow-y: auto;
  height: 100%;
}

.sidebar-group {
  margin-bottom: 16px;
}

.sidebar-group-title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.6);
  padding: 0 16px 4px;
}

.sidebar-group ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-group ul li a {
  display: block;
  padding: 8px 16px;
  color: #ffffff;
  text-decoration: none;
  font-size: 14px;
  border-radius: 4px;
}

.sidebar-group ul li a:hover {
  background: rgba(255,255,255,0.08);
}

/* Ajuste do main para não ficar colado no topo */
main {
  padding: 16px;
}
