/* ============================================
   MODERN STYLE SIPAC - SISTEMA DE CONDOMINIOS
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,100..900;1,100..900&display=swap');

/* RESET Y BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* ANIMACIÓN DE FONDO */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.bg-animation::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: float 20s linear infinite;
}

@keyframes float {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-100px, -100px); }
}

/* CONTENEDOR PRINCIPAL */
.main-content {
    position: relative;
    z-index: 1;
    margin-left: 280px;
    padding: 20px;
    transition: all 0.3s ease;
    min-height: 100vh;
}

/* TARJETAS (GLASSMORPHISM) */
.card-glass {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    animation: slideUp 0.5s ease-out;
}

.card-glass:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
}

.card-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: #1a202c;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header h2 i {
    color: #667eea;
    font-size: 24px;
}

/* FORMULARIOS - GRID */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-group-full {
    grid-column: span 2;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 15px;
}

.form-label {
    font-size: 13px;
    font-weight: 600;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-label i {
    color: #667eea;
    font-size: 14px;
}

.required {
    color: #e53e3e;
    margin-left: 4px;
}

.form-control {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%234a5568'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
}

.form-help {
    font-size: 11px;
    color: #718096;
    margin-top: 4px;
}

/* FILTROS */
.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-group label {
    font-size: 13px;
    font-weight: 600;
    color: #4a5568;
}

.filter-group label i {
    color: #667eea;
    margin-right: 6px;
}

/* TABLAS */
.table-container {
    overflow-x: auto;
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.modern-table thead tr {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.modern-table th {
    padding: 14px 12px;
    text-align: center;
    font-weight: 600;
}

.modern-table td {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}

.modern-table tbody tr:hover {
    background: #f7fafc;
    transition: all 0.3s;
}

/* BOTONES */
.btn {
    padding: 12px 28px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    font-family: 'Inter', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.btn-secondary:hover {
    background: #cbd5e0;
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(72, 187, 120, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #f56565, #e53e3e);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(229, 62, 62, 0.4);
}

/* BOTONES DE ACCIÓN EN TABLAS */
.action-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: #edf2f7;
    color: #4a5568;
    text-decoration: none;
    transition: all 0.3s;
}

.action-btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: scale(1.1);
}

/* PAGINACIÓN */
.pagination-modern {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
    flex-wrap: wrap;
}

.pagination-modern a, .pagination-modern span {
    padding: 6px 14px;
    background: #edf2f7;
    border-radius: 10px;
    text-decoration: none;
    color: #4a5568;
    transition: all 0.3s;
}

.pagination-modern a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.records-count {
    font-size: 13px;
    color: #718096;
}

/* ALERTAS */
.alert-error {
    background: #fed7d7;
    color: #c53030;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    border-left: 4px solid #e53e3e;
    font-size: 13px;
}

.alert-success {
    background: #c6f6d5;
    color: #276749;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    border-left: 4px solid #38a169;
    font-size: 13px;
}

/* ESTADOS VACÍOS */
.empty-message {
    text-align: center;
    padding: 60px;
    color: #a0aec0;
}

.empty-message i {
    font-size: 48px;
    margin-bottom: 15px;
    display: block;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .main-content {
        margin-left: 0;
        padding: 15px;
    }
    .filters-grid {
        grid-template-columns: 1fr;
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
    .form-group-full {
        grid-column: span 1;
    }
    .modern-table {
        font-size: 12px;
    }
    .btn {
        width: 100%;
        justify-content: center;
    }
    .form-buttons {
        flex-direction: column;
    }
    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* SOBREESCRIBIR ESTILOS DE JQUERY UI EN BOTONES */
button.ui-button,
.ui-button,
.ui-state-default,
.ui-widget-content .ui-state-default,
.ui-widget-header .ui-state-default {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none !important;
    color: white !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 600 !important;
    padding: 12px 28px !important;
    border-radius: 14px !important;
    font-size: 14px !important;
    margin: 0 !important;
}

.ui-button:hover,
.ui-state-default:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4) !important;
    background: linear-gradient(135deg, #5a67d8 0%, #6b46a0 100%) !important;
}

/* Para el botón Cancelar (secondary) */
.btn-secondary.ui-button,
.ui-button.btn-secondary {
    background: #e2e8f0 !important;
    color: #4a5568 !important;
}

.btn-secondary.ui-button:hover,
.ui-button.btn-secondary:hover {
    background: #cbd5e0 !important;
    transform: translateY(-2px) !important;
    box-shadow: none !important;
}