@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

*,
::after,
::before {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

a {
    text-decoration: none !important;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #171863 100%);
    min-height: 100vh;
}

/* Login Styles */
.login-div {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #171863 100%);
    position: relative;
}

.login-div::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 20"><defs><radialGradient id="a" cx="50%" cy="50%"><stop offset="0%" style="stop-color:rgba(255,255,255,0.1)"/><stop offset="100%" style="stop-color:rgba(255,255,255,0)"/></radialGradient></defs><circle cx="10" cy="10" r="1" fill="url(%23a)"/><circle cx="30" cy="10" r="1" fill="url(%23a)"/><circle cx="50" cy="10" r="1" fill="url(%23a)"/><circle cx="70" cy="10" r="1" fill="url(%23a)"/><circle cx="90" cy="10" r="1" fill="url(%23a)"/></svg>') repeat;
    opacity: 0.3;
    z-index: 1;
}

.login-div>* {
    position: relative;
    z-index: 2;
}

.login-div p {
    font-size: 3rem;
    color: #fff;
    font-weight: 700;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    margin-bottom: 1rem;
    text-align: center;
}

.login-div p span {
    font-weight: 300;
    opacity: 0.9;
}

.card-primary.card-outline {
    border: none;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.login-card-body {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    color: #334155;
    padding: 2.5rem;
    width: 420px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.login-card-body p {
    font-size: 0.95rem;
    color: #64748b;
    margin: 0;
    padding: 0 0 1.5rem;
    text-align: center;
    font-weight: 400;
}

.footer-login p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

.btn-outline-success {
    border: 2px solid #10b981 !important;
    color: #10b981 !important;
    width: 100% !important;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    background: transparent;
}

.btn-outline-success:hover {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
}

.login-div2 {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: 1.5rem;
}

.login-div2 p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    padding: 0;
}

.login-div2 a {
    color: #fff;
    margin-left: 0.5rem;
    font-weight: 600;
    text-decoration: underline;
    transition: all 0.3s ease;
}

.login-div2 a:hover {
    color: #f0f9ff;
}

/* Sidebar Styles */
.wrapper {
    display: flex;
    max-height: 100vh;
}

#sidebar {
    width: 70px;
    min-width: 70px;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

#sidebar.expand {
    width: 280px;
    min-width: 280px;
}

#toggle-btn {
    background-color: transparent;
    border: none;
    cursor: pointer;
    padding: 1.25rem 1.5rem;
    transition: all 0.3s ease;
}

#toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

#toggle-btn i {
    font-size: 1.5rem;
    color: #e2e8f0;
    transition: transform 0.3s ease;
}

#toggle-btn:hover i {
    transform: scale(1.1);
}

.sidebar-logo {
    margin: auto 0;
    padding: 1rem 1.5rem;
}

.sidebar-logo a {
    color: #f8fafc;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

#sidebar:not(.expand) .sidebar-logo,
#sidebar:not(.expand) a.sidebar-link span {
    display: none;
}

.sidebar-nav {
    padding: 1rem 0;
    flex: 1 1 auto;
}

a.sidebar-link {
    padding: 0.875rem 1.5rem;
    color: #cbd5e1;
    display: block;
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.sidebar-link i {
    font-size: 1.2rem;
    margin-right: 0.875rem;
    width: 1.5rem;
    text-align: center;
}

a.sidebar-link:hover {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.2) 0%, rgba(99, 102, 241, 0.05) 100%);
    border-left: 3px solid #6366f1;
    color: #f8fafc;
    transform: translateX(2px);
}

.sidebar-item {
    position: relative;
}

#sidebar:not(.expand) .sidebar-item .sidebar-dropdown {
    position: absolute;
    top: 0;
    left: 70px;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.5rem 0;
    min-width: 16rem;
    display: none;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

#sidebar:not(.expand) .sidebar-item:hover .has-dropdown+.sidebar-dropdown {
    display: block;
    max-height: 20rem;
    opacity: 1;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

#sidebar.expand .sidebar-link[data-bs-toggle="collapse"]::after {
    border: solid;
    border-width: 0 0.075rem 0.075rem 0;
    content: "";
    display: inline-block;
    padding: 0.25rem;
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%) rotate(-135deg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#sidebar.expand .sidebar-link[data-bs-toggle="collapse"].collapsed::after {
    transform: translateY(-50%) rotate(45deg);
}

/* Navbar Styles */
.navbar {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(226, 232, 240, 0.5) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
    padding: 1rem !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    z-index: 1000;
    height: 70px;
    overflow: hidden;
}

.navbar ul {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 !important;
    padding: 0 !important;
}

.navbar ul li {
    list-style: none;
}

.navbar ul li img {
    width: 160px;
    margin-top: -5px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}


/* Main Content */
.main {
    min-height: 100vh;
    width: 100%;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    position: relative;
}

.main::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.scrollable-content {
    height: calc(100vh - 70px);
    max-height: 100vh;
    overflow-y: auto;
    position: relative;
    z-index: 1;
}

.scrollable-content::-webkit-scrollbar {
    width: 8px;
}

.scrollable-content::-webkit-scrollbar-track {
    background: rgba(226, 232, 240, 0.3);
    border-radius: 10px;
}

.scrollable-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #94a3b8 0%, #64748b 100%);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.scrollable-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #64748b 0%, #475569 100%);
}

/* Container Styles */
.container-div {
    width: calc(100% - 40px);
    /* Restamos 40px (20px a cada lado) */
    max-width: 1400px;
    margin: 1.5rem 2%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(226, 232, 240, 0.5);
    border-radius: 24px;
    min-height: 88vh;
    margin: 1.5rem auto;
    padding: 2rem;
    overflow: auto;
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.08),
        0 4px 12px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;

}

.container-div::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 50%, #10b981 100%);
    border-radius: 24px 24px 0 0;
}

.container-div:hover {
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.12),
        0 8px 20px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}

.container-div h2 {
    color: #1e293b;
    font-weight: 700;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #1e293b 0%, #475569 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.container-div>p {
    color: #64748b;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    font-weight: 400;
}

/* Card Styles */
.card {
    border: 1px solid rgba(226, 232, 240, 0.6);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
    border-color: rgba(99, 102, 241, 0.3);
}


.card-body {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.7);
}

/* Form Controls */
.form-label {
    font-weight: 600 !important;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-control,
.form-select {
    border: 2px solid rgba(226, 232, 240, 0.8);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
}

.form-control:focus,
.form-select:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    background: rgba(255, 255, 255, 1);
    outline: none;
}

.form-control::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

/* Buttons */
.btn {
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

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

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

.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
    background: linear-gradient(135deg, #5b5ef0 0%, #8451f5 100%);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4);
    background: linear-gradient(135deg, #ee3c3c 0%, #db2525 100%);
}

.btn-add {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: #fff !important;
    border: none !important;
    padding: 0.875rem 1.75rem !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    transition: all 0.3s ease;
}

.btn-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, #0fa975 0%, #057a5a 100%) !important;
}

/* File Upload Styles */
input[type="file"] {
    border: 2px dashed rgba(99, 102, 241, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    transition: all 0.3s ease;
    cursor: pointer;
}

input[type="file"]:hover {
    border-color: rgba(99, 102, 241, 0.5);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
}

.text-muted {
    color: #6b7280 !important;
    font-size: 0.875rem;
    line-height: 1.4;
}

/* Table Styles */
#userTable,
#bannersTable,
#estadosTable,
#ciudadesTable,
#blogsTable,
#proyectosTable,
#serviciosTable {
    width: 100% !important;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

#userTable th,
#bannersTable th,
#estadosTable th,
#ciudadesTable th,
#blogsTable th,
#proyectosTable th,
#serviciosTable th {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
    min-width: 100px;
    padding: 1rem;
    font-weight: 600;
    border: none;
    text-align: center;
}

#userTable td,
#bannersTable td,
#estadosTable td,
#ciudadesTable td,
#blogsTable td,
#proyectosTable td,
#serviciosTable td {
    text-align: center;
    border: none;
    font-size: 0.9rem;
    padding: 0.875rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
}

#userTable tbody tr:hover,
#bannersTable tbody tr:hover,
#estadosTable tbody tr:hover,
#ciudadesTable tbody tr:hover,
#blogsTable tbody tr:hover,
#proyectosTable tbody tr:hover,
#serviciosTable tbody tr:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    cursor: pointer;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Actions */
.user-actions,
.project-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin: 1.5rem 0;
    gap: 1rem;
}

.pagination .page-item.active .page-link,
.pagination .page-item .page-link.active,
.page-item.active .page-link {
    background-color: transparent !important;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%) !important;
    border-color: #6366f1 !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3) !important;
}

/* Asegurar que el hover también funcione correctamente */
.pagination .page-item .page-link:hover {
    background: rgba(253, 253, 253, 0.268) !important;
    color: #6366f1 !important;
    border-color: #6366f1 !important;
}

/* Para elementos no activos */
.pagination .page-item .page-link {
    background-color: transparent !important;
    background: rgba(255, 255, 255, 0.9) !important;
    color: #6366f1 !important;
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
    border-radius: 8px !important;
    margin: 0 2px !important;
    transition: all 0.3s ease !important;
}

/* Select2 Customization */
.select2-container--default .select2-selection--multiple {
    border: 2px solid rgba(226, 232, 240, 0.8);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%) !important;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 8px;
    padding: 4px 8px;
    margin: 4px;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__display {
    padding: 0 8px !important;
    font-weight: 500 !important;
    color: #374151 !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: #ef4444 !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container-div {
        width: calc(100% - 30px);
        margin: 1.5rem 15px;
        border-radius: 20px;
    }


    .container-div:hover {
        transform: none;
    }

    .card-body {
        padding: 1rem;
    }

    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }

    .user-actions,
    .project-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeInUp 0.5s ease forwards;
}

/* Rich Text Editor Containers */
#descripcion,
#descripcionBeneficios,
#descripcionUsos,
#descripcionProblemas {
    border: 2px solid rgba(226, 232, 240, 0.8);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

#descripcion:focus-within,
#descripcionBeneficios:focus-within,
#descripcionUsos:focus-within,
#descripcionProblemas:focus-within {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.dropzone-area {
    border: 2px dashed rgba(99, 102, 241, 0.3);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    backdrop-filter: blur(15px);
    padding: 2.5rem 1.5rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 8px 32px rgba(99, 102, 241, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Efecto de brillo animado */
.dropzone-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(99, 102, 241, 0.15),
            rgba(139, 92, 246, 0.15),
            transparent);
    transition: left 0.6s ease;
    z-index: 1;
}

.dropzone-area:hover::before {
    left: 100%;
}

/* Estados hover y dragover */
.dropzone-area:hover {
    border-color: rgba(99, 102, 241, 0.6);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(139, 92, 246, 0.12) 100%);
    transform: translateY(-3px) scale(1.01);
    box-shadow:
        0 15px 40px rgba(99, 102, 241, 0.18),
        0 5px 15px rgba(99, 102, 241, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.dropzone-area.dragover {
    border-color: #6366f1;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
    transform: scale(1.03);
    box-shadow:
        0 20px 50px rgba(99, 102, 241, 0.25),
        0 8px 20px rgba(99, 102, 241, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    border-style: solid;
}

/* Mensaje del dropzone */
.dz-message {
    position: relative;
    z-index: 2;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.dz-message p {
    margin: 0;
    transition: all 0.3s ease;
}

.dz-message p:first-child {
    color: #1e293b;
    font-weight: 700;
    font-size: 1.2rem;
    background: linear-gradient(135deg, #1e293b 0%, #6366f1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dz-message p:nth-child(2) {
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0.8;
}

.dz-message p:nth-child(3) {
    color: #6366f1;
    font-weight: 600;
    font-size: 1.1rem;
}

.dz-message .dz-p {
    color: #94a3b8 !important;
    font-size: 0.75rem !important;
    font-weight: 400 !important;
    margin-top: 0.5rem;
    font-style: italic;
    opacity: 0.7;
}

/* Dropzone con archivos cargados */
.dropzone-area.has-files {
    border-color: rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(5, 150, 105, 0.08) 100%);
    min-height: auto;
    padding: 1.5rem;
}

.dropzone-area.has-files:hover {
    border-color: rgba(16, 185, 129, 0.6);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.15) 100%);
    box-shadow:
        0 15px 40px rgba(16, 185, 129, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}


.dz-preview {
    position: relative;
    display: inline-block;
    margin: 0.75rem;
    padding: 0;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 16px;
    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.08),
        0 3px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 220px;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.dz-preview:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow:
        0 15px 40px rgba(0, 0, 0, 0.15),
        0 8px 20px rgba(0, 0, 0, 0.08);
    border-color: rgba(99, 102, 241, 0.4);
}

/* Contenedor de imagen */
.dz-image {
    position: relative;
    border-radius: 16px 16px 0 0;
    overflow: hidden;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.dz-image img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
    transition: all 0.3s ease;
}

.dz-preview:hover .dz-image img {
    transform: scale(1.05);
}

/* Overlay con botones de acción */
.dz-image>div[style*="position: absolute"] {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    display: flex !important;
    gap: 6px !important;
    z-index: 10 !important;
    opacity: 0;
    transition: all 0.3s ease;
}

.dz-preview:hover .dz-image>div[style*="position: absolute"] {
    opacity: 1;
}

/* Botón eliminar personalizado */
.dz-remove-btn,
.dz-remove {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 0.4rem 0.8rem !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3) !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dz-remove-btn:hover,
.dz-remove:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4) !important;
}

/* Detalles del archivo */
.dz-details {
    padding: 1rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
}

.dz-filename {
    font-size: 0.85rem;
    color: #1e293b;
    font-weight: 600;
    margin-bottom: 0.4rem;
    word-break: break-word;
    line-height: 1.3;
    max-height: 2.6em;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dz-size {
    font-size: 0.7rem;
    color: #64748b;
    font-weight: 500;
    padding: 0.2rem 0.5rem;
    background: rgba(100, 116, 139, 0.1);
    border-radius: 12px;
    display: inline-block;
}

.dz-progress {
    height: 6px;
    background: rgba(226, 232, 240, 0.6);
    border-radius: 3px;
    margin: 0.8rem 1rem 0.5rem;
    overflow: hidden;
    position: relative;
}

.dz-progress::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            rgba(99, 102, 241, 0.1),
            rgba(139, 92, 246, 0.1));
    border-radius: 3px;
}

.dz-upload {
    height: 100%;
    background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 3px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.dz-upload::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.4),
            transparent);
    animation: progressShine 2s infinite;
}

@keyframes progressShine {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

/* ==============================================
   ESTADOS DE ERROR Y ÉXITO
   ============================================== */

/* Estado de error */
.dz-error .dz-preview {
    border-color: rgba(239, 68, 68, 0.5);
    background: rgba(239, 68, 68, 0.05);
    box-shadow:
        0 8px 25px rgba(239, 68, 68, 0.1),
        0 3px 10px rgba(239, 68, 68, 0.05);
}

.dz-error-message {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    z-index: 15;
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3);
    opacity: 0;
    animation: fadeInError 0.3s ease forwards;
}

@keyframes fadeInError {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Estado de éxito */
.dz-success .dz-preview {
    border-color: rgba(16, 185, 129, 0.5);
    background: rgba(16, 185, 129, 0.05);
    box-shadow:
        0 8px 25px rgba(16, 185, 129, 0.1),
        0 3px 10px rgba(16, 185, 129, 0.05);
}

.dz-success-mark {
    position: absolute;
    top: 8px;
    left: 8px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    opacity: 0;
    animation: bounceIn 0.6s ease forwards;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }

    50% {
        opacity: 1;
        transform: scale(1.1);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}


@media (max-width: 768px) {
    .dropzone-area {
        padding: 2rem 1rem;
        min-height: 160px;
    }

    .dz-preview {
        max-width: 180px;
        margin: 0.5rem;
    }

    .dz-image img {
        height: 120px;
    }

    .dz-message p:first-child {
        font-size: 1.1rem;
    }

    .dz-message p:nth-child(3) {
        font-size: 1rem;
    }

    .dz-remove-btn,
    .dz-remove {
        padding: 0.3rem 0.6rem !important;
        font-size: 0.7rem !important;
    }
}

@media (max-width: 480px) {
    .dropzone-area {
        padding: 1.5rem 0.75rem;
        min-height: 140px;
    }

    .dz-preview {
        max-width: 150px;
        margin: 0.25rem;
    }

    .dz-image img {
        height: 100px;
    }

    .dz-details {
        padding: 0.75rem;
    }

    .dz-filename {
        font-size: 0.8rem;
    }

    .dz-size {
        font-size: 0.65rem;
    }
}

/* ==============================================
   ANIMACIONES ADICIONALES
   ============================================== */

/* Animación de entrada para los previews */
.dz-preview {
    animation: slideInPreview 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideInPreview {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Animación de salida para los previews */
.dz-preview.dz-removing {
    animation: slideOutPreview 0.3s ease forwards;
}

@keyframes slideOutPreview {
    from {
        opacity: 1;
        transform: scale(1);
    }

    to {
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
    }
}

/* Additional Utility Classes */
.glass-effect {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}


.gradient-text {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-elegant {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.transition-smooth {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ql-toolbar.ql-snow {
    border-radius: 0 !important;
    border-bottom: 3px solid rgba(226, 232, 240, 0.8) !important;
}

.ql-container.ql-snow {
    border-radius: 0 !important;
    border-top: none !important;
}

.ql-snow .ql-formats button {
    border-radius: 0 !important;
}

.ql-snow .ql-picker {
    border-radius: 0 !important;
}

.ql-snow .ql-picker-options {
    border-radius: 0 !important;
}

.ql-editor {
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
    border-top: none !important;
}

/* Eliminar bordes negros y estilos por defecto de DataTables */
.dataTables_wrapper .dataTables_paginate .paginate_button {
    border: none !important;
    background: transparent !important;
    color: #6366f1 !important;
    margin: 0 3px !important;
    padding: 8px 15px !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
    box-shadow: none !important;
}

/* Hover */
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: rgba(99, 102, 241, 0.1) !important;
    color: #6366f1 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.2) !important;
}

/* Botón activo */
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3) !important;
}

/* Botones deshabilitados */
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
    color: #94a3b8 !important;
    background: transparent !important;
    opacity: 0.5 !important;
    cursor: not-allowed;
}

/* ==============================================
   RESPONSIVE PARA PAGINACIÓN
   ============================================== */

@media (max-width: 992px) {
    .dataTables_wrapper .dataTables_paginate .paginate_button {
        padding: 7px 12px !important;
        margin: 0 2px !important;
    }
}

@media (max-width: 768px) {
    .dataTables_wrapper .dataTables_paginate {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
    }

    .dataTables_wrapper .dataTables_paginate .paginate_button {
        padding: 6px 10px !important;
        margin: 0 !important;
        font-size: 0.85rem;
    }

    .dataTables_wrapper .dataTables_paginate .paginate_button:not(.previous):not(.next):not(.current) {
        display: none;
    }

    .dataTables_wrapper .dataTables_paginate .paginate_button.previous,
    .dataTables_wrapper .dataTables_paginate .paginate_button.next {
        display: inline-block;
        min-width: 80px;
    }

    .dataTables_wrapper .dataTables_paginate .ellipsis {
        display: inline-block;
        padding: 6px 10px;
        color: #6366f1;
        font-weight: 500;
    }
}

@media (max-width: 480px) {
    .dataTables_wrapper .dataTables_paginate {
        gap: 3px;
    }

    .dataTables_wrapper .dataTables_paginate .paginate_button {
        padding: 5px 8px !important;
        font-size: 0.8rem;
    }

    .dataTables_wrapper .dataTables_paginate .paginate_button.previous,
    .dataTables_wrapper .dataTables_paginate .paginate_button.next {
        min-width: 70px;
    }
}

.mobile-page-indicator {
    display: none;
    text-align: center;
    padding: 10px 0;
    color: #64748b;
    font-weight: 500;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .mobile-page-indicator {
        display: block;
    }
}

/* Contenedor de la tabla */
.dataTables_wrapper {
    overflow-x: auto;
    margin-right: -1px;
    /* Compensa el borde del contenedor */
    padding-bottom: 5px;
    /* Espacio para scrollbar */
    width: calc(100% + 2px);
    /* Compensa el margen negativo */
}

/* Tabla principal */
.display.dataTable.no-footer {
    min-width: 100%;
    width: auto !important;
    margin-right: 1px;
    /* Compensación visual */
}

/* Cabeceras de tabla */
.display.dataTable.no-footer th {
    white-space: nowrap;
    /* Evita saltos de línea en cabeceras */
}

/* Celdas de tabla */
.display.dataTable.no-footer td {
    min-width: 120px;
    /* Ancho mínimo para celdas */
    word-wrap: break-word;
    /* Rompe palabras largas */
}

/* Barra de desplazamiento */
.dataTables_wrapper::-webkit-scrollbar {
    height: 8px;
}

.dataTables_wrapper::-webkit-scrollbar-track {
    background: rgba(226, 232, 240, 0.3);
    border-radius: 4px;
    margin: 0 10px;
}

.dataTables_wrapper::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 4px;
}

/* Ajustes responsivos */
@media (max-width: 768px) {
    .dataTables_wrapper {
        margin-right: 10px;
        width: calc(100% + 10px);
    }

    .display.dataTable.no-footer td {
        min-width: 100px;
    }
}

.sector-row .especialidad-row {
    margin-bottom: 15px;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    background-color: #f8f9fa;
}

.sector-row-header,
.especialidad-row-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.sector-row-header,
.especialidad-row-header h6 {
    margin: 0;
    font-size: 1rem;
    color: #495057;
}

.remove-sector-row,
.remove-especialidad-row {
    width: 35px;
    height: 35px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sector-select-container,
.especialidad-select-container {
    display: flex;
    gap: 10px;
}

.add-sector-btn,
.add-especialidad-btn {
    margin-top: 20px;
}

.sector-row,
.especialidad-row {
    align-items: center;
    padding: 8px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.sector-row:not(:last-child),
.especialidad-row:not(:last-child) {
    margin-bottom: 10px;
}

.btn-remove-sector,
.btn-remove-especialidad {
    padding: 5px 10px;
}

/* aviso sin sectores o especialidades */
/* Contenedor principal de avisos */
.aviso-container {
    display: flex;
    align-items: center;
    background-color: #fff8e6;
    border: 1px solid #ffd54f;
    border-radius: 4px;
    padding: 4px 10px;
    cursor: pointer;
    transition: all 0.2s;
    height: 36px;
    /* Misma altura que el botón */
}

.aviso-container:hover {
    background-color: #ffecb3;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.aviso-count {
    background-color: #ff9800;
    color: white;
    font-weight: bold;
    border-radius: 12px;
    min-width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
}

.aviso-content {
    display: flex;
    align-items: center;
    gap: 6px;
}

.aviso-icon {
    font-size: 16px;
    animation: pulse 1.5s infinite;
}

.aviso-text {
    font-size: 14px;
    color: #5c3c00;
    font-weight: 500;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

/* Para responsive: avisos en columna en móviles */
@media (max-width: 768px) {
    .project-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    #avisos {
        width: 100%;
        margin-bottom: 10px;
    }

    .aviso-container {
        width: 100%;
        margin-bottom: 5px;
    }
}

/* Estilos para el mensaje de información */
.custom-info-message {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border: 1px solid #bae6fd;
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.info-icon-container {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 6px rgba(2, 132, 199, 0.2);
}

.info-icon-container i {
    color: white;
    font-size: 24px;
    animation: float 3s ease-in-out infinite;
}

.info-content {
    flex-grow: 1;
}

.info-content p {
    margin: 0;
    color: #075985;
    line-height: 1.5;
}

.info-content .small {
    font-size: 0.9em;
    opacity: 0.85;
}

@keyframes float {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }

    100% {
        transform: translateY(0);
    }
}

/* Animación para entrar */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.custom-info-message {
    animation: fadeInUp 0.5s ease-out forwards;
}

/* Ajustes para botones de eliminar */
.btn-remove-relation {
    height: calc(2.5rem + 2px); /* Igual altura que los selects */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem !important; /* Mismo padding vertical que los selects */
}

/* Asegurar alineación vertical de los elementos */
.relation-row .col-2 {
    padding-top: 1.5rem; /* Compensa la altura del label */
}

/* Ajuste responsive para móviles */
@media (max-width: 768px) {
    .relation-row .col-2 {
        padding-top: 1.8rem;
    }
    
    .btn-remove-relation {
        height: calc(2.8rem + 2px);
    }
}


@media (max-width: 1200px) {
    .form-main-layout {
      flex-direction: column;
    }
    
    .form-main-layout .col-md-8,
    .form-main-layout .col-md-4 {
      width: 100%;
      max-width: 100%;
    }
    
    .form-main-layout .col-md-8 {
      margin-bottom: 30px;
    }
    
    /* Ajustar las sub-columnas dentro de la primera columna */
    .form-main-layout .col-md-8 .row > .col-md-6 {
      width: 100%;
      max-width: 100%;
      margin-bottom: 20px;
    }
    
    /* Asegurar que las tarjetas de imágenes ocupen el ancho completo */
    .form-main-layout .col-md-4 .card {
      width: 100%;
    }
  }