/* ═══════════════════════════════════════════════════════════════
   GainFlow - Fluxo de Trabalho Integrado
   main.css v2 — Bold UI: gradients, pill buttons, card accents
   ═══════════════════════════════════════════════════════════════ */

/* ── Variáveis de design ──────────────────────────────────────── */
:root {
  /* Paleta principal */
  --cor-primaria:       #2563EB;
  --cor-primaria-hover: #1D4ED8;
  --cor-primaria-light: #EFF6FF;
  --cor-logo-verde:     #00e5c0;
  --cor-secundaria:     #334155;

  /* Gradientes */
  --grad-primario:      linear-gradient(135deg, #2563EB 0%, #6366F1 100%);
  --grad-sidebar:       linear-gradient(180deg, #0F172A 0%, #1E1B4B 60%, #1e3a5f 100%);
  --grad-header:        linear-gradient(90deg, #1E293B 0%, #1e3a5f 100%);

  /* Fundo e superfície */
  --cor-fundo:          #F1F5F9;
  --cor-superfice:      #ffffff;
  --cor-borda:          #E2E8F0;

  /* Texto */
  --cor-texto:          #0F172A;
  --cor-texto-suave:    #64748B;

  /* Status */
  --cor-erro:           #DC2626;
  --cor-erro-light:     #FEF2F2;
  --cor-sucesso:        #16A34A;
  --cor-sucesso-light:  #F0FDF4;
  --cor-aviso:          #D97706;
  --cor-aviso-light:    #FFFBEB;

  /* Ponto - status */
  --cor-entrada:        #16A34A;
  --cor-pausa:          #D97706;
  --cor-saida:          #DC2626;

  /* Tipografia */
  --fonte:              'Inter', system-ui, -apple-system, sans-serif;
  --fonte-heading:      'Poppins', system-ui, sans-serif;
  --tamanho-base:       1rem;

  /* Bordas e sombras */
  --raio-borda:         0.875rem;
  --raio-pill:          9999px;
  --sombra:             0 1px 4px rgba(0,0,0,.07), 0 4px 16px rgba(0,0,0,.05);
  --sombra-media:       0 4px 16px rgba(0,0,0,.10), 0 1px 4px rgba(0,0,0,.06);
  --sombra-elevada:     0 12px 32px rgba(0,0,0,.14), 0 2px 8px rgba(0,0,0,.08);
  --sombra-cor:         0 4px 14px rgba(37,99,235,.35);

  /* Layout */
  --largura-sidebar:    256px;
  --altura-header:      64px;
}

/* ── Reset básico ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--fonte);
  font-size: var(--tamanho-base);
  color: var(--cor-texto);
  background: var(--cor-fundo);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--cor-primaria); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

/* ── Tipografia ───────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--fonte-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--cor-texto);
}
h1 { font-size: 1.875rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.125rem; }
h4 { font-size: 1rem; }

/* ── Componentes: Botões ──────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .5rem 1.375rem;
  border: none;
  border-radius: var(--raio-pill);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 200ms ease, box-shadow 200ms ease, transform 150ms ease, opacity 200ms ease;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: .01em;
}
.btn:active { transform: scale(.97); }
.btn:focus-visible {
  outline: 2px solid var(--cor-primaria);
  outline-offset: 3px;
}

.btn-primario {
  background: var(--grad-primario);
  color: #fff;
  box-shadow: var(--sombra-cor);
}
.btn-primario:hover {
  box-shadow: 0 6px 20px rgba(37,99,235,.45);
  opacity: .92;
  text-decoration: none;
}

.btn-secundario {
  background: var(--cor-superfice);
  color: var(--cor-secundaria);
  border: 1.5px solid var(--cor-borda);
  box-shadow: var(--sombra);
}
.btn-secundario:hover {
  background: var(--cor-fundo);
  border-color: #CBD5E1;
  text-decoration: none;
}

.btn-perigo {
  background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(220,38,38,.30);
}
.btn-perigo:hover { opacity: .88; text-decoration: none; }

.btn-bloco { width: 100%; }

.btn-lg {
  padding: .75rem 2rem;
  font-size: 1rem;
}

/* ── Componentes: Formulário ──────────────────────────────────── */
.campo-grupo { display: flex; flex-direction: column; gap: .4rem; }

label {
  font-size: .875rem;
  font-weight: 600;
  color: var(--cor-secundaria);
  letter-spacing: .01em;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="time"],
select,
textarea {
  width: 100%;
  padding: .6rem .875rem;
  border: 1.5px solid var(--cor-borda);
  border-radius: .625rem;
  font-size: .9375rem;
  color: var(--cor-texto);
  background: var(--cor-superfice);
  transition: border-color 200ms ease, box-shadow 200ms ease;
  outline: none;
  font-family: var(--fonte);
}
input[type="text"]:hover, select:hover, textarea:hover {
  border-color: #CBD5E1;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--cor-primaria);
  box-shadow: 0 0 0 3px rgba(37,99,235,.18);
}
input.erro { border-color: var(--cor-erro); }

/* ── Componentes: Alertas ─────────────────────────────────────── */
.alerta {
  padding: .875rem 1.125rem;
  border-radius: .75rem;
  font-size: .9rem;
  border-left: 4px solid;
  font-weight: 500;
}
.alerta-erro   { background: var(--cor-erro-light);    border-color: var(--cor-erro);    color: #991B1B; }
.alerta-sucesso{ background: var(--cor-sucesso-light); border-color: var(--cor-sucesso); color: #166534; }
.alerta-aviso  { background: var(--cor-aviso-light);   border-color: var(--cor-aviso);   color: #92400E; }
.alerta-info   { background: var(--cor-primaria-light);border-color: var(--cor-primaria);color: #1E40AF; }

/* ── Layout: Página de login ──────────────────────────────────── */
.pagina-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0F172A 0%, #1E1B4B 50%, #0F172A 100%);
  padding: 1.5rem;
}

.card-login {
  background: rgba(255,255,255,.97);
  border-radius: 1.25rem;
  box-shadow: 0 24px 48px rgba(0,0,0,.30), 0 8px 16px rgba(0,0,0,.15);
  padding: 2.5rem 2.25rem;
  width: 100%;
  max-width: 380px;
}

.card-login .marca {
  text-align: center;
  margin-bottom: 2rem;
}

.card-login .marca h1 {
  font-size: 1.375rem;
  color: var(--cor-primaria);
}

.card-login .marca p {
  font-size: .85rem;
  color: var(--cor-texto-suave);
  margin-top: .25rem;
}

.form-login { display: flex; flex-direction: column; gap: 1.25rem; }

.pagina-login .btn-primario {
  background: linear-gradient(135deg, #0F172A 0%, #1E1B4B 100%);
  box-shadow: 0 4px 14px rgba(15,23,42,.40);
}
.pagina-login .btn-primario:hover { box-shadow: 0 6px 20px rgba(15,23,42,.50); }
.pagina-login input:focus, .pagina-login select:focus {
  border-color: #1E1B4B;
  box-shadow: 0 0 0 3px rgba(30,27,75,.15);
}

/* ── Autocomplete de usuário ──────────────────────────────────── */
.autocomplete-wrap { position: relative; }

.autocomplete-lista {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: var(--cor-superfice);
  border: 1.5px solid var(--cor-borda);
  border-radius: .75rem;
  box-shadow: var(--sombra-elevada);
  list-style: none;
  margin: 0;
  padding: .35rem 0;
  z-index: 999;
  max-height: 240px;
  overflow-y: auto;
}

.autocomplete-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem 1rem;
  cursor: pointer;
  transition: background 150ms ease;
}
.autocomplete-item:hover, .autocomplete-item--foco { background: var(--cor-fundo); }

.ac-avatar {
  width: 2.1rem; height: 2.1rem;
  border-radius: 50%;
  background: var(--grad-primario);
  color: #fff;
  font-size: .75rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.ac-avatar--img {
  width: 2.1rem; height: 2.1rem;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.ac-info { display: flex; flex-direction: column; line-height: 1.3; }
.ac-info strong { font-size: .9rem; color: var(--cor-texto); }
.ac-info small  { font-size: .75rem; color: var(--cor-texto-suave); }

/* ── Teclado numérico PIN ───────────────────────────────────────  */
.pin-display {
  display: flex; justify-content: center;
  gap: .9rem; padding: .75rem 0 .25rem;
}

.pin-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--cor-borda);
  border: 2px solid #CBD5E1;
  transition: background .15s, border-color .15s, transform .1s;
}
.pin-dot--ativo {
  background: #1E1B4B;
  border-color: #1E1B4B;
  transform: scale(1.15);
}

.teclado-numerico {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .55rem;
  margin-top: .5rem;
}

.tecla {
  display: flex; align-items: center; justify-content: center;
  height: 3.4rem;
  font-size: 1.35rem; font-weight: 600;
  border: 1.5px solid var(--cor-borda);
  border-radius: .75rem;
  background: var(--cor-superfice);
  color: var(--cor-texto);
  cursor: pointer; user-select: none;
  transition: background 150ms ease, transform 80ms ease, border-color 150ms ease, box-shadow 150ms ease;
  -webkit-tap-highlight-color: transparent;
}
.tecla:hover { background: var(--cor-fundo); border-color: #94A3B8; box-shadow: var(--sombra); }
.tecla:active { transform: scale(.91); background: #E2E8F0; }

.tecla-apagar { font-size: 1.2rem; color: #c0392b; border-color: #FECACA; }
.tecla-apagar:hover { background: #FEF2F2; border-color: #DC2626; }

.tecla-entrar {
  font-size: 1.4rem;
  background: linear-gradient(135deg, #0F172A 0%, #1E1B4B 100%);
  color: #fff; border-color: #0F172A;
  box-shadow: 0 4px 10px rgba(15,23,42,.30);
}
.tecla-entrar:hover:not(:disabled) { opacity: .88; }
.tecla-entrar:disabled { opacity: .35; cursor: not-allowed; }

/* ── Layout: App com sidebar ──────────────────────────────────── */
.app-layout { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
  width: var(--largura-sidebar);
  background: var(--grad-sidebar);
  color: #f8fafc;
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
  box-shadow: 4px 0 24px rgba(0,0,0,.25);
}

.sidebar-marca {
  padding: 1.375rem 1.125rem;
  font-size: 1rem; font-weight: 700; color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.sidebar-nav {
  flex: 1;
  padding: .875rem .625rem;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .6rem 1rem;
  position: relative;
  color: #94A3B8;
  font-size: .9rem;
  font-weight: 500;
  transition: background 200ms ease, color 200ms ease, transform 150ms ease;
  text-decoration: none;
  border-radius: .625rem;
  margin-bottom: .125rem;
}

.sidebar-nav a::before {
  content: "";
  width: 1rem; height: 1rem;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: .25rem;
  flex-shrink: 0;
  opacity: 0; transform: scale(.85);
  transition: opacity 200ms ease, transform 200ms ease;
}

.sidebar-nav a:hover {
  background: rgba(255,255,255,.08);
  color: #E2E8F0;
  text-decoration: none;
}

.sidebar-nav a.ativo {
  background: linear-gradient(135deg, rgba(37,99,235,.5) 0%, rgba(99,102,241,.4) 100%);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1);
}

.sidebar-nav a.ativo::before {
  content: "✓";
  background: var(--cor-logo-verde);
  color: #05332c;
  font-size: .72rem; font-weight: 900;
  opacity: 1; transform: scale(1);
  box-shadow: 0 0 0 2px rgba(0,229,192,.25);
}

.sidebar-rodape {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: .825rem;
  color: #64748B;
  font-weight: 500;
}

/* Conteúdo principal */
.conteudo-principal {
  margin-left: var(--largura-sidebar);
  flex: 1;
  display: flex; flex-direction: column;
  min-height: 100vh;
}

.header-app {
  height: var(--altura-header);
  background: var(--cor-superfice);
  border-bottom: 1px solid var(--cor-borda);
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 0 1.75rem;
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 1px 8px rgba(0,0,0,.06);
}

.header-app strong {
  font-family: var(--fonte-heading);
  font-size: 1.05rem;
  color: var(--cor-texto);
  font-weight: 700;
}

.header-usuario {
  display: flex; align-items: center;
  gap: .75rem;
  font-size: .875rem;
  color: var(--cor-secundaria);
  font-weight: 500;
}

.pagina { padding: 2rem 1.75rem; flex: 1; }
.pagina-titulo { margin-bottom: 1.75rem; }

/* ── Componentes: Card ────────────────────────────────────────── */
.card {
  background: var(--cor-superfice);
  border: 1px solid var(--cor-borda);
  border-radius: var(--raio-borda);
  box-shadow: var(--sombra);
  padding: 1.625rem;
  transition: box-shadow 250ms ease, transform 250ms ease;
}
.card:hover { box-shadow: var(--sombra-media); }

/* Accent bar no topo dos cards */
.card-titulo {
  font-family: var(--fonte-heading);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.125rem;
  padding-bottom: .875rem;
  border-bottom: 2px solid var(--cor-fundo);
  color: var(--cor-texto);
  letter-spacing: -.01em;
}

/* ── Componentes: Grid de cards ───────────────────────────────── */
.grid-cards {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

/* Cards de stats com borda colorida */
.grid-cards .card {
  border-top: 3px solid var(--cor-primaria);
  padding-top: 1.375rem;
}
.grid-cards .card:nth-child(2) { border-top-color: #6366F1; }
.grid-cards .card:nth-child(3) { border-top-color: var(--cor-sucesso); }
.grid-cards .card:nth-child(4) { border-top-color: var(--cor-aviso); }
.grid-cards .card:nth-child(5) { border-top-color: var(--cor-erro); }

/* ── Componentes: Tabela ──────────────────────────────────────── */
.tabela-wrapper { overflow-x: auto; border-radius: .625rem; }

table { width: 100%; border-collapse: collapse; font-size: .9rem; }

thead th {
  background: linear-gradient(0deg, var(--cor-fundo) 0%, #F8FAFC 100%);
  text-align: left;
  padding: .75rem 1rem;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--cor-texto-suave);
  border-bottom: 2px solid var(--cor-borda);
}

tbody tr {
  border-bottom: 1px solid #F1F5F9;
  transition: background 150ms ease, box-shadow 150ms ease;
}
tbody tr:nth-child(even) { background: #FAFBFC; }
tbody tr:hover { background: #EFF6FF; }
tbody td { padding: .8rem 1rem; }

/* ── Componentes: Badge ───────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: .25rem .65rem;
  border-radius: var(--raio-pill);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .03em;
}
.badge-verde   { background: #DCFCE7; color: #15803D; }
.badge-cinza   { background: #F1F5F9; color: #475569; }
.badge-vermelho{ background: #FEE2E2; color: #B91C1C; }
.badge-azul    { background: var(--cor-primaria-light); color: #1D4ED8; }
.badge-amarelo { background: #FEF9C3; color: #A16207; }
.badge-laranja { background: #FFEDD5; color: #9A3412; }

/* ── Ponto: Botão grande de registro ─────────────────────────── */
.btn-ponto {
  padding: 1.25rem 2rem;
  font-size: 1.2rem;
  font-weight: 700;
  border-radius: 1rem;
  letter-spacing: .03em;
  box-shadow: var(--sombra-media);
  border: none;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 200ms ease, opacity 200ms ease;
  width: 100%; max-width: 320px;
  display: block; margin: 0 auto;
  text-align: center; color: #fff;
}
.btn-ponto:active { transform: scale(.96); }
.btn-ponto:hover  { opacity: .92; box-shadow: var(--sombra-elevada); }

.btn-ponto-entrada { background: linear-gradient(135deg, #16A34A 0%, #15803D 100%); box-shadow: 0 4px 14px rgba(22,163,74,.35); }
.btn-ponto-pausa   { background: linear-gradient(135deg, #D97706 0%, #B45309 100%); box-shadow: 0 4px 14px rgba(217,119,6,.35); }
.btn-ponto-retorno { background: var(--grad-primario); box-shadow: var(--sombra-cor); }
.btn-ponto-saida   { background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%); box-shadow: 0 4px 14px rgba(220,38,38,.35); }

.relogio-ponto {
  font-size: 3.25rem;
  font-family: var(--fonte-heading);
  font-weight: 700;
  text-align: center;
  letter-spacing: .04em;
  color: var(--cor-texto);
  margin: 1rem 0;
}

/* ── Tela de ponto: refinamentos sutis de consistência visual ───────────── */
.ponto-hero-card { overflow: hidden; }
.ponto-data-atual {
  font-size: .9rem;
  font-weight: 500;
  letter-spacing: .01em;
  margin-bottom: .35rem;
}
.ponto-agora {
  margin-top: .25rem;
  margin-bottom: 1rem;
  color: #94A3B8;
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .03em;
}
.ponto-agora-inativo { margin-bottom: .5rem; }
.ponto-status-label {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: .35rem;
}
.ponto-cronometro-hero {
  font-size: 3.75rem;
  font-family: var(--fonte-heading);
  font-weight: 700;
  letter-spacing: .05em;
  line-height: 1;
  margin: .1rem 0 .5rem;
  font-variant-numeric: tabular-nums;
}
.ponto-page .btn-ponto {
  font-family: var(--fonte);
  line-height: 1.2;
}
.ponto-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1rem 1.5rem;
  align-items: start;
}
.ponto-meta-item {
  min-width: 0;
  text-align: left;
}
.ponto-meta-label {
  display: block;
  margin-bottom: .22rem;
  font-size: .78rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.ponto-meta-valor {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--cor-texto);
  font-variant-numeric: tabular-nums;
}
.ponto-meta-item-projetos { grid-column: 1 / -1; }
.ponto-projetos-lista {
  list-style: none;
  margin: .35rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.ponto-projeto-item {
  position: relative;
  padding-left: .9rem;
  text-align: left;
  font-size: .95rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--cor-texto);
}
.ponto-projeto-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: .58rem;
  width: .38rem;
  height: .38rem;
  border-radius: 999px;
  background: #93C5FD;
}
.ponto-modal-card { border: 1px solid #E5E7EB; }
.ponto-modal-titulo {
  margin: 0 0 .25rem;
  color: #1A1F2E;
  font-size: 1.05rem;
  font-family: var(--fonte-heading);
  font-weight: 700;
  flex-shrink: 0;
}
.ponto-modal-descricao {
  margin: 0 0 1rem;
  color: #6B7280;
  font-size: .88rem;
  line-height: 1.5;
  flex-shrink: 0;
}
.ponto-projeto-selecao-lista {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  padding-right: .25rem;
}
.ponto-projeto-opcao {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  cursor: pointer;
  padding: .7rem .8rem;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  transition: background 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
  text-align: left;
}
.ponto-projeto-opcao:hover {
  background: #F8FAFC;
  border-color: #CBD5E1;
}
.ponto-projeto-checkbox {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: #2563EB;
  cursor: pointer;
  margin-top: .15rem;
  flex: 0 0 auto;
}
.ponto-projeto-opcao-nome {
  font-size: .95rem;
  font-weight: 500;
  line-height: 1.45;
  color: #1A1F2E;
}

/* ── Utilitários ──────────────────────────────────────────────── */
.mt-1 { margin-top: .25rem; }
.mt-2 { margin-top: .5rem; }
.mt-3 { margin-top: .75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .25rem; }
.mb-2 { margin-bottom: .5rem; }
.mb-4 { margin-bottom: 1rem; }
.text-center { text-align: center; }
.text-suave { color: var(--cor-texto-suave); font-size: .875rem; }
.oculto { display: none !important; }

/* ── Botões de ponto múltiplos ────────────────────────────────── */
.botoes-ponto-multi > * { flex: 1; min-width: 0; }
.botoes-ponto-multi form .btn-ponto,
.botoes-ponto-multi > .btn-ponto { max-width: none; width: 100%; }

/* ── Menu mobile: botão hambúrguer ───────────────────────────── */
.btn-menu-mobile {
  display: none;
  background: none; border: none;
  cursor: pointer; padding: .4rem .5rem;
  color: var(--cor-texto);
  font-size: 1.4rem; line-height: 1;
  border-radius: .5rem;
  transition: background 150ms ease;
  flex-shrink: 0;
}
.btn-menu-mobile:hover { background: var(--cor-fundo); }

/* Overlay mobile */
.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.55); z-index: 99;
}
.sidebar-overlay.visivel { display: block; }

/* ── Responsividade: tablet e celular ─────────────────────────── */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform .28s cubic-bezier(.4,0,.2,1);
    z-index: 200;
  }
  .sidebar.aberta { transform: translateX(0); }
  .conteudo-principal { margin-left: 0; }
  .btn-menu-mobile { display: flex; align-items: center; }
  .header-app { padding: 0 1rem; gap: .5rem; }
  .header-app strong { font-size: .875rem; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .header-usuario span { display: none; }
  .pagina { padding: 1.125rem 1rem; }
  .grid-cards { grid-template-columns: repeat(2, 1fr) !important; }
  table { font-size: .8rem; }
  thead th { padding: .55rem .65rem; font-size: .7rem; }
  tbody td { padding: .6rem .65rem; }
  .btn-ponto { max-width: 100%; font-size: 1.1rem; padding: 1.1rem 1.5rem; }
  .botoes-ponto-multi { flex-direction: column !important; align-items: stretch !important; gap: .75rem !important; }
  .relogio-ponto { font-size: 2.5rem; }
  .card { padding: 1.25rem; }
  .card-login { padding: 2rem 1.25rem; }
  .form-acoes-linha { flex-direction: column !important; align-items: stretch !important; }
  .form-acoes-linha .btn { width: 100%; justify-content: center; }
  .pagina-titulo { flex-direction: column !important; align-items: flex-start !important; gap: .75rem; }
  .pagina-titulo .btn { width: 100%; justify-content: center; }
}

/* ── Responsividade: celular pequeno (< 480px) ────────────────── */
@media (max-width: 480px) {
  html { font-size: 15px; }
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.2rem; }
  .grid-cards { grid-template-columns: 1fr 1fr !important; }
  .modal-conteudo-mobile { width: 97% !important; padding: 1.25rem !important; }
  .ponto-meta-grid { grid-template-columns: 1fr; gap: .9rem; }
  .ponto-cronometro-hero { font-size: 3.1rem; }
  .ponto-projeto-opcao { padding: .65rem .75rem; }
  .tecla { height: 3.8rem; font-size: 1.5rem; }
  tbody td { word-break: break-word; max-width: 120px; }
}

/* ── Acessibilidade: animação reduzida ────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}
