/* ============================================================
   IGUNAPHARMA - CLEAN PROFESSIONAL DESIGN
   Sin sombras, 100% ancho, totalmente responsive
   ============================================================ */

/* ============================================================
   CSS VARIABLES
   ============================================================ */
:root {
    /* Colores Corporativos */
    --primary: #0069a4;
    --primary-dark: #004d7a;
    --primary-light: #46ace6;
    --primary-gradient: linear-gradient(135deg, #0069a4 0%, #004d7a 100%);

    --secondary: #00b997;
    --secondary-dark: #009578;
    --secondary-light: #00d4ad;
    --secondary-gradient: linear-gradient(135deg, #00b997 0%, #009578 100%);

    --accent: #46ace6;
    --accent-light: #c7ebff;

    /* Colores de Estado */
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --info: #3b82f6;
    --info-light: #dbeafe;

    /* Escala de Grises */
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    /* Bordes */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;

    /* Transiciones */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
}

/* ============================================================
   BASE & TYPOGRAPHY
   ============================================================ */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--gray-700);
    background: var(--gray-50);
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 1rem;
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

/* ============================================================
   LAYOUT - Full Width
   ============================================================ */
.container {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 15px;
    padding-right: 15px;
}

.container-fluid {
    padding-left: 15px;
    padding-right: 15px;
}

/* ============================================================
   NAVIGATION - Full Width, No Shadow
   ============================================================ */
.top-menu-bar-light {
    background: white;
    border-radius: 0;
    box-shadow: none;
    padding: 0.75rem 1rem !important;
    border-bottom: 2px solid var(--gray-200);
    width: 100%;
}

.navLinkDesktop {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-600);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.navLinkDesktop:hover {
    color: var(--primary);
    background: var(--accent-light);
    text-decoration: none;
}

.navLinkDesktop i {
    font-size: 1rem;
}

/* Dropdown Menu */
.dropdown-menu {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    box-shadow: none;
    padding: 0.5rem;
    margin-top: 0.25rem;
    min-width: 200px;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: var(--gray-700);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.dropdown-item:hover {
    background: var(--accent-light);
    color: var(--primary);
}

.dropdown-item i {
    font-size: 1rem;
    color: var(--gray-400);
}

.dropdown-item:hover i {
    color: var(--primary);
}

/* Menu Line */
.menuLine {
    margin: 1rem 0;
    border: none;
    height: 2px;
    background: var(--primary-gradient);
}

/* Desktop / Mobile */
.desktop {
    display: flex;
}

.mobile {
    display: none;
}

/* ============================================================
   BUTTONS - Modern with Gradient
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    border: none;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.btn:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Primary Button */
.btn-primary {
    background: var(--secondary-gradient);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #00d4ad 0%, #00b997 100%);
    color: white;
    transform: translateY(-1px);
}

/* Info Button */
.btn-info {
    background: var(--primary-gradient);
    color: white;
}

.btn-info:hover {
    background: linear-gradient(135deg, #46ace6 0%, #0069a4 100%);
    color: white;
    transform: translateY(-1px);
}

/* Secondary Button */
.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background: var(--gray-300);
    color: var(--gray-800);
}

/* Success Button */
.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    color: white;
    transform: translateY(-1px);
}

/* Danger Button */
.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
    color: white;
    transform: translateY(-1px);
}

/* Warning Button */
.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    transform: translateY(-1px);
}

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

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

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

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

/* Button Sizes */
.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

/* ============================================================
   ACTION BUTTONS - Modern Style (like menu)
   ============================================================ */
.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.btn-action i {
    font-size: 1rem;
}

/* View Action */
.btn-action-view {
    background: var(--accent-light);
    color: var(--primary);
}

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

/* Edit Action */
.btn-action-edit {
    background: var(--warning-light);
    color: var(--warning);
}

.btn-action-edit:hover {
    background: var(--warning);
    color: white;
}

/* Delete Action */
.btn-action-delete {
    background: var(--danger-light);
    color: var(--danger);
}

.btn-action-delete:hover {
    background: var(--danger);
    color: white;
}

/* Success Action */
.btn-action-success {
    background: var(--success-light);
    color: var(--success);
}

.btn-action-success:hover {
    background: var(--success);
    color: white;
}

/* Actions Container */
.table-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

/* ============================================================
   FORMS - Clean Style
   ============================================================ */
label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-family: inherit;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--gray-800);
    background-color: white;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    transition: border-color var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

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

/* Select */
.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.25em 1.25em;
    padding-right: 2rem;
    cursor: pointer;
}

/* Radio & Checkbox */
input[type="radio"],
input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--primary);
    cursor: pointer;
    margin-right: 0.25rem;
}

/* Form Group */
.form-group {
    margin-bottom: 1rem;
}

/* ============================================================
   FILTER SECTION - Fixed Layout
   ============================================================ */
.filter-section {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1rem;
    margin-bottom: 1rem;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.filter-row:last-child {
    margin-bottom: 0;
}

.filter-item {
    flex: 1;
    min-width: 150px;
}

.filter-item-full {
    flex: 0 0 100%;
}

.filter-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--gray-100);
}

/* ============================================================
   TABLES - Full Width, No Shadow
   ============================================================ */
table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border: 1px solid var(--gray-200);
}

/* Solo usar table-responsive cuando sea necesario */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

thead {
    background: var(--primary-gradient);
}

th {
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: white;
    text-align: left;
    white-space: nowrap;
}

td {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-100);
    vertical-align: middle;
}

tbody tr:hover {
    background: var(--gray-50);
}

tbody tr:nth-child(even) {
    background: var(--gray-50);
}

tbody tr:nth-child(even):hover {
    background: var(--gray-100);
}

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

/* Table Footer */
.table-footer {
    background: var(--gray-100) !important;
    font-weight: 600;
}

.table-footer td {
    border-top: 2px solid var(--gray-200);
}

/* Delete Version Icon */
.delete_version,
.eliminar_hora {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    background: var(--danger-light);
    color: var(--danger);
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
}

.delete_version:hover,
.eliminar_hora:hover {
    background: var(--danger);
    color: white;
}

img[src*="trash"] {
    width: 16px;
    height: 16px;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.paginacion {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    justify-content: center;
    margin: 1rem 0;
    padding: 0;
    list-style: none;
}

.paginacion li {
    margin: 0;
    padding: 0;
}

.paginacion li a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-600);
    background: white;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.paginacion li a:hover {
    color: white;
    background: var(--primary);
    border-color: var(--primary);
}

.paginacion li.active a,
.paginacion li a.active {
    color: white;
    background: var(--primary);
    border-color: var(--primary);
}

.paginacionBar {
    padding: 1rem 0;
}

/* ============================================================
   CARDS & CONTAINERS - No Shadow
   ============================================================ */
.card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
}

.card-header {
    background: var(--primary-gradient);
    color: white;
    padding: 1rem;
    font-weight: 600;
    border-bottom: none;
}

.card-body {
    padding: 1rem;
}

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

/* Border Container - No Shadow */
.border {
    background: white !important;
    border: 1px solid var(--gray-200) !important;
    border-radius: var(--radius-lg);
    padding: 1rem;
}

.bordered {
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    padding: 1rem;
    background: white;
}

/* Background Color */
.bgDarkColor {
    background: var(--primary-gradient);
    color: white;
    border-radius: var(--radius-md);
    padding: 0.5rem 1rem;
    font-weight: 600;
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
}

.badge-primary {
    background: var(--accent-light);
    color: var(--primary);
}

.badge-success {
    background: var(--success-light);
    color: var(--success);
}

.badge-warning {
    background: var(--warning-light);
    color: var(--warning);
}

.badge-danger {
    background: var(--danger-light);
    color: var(--danger);
}

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.alert i {
    font-size: 1.25rem;
}

.alert-success {
    background: var(--success-light);
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-danger {
    background: var(--danger-light);
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-warning {
    background: var(--warning-light);
    color: #92400e;
    border: 1px solid #fde68a;
}

.alert-info {
    background: var(--info-light);
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    /*background: linear-gradient(135deg, var(--gray-100) 0%, var(--accent-light) 100%);*/
    padding: 1rem;
}

.login-box {
    width: 100%;
    max-width: 400px;
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
}

/* ============================================================
   BOOTSTRAP SELECT OVERRIDE
   ============================================================ */
.bootstrap-select .dropdown-toggle {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    background: white;
}

.bootstrap-select .dropdown-toggle:focus {
    border-color: var(--primary);
    outline: none;
}

.bootstrap-select .dropdown-menu {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 0.5rem;
}

.bootstrap-select .dropdown-menu .dropdown-item {
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.75rem;
}

.bootstrap-select .dropdown-menu .dropdown-item.active,
.bootstrap-select .dropdown-menu .dropdown-item:active {
    background: var(--primary);
    color: white;
}

/* ============================================================
   UTILITIES
   ============================================================ */
.text-right { text-align: right !important; }
.text-center { text-align: center !important; }
.text-left { text-align: left !important; }

.p-0 { padding: 0 !important; }
.p-1 { padding: 0.25rem !important; }
.p-2 { padding: 0.5rem !important; }
.p-3 { padding: 1rem !important; }
.p-4 { padding: 1.5rem !important; }

.m-0 { margin: 0 !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.my-2 { margin-top: 0.5rem !important; margin-bottom: 0.5rem !important; }
.my-3 { margin-top: 1rem !important; margin-bottom: 1rem !important; }

.w-100 { width: 100% !important; }

.d-flex { display: flex !important; }
.flex-wrap { flex-wrap: wrap !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }

.persona_acepta { display: none; }

/* ============================================================
   PROGRESS BARS
   ============================================================ */
.progress-container {
    height: 20px;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.chartbar {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: var(--radius-sm);
}

/* ============================================================
   MOBILE NAVBAR
   ============================================================ */
.navbar {
    background: white;
    border-bottom: 2px solid var(--gray-200);
}

.navbar-dark .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%230069a4' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-dark .navbar-toggler {
    border-color: var(--primary);
}

.navbar-dark .navbar-nav .nav-link {
    color: var(--primary);
}

/* ============================================================
   RESPONSIVE DESIGN
   ============================================================ */

/* Large devices (desktops, less than 1200px) */
@media (max-width: 1199.98px) {
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* Medium devices (tablets, less than 992px) */
@media (max-width: 991.98px) {
    .desktop {
        display: none !important;
    }

    .mobile {
        display: flex !important;
    }

    table {
        font-size: 0.8125rem;
    }

    th, td {
        padding: 0.5rem 0.75rem;
    }

    .filter-item {
        min-width: 100%;
    }
}

/* Small devices (landscape phones, less than 768px) */
@media (max-width: 767.98px) {
    body {
        font-size: 13px;
    }

    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }
    h3 { font-size: 1.125rem; }

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

    .paginacion li a {
        min-width: 40px;
        height: 40px;
    }

    .table-actions {
        flex-direction: column;
    }

    .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6,
    .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 {
        width: 100%;
        padding-left: 0;
        padding-right: 0;
    }

    .row > [class*="col-"] {
        margin-bottom: 0.75rem;
    }
}

/* Extra small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
    .container {
        padding-left: 8px;
        padding-right: 8px;
    }

    .border {
        padding: 0.75rem;
    }

    th, td {
        padding: 0.5rem;
        font-size: 0.75rem;
    }

    .btn-action {
        width: 36px;
        height: 36px;
    }

    .filter-section {
        padding: 0.75rem;
    }
}

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
    .desktop, .mobile, .menuLine, .btn, .paginacion, .filter-section {
        display: none !important;
    }

    body {
        background: white;
        font-size: 12px;
    }

    table {
        border: 1px solid #000;
    }

    th {
        background: #333 !important;
        color: white !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}
