/* ===========================
   🎨 Paleta de Colores
   =========================== */
:root {
    /* Colores principales de la paleta */
    --color-indigo-light: #232162;
    /* Azul índigo */
    --color-indigo-mid: #1b194f;
    /* Azul índigo medio */
    --color-indigo-dark: #161440;
    /* Azul índigo oscuro */

    /* Variaciones para acentos (derivadas de los colores principales) */
    --color-indigo-light-hover: #2a2875;
    --color-indigo-mid-hover: #222062;
    --color-indigo-dark-hover: #1d1a53;

    /* Variables de uso */
    --color-primary: var(--color-indigo-dark);
    --color-secondary: var(--color-indigo-mid);
    --color-tertiary: var(--color-indigo-light);
    --color-accent: var(--color-indigo-light);
    --color-highlight: var(--color-indigo-light);

    /* Fondos y elementos */
    --color-bg: #ffffff;
    --color-bg-secondary: #f8f9fa;
    --color-sidebar-bg: var(--color-indigo-dark);
    --color-navbar-bg: #ffffff;

    /* Textos */
    --color-text: #1a1a1a;
    --color-text-muted: #3d4246;
    --color-text-sidebar: rgba(255, 255, 255, 0.85);
    --color-text-sidebar-muted: rgba(255, 255, 255, 0.6);

    /* Bordes */
    --color-border: #e2e8f0;
    --color-border-sidebar: rgba(255, 255, 255, 0.1);

    /* Estados */
    --color-success: #10b981;
    --color-error: #ef4444;
    --color-warning: #f59e0b;
    --color-info: #3b82f6;
}

/* ===========================
   🌐 Tipografía Global
   =========================== */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--color-bg-secondary);
    color: var(--color-text);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--color-primary);
}

/* ===========================
   🧩 Componentes Generales
   =========================== */
.btn-primary {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    transition: all 0.2s ease;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: var(--color-indigo-dark-hover) !important;
    border-color: var(--color-indigo-dark-hover) !important;
}

.btn-secondary {
    background-color: var(--color-secondary);
    border-color: var(--color-secondary);
    transition: all 0.2s ease;
}

.btn-secondary:hover,
.btn-secondary:focus,
.btn-secondary:active {
    background-color: var(--color-indigo-mid-hover) !important;
    border-color: var(--color-indigo-mid-hover) !important;
}

.btn-tertiary {
    background-color: var(--color-tertiary);
    border-color: var(--color-tertiary);
    color: white;
    transition: all 0.2s ease;
}

.btn-tertiary:hover,
.btn-tertiary:focus {
    background-color: var(--color-indigo-light-hover);
    border-color: var(--color-indigo-light-hover);
    color: white;
}

.btn-accent {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
    color: white;
}

.btn-accent:hover,
.btn-accent:focus {
    background-color: var(--color-indigo-light-hover);
    border-color: var(--color-indigo-light-hover);
    color: white;
}

.btn-highlight {
    background-color: var(--color-highlight);
    border-color: var(--color-highlight);
    color: white;
}

.btn-highlight:hover,
.btn-highlight:focus {
    background-color: var(--color-indigo-light-hover);
    border-color: var(--color-indigo-light-hover);
    color: white;
}

.card {
    border-radius: 0.5rem;
    border: 1px solid var(--color-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.card-header {
    background-color: white;
    border-bottom: 1px solid var(--color-border);
}

.card-header h6 {
    color: var(--color-tertiary);
    font-weight: 600;
}

.badge-primary {
    background-color: var(--color-primary);
}

.badge-secondary {
    background-color: var(--color-secondary);
}

.badge-accent {
    background-color: var(--color-accent);
}

.badge-highlight {
    background-color: var(--color-highlight);
}

/* ===========================
   🧭 Sidebar
   =========================== */
.sidebar {
    background-color: var(--color-sidebar-bg);
    color: var(--color-text-sidebar);
    width: 250px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    overflow-y: auto;
    transition: all 0.3s ease;
    z-index: 1000;
}

.sidebar-brand-text {
    color: white;
    font-size: 1.25rem;
}

.sidebar hr {
    border-color: var(--color-border-sidebar);
    opacity: 0.2;
}

.sidebar-brand {
    transition: all 0.3s ease;
}

.sidebar-brand:hover {
    transform: scale(1.03);
}

.sidebar .nav-link {
    color: var(--color-text-sidebar-muted);
    border-radius: 0.375rem;
    margin: 0.25rem 0.5rem;
    padding: 0.625rem 0.75rem;
    transition: all 0.2s ease;
}

.sidebar .nav-link:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link.active {
    color: white;
    background-color: var(--color-indigo-light);
    font-weight: 500;
}

.sidebar .nav-link i {
    width: 1.25rem;
    text-align: center;
}

.sidebar-heading {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
    padding: 1rem 1.25rem 0.5rem;
}

/* Offcanvas Sidebar para móviles */
.offcanvas-sidebar-custom {
    background-color: var(--color-sidebar-bg);
    color: var(--color-text-sidebar);
    width: 280px;
}

.offcanvas-sidebar-custom .offcanvas-header {
    border-bottom: 1px solid var(--color-border-sidebar);
}

.offcanvas-sidebar-custom .btn-close-white {
    filter: brightness(0) invert(1);
}

.offcanvas-sidebar-custom .nav-link {
    color: var(--color-text-sidebar-muted);
    border-radius: 0.375rem;
    margin: 0.25rem 0.75rem;
    padding: 0.625rem 0.75rem;
    transition: all 0.2s ease;
}

.offcanvas-sidebar-custom .nav-link:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

.offcanvas-sidebar-custom .nav-link.active {
    color: white;
    background-color: var(--color-indigo-light);
    font-weight: 500;
}

/* ===========================
   🔝 Navbar
   =========================== */
.custom-navbar {
    background-color: var(--color-navbar-bg);
    border-bottom: 1px solid var(--color-border);
    height: 60px;
    padding: 0 1.5rem;
}

.profile-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-indigo-light);
    background: url('/assets/img/fuego_espada_transparente.webp') center/cover no-repeat;
    color: white;
    font-weight: 600;
}

.dropdown-menu {
    border-radius: 0.5rem;
    border: 1px solid var(--color-border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 0.5rem;
}

.dropdown-item {
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
}

.dropdown-item:hover {
    background-color: var(--color-bg-secondary);
}

.dropdown-item.text-danger {
    color: #dc3545 !important;
}

.dropdown-item.text-danger:hover {
    background-color: rgba(220, 53, 69, 0.1);
}

/* ===========================
   📱 Content Wrapper
   =========================== */
#content-wrapper {
    margin-left: 250px;
    transition: all 0.3s ease;
}

@media (max-width: 991.98px) {
    #content-wrapper {
        margin-left: 0;
    }
}

/* ===========================
   🔐 Login Page
   =========================== */
.login-page {
    margin: 0;
    padding: 0;
    background-color: #0a0a1a;
    position: relative;
    overflow: hidden;
}

.login-page .archway-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-image: url('/assets/img/background-image.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

.login-page .form-container {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-page .card-login-custom {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 320px;
    z-index: 10;
    background-color: rgba(16, 12, 36, 0.6);
    border: none;
    padding: 20px;
}

.login-page h2 {
    color: #ff9d4d;
    text-shadow: 0 0 10px rgba(255, 157, 77, 0.5);
    letter-spacing: 1px;
    font-size: 1.5rem;
}

.login-page .login-label {
    color: #c4a7ff;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.login-page label[for="name"]::before,
.login-page label[for="password"]::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 8px;
    background-size: contain;
    background-repeat: no-repeat;
}

.login-page label[for="name"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23c4a7ff' viewBox='0 0 24 24'%3E%3Cpath d='M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z'/%3E%3C/svg%3E");
}

.login-page label[for="password"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23c4a7ff' viewBox='0 0 24 24'%3E%3Cpath d='M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z'/%3E%3C/svg%3E");
}

.login-page .login-input {
    background-color: rgba(30, 20, 60, 0.7);
    border: 1px solid #3d2b5f;
    border-radius: 0;
    color: #ffffff;
    padding: 8px;
    height: 40px;
    font-size: 0.9rem;
}

.login-page .login-input:focus {
    background-color: rgba(40, 30, 80, 0.8);
    border-color: #6e4db3;
    box-shadow: 0 0 8px rgba(110, 77, 179, 0.5);
    color: #ffffff;
}

.login-page .login-submit-btn {
    background: linear-gradient(to bottom, #ff9d4d, #ff7e1f);
    border: 1px solid #ff7e1f;
    color: #1a1040;
    font-weight: bold;
    padding: 8px 20px;
    transition: all 0.3s;
    border-radius: 0;
    height: 40px;
    font-size: 0.9rem;
}

.login-page .login-submit-btn:hover {
    background: linear-gradient(to bottom, #ffb06a, #ff9d4d);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 157, 77, 0.3);
}

.login-page .login-eye-btn {
    background-color: rgba(30, 20, 60, 0.7);
    border: 1px solid #3d2b5f;
    color: #c4a7ff;
    height: 40px;
}

.login-page .login-eye-btn:hover {
    background-color: rgba(40, 30, 80, 0.8);
    color: #ffffff;
}

.login-page .login-eye-btn i {
    color: #c4a7ff;
}

.login-page .invalid-feedback {
    color: #ff6a6a;
    margin-top: 5px;
    font-size: 0.8rem;
}

@media (max-width: 768px) {
    .login-page .archway-container {
        background-size: cover;
    }

    .login-page .card-login-custom {
        max-width: 280px;
        padding: 15px;
    }

    .login-page h2 {
        font-size: 1.3rem;
    }
}

/* ===========================
   📊 Dashboard Cards
   =========================== */
.stat-card {
    border-left: 4px solid;
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
}

.stat-card.primary {
    border-left-color: var(--color-primary);
}

.stat-card.secondary {
    border-left-color: var(--color-secondary);
}

.stat-card.tertiary {
    border-left-color: var(--color-tertiary);
}

.stat-card.accent {
    border-left-color: var(--color-accent);
}

.stat-card.highlight {
    border-left-color: var(--color-highlight);
}

.stat-card .icon-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.stat-card.primary .icon-circle {
    background-color: var(--color-primary);
}

.stat-card.secondary .icon-circle {
    background-color: var(--color-secondary);
}

.stat-card.tertiary .icon-circle {
    background-color: var(--color-tertiary);
}

.stat-card.accent .icon-circle {
    background-color: var(--color-accent);
}

.stat-card.highlight .icon-circle {
    background-color: var(--color-highlight);
}

/* ===========================
   📝 Forms
   =========================== */
.form-control:focus,
.form-select:focus {
    border-color: var(--color-indigo-light);
    box-shadow: 0 0 0 0.25rem rgba(35, 33, 98, 0.25);
}

.form-check-input:checked {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
}

.form-switch .form-check-input:focus {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%2835, 33, 98, 1%29'/%3e%3c/svg%3e");
}

.input-group-text {
    background-color: var(--color-bg-secondary);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--color-text-muted);
}

/* ===========================
   📱 Responsive
   =========================== */
@media (max-width: 576px) {
    .card-login-custom {
        padding: 1.5rem;
        max-width: 320px;
    }
}

/* ===========================
   🔄 Animaciones
   =========================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes slideInLeft {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }

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

.slide-in-left {
    animation: slideInLeft 0.3s ease-in-out;
}

/* ===========================
   🎨 Utilidades de Color
   =========================== */
.bg-primary-solid {
    background-color: var(--color-primary);
}

.bg-secondary-solid {
    background-color: var(--color-secondary);
}

.bg-tertiary-solid {
    background-color: var(--color-tertiary);
}

.bg-accent-solid {
    background-color: var(--color-accent);
}

.text-primary-custom {
    color: var(--color-primary);
}

.text-secondary-custom {
    color: var(--color-secondary);
}

.text-tertiary-custom {
    color: var(--color-tertiary);
}

.text-accent-custom {
    color: var(--color-accent);
}

.text-highlight-custom {
    color: var(--color-highlight);
}

.border-primary-custom {
    border-color: var(--color-primary) !important;
}

.border-secondary-custom {
    border-color: var(--color-secondary) !important;
}

.border-tertiary-custom {
    border-color: var(--color-tertiary) !important;
}

.border-accent-custom {
    border-color: var(--color-accent) !important;
}

.border-highlight-custom {
    border-color: var(--color-highlight) !important;
}

/* ===========================
   📄 Pagination Styles
   =========================== */
.pagination-modern {
    display: flex;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.pagination-modern .pagination {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 0.25rem;
    margin-bottom: 1rem;
    padding: 0;
}

.pagination-modern .page-item {
    margin: 0;
}

.pagination-modern .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    background-color: transparent;
    color: var(--color-text);
    border: 1px solid transparent;
    transition: all 0.2s ease;
    position: relative;
    top: 0;
}

.pagination-modern .page-link:hover {
    background-color: var(--color-bg-secondary);
    color: var(--color-indigo-light);
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(22, 20, 64, 0.1);
}

.pagination-modern .page-link:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(27, 25, 79, 0.2);
}

.pagination-modern .page-item.active .page-link {
    background-color: var(--color-indigo-light);
    color: white;
    border-color: var(--color-indigo-light);
}

.pagination-modern .page-item.active .page-link:hover {
    background-color: var(--color-indigo-light-hover);
    transform: translateY(-2px);
    box-shadow: 0 3px 6px rgba(22, 20, 64, 0.2);
}

.pagination-modern .page-item.disabled .page-link {
    color: var(--color-text-muted);
    pointer-events: none;
    background-color: transparent;
    border-color: transparent;
}

.pagination-modern .page-item:first-child .page-link,
.pagination-modern .page-item:last-child .page-link {
    font-size: 0.75rem;
}

.pagination-modern .page-item .page-link[aria-label="..."] {
    background-color: transparent;
    border-color: transparent;
}

@media (max-width: 576px) {
    .pagination-modern .page-link {
        min-width: 1.75rem;
        height: 1.75rem;
        font-size: 0.75rem;
    }

    .pagination-modern .page-item:not(:first-child):not(:last-child):not(.active):not(.disabled) {
        display: none;
    }

    .pagination-modern .page-item.active {
        display: block;
    }
}

/* Estilos del carrusel usando la paleta personalizada */
/* Galería responsiva para pantallas 2K y 4K */
.gallery-card {
  max-width: 100%;
  margin: 0 auto;
}

.gallery-carousel {
  position: relative;
}

.carousel-item {
  transition: transform 0.5s ease, opacity 0.5s ease;
}

/* Contenedor principal de imagen adaptativo */
.main-image-container {
  background-color: var(--color-bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  overflow: hidden;
  /* Altura adaptativa según resolución */
  height: 60vh;
  min-height: 400px;
  max-height: 800px;
}

.main-image {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

/* Controles del carrusel mejorados */
.control-button {
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  border: none;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 5;
}

.carousel:hover .control-button {
  opacity: 1;
}

.control-button:hover {
  background-color: white;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  filter: invert(1) grayscale(100);
}

/* Miniaturas adaptativas */
.thumbnails-container {
  padding: 1rem 0;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--color-indigo-light) transparent;
}

.thumbnails-container::-webkit-scrollbar {
  height: 6px;
}

.thumbnails-container::-webkit-scrollbar-track {
  background: transparent;
}

.thumbnails-container::-webkit-scrollbar-thumb {
  background-color: var(--color-indigo-light);
  border-radius: 3px;
}

.thumbnail-wrapper {
  position: relative;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.thumbnail-wrapper:hover {
  transform: translateY(-3px);
}

.thumbnail {
  border-radius: 0.75rem;
  object-fit: cover;
  cursor: pointer;
  border: 3px solid transparent;
  transition: all 0.3s ease;
  opacity: 0.7;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.thumbnail:hover {
  opacity: 1;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.thumbnail.active {
  border-color: var(--color-indigo-light);
  opacity: 1;
  box-shadow: 0 0 0 4px rgba(35, 33, 98, 0.3);
}

/* Botón de eliminar mejorado */
.btn-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  font-weight: 500;
  background-color: rgba(239, 68, 68, 0.9);
  color: white;
  border: none;
  box-shadow: 0 3px 12px rgba(239, 68, 68, 0.4);
  transition: all 0.3s ease;
  opacity: 0;
  backdrop-filter: blur(10px);
}

.carousel-item:hover .btn-delete {
  opacity: 1;
}

.btn-delete:hover {
  background-color: rgb(239, 68, 68);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}

/* Estado vacío mejorado */
.empty-state {
  background: linear-gradient(135deg, rgba(35, 33, 98, 0.1), rgba(35, 33, 98, 0.05));
  border-radius: 1rem;
  padding: 4rem 2rem;
  border: 2px dashed rgba(35, 33, 98, 0.2);
}

/* Responsive para diferentes resoluciones */

/* Pantallas estándar (1080p) */
@media (max-width: 1920px) {
  .main-image-container {
    height: 55vh;
  }

  .thumbnail {
    width: 100px;
    height: 75px;
  }

  .control-button {
    width: 3rem;
    height: 3rem;
    margin: 0 1rem;
  }

  .btn-delete {
    font-size: 0.875rem;
    height: 2.25rem;
    padding: 0 1rem;
  }
}

/* Pantallas 2K (1440p) */
@media (min-width: 1921px) and (max-width: 2560px) {
  .gallery-card {
    max-width: 85%;
  }

  .main-image-container {
    height: 65vh;
    max-height: 900px;
  }

  .thumbnail {
    width: 120px;
    height: 90px;
  }

  .control-button {
    width: 3.5rem;
    height: 3.5rem;
    margin: 0 1.5rem;
  }

  .btn-delete {
    font-size: 1rem;
    height: 2.5rem;
    padding: 0 1.25rem;
  }

  .thumbnails-container {
    gap: 1rem !important;
  }
}

/* Pantallas 4K (2160p) y superiores */
@media (min-width: 2561px) {
  .gallery-card {
    max-width: 75%;
  }

  .main-image-container {
    height: 70vh;
    max-height: 1200px;
  }

  .thumbnail {
    width: 150px;
    height: 112px;
    border-radius: 1rem;
  }

  .control-button {
    width: 4rem;
    height: 4rem;
    margin: 0 2rem;
  }

  .btn-delete {
    font-size: 1.125rem;
    height: 3rem;
    padding: 0 1.5rem;
    border-radius: 0.75rem;
  }

  .thumbnails-container {
    gap: 1.5rem !important;
    padding: 1.5rem 0;
  }

  .card-body {
    padding: 3rem !important;
  }
}

/* Pantallas móviles */
@media (max-width: 768px) {
  .main-image-container {
    height: 50vh;
    min-height: 300px;
  }

  .thumbnail {
    width: 80px;
    height: 60px;
  }

  .control-button {
    width: 2.5rem;
    height: 2.5rem;
    margin: 0 0.5rem;
  }

  .btn-delete {
    font-size: 0.75rem;
    height: 2rem;
    padding: 0 0.75rem;
  }

  .btn-delete span {
    display: none;
  }

  .btn-delete i {
    margin-right: 0;
  }

  .gallery-card {
    margin: 0 0.5rem;
  }

  .thumbnails-container {
    gap: 0.5rem !important;
  }
}

/* Pantallas ultrawide */
@media (min-aspect-ratio: 21 / 9) {
  .main-image-container {
    height: 50vh;
  }

  .gallery-card {
    max-width: 90%;
  }
}

/* Responsive Table Styles with shadcn-inspired design */
.table-responsive-custom {
    overflow-x: auto;
    width: 100%;
    border-radius: 0.5rem;
}

/* Desktop View - Standard table layout */
@media (min-width: 768px) {
    .table-header {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
        align-items: center;
        background-color: var(--color-indigo-dark);
        color: #fff;
        font-weight: 500;
        border-radius: 10px;
        margin-bottom: 0.5rem;
        padding-inline: 1rem;
        padding-block: 0.5rem;
    }

    .table-row {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
        align-items: center;
        padding-inline: 1rem;
        padding-block: 0.5rem;
        border-bottom: 1px solid var(--color-border);
        transition: background-color 0.15s ease;
    }

    .table-cell {
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 1rem;
    }

    .table-cell.description {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

    .table-cell-label {
        display: none;
    }
}

/* Mobile View - Card-like layout */
@media (max-width: 767.98px) {
    .table-header {
        display: none;
    }

    .table-container {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }

    .table-row {
        display: flex;
        flex-direction: column;
        padding: 1rem;
        border-radius: 0.5rem;
        background-color: #fff;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        border: 1px solid var(--color-border);
    }

    .table-cell {
        padding: 0.3rem 0;
        display: flex;
        align-items: center;
    }

    .table-cell-label {
        font-weight: 500;
        color: var(--color-text-muted);
        width: 40%;
        margin-right: 0.5rem;
        font-size: 0.875rem;
    }

    .table-cell.actions {
        margin-top: 0.75rem;
        padding-top: 0.75rem;
        border-top: 1px dashed rgba(0, 0, 0, 0.1);
        justify-content: flex-end;
    }

    .table-cell.actions .table-cell-label {
        display: none;
    }
}


/* Action buttons */
.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: max-content;
    padding: 0.3rem 0.650rem;
    height: 2rem;
    border-radius: 0.5rem;
    background-color: var(--color-indigo-dark);
    color: #fff;
    border: 1px solid var(--color-indigo-dark);
    transition: all 0.15s ease;
    gap: 0.5rem;
    text-decoration: none;
}

.action-btn:hover {
    background-color: var(--color-indigo-dark-hover);
    color: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Pagination adjustments for mobile */
@media (max-width: 767.98px) {
    .pagination-modern {
        justify-content: center;
    }
}


/* Estilos para truncar texto */
.truncate-text {
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Clases específicas para limitar a 15 caracteres */
.truncate-15 {
  max-width: 15ch; /* Limita a aproximadamente 15 caracteres */
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block; /* Importante para que max-width funcione */
}

/* Clases para diferentes longitudes si las necesitas en el futuro */
.truncate-10 {
  max-width: 10ch;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
}

.truncate-20 {
  max-width: 20ch;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
}

/* Estilos para mostrar el texto completo en tooltip al hacer hover */
.truncate-with-tooltip {
  position: relative;
}


/* Ajustes para la tabla responsiva */
@media (min-width: 768px) {
  .table-cell.nombre,
  .table-cell.descripcion {
    max-width: 100%;
    overflow: hidden;
  }

  .table-cell.nombre .truncate-15,
  .table-cell.descripcion .truncate-15 {
    width: 100%;
  }
}

/*============================
   404
   =========================== */

/* ===========================
   🚫 Error 404 Page - Dark Souls Edition
   =========================== */
.error-page {
    margin: 0;
    padding: 0;
    background-color: #0a0a1a;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
}

.error-page .archway-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-image: url('/assets/img/background-image.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
    filter: brightness(0.7) contrast(1.2);
}

.error-page .archway-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
    z-index: 2;
}

.error-page .error-container {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.error-page .card-error-custom {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 450px;
    z-index: 10;
    background-color: rgba(16, 12, 36, 0.7);
    border: 1px solid rgba(110, 77, 179, 0.2);
    padding: 30px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
}

/* Estilo "YOU DIED" de Dark Souls */
.error-page .you-died {
    font-family: "Times New Roman", serif;
    font-size: 3.5rem;
    font-weight: 600;
    color: #a30000;
    text-shadow: 0 0 20px rgba(163, 0, 0, 0.8);
    letter-spacing: 2px;
    margin: 10px 0 25px;
    opacity: 0;
    animation: fadeIn 2s forwards 0.5s, pulse 4s infinite 2.5s;
    transform: scale(0.9);
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Contador de almas perdidas */
.error-page .souls-lost {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 15px;
}

.error-page .souls-count {
    font-size: 3.5rem;
    font-weight: bold;
    color: #ff9d4d;
    text-shadow: 0 0 20px rgba(255, 157, 77, 0.8);
    letter-spacing: 2px;
}

.error-page .souls-text {
    font-size: 0.9rem;
    color: #c4a7ff;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-top: -5px;
}

.error-page .error-title {
    color: #ff9d4d;
    text-shadow: 0 0 10px rgba(255, 157, 77, 0.5);
    letter-spacing: 1px;
    font-size: 1.5rem;
    font-weight: 600;
}

.error-page .error-message {
    color: #c4a7ff;
    font-size: 1rem;
    line-height: 1.5;
    text-shadow: 0 0 5px rgba(196, 167, 255, 0.3);
    font-style: italic;
}

/* Hoguera de Dark Souls */
.error-page .bonfire-container {
    position: relative;
    height: 80px;
    width: 80px;
    margin: 0 auto 20px;
}

.error-page .bonfire-base {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 30px;
    background: #333;
    border-radius: 50% 50% 0 0;
    box-shadow: 0 0 10px rgba(255, 126, 31, 0.5);
}

.error-page .bonfire-base::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: -10px;
    width: 50px;
    height: 10px;
    background: #222;
    border-radius: 50%;
}

.error-page .bonfire-flames {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 60px;
    background: linear-gradient(to top, #ff7e1f, #ff9d4d, #ffb06a);
    border-radius: 50% 50% 20% 20%;
    filter: blur(2px);
    opacity: 0.9;
    animation: flicker 3s infinite alternate;
    box-shadow: 
        0 0 20px rgba(255, 126, 31, 0.8),
        0 0 40px rgba(255, 126, 31, 0.4),
        0 0 60px rgba(255, 126, 31, 0.2);
}

.error-page .bonfire-flames::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 5px;
    width: 30px;
    height: 40px;
    background: linear-gradient(to top, #ff9d4d, #ffb06a);
    border-radius: 50% 50% 20% 20%;
    filter: blur(2px);
    opacity: 0.7;
    animation: flicker 2s infinite alternate-reverse;
}

@keyframes flicker {
    0%, 100% {
        transform: translateX(-50%) scale(1);
        opacity: 0.9;
    }
    25% {
        transform: translateX(-52%) scale(1.05, 0.95);
        opacity: 1;
    }
    50% {
        transform: translateX(-48%) scale(0.95, 1.05);
        opacity: 0.8;
    }
    75% {
        transform: translateX(-51%) scale(1.02, 0.98);
        opacity: 0.9;
    }
}

.error-page .error-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 10px;
}

.error-page .btn-home,
.error-page .btn-back {
    background: linear-gradient(to bottom, #ff9d4d, #ff7e1f);
    border: 1px solid #ff7e1f;
    color: #1a1040;
    font-weight: bold;
    padding: 12px 25px;
    transition: all 0.3s;
    border-radius: 4px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.95rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.error-page .btn-home:hover,
.error-page .btn-back:hover {
    background: linear-gradient(to bottom, #ffb06a, #ff9d4d);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 157, 77, 0.4), 0 0 20px rgba(255, 157, 77, 0.2);
    color: #1a1040;
    text-decoration: none;
}

.error-page .btn-back {
    background: linear-gradient(to bottom, #6e4db3, #5a3d91);
    border: 1px solid #5a3d91;
    color: #c4a7ff;
}

.error-page .btn-back:hover {
    background: linear-gradient(to bottom, #7d5bc7, #6e4db3);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(110, 77, 179, 0.4), 0 0 20px rgba(110, 77, 179, 0.2);
}

/* Animación para pulsar */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Partículas de ceniza flotando */
.error-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        radial-gradient(circle at 50% 70%, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        radial-gradient(circle at 80% 40%, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 100px 100px;
    animation: floatingAsh 60s linear infinite;
    z-index: 3;
    pointer-events: none;
    opacity: 0.5;
}

@keyframes floatingAsh {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 100px 100px;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .error-page .archway-container {
        background-size: cover;
    }

    .error-page .card-error-custom {
        max-width: 320px;
        padding: 20px;
    }

    .error-page .souls-count {
        font-size: 3rem;
    }

    .error-page .you-died {
        font-size: 2.8rem;
    }

    .error-page .error-title {
        font-size: 1.3rem;
    }

    .error-page .error-message {
        font-size: 0.9rem;
    }

    .error-page .bonfire-container {
        height: 70px;
    }

    .error-page .error-actions {
        gap: 12px;
    }

    .error-page .btn-home,
    .error-page .btn-back {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .error-page .card-error-custom {
        max-width: 280px;
        padding: 15px;
    }

    .error-page .you-died {
        font-size: 2.5rem;
        margin: 5px 0 15px;
    }
    
    .error-page .souls-count {
        font-size: 2.5rem;
    }
    
    .error-page .bonfire-container {
        height: 60px;
        margin-bottom: 15px;
    }
}

/* ===========================
   📸 Header Section - Estilo Shadcn
   =========================== */

.header-section {
    background-color: var(--color-bg);
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    transition: all 0.2s ease;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Título del header */
.header-title-wrapper {
    flex: 1;
    min-width: 0; /* Permite que el texto se trunque si es necesario */
}

.header-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.2;
    flex-wrap: wrap;
}

.header-icon {
    font-size: 1.25rem;
    color: var(--color-text);
    flex-shrink: 0;
}

.product-name {
    font-weight: 700;
    color: var(--color-text);
}

.breadcrumb-separator {
    color: var(--color-text-muted);
    font-weight: 400;
    margin: 0 0.25rem;
}

.section-name {
    color: var(--color-text);
    font-weight: 500;
}

/* Acciones del header */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

/* Botón agregar imagen */
.btn-add-image {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background-color: var(--color-success);
    color: white;
    border: 1px solid var(--color-success);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    white-space: nowrap;
}

.btn-add-image:hover {
    background-color: #059669;
    border-color: #059669;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.btn-add-image:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Botón volver */
.btn-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background-color: var(--color-indigo-dark);
    color: white;
    border: 1px solid var(--color-indigo-dark);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    white-space: nowrap;
}

.btn-back:hover {
    background-color: var(--color-indigo-dark-hover);
    border-color: var(--color-indigo-dark-hover);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(22, 20, 64, 0.2);
    text-decoration: none;
}

.btn-back:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Formulario oculto */
.hidden-form {
    display: none;
}

.file-input {
    display: none;
}

/* Iconos en los botones */
.btn-add-image i,
.btn-back i {
    font-size: 0.875rem;
    flex-shrink: 0;
}

/* ===========================
   📱 Responsive Design
   =========================== */

/* Tablets */
@media (max-width: 768px) {
    .header-section {
        padding: 1.25rem;
        margin-bottom: 1.25rem;
    }
    
    .header-content {
        flex-direction: column;
        align-items: stretch;
        gap: 1.25rem;
    }
    
    .header-title {
        font-size: 1.375rem;
        justify-content: center;
        text-align: center;
    }
    
    .header-actions {
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .btn-add-image,
    .btn-back {
        flex: 1;
        min-width: 140px;
        justify-content: center;
    }
}

/* Móviles */
@media (max-width: 480px) {
    .header-section {
        padding: 1rem;
        margin-bottom: 1rem;
        border-radius: 0.5rem;
    }
    
    .header-title {
        font-size: 1.25rem;
        flex-direction: column;
        gap: 0.25rem;
        text-align: center;
    }
    
    .header-icon {
        font-size: 1.5rem;
        margin-bottom: 0.25rem;
    }
    
    .breadcrumb-separator {
        display: none;
    }
    
    .product-name,
    .section-name {
        font-size: 1rem;
    }
    
    .header-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .btn-add-image,
    .btn-back {
        width: 100%;
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
    
    /* Ocultar texto en móviles muy pequeños si es necesario */
    .btn-text {
        display: inline;
    }
}

/* Móviles muy pequeños */
@media (max-width: 360px) {
    .header-section {
        padding: 0.75rem;
    }
    
    .header-title {
        font-size: 1.125rem;
    }
    
    .btn-add-image,
    .btn-back {
        padding: 0.625rem 0.75rem;
        font-size: 0.8125rem;
    }
    
    /* Mostrar solo iconos en pantallas muy pequeñas */
    .btn-text {
        display: none;
    }
    
    .btn-add-image,
    .btn-back {
        width: auto;
        min-width: 44px; /* Tamaño mínimo para touch */
        aspect-ratio: 1;
        padding: 0.625rem;
    }
    
    .header-actions {
        flex-direction: row;
        justify-content: center;
        gap: 1rem;
    }
}

/* Estados de focus para accesibilidad */
.btn-add-image:focus,
.btn-back:focus {
    outline: 2px solid var(--color-indigo-light);
    outline-offset: 2px;
}

/* Animaciones suaves */
@media (prefers-reduced-motion: no-preference) {
    .header-section {
        transition: all 0.2s ease;
    }
    
    .btn-add-image,
    .btn-back {
        transition: all 0.2s ease;
    }
}


/* ===========================
   🔍 Filters Section - Alto Contraste
   =========================== */

.filters-section {
    background-color: var(--color-bg);
    border-radius: 0.75rem;
    border: 1px solid var(--color-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    transition: all 0.2s ease;
}

.filters-form {
    width: 100%;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: end;
}

/* Campo de filtro individual */
.filter-field {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

/* Wrapper para inputs */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.filter-input {
    width: 100%;
    padding: 0.75rem 0.875rem;
    border: 2px solid #d1d5db; /* Gris más oscuro */
    border-radius: 0.5rem;
    font-size: 0.875rem;
    background-color: #ffffff; /* Blanco puro */
    color: var(--color-text);
    transition: all 0.2s ease;
    outline: none;
    box-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.1),
        inset 0 1px 2px rgba(0, 0, 0, 0.05); /* Sombra interna */
    font-weight: 400;
}

.filter-input:hover {
    border-color: var(--color-indigo-light);
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.1),
        inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.filter-input:focus {
    border-color: var(--color-indigo-light);
    box-shadow: 
        0 0 0 3px rgba(35, 33, 98, 0.15),
        0 2px 4px rgba(0, 0, 0, 0.1),
        inset 0 1px 2px rgba(0, 0, 0, 0.05);
    background-color: #ffffff;
}

.filter-input::placeholder {
    color: #444444; /* Gris más oscuro para placeholder */
    font-size: 0.875rem;
    font-style: italic;
}

/* Input con valor */
.filter-input:not(:placeholder-shown) {
    background-color: #f8fafc; /* Fondo muy sutil cuando tiene contenido */
    border-color: var(--color-indigo-light);
    font-weight: 500;
}

/* Botón para limpiar input individual */
.clear-input-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: #ffffff;
    border: 1px solid #d1d5db;
    color: #6b7280;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.clear-input-btn:hover {
    color: var(--color-error);
    background-color: #fef2f2;
    border-color: var(--color-error);
    transform: translateY(-50%) scale(1.05);
}

/* Wrapper para selects */
.select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.filter-select {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 0.875rem;
    border: 2px solid #d1d5db; /* Gris más oscuro */
    border-radius: 0.5rem;
    font-size: 0.875rem;
    background-color: #ffffff; /* Blanco puro */
    color: var(--color-text);
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    box-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.1),
        inset 0 1px 2px rgba(0, 0, 0, 0.05); /* Sombra interna */
    font-weight: 400;
}

.filter-select:hover {
    border-color: var(--color-indigo-light);
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.1),
        inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.filter-select:focus {
    border-color: var(--color-indigo-light);
    box-shadow: 
        0 0 0 3px rgba(35, 33, 98, 0.15),
        0 2px 4px rgba(0, 0, 0, 0.1),
        inset 0 1px 2px rgba(0, 0, 0, 0.05);
    background-color: #ffffff;
}

/* Select con valor seleccionado */
.filter-select:not([value=""]):valid {
    background-color: #f8fafc; /* Fondo muy sutil cuando tiene valor */
    border-color: var(--color-indigo-light);
    font-weight: 500;
}

.filter-select option {
    background-color: #ffffff;
    color: var(--color-text);
    padding: 0.5rem;
    font-weight: 400;
}

.filter-select option:checked {
    background-color: var(--color-indigo-light);
    color: white;
}

/* Icono del select bien visible */
.select-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280; /* Gris más oscuro */
    font-size: 0.875rem;
    pointer-events: none;
    transition: all 0.2s ease;
    background-color: #f9fafb;
    padding: 0.375rem;
    border-radius: 0.25rem;
    border: 1px solid #d1d5db;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.select-wrapper:hover .select-icon {
    color: var(--color-indigo-light);
    border-color: var(--color-indigo-light);
    background-color: #ffffff;
    transform: translateY(-50%) rotate(180deg);
}

.filter-select:focus + .select-icon {
    color: var(--color-indigo-light);
    border-color: var(--color-indigo-light);
    background-color: #ffffff;
}

/* Acciones de filtros */
.filter-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
}

/* Botón buscar con más contraste */
.btn-search {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background-color: var(--color-indigo-dark);
    color: white;
    border: 2px solid var(--color-indigo-dark);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 
        0 2px 4px rgba(35, 33, 98, 0.2),
        0 1px 2px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

.btn-search:hover {
    background-color: var(--color-indigo-dark-hover);
    border-color: var(--color-indigo-dark-hover);
    transform: translateY(-2px);
    box-shadow: 
        0 4px 8px rgba(35, 33, 98, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-search:active {
    transform: translateY(0);
    box-shadow: 
        0 2px 4px rgba(35, 33, 98, 0.2),
        0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Botón limpiar con más contraste */
.btn-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background-color: #ffffff;
    color: var(--color-error);
    border: 2px solid var(--color-error);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 
        0 2px 4px rgba(239, 68, 68, 0.1),
        0 1px 2px rgba(0, 0, 0, 0.05);
    white-space: nowrap;
}

.btn-clear:hover {
    background-color: var(--color-error);
    color: white;
    transform: translateY(-2px);
    box-shadow: 
        0 4px 8px rgba(239, 68, 68, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

.btn-clear:active {
    transform: translateY(0);
    box-shadow: 
        0 2px 4px rgba(239, 68, 68, 0.2),
        0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Iconos en botones */
.btn-search i,
.btn-clear i {
    font-size: 0.875rem;
    flex-shrink: 0;
}

/* Bordes más definidos para campos con contenido */
.filter-input:not(:placeholder-shown) {
    border-color: var(--color-indigo-light);
    background-color: #f8fafc;
    box-shadow: 
        0 2px 4px rgba(35, 33, 98, 0.1),
        inset 0 1px 2px rgba(35, 33, 98, 0.05);
}

.filter-select:not([value=""]) {
    border-color: var(--color-indigo-light);
    background-color: #f8fafc;
    box-shadow: 
        0 2px 4px rgba(35, 33, 98, 0.1),
        inset 0 1px 2px rgba(35, 33, 98, 0.05);
}

/* ===========================
   📱 Responsive Design
   =========================== */

/* Tablets */
@media (max-width: 768px) {
    .filters-section {
        padding: 1.25rem;
        margin-bottom: 1.25rem;
    }
    
    .filters-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .filter-actions {
        justify-content: stretch;
        margin-top: 0.5rem;
    }
    
    .btn-search,
    .btn-clear {
        flex: 1;
        justify-content: center;
        min-width: 120px;
    }
    
    .filter-input,
    .filter-select {
        padding: 0.875rem 1rem;
        font-size: 0.9375rem;
        border-width: 2px;
    }
}

/* Móviles */
@media (max-width: 480px) {
    .filters-section {
        padding: 1rem;
        margin-bottom: 1rem;
        border-radius: 0.5rem;
    }
    
    .filters-grid {
        gap: 0.75rem;
    }
    
    .filter-input,
    .filter-select {
        padding: 1rem;
        font-size: 1rem;
        border-width: 2px;
    }
    
    .filter-actions {
        flex-direction: column;
        gap: 0.75rem;
        margin-top: 0.75rem;
    }
    
    .btn-search,
    .btn-clear {
        width: 100%;
        padding: 1rem;
        font-size: 0.9375rem;
    }
}

/* Móviles muy pequeños */
@media (max-width: 360px) {
    .filters-section {
        padding: 0.75rem;
    }
    
    .btn-text {
        display: none;
    }
    
    .btn-search,
    .btn-clear {
        width: auto;
        min-width: 48px;
        aspect-ratio: 1;
        padding: 0.875rem;
        justify-content: center;
    }
    
    .filter-actions {
        flex-direction: row;
        justify-content: center;
        gap: 1rem;
    }
}

/* Estados de focus para accesibilidad */
.btn-search:focus,
.btn-clear:focus {
    outline: 2px solid var(--color-indigo-dark);
    outline-offset: 2px;
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
}

/* Animaciones suaves */
@media (prefers-reduced-motion: no-preference) {
    .filters-section,
    .filter-input,
    .filter-select,
    .btn-search,
    .btn-clear,
    .clear-input-btn,
    .select-icon {
        transition: all 0.2s ease;
    }
}

/* Mejoras de UX */
.filter-input:not(:placeholder-shown) + .clear-input-btn {
    display: flex;
}

.filter-input:placeholder-shown + .clear-input-btn {
    display: none;
}

/* Grid responsive mejorado */
@media (min-width: 1200px) {
    .filters-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (min-width: 769px) and (max-width: 1199px) {
    .filters-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

/* ===========================
   ➕ Create Button - Estilo Shadcn Consistente
   =========================== */

.create-button-section {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.btn-create {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background-color: var(--color-indigo-dark);
    color: white;
    border: 2px solid var(--color-indigo-dark);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 
        0 2px 4px rgba(35, 33, 98, 0.2),
        0 1px 2px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn-create::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-create:hover::before {
    left: 100%;
}

.btn-create:hover {
    background-color: var(--color-indigo-dark-hover);
    border-color: var(--color-indigo-dark-hover);
    color: white;
    transform: translateY(-2px);
    box-shadow: 
        0 4px 8px rgba(35, 33, 98, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

.btn-create:active {
    transform: translateY(0);
    box-shadow: 
        0 2px 4px rgba(35, 33, 98, 0.2),
        0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-create:focus {
    outline: 2px solid var(--color-indigo-dark);
    outline-offset: 2px;
    text-decoration: none;
}

/* Icono del botón */
.btn-create i {
    font-size: 0.875rem;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.btn-create:hover i {
    transform: rotate(90deg);
}

/* Texto del botón */
.btn-create .btn-text {
    font-weight: 600;

}

/* ===========================
   📱 Responsive Design
   =========================== */

/* Tablets */
@media (max-width: 768px) {
    .create-button-section {
        margin-bottom: 1.25rem;
        justify-content: center;
    }
    
    .btn-create {
        padding: 0.875rem 1.5rem;
        font-size: 0.9375rem;
        min-width: 160px;
        justify-content: center;
    }
}

/* Móviles */
@media (max-width: 480px) {
    .create-button-section {
        margin-bottom: 1rem;
    }
    
    .btn-create {
        width: 100%;
        padding: 1rem;
        font-size: 0.9375rem;
        justify-content: center;
    }
}

/* Móviles muy pequeños */
@media (max-width: 360px) {
    .btn-create .btn-text {
        display: none;
    }
    
    .btn-create {
        width: auto;
        min-width: 48px;
        aspect-ratio: 1;
        padding: 0.875rem;
        justify-content: center;
        position: fixed;
        bottom: 1rem;
        right: 1rem;
        border-radius: 50%;
        z-index: 1000;
        box-shadow: 
            0 4px 12px rgba(35, 33, 98, 0.3),
            0 2px 6px rgba(0, 0, 0, 0.1);
    }
    
    .btn-create:hover {
        transform: translateY(-3px) scale(1.05);
        box-shadow: 
            0 6px 16px rgba(35, 33, 98, 0.4),
            0 3px 8px rgba(0, 0, 0, 0.15);
    }
    
    .create-button-section {
        margin-bottom: 0;
    }
}

/* Estados adicionales para consistencia */
.btn-create:visited {
    color: white;
    text-decoration: none;
}

.btn-create:link {
    color: white;
    text-decoration: none;
}

/* Animaciones suaves */
@media (prefers-reduced-motion: no-preference) {
    .btn-create,
    .btn-create i,
    .btn-create::before {
        transition: all 0.2s ease;
    }
}

/* Variante alternativa para contextos específicos */
.btn-create.secondary {
    background-color: var(--color-success);
    border-color: var(--color-success);
}

.btn-create.secondary:hover {
    background-color: #059669;
    border-color: #059669;
    box-shadow: 
        0 4px 8px rgba(16, 185, 129, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Efecto de carga (opcional) */
.btn-create.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-create.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .btn-create {
        box-shadow: 
            0 2px 4px rgba(0, 0, 0, 0.3),
            0 1px 2px rgba(0, 0, 0, 0.2);
    }
    
    .btn-create:hover {
        box-shadow: 
            0 4px 8px rgba(0, 0, 0, 0.4),
            0 2px 4px rgba(0, 0, 0, 0.3);
    }
}

/* Integración con el sistema de filtros */
.filters-section + .create-button-section {
    margin-top: -0.5rem;
    margin-bottom: 1.5rem;
}

/* Alineación con headers */
.header-section + .create-button-section {
    margin-top: -0.5rem;
}

/* ===========================
   💾 Form Actions - Estilo Shadcn Consistente (Mejorado)
   =========================== */

.form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
}

/* Botón Guardar/Submit */
.btn-save {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background-color: var(--color-indigo-dark);
    color: white;
    border: 2px solid var(--color-indigo-dark);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 
        0 2px 4px rgba(35, 33, 98, 0.2),
        0 1px 2px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    min-width: 120px;
}

.btn-save::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-save:hover::before {
    left: 100%;
}

.btn-save:hover {
    background-color: var(--color-indigo-dark-hover);
    border-color: var(--color-indigo-dark-hover);
    transform: translateY(-2px);
    box-shadow: 
        0 4px 8px rgba(35, 33, 98, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-save:active {
    transform: translateY(0);
    box-shadow: 
        0 2px 4px rgba(35, 33, 98, 0.2),
        0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-save:focus {
    outline: 2px solid var(--color-indigo-dark);
    outline-offset: 2px;
}

.btn-save:disabled {
    background-color: #9ca3af;
    border-color: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    opacity: 0.6;
}

.btn-save:disabled:hover {
    transform: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Botón Volver/Cancel - MEJORADO CON MÁS CONTRASTE */
.btn-cancel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background-color: #f3f4f6; /* Fondo gris claro en lugar de blanco */
    color: #4b5563; /* Texto más oscuro */
    border: 2px solid #9ca3af; /* Borde más oscuro */
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.08),
        0 1px 2px rgba(0, 0, 0, 0.05);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    min-width: 120px;
}

.btn-cancel::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(75, 85, 99, 0.1), transparent);
    transition: left 0.5s ease;
}

.btn-cancel:hover::before {
    left: 100%;
}

.btn-cancel:hover {
    background-color: #e5e7eb; /* Gris más oscuro al hover */
    border-color: #6b7280; /* Borde más oscuro al hover */
    color: #1f2937; /* Texto casi negro al hover */
    transform: translateY(-2px);
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.15),
        0 2px 4px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

.btn-cancel:active {
    transform: translateY(0);
    background-color: #d1d5db; /* Aún más oscuro al presionar */
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.1),
        0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-cancel:focus {
    outline: 2px solid #6b7280;
    outline-offset: 2px;
    text-decoration: none;
}

.btn-cancel:visited {
    color: #4b5563;
    text-decoration: none;
}

.btn-cancel:link {
    color: #4b5563;
    text-decoration: none;
}

/* Iconos de los botones */
.btn-save i,
.btn-cancel i {
    font-size: 0.875rem;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.btn-save:hover i {
    transform: scale(1.1);
}

.btn-cancel:hover i {
    transform: translateX(-2px);
}

/* Texto de los botones */
.btn-save .btn-text,
.btn-cancel .btn-text {
    font-weight: 600;
}

/* Estados de carga para el botón guardar */
.btn-save.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn-save.loading i {
    animation: spin 1s linear infinite;
}

.btn-save.loading .btn-text::after {
    content: '...';
    animation: dots 1.5s infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes dots {
    0%, 20% {
        content: '';
    }
    40% {
        content: '.';
    }
    60% {
        content: '..';
    }
    80%, 100% {
        content: '...';
    }
}

/* ===========================
   📱 Responsive Design
   =========================== */

/* Tablets */
@media (max-width: 768px) {
    .form-actions {
        margin-top: 1.5rem;
        padding-top: 1.25rem;
        justify-content: center;
        gap: 1rem;
    }
    
    .btn-save,
    .btn-cancel {
        padding: 0.875rem 1.75rem;
        font-size: 0.9375rem;
        min-width: 140px;
    }
}

/* Móviles */
@media (max-width: 480px) {
    .form-actions {
        flex-direction: column;
        gap: 0.75rem;
        margin-top: 1.25rem;
        padding-top: 1rem;
    }
    
    .btn-save,
    .btn-cancel {
        width: 100%;
        padding: 1rem;
        font-size: 0.9375rem;
        justify-content: center;
        min-width: auto;
    }
    
    /* Orden: Guardar primero, luego Volver */
    .btn-save {
        order: 1;
    }
    
    .btn-cancel {
        order: 2;
    }
}

/* Móviles muy pequeños */
@media (max-width: 360px) {
    .form-actions {
        margin-top: 1rem;
        padding-top: 0.75rem;
    }
    
    .btn-save .btn-text,
    .btn-cancel .btn-text {
        font-size: 0.875rem;
    }
    
    .btn-save,
    .btn-cancel {
        padding: 0.875rem;
    }
}

/* Estados de focus para accesibilidad */
.btn-save:focus,
.btn-cancel:focus {
    outline-width: 2px;
    outline-style: solid;
    outline-offset: 2px;
}

/* Animaciones suaves */
@media (prefers-reduced-motion: no-preference) {
    .btn-save,
    .btn-cancel,
    .btn-save i,
    .btn-cancel i,
    .btn-save::before,
    .btn-cancel::before {
        transition: all 0.2s ease;
    }
}

/* Variantes de estado para el botón guardar */
.btn-save.success {
    background-color: var(--color-success);
    border-color: var(--color-success);
}

.btn-save.success:hover {
    background-color: #059669;
    border-color: #059669;
    box-shadow: 
        0 4px 8px rgba(16, 185, 129, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-save.danger {
    background-color: var(--color-error);
    border-color: var(--color-error);
}

.btn-save.danger:hover {
    background-color: #dc2626;
    border-color: #dc2626;
    box-shadow: 
        0 4px 8px rgba(239, 68, 68, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ===========================
   🍞 Breadcrumb - Estilo Shadcn
   =========================== */

.breadcrumb-nav {
    display: none;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .breadcrumb-nav {
        display: block;
    }
}

.breadcrumb-container {
    background-color: var(--color-bg);
    border-radius: 0.5rem;
    border: 1px solid var(--color-border);
    padding: 0.75rem 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.breadcrumb-container:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.875rem;
    font-weight: 500;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-separator {
    display: flex;
    align-items: center;
    color: var(--color-text-muted);
    font-size: 0.75rem;
    margin: 0 0.375rem;
    transition: color 0.2s ease;
}

.breadcrumb-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.5rem;
    color: var(--color-text-muted);
    text-decoration: none;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.breadcrumb-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(35, 33, 98, 0.05), transparent);
    transition: left 0.3s ease;
}

.breadcrumb-link:hover::before {
    left: 100%;
}

.breadcrumb-link:hover {
    color: var(--color-indigo-light);
    background-color: rgba(35, 33, 98, 0.05);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(35, 33, 98, 0.1);
}

.breadcrumb-link:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(35, 33, 98, 0.1);
}

.breadcrumb-link:focus {
    outline: 2px solid var(--color-indigo-light);
    outline-offset: 2px;
    text-decoration: none;
}

/* Link de inicio con icono especial */
.home-link {
    color: var(--color-indigo-light);
    font-weight: 600;
}

.home-link i {
    font-size: 0.875rem;
    color: var(--color-indigo-light);
}

.home-link:hover {
    color: var(--color-indigo-light-hover);
    background-color: rgba(35, 33, 98, 0.08);
}

.home-link:hover i {
    color: var(--color-indigo-light-hover);
    transform: scale(1.1);
}

/* Elemento activo (último) */
.breadcrumb-item.active {
    display: flex;
    align-items: center;
}

.breadcrumb-current {
    color: var(--color-text);
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    background-color: rgba(35, 33, 98, 0.08);
    border-radius: 0.375rem;
    border: 1px solid rgba(35, 33, 98, 0.1);
    position: relative;
}

.breadcrumb-current::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: var(--color-indigo-light);
    border-radius: 0 0.25rem 0.25rem 0;
}

/* Iconos en los separadores */
.breadcrumb-separator i {
    transition: transform 0.2s ease;
}

.breadcrumb-container:hover .breadcrumb-separator i {
    transform: translateX(1px);
    color: var(--color-indigo-light);
}

/* ===========================
   📱 Responsive Design
   =========================== */

/* Tablets pequeñas */
@media (max-width: 991.98px) {
    .breadcrumb-nav {
        display: none;
    }
}

/* Tablets grandes */
@media (min-width: 992px) {
    .breadcrumb-container {
        padding: 1rem 1.25rem;
    }
    
    .breadcrumb-list {
        font-size: 0.9375rem;
        gap: 0.375rem;
    }
    
    .breadcrumb-separator {
        margin: 0 0.5rem;
        font-size: 0.8125rem;
    }
}

/* Pantallas grandes */
@media (min-width: 1200px) {
    .breadcrumb-nav {
        margin-bottom: 2rem;
    }
    
    .breadcrumb-container {
        padding: 1.125rem 1.5rem;
    }
    
    .breadcrumb-list {
        font-size: 1rem;
    }
}

/* Móviles - Breadcrumb compacto */
@media (max-width: 767.98px) {
    .breadcrumb-nav {
        display: block;
        margin-bottom: 1rem;
    }
    
    .breadcrumb-container {
        padding: 0.5rem 0.75rem;
        border-radius: 0.375rem;
    }
    
    .breadcrumb-list {
        font-size: 0.8125rem;
        gap: 0.125rem;
    }
    
    .breadcrumb-separator {
        margin: 0 0.25rem;
        font-size: 0.6875rem;
    }
    
    .breadcrumb-link {
        padding: 0.125rem 0.25rem;
        gap: 0.25rem;
    }
    
    .breadcrumb-current {
        padding: 0.125rem 0.375rem;
        font-size: 0.8125rem;
    }
    
    /* Ocultar texto "Inicio" en móviles, solo mostrar icono */
    .home-link span {
        display: none;
    }
    
    .home-link {
        padding: 0.25rem;
        min-width: 2rem;
        justify-content: center;
    }
}

/* Estados de focus para accesibilidad */
.breadcrumb-link:focus {
    outline: 2px solid var(--color-indigo-light);
    outline-offset: 2px;
}

/* Animaciones suaves */
@media (prefers-reduced-motion: no-preference) {
    .breadcrumb-container,
    .breadcrumb-link,
    .breadcrumb-separator,
    .breadcrumb-link::before,
    .breadcrumb-separator i,
    .home-link i {
        transition: all 0.2s ease;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .breadcrumb-container {
        background-color: var(--color-bg-secondary);
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .breadcrumb-link {
        color: rgba(255, 255, 255, 0.7);
    }
    
    .breadcrumb-link:hover {
        color: rgba(255, 255, 255, 0.9);
        background-color: rgba(255, 255, 255, 0.05);
    }
    
    .breadcrumb-current {
        color: rgba(255, 255, 255, 0.9);
        background-color: rgba(255, 255, 255, 0.05);
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .breadcrumb-separator {
        color: rgba(255, 255, 255, 0.5);
    }
}

/* Efectos especiales para interacción */
.breadcrumb-container:hover .breadcrumb-link {
    opacity: 0.7;
}

.breadcrumb-container:hover .breadcrumb-link:hover {
    opacity: 1;
}

/* Truncamiento para textos largos */
.breadcrumb-link,
.breadcrumb-current {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 767.98px) {
    .breadcrumb-link,
    .breadcrumb-current {
        max-width: 120px;
    }
}

/* Mejoras de UX */
.breadcrumb-link[href="#"] {
    pointer-events: none;
    opacity: 0.5;
}

/* Integración con el sistema */
.header-section + .breadcrumb-nav {
    margin-top: -0.5rem;
}

.breadcrumb-nav + .filters-section {
    margin-top: -0.5rem;
}

.breadcrumb-nav + .create-button-section {
    margin-top: -0.5rem;
}

/* ===========================
   📱 SISTEMA RESPONSIVE COMPLETO
   =========================== */

/* Variables responsive */
:root {
    --mobile-padding: 1rem;
    --tablet-padding: 1.5rem;
    --desktop-padding: 2rem;
    --mobile-gap: 1rem;
    --tablet-gap: 1.5rem;
    --desktop-gap: 2rem;
}

/* ===========================
   📊 STATS GRID RESPONSIVE
   =========================== */

.stats-grid {
    display: grid;
    gap: var(--mobile-gap);
    margin-bottom: var(--mobile-gap);
    grid-template-columns: 1fr;
}

/* Móviles pequeños (320px - 575px) */
@media (min-width: 320px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

/* Móviles grandes (576px - 767px) */
@media (min-width: 576px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

/* Tablets (768px - 991px) */
@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--tablet-gap);
        margin-bottom: var(--tablet-gap);
    }
}

/* Tablets grandes (992px - 1199px) */
@media (min-width: 992px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.25rem;
    }
}

/* Desktop (1200px+) */
@media (min-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: var(--desktop-gap);
        margin-bottom: var(--desktop-gap);
    }
}

/* ===========================
   🎯 STAT CARDS RESPONSIVE
   =========================== */

.stat-card {
    background: white;
    border-radius: 0.75rem;
    border: 1px solid var(--color-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color, var(--color-primary)), transparent);
}

.stat-card.primary::before { --accent-color: var(--color-primary); }
.stat-card.secondary::before { --accent-color: var(--color-secondary); }
.stat-card.tertiary::before { --accent-color: var(--color-tertiary); }
.stat-card.accent::before { --accent-color: var(--color-accent); }

.stat-card-content {
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.stat-info {
    flex: 1;
    min-width: 0;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-trend {
    font-size: 0.75rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.stat-trend.positive { color: var(--color-success); }
.stat-trend.negative { color: var(--color-error); }
.stat-trend.neutral { color: var(--color-text-muted); }
.stat-trend.warning { color: var(--color-warning); }

.stat-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-primary);
    color: white;
    font-size: 1.125rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.stat-card.primary .stat-icon { background-color: var(--color-primary); }
.stat-card.secondary .stat-icon { background-color: var(--color-secondary); }
.stat-card.tertiary .stat-icon { background-color: var(--color-tertiary); }
.stat-card.accent .stat-icon { background-color: var(--color-accent); }

/* Responsive adjustments para stat cards */
@media (max-width: 575px) {
    .stat-card-content {
        padding: 0.875rem;
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .stat-icon {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1rem;
        order: -1;
    }
    
    .stat-value {
        font-size: 1.25rem;
    }
    
    .stat-label {
        font-size: 0.6875rem;
    }
}

@media (min-width: 576px) and (max-width: 767px) {
    .stat-card-content {
        padding: 1.125rem;
    }
    
    .stat-value {
        font-size: 1.375rem;
    }
}

@media (min-width: 768px) {
    .stat-card-content {
        padding: 1.25rem;
    }
    
    .stat-value {
        font-size: 1.75rem;
    }
    
    .stat-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    }
    
    .stat-card:hover .stat-icon {
        transform: scale(1.1);
    }
}

@media (min-width: 1200px) {
    .stat-card-content {
        padding: 1.5rem;
    }
    
    .stat-value {
        font-size: 2rem;
    }
    
    .stat-icon {
        width: 3.5rem;
        height: 3.5rem;
        font-size: 1.25rem;
    }
}

/* ===========================
   📈 CHARTS RESPONSIVE SYSTEM
   =========================== */

.charts-container {
    display: flex;
    flex-direction: column;
    gap: var(--mobile-gap);
}

.charts-row {
    display: grid;
    gap: var(--mobile-gap);
    grid-template-columns: 1fr;
}

/* Móviles (hasta 767px) */
@media (max-width: 767px) {
    .charts-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Tablets (768px - 1199px) */
@media (min-width: 768px) and (max-width: 1199px) {
    .charts-row {
        grid-template-columns: 1fr;
        gap: var(--tablet-gap);
    }
    
    .charts-container {
        gap: var(--tablet-gap);
    }
}

/* Desktop (1200px+) */
@media (min-width: 1200px) {
    .charts-row {
        grid-template-columns: 2fr 1fr;
        gap: var(--desktop-gap);
    }
    
    .charts-row:nth-child(2) {
        grid-template-columns: 1fr 1fr;
    }
    
    .charts-row:nth-child(3) {
        grid-template-columns: 1fr;
    }
    
    .charts-container {
        gap: var(--desktop-gap);
    }
}

/* ===========================
   🎨 CHART CARDS
   =========================== */

.chart-card {
    background: white;
    border-radius: 0.75rem;
    border: 1px solid var(--color-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.chart-header {
    padding: 1rem;
    border-bottom: 1px solid var(--color-border);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 249, 250, 0.9));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.chart-title-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.chart-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.chart-icon.primary { background-color: var(--color-primary); }
.chart-icon.secondary { background-color: var(--color-secondary); }
.chart-icon.tertiary { background-color: var(--color-tertiary); }
.chart-icon.accent { background-color: var(--color-accent); }
.chart-icon.highlight { background-color: var(--color-highlight); }

.chart-title-text {
    flex: 1;
    min-width: 0;
}

.chart-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
    line-height: 1.2;
}

.chart-subtitle {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin: 0;
    line-height: 1.2;
}

.chart-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.btn-chart-action,
.btn-chart-refresh {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.5rem 0.75rem;
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 0.375rem;
    color: var(--color-text-muted);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-chart-action:hover,
.btn-chart-refresh:hover {
    background: var(--color-bg-secondary);
    border-color: var(--color-indigo-light);
    color: var(--color-indigo-light);
}

.chart-body {
    padding: 1rem;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-container {
    position: relative;
    width: 100%;
    height: 250px;
}

.chart-container-large {
    height: 300px;
}

/* Responsive chart heights */
@media (max-width: 575px) {
    .chart-container {
        height: 200px;
    }
    
    .chart-container-large {
        height: 250px;
    }
    
    .chart-header {
        padding: 0.75rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .chart-actions {
        align-self: flex-end;
    }
    
    .chart-body {
        padding: 0.75rem;
    }
}

@media (min-width: 576px) and (max-width: 767px) {
    .chart-container {
        height: 220px;
    }
    
    .chart-container-large {
        height: 280px;
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .chart-container {
        height: 280px;
    }
    
    .chart-container-large {
        height: 350px;
    }
}

@media (min-width: 1200px) {
    .chart-container {
        height: 320px;
    }
    
    .chart-container-large {
        height: 400px;
    }
    
    .chart-header {
        padding: 1.25rem;
    }
    
    .chart-body {
        padding: 1.25rem;
    }
}

/* ===========================
   🔄 LOADING STATES
   =========================== */

.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 0.25rem;
    height: 1.5rem;
    width: 80px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===========================
   📱 FLOATING ACTION BUTTON
   =========================== */

.fab-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 1000;
}

.fab-main {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: var(--color-primary);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(35, 33, 98, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.fab-main:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(35, 33, 98, 0.4);
}

.fab-main:active {
    transform: scale(0.95);
}

/* ===========================
   📋 MOBILE ACTIONS
   =========================== */

.mobile-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 0.5rem 0;
}

.mobile-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    color: var(--color-text);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 4rem;
}

.mobile-action-btn:hover {
    background: var(--color-bg-secondary);
    border-color: var(--color-indigo-light);
    color: var(--color-indigo-light);
}

.mobile-action-btn i {
    font-size: 1.25rem;
}

/* ===========================
   🎯 RESPONSIVE UTILITIES
   =========================== */

/* Ocultar elementos según breakpoint */
@media (max-width: 575px) {
    .d-xs-none { display: none !important; }
}

@media (min-width: 576px) and (max-width: 767px) {
    .d-sm-only { display: block !important; }
}

/* Spacing responsive */
.p-responsive {
    padding: var(--mobile-padding);
}

.gap-responsive {
    gap: var(--mobile-gap);
}

@media (min-width: 768px) {
    .p-responsive {
        padding: var(--tablet-padding);
    }
    
    .gap-responsive {
        gap: var(--tablet-gap);
    }
}

@media (min-width: 1200px) {
    .p-responsive {
        padding: var(--desktop-padding);
    }
    
    .gap-responsive {
        gap: var(--desktop-gap);
    }
}

/* ===========================
   🌐 HEADER RESPONSIVE
   =========================== */

.header-section {
    margin-bottom: var(--mobile-gap);
    padding: var(--mobile-padding);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}


@media (max-width: 575px) {
    .header-title {
        font-size: 1.125rem;
        flex-direction: column;
        text-align: center;
        gap: 0.25rem;
    }
    
    .header-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

@media (min-width: 768px) {
    .header-section {
        margin-bottom: var(--tablet-gap);
        padding: var(--tablet-padding);
    }
    
    .header-title {
        font-size: 1rem;
    }
}

@media (min-width: 1200px) {
    .header-section {
        margin-bottom: var(--desktop-gap);
        padding: var(--desktop-padding);
    }
    
    .header-title {
        font-size: 1rem;
    }
}

/* ===========================
   🔧 PERFORMANCE OPTIMIZATIONS
   =========================== */

/* Reduce motion para usuarios que lo prefieren */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Optimización para pantallas de alta densidad */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .chart-icon,
    .stat-icon {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* ===========================
   🛒 PEDIDOS - ESTILO SHADCN
   =========================== */

/* Order ID styling */
.order-id {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.order-number {
    color: var(--color-bg);
    background: var(--color-indigo-dark);
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.9rem;
    border: 1px solid var(--color-indigo-dark);
}

/* Customer info styling */
.customer-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.customer-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-indigo-light), var(--color-indigo-mid));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.875rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(35, 33, 98, 0.2);
}

.customer-details {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
    flex: 1;
}

.customer-uid {
    color: var(--color-text);
    font-size: 1rem;
}

.customer-type {
    color: var(--color-text-muted);
    font-size: 1rem;
}

/* Status badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    border: 1px solid;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.status-badge i {
    font-size: 0.75rem;
    flex-shrink: 0;
}

.status-pending {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border-color: rgba(245, 158, 11, 0.3);
}

.status-paid {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border-color: rgba(16, 185, 129, 0.3);
}

.status-cancelled {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border-color: rgba(239, 68, 68, 0.3);
}

.status-unknown {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
    border-color: rgba(107, 114, 128, 0.3);
}

/* Order total styling */
.order-total {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.amount {
    font-weight: 700;
    color: var(--color-text);
    font-size: 1rem;
}

.currency {
    color: var(--color-text-muted);
    font-size: 0.75rem;
    font-weight: 500;
}

/* Order date styling */
.order-date {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.date {
    font-weight: 500;
    color: var(--color-text);
    font-size: 0.875rem;
}

.time {
    color: var(--color-text);
    font-size: 0.75rem;
}

/* Products summary */
.products-summary {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    max-width: 200px;
    padding-right: 15px;
}

.product-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.25rem 0.5rem;
    background: var(--color-bg-secondary);
    border-radius: 0.375rem;
    border: 1px solid var(--color-border);
}

.product-name {
    font-size: 0.8125rem;
    color: var(--color-text);
    font-weight: 500;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-quantity {
    font-size: 0.75rem;
    color: var(--color-text);
    font-weight: 600;
    background: white;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    border: 1px solid var(--color-border);
    flex-shrink: 0;
}

.more-products {
    text-align: center;
    padding: 0.25rem;
}

.more-count {
    font-size: 0.75rem;
    color: var(--color-indigo-light);
    font-weight: 500;
    background: rgba(35, 33, 98, 0.1);
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    border: 1px solid rgba(35, 33, 98, 0.2);
}

.no-products {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    font-style: italic;
}


/* ===========================
   📱 RESPONSIVE ENHANCEMENTS
   =========================== */

@media (max-width: 767px) {
    .customer-info {
        gap: 0.5rem;
    }
    
    .customer-avatar {
        width: 2rem;
        height: 2rem;
        font-size: 0.75rem;
    }
    
    .products-summary {
        max-width: 100%;
    }
    
    .action-buttons {
        justify-content: flex-end;
        gap: 0.25rem;
    }
    
    .action-btn {
        padding: 0.5rem;
        min-width: 2.25rem;
        height: 2.25rem;
    }
    
    .status-badge {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .order-number {
        font-size: 0.8125rem;
        padding: 0.1875rem 0.375rem;
    }
}

@media (max-width: 575px) {
    .customer-details {
        gap: 0;
    }
    
    .customer-type {
        display: none;
    }
    
    .more-products {
        display: none;
    }
    
    .action-btn .btn-text {
        display: none !important;
    }
}

/* ===========================
   🔧 ACCESSIBILITY
   =========================== */
/* Screen reader only text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===========================
   📋 ORDER DETAIL STYLES
   =========================== */

/* Order Status Card */
.order-status-card {
    background: white;
    border-radius: 0.75rem;
    border: 1px solid var(--color-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
    overflow: hidden;
}

.status-header {
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.status-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.status-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.status-icon.status-pending {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.status-icon.status-paid {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.status-icon.status-cancelled {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.status-details {
    flex: 1;
}

.status-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 0.5rem 0;
}

.status-description {
    color: var(--color-text-muted);
    margin: 0;
    font-size: 1rem;
}

.status-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn-status-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    border: 2px solid;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn-mark-paid {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border-color: rgba(16, 185, 129, 0.3);
}

.btn-mark-paid:hover {
    background: #10b981;
    color: white;
    border-color: #10b981;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-cancel-order {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border-color: rgba(239, 68, 68, 0.3);
}

.btn-cancel-order:hover {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Order Details Grid */
.order-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.detail-card {
    background: white;
    border-radius: 0.75rem;
    border: 1px solid var(--color-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.2s ease;
}

.detail-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.detail-header {
    padding: 1.5rem 1.5rem 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid var(--color-border);
}

.detail-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    flex-shrink: 0;
}

.detail-icon.customer {
    background: linear-gradient(135deg, var(--color-indigo-light), var(--color-indigo-mid));
}

.detail-icon.order {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.detail-icon.payment {
    background: linear-gradient(135deg, #10b981, #059669);
}

.detail-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
}

.detail-content {
    padding: 1.5rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

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

.info-label {
    font-weight: 500;
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

.info-value {
    font-weight: 600;
    color: var(--color-text);
    text-align: right;
    font-size: 0.875rem;
}

/* Special value styling */
.customer-uid {
    background: var(--color-bg-secondary);
    font-size: 1rem;
}

.customer-badge {
    background: var(--color-indigo-dark);
    color: var(--color-bg);
    border-radius: 0.25rem;
    font-size: 0.75rem;
}


.mp-id {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.total-amount {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
}

.currency {
    font-size: 0.75rem;
    color: var(--color-text);
    margin-left: 0.25rem;
}

.payment-status {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.payment-status.pagado {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.payment-status.pendiente {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.payment-status.cancelado {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.payment-method {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

.payment-method.pending {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

/* Order Items Section */
.order-items-section {
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.items-count {
    background: var(--color-bg-secondary);
    color: var(--color-text-muted);
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--color-border);
}

.items-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.item-card {
    background: white;
    border-radius: 0.75rem;
    border: 1px solid var(--color-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: 1.5rem;
    align-items: center;
    transition: all 0.2s ease;
}

.item-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.item-image {
    width: 4rem;
    height: 4rem;
    border-radius: 0.5rem;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--color-bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-placeholder {
    color: var(--color-text-muted);
    font-size: 1.5rem;
}

.item-details {
    flex: 1;
    min-width: 0;
}

.item-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.item-description {
    color: var(--color-text-muted);
    font-size: 0.875rem;
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
}

.item-meta {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.item-sku {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    background: var(--color-bg-secondary);
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    border: 1px solid var(--color-border);
}

.item-quantity {
    text-align: center;
    padding: 0 1rem;
}

.quantity-label {
    display: block;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.quantity-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text-muted);
    background: var(--color-bg-secondary);
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    border: 1px solid var(--color-border);
    display: inline-block;
    min-width: 3rem;
}

.item-pricing {
    text-align: right;
    min-width: 120px;
}

.unit-price,
.total-price {
    margin-bottom: 0.5rem;
}

.total-price:last-child {
    margin-bottom: 0;
}

.price-label {
    display: block;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.price-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
}

.price-value.total {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-text);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 0.75rem;
    border: 2px dashed var(--color-border);
}

.empty-icon {
    font-size: 3rem;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
}

.empty-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 0.5rem 0;
}

.empty-description {
    color: var(--color-text-muted);
    margin: 0;
}

/* Order Summary */
.order-summary-section {
    display: flex;
    justify-content: center;
}

.summary-card {
    background: white;
    border-radius: 0.75rem;
    border: 1px solid var(--color-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    min-width: 100%;
    max-width: 400px;
}

.summary-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 1rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--color-border);
}

.summary-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.summary-row.total {
    padding-top: 0.75rem;
    font-size: 1.125rem;
    font-weight: 700;
}

.summary-label {
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

.summary-row.total .summary-label {
    color: var(--color-text);
    font-weight: 600;
}

.summary-value {
    font-weight: 600;
    color: var(--color-text);
    font-size: 0.875rem;
}

.summary-row.total .summary-value {
    color: var(--color-text);
    font-size: 1.25rem;
}

.summary-divider {
    height: 1px;
    background: var(--color-border);
    margin: 0.5rem 0;
}

/* ===========================
   📱 RESPONSIVE DESIGN
   =========================== */

@media (max-width: 1199px) {
    .order-details-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .status-header {
        padding: 1.5rem;
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .status-info {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .status-actions {
        justify-content: center;
        margin-top: 1rem;
    }
    
    .item-card {
        grid-template-columns: 1fr;
        gap: 1rem;
        text-align: center;
    }
    
    .item-details {
        order: 1;
    }
    
    .item-quantity {
        order: 2;
        padding: 0;
    }
    
    .item-pricing {
        order: 3;
        text-align: center;
    }
    
    .order-summary-section {
        justify-content: stretch;
    }
    
    .summary-card {
        min-width: 100%;
        max-width: none;
    }
}

@media (max-width: 575px) {
    .section-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .btn-status-action {
        justify-content: center;
        width: 100%;
    }
    
    .status-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
}