@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

:root {
    --bg-color: #f3f3f3;
    --sidebar-bg: #f3f3f3;
    --main-bg: #ffffff;
    --border-color: #e5e7eb;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;
    --accent-color: #6d28d9;
    --active-item-bg: #dfdfdf;
}

.invert-color{
    -webkit-filter:invert(100%);
    filter:invert(100%);
}


/* Estilos para el banner de advertencia móvil */
.mobile-warning-banner {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  right: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 12px 16px;
  z-index: 10000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
      transform: translateY(-100%);
      opacity: 0;
  }
  to {
      transform: translateY(0);
      opacity: 1;
  }
}

.mobile-warning-content {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 1200px;
  margin: 0 auto;
}

.mobile-warning-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.mobile-warning-text {
  flex: 1;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 500;
  text-align: center;
}

.mobile-warning-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  padding: 0;
  flex-shrink: 0;
  transition: background-color 0.2s;
}

.mobile-warning-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
  .mobile-warning-banner {
      padding: 10px 12px;
  }
  
  .mobile-warning-text {
      font-size: 13px;
  }
  
  .mobile-warning-icon {
      font-size: 18px;
  }
}


.d-flex {display: flex !important;}
.d-none {display: none !important;}
.h-100 {height: 100% !important;}
.w-100 {width: 100% !important;}

.mt-0 {margin-top: 0 !important;}
.mt-5 {margin-top: 5px !important;}
.mt-10 {margin-top: 10px !important;}
.mb-0 {margin-bottom: 0 !important;}
.mb-10 {margin-bottom: 10px !important;}

.me-5 {margin-right: 5px !important;}
.me-10 {margin-right: 10px !important;}

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

.align-items-center {align-items: center !important;}
.justify-content-center {justify-content: center !important;}
.justify-content-between {justify-content: space-between !important;}
.flex-1 {flex: 1 !important;}
.flex-column {flex-direction: column !important;}
.flex-row {flex-direction: row !important;}
.flex-direction-column{flex-direction: column !important;}

.position-relative{position: relative !important;}
.position-absolute{position: absolute !important;}

.gap-10 {gap: 10px !important;}
.gap-20 {gap: 20px !important;}

html,body{
    margin: 0;
    padding: 0;
    width: 100%;
}
body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    background-color: var(--bg-color);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
}

.sidebar {
    min-width: 240px;
    background-color: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    padding: 16px;
    box-sizing: border-box;
    z-index: 10;
    overflow-y: auto;
    height: 100%;
}

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.sidebar-logout-mobile {
    display: none;
}

.sidebar-header {
    display: flex;
    align-items: center;
    padding: 0 8px;
    font-weight: 500;
    font-size: 14px;
    border-radius: 6px;
}

.sidebar-header .logo-h {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 29px;
  height: 29px;
  background-color: #000;
  color: #f9fafb;
  font-weight: 900;
  border-radius: 4px;
  margin-right: 8px;
  font-size: 16px;
}

.sidebar-header .arrows {
    margin-left: auto;
    color: var(--text-secondary);
}

.sidebar-menu-section {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 0 8px;
    margin-bottom: 8px;
    margin-top: 15px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 6px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.sidebar-menu a.active, .sidebar-menu a:hover {
    background-color: var(--active-item-bg);
}

.sidebar-menu a img {
    margin-right: 10px;
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
    opacity: 0.85;
}
.sidebar-menu a img.size-x2 {
    width: 22px;
    height: 22px;
}
.sidebar-menu a img.size-x3 {
    width: 24px;
    height: 24px;
}
.sidebar-menu a img.size-x4 {
    width: 26px;
    height: 26px;
}



.sidebar-menu a.doble{
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.sidebar-menu a.doble > div{
  display: flex;
  align-items: center;
}

main {
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0; /* Allows flex item to shrink below content size */
}

.containers-wrapper {
    display: flex;
    flex: 1;
    overflow: hidden;
    min-width: 0;
}


.pedidos-list-view, #pedidos-list-view, .ventas-list-view, #ventas-list-view, .presupuestos-list-view, #presupuestos-list-view{
    padding: 15px 20px;
}


.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 10px;
    box-sizing: border-box;
    position: relative;
}

.header-project-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
}

.project-switcher-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border: 1px solid transparent;
    border-radius: 6px;
    background-color: transparent;
    cursor: pointer;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
}

.project-switcher-btn img {
    width: 12px;
    opacity: 0.7;
}

.project-switcher-btn:hover {
    background-color: #e3e3e3;
    border-color: #e3e3e3;
}

.project-dropdown {
    position: absolute;
    top: 58px;
    left: 100px; /* Ajustado para alinear con "cursor" */
    width: 280px;
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    z-index: 9999;
    padding: 8px;
    box-sizing: border-box;
    display: none; /* Oculto por defecto */
}

.dropdown-section-title {
    font-size: 12px;
    color: var(--text-secondary);
    padding: 8px 12px;
    font-weight: 500;
}

.project-dropdown ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.project-dropdown li a {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    font-size: 14px;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 4px;
}

.project-dropdown li a.selected {
    background-color: #f3f4f6;
    font-weight: 600;
}

.project-dropdown li a:hover {
    background-color: #f9fafb;
}

.project-dropdown li a svg {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    opacity: 0;
}

.project-dropdown li a.selected svg {
    opacity: 1;
    color: #1f2937;
}

.dropdown-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 8px 0;
}

.dropdown-action {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
}

.dropdown-action:hover {
        background-color: #f9fafb;
}

.dropdown-action svg {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    color: var(--text-secondary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Menú de usuario (avatar + dropdown) */
.user-menu {
    position: relative;
}

.user-menu-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 50%;
}

.user-avatar {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #374151;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
}

.user-avatar-lg {
    width: 40px;
    height: 40px;
    font-size: 16px;
}

.user-avatar-initial {
    text-transform: uppercase;
    line-height: 1;
}

.user-avatar-online {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #22c55e;
    border: 2px solid #fff;
    box-sizing: border-box;
}

.user-menu-trigger:hover .user-avatar {
    background-color: #4b5563;
}

.user-menu-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 260px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    z-index: 9999;
    padding: 12px;
    box-sizing: border-box;
}

.user-menu-dropdown[hidden] {
    display: none !important;
}

.user-menu-header {
    display: flex;
    align-items: center;
    padding: 8px 4px 12px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 8px;
}

.user-menu-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-menu-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.user-menu-status {
    font-size: 13px;
    color: var(--text-secondary);
}

.user-menu-actions {
    display: flex;
    flex-direction: column;
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-radius: 8px;
    background: none;
    font-size: 14px;
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
}

.user-menu-item:hover {
    background-color: #f3f4f6;
}

.user-menu-item svg {
    flex-shrink: 0;
    color: var(--text-secondary);
}

.container {
    flex: 1;
    overflow-y: auto;
    overflow-x: auto;
    background-color: var(--main-bg);
    border-top-left-radius: 12px;
    height: 100%;
}

/* ----- Estilos del contenido principal (sin cambios) ----- */

.filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.filter-btn {
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    font-weight: 500;
}

.filter-btn svg {
    margin-right: 8px;
    width: 16px;
    height: 16px;
}

.filter-group {
    display: flex;
    gap: 12px;
}

/* --- Date Filter Dropdown Styles --- */
.date-filter-wrapper {
    position: relative;
    display: inline-block;
}

.date-filter-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.date-filter-btn svg {
    transition: transform 0.2s ease;
}

.date-filter-btn.active svg {
    transform: rotate(180deg);
}

.date-filter-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    z-index: 1000;
    padding: 8px 0;
    margin-top: 4px;
    display: none;
    min-width: 180px;
}

.date-filter-dropdown.active {
    display: block;
}

.date-filter-dropdown ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.date-filter-dropdown li {
    margin: 0;
}

.date-filter-dropdown li.divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 8px 0;
}

.date-filter-dropdown li a {
    display: block;
    padding: 8px 16px;
    font-size: 14px;
    color: var(--text-primary);
    text-decoration: none;
    transition: background-color 0.2s;
}

.date-filter-dropdown li a:hover {
    background-color: #f9fafb;
}

.date-filter-dropdown li a.selected {
    background-color: #f3f4f6;
    font-weight: 500;
    color: var(--accent-color);
}

.usage-container {
    gap: 24px;
    padding: 24px 32px;
}

.usage-main {
    flex-grow: 1;
}

.usage-summary {
    flex-shrink: 0;
    gap: 13px;
    flex-wrap: wrap;
}

.card {
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    flex:1;
    min-width: 180px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.group-by-btn {
    font-size: 12px;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 4px 8px;
    border-radius: 6px;
    background-color: #fff;
    cursor: pointer;
}

.total-spend {
    font-size: 28px;
    font-weight: 600;
    margin: 4px 0;
}

.spend-change {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.api-capabilities {
    margin-top: 24px;
}

.tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.tabs button {
    background: none;
    border: none;
    padding: 8px 4px;
    margin-right: 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
}

.tabs button.active {
    color: var(--accent-color);
    border-bottom: 2px solid var(--accent-color);
}

.capabilities-grid {
    gap: 24px;
}

.capability-card h3 {
    font-size: 14px;
    font-weight: 500;
    margin: 0 0 16px 0;
}

.capability-card p {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 4px 0 0 0;
}

.capability-card .count {
    font-size: 20px;
    font-weight: 600;
}

.summary-card {
    margin-bottom: 16px;
}

.summary-card-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.summary-card-header h3 {
    font-size: 14px;
    font-weight: 500;
    margin: 0;
}

.summary-card-header span {
    font-size: 12px;
    color: var(--text-secondary);
}

.summary-card p {
    font-size: 20px;
    font-weight: 600;
    margin: 4px 0 8px 0;
}

.summary-card .small-text {
    font-size: 12px;
    color: var(--text-secondary);
}

.users-list .user-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: 12px;
}

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

.user-info {
    display: flex;
    align-items: center;
}

.user-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    margin-right: 12px;
}

.avatar-lc { background-color: #ef4444; }
.avatar-if { background-color: #3b82f6; }

.user-usage {
    font-weight: 500;
}



.content-header {
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background: #fff;
    padding: 15px 32px 11px 32px;
    z-index: 999;
    width: calc(100% - 64px);
    justify-content: space-between;
}

.content-header h1 {
    font-size: 19px;
    font-weight: 400;
    margin: 0;
}

.content-section {
    padding: 24px 32px;
    border-bottom: 1px solid var(--border-color);
    overflow-x: visible; /* Allow horizontal overflow */
    max-width: none; /* Remove any width restrictions */
}

.content-section:last-child {
    border-bottom: none;
}

.content-section h2 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 4px 0;
}

.content-section p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 16px 0;
    max-width: 600px;
    line-height: 1.5;
}

.content-section p a {
    color: var(--accent-color);
    text-decoration: none;
}

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

.input-field {
    width: 100%;
    max-width: 400px;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    box-sizing: border-box;
    background-color: #fff;
}

.btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-disabled {
    background-color: var(--btn-disabled-bg);
    color: var(--btn-disabled-text);
    border-color: var(--border-color);
    cursor: not-allowed;
}



.toggle-switch-container {
    display: flex;
    align-items: center;
    margin-top: 12px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
    margin-right: 10px;
    margin-bottom: 0 !important;
}

.switch input { 
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--accent-color);
}

input:checked + .slider:before {
    transform: translateX(16px);
}

.toggle-label {
    font-size: 14px;
    font-weight: 500;
}






/* --- Info Text --- */
.info-text {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 24px;
    max-width: 800px;
}

.info-text a {
    color: #4f46e5;
    text-decoration: none;
}

.info-text a:hover {
    text-decoration: underline;
}


/* --- Table Styles (Pivot & Scroll) --- */
.table-wrapper {
    overflow: auto;
    width: 100%;
    max-height: calc(100vh - 220px);
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
    min-width: 1200px;
    table-layout: auto;
}

th, td {
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
}

th {
  padding: 7px 16px;
}

td {
  padding: 2px 16px;
}

thead th {
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-top: 1px solid #e5e7eb;
}

tbody tr:last-child td {
    border-bottom: none;
}

tbody td {
    font-size: 14px;
    color: #111827;
}

.key-font {
    font-family: 'Space Mono', monospace;
}

/* --- Actions Cell (Icons) --- */
.actions-cell {
    text-align: right;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    margin-left: 8px;
    color: #9ca3af;
    transition: color 0.2s;
}

.icon-btn:hover {
    color: #111827;
}

.icon-btn svg {
    display: block;
}


/* --- Responsive Table Styles --- */
@media (max-width: 768px) {
    .table-wrapper {
        border: 1px solid var(--border-color);
        border-radius: 8px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }
    
    table {
        min-width: 800px; /* Reduced minimum width for mobile */
    }
    
    th, td {
        padding: 8px 12px; /* Reduced padding for mobile */
        font-size: 13px;
    }
    
    thead th {
        font-size: 11px;
    }
}

/* --- Scrollbar Styling --- */
.table-wrapper::-webkit-scrollbar {
    height: 8px;
}

.table-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.table-wrapper::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.table-wrapper::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* --- Login Screen Styles --- */
.login-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    width: 100%;
    max-width: 420px;
    padding: 40px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background-color: #1f2937;
    color: #f9fafb;
    font-weight: 600;
    font-size: 32px;
    border-radius: 12px;
    margin-bottom: 16px;
}

.login-header h1 {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #111827;
}

.login-header p {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

.login-form {
    margin-top: 24px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #374151;
}

.btn-block {
    width: 100%;
    margin-top: 8px;
}

.login-error {
    margin-top: 16px;
    padding: 12px;
    background-color: #fee2e2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    color: #991b1b;
    font-size: 14px;
    text-align: center;
}

/* --- Badge Styles --- */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-info {
    background-color: #dbeafe;
    color: #1e40af;
}

/* --- Form Validation Styles --- */
.input-error {
    border-color: #e74c3c !important;
    background-color: #ffe6e6 !important;
}

.error-message {
    display: block;
    color: #e74c3c;
    font-size: 12px;
    margin-top: 4px;
    font-weight: 500;
}

.input-field:focus.input-error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.1);
}

/* Botones deshabilitados */
.icon-btn.disabled,
.icon-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.icon-btn.disabled:hover,
.icon-btn:disabled:hover {
    background-color: transparent;
    color: inherit;
}


/* --- Modal Styles --- */
.modal-close-btn{
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
}
.modal-close-btn:hover{
    background: #f3f4f6;
}


.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
    box-sizing: border-box;
    z-index: 999999;
}

.modal-content {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 460px;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 20px 24px;
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: #111827;
}

.modal-body {
    padding: 0 24px;
    flex-grow: 1;
    overflow: scroll;
    height: 60vh;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #374151;
}

.optional-text {
    color: #9ca3af;
    font-weight: 400;
}

.info-text {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
    margin: 16px 0;
    background-color: #f9fafb;
    padding: 12px;
    border-radius: 6px;
}

/* --- Form Inputs --- */
.input-field, .select-field {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
    background-color: #fff;
}

.select-field {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #6b7280;
    cursor: pointer;
}

/* --- Segmented Controls --- */
.segmented-control {
    display: inline-flex;
    background-color: #f3f4f6;
    border-radius: 6px;
    padding: 2px;
    border: 1px solid #e5e7eb;
}

.segmented-control button {
    background-color: transparent;
    border: none;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 5px;
    cursor: pointer;
    color: #374151;
    transition: color 0.2s ease-in-out, background-color 0.2s ease-in-out;
}

.segmented-control button.active {
    background-color: #ffffff;
    color: #111827;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.segmented-control button.active.btn-permission-si{
    background-color: #a0d9a0 !important;
    color: #076b08 !important;
}

.segmented-control button.active.btn-permission-no{
    background-color: #f5a6a6 !important;
    color: #6b0707 !important;
}

/* --- Resources Section --- */
.resources-section {
    margin-top: 24px;
}

.resources-header {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    padding: 10px 0;
}

.resource-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    border-top: 1px solid #f3f4f6;
}

.resource-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.resource-row .resource-info {
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
}

.resource-title {
    font-size: 14px;
    font-weight: 500;
    color: #111827;
}

.info-icon {
    color: #9ca3af;
}

.resource-path {
    font-size: 12px;
    color: #6b7280;
    display: block;
    margin-left: 22px; /* Alineado con el título */
}

/* --- Modal Footer --- */
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 13px 24px;
    border-top: 1px solid #e5e7eb;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.btn {
    padding: 8px 16px;
    border-radius: 0.5rem;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background-color 0.2s;
}

.btn-secondary {
    background-color: #efefef;
    color: #0d0d0d;
    border-color: transparent;
}
.btn-secondary:hover {
    background-color: #e6e6e6;
    color: #0d0d0d;
    border-color: transparent;
}


.btn-delete {
    background: #ffdcdc;
    color: #b70303;
    border: 1px #f73b3b solid;
}
.btn-delete:hover {
    background-color: #f73b3b;
    color: #ffffff;
}


.btn.btn-primary {
    background-color: #181818;
    color: #ffffff;
}
.btn.btn-primary:hover {
    background-color: #303030;
}


.btn-primary[disabled] {
    background-color: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
}

/* --- Dropzone Styles --- */
.dropzone {
    border: 2px dashed #d1d5db !important;
    border-radius: 8px !important;
    background-color: #f9fafb !important;
    padding: 20px !important;
    min-height: 150px !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
}

.dropzone:hover {
    border-color: #9ca3af !important;
    background-color: #f3f4f6 !important;
}

.dropzone .dz-message {
    font-size: 14px !important;
    color: #6b7280 !important;
    margin: 2em 0 !important;
}

.dropzone .dz-preview {
    margin: 16px !important;
}

.dropzone .dz-preview .dz-image {
    border-radius: 8px !important;
}

.dropzone .dz-preview .dz-details {
    background-color: rgba(255, 255, 255, 0.9) !important;
    border-radius: 8px !important;
}

.dropzone .dz-preview .dz-remove {
    font-size: 12px !important;
    color: #ef4444 !important;
    text-decoration: none !important;
}

.dropzone .dz-preview .dz-remove:hover {
    text-decoration: underline !important;
}

/* --- Empresa Imagen Container --- */
.empresa-imagen-container {
    text-align: center;
}

.empresa-imagen-container img {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    max-width: 160px;
    max-height: 160px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

/* --- Banners System (Reutilizable) --- */
.banners-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.banner-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;

}

.banner-card:hover {
    border-color: var(--text-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

/* Barra de color superior */
.banner-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    transition: opacity 0.2s ease;
}



.banner-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    gap: 16px;
}

.banner-logo-container {
    position: relative;
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-color);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.2s ease;
    margin: 0;
}

.banner-logo-container:hover {
    border-color: var(--text-primary);
    background: #fafafa;
}

.banner-logo-container:hover .banner-logo-overlay {
    opacity: 1;
    border-radius: 8px !important;
}

.banner-logo-container:active {
    transform: scale(0.98);
}

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

.banner-logo-placeholder {
    width: 32px;
    height: 32px;
    color: var(--text-secondary);
}

.banner-logo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    /* backdrop-filter: blur(2px); */ /* DESACTIVADO: Causa lag en scroll */
    pointer-events: none;
    border-radius: 8px !important;
}

.banner-logo-overlay svg {
    width: 24px;
    height: 24px;
    color: white;
    pointer-events: none;
}

.banner-logo-input {
    display: none;
}

.banner-header-content {
    flex: 1;
    min-width: 0;
}

.banner-title {
    font-size: 17px;
    font-weight: 600;
    margin: 0 0 4px 0;
    line-height: 1.4;
    color: var(--text-primary);
}

.banner-icon {
    width: 40px;
    height: 40px;
    background: var(--bg-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
}

.banner-icon svg,
.banner-icon img {
    width: 22px;
    height: 22px;
    color: var(--text-secondary);
    stroke-width: 1.5;
}

.banner-content {
    margin-bottom: 16px;
    flex: 1;
}

.banner-description {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 8px 0;
    line-height: 1.5;
}

.banner-meta {
    font-size: 13px;
    color: var(--text-tertiary);
    margin: 0;
    font-family: 'Courier New', monospace;
}

.banner-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.banner-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.banner-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.banner-status.status-active {
    color: #059669;
}

.banner-status.status-active .banner-status-dot {
    background: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.banner-status.status-inactive {
    color: #dc2626;
}

.banner-status.status-inactive .banner-status-dot {
    background: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

.banner-action {
    background: var(--text-primary);
    border: 1px solid var(--text-primary);
    color: white;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
}

.banner-action:hover {
    background: #303030;
    border-color: #303030;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Responsive */
@media (max-width: 768px) {
    .banners-container {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .banner-card {
        min-height: 100px;
    }
}

@media (min-width: 769px) and (max-width: 1200px) {
    .banners-container {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

/* --- Tabs System (Reutilizable) --- */
.tabs-nav {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    gap: 0;
    margin-bottom: 0;
    position: relative;
    padding: 0;
    padding-left: 33px;
}

.tab-button {
    background: none;
    border: none;
    padding: 14px 0;
    margin: 0 20px 0 0;
    font-size: 14px;
    font-weight: 400;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.15s ease, border-color 0.15s ease;
    position: relative;
    white-space: nowrap;
    font-family: 'Inter', sans-serif;
}

.tab-button:first-child {
    margin-left: 0;
}

.tab-button:hover {
    color: var(--text-primary);
}

.tab-button.active {
    color: var(--text-primary);
    border-bottom-color: var(--text-primary);
    font-weight: 500;
}

.tab-button .tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #f3f4f6;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 500;
    padding: 2px 7px;
    border-radius: 12px;
    margin-left: 6px;
    min-width: 18px;
}

.tab-button.active .tab-badge {
    background-color: var(--text-primary);
    color: white;
}

.tab-content {
    display: none !important;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block !important;
}

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

/* Tabs responsive */
@media (max-width: 768px) {
    .tabs-nav {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .tabs-nav::-webkit-scrollbar {
        display: none;
    }
    
    .tab-button {
        padding: 10px 14px;
        font-size: 13px;
    }
}

/* Estilos adicionales para contenido de tabs */
.gap-20 {
    gap: 20px;
}

.flex-1 {
    flex: 1;
}

.btn-delete {
    background-color: #ef4444;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-delete:hover {
    background-color: #dc2626;
}
/* ========================================
   ESCANDALLO - Filtros de Tags
   ======================================== */

.tags-filter-container {
  background: var(--bg-capsula-opciones, #fff);
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}

.tags-filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.tags-filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-tag-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: white;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
  opacity: 0.6;
  border: 2px solid transparent;
}

.filter-tag-badge:hover {
  opacity: 0.8;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.filter-tag-badge.active {
  opacity: 1;
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  transform: scale(1.05);
}

.btn-link {
  background: none;
  border: none;
  color: #3b82f6;
  cursor: pointer;
  text-decoration: underline;
  font-weight: 500;
  padding: 0;
  transition: color 0.2s ease;
}

.btn-link:hover {
  color: #2563eb;
}

.tag-badge-small {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  color: white;
  margin-right: 4px;
  margin-bottom: 4px;
}

/* Estilos para opciones de creación de receta */
.receta-creation-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  padding: 20px 0;
}

.receta-option-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 32px 24px;
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.receta-option-card:hover {
  border-color: #3b82f6;
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
  transform: translateY(-4px);
}

.receta-option-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.receta-option-content h3 {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 8px 0;
}

.receta-option-content p {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
  line-height: 1.5;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ============================================== 
   RESPONSIVE DESIGN - MOBILE FIRST
   ============================================== */

/* Botón hamburguesa para mobile */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: var(--text-primary);
  border-radius: 6px;
  transition: background-color 0.2s ease;
}

.mobile-menu-btn:hover {
  background-color: var(--active-item-bg);
}

.mobile-menu-btn svg {
  width: 24px;
  height: 24px;
}

/* Overlay para mobile */
.mobile-sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-sidebar-overlay.active {
  opacity: 1;
}

/* Prevenir scroll cuando sidebar está abierto */
body.mobile-sidebar-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

/* Media queries para responsive */
@media (max-width: 768px) {
  
  /* Mostrar botón hamburguesa en mobile */
  .mobile-menu-btn {
    display: block;
    position: fixed;
    top: 9px;
    left: 16px;
    z-index: 1001;
    background-color: var(--main-bg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  /* Ajustar header para mobile */
  .header {
    padding-left: 60px; /* Espacio para el botón hamburguesa */
    height: 60px;
  }

  /* Sidebar responsive */
  .sidebar {
    position: fixed;
    top: 0;
    left: -240px; /* Oculto por defecto */
    width: 240px;
    height: 100vh;
    z-index: 9999;
    transition: left 0.3s ease;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
    padding: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Evitar scroll en el sidebar, solo en el menú */
  }

  .sidebar.mobile-open {
    left: 0;
  }

  /* Menú del sidebar con scroll */
  .sidebar-menu {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 16px; /* Espacio para que no quede oculto por el botón */
    margin-bottom: 16px; /* Espacio entre menú y botón */
  }

  /* Botón de logout dentro del sidebar en móvil */
  .sidebar-logout-mobile {
    display: block;
    flex-shrink: 0;
    padding: 0;
    margin-top: auto; /* Empujar hacia abajo */
    border-top: 1px solid var(--border-color, #e5e7eb);
    padding-top: 16px;
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px;
    padding-right: 16px;
  }

  .sidebar-logout-mobile .btn {
    width: 100%;
    min-height: 48px;
    font-size: 16px;
    padding: 14px 20px;
  }

  /* Ocultar botón de logout del header en móvil */
  .header-actions {
    display: none;
  }

  /* Mostrar overlay solo cuando sidebar está abierto (tiene clase active) */
  .mobile-sidebar-overlay.active {
    display: block;
  }

  /* Ajustar contenedor principal */
  .containers-wrapper {
    flex-direction: column;
  }

  /* Contenedores de contenido */
  .container {
    width: 100%;
    margin-left: 0;
    box-sizing: border-box;
  }

  /* Ajustar content header */
  .content-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
  }

  .content-header h1 {
    font-size: 24px;
    margin: 0;
  }

  /* Ajustar filtros en mobile */
  .filter-group {
    width: calc(100% - 32px);
    flex-direction: column;
    gap: 12px;
  }

  .date-filter-wrapper {
    width: 100%;
  }

  .filter-btn{
    width: 140px !important;
  }

  .date-filter-btn {
    width: calc(100% - 32px);
    justify-content: space-between;
  }

  /* Ajustar botones */
  .btn {
    padding: 12px 16px;
    font-size: 14px;
    min-height: 44px; /* Tamaño mínimo táctil */
  }

  .btn-sm {
    padding: 10px 14px;
    font-size: 13px;
    min-height: 40px;
  }



  /* Ajustar tablas para mobile */
  .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table-clean {
    min-width: 600px; /* Ancho mínimo para scroll horizontal */
  }

  /* Ajustar modales para mobile */
  .modal-content {
    width: 95%;
    max-width: none;
    margin: 20px auto;
    max-height: 90vh;
    overflow-y: auto;
  }

  .modal-header {
    padding: 16px;
  }

  .modal-body {
    padding: 16px;
  }

  .modal-footer {
    padding: 16px;
    flex-direction: column;
    gap: 12px;
  }

  .modal-footer .btn {
    width: 100%;
  }

  /* Ajustar dropdowns */
  .project-dropdown {
    width: 90%;
    left: 5%;
    right: 5%;
  }

  .date-filter-dropdown {
    width: 100%;
    left: 0;
    right: 0;
  }

  /* Ajustar cards */
  .card {
    margin-bottom: 16px;
  }

  .card-header {
    padding: 16px;
  }

  .card-body {
    padding: 16px;
  }

  /* Ajustar formularios */
  .form-group {
    margin-bottom: 20px;
  }

  .form-group label {
    font-size: 14px;
    margin-bottom: 8px;
  }

  /* Ajustar grid layouts */
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Opciones de creación de receta en móvil */
  .receta-creation-options {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px 0;
  }

  .receta-option-card {
    padding: 24px 16px;
  }

  .receta-option-icon {
    width: 70px;
    height: 70px;
    margin-bottom: 16px;
  }

  .receta-option-content h3 {
    font-size: 16px;
  }

  .receta-option-content p {
    font-size: 13px;
  }

  /* Ajustar sidebar menu */
  .sidebar-menu-section {
    font-size: 12px;
    margin: 20px 0 8px 0;
    padding: 0 8px;
  }

  .sidebar-menu a {
    padding: 12px 8px;
    font-size: 14px;
    border-radius: 8px;
    margin-bottom: 4px;
  }

  .sidebar-menu a img {
    width: 20px;
    height: 20px;
  }

  /* Ajustar tabs */
  .tabs-nav {
    flex-wrap: wrap;
    gap: 8px;
  }

  .tabs-nav button {
    flex: 1;
    min-width: 120px;
    padding: 12px 8px;
    font-size: 14px;
  }

  /* Ajustar breadcrumbs */
  .breadcrumb {
    flex-wrap: wrap;
    gap: 8px;
  }

  .breadcrumb-item {
    font-size: 14px;
  }

  /* Ajustar tooltips */
  .tooltip {
    display: none; /* Ocultar tooltips en mobile */
  }

  /* Ajustar loading states */
  .loading-spinner {
    width: 32px;
    height: 32px;
  }

  /* Ajustar notificaciones */
  .notification {
    width: 90%;
    left: 5%;
    right: 5%;
  }

  /* Ajustar paginación */
  .pagination {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }

  .pagination button {
    min-width: 44px;
    min-height: 44px;
  }

  /* Ajustar search bars */
  .search-bar {
    width: 100%;
  }

  .search-bar input {
    font-size: 16px; /* Evita zoom en iOS */
  }

  /* Ajustar dropdowns de filtros */
  .filter-dropdown {
    width: 100%;
  }

  /* Ajustar estadísticas */
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .stat-card {
    padding: 16px;
  }

  .stat-value {
    font-size: 24px;
  }

  .stat-label {
    font-size: 14px;
  }

  /* Ajustar gráficos */
  .chart-container {
    height: 300px;
  }

  /* Ajustar calendarios */
  .calendar-container {
    padding: 16px;
  }

  .calendar-grid {
    gap: 8px;
  }

  .calendar-day {
    min-height: 40px;
    font-size: 14px;
  }

  /* Ajustar drag & drop */
  .dropzone {
    padding: 20px;
    min-height: 120px;
  }

  .dropzone-text {
    font-size: 14px;
  }

  /* Ajustar listas */
  .list-item {
    padding: 16px;
  }

  .list-item-content {
    font-size: 14px;
  }

  /* Ajustar badges */
  .badge {
    font-size: 12px;
    padding: 4px 8px;
  }

  /* Ajustar progress bars */
  .progress-bar {
    height: 8px;
  }

  /* Ajustar alerts */
  .alert {
    padding: 16px;
    font-size: 14px;
  }

  /* Ajustar tabs de contenido */
  .tab-content {
    padding: 16px 0;
  }

  /* Ajustar accordions */
  .accordion-item {
    margin-bottom: 12px;
  }

  .accordion-header {
    padding: 16px;
    font-size: 14px;
  }

  .accordion-content {
    padding: 16px;
    font-size: 14px;
  }

  /* Ajustar sliders */
  .slider {
    height: 6px;
  }

  .slider-thumb {
    width: 20px;
    height: 20px;
  }

  /* Ajustar switches */
  .toggle-switch {
    transform: scale(1.2);
  }

  /* Ajustar segmented controls */
  .segmented-control {
    min-height: 44px;
  }

  .segmented-control button {
    padding: 12px 16px;
    font-size: 14px;
  }

  /* Ajustar date pickers */
  .date-picker {
    width: 100%;
  }

  .date-picker input {
    font-size: 16px;
  }

  /* Ajustar time pickers */
  .time-picker {
    width: 100%;
  }

  .time-picker input {
    font-size: 16px;
  }

  /* Ajustar file inputs */
  .file-input {
    padding: 12px;
  }

  .file-input-label {
    font-size: 14px;
  }

  /* Ajustar selects */
  .select-wrapper {
    width: 100%;
  }

  .select-wrapper select {
    font-size: 16px;
    padding: 12px 16px;
  }

  /* Ajustar textareas */
  .textarea {
    font-size: 16px;
    padding: 12px 16px;
    min-height: 120px;
  }

  /* Ajustar checkboxes y radios */
  .checkbox,
  .radio {
    transform: scale(1.2);
  }

  .checkbox-label,
  .radio-label {
    font-size: 14px;
  }

  /* Ajustar toolbars */
  .toolbar {
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px;
  }

  .toolbar-group {
    flex-wrap: wrap;
    gap: 8px;
  }

  /* Ajustar sidebars secundarios */
  .secondary-sidebar {
    display: none; /* Ocultar sidebars secundarios en mobile */
  }

  /* Ajustar paneles deslizables */
  .sliding-panel {
    width: 100%;
    height: 100%;
  }

  /* Ajustar overlays */
  .overlay {
    padding: 16px;
  }

  .overlay-content {
    width: 95%;
    max-width: none;
  }

  /* Ajustar popovers */
  .popover {
    width: 90%;
    left: 5%;
    right: 5%;
  }

  /* Ajustar context menus */
  .context-menu {
    width: 200px;
  }

  .context-menu-item {
    padding: 12px 16px;
    font-size: 14px;
  }

  /* Ajustar drag handles */
  .drag-handle {
    width: 24px;
    height: 24px;
  }

  /* Ajustar resize handles */
  .resize-handle {
    width: 8px;
    height: 8px;
  }

  /* Ajustar scrollbars */
  ::-webkit-scrollbar {
    width: 4px;
    height: 4px;
  }

  ::-webkit-scrollbar-thumb {
    background-color: var(--text-tertiary);
    border-radius: 2px;
  }

  /* Ajustar focus states */
  .btn:focus,
  .input-field:focus,
  .select:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
  }

  /* Ajustar hover states para touch */
  .btn:hover,
  .sidebar-menu a:hover {
    transform: none; /* Desactivar transformaciones en mobile */
  }

  /* Ajustar animaciones para mobile */
  @media (prefers-reduced-motion: reduce) {
    * {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
    }
  }
}

/* Media query para tablets */
@media (min-width: 769px) and (max-width: 1024px) {
  
  /* Ajustar sidebar para tablets */
  .sidebar {
    min-width: 200px;
  }


  /* Ajustar grid layouts */
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Ajustar modales */
  .modal-content {
    width: 80%;
    max-width: 600px;
  }

  /* Ajustar tablas */
  .table-wrapper {
    overflow-x: auto;
  }

  /* Ajustar estadísticas */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===== Toast / Notificaciones visibles (utils.notify) ===== */
.app-toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.app-toast {
  background: #fff;
  padding: 14px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  min-width: 280px;
  max-width: 420px;
  border-left: 4px solid #6d28d9;
  opacity: 0;
  transform: translateX(120%);
  transition: transform 0.3s ease, opacity 0.3s ease;
  pointer-events: auto;
  font-size: 14px;
  color: #111827;
}

.app-toast.app-toast-show {
  opacity: 1;
  transform: translateX(0);
}

.app-toast-success { border-left-color: #059669; }
.app-toast-error   { border-left-color: #dc2626; }
.app-toast-warning { border-left-color: #d97706; }
.app-toast-info    { border-left-color: #2563eb; }

