/* ============================================
   LOMONT - Custom Admin Styles
   Modernización visual 2026
   ============================================ */

/* === TIPOGRAFIA Y BASE === */
body {
    font-family: 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 400;
    color: #3d4852;
    background-color: #f0f2f5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
input, button, select, textarea, .form-control, .btn, .nav, .breadcrumb, .panel, .table, .modal, .alert, .badge, .label {
    font-family: 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
}
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    color: #1a202c;
    font-weight: 600;
    letter-spacing: -0.01em;
}
a {
    transition: color 0.15s ease;
}
.text-muted {
    color: #718096 !important;
}

/* === RETINA === */
@media
only screen and (-webkit-min-device-pixel-ratio: 2),
only screen and (   min--moz-device-pixel-ratio: 2),
only screen and (     -o-min-device-pixel-ratio: 2/1) {
    .txtareafullscreen {
        font-size: 20px;
    }
}

/* === LABELS Y ERRORES === */
label {
    margin-bottom: 0;
    margin-top: 5px;
    font-weight: 500;
    font-size: 12px;
    color: #4a5568;
    letter-spacing: 0.01em;
}
.errorSummary p, .errorSummary ul li { color: #e53e3e; }
.errorMessage { color: #e53e3e; font-size: 11px; }

/* === PANELES / CARDS === */
.panel {
    padding: 16px 20px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.03);
    background: #fff;
    margin-bottom: 20px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}
.panel:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.07);
}
.panel-heading {
    background: #fff;
    border-bottom: 1px solid #edf2f7;
    padding: 14px 20px;
}
.panel-title {
    color: #1a202c;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: -0.01em;
}
.panel-body {
    padding: 16px 20px;
}

/* Cards con sombra (dashboard) */
.card.card-shadow {
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    overflow: hidden;
}
.card.card-shadow:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}
.card-block {
    padding: 20px !important;
}

/* === PAGE HEADER === */
.page-header {
    padding: 12px 30px;
    background: transparent;
    border-bottom: none;
    margin-bottom: 5px;
}
.page-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a202c;
    letter-spacing: -0.02em;
}

/* === NAVBAR SUPERIOR === */
.site-navbar {
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.site-navbar,.site-menubar {
    padding-left: 0 !important;
    padding-right: 0 !important;
}
body.site-navbar-small {
    padding-top: 112px;
}
.site-navbar-small .site-navbar .navbar-toolbar>li>a {
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
    transition: background-color 0.15s ease;
}
.site-navbar-small .site-navbar .navbar-toolbar>li>a:hover {
    background-color: rgba(255,255,255,0.1);
}
.site-navbar-small .site-navbar .navbar-toolbar>li>a i {
    display: block;
    text-align: center;
}
.navbar-brand-text {
    font-weight: 600 !important;
    letter-spacing: 0.02em;
}

/* === SIDEBAR / MENU === */
.site-menubar {
    height: auto;
    background: #fff;
    border-right: 1px solid #e2e8f0;
    box-shadow: 2px 0 8px rgba(0,0,0,0.03);
}
.site-menu>.site-menu-item>a {
    padding: 3px 10px !important;
    color: #4a5568;
    transition: all 0.15s ease;
    border-radius: 0;
}
.site-menu>.site-menu-item>a:hover {
    background-color: #f7fafc;
    color: #e53e3e;
}
.site-menu>.site-menu-item.active>a,
.site-menu>.site-menu-item.open>a {
    color: #e53e3e;
    background-color: #fff5f5;
}
.site-menu>.site-menu-item>a .site-menu-title {
    font-size: 12px;
    font-weight: 500;
}
.site-menu-sub {
    background: #f7fafc;
}
.page {
    max-width: none;
}

/* === FORMULARIOS === */
.form-control {
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 13px;
    color: #2d3748;
    background-color: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-control:focus {
    border-color: #e53e3e;
    box-shadow: 0 0 0 3px rgba(229,62,62,0.12);
    outline: none;
}
.form-control::placeholder {
    color: #a0aec0;
}
select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23718096' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px;
    padding-right: 28px;
}

/* === BOTONES === */
.btn {
    white-space: normal !important;
    word-wrap: break-word;
    border-radius: 6px;
    font-weight: 500;
    font-size: 13px;
    padding: 6px 14px;
    transition: all 0.15s ease;
    letter-spacing: 0.01em;
}
.btn:active {
    transform: scale(0.98);
}
.btn-primary {
    background-color: #3182ce;
    border-color: #3182ce;
    box-shadow: 0 1px 2px rgba(49,130,206,0.2);
}
.btn-primary:hover {
    background-color: #2b6cb0;
    border-color: #2b6cb0;
    box-shadow: 0 2px 6px rgba(49,130,206,0.3);
}
.btn-success {
    background-color: #38a169;
    border-color: #38a169;
    box-shadow: 0 1px 2px rgba(56,161,105,0.2);
}
.btn-success:hover {
    background-color: #2f855a;
    border-color: #2f855a;
    box-shadow: 0 2px 6px rgba(56,161,105,0.3);
}
.btn-danger {
    background-color: #e53e3e;
    border-color: #e53e3e;
    box-shadow: 0 1px 2px rgba(229,62,62,0.2);
}
.btn-danger:hover {
    background-color: #c53030;
    border-color: #c53030;
}
.btn-warning {
    background-color: #dd6b20;
    border-color: #dd6b20;
    color: #fff;
    box-shadow: 0 1px 2px rgba(221,107,32,0.2);
}
.btn-warning:hover {
    background-color: #c05621;
    border-color: #c05621;
    color: #fff;
}
.btn-default, .btn-secondary {
    background-color: #fff;
    border-color: #cbd5e0;
    color: #4a5568;
}
.btn-default:hover, .btn-secondary:hover {
    background-color: #f7fafc;
    border-color: #a0aec0;
    color: #2d3748;
}
button:disabled, button[disabled] {
    cursor: not-allowed;
    opacity: 0.6;
}

/* === TABLAS === */
.table {
    color: #2d3748 !important;
    border-collapse: separate;
    border-spacing: 0;
}
.table thead th {
    background: #f7fafc;
    border-bottom: 2px solid #e2e8f0;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #4a5568;
    padding: 10px 12px;
    white-space: nowrap;
}
.table tbody td {
    padding: 8px 12px;
    border-color: #edf2f7;
    vertical-align: middle !important;
}
/* Striped global: aplica a TODAS las tablas */
.table tbody tr:nth-of-type(odd) {
    background-color: #fafbfc;
}
.table-striped tbody tr:nth-of-type(odd) {
    background-color: #fafbfc;
}
.table-hover tbody tr:hover {
    background-color: #edf2f7;
}
tr td {
    vertical-align: middle !important;
}
.table tfoot td, .table tfoot th {
    font-weight: 700;
    background: #f7fafc;
    border-top: 2px solid #e2e8f0;
}

/* DataTables improvements */
.dataTables_wrapper {
    font-size: 12px;
}
.dataTables_info {
    z-index: 1 !important;
    position: absolute !important;
    font-size: 11px;
    color: #718096;
}
.dataTables_paginate .paginate_button {
    border-radius: 4px !important;
}

/* === MODALES === */
.modal-content {
    border-radius: 10px;
    border: none;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    overflow: hidden;
}
.modal-header {
    color: #FFF;
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
    padding: 12px 20px;
    border-bottom: none;
}
.modal-body {
    padding: 16px 20px;
}
.modal-title {
    color: #FFF;
    font-weight: 600;
    font-size: 15px;
}
.modal-footer {
    border-top: 1px solid #edf2f7;
    padding: 12px 20px;
}

/* === BADGES Y LABELS === */
.badge, .label {
    font-weight: 500;
    letter-spacing: 0.02em;
    border-radius: 4px;
    padding: 3px 8px;
}
.badge-pill.up {
    position: absolute;
    top: 0px;
    margin: 0 -.8em;
    border-radius: 15px;
}
.label-success { background-color: #38a169; }
.label-danger { background-color: #e53e3e; }
.label-warning { background-color: #dd6b20; color: #fff; }
.label-info { background-color: #3182ce; }
.badge-success { background-color: #38a169; }
.badge-danger { background-color: #e53e3e; }
.badge-warning { background-color: #dd6b20; }
.badge-info { background-color: #3182ce; }

/* === ALERTAS === */
.alert {
    border-radius: 8px;
    border: none;
    font-size: 13px;
}
.alert-danger {
    font-size: 12px;
    background-color: #fff5f5;
    color: #c53030;
    border-left: 4px solid #e53e3e;
}
.alert-success {
    background-color: #f0fff4;
    color: #276749;
    border-left: 4px solid #38a169;
}
.alert-warning {
    background-color: #fffaf0;
    color: #9c4221;
    border-left: 4px solid #dd6b20;
}
.alert-info {
    background-color: #ebf8ff;
    color: #2b6cb0;
    border-left: 4px solid #3182ce;
}

/* === TABS === */
.nav-tabs {
    border-bottom: 2px solid #e2e8f0;
}
.nav-tabs .nav-link {
    border-radius: 0;
    color: #718096;
    font-weight: 500;
    font-size: 13px;
    padding: 8px 16px;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.15s ease;
}
.nav-tabs .nav-link:hover {
    color: #e53e3e;
    border-bottom-color: #feb2b2;
    background: transparent;
}
.nav-tabs .nav-link.active {
    color: #e53e3e;
    font-weight: 600;
    border-bottom-color: #e53e3e;
    background: transparent;
}

/* === BREADCRUMBS === */
.breadcrumb {
    background: transparent;
    padding: 0;
    font-size: 12px;
}
.breadcrumb > li, .breadcrumb > li > a {
    color: #718096;
}
.breadcrumb > li > a:hover {
    color: #e53e3e;
}
.breadcrumbs a {
    max-width: 200px;
    max-height: 45px;
}
.breadcrumbs span {
    max-width: 300px;
}

/* === PROGRESS BARS === */
.progress {
    border-radius: 10px;
    background-color: #edf2f7;
    overflow: hidden;
}
.progress-bar {
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
}
.progress-bar-success { background-color: #38a169; }
.progress-bar-warning { background-color: #dd6b20; }
.progress-bar-danger { background-color: #e53e3e; }

/* === DROPDOWNS === */
.dropdown-menu {
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 6px 0;
}
.dropdown-item, .dropdown-menu > li > a {
    padding: 8px 16px;
    font-size: 13px;
    color: #4a5568;
    transition: all 0.1s ease;
}
.dropdown-item:hover, .dropdown-menu > li > a:hover {
    background-color: #f7fafc;
    color: #e53e3e;
}

/* === SELECT2 === */
.select2-container .select2-selection--single {
    border-radius: 6px;
    border: 1px solid #cbd5e0;
    height: 34px;
    transition: border-color 0.15s ease;
}
.select2-container--default .select2-selection--single:focus,
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: #e53e3e;
    box-shadow: 0 0 0 3px rgba(229,62,62,0.12);
}
.select2-dropdown {
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}
.modal-open .select2 { display: none !important; }
.modal.fade.show .select2 { display: block !important; }
span.select2-container--open {
    z-index: 10050;
}

/* === TOOLTIPS & POPOVERS === */
.tooltip-inner {
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 12px;
}

/* === Z-INDEX FIX === */
.toast {
    z-index: 9999;
}
.ui-autocomplete {
    z-index: 9999 !important;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* === SCROLLBAR MODERNA === */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb {
    background: #c4c4c4;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a0a0a0;
}

/* === UTILIDADES === */
.pointer td {
    cursor: pointer;
}
.navrecurrente li {
    font-size: 10px;
}

/* === PUNTO DE VENTA === */
#grideproductosparaseleccionar {
    max-height: 400px;
    overflow-y: scroll;
}
.pos_contenedorproductos {
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.pos_contenedorproductos:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.pos_contenedorproductos img {
    height: 135px;
    width: auto;
}
.pos_contenedorproductos:hover .pos_precioproducto,
.pos_contenedorproductos:hover .pos_nombreproductoclave {
    background: rgba(0,0,0,0.75) !important;
}
.pos_precioproducto {
    position: absolute;
    width: 100%;
    top: 0;
    background: rgba(0,0,0,0.55);
    color: #FFF;
    padding: 4px;
    text-align: center;
    font-weight: 600;
    font-size: 13px;
}
.pos_nombreproductoclave {
    position: absolute;
    width: 100%;
    bottom: 0;
    background: rgba(0,0,0,0.55);
    color: #FFF;
    padding: 4px;
    text-align: center;
}
.pos_nombreproducto {
    height: 30px;
    font-size: 10px;
    overflow: hidden;
}
.pos_claveproducto {
    height: 15px;
    font-size: 10px;
}

/* === MAPA === */
#map {
    position: initial !important;
}

/* === NOTAS DE CITAS === */
#listanotascita, #listanotascitareceta, .contenidotabcita {
    padding: 8px;
    height: 400px;
    overflow-y: scroll;
}
#listanotascita p, #listanotascitareceta p, .listadocita p {
    word-break: break-all;
    margin-bottom: 0;
    color: #2d3748;
    font-size: 14px;
    line-height: 18px;
}
#listanotascita small, #listanotascitareceta small, .listadocita small {
    font-size: 10px;
    line-height: 13px;
    display: block;
    color: #718096;
}
#listanotascita hr, #listanotascitareceta hr, .listadocita hr, #listaresultados hr, #listadoplandiagnostico hr {
    margin-bottom: 3px;
    margin-top: 3px;
    border-color: #edf2f7;
}

/* === IFRAME Y TEXTAREA === */
iframe {
    border: 0;
}
textarea {
    overflow-x: hidden;
    word-break: break-all;
}

/* === CONTEXT MENU === */
.context-menu-item {
    padding-top: 4px !important;
    padding-bottom: 4px !important;
}

/* === FLASH ANIMATION === */
.flash-button {
    animation: flash 1s linear infinite;
}
@keyframes flash {
    0% { opacity: 1.0; }
    50% { opacity: 0.5; }
    100% { opacity: 1.0; }
}
@-webkit-keyframes flash {
    0% { opacity: 1.0; }
    50% { opacity: 0.5; }
    100% { opacity: 1.0; }
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .site-menu>.site-menu-item>a {
        padding: 3px 7px !important;
    }
    .site-menu>.site-menu-item>a .site-menu-title {
        font-size: 11px;
    }
}
@media (max-width: 991px) {
    .table-responsive {
        display: table !important;
    }
    .site-menu>.site-menu-item>a>.fa {
        font-size: 16px;
    }
}
@media (min-width: 991px) {
    .site-menu>.site-menu-item>a>.fa {
        display: block;
        width: 100%;
        line-height: 1;
        font-size: 14px;
        margin: 1px 0 1px;
        text-align: center;
    }
}
@media (max-width: 767px) {
    body.site-navbar-small {
        padding-top: 63px;
    }
    .page-header-actions {
        display: block;
        top: auto;
        right: auto;
        position: relative;
        width: 100%;
        margin-top: 13px;
    }
    .page-title {
        font-size: 18px;
    }
    .page-header {
        padding: 0px 15px;
    }
    .panel-body {
        padding: 12px;
    }
}

/* === btn-xs GLOBAL (usado en muchas vistas) === */
.btn-xs {
    padding: 3px 8px;
    font-size: 11px;
    border-radius: 4px;
    line-height: 1.4;
}

/* === CHECKBOXES Y SWITCHES MEJORADOS === */
input[type="checkbox"],
input[type="radio"] {
    cursor: pointer;
    accent-color: #e53e3e;
}

/* === PAGINACION DataTables === */
.dataTables_paginate {
    margin-top: 10px !important;
}
.dataTables_paginate .paginate_button {
    padding: 4px 10px !important;
    margin: 0 2px !important;
    border-radius: 5px !important;
    font-size: 12px !important;
    transition: all 0.15s ease;
}
.dataTables_paginate .paginate_button.current {
    background: #e53e3e !important;
    border-color: #e53e3e !important;
    color: #fff !important;
    font-weight: 600;
}
.dataTables_paginate .paginate_button:hover {
    background: #fff5f5 !important;
    border-color: #e53e3e !important;
    color: #e53e3e !important;
}
.dataTables_length select {
    border-radius: 5px;
    padding: 3px 8px;
    border: 1px solid #cbd5e0;
}
.dataTables_filter input {
    border-radius: 6px !important;
    border: 1px solid #cbd5e0 !important;
    padding: 5px 10px !important;
    font-size: 12px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.dataTables_filter input:focus {
    border-color: #e53e3e !important;
    box-shadow: 0 0 0 3px rgba(229,62,62,0.12) !important;
    outline: none;
}

/* === FILAS DE TABLA - hover mas suave === */
.table tbody tr {
    transition: background-color 0.1s ease;
}

/* === SEPARADORES (hr) MAS SUAVES === */
hr {
    border-top: 1px solid #edf2f7;
}

/* === ENLACES EN TABLAS === */
.table a {
    color: #3182ce;
}
.table a:hover {
    color: #2b6cb0;
    text-decoration: none;
}

/* === ICONOS FA EN BOTONES - mejor espaciado === */
.btn .fa {
    margin-right: 3px;
}
.btn-xs .fa {
    margin-right: 2px;
}

/* === WELL / JUMBOTRON (si se usa) === */
.well {
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #f7fafc;
    box-shadow: none;
}

/* === LISTAS === */
.list-group-item {
    border-color: #edf2f7;
    padding: 10px 16px;
    transition: background-color 0.1s ease;
}
.list-group-item:hover {
    background-color: #f7fafc;
}

/* === SWITCHERY MEJORADO === */
.switchery {
    border-radius: 20px !important;
}

/* === THUMBNAILS / IMAGENES === */
img.img-thumbnail, .thumbnail {
    border-radius: 6px;
    border-color: #e2e8f0;
}

/* === CONTENT AREA - mejor respiracion === */
.page-content {
    padding: 15px 20px;
}

/* === SweetAlert mejorado === */
.sweet-alert {
    border-radius: 12px !important;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15) !important;
}
.sweet-alert h2 {
    font-size: 20px !important;
    font-weight: 600 !important;
}
.sweet-alert .sa-button-container .confirm {
    border-radius: 6px !important;
    padding: 8px 24px !important;
    font-weight: 500 !important;
}
.sweet-alert .sa-button-container .cancel {
    border-radius: 6px !important;
    padding: 8px 24px !important;
}

/* === TOASTR MEJORADO === */
.toast-success { background-color: #38a169 !important; }
.toast-error { background-color: #e53e3e !important; }
.toast-warning { background-color: #dd6b20 !important; }
.toast-info { background-color: #3182ce !important; }
#toast-container > div {
    border-radius: 8px !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12) !important;
    padding: 12px 16px !important;
    font-size: 13px;
}

/* === JSPANEL MEJORADO === */
.jsPanel-content {
    font-family: 'Inter', 'Roboto', sans-serif;
}

/* === EMPTY STATES === */
.dataTables_empty {
    color: #a0aec0;
    font-style: italic;
    padding: 30px 0 !important;
}

/* === INPUTS EN TABLAS (tolerancia, etc) === */
.table input[type="number"],
.table input[type="text"] {
    border-radius: 4px;
    border: 1px solid #cbd5e0;
    padding: 3px 6px;
    font-size: 12px;
    transition: border-color 0.15s ease;
}
.table input[type="number"]:focus,
.table input[type="text"]:focus {
    border-color: #e53e3e;
    outline: none;
    box-shadow: 0 0 0 2px rgba(229,62,62,0.1);
}
