@font-face {
    font-family: 'roboto_medium_regular';
    src: url('../webfonts/roboto-medium-webfont.woff2') format('woff2'),
         url('../webfonts/roboto-medium-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'roboto_condensed_light';
    src: url('../webfonts/robotocondensed-light-webfont.woff2') format('woff2'),
         url('../webfonts/robotocondensed-light-webfont.woff') format('woff'),
         url('../webfonts/robotocondensed-light-webfont.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'roboto_condensed_regular';
    src: url('../webfonts/robotocondensed-regular-webfont.woff2') format('woff2'),
         url('../webfonts/robotocondensed-regular-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

:root {
    --color-one: #F5F5F5;
    --color-two: #24292E;
    --color-three: #0366D6;
    --form-color: #14111A;
    --accent-color: #455A64;
    --border-color: #D8D8D8;
}

body, html {
    font-family: 'roboto_condensed_light';
    width: 100vw;
    height: 100vh;
    background: var(--color-one);
    color: #333;
    font-size: 16px;
}

.full-box {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    width: 100%;
}

.form-neon {
    border: 1px solid var(--border-color);
    background-color: #FFF;
    padding: 15px;
    border-radius: 3px;
}

.radio-avatar-form {
    padding: 30px 7px;
}
.img-avatar-form {
    max-width: 100px;
}

/*  Scrolls */
.scroll {
    scrollbar-color: rgba(102,107,122,1) rgba(29, 30, 34, 1);
    scrollbar-width: thin;
}

.developer-social > li {
    display: inline-block;
    margin: 0 7px;
}

/*----------  Page headers styles  ----------*/
.page-header {
    padding: 30px 20px 60px 20px;
}
.page-header > :nth-child(1) {
    padding-bottom: 7px;
}
.page-header > :nth-child(2) {
    font-size: 18px;
}

/*----------  Page nav tabs  ----------*/
.page-nav-tabs ul {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    width: 100%;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 30px;
    text-transform: uppercase;
    list-style: none;
}
.page-nav-tabs ul li,
.page-nav-tabs ul li a {
    height: 40px;
    line-height: 40px;
}
.page-nav-tabs ul li {
    margin: 5px 20px;
}
.page-nav-tabs ul li a {
    color: var(--accent-color);
    font-size: 17px;
    min-width: 200px;
    width: auto;
    display: block;
    text-align: center;
    user-select: none;
    transition: all .2s ease-in-out;
    border-bottom: 2px solid transparent;
}
.page-nav-tabs ul li a.active,
.page-nav-tabs ul li a.active:hover {
    color: var(--color-three);
    border-bottom: 2px solid var(--color-three);
}
.page-nav-tabs ul li a:hover {
    text-decoration: none;
    color: #333;
    border-bottom: 2px solid #333;
}

/*----------  Page 404 styles  ----------*/
.container-404 {
    background: #000428;
    background: linear-gradient(to right, #004e92, #000428);
    color: #fff;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
/*----------  Edit bootstrap styles  ----------*/
.form-control[readonly] {
    background-color: transparent;
}
.form-control:focus,
.form-control:active {
    outline: none;
    box-shadow: none;
    border: none;
}
.form-control-file:active,
.form-control-file:focus {
    outline: none;
}
.table .btn {
    margin-bottom: 0;
}
.table thead th {
    color: #FFF;
}
.table tbody tr {
    color: #333;
    transition: all .2s ease-in-out;
}
.table-dark,
.table {
    background-color: #fff;
}
.table-dark {
    border: 1px solid var(--accent-color);
}
.table-dark thead tr {
    background-color: var(--accent-color);
}
.table-dark td,
.table-dark thead th,
.table-dark th {
    border: none;
}
.table-dark tbody tr:hover {
    color: var(--color-three);
    background-color: #F5F5F5;
    font-weight: bold;
}
.page-link {
    transition: all .2s ease-in-out;
}
.page-link:hover,
.page-link.active {
    background-color: var(--color-three);
    color: #FFF;
}
table form {
    margin-bottom: 0;
}
.custom-file-control:invalid, 
.form-control:invalid {
    color: red;
    font-weight: bold;
}
/*----------  Text Styles  ----------*/
.roboto-medium {
    font-family: 'roboto_medium_regular';
}
.roboto-condensed-light {
    font-family: 'roboto_condensed_light';
}
.roboto-condensed-regular {
    font-family: 'roboto_condensed_regular';
}

/*----------  login Styles  ----------*/
.login-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--color-one);
}

.login-content {
    width: 95%;
    max-width: 320px;
    height: auto;
    border: 1px solid var(--border-color);
    background-color: #FFF;
    border-radius: 4px;
    padding: 15px;
    color: var(--accent-color);
}
.btn-login {
    width: 90%;
    padding: 10px 0;
    display: block;
    margin: 0 auto;
    border-radius: 3px;
    margin-top: 30px;
    background-color: transparent;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
    transition: all .2s ease-out;
}
.btn-login:hover {
    background-color: var(--color-three);
    border: 1px solid var(--color-three);
    text-decoration: none;
    color: #fff;
}
.btn-login:active,
.btn-login:focus {
    outline: none;
}

/*----------  Page layout Styles  ----------*/
.main-container {
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
}
.page-content,
.nav-lateral {
    height: 100%;
    overflow: hidden;
}
.page-content,
.nav-lateral-content {
    overflow: auto;
}
.page-content {
    position: relative;
    padding-left: 270px;
    transition: all .2s ease-in-out;
    padding-bottom: 20px;
}
/*  Nav Lateral */
.nav-lateral {
    width: 270px;
    position: fixed;      /* antes: absolute */
    top: 0;
    left: 0;
    z-index: 1020;        /* antes: 1 */
    transition: all .2s ease-in-out;
    background-image: url('../assets/img/nav-font.jpg');
    background-position: center center;
    background-size: cover;
}

.nav-lateral-bg { display: none; }
.nav-lateral-content {
    max-width: 270px;
    height: 100%;
    background-color: var(--color-two);
    background-color: rgba(36, 41, 46, .94);
    overflow-y: scroll;
    padding-bottom: 50px;
}
.nav-lateral-bar {
    height: 3px;
    background-color: var(--color-three);
}
.nav-lateral-avatar {
    padding: 40px 0;
}
.nav-lateral-avatar i {
    display: none;
}
.nav-lateral-avatar img {
    width: 50%;
    margin: 0 auto;
    display: block;
    border: 4px solid #FFF;
    border-radius: 100%;
}
.nav-lateral-avatar figcaption {
    margin-top: 20px;
    color: #FFF;
}
.nav-lateral-menu {
    height: auto;
}
.nav-lateral-menu ul {
    margin: 0;
    padding: 0;
    list-style: none;
}
.nav-lateral-menu ul li {
    width: 100%;
    height: auto;
}
.nav-lateral-menu ul li a {
    display: block;
    width: 100%;
    height: 45px;
    line-height: 45px;
    text-decoration: none;
    color: #FFF;
    font-size: 15px;
    box-sizing: border-box;
    padding-left: 20px;
    transition: all .2s ease-in-out;
}
.nav-lateral-menu > ul > li > a.active {
    color: #FFF;
    background-color: var(--color-three);
}
.nav-lateral-menu ul li a:hover {
    color: #fff;
    background-image: linear-gradient(to right, transparent, rgba(255, 255, 255, .1) 50%, transparent);
}
.nav-lateral-menu ul li ul {
    display: none;
    border: 1px solid var(--color-three);
    background: rgba(20, 30, 48, .5);
}
.nav-lateral-menu ul li ul a {
    padding-left: 30px;
}
.nav-lateral-menu > ul > li > ul > li > a.active {
    color: #FFCA28;
}
.show-nav-lateral-submenu {
    display: block !important;
}
.nav-lateral-menu .fa-chevron-down,
.nav-lateral-menu .fa-chevron-up {
    float: right;
    height: 45px;
    line-height: 45px;
    margin-right: 7px;
    transition: all .2s ease-in-out;
}

/*  Page content */
.navbar-info {
    height: 50px;
    border-bottom: 1px solid var(--border-color);
    text-align: right;
    padding-right: 10px;
}

.navbar-info a {
    color: var(--accent-color);
    height: 50px;
    min-width: 40px;
    text-align: center;
    line-height: 50px;
    display: inline-block;
    transition: all .2s ease-out;
    user-select: none;
}
.navbar-info a:hover {
    color: var(--color-three);
    background-image: radial-gradient(circle, rgba(250, 30, 78, .1), transparent 80%);
}
.navbar-info a:active,
.navbar-info a:focus {
    outline: none;
}

/*----------  Home Styles  ----------*/
.table-dashboard {
    background-color: #fff;
    color: #333;
}
.table-dashboard thead tr th {
    color: #333;
    font-weight: bolder;
    text-transform: uppercase;
}
.tile-container {
    text-align: center;
    padding: 20px 25px;
}
.tile {
    height: 200px;
    width: 200px;
    margin: 10px;
    display: inline-block;
    text-decoration: none;
    color: var(--accent-color);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    user-select: none;
    transition: all .2s ease-in-out;
    background-color: #FFF;
}
.tile:hover {
    text-decoration: none;
    border-color: var(--color-three);
}
.tile:focus,
.tile:active {
    outline: none;
}
.tile-tittle {
    margin: 0;
    width: 100%;
    padding: 0;
    height: 40px;
    line-height: 40px;
    box-sizing: border-box;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border-color);
    transition: all .2s ease-in-out;
    font-family: 'roboto_medium_regular';
}
.tile:hover .tile-tittle {
    color: #FFF;
    border-color: var(--color-three);
    background-color: var(--color-three);
}
.tile-icon {
    width: 100%;
    height: 160px;
    box-sizing: border-box;
    padding-top: 22px;
}
.tile-icon > i {
    font-size: 80px;
}
.tile-icon > p {
    font-family: 'roboto_medium_regular';
    height: 35px;
    line-height: 35px;
}
.tile:hover .tile-icon > i,
.tile:hover .tile-icon > p {
    color: var(--color-three);
}

/*----------  Product  ----------*/
.product-container {
    width: 100%;
    height: auto;
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
}
.product-list,
.product-category {
    box-sizing: border-box;
    background-color: #FFF;
    border: 1px solid #E1E1E1;
}
.product-list {
    width: calc(100% - 250px);
    padding: 20px;
}
.product-category {
    flex-grow: 0;
    width: 250px;
}
.product-category h5 {
    color: var(--color-three);
    padding: 15px 0;
    margin: 0;
    border-bottom: 1px solid #E1E1E1;
}
.product-category-list {
    width: 100%;
    height: auto;
}
.product-category-list a {
    padding: 10px 0;
    border-left: 4px solid transparent;
    display: block;
    color: #333;
    position: relative;
    transition: all .2s ease-in-out;
}
.product-category-list a:hover {
    text-decoration: none;
    color: var(--color-three);
    border-left: 4px solid var(--color-three);
    font-weight: bolder;
}
.img-product-list {
    max-width: 160px;
    max-height: 160px;
    min-width: 100px;
    min-height: 100px;
    border-right: 1px solid #E1E1E1;
    display: block;
    margin: 0;
    padding: 0;
    margin-right: 0 !important;
    background-color: rgba(2, 133, 255, 0.05);
}
.table-product {
    width: 100%;
}
.table-product td {
    padding: 9px 0;
}
.form-product {
    display: inline-block;
    margin: 0;
}
.media-product {
    padding: 0;
    background-color: #FFF;
    border: 1px solid #E1E1E1;
    margin-bottom: 25px;
}
.media-product:hover {
    background-color: rgba(2, 133, 255, 0.05);
}
.product-media-body {
    position: relative;
}
.media-product-title {
    color: var(--color-three);
    padding: 5px;
    margin: 0;
    border-bottom: 1px solid #E1E1E1;
}
.media-product-options {
    border-top: 1px solid #E1E1E1;
}

.img-product-info {
    max-width: 200px;
    max-height: 200px;
    display: block;
    margin: 0 auto;
    margin-bottom: 20px;
}

/*----------  Sale  ----------*/
.sale_input-cant {
    width: 40px;
    margin: 0 auto;
    padding: 0;
    padding-right: 0;
    height: auto;
    text-align: center;
}
.btn-sale-options {
    padding: 0;
    width: 35px;
    height: 35px;
    line-height: 35px;
}

/*----------  Breakpoints personalizados  ----------*/
@media(max-width: 992px) {
    .nav-lateral {
        width: 100%;
        overflow: hidden;
        display: none;
        background-image: none;
    }
    .nav-lateral.active {
        display: block;
        z-index: 9999;
    }
    .nav-lateral-bg {
        width: 100%;
        height: 100%;
        background-color: rgba(3, 3, 3, .4);
        position: relative;
        display: block;
        z-index: 2;
    }
    .nav-lateral-content {
        position: absolute;
        left: 0;
        top: 0;
        z-index: 3;
        transform: translateX(-400px);
        transition: all .3s ease-in-out;
        background-color: var(--color-two);
    }
    .nav-lateral.active .nav-lateral-content {
        transform: translateX(0);
    }
    .nav-lateral-avatar i {
        height: 50px;
        width: 50px;
        line-height: 50px;
        color: #FFF;
        cursor: pointer;
        font-size: 25px;
        position: absolute;
        top: 5px;
        right: 0;
        text-align: center;
        display: block;
        transition: all .2s ease-out;
    }
    .nav-lateral-avatar i:hover {
        color: var(--color-three);
    }
    .page-content {
        padding-left: 0;
    }
    .product-container {
        flex-direction: column;
    }
    .product-list {
        padding: 15px;
        width: 100%;
    }
    .product-category {
        flex-grow: 0;
        width: 100%;
    }
}

@media(min-width: 993px) {
    .nav-lateral.active {
        transform: translateX(-400px);
    }
    .page-content.active {
        padding-left: 0;
    }
}

.pedido-btn-truncado {
    display: -webkit-box;
    -webkit-line-clamp: 2;       /* Limita a 2 líneas */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    word-break: break-word;
    text-align: left;
}

@media(min-width: 1200px) {
    .col-product {
        padding: 9px 0;
        text-align: center;
    }
}

/* ========== MODO OSCURO ========== */
body.dark-mode,
html.dark-mode {
    background-color: #1e1e2f !important;
    color: #f1f1f1 !important;
}

.dark-mode .nav-lateral-content,
.dark-mode .page-content,
.dark-mode .form-neon,
.dark-mode .tile,
.dark-mode .navbar-info,
.dark-mode .product-list,
.dark-mode .product-category,
.dark-mode .media-product {
    background-color: #2a2a3d !important;
    color: #f1f1f1 !important;
    border-color: #444 !important;
}

.dark-mode .nav-lateral-menu a,
.dark-mode .tile-tittle,
.dark-mode .table-product td,
.dark-mode .media-product-title {
    color: #ffffff !important;
}

.dark-mode .nav-lateral-menu ul li a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .table-dark,
.dark-mode .table {
    background-color: #1e1e2f !important;
}

.dark-mode .table-dark thead tr {
    background-color: #455A64 !important;
}

.dark-mode .table-dark tbody tr:hover {
    background-color: #333 !important;
    color: #FFF;
}

/* ======= SUBMENÚ ANIMADO CON TRANSICIÓN SUAVE ======= */

.nav-btn-submenu + ul {
    display: none;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transform: scaleY(0);
    transform-origin: top;
    transition: max-height 0.4s ease-in-out, opacity 0.3s ease-in-out, transform 0.4s ease-in-out;
}

.nav-btn-submenu.active + ul {
    display: block;
    opacity: 1;
    max-height: 500px; /* Espacio suficiente para varios ítems */
    transform: scaleY(1);
}

/* Modal moderno con sombra suave */
.modal-estilizado {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  background-color: #ffffff;
}

/* Fondo degradado header */
.bg-gradient-primary {
  background: linear-gradient(90deg, #007bff, #4facfe);
}

/* Inputs más sutiles y elegantes */
.form-control-rounded {
  border-radius: 10px;
  border: 1px solid #ced4da;
  transition: all 0.3s ease;
  box-shadow: none;
}

.form-control-rounded:focus {
  border-color: #80bdff;
  box-shadow: 0 0 4px rgba(0, 123, 255, 0.4);
}

/* Botones redondeados */
.btn-rounded {
  border-radius: 50px;
}

/* Botón Guardar vibrante */
.btn-primary.btn-rounded {
  background: linear-gradient(90deg, #007bff, #4facfe);
  color: #ffffff;
  border: none;
  padding: 10px 24px;
  font-weight: 600;
  transition: background 0.3s ease;
}

.btn-primary.btn-rounded:hover {
  background: linear-gradient(90deg, #0056b3, #3399ff);
}

/* Botón Cancelar elegante */
.btn-outline-secondary.btn-rounded {
  border: 2px solid #6c757d;
  padding: 10px 24px;
  font-weight: 600;
  color: #6c757d;
  background-color: transparent;
  transition: background 0.3s ease;
}

.btn-outline-secondary.btn-rounded:hover {
  background-color: #f8f9fa;
}

.btn-circle {
    width: 36px;
    height: 36px;
    padding: 6px 0px;
    border-radius: 50%;
    text-align: center;
    font-size: 16px;
    line-height: 1.42857;
}


.timeline {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
}

.timeline-item {
    margin-bottom: 25px;
    position: relative;
}

.timeline-badge {
    position: absolute;
    left: -10px;
    top: 5px;
    padding: 5px 10px;
    font-size: 0.75rem;
    border-radius: 20px;
    z-index: 100;
    transform: translateX(-100%);
}

.timeline-panel {
    margin-left: 30px;
    border-left-width: 4px !important;
    background-color: #fff;
    border-radius: 0.5rem;
}

.fecha-timestamp {
    font-size: 0.875rem;
    font-weight: 500;
}

.usuario-nombre {
    font-size: 0.85rem;
}

/* Línea central del timeline */
.timeline {
  position: relative;
  padding: 0;
  list-style: none;
  margin: 1rem 0;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 50px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #e9ecef;
}

/* Grupo de fecha ("Hoy", "Ayer", etc.) */
.timeline-group {
  list-style: none;
  text-align: center;
  font-weight: 600;
  margin: 1rem 0;
  color: #6c757d;
}

/* Cada ítem */
.timeline-item {
  position: relative;
  margin-bottom: 2rem;
  padding-left: 80px;
}

/* Badge de tipo en mayúsculas */
.timeline-badge {
  position: absolute;
  left: 16px;
  top: 0;
  padding: 0.25rem 0.75rem;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 1rem;
  text-align: center;
}

/* Panel de contenido con borde fino */
.timeline-panel {
  position: relative;
  background: #fff;
  border-radius: 0.25rem;
}
.timeline-panel.border {
  border-width: 1px !important;
}

/* Filtros activos */
.filters .filter-btn.active {
  background-color: #007bff;
  color: #fff;
}

/* Avatar pequeño */
.avatar-sm {
  width: 32px;
  height: 32px;
  object-fit: cover;
  margin-right: 0.5rem;
}

/* Ocultar iniciales sobrantes */
.avatar-initials {
  display: none !important;
}

/* Fecha destacada */
.date-time .fecha {
  background-color: #fff3cd;
  color: #856404;
  font-weight: 700;
  padding: 0.2rem 0.4rem;
  border-radius: 0.25rem;
  margin-right: 0.5rem;
}
.date-time .fecha i,
.date-time .hora i {
  color: #17a2b8;
  margin-right: 0.25rem;
}

/* Fecha y hora juntos */
.date-time {
  font-size: 0.95rem;
}

/* Usuario */
.usuario-nombre {
  font-size: 0.9rem;
}

/* Resalte de gastos altos */
.high-expense {
  background-color: #fff3cd !important;
  border-color: #ffc107 !important;
}

/* Resalte de notas críticas */
.critical-note {
  background-color: #f8d7da !important;
  border-color: #dc3545 !important;
}

.filters .filter-btn {
  margin: 0 8px;
  color: #6c757d;
  transition: color .3s, background .3s;
  border: none;
}
.filters .filter-btn.active {
  color: var(--bs-primary);
  background-color: rgba(13,110,253,0.1);
  border-radius: 4px;
}

.timeline-group {
  font-weight: bold;
  font-size: 1.1rem;
  margin: 1rem 0 0.5rem;
  color: #444;
}

.timeline-item .fecha.destacado {
  background: #fff3cd;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 4px;
  margin-right: 8px;
}

.timeline-item .hora.destacado {
  background: #cfe2ff;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 4px;
}

.usuario-nombre {
  font-weight: bold;
  color: #333;
}

.high-expense {
  box-shadow: 0 0 8px rgba(255,193,7,0.6);
}

.critical-note {
  box-shadow: 0 0 8px rgba(220,53,69,0.6);
}

/* Filtros con iconos */
.filters .filter-btn {
  margin: 0 8px;
  color: #6c757d;
  border: none;
}
.filters .filter-btn.active {
  color: var(--bs-primary);
}

/* Borde delgado: azul para NOTA, rojo para GASTO */
.timeline-panel.border-primary {
  border: 1px solid #0d6efd !important;
}
.timeline-panel.border-danger {
  border: 1px solid #dc3545 !important;
}

/* Nombre de usuario resaltado en verde */
.usuario-nombre {
  color: #28a745;
  font-weight: bold;
}

/* (Opcional, solo si tu build no trae los defaults de Bootstrap) */
.modal-backdrop { z-index: 1040; }
.modal          { z-index: 1050; }

/* === Forzar toasts arriba-derecha (override absoluto) === */
#notif-toasts{
  position: fixed !important;
  top: 12px !important;
  right: 12px !important;
  bottom: auto !important;
  left: auto !important;
  z-index: 2000 !important;
}

/* Notificaciones – panel campana */
#notif-panel .list-group-item { padding: .75rem 1rem; }
#notif-panel .notif-item h6 { font-weight: 700; }
#notif-panel .notif-item .btn-link { color: #6b7280; text-decoration: none; }
#notif-panel .notif-item .btn-link:hover { color: #111827; }

/* Tabs bonitas */
#notif-panel .notif-tabs .btn {
  border-radius: 22px;
  padding: .4rem 1rem;
  font-weight: 700;
}
#notif-panel .notif-tabs .btn.active {
  background: #10b981;      /* verde agradable */
  color: #fff;
  border-color: #10b981;
}
