/* 
 * Sistema de Licencias GD - Panel de Administración
 * Diseño moderno inspirado en interfaces banking/fintech
 * Versión: 2.0 - Rediseño minimalista
 */

/* Variables CSS - Paleta Banking/Fintech */
:root {
    /* Colores principales */
    --primary-dark: #1a1d23;
    --primary-darker: #141619;
    --accent-blue: #4f46e5;
    --accent-blue-light: #6366f1;
    --accent-green: #10b981;
    --accent-orange: #f59e0b;
    --accent-red: #ef4444;
    
    /* Grises neutros */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* Sistema de diseño */
    --border-radius: 12px;
    --border-radius-lg: 16px;
    --border-radius-sm: 8px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset y base */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.6;
    font-weight: 400;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Layout principal */
.container-fluid {
    padding: 0;
    max-width: 100%;
}

/* Header/Navbar rediseñado */
.navbar {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-darker) 100%);
    border: none;
    box-shadow: var(--shadow-lg);
    padding: 1rem 1.5rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    height: 70px;
}

.navbar-brand {
    color: white !important;
    font-weight: 700;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.navbar-brand i {
    background: var(--accent-blue);
    padding: 0.5rem;
    border-radius: var(--border-radius-sm);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    margin: 0 0.25rem;
    transition: var(--transition);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: white !important;
    background-color: rgba(255, 255, 255, 0.1);
}

/* Sidebar moderno */
.sidebar {
    position: fixed;
    top: 70px;
    left: 0;
    width: 280px;
    height: calc(100vh - 70px);
    background: white;
    border-right: 1px solid var(--gray-200);
    box-shadow: var(--shadow);
    z-index: 1040;
    overflow-y: auto;
    padding: 1.5rem 0;
}

.sidebar .nav-link {
    color: var(--gray-700);
    font-weight: 500;
    padding: 0.875rem 1.5rem;
    margin: 0.125rem 1rem;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
}

.sidebar .nav-link i {
    width: 20px;
    color: var(--gray-500);
    font-size: 1.1rem;
}

.sidebar .nav-link:hover {
    background-color: var(--gray-100);
    color: var(--gray-900);
    transform: translateX(2px);
}

.sidebar .nav-link.active {
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-blue-light) 100%);
    color: white;
    font-weight: 600;
}

.sidebar .nav-link.active i {
    color: white;
}

.sidebar-heading {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    color: var(--gray-500);
    padding: 0 1.5rem;
    margin: 1.5rem 0 0.5rem 0;
}

/* Contenido principal */
main {
    margin-left: 280px;
    margin-top: 70px;
    padding: 2rem;
    min-height: calc(100vh - 70px);
}

/* Page Header */
.page-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0;
    line-height: 1.2;
}

.page-subtitle {
    color: var(--gray-600);
    font-size: 1rem;
    margin: 0.5rem 0 0 0;
    font-weight: 400;
}

/* Cards modernas */
.card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.card-header {
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    color: var(--gray-900);
    border-radius: 0;
}

.card-body {
    padding: 1.5rem;
}

/* Stats Cards estilo FINEbank */
.stats-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.stats-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-blue-light));
}

.stats-card.success::before {
    background: linear-gradient(90deg, var(--accent-green), #34d399);
}

.stats-card.danger::before {
    background: linear-gradient(90deg, var(--accent-red), #f87171);
}

.stats-card.warning::before {
    background: linear-gradient(90deg, var(--accent-orange), #fbbf24);
}

.stats-card.info::before {
    background: linear-gradient(90deg, #06b6d4, #38bdf8);
}

.stats-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.025em;
    margin-bottom: 0.5rem;
}

.stats-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1;
}

.stats-icon {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 48px;
    height: 48px;
    background: var(--gray-100);
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
    font-size: 1.25rem;
}

.stats-card.success .stats-icon {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-green);
}

.stats-card.danger .stats-icon {
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-red);
}

.stats-card.warning .stats-icon {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent-orange);
}

.stats-card.info .stats-icon {
    background: rgba(6, 182, 212, 0.1);
    color: #06b6d4;
}

/* Botones modernos */
.btn {
    font-weight: 500;
    border-radius: var(--border-radius-sm);
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    transition: var(--transition);
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    line-height: 1.25;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-blue-light) 100%);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    box-shadow: var(--shadow);
    background: linear-gradient(135deg, #4338ca 0%, var(--accent-blue) 100%);
}

.btn-success {
    background: linear-gradient(135deg, var(--accent-green) 0%, #34d399 100%);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-success:hover {
    box-shadow: var(--shadow);
}

.btn-outline-primary {
    background: transparent;
    border: 1px solid var(--accent-blue);
    color: var(--accent-blue);
}

.btn-outline-primary:hover {
    background: var(--accent-blue);
    color: white;
}

.btn-outline-secondary {
    background: transparent;
    border: 1px solid var(--gray-300);
    color: var(--gray-700);
}

.btn-outline-secondary:hover {
    background: var(--gray-100);
    border-color: var(--gray-400);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

/* Formularios modernos */
.form-control {
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius-sm);
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    transition: var(--transition);
    background: white;
    color: var(--gray-900);
}

.form-control:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    outline: none;
}

.form-label {
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.form-select {
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius-sm);
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    background: white url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e") no-repeat right 0.75rem center/1.5em 1.5em;
}

/* Tablas elegantes */
.table {
    margin: 0;
    font-size: 0.875rem;
    background: white;
}

.table thead th {
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    font-weight: 600;
    color: var(--gray-700);
    padding: 1rem 1.25rem;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.table tbody td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--gray-100);
    vertical-align: middle;
}

.table tbody tr:hover {
    background-color: var(--gray-50);
}

/* Badges modernos */
.badge {
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.badge.bg-success {
    background: var(--accent-green) !important;
    color: white;
}

.badge.bg-danger {
    background: var(--accent-red) !important;
    color: white;
}

.badge.bg-warning {
    background: var(--accent-orange) !important;
    color: white;
}

.badge.bg-primary {
    background: var(--accent-blue) !important;
    color: white;
}

/* Alertas modernas */
.alert {
    border: none;
    border-radius: var(--border-radius);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-left-color: var(--accent-green);
    color: #065f46;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border-left-color: var(--accent-red);
    color: #991b1b;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border-left-color: var(--accent-orange);
    color: #92400e;
}

.alert-info {
    background: rgba(79, 70, 229, 0.1);
    border-left-color: var(--accent-blue);
    color: #3730a3;
}

/* Paginación */
.pagination {
    gap: 0.25rem;
}

.pagination .page-link {
    border: 1px solid var(--gray-300);
    color: var(--gray-700);
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    font-size: 0.875rem;
    transition: var(--transition);
}

.pagination .page-link:hover {
    background: var(--gray-100);
    border-color: var(--gray-400);
    color: var(--gray-900);
}

.pagination .page-item.active .page-link {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: white;
}

/* Modales */
.modal-content {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
}

.modal-header {
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    padding: 1.25rem 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    padding: 1.25rem 1.5rem;
}

/* Utilidades adicionales */
.text-muted {
    color: var(--gray-500) !important;
}

.text-break {
    word-wrap: break-word;
    word-break: break-word;
}

.user-select-all {
    user-select: all;
}

.cursor-pointer {
    cursor: pointer;
}

/* Avatar placeholder */
.avatar-placeholder {
    width: 80px;
    height: 80px;
    background: var(--gray-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: var(--gray-500);
}

/* Responsive */
@media (max-width: 768px) {
    main {
        margin-left: 0;
        padding: 1rem;
    }
    
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .stats-card {
        height: auto;
        min-height: 100px;
    }
    
    .stats-icon {
        position: static;
        width: 32px;
        height: 32px;
        margin-bottom: 0.5rem;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    .card-body {
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    .navbar {
        padding: 0.75rem 1rem;
    }
    
    .stats-value {
        font-size: 1.5rem;
    }
    
    .table-responsive {
        border-radius: var(--border-radius);
    }
    
    .btn {
        width: 100%;
        justify-content: center;
        margin-bottom: 0.5rem;
    }
    
    .btn-group .btn {
        width: auto;
        margin-bottom: 0;
    }
} 