/*
 * RiesgoCheck - Estilos Personalizados
 * Basado en Bootstrap 3.3.7
 * Tema: Dark Purple
 */

/* ========================================
   VARIABLES DE COLOR (Comentadas para referencia)
   ======================================== */
/*
  Primario (Morado): #a855f7, #9333ea, #7c3aed
  Secundario (Azul): #60a5fa, #3b82f6
  Fondo Oscuro: #0f172a, #1e1e2e, #1a1a2e
  Texto Claro: #f1f5f9, #e2e8f0, #cbd5e1
  Acentos: #8b5cf6, #6366f1
*/

/* ========================================
   RESET Y BODY
   ======================================== */
body {
    background-color: #0f172a;
    color: #e2e8f0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ========================================
   TIPOGRAFÍA
   ======================================== */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    color: #f1f5f9;
    font-weight: 600;
}

a {
    color: #a855f7;
    transition: color 0.3s ease;
}

    a:hover,
    a:focus {
        color: #9333ea;
        text-decoration: none;
    }

/* ========================================
   BOTONES
   ======================================== */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
}

/* Botón Primario - Morado */
.btn-primary {
    background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 14px 0 rgba(168, 85, 247, 0.4);
}

    .btn-primary:hover,
    .btn-primary:focus,
    .btn-primary:active {
        background: linear-gradient(135deg, #9333ea 0%, #7c3aed 100%);
        color: #ffffff;
        box-shadow: 0 6px 20px 0 rgba(168, 85, 247, 0.6);
        transform: translateY(-2px);
    }

/* Botón Success - Verde */
.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px 0 rgba(16, 185, 129, 0.4);
}

    .btn-success:hover,
    .btn-success:focus,
    .btn-success:active {
        background: linear-gradient(135deg, #059669 0%, #047857 100%);
        color: #ffffff;
        box-shadow: 0 6px 20px 0 rgba(16, 185, 129, 0.6);
    }

/* Botón Info - Azul */
.btn-info {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px 0 rgba(59, 130, 246, 0.4);
}

    .btn-info:hover,
    .btn-info:focus,
    .btn-info:active {
        background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
        color: #ffffff;
        box-shadow: 0 6px 20px 0 rgba(59, 130, 246, 0.6);
    }

/* Botón Default/Secondary - Oscuro */
.btn-default {
    background-color: #1e293b;
    color: #e2e8f0;
    border: 1px solid #334155;
}

    .btn-default:hover,
    .btn-default:focus,
    .btn-default:active {
        background-color: #334155;
        color: #f1f5f9;
        border-color: #475569;
    }

/* Botón Danger - Rojo */
.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px 0 rgba(239, 68, 68, 0.4);
}

    .btn-danger:hover,
    .btn-danger:focus,
    .btn-danger:active {
        background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
        color: #ffffff;
        box-shadow: 0 6px 20px 0 rgba(239, 68, 68, 0.6);
    }

/* ========================================
   NAVBAR
   ======================================== */
.navbar {
    background: linear-gradient(135deg, #1e1e2e 0%, #0f172a 100%);
    border: none;
    border-bottom: 1px solid rgba(168, 85, 247, 0.2);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    min-height: 70px;
}

.navbar-inverse {
    background: linear-gradient(135deg, #1e1e2e 0%, #0f172a 100%);
    border-color: rgba(168, 85, 247, 0.2);
}

.navbar-brand {
    color: #a855f7 !important;
    font-weight: 700;
    font-size: 24px;
    padding: 20px 15px;
}

    .navbar-brand:hover,
    .navbar-brand:focus {
        color: #9333ea !important;
    }

.navbar-inverse .navbar-nav > li > a {
    color: #cbd5e1;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 25px 15px;
}

    .navbar-inverse .navbar-nav > li > a:hover,
    .navbar-inverse .navbar-nav > li > a:focus {
        color: #a855f7;
        background-color: rgba(168, 85, 247, 0.1);
    }

.navbar-inverse .navbar-nav > .active > a {
    background-color: rgba(168, 85, 247, 0.15);
    color: #a855f7;
}

/* ========================================
   SIDEBAR
   ======================================== */
.sidebar {
    background: linear-gradient(180deg, #1e1e2e 0%, #0f172a 100%);
    border-right: 1px solid rgba(168, 85, 247, 0.2);
    min-height: 100vh;
    padding: 20px 0;
}

    .sidebar .nav > li > a {
        color: #94a3b8;
        padding: 12px 20px;
        border-radius: 8px;
        margin: 4px 15px;
        transition: all 0.3s ease;
    }

        .sidebar .nav > li > a:hover,
        .sidebar .nav > li > a:focus {
            background-color: rgba(168, 85, 247, 0.1);
            color: #a855f7;
        }

    .sidebar .nav > li.active > a {
        background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%);
        color: #ffffff;
    }

/* ========================================
   FORMULARIOS
   ======================================== */
.form-control {
    background-color: #1e293b;
    border: 1px solid #334155;
    color: #e2e8f0;
    border-radius: 8px;
    padding: 10px 15px;
    height: auto;
}

    .form-control:focus {
        background-color: #1e293b;
        border-color: #a855f7;
        color: #e2e8f0;
        box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.2);
        outline: none;
    }

    .form-control::placeholder {
        color: #64748b;
    }

.form-group label {
    color: #cbd5e1;
    font-weight: 500;
}

/* ========================================
   PANELES Y CARDS
   ======================================== */
.panel {
    background-color: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

.panel-heading {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-bottom: 1px solid #475569;
    color: #f1f5f9;
    border-radius: 12px 12px 0 0;
}

.panel-body {
    background-color: #1e293b;
    color: #e2e8f0;
}

.panel-footer {
    background-color: #1e293b;
    border-top: 1px solid #334155;
}

.panel-primary {
    border-color: #a855f7;
}

    .panel-primary > .panel-heading {
        background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%);
        color: #ffffff;
        border-color: #a855f7;
    }

/* ========================================
   TABLAS
   ======================================== */
.table {
    background-color: #1e293b;
    color: #e2e8f0;
}

    .table > thead > tr > th {
        background-color: #334155;
        color: #f1f5f9;
        border-bottom: 2px solid #475569;
        font-weight: 600;
    }

    .table > tbody > tr > td {
        border-top: 1px solid #334155;
    }

.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: rgba(30, 41, 59, 0.5);
}

.table-hover > tbody > tr:hover {
    background-color: rgba(168, 85, 247, 0.1);
}

/* ========================================
   BADGES Y LABELS
   ======================================== */
.badge {
    background-color: #a855f7;
    border-radius: 12px;
    padding: 4px 10px;
}

.label-primary {
    background-color: #a855f7;
}

.label-success {
    background-color: #10b981;
}

.label-info {
    background-color: #3b82f6;
}

.label-warning {
    background-color: #f59e0b;
}

.label-danger {
    background-color: #ef4444;
}

/* ========================================
   ALERTAS
   ======================================== */
.alert {
    border-radius: 12px;
    border: none;
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border-left: 4px solid #10b981;
}

.alert-info {
    background-color: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    border-left: 4px solid #3b82f6;
}

.alert-warning {
    background-color: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border-left: 4px solid #f59e0b;
}

.alert-danger {
    background-color: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border-left: 4px solid #ef4444;
}

/* ========================================
   MODALES
   ======================================== */
.modal-content {
    background-color: #1e293b;
    border: 1px solid #334155;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

.modal-header {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-bottom: 1px solid #475569;
    border-radius: 16px 16px 0 0;
}

.modal-title {
    color: #f1f5f9;
}

.modal-body {
    color: #e2e8f0;
}

.modal-footer {
    background-color: #1e293b;
    border-top: 1px solid #334155;
    border-radius: 0 0 16px 16px;
}

.close {
    color: #cbd5e1;
    opacity: 0.8;
}

    .close:hover {
        color: #f1f5f9;
        opacity: 1;
    }

/* ========================================
   DROPDOWNS
   ======================================== */
.dropdown-menu {
    background-color: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

    .dropdown-menu > li > a {
        color: #e2e8f0;
        transition: all 0.2s ease;
    }

        .dropdown-menu > li > a:hover,
        .dropdown-menu > li > a:focus {
            background-color: rgba(168, 85, 247, 0.1);
            color: #a855f7;
        }

    .dropdown-menu > .active > a {
        background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%);
        color: #ffffff;
    }

/* ========================================
   PAGINACIÓN
   ======================================== */
.pagination > li > a,
.pagination > li > span {
    background-color: #1e293b;
    border: 1px solid #334155;
    color: #e2e8f0;
}

    .pagination > li > a:hover,
    .pagination > li > span:hover {
        background-color: rgba(168, 85, 247, 0.1);
        border-color: #a855f7;
        color: #a855f7;
    }

.pagination > .active > a,
.pagination > .active > span {
    background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%);
    border-color: #a855f7;
    color: #ffffff;
}

/* ========================================
   WELLS Y JUMBOTRON
   ======================================== */
.well {
    background-color: #1e293b;
    border: 1px solid #334155;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.jumbotron {
    background: linear-gradient(135deg, #1e1e2e 0%, #0f172a 100%);
    color: #f1f5f9;
    border-radius: 16px;
}

/* ========================================
   BREADCRUMBS
   ======================================== */
.breadcrumb {
    background-color: #1e293b;
    border-radius: 8px;
}

    .breadcrumb > li + li:before {
        color: #64748b;
    }

    .breadcrumb > .active {
        color: #a855f7;
    }

/* ========================================
   PROGRESS BARS
   ======================================== */
.progress {
    background-color: #1e293b;
    border-radius: 8px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.progress-bar {
    background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%);
}

.progress-bar-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.progress-bar-info {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
}

.progress-bar-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.progress-bar-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* ========================================
   LIST GROUP
   ======================================== */
.list-group-item {
    background-color: #1e293b;
    border: 1px solid #334155;
    color: #e2e8f0;
}

    .list-group-item:hover,
    .list-group-item:focus {
        background-color: rgba(168, 85, 247, 0.1);
        color: #a855f7;
    }

    .list-group-item.active {
        background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%);
        border-color: #a855f7;
        color: #ffffff;
    }

/* ========================================
   TOOLTIPS Y POPOVERS
   ======================================== */
.tooltip-inner {
    background-color: #1e293b;
    color: #e2e8f0;
    border: 1px solid #334155;
}

.popover {
    background-color: #1e293b;
    border: 1px solid #334155;
}

.popover-title {
    background-color: #334155;
    color: #f1f5f9;
    border-bottom: 1px solid #475569;
}

.popover-content {
    color: #e2e8f0;
}

/* ========================================
   TABS
   ======================================== */
.nav-tabs {
    border-bottom: 2px solid #334155;
}

    .nav-tabs > li > a {
        color: #94a3b8;
        border-radius: 8px 8px 0 0;
    }

        .nav-tabs > li > a:hover {
            border-color: #334155;
            background-color: rgba(168, 85, 247, 0.1);
            color: #a855f7;
        }

    .nav-tabs > li.active > a,
    .nav-tabs > li.active > a:hover,
    .nav-tabs > li.active > a:focus {
        background-color: #1e293b;
        border-color: #334155 #334155 transparent;
        color: #a855f7;
    }

/* ========================================
   PILLS
   ======================================== */
.nav-pills > li > a {
    color: #94a3b8;
    border-radius: 8px;
}

    .nav-pills > li > a:hover {
        background-color: rgba(168, 85, 247, 0.1);
        color: #a855f7;
    }

.nav-pills > li.active > a {
    background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%);
    color: #ffffff;
}

/* ========================================
   INPUTS ESPECIALES
   ======================================== */
input[type="checkbox"],
input[type="radio"] {
    accent-color: #a855f7;
}

/* ========================================
   SCROLLBAR
   ======================================== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #1e293b;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%);
    border-radius: 5px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: linear-gradient(135deg, #9333ea 0%, #7c3aed 100%);
    }

/* ========================================
   UTILIDADES
   ======================================== */
.text-primary {
    color: #a855f7 !important;
}

.text-success {
    color: #10b981 !important;
}

.text-info {
    color: #3b82f6 !important;
}

.text-warning {
    color: #f59e0b !important;
}

.text-danger {
    color: #ef4444 !important;
}

.text-muted {
    color: #64748b !important;
}

.bg-primary {
    background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%) !important;
    color: #ffffff !important;
}

.bg-dark {
    background-color: #0f172a !important;
}

/* ========================================
   SOMBRAS
   ======================================== */
.shadow-sm {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
}

.shadow {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

/* ========================================
   ANIMACIONES
   ======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

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

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 767px) {
    .navbar-brand {
        font-size: 20px;
        padding: 15px;
    }

    .sidebar {
        border-right: none;
        border-bottom: 1px solid rgba(168, 85, 247, 0.2);
    }
}
