/* Variáveis de cor para fácil manutenção */
:root {
  --primary-color: #0039ba;
  --secondary-color: #c80028;
  --background-glass: rgba(255, 255, 255, 0.15);
  --text-light: #000000;
  --text-dark: #212529;
  --shadow-light: rgba(0, 0, 0, 0.1);
  --shadow-hover: rgba(182, 182, 182, 0.4);
  --text-secondary_: #6c757d; 
  --color-light: #ffffff;
  --color-progress: #00f7ff;
}

/* ===== RESET E CONFIGURAÇÕES GERAIS ===== */
* {
  box-sizing: border-box;
}

body {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-light);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ===== LAYOUT PRINCIPAL ===== */
.container-fluid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem 3rem;
}

/* ===== HEADER E NAVBAR ===== */
header.nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--primary-color);
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-img {
  width: 82px;
  height: 62px;
  object-fit: contain;
  
}

.logo-text {
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0.05em;
  color: var(--text-light);
}

.logo-text span {
  color: var(--primary-color);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.user-details {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-details img,
.avatar-placeholder {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background-color: var(--primary-color);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.3rem;
  color: white;
  box-shadow: 0 2px 6px var(--shadow-light);
}

.user-name {
  font-weight: 600;
  font-size: 1.1rem;
  white-space: nowrap;
}

.logout-button {
  color: var(--text-light);
  font-size: 1.3rem;
  transition: color 0.3s ease;
}

.logout-button:hover {
  color: var(--primary-color);
}

/* ===== HEADER CARD ===== */
.header-card {
  background: var(--background-glass);
  backdrop-filter: blur(8px);
  border-radius: 12px;
  padding: 20px 25px;
  box-shadow: 0 8px 15px var(--shadow-light);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.foto-funcionario {
 
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--color-light);
  box-shadow: 0 4px 12px var(--shadow-hover);
  transition: transform 0.3s ease;
  
}

.foto-funcionario:hover {
  transform: scale(1.05);
}

.header-card h2 {
  font-weight: 700;
  font-size: 1.5rem;
  margin-bottom: 0.3rem;
  margin-left: 5px;
}

.header-card p {
  font-size: 1.1rem;
  letter-spacing: 0.02em;
  margin-left: 5px;
}

.header-card i {
  color: var(--primary-color);
  margin-left: 5px;
}

#currentTime {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--secondary-color);
  letter-spacing: 0.05em;
  margin-left: 5px;
}

/* ===== ANIVERSÁRIO ===== */
.aniversario-container {
  position: relative;
}

.alert-aniversario {
  background: linear-gradient(45deg, #ff005e, #ff793f);
  color: white;
  border-radius: 15px;
  font-weight: 600;
  box-shadow: 0 6px 15px #ff005e88;
  cursor: pointer;
  user-select: none;
  padding: 12px 18px;
  animation: float 4s ease-in-out infinite;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-5px); }
}

/* ===== BOTÃO REGISTRAR PONTO ===== */
.btn-ponto {
  background: var(--primary-color);
  border: none;
  color: white;
  font-weight: 700;
  padding: 12px 22px;
  font-size: 1.1rem;
  border-radius: 30px;
  box-shadow: 0 6px 12px var(--shadow-hover);
  transition: background-color 0.35s ease, box-shadow 0.35s ease;
}

.btn-ponto:disabled {
  background: #a0a0a0;
  box-shadow: none;
  cursor: not-allowed;
}

.btn-ponto:hover:not(:disabled) {
  background: #d71922;
  box-shadow: 0 6px 20px #d7192233;
}

.btn-ponto i {
  transition: transform 0.3s ease;
}

/* ===== CARDS GLASS EFFECT ===== */
.glass-card {
  background: var(--background-glass);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  box-shadow: 0 8px 30px var(--shadow-light);
  color: var(--text-light);
  border: none;
}

.glass-card h5 {
  font-weight: 700;
  color: var(--primary-color);
}

/* ===== REGISTROS HOJE ===== */
.registro-hoje {
  padding: 10px;
  border-radius: 10px;
  margin-bottom: 10px;
  background: rgba(255 255 255 / 0.1);
  transition: background-color 0.3s ease;
  cursor: default;
}

.registro-hoje:hover {
  background: rgba(179, 3, 26, 0.2);
}

.badge-tipo {
  background-color: var(--primary-color);
  color: white;
  font-weight: 600;
  border-radius: 16px;
  padding: 5px 12px;
  font-size: 0.9rem;
}

.status-indicator {
  width: 10px;
  height: 10px;
  border-radius: 100%;
  display: inline-block;
  margin-right: 6px;
  vertical-align: middle;
}

.status-online {
  background: #00ff7f;
  box-shadow: 0 0 8px #00ff7f77;
}

/* ===== FILTER CARD ===== */
.filter-card {
  background-color: var(--background-glass);
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 4px 24px var(--shadow-light);
}

.filter-card h5 {
  margin-bottom: 20px;
  font-weight: 700;
  color: var(--primary-color);
}

/* ===== FORMULÁRIOS ===== */
.form-label {
  color: var(--text-light);
  font-weight: 600;
}

.form-control, .form-select {
  border-radius: 8px;
  border: 1px solid #ccc;
  transition: border-color 0.3s ease;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 5px var(--primary-color);
  outline: none;
}

/* ===== TABELAS ===== */
table.table {
  color: var(--text-light);
}

thead.table-light {
  background: var(--primary-color);
  color: white;
}

tbody tr:hover {
  background: rgba(179, 3, 26, 0.15);
}

.badge.bg-success {
  background-color: #28a745 !important;
}

.badge.bg-warning {
  background-color: #ffc107 !important;
  color: #212529 !important;
}

.badge.bg-danger {
  background-color: #dc3545 !important;
}

.badge.bg-info {
  background-color: #17a2b8 !important;
}

.badge.bg-primary {
  background-color: #007bff !important;
}

/* ===== MODAL STYLES =====    (--background-glass)*/
.modal-content {
  background: 
    linear-gradient(90deg, 
      transparent 0%, 
      rgba(17, 17, 17, 0.02) 35%, 
      rgba(17, 17, 17, 0.05) 40%, 
      rgba(17, 17, 17, 0.02) 45%, 
      transparent 100%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(17, 17, 17, 0.01) 2px,
      rgba(17, 17, 17, 0.01) 4px
    ),
    #ffffff;
  background-size: 
    200% 100%,
    100% 100%,
    100% 100%;
  animation: scanner 8s linear infinite;
  backdrop-filter: blur(15px);
  border-radius: 15px;
  border: none;
  color: var(--text-dark);
}

@keyframes scanner {
  10% {
    background-position: -200% 0, 0 0, 0 0;
  }
  100% {
    background-position: 200% 0, 0 0, 0 0;
  }
}

.modal-header.bg-primary {
  background-color: var(--primary-color) !important;
  border-radius: 15px 15px 0 0;
  padding: 1rem 1.5rem;
}

.modal-title i {
  animation: pulse 1.2s infinite;
}

.modal-body {
  text-align: center;
  padding: 1.5rem;
}

/* Employee photo in modal */
.employee-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--color-light);
  margin-bottom: 0.1rem;
  box-shadow: 0 8px 16px rgba(218, 217, 217, 0.3);
}

.employee-photo.entrada-animation {
  animation: slideInFromLeft 1s ease forwards;
}

.employee-photo.almoco-animation {
  animation: slideInFromBottom 1s ease forwards;
}

.employee-photo.retorno-animation {
  animation: slideInFromRight 1s ease forwards;
}

.employee-photo.saida-animation {
  animation: zoomIn 1s ease forwards;
}

/* Typewriter effect - CORRIGIDO PARA MOBILE */
.typewriter-container {
  display: block;
  width: 100%;
  margin-top: 0.5rem;
}

.typewriter {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.96rem;
  color: var(--primary-color);
  white-space: normal;
  overflow: visible;
  text-align: center;
  width: 100%;
  display: inline-block;
  border-right: 2px solid var(--primary-color);
  animation: typing 3s steps(40, end) forwards, blink-caret 0.75s step-end infinite;
}

/* Modal text elements */
.employee-name {
  font-size: 1.3rem;
  
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.employee-id {
  font-size: 0.9rem;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.confirmation-text {
  font-size: 1rem;
  font-weight: 500;
  margin: 1.5rem 0;
}

.btn-confirm {
  padding: 0.75rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
}

/* Info cards no modal */
.info-card {
  margin-bottom: 1rem;
}

.info-card .alert {
  border-radius: 10px;
  border: none;
  margin-bottom: 0.5rem;
}

/* ===== DISPLAY DIGITAL AVANÇADO ===== */
.digital-clock-wrapper {
 
  
  border-radius: 12px !important;
  padding: 15px !important;
}

.digital-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  position: relative;
}

.digital-clock-icon {
  color: #0532f7;
  font-size: 1.4rem;
  text-shadow: 0 0 10px #00f7ff;
}

.digital-time {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.digital-clock {
  font-family: 'Digital-7', 'Segment7', 'Courier New', monospace;
  font-size: 2.2rem;
  font-weight: 700;
  color: #0039ba;
  text-shadow: 
    0 0 5px #30f5fccc,
    0 0 10px #30f5fccc,
    0 0 15px #30f5fccc;
  letter-spacing: 3px;
 
  padding: 8px 16px;
  border-radius: 8px;
 
  position: relative;
  overflow: hidden;
}

.digital-clock::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(0, 238, 255, 0.2) 50%, 
    transparent 100%);
  animation: digital-scan 3s linear infinite;
}

@keyframes digital-scan {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

.clock-label {
  font-size: 0.7rem;
  color: #0039ba;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.8;
}

/* Efeito de brilho pulsante */
.digital-clock {
  animation: digital-pulse 2s ease-in-out infinite alternate;
}

@keyframes digital-pulse {
  0% {
    box-shadow: 
      0 0 5px #30f5fccc,
      inset 0 0 5px #0164d620;
  }
  100% {
    box-shadow: 
      0 0 15px #30f5fccc,
      0 0 25px #0077ff40,
      inset 0 0 10px #008cff30;
  }
}

.registro-type {
  font-weight: 600;
  color: var(--primary-color);
}

/* ===== ANIMAÇÕES ===== */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

@keyframes slideInFromLeft {
  0% {
    opacity: 0;
    transform: translateX(-50px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInFromBottom {
  0% {
    opacity: 0;
    transform: translateY(50px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInFromRight {
  0% {
    opacity: 0;
    transform: translateX(50px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes zoomIn {
  0% {
    opacity: 0;
    transform: scale(0.7);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blink-caret {
  from, to { border-color: transparent; }
  50% { border-color: var(--primary-color); }
}

/* ===== CONFITTI INFINITE ANIMATIONS ===== */
@keyframes confetti-fall {
  0% {
    transform: translateY(-100px) translateX(0) rotate(0deg);
    opacity: 1;
  }
  50% {
    transform: translateY(50vh) translateX(100px) rotate(180deg);
    opacity: 0.8;
  }
  100% {
    transform: translateY(100vh) translateX(200px) rotate(360deg);
    opacity: 0;
  }
}

@keyframes confetti-float {
  0%, 100% {
    transform: translateY(-100px) translateX(0) rotate(0deg);
  }
  25% {
    transform: translateY(25vh) translateX(50px) rotate(90deg);
  }
  50% {
    transform: translateY(50vh) translateX(-30px) rotate(180deg);
  }
  75% {
    transform: translateY(75vh) translateX(70px) rotate(270deg);
  }
  100% {
    transform: translateY(100vh) translateX(0) rotate(360deg);
  }
}

@keyframes confetti-fall-modal {
  0% {
    transform: translateY(-20px) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(200px) rotate(360deg);
    opacity: 0;
  }
}

.confetti {
  position: fixed;
  top: -100px;
  pointer-events: none;
  z-index: 9998;
  animation: confetti-fall linear infinite;
  opacity: 0.9;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.confetti-particle {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 3px;
  opacity: 0.85;
  pointer-events: none;
  z-index: 9999;
}

/* Variações de formas e tamanhos */
.confetti.rectangle {
  width: 12px;
  height: 6px;
  border-radius: 2px;
}

.confetti.circle {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.confetti.triangle {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  background: transparent !important;
}

/* Garantir que o modal content tenha position relative */
.modal-content {
  position: relative;
  overflow: hidden;
}

/* Adicionar variações na animação para confettis pares/ímpares */
.confetti:nth-child(odd) {
  animation: confetti-float linear infinite;
}

.confetti:nth-child(3n) {
  animation-duration: 8s !important;
}

.confetti:nth-child(3n+1) {
  animation-duration: 6s !important;
}

.confetti:nth-child(3n+2) {
  animation-duration: 7s !important;
}

/* ===== PROGRESS BAR ===== */
.progress-bar-timer {
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--color-progress));
  border-radius: 0 0 15px 15px;
  animation: progressShrink 5s linear forwards;
}

@keyframes progressShrink {
  from { width: 100%; }
  to { width: 0%; }
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */

/* Tablets */
@media (max-width: 991px) {
  .header-card {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem;
  }
  
  .header-card .col-md-6, 
  .header-card .col-md-4, 
  .header-card .col-md-2 {
    flex: 1 1 100%;
    max-width: 100%;
  }
  
  .user-info {
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .logo-text {
    font-size: 1.3rem;
  }
  
  .header-card h2 {
    font-size: 1.7rem;
  }
}

/* Mobile */
@media (max-width: 576px) {
  .container-fluid {
    padding: 0.75rem 1rem 2rem;
  }
  
  /* Header mobile */
  header.nav-bar {
    flex-direction: column;
    gap: 15px;
    padding-bottom: 15px;
  }
  
  .logo-link {
    justify-content: center;
  }
  
  .user-info {
    width: 100%;
    justify-content: space-between;
  }
  
  /* Header card mobile */
  .header-card {
    padding: 1.25rem;
    margin-bottom: 1.5rem;
  }
  
  .foto-funcionario {
    max-width: 120px;
    height: 120px;
  }
  
  .header-card h2 {
    font-size: 1.5rem;
  }
  
  .header-card p {
    font-size: 1rem;
  }
  
  /* Botão registrar ponto mobile */
  .btn-ponto {
    width: 100%;
    font-size: 1rem;
    padding: 12px 20px;
    margin-top: 0.5rem;
  }
  
  /* Modal mobile adjustments */
  .modal-dialog {
    max-width: 95%;
    margin: 1rem auto 0 auto !important;
    align-items: flex-start !important;
  }
  
  .modal-content {
    margin-top: 1rem;
    height: 700px;
  }
  
  .modal-header.bg-primary {
    padding: 0.75rem 1rem;
  }
  
  .modal-title {
    font-size: 0.85rem;
  }
  
  .modal-body {
    padding: 1rem;
  }
  
  .employee-photo {
    width: 90px;
    height: 90px;
    margin-bottom: 0.75rem;
  }
  
  .employee-name {
    font-size: 1.1rem;
    color: #0f0f0f;
  }
  
  .employee-id {
    font-size: 0.8rem;
    color: #292929;
  }
  
  /* Typewriter mobile fix */
  .typewriter {
    font-size: 0.9rem;
    white-space: normal;
    line-height: 1.4;
    border-right: none;
    animation: none;
  }
  
  .typewriter-container {
    margin-top: 0.75rem;
  }
  
  .info-card .alert {
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
  }
  
  .confirmation-text {
    font-size: 0.9rem;
    margin-bottom: 1rem;
  }
  
  .btn-confirm {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 0.95rem;
    margin-bottom: 30px;
  }
  
  /* Table mobile */
  .table-responsive {
    font-size: 0.85rem;
  }
  
  .badge-tipo {
    font-size: 0.8rem;
    padding: 4px 10px;
  }
}

/* Mobile muito pequeno */
@media (max-width: 360px) {
  .modal-dialog {
    max-width: 98%;
    margin: 0.5rem auto !important;
  }
  
  .employee-photo {
   
    width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid var(--color-light);
  box-shadow: 0 6px 14px var(--shadow-hover);
  transition: transform 0.3s ease;
  }
  
  .typewriter {
    font-size: 0.75rem;
  }
  
  .logo-text {
    font-size: 1.1rem;
  }
  
  .user-name {
    font-size: 1rem;
  }
  
  .header-card {
    padding: 1rem;
  }
  
  .foto-funcionario {
    max-width: 100px;
    height: 100px;
  }
}

/* Acessibilidade - Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}