/* Variables y configuración global */
:root{
  --primary-color: #D4AF37;
  --primary-dark: #B8860B;
  --primary-light: #FFD700;
  --dark-grad-1: #3a3a3a;
  --dark-grad-2: #1e1e1e;
  --secondary-color: #2C3E50;
  --accent-color: #E74C3C;
  --success-color: #27AE60;
  --warning-color: #F39C12;
  --info-color: #3498DB;
  --light-bg: #F8F9FA;
  --dark-bg: #1f2933;
  --text-dark: #2C3E50;
  --text-muted: #7F8C8D;
  --white: #FFFFFF;
  --shadow-sm: 0 4px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 8px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 30px rgba(0,0,0,0.12);
  --border-radius: 12px;
  --transition: all 0.28s cubic-bezier(.25,.8,.25,1);
  --container-max: 1200px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body{
  font-family: 'Montserrat', sans-serif;
  color:var(--text-dark);
  background: linear-gradient(135deg,var(--dark-grad-1),var(--dark-grad-2));
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  line-height:1.6;
  -webkit-tap-highlight-color:transparent;
}

/* Tipografía Responsive */
h1 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.875rem;
}

h3 {
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

h4 {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.625rem;
}

h5 {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

h6 {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

/* Estilos del Login */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.login-container {
    display: flex;
    max-width: 1000px;
    width: 100%;
    background: var(--white);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    min-height: 600px;
}

.login-card {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.logo i {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.logo h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.login-header p {
    color: var(--text-light);
    font-size: 1rem;
}

.login-form {
    width: 100%;
}

.form-group {
    margin-bottom: 5px;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group i {
    position: absolute;
    left: 15px;
    color: var(--text-light);
    font-size: 1.1rem;
}

.input-group input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    border: 2px solid #E8E8E8;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--light-bg);
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.btn-login {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.message {
    margin-top: 15px;
    padding: 10px;
    border-radius: var(--border-radius);
    text-align: center;
    font-weight: 500;
}

.message.error {
    background: #FFE6E6;
    color: var(--accent-color);
    border: 1px solid #FFB8B8;
}

.message.success {
    background: #E6FFE6;
    color: var(--success-color);
    border: 1px solid #B8FFB8;
}

.login-decoration {
    flex: 0.6;
    background: linear-gradient(135deg, var(--secondary-color), #1A252F);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.gold-bar {
    width: 80%;
    height: 40px;
    background: linear-gradient(90deg, var(--primary-light), var(--primary-color), var(--primary-dark));
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
    transform: rotate(-5deg);
}

.gold-bar:nth-child(2) {
    transform: rotate(2deg);
    width: 70%;
}

.gold-bar:nth-child(3) {
    transform: rotate(-3deg);
    width: 85%;
}

/* Dashboard y Layout Principal */
.dashboard {
    display: flex;
    min-height: 100vh;
}

/* Botón de menú móvil */
.menu-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1001;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    border: none;
    border-radius: 8px;
    width: 45px;
    height: 45px;
    font-size: 1.3rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.menu-toggle:hover {
    transform: scale(1.05);
}

.sidebar {
    width: 280px;
    background: linear-gradient(180deg, var(--secondary-color), #1A252F);
    color: var(--white);
    padding: 20px 0;
    transition: var(--transition);
}

.sidebar-header {
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 20px;
}

.sidebar-menu {
    list-style: none;
}

.menu-item {
    margin-bottom: 5px;
}

.menu-item a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 15px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.menu-item a:hover,
.menu-item a.active {
    background: rgba(255,255,255,0.1);
    color: var(--white);
    border-left-color: var(--primary-color);
}

.menu-item i {
    width: 20px;
    text-align: center;
}

.main-content {
    flex: 1;
    background: var(--light-bg);
    overflow-y: auto;
}

.top-nav {
    background: var(--white);
    padding: 15px 30px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-nav h1 {
    font-size: 1.8rem;
    margin-bottom: 0;
	margin-left: 35px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 600;
}

.content-area {
    padding: 30px;
}

/* Cards y Componentes */
.card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 25px;
    overflow: hidden;
}

.card-header {
    padding: 10px 15px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.card-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0;
}

.card-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0;
}

.card-body {
    padding: 5px;
}

/* Botones */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 0.9rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #229954);
    color: var(--white);
}

.btn-danger {
    background: linear-gradient(135deg, var(--accent-color), #CB4335);
    color: var(--white);
}

.btn-info {
    background: linear-gradient(135deg, var(--info-color), #2980B9);
    color: var(--white);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Tablas */
.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #E8E8E8;
}

.data-table th {
    background: var(--light-bg);
    font-weight: 600;
    color: var(--text-dark);
}

.data-table tr:hover {
    background: #F8F9FA;
}

/* Formularios */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #E8E8E8;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--light-bg);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

/* Items de Compra */
.compra-items {
    margin: 20px 0;
}

.item-row {
    display: grid;
    grid-template-columns: 60px 1fr 1fr 1fr 1fr 1fr 1fr 1fr 80px;
    gap: 10px;
    align-items: end;
    margin-bottom: 15px;
    padding: 15px;
    background: var(--light-bg);
    border-radius: var(--border-radius);
}

.scroll-top-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background-color: #2563eb;
  color: #fff;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
}

.scroll-top-btn.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top-btn:hover {
  background-color: #1d4ed8;
  transform: scale(1.1);
}

.scroll-top-btn.active {
  transform: translateY(-10px);
}

/* === GRID GENERAL === */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.5rem;
  padding: 0rem;
	margin-bottom: 10px;
}

/* === TARJETAS DE ESTADÍSTICA === */
.stat-card {
  background: #ffffff;
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

/* === ÍCONO DE LA TARJETA === */
.stat-icon {
  background: #2563eb;
  color: #fff;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-right: 1rem;
  flex-shrink: 0;
  transition: background 0.3s ease;
}

.stat-card:hover .stat-icon {
  background: #1d4ed8;
}

/* === INFORMACIÓN DE LA TARJETA === */
.stat-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #1e293b;
}

/* === CANTIDAD O NÚMERO === */
.stat-amount {
  font-size: 1.6rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.25rem;
}

/* === TEXTO SECUNDARIO / DESCRIPCIÓN === */
.stat-info span {
  font-size: 0.9rem;
  color: #6b7280;
}

/* === CONTENEDOR DE ACCIONES RÁPIDAS === */
.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.5rem;
  justify-content: flex-start;
}

/* === TARJETA / BOTÓN DE ACCIÓN RÁPIDA === */
.quick-action {
  flex: 1 1 160px;
  background: #ffffff;
  border-radius: 0.75rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: #1e293b;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.quick-action:hover {
  background: #2563eb;
  color: #fff;
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.25);
  border-color: #1d4ed8;
}

/* === ÍCONOS OPCIONALES === */
.quick-action i,
.quick-action svg {
  font-size: 1.4rem;
  color: inherit;
  transition: transform 0.3s ease;
}

.quick-action:hover i,
.quick-action:hover svg {
  transform: scale(1.2);
}

/* === VARIANTES DE COLOR (opcional) === */
.quick-action.primary {
  background: #2563eb;
  color: #fff;
}

.quick-action.success {
  background: #16a34a;
  color: #fff;
}

.quick-action.warning {
  background: #f59e0b;
  color: #fff;
}

.quick-action.danger {
  background: #dc2626;
  color: #fff;
}

/* ========================================
   RESPONSIVE DESIGN - TABLETS
   ======================================== */
@media (max-width: 1024px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    h4 {
        font-size: 1.35rem;
    }
    
    h5 {
        font-size: 1.15rem;
    }
    
    h6 {
        font-size: 1rem;
    }
    
    .top-nav h1 {
        font-size: 1.5rem;
    }
    
    .card-header h2 {
        font-size: 1.35rem;
    }
    
    .card-header h3 {
        font-size: 1.2rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1.25rem;
        padding: 1.25rem;
    }
    
    .stat-amount {
        font-size: 1.4rem;
    }
}

/* ========================================
   RESPONSIVE DESIGN - MÓVILES
   ======================================== */
@media (max-width: 768px) {
    /* Tipografía móvil */
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.35rem;
    }
    
    h4 {
        font-size: 1.2rem;
    }
    
    h5 {
        font-size: 1.1rem;
    }
    
    h6 {
        font-size: 1rem;
    }
    
    .login-container {
        flex-direction: column;
        max-width: 400px;
    }
    
    .login-decoration {
        display: none;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .logo i {
        font-size: 2rem;
    }
    
    .dashboard {
        flex-direction: column;
    }
    
    /* Mostrar botón de menú */
    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Sidebar oculto por defecto en móvil */
    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        height: 100vh;
        z-index: 1000;
        width: 280px;
    }
    
    /* Sidebar visible cuando tiene clase active */
    .sidebar.active {
        left: 0;
        box-shadow: 5px 0 15px rgba(0, 0, 0, 0.3);
    }
    
    .main-content {
        width: 100%;
    }
    
    .top-nav {
        padding: 12px 70px 12px 70px;
    }
    
    .top-nav h1 {
        font-size: 1.25rem;
    }
    
    .content-area {
        padding: 20px 15px;
    }
    
    /* Card header responsive */
    .card-header {
        padding: 15px 18px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .card-header h2 {
        font-size: 1.2rem;
    }
    
    .card-header h3 {
        font-size: 1.1rem;
    }
    
    .card-body {
        padding: 18px;
    }
    
    .item-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    /* Stats grid móvil */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }
    
    .stat-card {
        padding: 1.25rem;
    }
    
    .stat-icon {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
    
    .stat-amount {
        font-size: 1.3rem;
    }
    
    .stat-info span {
        font-size: 0.85rem;
    }
    
    /* Quick actions móvil */
    .quick-actions {
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem;
    }
    
    .quick-action {
        flex: 1 1 auto;
        width: 100%;
        padding: 0.875rem 1rem;
        font-size: 0.9rem;
    }
    
    .quick-action i,
    .quick-action svg {
        font-size: 1.2rem;
    }
    
    /* Botones móviles */
    .btn {
        padding: 8px 16px;
        font-size: 0.85rem;
        gap: 6px;
    }
    
    /* Scroll button móvil */
    .scroll-top-btn {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
}

/* ========================================
   RESPONSIVE DESIGN - MÓVILES PEQUEÑOS
   ======================================== */
@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.3rem;
    }
    
    h3 {
        font-size: 1.2rem;
    }
    
    h4 {
        font-size: 1.1rem;
    }
    
    h5 {
        font-size: 1rem;
    }
    
    h6 {
        font-size: 0.95rem;
    }
    
    .top-nav {
        padding: 10px 60px 10px 60px;
    }
    
    .top-nav h1 {
        font-size: 1.1rem;
    }
    
    .card-header {
        padding: 12px 15px;
    }
    
    .card-header h2 {
        font-size: 1.1rem;
    }
    
    .card-header h3 {
        font-size: 1rem;
    }
    
    .card-body {
        padding: 15px;
    }
    
    .content-area {
        padding: 15px 10px;
    }
    
    .stat-amount {
        font-size: 1.2rem;
    }
    
    .stat-info span {
        font-size: 0.8rem;
    }
    
    .user-info span {
        font-size: 0.85rem;
    }
    
    .menu-toggle {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

/* === CONTENEDOR DE FILAS === */
.row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -0.75rem;
  margin-left: -0.75rem;
}

/* === COLUMNA BÁSICA === */
.col {
  flex: 1 0 0%;
  padding-right: 0.75rem;
  padding-left: 0.75rem;
}

/* === COLUMNAS FIJAS 1–12 === */
[class^="col-"] {
  padding-right: 0.75rem;
  padding-left: 0.75rem;
  box-sizing: border-box;
}

/* Grid de 12 columnas */
.col-1  { flex: 0 0 8.333%;  max-width: 8.333%; }
.col-2  { flex: 0 0 16.666%; max-width: 16.666%; }
.col-3  { flex: 0 0 25%;     max-width: 25%; }
.col-4  { flex: 0 0 33.333%; max-width: 33.333%; }
.col-5  { flex: 0 0 41.666%; max-width: 41.666%; }
.col-6  { flex: 0 0 50%;     max-width: 50%; }
.col-7  { flex: 0 0 58.333%; max-width: 58.333%; }
.col-8  { flex: 0 0 66.666%; max-width: 66.666%; }
.col-9  { flex: 0 0 75%;     max-width: 75%; }
.col-10 { flex: 0 0 83.333%; max-width: 83.333%; }
.col-11 { flex: 0 0 91.666%; max-width: 91.666%; }
.col-12 { flex: 0 0 100%;    max-width: 100%; }

/* === BREAKPOINTS RESPONSIVE === */
/* sm ≥ 576px */
@media (min-width: 576px) {
  .col-sm-1  { flex: 0 0 8.333%;  max-width: 8.333%; }
  .col-sm-2  { flex: 0 0 16.666%; max-width: 16.666%; }
  .col-sm-3  { flex: 0 0 25%;     max-width: 25%; }
  .col-sm-4  { flex: 0 0 33.333%; max-width: 33.333%; }
  .col-sm-5  { flex: 0 0 41.666%; max-width: 41.666%; }
  .col-sm-6  { flex: 0 0 50%;     max-width: 50%; }
  .col-sm-7  { flex: 0 0 58.333%; max-width: 58.333%; }
  .col-sm-8  { flex: 0 0 66.666%; max-width: 66.666%; }
  .col-sm-9  { flex: 0 0 75%;     max-width: 75%; }
  .col-sm-10 { flex: 0 0 83.333%; max-width: 83.333%; }
  .col-sm-11 { flex: 0 0 91.666%; max-width: 91.666%; }
  .col-sm-12 { flex: 0 0 100%;    max-width: 100%; }
}

/* md ≥ 768px */
@media (min-width: 768px) {
  .col-md-1  { flex: 0 0 8.333%;  max-width: 8.333%; }
  .col-md-2  { flex: 0 0 16.666%; max-width: 16.666%; }
  .col-md-3  { flex: 0 0 25%;     max-width: 25%; }
  .col-md-4  { flex: 0 0 33.333%; max-width: 33.333%; }
  .col-md-5  { flex: 0 0 41.666%; max-width: 41.666%; }
  .col-md-6  { flex: 0 0 50%;     max-width: 50%; }
  .col-md-7  { flex: 0 0 58.333%; max-width: 58.333%; }
  .col-md-8  { flex: 0 0 66.666%; max-width: 66.666%; }
  .col-md-9  { flex: 0 0 75%;     max-width: 75%; }
  .col-md-10 { flex: 0 0 83.333%; max-width: 83.333%; }
  .col-md-11 { flex: 0 0 91.666%; max-width: 91.666%; }
  .col-md-12 { flex: 0 0 100%;    max-width: 100%; }
}

/* lg ≥ 992px */
@media (min-width: 992px) {
  .col-lg-1  { flex: 0 0 8.333%;  max-width: 8.333%; }
  .col-lg-2  { flex: 0 0 16.666%; max-width: 16.666%; }
  .col-lg-3  { flex: 0 0 25%;     max-width: 25%; }
  .col-lg-4  { flex: 0 0 33.333%; max-width: 33.333%; }
  .col-lg-5  { flex: 0 0 41.666%; max-width: 41.666%; }
  .col-lg-6  { flex: 0 0 50%;     max-width: 50%; }
  .col-lg-7  { flex: 0 0 58.333%; max-width: 58.333%; }
  .col-lg-8  { flex: 0 0 66.666%; max-width: 66.666%; }
  .col-lg-9  { flex: 0 0 75%;     max-width: 75%; }
  .col-lg-10 { flex: 0 0 83.333%; max-width: 83.333%; }
  .col-lg-11 { flex: 0 0 91.666%; max-width: 91.666%; }
  .col-lg-12 { flex: 0 0 100%;    max-width: 100%; }
}

/* xl ≥ 1200px */
@media (min-width: 1200px) {
  .col-xl-1  { flex: 0 0 8.333%;  max-width: 8.333%; }
  .col-xl-2  { flex: 0 0 16.666%; max-width: 16.666%; }
  .col-xl-3  { flex: 0 0 25%;     max-width: 25%; }
  .col-xl-4  { flex: 0 0 33.333%; max-width: 33.333%; }
  .col-xl-5  { flex: 0 0 41.666%; max-width: 41.666%; }
  .col-xl-6  { flex: 0 0 50%;     max-width: 50%; }
  .col-xl-7  { flex: 0 0 58.333%; max-width: 58.333%; }
  .col-xl-8  { flex: 0 0 66.666%; max-width: 66.666%; }
  .col-xl-9  { flex: 0 0 75%;     max-width: 75%; }
  .col-xl-10 { flex: 0 0 83.333%; max-width: 83.333%; }
  .col-xl-11 { flex: 0 0 91.666%; max-width: 91.666%; }
  .col-xl-12 { flex: 0 0 100%;    max-width: 100%; }
}


/* ============================================
   SIDEBAR ESTÁTICO (FIJO)
   ============================================ */
.sidebar,
aside {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

/* Scrollbar personalizado para el sidebar */
.sidebar::-webkit-scrollbar,
aside::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track,
aside::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.sidebar::-webkit-scrollbar-thumb,
aside::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover,
aside::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ============================================
   TOP-NAV ESTÁTICO (FIJO)
   ============================================ */
.top-nav {
    position: fixed;
    top: 0;
    left: 280px; /* Ancho del sidebar */
    right: 0;
    height: 70px;
    background: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    z-index: 999;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* ============================================
   AJUSTAR CONTENIDO PRINCIPAL
   ============================================ */
.main-content {
    margin-left: 280px; /* Ancho del sidebar */
    padding-top: 70px; /* Altura del top-nav */
    min-height: 100vh;
    background-color: #f5f5f5;
}

.content-area {
    padding: 30px;
}

/* ============================================
   DASHBOARD CONTAINER
   ============================================ */
.dashboard {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* ============================================
   SIDEBAR FOOTER AJUSTADO
   ============================================ */
.sidebar-footer {
    margin-top: auto;
    padding: 20px 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    bottom: 0;
    z-index: 10;
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablets */
@media (max-width: 1024px) {
    .sidebar,
    aside {
        width: 250px;
    }
    
    .top-nav {
        left: 250px;
    }
    
    .main-content {
        margin-left: 250px;
    }
}

/* Móviles - Sidebar oculto por defecto */
@media (max-width: 768px) {
    .sidebar,
    aside {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        width: 280px;
    }
    
    .sidebar.active,
    aside.active {
        transform: translateX(0);
    }
    
    .top-nav {
        left: 0;
        padding: 0 15px;
    }
    
    .main-content {
        margin-left: 0;
        padding-top: 70px;
    }
    
    .content-area {
        padding: 15px;
    }
    
    /* Overlay para cerrar sidebar en móvil */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }
    
    .sidebar-overlay.active {
        display: block;
    }
    
    /* Botón hamburguesa */
    .menu-toggle {
        display: block;
        background: none;
        border: none;
        font-size: 24px;
        color: #333;
        cursor: pointer;
        padding: 5px;
    }
}

/* Escritorio - Ocultar botón hamburguesa */
@media (min-width: 769px) {
    .menu-toggle {
        display: none;
    }
    
    .sidebar-overlay {
        display: none !important;
    }
}

/* ============================================
   PREVENIR SCROLL DEL BODY CUANDO SIDEBAR ABIERTO
   ============================================ */
body.sidebar-open {
    overflow: hidden;
}

/* ============================================
   ESTILOS ADICIONALES PARA MANTENER CONSISTENCIA
   ============================================ */
.top-nav h1 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.user-info span {
    font-weight: 500;
    color: #333;
}

/* Asegurar que el contenido no quede detrás del top-nav */
.card {
    margin-top: 0;
}

/* ============================================
   MODO COMPACTO (OPCIONAL)
   ============================================ */
.sidebar.compact {
    width: 80px;
}

.sidebar.compact ~ .top-nav {
    left: 80px;
}

.sidebar.compact ~ .main-content {
    margin-left: 80px;
}

/* ============================================
   ANIMACIONES SUAVES
   ============================================ */
.sidebar,
aside,
.top-nav,
.main-content {
    transition: all 0.3s ease;
}

/* ============================================
   IMPRESIÓN - Ocultar navegación
   ============================================ */
@media print {
    .sidebar,
    aside,
    .top-nav {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
        padding-top: 0 !important;
    }
}

        @media print {
            body * {
                visibility: hidden;
            }
            #printArea, #printArea * {
                visibility: visible;
            }
            #printArea {
                position: absolute;
                left: 0;
                top: 0;
                width: 100%;
            }
            .no-print {
                display: none !important;
            }
        }
/* Estilos para el módulo de compras */

.items-container {
    margin-top: 20px;
    max-height: 600px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #f9f9f9;
}

.item-row {
    display: grid;
    grid-template-columns: 50px 1fr 1fr 1fr 1fr 120px 1fr 1fr 60px;
    gap: 10px;
    align-items: end;
    padding: 15px;
    margin-bottom: 15px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border: 1px solid #e8e8e8;
}

.item-row:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.item-number {
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-number input {
    text-align: center;
    font-weight: bold;
    background-color: #f0f0f0;
    border: 1px solid #d0d0d0;
    padding: 8px 5px;
    width: 100%;
    border-radius: 4px;
}

.item-field {
    display: flex;
    flex-direction: column;
}

.item-field label {
    font-size: 11px;
    font-weight: 600;
    color: #555;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.item-field input,
.item-field select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
}

.item-field input:focus,
.item-field select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.1);
}

.item-field input[readonly] {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.item-actions {
    display: flex;
    align-items: center;
    justify-content: center;
}

.eliminar-item {
    padding: 8px 12px;
    background-color: #f44336;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.eliminar-item:hover:not(:disabled) {
    background-color: #d32f2f;
}

.eliminar-item:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.5;
}

.compra-totales {
    margin-top: 30px;
    padding: 20px;
    background-color: #f5f5f5;
    border-radius: 8px;
}

.totales-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.total-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: white;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.total-item label {
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.total-item span {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.total-final {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.total-final label,
.total-final span {
    color: white;
}

.total-final span {
    font-size: 24px;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
}

.btn-guardar {
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.btn-guardar-imprimir {
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    background-color: #2196F3;
    color: white;
}

.btn-guardar-imprimir:hover {
    background-color: #1976D2;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(33, 150, 243, 0.3);
}

.btn-success {
    background-color: #4CAF50;
    color: white;
}

.btn-success:hover {
    background-color: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.3);
}

.btn-warning {
    background-color: #ff9800;
    color: white;
}

.btn-warning:hover {
    background-color: #f57c00;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 152, 0, 0.3);
}

.btn-secondary {
    background-color: #757575;
    color: white;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background-color: #616161;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(117, 117, 117, 0.3);
}

/* Notificaciones */
.notification {
    position: fixed;
    top: 20px;
    right: -400px;
    min-width: 300px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: right 0.3s ease;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification.show {
    right: 20px;
}

.notification-success {
    background-color: #4CAF50;
}

.notification-error {
    background-color: #f44336;
}

.notification-warning {
    background-color: #ff9800;
}

.notification i {
    font-size: 20px;
}

/* Información del cliente */
.cliente-info {
    margin: 20px 0;
    padding: 15px;
    background-color: #e3f2fd;
    border-left: 4px solid #2196F3;
    border-radius: 4px;
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.alert-info {
    background-color: #e3f2fd;
    border-left: 4px solid #2196F3;
    color: #0d47a1;
}

.alert-success {
    background-color: #e8f5e9;
    border-left: 4px solid #4CAF50;
    color: #1b5e20;
}

/* Responsive */
@media (max-width: 1400px) {
    .item-row {
        grid-template-columns: 40px 0.8fr 0.8fr 0.8fr 0.8fr 100px 0.9fr 0.9fr 50px;
        gap: 8px;
    }
}

@media (max-width: 1200px) {
    .item-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .item-field {
        width: 100%;
    }
    
    .totales-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .form-actions {
        flex-direction: column;
    }
    
    .btn-guardar,
    .btn-secondary {
        width: 100%;
    }
}

/* Estilos para el módulo de compras */
.items-container {
    margin-top: 20px;
    max-height: 600px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #f9f9f9;
}

.item-row {
    display: grid;
    grid-template-columns: 50px 1fr 1fr 1fr 1fr 120px 1fr 1fr 60px;
    gap: 10px;
    align-items: end;
    padding: 15px;
    margin-bottom: 15px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border: 1px solid #e8e8e8;
}

.item-row:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.item-number {
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-number input {
    text-align: center;
    font-weight: bold;
    background-color: #f0f0f0;
    border: 1px solid #d0d0d0;
    padding: 8px 5px;
    width: 100%;
    border-radius: 4px;
}

.item-field {
    display: flex;
    flex-direction: column;
}

.item-field label {
    font-size: 11px;
    font-weight: 600;
    color: #555;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.item-field input,
.item-field select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
}

.item-field input:focus,
.item-field select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.1);
}

.item-field input[readonly] {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.item-actions {
    display: flex;
    align-items: center;
    justify-content: center;
}

.eliminar-item {
    padding: 8px 12px;
    background-color: #f44336;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.eliminar-item:hover:not(:disabled) {
    background-color: #d32f2f;
}

.eliminar-item:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.5;
}

.compra-totales {
    margin-top: 30px;
    padding: 20px;
    background-color: #f5f5f5;
    border-radius: 8px;
}

.totales-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.total-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: white;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.total-item label {
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.total-item span {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.total-final {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.total-final label,
.total-final span {
    color: white;
}

.total-final span {
    font-size: 24px;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
}

.btn-guardar {
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.btn-success {
    background-color: #4CAF50;
    color: white;
}

.btn-success:hover {
    background-color: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.3);
}

.btn-secondary {
    background-color: #757575;
    color: white;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background-color: #616161;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(117, 117, 117, 0.3);
}

/* Notificaciones */
.notification {
    position: fixed;
    top: 20px;
    right: -400px;
    min-width: 300px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: right 0.3s ease;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification.show {
    right: 20px;
}

.notification-success {
    background-color: #4CAF50;
}

.notification-error {
    background-color: #f44336;
}

.notification i {
    font-size: 20px;
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.alert-info {
    background-color: #e3f2fd;
    border-left: 4px solid #2196F3;
    color: #0d47a1;
}

.alert-warning {
    background-color: #fff3cd;
    border-left: 4px solid #ff9800;
    color: #856404;
}

/* Responsive */
@media (max-width: 1400px) {
    .item-row {
        grid-template-columns: 40px 0.8fr 0.8fr 0.8fr 0.8fr 100px 0.9fr 0.9fr 50px;
        gap: 8px;
    }
}

@media (max-width: 1200px) {
    .item-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .item-field {
        width: 100%;
    }
    
    .totales-grid {
        grid-template-columns: 1fr;
    }
}

        @media print {
            body * {
                visibility: hidden;
            }
            #printArea, #printArea * {
                visibility: visible;
            }
            #printArea {
                position: absolute;
                left: 0;
                top: 0;
                width: 100%;
            }
            .no-print {
                display: none !important;
            }
        }
/* Estilos para el módulo de compras */

.items-container {
    margin-top: 20px;
    max-height: 600px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #f9f9f9;
}

.item-row {
    display: grid;
    grid-template-columns: 50px 1fr 1fr 1fr 1fr 120px 1fr 1fr 60px;
    gap: 10px;
    align-items: end;
    padding: 15px;
    margin-bottom: 15px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border: 1px solid #e8e8e8;
}

.item-row:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.item-number {
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-number input {
    text-align: center;
    font-weight: bold;
    background-color: #f0f0f0;
    border: 1px solid #d0d0d0;
    padding: 8px 5px;
    width: 100%;
    border-radius: 4px;
}

.item-field {
    display: flex;
    flex-direction: column;
}

.item-field label {
    font-size: 11px;
    font-weight: 600;
    color: #555;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.item-field input,
.item-field select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
}

.item-field input:focus,
.item-field select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.1);
}

.item-field input[readonly] {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.item-actions {
    display: flex;
    align-items: center;
    justify-content: center;
}

.eliminar-item {
    padding: 8px 12px;
    background-color: #f44336;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.eliminar-item:hover:not(:disabled) {
    background-color: #d32f2f;
}

.eliminar-item:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.5;
}

.compra-totales {
    margin-top: 30px;
    padding: 20px;
    background-color: #f5f5f5;
    border-radius: 8px;
}

.totales-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.total-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: white;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.total-item label {
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.total-item span {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.total-final {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.total-final label,
.total-final span {
    color: white;
}

.total-final span {
    font-size: 24px;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
}

.btn-guardar {
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.btn-guardar-imprimir {
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    background-color: #2196F3;
    color: white;
}

.btn-guardar-imprimir:hover {
    background-color: #1976D2;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(33, 150, 243, 0.3);
}

.btn-success {
    background-color: #4CAF50;
    color: white;
}

.btn-success:hover {
    background-color: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.3);
}

.btn-warning {
    background-color: #ff9800;
    color: white;
}

.btn-warning:hover {
    background-color: #f57c00;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 152, 0, 0.3);
}

.btn-secondary {
    background-color: #757575;
    color: white;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background-color: #616161;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(117, 117, 117, 0.3);
}

/* Notificaciones */
.notification {
    position: fixed;
    top: 20px;
    right: -400px;
    min-width: 300px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: right 0.3s ease;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification.show {
    right: 20px;
}

.notification-success {
    background-color: #4CAF50;
}

.notification-error {
    background-color: #f44336;
}

.notification-warning {
    background-color: #ff9800;
}

.notification i {
    font-size: 20px;
}

/* Información del cliente */
.cliente-info {
    margin: 20px 0;
    padding: 15px;
    background-color: #e3f2fd;
    border-left: 4px solid #2196F3;
    border-radius: 4px;
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.alert-info {
    background-color: #e3f2fd;
    border-left: 4px solid #2196F3;
    color: #0d47a1;
}

/* Responsive */
@media (max-width: 1400px) {
    .item-row {
        grid-template-columns: 40px 0.8fr 0.8fr 0.8fr 0.8fr 100px 0.9fr 0.9fr 50px;
        gap: 8px;
    }
}

@media (max-width: 1200px) {
    .item-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .item-field {
        width: 100%;
    }
    
    .totales-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .form-actions {
        flex-direction: column;
    }
    
    .btn-guardar,
    .btn-secondary {
        width: 100%;
    }
}

    .header-actions {
        display: flex;
        gap: 10px;
        align-items: center;
    }
    
    .compra-info {
        padding: 20px 0;
    }
    
    .info-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 15px;
        margin-bottom: 20px;
    }
    
    .info-item {
        display: flex;
        flex-direction: column;
        padding: 10px;
        background: #f8f9fa;
        border-radius: 8px;
    }
    
    .info-item label {
        font-weight: 600;
        color: var(--text-dark);
        margin-bottom: 5px;
        font-size: 0.9rem;
    }
    
    .info-item span {
        color: var(--text-light);
        font-size: 1rem;
    }
    
    .codigo-compra {
        font-weight: bold;
        color: var(--primary-color) !important;
        font-size: 1.1rem !important;
    }
    
    .cliente-info-detalle {
        margin-top: 25px;
        padding: 20px;
        background: var(--light-bg);
        border-radius: var(--border-radius);
        border-left: 4px solid var(--primary-color);
    }
    
    .cliente-info-detalle h4 {
        color: var(--secondary-color);
        margin-bottom: 15px;
        font-size: 1.2rem;
    }
    
    .totales-resumen {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 15px;
        max-width: 500px;
        margin: 0 auto;
    }
    
    .total-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px;
        background: #f8f9fa;
        border-radius: 8px;
        border: 1px solid #e8e8e8;
    }
    
    .total-item label {
        font-weight: 600;
        color: var(--text-dark);
    }
    
    .total-item span {
        font-weight: 600;
        color: var(--text-dark);
    }
    
    .total-final {
        background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
        color: white;
    }
    
    .total-final label,
    .total-final span {
        color: white;
        font-size: 1.1rem;
    }
    
    .temporal-info {
        padding: 20px;
        background: #fff3cd;
        border-radius: var(--border-radius);
        border-left: 4px solid var(--warning-color);
    }
    
    .acciones-compra {
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
    }
    
    .badge-pendiente { background: var(--warning-color); color: white; }
    .badge-completada { background: var(--success-color); color: white; }
    .badge-reservada { background: var(--info-color); color: white; }
    .badge-temporal { background: var(--primary-color); color: white; }
    
    /* Estilos para impresión */
    @media print {
        .top-nav, .header-actions, .acciones-compra, .card-header .btn {
            display: none !important;
        }
        
        .card {
            border: 1px solid #000 !important;
            box-shadow: none !important;
        }
        
        .card-header {
            background: #f8f9fa !important;
            color: #000 !important;
        }
    }

    .apertura-info {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
        margin-bottom: 25px;
        padding: 20px;
        background: var(--light-bg);
        border-radius: var(--border-radius);
    }
    
    .info-item {
        display: flex;
        flex-direction: column;
    }
    
    .info-item label {
        font-weight: 600;
        color: var(--text-dark);
        margin-bottom: 5px;
    }
    
    .info-item span {
        color: var(--text-light);
    }
    
    .info-item.full-width {
        grid-column: 1 / -1;
    }
    
    .resumen-ayer {
        padding: 20px;
        background: #f8f9fa;
        border-radius: var(--border-radius);
        border-left: 4px solid var(--primary-color);
    }
    
    .info-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
        margin-bottom: 15px;
    }
    
    .amount {
        font-weight: 600;
        color: var(--success-color);
    }

    .resumen-caja {
        background: var(--light-bg);
        padding: 25px;
        border-radius: var(--border-radius);
        margin-bottom: 25px;
        border-left: 4px solid var(--primary-color);
    }
    
    .resumen-caja h3 {
        color: var(--secondary-color);
        margin-bottom: 20px;
        font-size: 1.3rem;
    }
    
    .resumen-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 15px;
    }
    
    .resumen-item {
        display: flex;
        flex-direction: column;
    }
    
    .resumen-item label {
        font-weight: 600;
        color: var(--text-dark);
        margin-bottom: 5px;
        font-size: 0.9rem;
    }
    
    .resumen-item span {
        font-size: 1.1rem;
        font-weight: 600;
    }

    .modal-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 1000;
    }
    
    .modal-container {
        background: white;
        border-radius: var(--border-radius);
        box-shadow: var(--shadow-lg);
        width: 90%;
        max-width: 500px;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .modal-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px 25px;
        background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
        color: white;
        border-radius: var(--border-radius) var(--border-radius) 0 0;
    }
    
    .modal-header h3 {
        margin: 0;
        font-size: 1.3rem;
    }
    
    .modal-close {
        background: none;
        border: none;
        color: white;
        font-size: 1.2rem;
        cursor: pointer;
        padding: 5px;
        border-radius: 50%;
        width: 30px;
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background-color 0.3s ease;
    }
    
    .modal-close:hover {
        background: rgba(255, 255, 255, 0.2);
    }
    
    .modal-body {
        padding: 25px;
    }
    
    .caja-info {
        padding: 0px 0;
    }
    
    .info-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 15px;
        margin-bottom: 15px;
    }
    
    .info-item {
        display: flex;
        flex-direction: column;
        padding: 5px 15px;
        background: #f8f9fa;
        border-radius: 8px;
        border-left: 4px solid var(--primary-color);
    }
    
    .info-item label {
        font-weight: 600;
        color: var(--text-dark);
        margin-bottom: 5px;
        font-size: 0.9rem;
    }
    
    .info-item span {
        font-size: 1.1rem;
        font-weight: 600;
    }
    
    .info-item.full-width {
        grid-column: 1 / -1;
    }
    
    .amount {
        color: var(--success-color);
    }
    
    .alert {
        padding: 15px;
        border-radius: var(--border-radius);
        margin: 10px 0;
    }
    
    .alert-warning {
        background: #fff3cd;
        border: 1px solid #ffeaa7;
        color: #856404;
    }
    
    .alert i {
        margin-right: 10px;
    }
    
    @media (max-width: 768px) {
        .modal-container {
            width: 95%;
            margin: 20px;
        }
        
        .info-grid {
            grid-template-columns: 1fr;
        }
        
        .modal-header {
            padding: 15px 20px;
        }
        
        .modal-body {
            padding: 20px;
        }
    }

    .reportes-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 20px;
        margin-bottom: 30px;
    }
    
    .reporte-card {
        display: flex;
        align-items: center;
        background: white;
        padding: 25px;
        border-radius: var(--border-radius);
        box-shadow: var(--shadow);
        text-decoration: none;
        color: var(--text-dark);
        transition: var(--transition);
        border: 2px solid transparent;
    }
    
    .reporte-card:hover {
        border-color: var(--primary-color);
        transform: translateY(-3px);
        box-shadow: var(--shadow-lg);
    }
    
    .reporte-icon {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-size: 1.5rem;
        margin-right: 20px;
    }
    
    .reporte-info {
        flex: 1;
    }
    
    .reporte-info h3 {
        margin-bottom: 5px;
        color: var(--secondary-color);
    }
    
    .reporte-info p {
        color: var(--text-light);
        font-size: 0.9rem;
        margin: 0;
    }
    
    .reporte-arrow {
        color: var(--text-light);
        font-size: 1.2rem;
    }
    
    @media (max-width: 768px) {
        .reportes-grid {
            grid-template-columns: 1fr;
        }
        
        .reporte-card {
            flex-direction: column;
            text-align: center;
        }
        
        .reporte-icon {
            margin-right: 0;
            margin-bottom: 15px;
        }
    }

    .reporte-info {
        font-size: 0.9rem;
        color: var(--text-light);
    }
    
    .estadisticas-reporte {
        margin-bottom: 25px;
    }

    .caja-detalle {
        background: var(--light-bg);
        padding: 20px;
        border-radius: var(--border-radius);
        margin-bottom: 20px;
    }
    
    .caja-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 15px;
        padding-bottom: 10px;
        border-bottom: 1px solid #dee2e6;
    }
    
    .caja-header h3 {
        margin: 0;
        color: var(--secondary-color);
        font-size: 1.2rem;
    }
    
    .caja-resumen {
        margin-bottom: 20px;
    }
    
    .resumen-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
        margin-bottom: 10px;
    }
    
    .resumen-item {
        display: flex;
        flex-direction: column;
    }
    
    .resumen-item label {

        font-weight: 600;
        color: var(--text-dark);
        margin-bottom: 5px;
        font-size: 0.9rem;
    }
    
    .resumen-item span {
        font-size: 1rem;
        font-weight: 600;
    }
    
    .caja-horarios {
        text-align: center;
        padding: 10px;
        background: rgba(0,0,0,0.05);
        border-radius: 5px;
    }
    
    .movimientos-caja {
        margin-top: 20px;
    }
    
    .movimientos-caja h4 {
        color: var(--secondary-color);
        margin-bottom: 15px;
        font-size: 1.1rem;
    }

.main-footer {
    background: linear-gradient(135deg, var(--secondary-color), #1A252F);
    color: white;
    padding: 40px 0 20px;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-section h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.footer-section p {
    margin-bottom: 8px;
    color: rgba(255,255,255,0.8);
}

.footer-section a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-section i {
    width: 20px;
    margin-right: 8px;
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 30px;
    padding-top: 20px;
    text-align: center;
    color: rgba(255,255,255,0.6);
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

.sidebar-footer {
    margin-top: auto;
    padding: 20px 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    bottom: 0;
    z-index: 10;
}

.legal {
    text-align: center;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
}

.copyright {
    margin-bottom: 8px;
}

.copyright a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 500;
}

.copyright a:hover {
    color: #fff;
}

.version {
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.5);
}

.precio-onza {
    margin-top: 15px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.onza-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.onza-info i {
    font-size: 24px;
    color: #FFD700;
}

.onza-detalles {
    display: flex;
    flex-direction: column;
    text-align: left;
    flex: 1;
}

.onza-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.onza-precio {
    font-size: 20px;
    font-weight: bold;
    color: #FFD700;
    margin: 2px 0;
}

.onza-fecha {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.5);
}

/* Animación de actualización */
@keyframes pulse-gold {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
    100% {
        opacity: 1;
    }
}

.onza-precio.updating {
    animation: pulse-gold 1s ease-in-out;
}

    .stat-percentage {
        font-size: 0.8rem;
        color: var(--success-color);
        font-weight: 600;
    }

    .info-adicional {
        background: var(--light-bg);
        padding: 20px;
        border-radius: var(--border-radius);
        margin: 25px 0;
        border-left: 4px solid var(--primary-color);
    }
    
    .info-adicional h4 {
        color: var(--secondary-color);
        margin-bottom: 15px;
        font-size: 1.1rem;
    }
    
    .info-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 15px;
    }
    
    .info-item {
        display: flex;
        flex-direction: column;
    }
    
    .info-item label {
        font-weight: 600;
        color: var(--text-dark);
        margin-bottom: 5px;
        font-size: 0.9rem;
    }
    
    .info-item span {
        color: var(--text-light);
    }

