/* Estilos customizados para o Hub de Ferramentas */

/* Animações suaves */
.transition-all {
    transition: all 0.3s ease;
}

/* Cards hover effect */
.card-hover {
    transition: transform 0.2s, box-shadow 0.2s;
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Input focus styles */
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Resultado panel */
.result-panel {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: white;
}

.result-panel-light {
    background: #f8fafc;
}

/* Accordion */
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-content.open {
    max-height: 500px;
}

/* Loading spinner */
.spinner {
    border: 3px solid #f3f4f6;
    border-top: 3px solid #2563eb;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Skeleton loading animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: .5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Wizard Steps */
.step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #e5e7eb;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s;
    margin-bottom: 8px;
}

.step-indicator.active .step-number {
    background-color: #2563eb;
    color: white;
}

.step-indicator.completed .step-number {
    background-color: #10b981;
    color: white;
}

.step-label {
    font-size: 12px;
    color: #6b7280;
    text-align: center;
    font-weight: 500;
}

.step-indicator.active .step-label {
    color: #2563eb;
    font-weight: 600;
}

.step-line {
    flex: 1;
    height: 2px;
    background-color: #e5e7eb;
    margin: 0 8px;
    margin-top: -20px;
    margin-bottom: 20px;
}

.step-content {
    display: block;
}

.step-content.hidden {
    display: none;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
}

/* CTA Sticky Mobile */
#mobile-cta {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Ajusta padding do main quando CTA sticky está visível */
@media (max-width: 768px) {
    main {
        padding-bottom: 80px; /* Espaço para o CTA sticky */
    }
}

/* Header / Topbar - Fallback (caso Tailwind não carregue) */
header {
    background-color: #fff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

header .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

header .flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Tool cards - melhorias visuais */
.tool-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

/* Hero section - animação suave */
.hero {
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Melhorias de acessibilidade */
.tool-card:focus-within {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Estilos para Cartão Ponto (visualização na tela) */
.timesheet-preview {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 10pt;
    line-height: 1.4;
    color: #000;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    max-width: 900px;
    margin: 0 auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
}

.timesheet-preview .timesheet-header {
    text-align: center;
    margin-bottom: 20px;
}

.timesheet-preview .timesheet-title {
    font-size: 18pt;
    font-weight: bold;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.timesheet-preview .timesheet-separator {
    border-bottom: 2px solid #000;
    margin: 10px 0;
}

.timesheet-preview .timesheet-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 10pt;
}

.timesheet-preview .timesheet-info-left {
    flex: 1;
}

.timesheet-preview .timesheet-info-right {
    text-align: right;
}

.timesheet-preview .timesheet-info-item {
    margin-bottom: 5px;
}

.timesheet-preview .timesheet-colaborador {
    margin-bottom: 15px;
    font-size: 10pt;
    border: 1px solid #000;
    padding: 8px;
}

.timesheet-preview .timesheet-colaborador-line {
    margin-bottom: 5px;
}

.timesheet-preview .timesheet-colaborador-line:last-child {
    margin-bottom: 0;
}

.timesheet-preview .timesheet-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 9pt;
}

.timesheet-preview .timesheet-table th {
    background-color: #f0f0f0;
    border: 1px solid #000;
    padding: 6px 3px;
    text-align: center;
    font-weight: bold;
    font-size: 8pt;
}

.timesheet-preview .timesheet-table td {
    border: 1px solid #000;
    padding: 8px 3px;
    text-align: center;
    vertical-align: middle;
}

.timesheet-preview .timesheet-table tbody tr.is-offday {
    background-color: #e5e5e5;
}

.timesheet-preview .timesheet-table tbody tr.is-offday td {
    background-color: #e5e5e5;
}

.timesheet-preview .timesheet-table td:first-child {
    font-weight: 500;
}

.timesheet-preview .timesheet-table td:last-child {
    text-align: left;
    padding-left: 8px;
}

.timesheet-preview .timesheet-footer {
    margin-top: 30px;
    text-align: right;
}

.timesheet-preview .timesheet-responsavel {
    display: inline-block;
    width: 300px;
    text-align: right;
}

.timesheet-preview .timesheet-responsavel-line {
    border-bottom: 1px solid #000;
    height: 40px;
    margin-bottom: 5px;
}

.timesheet-preview .timesheet-responsavel-label {
    font-size: 9pt;
    font-weight: bold;
    text-transform: uppercase;
}

/* Modal de Preview CSV */
#modal-csv-preview {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
}

#modal-csv-preview.hidden {
    display: none !important;
}

/* Calendário - Seleção */
.cal-selected {
    border: 2px solid #3b82f6 !important;
    background-color: #dbeafe !important;
}

.calendar-day {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}