/* ===== ESTILOS BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}


body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, #0A1C64 0%, #0A1C64 100%);
  min-height: 100vh;
}

body.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
}

/* ===== CONTENEDORES PRINCIPALES ===== */
.container {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 1630px;
  margin: 0 auto;
  padding: 40px;
  animation: slideIn 0.5s ease-out;
}

.login-container {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  padding: 40px;
  width: 100%;
  max-width: 400px;
  animation: fadeIn 0.5s ease-out;
}

/* ===== ANIMACIONES ===== */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.pulse {
  animation: pulse 2s infinite;
}

/* ===== TIPOGRAFÍA ===== */
h1 {
  margin-bottom: 30px;
  text-align: center;
  font-size: 2.5em;
  background: linear-gradient(135deg, #0A1C64 0%, #0A1C64 100%);
  background-clip: text; 
  
}

h2 {
  text-align: center;
  margin-bottom: 30px;
  font-size: 2em;
  color: white;
}

/* h2 inside white containers must be dark */
.container h2 {
  color: #0A1C64;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #2d3748;
    font-size: 1.3em;
    font-weight: 700;
    margin: 0 0 25px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #0A1C64;
}

.section-title .icon {
    width: 24px;
    height: 24px;
    fill: #0A1C64;
}

/* ===== NAVEGACIÓN ===== */
nav {
  width: 100%;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: center;
  padding: 15px 0;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
}

nav a {
  color: #333;
  text-decoration: none;
  margin: 0 20px;
  font-weight: bold;
  transition: color 0.3s;
}

nav a:hover {
  color: #0A1C64;
}

/* ===== FORMULARIOS ===== */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.form-group {
  position: relative;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

label {
  display: block;
  margin-bottom: 8px;
  color: #555;
  font-weight: 600;
  font-size: 0.9em;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="password"],
select,
textarea {
  /* width: 100%; */
  padding: 12px 15px;
  border: 2px solid #e1e8ed;
  border-radius: 10px;
  font-size: 16px;
  transition: all 0.3s ease;
  background: #f8f9fa;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #0A1C64;
  background: white;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.required {
  color: #ff6b6b;
}

/* ===== BOTONES ===== */
button, .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}
.login-container button {
  width: 100%;
  padding: 15px;
  font-size: 16px;
  justify-content: center;
}

.btn .icon {
    width: 18px;
    height: 18px;
}

.btn-primary {
    background: #0A1C64;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
}

.btn-danger {
  background: #ff6b6b;
  color: white;
}

.btn-danger:hover {
  background: #ff5252;
  transform: translateY(-2px);
}

.btn-new {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.3s ease;
}

.btn-new:hover {
  background: #0056b3;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,123,255,0.3);
}

.btn-new .icon {
  width: 18px;
  height: 18px;
}

.btn-accion {
  padding: 8px;
  border: none;
  background: #f8f9fa;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-accion:hover {
  background: #e9ecef;
  transform: translateY(-2px);
}

.btn-ver {
  color: #0A1C64;
}

.btn-editar {
  color: #fab005;
}

.btn-add-sale {
        background: #28a745;
        color: white;
        padding: 8px 12px;
        border: none;
        border-radius: 6px;
        cursor: pointer;
        font-size: 0.85em;
        transition: all 0.3s ease;
    }
    
    .btn-add-sale:hover {
        background: #218838;
        transform: translateY(-2px);
    }
.btn-eliminar {
  color: #ff6b6b;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #0A1C64;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95em;
    transition: all 0.3s ease;
}

.back-button:hover {
    color: #5568d3;
    transform: translateX(-5px);
}

.back-button .icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.header h1 {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 0;
    font-size: 1.8em;
    color: #2d3748;
}

.button-group {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 30px;
}

/* ===== TABLAS ===== */
.table-container {
  overflow-x: auto;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

table, .client-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

th, td {
  padding: 18px 15px;
  text-align: left;
  border-bottom: 1px solid #f1f3f5;
  font-size: 0.95em;
}

th {
  background: #f8f9fa;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  border-bottom: 2px solid #e1e8ed;
}

tr {
  transition: all 0.3s ease;
}

tr:hover {
  background: #f1f3f5;
}

tbody tr:hover {
  background: #f8f9fa;
  transform: scale(1.01);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* ===== BARRAS DE BÚSQUEDA Y FILTROS ===== */
.search-bar {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.search-bar input {
  padding: 12px 20px;
  border: 2px solid #e1e8ed;
  border-radius: 10px;
  font-size: 16px;
  width: 100%;
  max-width: 400px;
  background: #f8f9fa;
}

.search-box {
  display: flex;
  align-items: center;
  background: #f8f9fa;
  border-radius: 10px;
  padding: 10px 20px;
  flex: 1;
  max-width: 400px;
}

.search-box input {
  width: 100%;
  padding: 10px 10px 10px 40px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  font-size: 14px;
}

.search-box .icon-search {
    position: absolute;
    left: 92px;
    width: 20px;
    height: 20px;
    fill: #868e96;
}

.filters {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

.filters input,
.filters select {
    padding: 10px 15px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    min-width: 90px;
}

.filters select:focus {
    outline: none;
    border-color: #007bff;
}

.filters select:hover {
  border-color: #0A1C64;
}

/* ===== TOOLBAR ===== */
.toolbar {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 25px;
  background: white;
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.toolbar form {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    width: 100%;
}

/* ===== BADGES Y ETIQUETAS ===== */
.tag {
  background: #e7f5ff;
  color: #1c7ed6;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.85em;
}

.badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.85em;
  background: #e3fafc !important;
  color: black;
  display: inline-block;
}

/* Estados de ventas - Badges mejorados */
.estado-badge {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 700;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.estado-completada,
.estado-pagado {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.estado-pendiente {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.estado-cancelada,
.estado-cancelado {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.estado-inactivo {
    background-color: #e9ecef;
    color: #495057;
    border: 1px solid #dee2e6;
}

/* ===== TARJETAS Y CARDS ===== */
.card, .info-card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover, .info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.card-icon .icon {
    width: 24px;
    height: 24px;
}



.card-header {
    background: linear-gradient(135deg, #0A1C64 0%, #0A1C64 100%);
    padding: 20px 25px;
    display: flex;
    align-items: center;
    gap: 15px;
}

/* When Bootstrap bg-* utilities are combined with card-header,
   clear the gradient so Bootstrap's background-color shows correctly. */
.card-header[class*="bg-"] {
    background-image: none !important;
}

.card-icon {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-card {
  background: white;
  padding: 25px;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* ===== GRIDS Y LAYOUTS ===== */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.stats-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
}

/* ===== HEADER ===== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.header-left {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.venta-id {
    font-size: 0.8em;
    color: #0A1C64;
    font-weight: 700;
    background: #f0f3ff;
    padding: 5px 15px;
    border-radius: 8px;
}

/* ===== INFORMACIÓN Y DATOS ===== */
.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    border-bottom: 1px solid #f1f3f5;
    transition: background-color 0.2s ease;
}

.info-row:last-child {
  border-bottom: none;
}


.info-row:hover {
    background-color: #f8f9fa;
}


.info-label {
    font-weight: 600;
    color: #495057;
    font-size: 0.95em;
}

.info-value {
    color: #2d3748;
    font-size: 1em;
    text-align: right;
    max-width: 60%;
    word-break: break-word;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.info-value:hover {
    background-color: #e9ecef;
    color: #0A1C64;
}

.summary-number {
  font-size: 2em;
  font-weight: bold;
  background: linear-gradient(135deg, #0A1C64 0%, #0A1C64 100%);
  background-clip: text; 
  
}

.stat-value {
  font-size: 2em;
  font-weight: 700;
  background: linear-gradient(135deg, #0A1C64 0%, #0A1C64 100%);
  background-clip: text; 
  
  margin-bottom: 5px;
}

.summary-value {
    color: white;
    font-size: 2em;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.summary-value.total {
    font-size: 2.5em;
    color: #ffd43b;
}

.stat-label{
    color: #495057;
    font-size: 0.9em;
    font-weight: 500;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-label {
    color: white;
    font-size: 0.9em;
    font-weight: 500;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.highlight {
  color: #d6336c;
  font-weight: bold;
}

/* ===== RESÚMENES FINANCIEROS ===== */
.financial-summary {
    background: linear-gradient(135deg, #0A1C64 0%, #0A1C64 100%);
    border-radius: 16px;
    padding: 35px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.summary-item {
    text-align: center;
}

.cost-summary {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 20px;
  margin: 20px 0;
  border: 2px solid #e1e8ed;
}

.cost-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  padding: 5px 0;
}

.cost-item.total {
  border-top: 2px solid #ddd;
  padding-top: 15px;
  margin-top: 15px;
  font-weight: bold;
  font-size: 1.2em;
  color: #0A1C64;
}

/* ===== TIMELINE ===== */
.activity-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, #0A1C64, #0A1C64);
    border-radius: 2px;
}


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

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -34px;
    top: 5px;
    width: 12px;
    height: 12px;
    background: #667eea;
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 0 0 3px #f0f3ff;
}

/* Estilos específicos según el tipo de acción en el título */
.timeline-title:has(*:first-child:is(svg, ::before)):first-of-type {
    font-weight: 700;
}

/* Detalles técnicos expandibles */
.timeline-content button {
    transition: all 0.3s ease;
}

.timeline-content button:hover {
    color: #5568d3;
    text-decoration: underline;
}

/* Animación de expansión */
div[id^="detalles-"] {
    animation: slideDown 0.3s ease;
}

.timeline-content {
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 10px;
    border-left: 3px solid #0A1C64;
    transition: all 0.3s ease;
}

.timeline-content:hover {
    background: #e9ecef;
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.timeline-date {
    color: #868e96;
    font-size: 0.85em;
    font-weight: 600;
    margin-bottom: 5px;
}

.timeline-title {
    color: #2d3748;
    font-size: 1.05em;
    font-weight: 700;
    margin-bottom: 5px;
}

.timeline-description {
    color: #495057;
    font-size: 0.95em;
    line-height: 1.5;
}

/* ===== NOTAS ===== */
.notes-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.notes-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #2d3748;
    font-size: 1.3em;
    font-weight: 700;
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #0A1C64;
}

.notes-title .icon {
    width: 24px;
    height: 24px;
    fill: #0A1C64;
}

.notes-content {
    color: #495057;
    font-size: 1em;
    line-height: 1.8;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #0A1C64;
}

.info-box {
  background: #e7f3ff;
  border-left: 4px solid #0A1C64;
  padding: 15px;
  margin: 20px 0;
  border-radius: 5px;
  color: #555;
}

.note {
  margin-top: 20px;
  text-align: center;
  font-size: 0.9em;
  color: #888;
}

/* ===== ACCIONES ===== */
.acciones {
  display: flex;
  gap: 10px;
}

.actions {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 30px;
}

/* ===== PAGINACIÓN ===== */
/* Paginación mejorada */
.pagination a, .pagination span {
    padding: 8px 12px;
    margin: 0 3px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    text-decoration: none;
    color: #495057;
    display: inline-block;
}

.pagination a.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.pagination a.disabled {
    pointer-events: none;
    opacity: 0.5;
}

.pagination a:hover:not(.active):not(.disabled) {
    background-color: #e9ecef;
}

/* ===== CALENDARIOS ===== */
#calendar {
  max-width: 100%;
  margin: 0 auto;
}

canvas {
  width: 100% !important;
  height: auto !important;
}

/* ===== ICONOS ===== */
.icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.icon-search {
  width: 20px;
  height: 20px;
  fill: #868e96;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .container {
    padding: 20px;
  }
  
  h1 {
    font-size: 2em;
  }
  
  .search-bar {
    flex-direction: column;
    align-items: stretch;
  }
  
  .header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .info-grid {
    grid-template-columns: 1fr;
  }
  
  .summary-grid {
    grid-template-columns: 1fr;
  }
  
  .header-actions {
    width: 100%;
    justify-content: space-between;
  }
  
  .btn {
    padding: 10px 15px;
    font-size: 13px;
  }
  
  .toolbar {
    flex-direction: column;
  }
  
  .search-box {
    position: relative;
    flex: 1;
    max-width: 400px;
  }
  
  .table-container {
    border-radius: 10px;
  }
  
  th, td {
    padding: 12px 8px;
    font-size: 0.85em;
  }
  
  .acciones {
    flex-direction: column;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .container {
    padding: 25px;
  }
  
  h1 {
    font-size: 2em;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
  }
}

/* Responsive para pantallas pequeñas */
@media (max-width: 1200px) {
    .toolbar form {
        flex-wrap: wrap;
    }
    
    .search-box {
        flex: 1 1 100%;
        max-width: 100%;
    }
    
    .filters {
        flex: 1 1 100%;
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .toolbar {
        padding: 15px;
    }
    
    .filters select {
        min-width: 120px;
        font-size: 13px;
    }
    
    .btn-new {
        padding: 8px 15px;
        font-size: 13px;
    }
}


/* Modal custom (modales manuales sin Bootstrap) */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s;
}

/* Bootstrap modal — restaura z-index correcto por encima del backdrop (1055) */
.modal.fade {
    z-index: 1060;
    background-color: transparent;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5em;
    color: #2d3748;
}

.close {
    color: #868e96;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: #dc3545;
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    padding: 15px 25px;
    border-top: 1px solid #dee2e6;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

/* Página de Detalle */
.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e9ecef;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: #495057;
    font-size: 0.95em;
}

.detail-value {
    color: #2d3748;
    font-size: 1em;
    text-align: right;
}

/* Botón restaurar */
.btn-restaurar {
    background-color: #28a745 !important;
}

.btn-restaurar:hover {
    background-color: #218838 !important;
}

/* Responsive modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .modal-header h2 {
        font-size: 1.2em;
    }
}


/* Responsive */
@media (max-width: 1024px) {
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    
    .header-actions {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .btn {
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .summary-value {
        font-size: 1.5em;
    }
    
    .summary-value.total {
        font-size: 1.8em;
    }
    
    .header h1 {
        font-size: 1.3em;
        flex-wrap: wrap;
    }
    
    .venta-id {
        font-size: 0.9em;
    }
    
    .info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .info-value {
        max-width: 100%;
        text-align: left;
    }
    
    .btn {
        padding: 10px 15px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .summary-grid {
        grid-template-columns: 1fr;
    }
    
    .financial-summary {
        padding: 20px;
    }
    
    .header-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

/* Estilos de impresión */
@media print {
    nav,
    .header-actions,
    .back-button,
    .btn {
        display: none !important;
    }
    
    .header {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
    
    .financial-summary {
        background: white;
        border: 2px solid #0A1C64;
    }
    
    .summary-label,
    .summary-value {
        color: #2d3748 !important;
    }
    
    .info-card,
    .notes-section,
    .activity-section {
        box-shadow: none;
        border: 1px solid #dee2e6;
        page-break-inside: avoid;
    }
    
    .card-header {
        background: #f8f9fa !important;
        color: #2d3748 !important;
    }
    
    .card-title {
        color: #2d3748 !important;
    }
    .card-title-blanco {
        color: #2d3748 !important;
    }
}

.card-title-blanco {
        color: white !important;
    }