/* Reset e configurações globais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.h-100 {
    min-height: 100vh;
}

/* Estilo do relógio */
.clock-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 2rem;
    color: white;
    margin: 2rem 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.current-time {
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    margin-bottom: 0;
    line-height: 1.1;
    word-break: keep-all;
    white-space: nowrap;
}

.current-date {
    opacity: 0.9;
    font-weight: 300;
    line-height: 1.2;
}

/* Estilo do logotipo */
.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80px;
    margin-bottom: 1rem;
}

.logo-img {
    max-height: 120px;
    max-width: 100%;
    height: auto;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
    transition: all 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 6px 12px rgba(0,0,0,0.15));
}

.logo-fallback {
    display: block;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.logo-fallback:hover {
    opacity: 0.8;
}

/* Estilo do card principal */
.card {
    border: none;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.card-body {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 1rem;
}

/* Estilo dos inputs */
.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.input-group-text {
    border: none;
}

/* Botões customizados */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    border: none;
    border-radius: 12px;
}

.btn-danger {
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    border: none;
    border-radius: 12px;
}

/* Link do admin discreto */
.admin-link {
    margin-top: 2rem;
}

.admin-link a {
    transition: opacity 0.3s ease;
}

.admin-link a:hover {
    opacity: 1 !important;
}

/* Modais */
.modal-content {
    border: none;
    border-radius: 15px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.2);
}

.modal-header {
    border-bottom: none;
    border-radius: 15px 15px 0 0;
}

/* Responsividade */
@media (max-width: 1200px) {
    .current-time {
        font-size: 3.5rem !important;
        letter-spacing: 1px;
    }
}

@media (max-width: 992px) {
    .card-body {
        padding: 2rem !important;
    }
    
    .current-time {
        font-size: 3rem !important;
        letter-spacing: 1px;
    }
    
    .clock-container {
        padding: 1.8rem;
        margin: 1.5rem 0;
    }
    
    .display-4 {
        font-size: 2.5rem !important;
    }
}

@media (max-width: 768px) {
    .card-body {
        padding: 1.8rem !important;
    }
    
    .current-time {
        font-size: 2.5rem !important;
        letter-spacing: 0.5px;
    }
    
    .current-date {
        font-size: 1.1rem !important;
    }
    
    .clock-container {
        padding: 1.5rem;
        margin: 1rem 0;
    }
    
    .display-4 {
        font-size: 2rem !important;
    }
    
    .logo-img {
        max-height: 100px;
    }
    
    .logo-container {
        min-height: 60px;
        margin-bottom: 0.8rem;
    }
}

@media (max-width: 576px) {
    .current-time {
        font-size: 2rem !important;
        letter-spacing: 0px;
    }
    
    .current-date {
        font-size: 0.9rem !important;
    }
    
    .clock-container {
        padding: 1rem;
        margin: 0.8rem 0;
    }
    
    .card-body {
        padding: 1.2rem !important;
    }
    
    .display-4 {
        font-size: 1.8rem !important;
    }
    
    .logo-img {
        max-height: 80px;
    }
    
    .logo-container {
        min-height: 50px;
        margin-bottom: 0.5rem;
    }
    
    .logo-fallback i {
        font-size: 2rem !important;
    }
}

@media (max-width: 400px) {
    .current-time {
        font-size: 1.8rem !important;
    }
    
    .current-date {
        font-size: 0.8rem !important;
    }
    
    .clock-container {
        padding: 0.8rem;
    }
}

/* Animações */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.card {
    animation: fadeIn 0.5s ease-out;
}

/* Estilo para as tabelas do admin */
.table-responsive {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
}

.table {
    margin-bottom: 0;
}

.table thead th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.table tbody tr {
    transition: background-color 0.2s ease;
}

.table tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.05);
}

/* Badges customizados */
.badge-entrada {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    color: white;
}

.badge-saida {
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    color: white;
}

/* Modal Confirmar Registro + Resultado - fontes maiores */
#tipoModal.ponto-modal .modal-title {
    font-size: 1.5rem;
}
#tipoModal.ponto-modal .modal-body {
    font-size: 1.35rem;
}
#tipoModal.ponto-modal .modal-body .badge {
    font-size: 1.4rem !important;
    padding: 0.5rem 1rem;
}
#tipoModal.ponto-modal .modal-body p {
    font-size: 1.35rem;
}
#tipoModal.ponto-modal .modal-footer .btn {
    font-size: 1.2rem;
    padding: 0.6rem 1.5rem;
}

/* Resultado do ponto - fontes maiores, horário em destaque */
.ponto-resultado {
    font-size: 1.4rem;
}
.ponto-resultado h4 {
    font-size: 1.75rem;
}
.ponto-resultado-horario {
    font-size: 2.5rem !important;
    font-weight: 700 !important;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
}
.ponto-resultado .text-muted {
    font-size: 1rem;
}

/* Loading spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Alertas customizados */
.alert {
    border: none;
    border-radius: 12px;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
}

/* Teclado Virtual */
.virtual-keyboard {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1) 0%, rgba(248, 249, 250, 0.05) 100%);
    border-radius: 20px;
    padding: 1.5rem;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(102, 126, 234, 0.2);
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.keyboard-title {
    text-align: center;
}

.btn-keyboard {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid rgba(102, 126, 234, 0.3);
    color: #667eea;
    font-size: 1.8rem;
    font-weight: 700;
    height: 65px;
    border-radius: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 15px rgba(102, 126, 234, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    position: relative;
    overflow: hidden;
}

.btn-keyboard::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.btn-keyboard:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 8px 25px rgba(102, 126, 234, 0.3),
        0 4px 15px rgba(102, 126, 234, 0.2);
    border-color: transparent;
}

.btn-keyboard:hover::before {
    left: 100%;
}

.btn-keyboard:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.btn-keyboard-action {
    background: linear-gradient(145deg, #667eea 0%, #764ba2 100%);
    border: 2px solid transparent;
    color: white;
    font-size: 1.4rem;
    font-weight: 600;
    height: 65px;
    border-radius: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 15px rgba(102, 126, 234, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.btn-keyboard-action::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.btn-keyboard-action:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 8px 25px rgba(102, 126, 234, 0.4),
        0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-keyboard-action:hover::before {
    left: 100%;
}

.btn-keyboard-action:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* Animação para feedback visual */
@keyframes keyPress {
    0% { transform: scale(1); }
    50% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

.btn-keyboard.pressed,
.btn-keyboard-action.pressed {
    animation: keyPress 0.1s ease;
}

/* Responsividade do teclado */
@media (max-width: 992px) {
    .btn-keyboard {
        height: 60px;
        font-size: 1.6rem;
    }
    
    .btn-keyboard-action {
        height: 60px;
        font-size: 1.3rem;
    }
}

@media (max-width: 768px) {
    .virtual-keyboard {
        padding: 1.2rem;
        border-radius: 15px;
    }
    
    .btn-keyboard {
        height: 55px;
        font-size: 1.4rem;
        border-radius: 12px;
    }
    
    .btn-keyboard-action {
        height: 55px;
        font-size: 1.2rem;
        border-radius: 12px;
    }
}

@media (max-width: 576px) {
    .virtual-keyboard {
        padding: 1rem;
        border-radius: 12px;
    }
    
    .btn-keyboard {
        height: 50px;
        font-size: 1.2rem;
        border-radius: 10px;
        font-weight: 600;
    }
    
    .btn-keyboard-action {
        height: 50px;
        font-size: 1rem;
        border-radius: 10px;
    }
}

@media (max-width: 400px) {
    .virtual-keyboard {
        padding: 0.8rem;
    }
    
    .btn-keyboard {
        height: 45px;
        font-size: 1.1rem;
    }
    
    .btn-keyboard-action {
        height: 45px;
        font-size: 0.9rem;
    }
}
