/**
 * Estilos Personalizados
 * Sistema de Votos APP Loreto 2026
 */

/* Variables CSS */
:root {
    --primary: #040df0;
    --secondary: #ef0707;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;
    --dark: #2c3e50;
    --light: #ecf0f1;
    --white: #ffffff;
    --gradient-primary: linear-gradient(135deg, #040df0 0%, #ef0707 100%);
}

/* Reset y Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

/* Botones personalizados */
.btn-app {
    background: var(--gradient-primary);
    border: none;
    color: white;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-app:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 168, 89, 0.3);
    color: white;
}

/* Cards mejorados */
.card-modern {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.card-modern:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

/* Badges */
.badge-app {
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 12px;
}

/* Tablas */
.table-modern {
    background: white;
    border-radius: 10px;
    overflow: hidden;
}

.table-modern thead {
    background: var(--gradient-primary);
    color: white;
}

.table-modern thead th {
    border: none;
    padding: 15px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.table-modern tbody tr {
    transition: background 0.2s ease;
}

.table-modern tbody tr:hover {
    background: #f8f9fa;
}

.table-modern tbody td {
    padding: 12px 15px;
    vertical-align: middle;
}

/* Inputs mejorados */
.form-control-modern {
    border-radius: 10px;
    border: 2px solid #e0e0e0;
    padding: 12px 15px;
    transition: all 0.3s ease;
}

.form-control-modern:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(0, 168, 89, 0.15);
}

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.5s ease-out;
}

/* Utilidades */
.text-app {
    color: var(--primary);
}

.bg-app {
    background: var(--gradient-primary);
}

.border-app {
    border-color: var(--primary) !important;
}

/* Loading Spinner */
.spinner-app {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .card {
        margin-bottom: 15px;
    }
    
    .table-responsive {
        font-size: 12px;
    }
}

/* DataTables personalizado */
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--gradient-primary) !important;
    border-color: var(--primary) !important;
    color: white !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: white !important;
}

/* SweetAlert2 personalizado */
.swal2-confirm {
    background: var(--gradient-primary) !important;
}

/* public/assets/css/custom.css - Agregar estos estilos */
/* ========================================
   ESTILOS PARA REGISTRO DE ACTAS
   ======================================== */

/* Animación de entrada */
.paso-formulario {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Inputs de votos */
.voto-input {
    text-align: center;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.2s ease;
}

.voto-input:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
    background-color: #f8fff9;
}

.voto-input:hover {
    border-color: #28a745;
}

/* Votos especiales */
.votos-especiales {
    text-align: center;
    font-weight: bold;
    font-size: 1rem;
}

.votos-especiales:focus {
    border-color: #ffc107;
    box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.25);
}

/* Badge de tiempo */
#tiempoBloqueo {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* Tablas */
.table-sm td, .table-sm th {
    vertical-align: middle;
    padding: 0.5rem;
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
    cursor: pointer;
}

/* Badges de organizaciones */
.badge {
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Cards */
.card {
    border-radius: 0.5rem;
    overflow: hidden;
}

.card-header {
    border-bottom: 3px solid rgba(255, 255, 255, 0.2);
}

/* Botones */
.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
}

/* Alert personalizado */
.alert-info {
    background-color: #e7f3ff;
    border-color: #b3d9ff;
    color: #004085;
}

/* Responsive */
@media (max-width: 768px) {
    .col-md-6 {
        margin-bottom: 2rem;
    }
    
    .table-responsive {
        font-size: 0.85rem;
    }
    
    .voto-input {
        font-size: 1rem;
    }
    
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }
}

/* Ocultar flechas de input number en Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Ocultar flechas de input number en Firefox */
input[type=number] {
    -moz-appearance: textfield;
}

/* Totales destacados */
.fs-5 {
    font-size: 1.5rem !important;
}

.text-primary {
    color: #0d6efd !important;
}

/* Estados del badge de tiempo */
.bg-success {
    background-color: #28a745 !important;
}

.bg-warning {
    background-color: #ffc107 !important;
    color: #000 !important;
}

.bg-danger {
    background-color: #dc3545 !important;
}

/* Transición suave para cambios de color */
#tiempoBloqueo {
    transition: background-color 0.5s ease;
}

/* Mejorar aspecto de los select */
.form-select-lg {
    padding: 0.75rem 1rem;
    font-size: 1.1rem;
}

/* Content area (si usas el layout que mencionaste) */
.content-area {
    padding: 2rem;
    min-height: calc(100vh - 56px);
}

/* Sombras y efectos */
.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
    transition: box-shadow 0.3s ease;
}

/* Mejora visual de las tablas */
.table-bordered {
    border: 2px solid #dee2e6;
}

.table-bordered th,
.table-bordered td {
    border: 1px solid #dee2e6;
}

thead.table-light {
    background-color: #f8f9fa;
    font-weight: 600;
}

tfoot.table-secondary {
    background-color: #e9ecef;
    font-weight: 600;
}

tfoot.table-primary {
    background-color: #cfe2ff;
    font-weight: 700;
}

/* Loading spinner personalizado */
.fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Espaciado entre botones */
.gap-2 {
    gap: 0.5rem !important;
}

/* Mejorar legibilidad de texto pequeño */
small.text-muted {
    font-size: 0.85rem;
    color: #6c757d !important;
}

/* Bordes redondeados en inputs */
.form-control,
.form-select {
    border-radius: 0.375rem;
}

/* Cursor pointer en elementos interactivos */
button,
.btn {
    cursor: pointer;
}

/* Disabled state */
.btn:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

/* Focus visible para accesibilidad */
button:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}