/* ============================================================================
   app/static/css/custom.css - ESTILOS PERSONALIZADOS PHARMIVET
   ============================================================================ */
/* ============================================================================
   ZEUS - CUSTOM VARIABLES
   ============================================================================ */

:root {
    --zeus-primary: #1e40af;
    --zeus-primary-dark: #1e3a8a;
    --zeus-secondary: #7c3aed;
    --zeus-gold: #fbbf24;
    --zeus-alert: #ef4444;
    --zeus-gradient: linear-gradient(135deg, #1e40af 0%, #7c3aed 100%);
}

/* Zeus Branding */
.zeus-gradient {
    background: var(--zeus-gradient);
}

.zeus-text-gradient {
    background: var(--zeus-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.zeus-badge {
    background: var(--zeus-gold);
    color: #000;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
}

.zeus-badge::before {
    content: '⚡';
    margin-right: 0.25rem;
}

/* Alertas estilo Zeus */
.zeus-alert {
    border-left: 4px solid var(--zeus-alert);
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.1), transparent);
    animation: pulse-alert 2s infinite;
}

@keyframes pulse-alert {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* Botones Zeus */
.btn-zeus {
    background: var(--zeus-gradient);
    color: white;
    border: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-zeus:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(30, 64, 175, 0.4);
    color: white;
}

/* Dashboard Widget estilo Zeus */
.widget-header {
    background: var(--zeus-gradient);
    position: relative;
    overflow: hidden;
}

.widget-header::before {
    content: '⚡';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
    opacity: 0.15;
}
:root {
    --primary-color: #366092;
    --primary-dark: #2a4d75;
    --secondary-color: #764ba2;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-bg: #f8f9fa;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.2);
    --transition: all 0.3s ease;
}

/* ============================================================================
   ESTILOS GENERALES
   ============================================================================ */

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* ============================================================================
   NAVBAR
   ============================================================================ */

.navbar {
    box-shadow: var(--shadow-sm);
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.3rem;
}

.nav-link {
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    transform: translateY(-2px);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: white;
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 80%;
}

/* ============================================================================
   CARDS
   ============================================================================ */

.card {
    border: none;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.card-header {
    border: none;
    font-weight: 600;
    padding: 1rem 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    background-color: transparent;
    border-top: 1px solid rgba(0,0,0,0.05);
    padding: 1rem 1.5rem;
}

/* Cards de estadísticas */
.stat-card {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.stat-card .stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 0.5rem 0;
}

.stat-card .stat-label {
    opacity: 0.9;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ============================================================================
   DASHBOARD WIDGETS
   ============================================================================ */

.dashboard-widget {
    margin-bottom: 1.5rem;
}

.widget-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1.2rem 1.5rem;
    border-radius: 12px 12px 0 0;
    font-weight: 600;
}

.widget-body {
    padding: 1.5rem;
    background: white;
    border-radius: 0 0 12px 12px;
    min-height: 350px;
}

.widget-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

/* ============================================================================
   BOTONES
   ============================================================================ */

.btn {
    border-radius: 8px;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.btn-group .btn {
    border-radius: 0;
}

.btn-group .btn:first-child {
    border-radius: 8px 0 0 8px;
}

.btn-group .btn:last-child {
    border-radius: 0 8px 8px 0;
}

/* ============================================================================
   TABLAS
   ============================================================================ */

.table {
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

.table thead {
    background-color: var(--light-bg);
}

.table thead th {
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    color: #666;
    padding: 1rem;
}

.table tbody tr {
    transition: var(--transition);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.table tbody tr:last-child {
    border-bottom: none;
}

.table-hover tbody tr:hover {
    background-color: rgba(54, 96, 146, 0.05);
    transform: scale(1.01);
}

.table td {
    padding: 1rem;
    vertical-align: middle;
}

/* ============================================================================
   BADGES
   ============================================================================ */

.badge {
    padding: 0.4rem 0.8rem;
    font-weight: 500;
    border-radius: 6px;
    font-size: 0.85rem;
}

.badge i {
    margin-right: 0.25rem;
}

/* ============================================================================
   FORMULARIOS
   ============================================================================ */

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.form-control,
.form-select {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.6rem 1rem;
    transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(54, 96, 146, 0.15);
}

.form-control-lg {
    padding: 0.8rem 1.2rem;
    font-size: 1.1rem;
}

/* ============================================================================
   MODALES
   ============================================================================ */

.modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 12px 12px 0 0;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.modal-footer {
    border: none;
    padding: 1.5rem;
}

/* ============================================================================
   ALERTAS
   ============================================================================ */

.alert {
    border: none;
    border-radius: 10px;
    padding: 1rem 1.5rem;
    border-left: 4px solid;
}

.alert-success {
    background-color: #d4edda;
    border-left-color: var(--success-color);
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    border-left-color: var(--danger-color);
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    border-left-color: var(--warning-color);
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    border-left-color: var(--info-color);
    color: #0c5460;
}

/* ============================================================================
   BREADCRUMBS
   ============================================================================ */

.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: 1.5rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    font-size: 1.2rem;
    color: #6c757d;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb-item a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ============================================================================
   LOADING / SPINNER
   ============================================================================ */

.htmx-indicator {
    display: none;
}

.htmx-request .htmx-indicator {
    display: inline-block;
}

.htmx-loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner-border-sm {
    width: 1.2rem;
    height: 1.2rem;
    border-width: 0.15em;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border-radius: 12px;
}

/* ============================================================================
   FOOTER
   ============================================================================ */

footer {
    margin-top: auto;
    padding: 2rem 0;
    background-color: white;
    border-top: 1px solid #e0e0e0;
}

/* ============================================================================
   UTILIDADES
   ============================================================================ */

.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-hover {
    transition: var(--transition);
}

.shadow-hover:hover {
    box-shadow: var(--shadow-lg);
}

.cursor-pointer {
    cursor: pointer;
}

/* ============================================================================
   ANIMACIONES
   ============================================================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

.pulse {
    animation: pulse 2s infinite;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 768px) {
    .container-fluid {
        padding: 0.5rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .widget-header {
        padding: 1rem;
        font-size: 0.95rem;
    }
    
    .widget-body {
        padding: 1rem;
        min-height: 250px;
    }
    
    .stat-card .stat-value {
        font-size: 2rem;
    }
    
    .table {
        font-size: 0.9rem;
    }
    
    .btn-group {
        display: flex;
        flex-direction: column;
    }
    
    .btn-group .btn {
        border-radius: 8px !important;
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 576px) {
    h2 {
        font-size: 1.5rem;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn {
        padding: 0.4rem 1rem;
        font-size: 0.9rem;
    }
}

/* ============================================================================
   PRINT STYLES
   ============================================================================ */

@media print {
    .navbar,
    .breadcrumb,
    .btn,
    footer,
    .no-print {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    body {
        background: white;
    }
}

/* ============================================================================
   DARK MODE (OPCIONAL - PREPARADO PARA FUTURO)
   ============================================================================ */

@media (prefers-color-scheme: dark) {
    /* Descomentar cuando se implemente dark mode
    body {
        background-color: #1a1a1a;
        color: #e0e0e0;
    }
    
    .card {
        background-color: #2d2d2d;
        color: #e0e0e0;
    }
    
    .table {
        background-color: #2d2d2d;
        color: #e0e0e0;
    }
    */
}

/* ============================================================================
   FIN DE CUSTOM.CSS
   ============