/* 
  ESTILOS CRÍTICOS - Cargados de forma BLOQUEANTE para evitar FOUC
  
  Este archivo se carga en el <head> ANTES del render para evitar 
  Flash of Unstyled Content (FOUC).
  
  ⚠️ IMPORTANTE: Estos estilos están DUPLICADOS en:
  - app/layouts/default.vue (layout, header, sidebar, navegación)
  - app/pages/archivos.vue (breadcrumb, selector de vista, spinner)
  - app/pages/settings.vue (spinner)
  
  Si modificas algo aquí, debes actualizarlo también en los archivos correspondientes
  
  Estilos incluidos:
  - Layout principal (.dashboard-layout, .dashboard-sidebar, etc.)
  - Navegación (.menu-items, .menu-item, .menu-icon)
  - Header (.dashboard-header, .btn-nuevo, .search-container)
  - Usuario (.user-menu-item, .user-avatar-small, .user-role-tag)
  - Buscador (.search-input, .search-icon, .search-shortcut)
  - Botones (.btn-nuevo, .btn-filtrar)
  - Breadcrumb (.breadcrumb, .breadcrumb-item, .breadcrumb-separator)
  - Selector de vista (.view-controls, .view-btn)
  - Spinner de carga (.loading-state, .spinner) - Color naranja
*/

:root {
  --color-primary: #00B8CE;
  --color-text: #615F66;
  --color-accent: #ffac00;
  --color-accent-dark: #ff6200;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  background-color: #f4f4f4;
  color: var(--color-text);
  min-height: 100vh;
  overflow-x: hidden;
}

* {
  box-sizing: border-box;
}

#__nuxt {
  min-height: 100vh;
}

.dashboard-layout {
  display: flex;
  height: 100vh;
  padding: 13px;
  background: #ededed;
}

.dashboard-sidebar {
  display: flex;
  flex-direction: column;
  min-width: 200px;
  max-width: 400px;
}

.sidebar-header {
  padding: 1rem;
  background: white;
  border-radius: 7px;
  color: #333;
  height: 60px;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
}

.sidebar-header h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.sidebar-nav {
  padding: 0px;
  flex: 1;
  background: #f7f7f7;
  border-radius: 7px;
  display: flex;
  overflow: hidden;
  position: relative;
}

.menu-items {
  width: 60px;
  height: 100%;
  border-right: 2px solid #e9e9e9ad;
  display: flex;
  flex-direction: column;
  padding: 10px 0;
  gap: 8px;
}

.menu-items.space {
  justify-content: space-between;
}

.menu-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0 auto;
  border-radius: 8px;
  cursor: pointer;
  background: transparent;
}

.menu-icon {
  width: 22px;
  height: 22px;
  color: #969696;
}

.sidecontent {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sideheader {
  height: 42px;
  border-bottom: 1px solid #e9e9e9;
  width: 100%;
  padding: 10px;
  font-weight: 500;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: 0.01em;
}

.dashboard-header {
  background: white;
  border-bottom: 1px solid #e9ecef;
  padding: 0.75rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  height: 60px;
  border-radius: 7px;
  margin-bottom: 3px;
}

.btn-nuevo {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--color-accent);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 0.45rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 400;
  cursor: pointer;
  white-space: nowrap;
  width: auto;
  box-shadow: 0 1px 2px rgba(255, 98, 0, 0.15);
  letter-spacing: 0.01em;
}

.btn-nuevo .btn-icon {
  font-size: 1rem;
  width: 16px;
  height: 16px;
}

.search-container {
  flex: 1;
  max-width: 550px;
  min-width: 300px; /* Ancho mínimo fijo */
  display: flex;
  align-items: center;
  background: #fafafa;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  padding: 0.45rem 0.85rem;
  gap: 0.6rem;
  box-sizing: border-box;
}

.search-icon {
  color: #999;
  font-size: 1.1rem;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  min-width: 0; /* Permite que flex funcione correctamente */
  width: 100%; /* Ocupa el espacio disponible */
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.8rem;
  color: #333;
  padding: 0;
  font-weight: 300;
  letter-spacing: 0.01em;
  box-sizing: border-box;
}

.search-input::placeholder {
  color: #999;
  font-weight: 300;
}

.search-shortcut {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 0.2rem 0.45rem;
  font-size: 0.7rem;
  font-weight: 400;
  color: #666;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.shortcut-icon {
  font-size: 0.8rem;
  width: 12px;
  height: 12px;
}

/* Botón Filtrar */
.btn-filtrar {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: white;
  color: #666;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 0.45rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 400;
  cursor: pointer;
  white-space: nowrap;
  width: auto;
  letter-spacing: 0.01em;
}

.btn-filtrar .btn-icon {
  font-size: 1rem;
  width: 16px;
  height: 16px;
}

.main-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.dashboard-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* User Menu Item */
.user-menu-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  height: auto;
  padding: 0.5rem;
  cursor: pointer;
  border-radius: 4px;
}

.user-avatar-small {
  width: 24px;
  height: 24px;
  background: var(--color-accent-dark);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.75rem;
}

.user-role-tag {
  font-size: 10px;
  color: rgb(108, 108, 108);
  background: #e2e2e2c2;
  padding: 0.1rem 0.4rem;
  border-radius: 8px;
  text-transform: uppercase;
  font-weight: 500;
  text-align: center;
  line-height: 1;
  min-width: 30px;
}

/* Breadcrumb - Archivos */
.breadcrumb {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  font-size: 13px;
  font-weight: 300;
  padding: 0.5rem 0.85rem;
  max-height: 42px;
  border-bottom: 1px solid #e0e0e0a1;
  letter-spacing: 0.01em;
}

.breadcrumb-left {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  color: #666;
}

.breadcrumb-item.clickable {
  cursor: pointer;
}

.breadcrumb-separator {
  color: #ccc;
  font-size: 0.75rem;
}

/* View Controls - Selector de vista */
.view-controls {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.view-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  background: white;
  color: #666;
  cursor: pointer;
  padding: 0;
}

.view-btn svg {
  width: 16px;
  height: 16px;
}

.view-btn.active {
  background: #f0f0f0;
  border-color: #d0d0d0;
  color: #333;
}

.view-btn.active svg {
  color: #333;
}

/* Loading Spinner - Naranja */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 3rem;
  text-align: center;
  min-height: 400px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--color-accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Ajuste del header cuando el InfoPanel está abierto */
.dashboard-header.with-info-panel {
  margin-right: 450px !important;
  transition: margin-right 0.3s ease;
}

.main-container.with-info-panel {
  margin-right: 450px !important;
  transition: margin-right 0.3s ease;
}

