@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Exo+2:wght@600;700;800&display=swap');

/* ===== Body / Background ===== */
.ponto-body {
  min-height: 100vh;
  background: linear-gradient(135deg, #080f18 0%, #0f1e2e 25%, #1a3448 55%, #2c5068 80%, #3e6b85 100%);
  font-family: 'Inter', sans-serif;
}

/* ===== Header ===== */
.ponto-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 15, 26, 0.55);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.ponto-header-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.ponto-header-logo img {
  height: 32px;
}

.ponto-header-user {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.83rem;
}

.ponto-logout-form {
  margin: 0;
}

.ponto-logout-btn {
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  color: rgba(255, 255, 255, 0.85) !important;
  padding: 0.3rem 0.9rem !important;
  border-radius: 6px;
  font-size: 0.8rem;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: background 0.2s;
}

.ponto-logout-btn:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  color: #fff !important;
}

/* ===== Main ===== */
.ponto-main {
  padding: 2rem 1rem 3rem;
}

/* ===== Glass Card ===== */
.ponto-card {
  max-width: 680px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: 1.5rem;
  box-shadow:
    0 20px 64px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  overflow: hidden;
}

.ponto-card-body {
  padding: 2rem;
}

/* ===== Employee Header ===== */
.ponto-employee-header {
  text-align: center;
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #edf0f3;
}

.ponto-employee-name {
  font-family: 'Exo 2', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #1a2332;
  margin-bottom: 0.25rem;
}

.ponto-employee-meta {
  color: #7a8a9a;
  font-size: 0.84rem;
  line-height: 1.6;
}

.ponto-clock-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.5rem;
  background: #eef4f8;
  border-radius: 20px;
  padding: 0.22rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #3e5d71;
}

/* ===== Punch Buttons ===== */
.punch-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.875rem;
  margin-bottom: 1.25rem;
}

.punch-btn {
  border: none;
  border-radius: 1rem;
  padding: 1.4rem 0.75rem;
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  font-family: 'Inter', sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  width: 100%;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
  letter-spacing: 0.1px;
}

.punch-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.3);
  filter: brightness(1.08);
}

.punch-btn:active {
  transform: translateY(0);
  filter: brightness(0.95);
}

.punch-btn i {
  font-size: 1.6rem;
}

.punch-btn-clock-in    { background: linear-gradient(150deg, #1b5e20 0%, #2e7d32 60%, #43a047 100%); }
.punch-btn-clock-out   { background: linear-gradient(150deg, #b71c1c 0%, #c62828 60%, #e53935 100%); }
.punch-btn-break-start { background: linear-gradient(150deg, #e65100 0%, #f4511e 60%, #ff7043 100%); }
.punch-btn-break-end   { background: linear-gradient(150deg, #0d47a1 0%, #1565c0 60%, #1e88e5 100%); }

/* ===== State Panels (camera, preview, processing, success, rejected) ===== */
.ponto-state-panel {
  background: #f5f7fa;
  border-radius: 1rem;
  padding: 1.5rem;
  text-align: center;
  margin-bottom: 1rem;
}

.ponto-state-panel video {
  border-radius: 0.75rem;
  max-height: 280px;
  max-width: 380px;
  width: 100%;
  object-fit: cover;
  margin-bottom: 1rem;
  background: #000;
}

.ponto-state-panel .preview-img {
  border-radius: 0.75rem;
  max-height: 280px;
  max-width: 380px;
  object-fit: cover;
  margin-bottom: 1rem;
}

/* ===== Today Events ===== */
.ponto-events {
  border-top: 1px solid #edf0f3;
}

.ponto-events-title {
  padding: 0.75rem 1.5rem 0.5rem;
  font-size: 0.69rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #9aacbb;
  background: #f8f9fb;
}

.ponto-event-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1.5rem;
  border-top: 1px solid #f0f2f5;
  background: #f8f9fb;
  font-size: 0.875rem;
}

.ponto-event-time {
  font-weight: 700;
  color: #1a2332;
  font-variant-numeric: tabular-nums;
  font-size: 0.875rem;
}

.ponto-empty-events {
  padding: 1.25rem 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: #9aacbb;
  background: #f8f9fb;
}

/* ===== Nav Links (desktop top nav + card footer links) ===== */
.ponto-nav-links {
  display: flex;
  gap: 0.625rem;
  justify-content: center;
  padding: 0.875rem 1.5rem;
  background: #eff2f5;
  border-top: 1px solid #e5e9ef;
}

.ponto-nav-link {
  font-size: 0.8rem;
  color: #5a7080;
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.875rem;
  border: 1px solid #cdd4db;
  border-radius: 6px;
  background: #fff;
  transition: border-color 0.15s, color 0.15s;
}

.ponto-nav-link:hover {
  border-color: #3e5d71;
  color: #3e5d71;
}

.ponto-nav-link.active {
  border-color: #1a3448;
  background: #1a3448;
  color: #fff;
}

.ponto-nav-link.active:hover {
  border-color: #0f1e2e;
  background: #0f1e2e;
  color: #fff;
}

/* ===== Mobile App Bottom Navigation ===== */
@media (max-width: 640px) {
  .ponto-nav-main {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 500;
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: stretch;
    gap: 0;
    padding: 0;
    padding-bottom: env(safe-area-inset-bottom);
    background: rgba(6, 15, 26, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.45);
    border-radius: 0;
  }

  .ponto-nav-main .ponto-nav-link {
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.18rem;
    padding: 0.6rem 0.1rem 0.55rem;
    font-size: 0.55rem;
    font-weight: 600;
    letter-spacing: 0px;
    text-transform: uppercase;
    border: none;
    border-radius: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    transition: color 0.15s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }

  .ponto-nav-main .ponto-nav-link i {
    font-size: 1.2rem;
    display: block;
    margin-bottom: 0.05rem;
  }

  .ponto-nav-main .ponto-nav-link:hover {
    color: rgba(255, 255, 255, 0.75);
    border-color: transparent;
    background: transparent;
  }

  .ponto-nav-main .ponto-nav-link.active {
    color: #4ade80;
    background: transparent;
    border-color: transparent;
  }

  .ponto-nav-main .ponto-nav-link.active:hover {
    color: #4ade80;
    background: transparent;
  }

  /* Dar espaço para o bottom nav fixo */
  .ponto-main {
    padding-bottom: 5.5rem;
  }

  /* Esconder footer no mobile — bottom nav substitui */
  .ponto-footer {
    display: none;
  }
}

/* ===== Section Header (solicitações, documentos, etc) ===== */
.ponto-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.ponto-section-title {
  font-family: 'Exo 2', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a2332;
  margin: 0;
}

/* ===== Generic Item List (solicitações, abonos) ===== */
.ponto-item-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border: 1px solid #edf0f3;
  border-radius: 0.875rem;
  overflow: hidden;
}

.ponto-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.875rem;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid #f0f2f5;
  background: #fff;
  transition: background 0.1s;
}

.ponto-item:last-child {
  border-bottom: none;
}

.ponto-item:hover {
  background: #f8f9fb;
}

.ponto-item-body {
  flex: 1;
  min-width: 0;
}

.ponto-item-title {
  font-weight: 600;
  font-size: 0.875rem;
  color: #1a2332;
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ponto-item-sub {
  font-size: 0.8rem;
  color: #7a8a9a;
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ponto-item-meta {
  font-size: 0.75rem;
  color: #9aacbb;
}

/* ===== Empty State ===== */
.ponto-empty-state {
  text-align: center;
  color: #9aacbb;
  padding: 3rem 1rem;
  font-size: 0.875rem;
}

/* ===== History Page ===== */
.ponto-history-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.ponto-history-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: #5a7080;
  text-decoration: none;
  border: 1px solid #cdd4db;
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
  background: #fff;
  transition: border-color 0.15s, color 0.15s;
  flex-shrink: 0;
}

.ponto-history-back:hover {
  border-color: #3e5d71;
  color: #3e5d71;
}

.ponto-history-title {
  font-family: 'Exo 2', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a2332;
  margin: 0;
}

.ponto-filter-card {
  background: #f8f9fb;
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  border: 1px solid #edf0f3;
}

.ponto-day-group {
  margin-bottom: 1rem;
}

.ponto-day-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #9aacbb;
  margin-bottom: 0.4rem;
  padding-left: 0.25rem;
}

.ponto-day-events {
  border: 1px solid #edf0f3;
  border-radius: 0.75rem;
  overflow: hidden;
}

.ponto-day-event {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid #f0f2f5;
  font-size: 0.875rem;
}

.ponto-day-event:last-child {
  border-bottom: none;
}

.ponto-history-empty {
  text-align: center;
  color: #9aacbb;
  padding: 3rem 1rem;
}

/* ===== Footer ===== */
.ponto-footer {
  text-align: center;
  padding: 1.5rem;
  color: rgba(255, 255, 255, 0.28);
  font-size: 0.73rem;
  font-family: 'Inter', sans-serif;
}

/* ===== Responsive ===== */
@media (max-width: 575px) {
  .ponto-main {
    padding: 1rem 0.5rem 2rem;
  }

  .ponto-card {
    border-radius: 1.25rem;
  }

  .ponto-card-body {
    padding: 1.25rem 1rem;
  }

  .ponto-employee-name {
    font-size: 1.35rem;
  }

  .ponto-clock-badge {
    font-size: 0.85rem;
    padding: 0.3rem 0.9rem;
  }

  .punch-grid {
    gap: 0.55rem;
  }

  .punch-btn {
    padding: 1.25rem 0.5rem;
    font-size: 0.85rem;
    border-radius: 0.875rem;
  }

  .punch-btn i {
    font-size: 1.6rem;
  }
}

/* ===== Session Timeout Overlay ===== */
.ponto-timeout-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.ponto-timeout-overlay.d-none {
  display: none !important;
}

.ponto-timeout-card {
  background: #fff;
  border-radius: 1rem;
  padding: 2rem 2.5rem;
  text-align: center;
  max-width: 360px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: ponto-timeout-in 0.2s ease;
}

@keyframes ponto-timeout-in {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}
