:root {
    --bg-color: #f6f7f9;
    /* Light pastel gray */
    --text-color: #2b3035;
    /* Anthracite/Dark Gray */
    --text-muted: #6c757d;

    --primary-color: #212529;
    /* Dark neutral */
    --primary-hover: #343a40;

    --surface-color: #ffffff;
    --border-color: #e5e8eb;

    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.08);

    --radius-md: 8px;
    --radius-lg: 12px;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* =========================================
   HEADER & NAVBAR
========================================= */
.app-header {
    background-color: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

#tituloPrincipal {
    /*font-family: 'Poiret One', cursive;*/
    font-family: "Cinzel", serif; /* parecido a Trajan */
    font-weight: 600;
    font-size: 2.2rem;
    margin: 0;
    color: var(--primary-color);
    letter-spacing: 2px;
}

.header-top {
    padding: 1rem 2rem;
}

.navbar-custom {
    background-color: var(--primary-color) !important;
    padding: 0.5rem 2rem;
}

.navbar-custom .nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    font-weight: 400;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.navbar-custom .nav-link:hover {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.1);
}

.auth-section form,
.auth-section div {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
}

.auth-section a {
    color: #fff;
    text-decoration: none;
}

.auth-section a:hover {
    text-decoration: underline;
}

#tituloPagina {
    background-color: var(--bg-color);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

#subtituloPagina {
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* =========================================
   LEGACY BOOTSTRAP 3 SHIMS & COMPONENTS
========================================= */

/* Panels -> Cards */
.panel {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
    overflow: hidden;
}

.panel-heading {
    background-color: #fbfbfc;
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-color);
}

.panel-body {
    padding: 1.5rem;
}

.panel-footer {
    padding: 1rem 1.5rem;
    background-color: #fbfbfc;
    border-top: 1px solid var(--border-color);
}

/* Tables */
.table-responsive {
    border: none;
}

table.table {
    background-color: var(--surface-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

table.table thead th {
    background-color: #f9fafb;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    border-top: none;
}

table.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-top: 1px solid var(--border-color);
    color: var(--text-color);
    font-size: 0.95rem;
}

table.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.015);
}

table.table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.03);
    transition: background-color 0.2s;
}

/* Forms */
.form-control {
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    padding: 0.6rem 1rem;
    font-size: 0.95rem;
    box-shadow: none !important;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: #fff;
}

.form-control:focus {
    border-color: var(--text-muted);
    box-shadow: 0 0 0 3px rgba(108, 117, 125, 0.15) !important;
}

label {
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    display: inline-block;
}

/* Buttons */
.btn {
    border-radius: var(--radius-md);
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    font-size: 0.95rem;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    line-height: 1.2;
}

.btn-primary {
    background-color: #2968c3 !important;
    border-color: #2968c3 !important;
    color: #fff !important;
}

.btn-primary:hover {
    background-color: #2861b2 !important;
    border-color: #2861b2 !important;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-success {
    background-color: #48ad75 !important; 
    border-color: #48ad75 !important;
    color: white !important;
}

.btn-success:hover {
    background-color: rgb(62, 106, 84) !important;
    border-color: rgb(62, 106, 84) !important;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/*.btn-default {
    background-color: #fff !important;
    border-color: var(--border-color) !important;
    color: var(--text-color) !important;
}

.btn-default:hover {
    background-color: #f8f9fa !important;
    border-color: #d1d5db !important;
}

.btn-success {
    background-color: #4b8a6b !important; 
    border-color: #4b8a6b !important;
    color: white !important;
}

.btn-success:hover {
    background-color: #3d7158 !important;
    border-color: #3d7158 !important;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-danger {
    background-color: #c45c66 !important; 
    border-color: #c45c66 !important;
    color: white !important;
}

.btn-danger:hover {
    background-color: #a84d56 !important;
    border-color: #a84d56 !important;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-warning {
    background-color: #d9ba5e !important;
    border-color: #d9ba5e !important;
    color: white !important;
}

.btn-warning:hover {
    background-color: #c2a550 !important;
    border-color: #c2a550 !important;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}*/

/* Utilities / Legacy Shim */
.pull-right {
    float: right !important;
}

.pull-left {
    float: left !important;
}

.text-right {
    text-align: right !important;
}

.text-left {
    text-align: left !important;
}

.text-center {
    text-align: center !important;
}

.hidden-xs {
    display: none !important;
}

@media (min-width: 768px) {
    .hidden-xs {
        display: inherit !important;
    }
}

.clear {
    clear: both;
}

/* Mensajes / Alerts */
#mensajes,
.mensajes {
    margin: 17px 0;
}

.msg {
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.msg.alert-success {
    background-color: #e6f4ea;
    color: #1e4620;
    border-color: #c3e6cb;
}

.msg.alert-danger,
.msg.error {
    background-color: #fdf3f4;
    color: #721c24;
    border-color: #f5c6cb;
}

.msg .close {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: inherit;
    opacity: 0.5;
    cursor: pointer;
    padding: 0;
    margin-left: 1rem;
    transition: opacity 0.2s;
}

.msg .close:hover {
    opacity: 1;
}

/* Modulos generales layout */
.formLinea {
    display: inline-block;
    margin: 0 5px;
}

/* =========================================
   FOOTER
========================================= */
.app-footer {
    background-color: var(--surface-color);
    color: var(--text-muted);
}

.app-footer img {
    filter: grayscale(100%) opacity(0.7);
    transition: all 0.3s ease;
}

.app-footer img:hover {
    filter: grayscale(0%) opacity(1);
}

/* =========================================
   PROMPT VIRTUAL (Modales Confirmación)
========================================= */
.vPromptBackground {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999999;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    width: 100%;
    height: 100%;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vPromptBox {
    width: 90%;
    max-width: 500px;
    background: var(--surface-color);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    text-align: center;
    border: none;
    animation: promptIn 0.3s ease-out forwards;
}

@keyframes promptIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.vPromptBox img {
    max-width: 50px;
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

/* Impresión */
@media print {
    * {
        display: none;
    }

    html,
    body,
    #contenido,
    main,
    .imprimir {
        display: block !important;
    }

    .imprimirRecur,
    .imprimirRecur * {
        display: initial;
    }
}

/* =========================================
   BOOTSTRAP 3 TO BOOTSTRAP 5 SHIMS (FIXES)
========================================= */

/* Fix Dropdown visibility if needed */
.dropdown-menu {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    margin-top: 0.5rem;
}

/* Fix navbar right (Loged User) */
.navbar-nav.navbar-right {
    display: flex;
    flex-direction: row;
    margin-bottom: 0;
    padding-left: 0;
    list-style: none;
    gap: 0.5rem;
}

.navbar-nav.navbar-right>li>a {
    color: rgba(255, 255, 255, 0.8) !important;
    padding: 0.5rem 1rem !important;
    text-decoration: none;
    display: flex;
    align-items: center;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.navbar-nav.navbar-right>li>a:hover {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.1);
}

.navbar-nav.navbar-right .glyphicon {
    margin-right: 0.3rem;
}

/* Glyphicons cargados de forma nativa en /librerias/bootstrap5/css/glyphicons.css */

/* Fix inline forms (Filtros) */
.form-inline {
    display: flex;
    flex-flow: row wrap;
    align-items: center;
    gap: 0.8rem;
    background: var(--surface-color);
    padding: 1rem;
    border-radius: var(--radius-md);
}

.form-inline .form-control {
    display: inline-block;
    width: auto;
    vertical-align: middle;
}

.form-inline label {
    margin-bottom: 0;
}

/* Fix buttons getting 100% width when inside a row without col */
.row.container-fluid>.btn {
    width: max-content;
    display: inline-block;
    margin: 0.5rem;
    height: 40px;
}

/* Mod/Usuario fixes */
.datosUsuario,
.productosUsuario {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 2rem;
    margin-top: 1rem;
    margin-bottom: 2rem;
}

.login-tit {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}