/**
 * InnoSoftGT - Sistema de Gestión Empresarial
 * Estilos Principales - Diseño Moderno y Profesional
 * 
 * Paleta de Colores:
 * - Primary: #0D47A1 (Azul Corporativo Profundo)
 * - Secondary: #1565C0 (Azul Medio)
 * - Accent: #00BFA5 (Verde Teal)
 * - Success: #00C853 (Verde Brillante)
 * - Warning: #FFB300 (Ámbar)
 * - Danger: #FF1744 (Rojo Vibrante)
 */

/* ============================================
   CSS CUSTOM PROPERTIES (Variables)
   ============================================ */
:root {
    /* Colores Principales */
    --primary: #0D47A1;
    --primary-light: #1565C0;
    --primary-dark: #002171;
    --primary-gradient: linear-gradient(135deg, #0D47A1 0%, #1565C0 50%, #1E88E5 100%);
    
    /* Colores de Acento */
    --accent: #00BFA5;
    --accent-light: #64FFDA;
    --accent-dark: #00897B;
    
    /* Estados */
    --success: #00C853;
    --success-light: #69F0AE;
    --warning: #FFB300;
    --warning-light: #FFE082;
    --danger: #FF1744;
    --danger-light: #FF8A80;
    --info: #00B0FF;
    --info-light: #80D8FF;
    
    /* Neutros */
    --dark: #1A237E;
    --gray-900: #212529;
    --gray-800: #343a40;
    --gray-700: #495057;
    --gray-600: #6c757d;
    --gray-500: #adb5bd;
    --gray-400: #ced4da;
    --gray-300: #dee2e6;
    --gray-200: #e9ecef;
    --gray-100: #f8f9fa;
    --white: #ffffff;
    
    /* Backgrounds */
    --bg-body: #F5F7FA;
    --bg-card: #ffffff;
    --bg-sidebar: linear-gradient(180deg, #0D47A1 0%, #1A237E 100%);
    
    /* Sombras */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 12px 48px rgba(0, 0, 0, 0.15);
    --shadow-card: 0 2px 20px rgba(13, 71, 161, 0.08);
    --shadow-card-hover: 0 8px 30px rgba(13, 71, 161, 0.15);
    
    /* Bordes */
    --border-radius-sm: 8px;
    --border-radius: 12px;
    --border-radius-lg: 16px;
    --border-radius-xl: 24px;
    
    /* Transiciones */
    --transition-fast: 0.15s ease;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Sidebar */
    --sidebar-width: 280px;
    --sidebar-collapsed: 80px;
    
    /* Topbar */
    --topbar-height: 70px;
}

/* ============================================
   IMPORTAR FUENTES
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--gray-800);
    background: var(--bg-body);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   TIPOGRAFÍA
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--dark);
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   LAYOUT PRINCIPAL
   ============================================ */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding-top: var(--topbar-height);
    transition: margin-left var(--transition);
}

.main-content.expanded {
    margin-left: var(--sidebar-collapsed);
}

.content-wrapper {
    padding: 24px;
    min-height: calc(100vh - var(--topbar-height));
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-sidebar);
    z-index: 1000;
    transition: width var(--transition);
    overflow: hidden;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar-header {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--white);
}

.sidebar-logo .logo-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
    color: var(--white);
    box-shadow: 0 4px 15px rgba(0, 191, 165, 0.3);
}

.sidebar-logo .logo-text {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
    white-space: nowrap;
}

.sidebar-logo .logo-text span {
    color: var(--accent-light);
}

.sidebar.collapsed .logo-text {
    display: none;
}

/* Sidebar Menu */
.sidebar-menu {
    padding: 20px 12px;
    height: calc(100vh - var(--topbar-height) - 80px);
    overflow-y: auto;
}

.sidebar-menu::-webkit-scrollbar {
    width: 4px;
}

.sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.menu-section {
    margin-bottom: 24px;
}

.menu-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.4);
    padding: 0 16px;
    margin-bottom: 8px;
}

.sidebar.collapsed .menu-section-title {
    display: none;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: var(--border-radius);
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all var(--transition);
    margin-bottom: 4px;
    position: relative;
    overflow: hidden;
}

.menu-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: var(--accent);
    transform: scaleY(0);
    transition: transform var(--transition);
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.menu-item.active {
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
}

.menu-item.active::before {
    transform: scaleY(1);
}

.menu-item i {
    font-size: 18px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.menu-item .menu-text {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.sidebar.collapsed .menu-text {
    display: none;
}

.menu-item .badge {
    margin-left: auto;
    background: var(--accent);
    color: var(--white);
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
}

.sidebar.collapsed .menu-item .badge {
    display: none;
}

/* Sidebar Footer */
.sidebar-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: var(--border-radius);
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--white);
    font-size: 14px;
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

.sidebar.collapsed .sidebar-user-info {
    display: none;
}

/* ============================================
   TOPBAR
   ============================================ */
.topbar {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--topbar-height);
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 999;
    transition: left var(--transition);
    box-shadow: var(--shadow-sm);
}

.topbar.expanded {
    left: var(--sidebar-collapsed);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.toggle-sidebar {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--gray-100);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    color: var(--gray-700);
}

.toggle-sidebar:hover {
    background: var(--primary);
    color: var(--white);
}

.page-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--gray-600);
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-search {
    position: relative;
}

.topbar-search input {
    width: 280px;
    padding: 10px 16px 10px 44px;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius);
    font-size: 13px;
    transition: all var(--transition);
    background: var(--gray-100);
}

.topbar-search input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(13, 71, 161, 0.1);
}

.topbar-search i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-500);
}

.topbar-icon-btn {
    width: 42px;
    height: 42px;
    border: none;
    background: transparent;
    border-radius: var(--border-radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: var(--gray-700);
    transition: all var(--transition);
}

.topbar-icon-btn:hover {
    background: var(--gray-100);
    color: var(--primary);
}

.topbar-icon-btn .notification-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid var(--white);
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    border: none;
    box-shadow: var(--shadow-card);
    transition: all var(--transition);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-card-hover);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--gray-200);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-title i {
    color: var(--primary);
}

.card-body {
    padding: 24px;
}

.card-footer {
    background: var(--gray-100);
    border-top: 1px solid var(--gray-200);
    padding: 16px 24px;
}

/* Stat Cards */
.stat-card {
    position: relative;
    padding: 24px;
    border-radius: var(--border-radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: all var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
}

.stat-card.primary::before { background: var(--primary-gradient); }
.stat-card.success::before { background: linear-gradient(135deg, var(--success) 0%, var(--success-light) 100%); }
.stat-card.warning::before { background: linear-gradient(135deg, var(--warning) 0%, var(--warning-light) 100%); }
.stat-card.info::before { background: linear-gradient(135deg, var(--info) 0%, var(--info-light) 100%); }
.stat-card.danger::before { background: linear-gradient(135deg, var(--danger) 0%, var(--danger-light) 100%); }
.stat-card.accent::before { background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%); }

.stat-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 16px;
}

.stat-card-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-card.primary .stat-card-icon { background: rgba(13, 71, 161, 0.1); color: var(--primary); }
.stat-card.success .stat-card-icon { background: rgba(0, 200, 83, 0.1); color: var(--success); }
.stat-card.warning .stat-card-icon { background: rgba(255, 179, 0, 0.1); color: var(--warning); }
.stat-card.info .stat-card-icon { background: rgba(0, 176, 255, 0.1); color: var(--info); }
.stat-card.danger .stat-card-icon { background: rgba(255, 23, 68, 0.1); color: var(--danger); }
.stat-card.accent .stat-card-icon { background: rgba(0, 191, 165, 0.1); color: var(--accent); }

.stat-card-trend {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 20px;
}

.stat-card-trend.up {
    background: rgba(0, 200, 83, 0.1);
    color: var(--success);
}

.stat-card-trend.down {
    background: rgba(255, 23, 68, 0.1);
    color: var(--danger);
}

.stat-card-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--dark);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-card-label {
    font-size: 13px;
    color: var(--gray-600);
    font-weight: 500;
}

.stat-card-footer {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--gray-200);
}

.stat-card-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition);
}

.stat-card-link:hover {
    gap: 10px;
}

/* ============================================
   BOTONES
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--border-radius);
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(13, 71, 161, 0.2);
}

.btn-primary {
    background: var(--primary-gradient);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(13, 71, 161, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 71, 161, 0.4);
    color: var(--white);
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-800);
    border: 2px solid var(--gray-200);
}

.btn-secondary:hover {
    background: var(--gray-200);
    color: var(--gray-900);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #00E676 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(0, 200, 83, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 200, 83, 0.4);
    color: var(--white);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning) 0%, #FFC107 100%);
    color: var(--dark);
    box-shadow: 0 4px 15px rgba(255, 179, 0, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #FF5252 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(255, 23, 68, 0.3);
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--border-radius-sm);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
}

/* ============================================
   TABLAS
   ============================================ */
.table-container {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.table thead {
    background: var(--gray-100);
}

.table th {
    padding: 16px 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-700);
    text-align: left;
    border-bottom: 2px solid var(--gray-200);
}

.table td {
    padding: 16px 20px;
    font-size: 14px;
    color: var(--gray-800);
    border-bottom: 1px solid var(--gray-100);
    vertical-align: middle;
}

.table tbody tr {
    transition: all var(--transition);
}

.table tbody tr:hover {
    background: rgba(13, 71, 161, 0.02);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* ============================================
   BADGES
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    text-transform: capitalize;
}

.badge i {
    font-size: 10px;
}

.badge-primary { background: rgba(13, 71, 161, 0.1); color: var(--primary); }
.badge-secondary { background: var(--gray-200); color: var(--gray-700); }
.badge-success { background: rgba(0, 200, 83, 0.1); color: var(--success); }
.badge-warning { background: rgba(255, 179, 0, 0.15); color: #E65100; }
.badge-danger { background: rgba(255, 23, 68, 0.1); color: var(--danger); }
.badge-info { background: rgba(0, 176, 255, 0.1); color: var(--info); }

/* ============================================
   FORMULARIOS
   ============================================ */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.form-label.required::after {
    content: '*';
    color: var(--danger);
    margin-left: 4px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    font-family: inherit;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius);
    background: var(--white);
    transition: all var(--transition);
    color: var(--gray-800);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(13, 71, 161, 0.1);
}

.form-control::placeholder {
    color: var(--gray-500);
}

.form-control.is-invalid {
    border-color: var(--danger);
}

.form-control.is-valid {
    border-color: var(--success);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%236c757d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 44px;
}

.input-group {
    display: flex;
    align-items: stretch;
}

.input-group .form-control {
    border-radius: var(--border-radius) 0 0 var(--border-radius);
}

.input-group-text {
    padding: 12px 16px;
    background: var(--gray-100);
    border: 2px solid var(--gray-200);
    border-left: none;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    color: var(--gray-600);
}

.form-text {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 6px;
}

.invalid-feedback {
    font-size: 12px;
    color: var(--danger);
    margin-top: 6px;
}

/* ============================================
   MODALES
   ============================================ */
.modal-content {
    border: none;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--gray-200);
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-100);
}

.btn-close {
    background: var(--gray-200);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    opacity: 1;
    transition: all var(--transition);
}

.btn-close:hover {
    background: var(--gray-300);
}

/* ============================================
   ALERTAS
   ============================================ */
.alert {
    padding: 16px 20px;
    border-radius: var(--border-radius);
    border: none;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
}

.alert i {
    font-size: 20px;
    margin-top: 2px;
}

.alert-primary { background: rgba(13, 71, 161, 0.1); color: var(--primary); }
.alert-success { background: rgba(0, 200, 83, 0.1); color: var(--success); }
.alert-warning { background: rgba(255, 179, 0, 0.15); color: #E65100; }
.alert-danger { background: rgba(255, 23, 68, 0.1); color: var(--danger); }
.alert-info { background: rgba(0, 176, 255, 0.1); color: var(--info); }

/* ============================================
   PÁGINA DE LOGIN
   ============================================ */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0D47A1 0%, #1A237E 50%, #000051 100%);
    position: relative;
    overflow: hidden;
}

.login-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 191, 165, 0.15) 0%, transparent 60%);
    animation: pulse 15s ease-in-out infinite;
}

.login-wrapper::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(30, 136, 229, 0.1) 0%, transparent 60%);
    animation: pulse 12s ease-in-out infinite reverse;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.login-card {
    width: 100%;
    max-width: 440px;
    background: var(--white);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 48px;
    position: relative;
    z-index: 1;
    animation: slideUp 0.6s ease-out;
}

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

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo .logo-icon {
    width: 72px;
    height: 72px;
    background: var(--primary-gradient);
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 16px;
    box-shadow: 0 8px 30px rgba(13, 71, 161, 0.3);
}

.login-logo h1 {
    font-size: 28px;
    font-weight: 800;
    color: var(--dark);
}

.login-logo h1 span {
    color: var(--accent);
}

.login-logo p {
    font-size: 14px;
    color: var(--gray-600);
    margin-top: 4px;
}

.login-form .form-group {
    margin-bottom: 24px;
}

.login-form .form-control {
    padding: 14px 18px;
    font-size: 15px;
}

.login-form .btn-primary {
    width: 100%;
    padding: 14px;
    font-size: 16px;
}

.login-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--gray-200);
}

.login-footer p {
    font-size: 13px;
    color: var(--gray-600);
}

.login-footer a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

/* ============================================
   ANIMACIONES
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInLeft {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInRight {
    from { transform: translateX(20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

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

@keyframes scaleIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.animate-fade-in { animation: fadeIn 0.5s ease-out; }
.animate-slide-left { animation: slideInLeft 0.5s ease-out; }
.animate-slide-right { animation: slideInRight 0.5s ease-out; }
.animate-slide-up { animation: slideInUp 0.5s ease-out; }
.animate-scale { animation: scaleIn 0.5s ease-out; }

/* Staggered animations */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }

/* ============================================
   UTILIDADES
   ============================================ */
.text-primary { color: var(--primary) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-danger { color: var(--danger) !important; }
.text-info { color: var(--info) !important; }
.text-muted { color: var(--gray-600) !important; }

.bg-primary { background-color: var(--primary) !important; }
.bg-success { background-color: var(--success) !important; }
.bg-warning { background-color: var(--warning) !important; }
.bg-danger { background-color: var(--danger) !important; }

.fw-400 { font-weight: 400 !important; }
.fw-500 { font-weight: 500 !important; }
.fw-600 { font-weight: 600 !important; }
.fw-700 { font-weight: 700 !important; }
.fw-800 { font-weight: 800 !important; }

.rounded { border-radius: var(--border-radius) !important; }
.rounded-lg { border-radius: var(--border-radius-lg) !important; }
.rounded-xl { border-radius: var(--border-radius-xl) !important; }

.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.shadow-md { box-shadow: var(--shadow-md) !important; }
.shadow-lg { box-shadow: var(--shadow-lg) !important; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1200px) {
    .topbar-search input {
        width: 200px;
    }
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .topbar {
        left: 0;
    }
    
    .topbar-search {
        display: none;
    }
}

@media (max-width: 768px) {
    .content-wrapper {
        padding: 16px;
    }
    
    .stat-card-value {
        font-size: 24px;
    }
    
    .login-card {
        margin: 16px;
        padding: 32px 24px;
    }
}

/* ============================================
   DATATABLES CUSTOMIZATION
   ============================================ */
.dataTables_wrapper .dataTables_filter input {
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius);
    padding: 8px 12px;
    margin-left: 8px;
}

.dataTables_wrapper .dataTables_filter input:focus {
    outline: none;
    border-color: var(--primary);
}

.dataTables_wrapper .dataTables_length select {
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius-sm);
    padding: 6px 30px 6px 12px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: var(--border-radius-sm) !important;
    border: none !important;
    margin: 0 2px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--primary) !important;
    color: var(--white) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--gray-200) !important;
    color: var(--gray-800) !important;
}

/* ============================================
   CHARTS
   ============================================ */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* ============================================
   EMPTY STATES
   ============================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-icon {
    width: 120px;
    height: 120px;
    background: var(--gray-100);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: var(--gray-400);
    margin-bottom: 24px;
}

.empty-state-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
}

.empty-state-text {
    font-size: 14px;
    color: var(--gray-600);
    margin-bottom: 24px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================
   ACTIONS DROPDOWN
   ============================================ */
.dropdown-menu {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 8px;
}

.dropdown-item {
    padding: 10px 16px;
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all var(--transition);
}

.dropdown-item:hover {
    background: var(--gray-100);
}

.dropdown-item i {
    width: 18px;
    color: var(--gray-600);
}

.dropdown-item.text-danger i {
    color: var(--danger);
}

.dropdown-divider {
    margin: 8px 0;
    border-color: var(--gray-200);
}

/* ============================================
   QUICK ACTIONS
   ============================================ */
.quick-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius);
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    cursor: pointer;
    transition: all var(--transition);
}

.quick-action-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(13, 71, 161, 0.05);
}

.quick-action-btn i {
    font-size: 16px;
}

/* ============================================
   RECENT ACTIVITY
   ============================================ */
.activity-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--gray-100);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 2px;
}

.activity-text {
    font-size: 13px;
    color: var(--gray-600);
}

.activity-time {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 4px;
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .sidebar,
    .topbar,
    .btn,
    .no-print {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
        padding-top: 0 !important;
    }
    
    .content-wrapper {
        padding: 0 !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}
/* Fix para dropdown en tablas */
.table-responsive {
    overflow: visible !important;
}

.card-body .table-responsive {
    overflow-x: auto;
    overflow-y: visible;
}

.dropdown-menu {
    z-index: 1050;
}

/* Asegurar que el dropdown se muestre correctamente */
.table .dropdown {
    position: static;
}

.table .dropdown-menu {
    position: absolute;
    right: 0;
    left: auto;
}
/* Fix urgente para dropdown */
.card {
    overflow: visible !important;
}

.card-body {
    overflow: visible !important;
}

.table-responsive {
    overflow: visible !important;
}