/*  Variables  */
:root {
  /* Paleta principal */
  --bg: #ffffff;            
  --fg: #111111;            
  --muted: #868686;         
  --accent: #ff6600;        
  --accent-hover: #ff8533;  
  --sidebar-bg: #000000;    
  --sidebar-fg: #f4f4f4;    
  --border: #000000;        
  --sidebar-width: 260px;
  --sidebar-border-w: 1px;
  
  /* Sombras */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
}

/*  Base  */
html, body {
  height: 100%;
  background: var(--bg);
  color: var(--fg);
  margin: 0;
  font-family: 'Segoe UI', Roboto, sans-serif;
}

/* Layout general: sidebar + contenido */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  min-height: 100vh;
}

/*  Sidebar - Modernizado  */
.app-sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--sidebar-bg);
  color: var(--sidebar-fg);
  border-right: var(--sidebar-border-w) solid var(--border);
  padding: 30px 20px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  z-index: 100;
}

/* Scrollbar personalizado para sidebar */
.app-sidebar::-webkit-scrollbar {
  width: 6px;
}

.app-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.app-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 102, 0, 0.4);
  border-radius: 999px;
}

.app-sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 102, 0, 0.6);
}

.sidebar-fixed-top {
  margin-bottom: 25px;
}

.brand {
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--accent);
  margin-bottom: 25px;
}


/* Navegación vertical modernizada */
.sidebar-nav {
  flex: 1;
  width: 100%;
  margin-bottom: 20px;
}

.nav-vertical { 
  list-style: none; 
  padding: 0; 
  margin: 0; 
  width: 100%; 
}

.nav-vertical > li { 
  margin: 6px 0; 
  width: 100%; 
}

/* Enlaces mejorados con iconos SVG */
.nav-vertical a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--sidebar-fg);
  text-decoration: none;
  padding: 12px 15px;
  border-radius: 25px;
  margin-bottom: 5px;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-vertical a:hover {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: #fff;
  transform: translateX(6px);
  box-shadow: 0 4px 12px rgba(255, 102, 0, 0.3);
}

.nav-vertical a.active { 
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(255, 102, 0, 0.25);
}

/* Iconos SVG en navegación */
.nav-icon {
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.nav-vertical a:hover .nav-icon,
.nav-vertical a.active .nav-icon {
  transform: scale(1.1);
}

/* Bolita indicador mejorada */
.nav-vertical a::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0px;
  transform: translateY(-50%);
  width: 6px; 
  height: 6px;
  border-radius: 999px;
  background: transparent;
  opacity: 0;
  transition: all 0.3s ease;
}

.nav-vertical a.active::before { 
  background: #fff; 
  opacity: 1;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

.nav-vertical a:hover::before { 
  transform: translateY(-50%) scale(1.2);
  opacity: 0.8;
}


/* Submenú mejorado */
.nav-sub {
  list-style: none;
  padding: 8px 8px 8px 12px;
  margin: 6px 0 0 0;
  max-height: 250px;
  overflow-y: auto;
  overflow-x: hidden;
  border-radius: 16px;
}

.nav-sub::-webkit-scrollbar {
  width: 6px;
}

.nav-sub::-webkit-scrollbar-track {
  background: transparent;
}

.nav-sub::-webkit-scrollbar-thumb {
  background: rgba(255, 102, 0, 0.7);
  border-radius: 999px;
}

.nav-sub li { 
  margin: 2px 0; 
}

.nav-sub a {
  display: flex; 
  align-items: center; 
  gap: 8px;
  padding: 8px 10px;
  color: #dcdcdc;
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-sub a:hover { 
  background: #1a1a1a;
  color: #fff;
  transform: translateX(4px);
}

.nav-sub a.current { 
  background: #252525; 
  border: 1px solid #333;
  color: #fff;
}

.nav-sub .folder {
  width: 10px; 
  height: 10px;
  border-left: 2px solid #999; 
  border-bottom: 2px solid #999;
  transform: rotate(-45deg);
  flex-shrink: 0;
  transition: border-color 0.2s ease;
}

.nav-sub a:hover .folder {
  border-color: var(--accent);
}

.nav-sub .badge {
  margin-left: auto;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 999px;
  color: #cfcfcf;
}

.nav-sub-all { 
  font-weight: 600; 
}

.nav-sub-empty { 
  color: #888; 
  font-size: 12px; 
  padding: 6px 8px; 
  display: block; 
}


/* Animaciones mejoradas para submenú */
.app-sidebar .is-open > .nav-sub {
  transform-origin: top left;
  animation: subDropIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes subDropIn {
  0% { 
    opacity: 0; 
    transform: translateY(-8px) scaleY(0.9); 
  }
  100% { 
    opacity: 1; 
    transform: translateY(0) scaleY(1); 
  }
}

.app-sidebar .is-open .nav-sub li {
  --stagger-step: 45ms;
  opacity: 0;
  transform: translateX(-8px);
  animation: subItemSlide 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  animation-delay: calc(var(--stagger-step) * var(--i, 0));
}

@keyframes subItemSlide {
  0% { 
    opacity: 0; 
    transform: translateX(-12px); 
  }
  100% { 
    opacity: 1; 
    transform: translateX(0); 
  }
}

/* Efecto de brillo al pasar sobre items */
.nav-sub a::after {
  content: "";
  position: absolute; 
  inset: 0;
  background: linear-gradient(
    110deg, 
    transparent 0%, 
    rgba(255, 255, 255, 0.08) 15%, 
    transparent 30%
  );
  transform: translateX(-120%);
  pointer-events: none;
}

.nav-sub a:hover::after { 
  animation: shimmer 0.8s ease; 
}

@keyframes shimmer { 
  to { transform: translateX(120%); } 
}


/* Índices de aparición escalonada */
.nav-sub li:nth-child(1)  { --i: 1; }
.nav-sub li:nth-child(2)  { --i: 2; }
.nav-sub li:nth-child(3)  { --i: 3; }
.nav-sub li:nth-child(4)  { --i: 4; }
.nav-sub li:nth-child(5)  { --i: 5; }
.nav-sub li:nth-child(6)  { --i: 6; }
.nav-sub li:nth-child(7)  { --i: 7; }
.nav-sub li:nth-child(8)  { --i: 8; }
.nav-sub li:nth-child(9)  { --i: 9; }
.nav-sub li:nth-child(10) { --i: 10; }
.nav-sub li:nth-child(11) { --i: 11; }
.nav-sub li:nth-child(12) { --i: 12; }
.nav-sub li:nth-child(13) { --i: 13; }
.nav-sub li:nth-child(14) { --i: 14; }
.nav-sub li:nth-child(15) { --i: 15; }
.nav-sub li:nth-child(16) { --i: 16; }
.nav-sub li:nth-child(17) { --i: 17; }
.nav-sub li:nth-child(18) { --i: 18; }
.nav-sub li:nth-child(19) { --i: 19; }
.nav-sub li:nth-child(20) { --i: 20; }

/* Sidebar Bottom - Mejorado */
.sidebar-bottom { 
  margin-top: auto; 
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.logout-link {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  color: var(--sidebar-fg);
  text-decoration: none;
  border-radius: 20px;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.logout-link:hover {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  color: #fff;
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

/* Botón engranaje modernizado */
.gear-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 2px solid rgba(255, 102, 0, 0.3);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
}

.gear-btn:hover {
  background: rgba(255, 102, 0, 0.1);
  border-color: var(--accent);
  transform: rotate(90deg);
}

.gear-btn:active {
  transform: rotate(90deg) scale(0.95);
}

.gear-icon {
  color: var(--accent);
  transition: color 0.3s ease;
}

.gear-btn:hover .gear-icon {
  color: var(--accent-hover);
}

/* Toasts / mensajes flotantes */
.toasts {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 12000;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: #ffffff85;
  color: white;
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: var(--shadow-md);
  padding: 10px 12px;
  border-radius: 30px;
  min-width: 240px;
  max-width: 420px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.toast-hide {
  opacity: 0;
  transform: translateX(12px) scale(0.98);
}

.toast .toast-body {
  flex: 1 1 auto;
  font-size: 0.95rem;
}
.toast-body {
  color:#000000
}

.toast .toast-close {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
}

.toast.success {
  border-left: 4px solid #2ecc71;
}
.toast.error {
  border-left: 4px solid #e74c3c;
  color:#000000;

}
.toast.info{
  border-left: 4px solid #3498db;
  color:#000000;

}
.toast.warning {
  border-left: 4px solid #f39c12;
  color:#000000;
}

@media (max-width: 600px) {
  .toasts { left: 12px; right: 12px; top: 12px; }
  .toast { min-width: auto; width: auto; }
}


/* Contenido principal */
.app-main {
  background: var(--bg);
  box-sizing: border-box;
  padding: clamp(12px, 2.2vh, 24px);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Botón Back modernizado con SVG y efecto glassmorphism iOS */
.back {
  position: fixed;
  top: 0;
  left: calc(var(--sidebar-width) + var(--sidebar-border-w));
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: rgba(255, 102, 0, 0.432);
  backdrop-filter: blur(5px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 24px rgba(255, 102, 0, 0.15),
              0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.back:hover {
  background: rgba(255, 122, 34, 0.514);
  backdrop-filter: blur(20px) saturate(200%);
  -webkit-backdrop-filter: blur(20px) saturate(200%);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 12px 32px rgba(255, 102, 0, 0.349),
              0 0 0 1px rgba(255, 255, 255, 0.15) inset;
  transform: translateX(-2px);
}

.back:active {
  transform: translateX(-2px) scale(0.95);
  background: rgba(255, 102, 0, 0.4);
}

.back:focus {
  outline: 2px solid rgba(255, 102, 0, 0.5);
  outline-offset: 2px;
}

.back svg {
  transition: transform 0.3s ease;
}

.back:hover svg {
  transform: translateX(-2px);
}

/* Accesibilidad: reducción de movimiento */
@media (prefers-reduced-motion: reduce) {
  .app-sidebar .is-open > .nav-sub,
  .app-sidebar .is-open .nav-sub li,
  .nav-sub a::after,
  .settings-menu,
  .back,
  .gear-btn {
    animation: none !important;
    transition: opacity 0.2s ease, visibility 0.2s ease !important;
    transform: none !important;
  }
}
/*  Mensajes / Alertas  */
.alert {
  /* Centrar horizontalmente y reducir tamaño un 20% */
  padding: 8px 10px; /* 10px/12px -> 8px/10px aprox. */
  border-radius: 16px; /* 20% menor */
  margin: 0 auto 4px; /* centra horizontalmente y margen inferior reducido */
  border: 1px solid transparent;
  font-size: 0.76rem; /* 0.95rem * 0.8 */
  width: 80%; /* reducir anchura al 80% del contenedor */
  box-sizing: border-box;
  text-align: center;
}
.alert-error { background: #fff3f2; border-color: #ffd4cf; color: #a82a22; }
.alert.success { background: #e8ffe8; border-left: 5px solid #2ecc71; }
.alert.warning { background: #fff7e0; border-left: 5px solid #f1c40f; }
.alert.error   { background: #ffe5e0; border-left: 5px solid #e74c3c; }

/*  Botones modernizados  */
button, .button, input[type="submit"] {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: clamp(8px, 1.2vh, 10px) clamp(12px, 1.8vh, 16px);
  box-shadow: 0 2px 8px rgba(255, 102, 0, 0.2);
}

button:hover, .button:hover, input[type="submit"]:hover {
  background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent) 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 102, 0, 0.3);
}

button:active, .button:active, input[type="submit"]:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(255, 102, 0, 0.2);
}

button.secondary, .button.secondary {
  background: linear-gradient(135deg, var(--muted) 0%, #757575 100%);
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

button.secondary:hover, .button.secondary:hover {
  background: linear-gradient(135deg, #757575 0%, var(--muted) 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/*  Inputs / Formularios (globales)  */
input[type="text"], input[type="email"], input[type="password"],
.form-field input[type="text"],
.form-field input[type="number"],
.form-field input[type="url"],
.form-field textarea, select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #c2c2c2;
  border-radius: 20px;
  background: #fff;
  color: var(--fg);
  box-sizing: border-box;
}
form > p { margin: 0 0 14px 0; }
/*  Tablas  */
table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 0 0 10px 10px;
  overflow: hidden;
  background: #fff;
}
th, td { padding: 6px; border-bottom: 1px solid #ffffff; }
th { color: white; background: #3f3f3f; text-align: left; }

tbody tr:nth-child(odd) { background-color: #fff; }
tbody tr:nth-child(even){ background-color: #f5f5f5; }
tbody tr:hover {
  background-color: #ffe0c2;
  transition: background-color 0.2s ease;
}

/*  Cards / Secciones  */
.card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 14px;
}
.card h3 { margin: 0 0 12px 0; color: var(--fg); }

/*  Grids  */
.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(8px, 1.2vh, 12px);
}

/* Las versiones finales de grid-2 y grid-3 (auto-fit) prevalecen */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

/*  Formulario compacto y scroll interno  */
.doc-form {
  flex: 1;
  overflow: auto;
  padding-right: 2px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}
.form-compact .card {
  padding: clamp(8px, 1.2vh, 14px) clamp(10px, 1.6vh, 16px);
  margin-bottom: clamp(8px, 1.2vh, 12px);
  border-radius: 12px;
  box-shadow: 0 8px 0 0  rgba(0, 0, 0, 0.4);

}
.form-compact h3 {
  margin: 0 0 clamp(6px, 1vh, 10px) 0;
  font-size: clamp(0.95rem, 1.8vw, 1.05rem);
}
.form-compact label {
  margin-bottom: 4px;
  font-weight: 600;
  font-size: clamp(0.88rem, 1.6vw, 0.95rem);
  box-shadow: 0 8px 0 0  rgba(0, 0, 0, 0.4);
border-radius: 20px;
}
.form-compact input[type="text"],
.form-compact input[type="email"],
.form-compact input[type="file"],
.form-compact input[type="number"],
.form-compact input[type="datetime-local"],
.form-compact textarea,
.form-compact select {
  padding: clamp(6px, 1.2vh, 10px) clamp(8px, 1.6vh, 12px);
  border-radius: 10px;
  font-size: clamp(0.9rem, 1.8vw, 0.98rem);
}

/* Acciones pegadas (sticky) al fondo */
.actions {
  position: sticky;
  bottom: 0;
  background: var(--bg);
  padding: clamp(8px, 1.6vh, 12px) 0 0;
  display: flex;
  gap: 10px;
  border-top: 1px solid #eee;
  margin-top: clamp(8px, 1.6vh, 12px);
}

/* Ajustes finos para bloque de socios */
#socios-forms > .card { padding: clamp(8px, 1.2vh, 12px) !important; }


/* Menú de ajustes modernizado con glassmorphism mejorado */
.settings-menu {
  position: absolute;
  left: 20px; 
  right: 20px; 
  bottom: 80px;
  border-radius: 24px;
  padding: 16px 14px;
  background: rgba(20, 20, 20, 0.95);
  backdrop-filter: blur(20px) saturate(120%);
  -webkit-backdrop-filter: blur(20px) saturate(120%);
  border: 1px solid rgba(255, 102, 0, 0.2);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 
              0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 200;
}

.settings-menu.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.settings-menu h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  margin: 0 0 14px;
  padding-bottom: 10px;
  position: relative;
  border-bottom: 2px solid rgba(255, 102, 0, 0.3);
}

.settings-menu h2::after {
  content: "";
  position: absolute;
  left: 0; 
  bottom: -2px;
  width: 60px; 
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.settings-icon {
  color: var(--accent);
}

.settings-menu .nav-vertical {
  gap: 4px;
}

.settings-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  border-radius: 16px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.95rem;
}

.settings-menu a:hover, 
.settings-menu a:focus {
  background: rgba(255, 102, 0, 0.15);
  color: #fff;
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(255, 102, 0, 0.2);
}

.settings-menu a .nav-icon {
  color: var(--accent);
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.settings-menu a:hover .nav-icon {
  opacity: 1;
}

/*  Formularios bonitos (wrapper)  */
.form-wrapper {
  width: 80%;
  height: 80%;
  margin: 0 auto;
}
.form-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  padding: 24px;
  margin-bottom: 20px;
}

.form-card__head {
  margin-bottom: 20px;
  border-bottom: 2px solid #f0f0f0;
  padding-bottom: 12px;
}

.form-card__title {
  margin: 0;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
  color: #2a2a2a;
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-card__title svg {
  color: var(--accent);
  flex-shrink: 0;
}

/* Grids de formulario */
.form-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 900px) {
  .form-grid.form-grid--2 { grid-template-columns: 1fr 1fr; }
  .form-grid.form-grid--3 { grid-template-columns: 1fr 1fr 1fr; }
}

/* Campos del formulario */
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-weight: 600; font-size: .95rem; }
.req { color: #ff6600; margin-left: 4px; }

/* Inputs por defecto (variantes) */
.form-field input[type="email"],
.form-field input[type="password"],
.form-field input[type="file"],
.form-field select {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 20px;
  padding: 10px 12px;
  font-size: .95rem;
  outline: none;
  background: #fff;
  transition: border-color .2s, box-shadow .2s, background .2s;
  height: 38px;
}

.form-field input[type="datetime-local"],
.form-field input[type="file"],
.form-field input[type="date"]{
  width: 40%;
  border: 1px solid #ddd;
  border-radius: 20px;
  padding: 10px 12px;
  font-size: .95rem;
  outline: none;
  background: #fff;
  transition: border-color .2s, box-shadow .2s, background .2s;
  height: 20px;
}
.form-field textarea { min-height: 90px; }

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  border-color: #ff6600;
  box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.15);
  background: #fff;
}
.form-field.has-error input,
.form-field.has-error textarea,
.form-field.has-error select {
  border-color: #d92d20;
  box-shadow: 0 0 0 3px rgba(217, 45, 32, 0.10);
}
.help { color: #888; font-size: .85rem; }
.error { color: #d92d20; font-size: .85rem; }

/* Botones estilo formulario */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #ddd;
  background: #f7f7f7;
  color: #333;
  padding: 11px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn svg {
  flex-shrink: 0;
}

.btn:hover { 
  background: #e8e8e8; 
  border-color: #bbb;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn:active { 
  transform: translateY(0px); 
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #ff8533 100%);
  border-color: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #e65c00 0%, var(--accent) 100%);
  border-color: #e65c00;
  box-shadow: 0 4px 12px rgba(255, 102, 0, 0.3);
}

.btn-secondary {
  background: #fff;
  border-color: #ddd;
  color: #555;
}

.btn-secondary:hover {
  background: #f8f8f8;
  border-color: #bbb;
  color: #333;
}

.form-actions { 
  display: flex; 
  gap: 12px; 
  margin-top: 24px;
  padding-top: 20px;
  border-top: 2px solid #f0f0f0;
}

/* Ajustes para checkbox */
.form-field input[type="checkbox"] { width: auto; accent-color: #ff6600; }

/*  Botón Back fijo al borde del sidebar  */
.back{
  position: fixed;
  top: 5px;
  left: calc(var(--sidebar-width) + var(--sidebar-border-w) + 5px);
  z-index: 150;
  display: flex;
  align-items: center; justify-content: center;
  color: #fff;
  cursor: pointer;
  border-radius: 25px;
}
.back:focus{
  outline-offset: 2px;
}


/* Responsive mejorado */
@media (max-width: 1000px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  :root {
    --sidebar-width: 100%;
  }
  
  .app { 
    grid-template-columns: 1fr; 
  }
  
  .app-sidebar {
    position: relative;
    height: auto;
    min-height: auto;
    padding: 20px;
    border-right: none;
    border-bottom: 2px solid var(--accent);
    overflow-y: visible;
  }
  
  .sidebar-nav {
    margin-bottom: 15px;
  }
  
  .nav-vertical { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 8px;
  }
  
  .nav-vertical > li {
    flex: 1 1 auto;
    min-width: 150px;
  }
  
  .nav-vertical a { 
    padding: 10px 14px;
    font-size: 0.9rem;
  }
  
  .nav-sub {
    position: absolute;
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid rgba(255, 102, 0, 0.3);
    left: 10px;
    right: 10px;
    top: 100%;
    margin-top: 8px;
    padding: 12px;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  }
  
  .sidebar-bottom {
    flex-direction: row;
    padding-top: 12px;
  }
  
  .settings-menu {
    left: 10px;
    right: 10px;
    bottom: auto;
    top: calc(100% + 10px);
  }
  
  .back {
    left: 12px; 
    top: 12px;
    width: 40px; 
    height: 40px;
    border-radius: 50%;
  }
}

@media (max-width: 680px) {
  .grid-2, .grid-3, .grid-auto { 
    grid-template-columns: 1fr; 
  }
  
  .nav-vertical > li {
    flex: 1 1 100%;
  }
  
  .app-sidebar {
    padding: 15px;
  }
}

@media (min-width: 1400px) {
  .grid-3 { 
    grid-template-columns: repeat(4, 1fr); 
  }
}

.tooltip {
  position: relative;
  cursor: pointer;
  display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    background: rgba(255, 255, 255, 0.15); /* Fondo translúcido */
    backdrop-filter: blur(12px) saturate(150%);
    -webkit-backdrop-filter: blur(12px) saturate(150%);
    color: #000000;
    text-align: left;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    padding: 8px 12px;
    display: inline-block;
    position: absolute;
    z-index: 9999;
    width: max-content;
    max-width: 350px;
    white-space: normal;
    word-wrap: break-word;
    top: 100%;
    left: 0;
    margin-top: -20px;
    opacity: 0;
    transition: opacity 0.25s ease-in-out;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

.tooltip .tooltiptext .tooltip-list {
    margin: 0;
    padding-left: 1.1rem;
}

.file-field .form-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: .95rem;
}

.file-field input[type="file"] {
  border-radius: 999px;
  padding: 6px 12px;
  border: 1px dashed #ddd;
  background: #fff;
  font-size: .9rem;
  cursor: pointer;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.file-field input[type="file"]::file-selector-button {
  background: #ff4800;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 6px 14px;
  margin-right: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s ease, transform .1s ease;
}

.file-field input[type="file"]::file-selector-button:hover {
  background: var(--accent);
  transform: translateY(-1px);
}

.file-field.has-error input[type="file"] {
  border-color: #d92d20;
  box-shadow: 0 0 0 3px rgba(217, 45, 32, 0.10);
}
/* Enlace de descarga con subrayado animado */
.download-underline {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--accent);
  text-decoration: none;
  padding-bottom: 2px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.download-underline__icon {
  font-size: 0.95rem;
  transform: translateY(1px);
  transition: transform 0.18s ease, opacity 0.18s ease;
  opacity: 0.9;
}

.download-underline__text {
  white-space: nowrap;
}

/* Línea naranja animada debajo del texto */
.download-underline::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  background: linear-gradient(
    90deg,
    #e74c3c,
    var(--accent-hover),
    var(--accent-hover)
  );
  transform-origin: left;
  transform: scaleX(0.15);
  opacity: 0.7;
  transition: transform 0.22s cubic-bezier(0.22, 0.61, 0.36, 1),
              opacity 0.18s ease-out;
}

.download-underline:hover {
  color: var(--accent-hover);
}

.download-underline:hover::after {
  transform: scaleX(1);
  opacity: 1;
}

.download-underline:hover .download-underline__icon {
  transform: translateY(1px) translateX(2px);
  opacity: 1;
}

/* ========================================
   ADMIN PANEL STYLES
   ======================================== */

/* Admin Header */
.admin-header {
  margin-bottom: 20px;
  padding-top: 8px;
}

.admin-header__content {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.admin-title {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -0.02em;
}

.admin-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Admin Buttons */
.admin-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.admin-btn svg {
  flex-shrink: 0;
}

.admin-btn--primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: #fff;
}

.admin-btn--primary:hover {
  background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent) 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 102, 0, 0.25);
}

.admin-btn--secondary {
  background: linear-gradient(135deg, #555 0%, #444 100%);
  color: #fff;
}

.admin-btn--secondary:hover {
  background: linear-gradient(135deg, #444 0%, #333 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Admin Table Container */
.admin-table-container {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e8e8e8;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

/* Admin Table */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.admin-table thead th {
  background: #2a2a2a;
  color: #fff;
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 2px solid var(--accent);
}

.admin-table tbody td {
  padding: 0px 14px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
}

.admin-table tbody tr.despacho-row {
  transition: background-color 0.2s ease;
}

.admin-table tbody tr.despacho-row:nth-child(4n+1) {
  background-color: #fff;
}

.admin-table tbody tr.despacho-row:nth-child(4n+3) {
  background-color: #f1f1f1;
}

.admin-table tbody tr.despacho-row:hover {
  background-color: #ffecde;
}

.admin-table__name {
  font-weight: 600;
  color: var(--fg);
}

.admin-table__logo {
  text-align: center;
  width: 80px;
}

.admin-table__logo img {
  height: 70px;
  width: auto;
  max-width: 70px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.admin-table__no-logo {
  opacity: 0.3;
  font-size: 1.2rem;
}

.admin-table__address {
  color: #555;
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-table__count {
  text-align: center;
  font-weight: 600;
  color: var(--accent);
}

.admin-table__actions {
  text-align: right;
  white-space: nowrap;
  width: 140px;
}

.admin-table__empty {
  text-align: center;
  padding: 40px 20px !important;
  color: #999;
  font-style: italic;
}

/* Admin Icon Buttons */
.admin-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  margin: 0 3px;
  background: transparent;
  border: 1px solid #ddd;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  color: #666;
  text-decoration: none;
}

.admin-icon-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(255, 102, 0, 0.25);
}

.admin-icon-btn--danger:hover {
  background: #fd2912;
  border-color: #fd2912;
  box-shadow: 0px 5px 5px 5px rgba(255, 25, 0, 0.322);
}

.admin-icon-btn svg {
  display: block;
}

/* Socios Row */
.socios-row {
  display: none;
  background: #f8f8f8;
}

.socios-row.show {
  display: table-row;
}

.socios-row td {
  padding: 0 !important;
}

/* Button state for Ver Socios */
.btn-ver-socios.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .admin-header__content {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .admin-title {
    font-size: 1.5rem;
  }
  
  .admin-table {
    font-size: 0.85rem;
  }
  
  .admin-table thead th,
  .admin-table tbody td {
    padding: 8px 10px;
  }
  
  .admin-table__address {
    max-width: 200px;
  }
}

@media (max-width: 680px) {
  .admin-actions {
    width: 100%;
  }
  
  .admin-btn {
    flex: 1;
    justify-content: center;
  }
}

/* ====================
   DOCUMENT TEMPLATES STYLES
   ==================== */

/* Document Header */
.doc-header {
  background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
  border-left: 4px solid var(--accent);
  border-radius: 0;
  padding: 20px 24px;
  margin: 0 0 0px 0;
  box-shadow: var(--shadow-md);
}

.doc-header__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
  padding-left: 40px; /* Espacio para la flecha del sidebar */
}

.doc-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #fff;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.doc-title svg {
  color: var(--accent);
  flex-shrink: 0;
}

.doc-logo {
  height: 50px;
  width: auto;
  border-radius: 4px;
}

/* Document Info */
.doc-info {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding: 12px 16px;
  background: #f8f8f8;
  border-radius: 6px;
  font-size: 0.9rem;
}

.doc-info__item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #555;
}

.doc-info__item svg {
  color: var(--accent);
  flex-shrink: 0;
}

.doc-info__item strong {
  color: #333;
  margin-right: 4px;
}

/* Document Actions */
.doc-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

/* Document Filters */
.doc-filters {
  background: #f8f8f8;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 0px;
}

.doc-filters-simple {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.filter-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

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

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-input,
.filter-select {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.95rem;
  transition: all 0.2s;
  background: #fff;
}

.filter-input:focus,
.filter-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.1);
}

.filter-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 5px;
}

/* Document Buttons */
.doc-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  white-space: nowrap;
}

.doc-btn svg {
  flex-shrink: 0;
}

.doc-btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.doc-btn--primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 102, 0, 0.3);
}

.doc-btn--secondary {
  background: #fff;
  border-color: #ddd;
  color: #555;
}

.doc-btn--secondary:hover {
  background: #f8f8f8;
  border-color: #bbb;
  color: #333;
}

.doc-btn--info {
  background: #ffffff;
  border-color: #ff6600;
  color: #ff6600;
}

.doc-btn--info:hover {
  background: #f0f0f0;
  border-color: #ff6600;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.doc-btn--warning {
  background: #ff6600;
  border-color: #ff6600;
  color: #fff;
}

.doc-btn--warning:hover {
  background: #ee5f00;
  border-color: #ee5f00;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(243, 156, 18, 0.3);
}

.doc-btn--disabled {
  background: #e0e0e0;
  border-color: #e0e0e0;
  color: #999;
  cursor: not-allowed;
  opacity: 0.6;
}

.doc-btn--disabled:hover {
  transform: none;
  box-shadow: none;
  color: white;
}

.doc-btn small {
  font-size: 0.75rem;
  font-weight: 400;
  opacity: 0.9;
  margin-left: 4px;
}

/* Document Table Container */
.doc-table-container {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.doc-table thead {
  background: #2a2a2a;
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}

.doc-table thead th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  border-bottom: 3px solid var(--accent);
  white-space: nowrap;
}

.doc-table thead th.sortable {
  cursor: pointer;
  user-select: none;
  transition: background 0.2s;
}

.doc-table thead th.sortable:hover {
  background: #333;
}

.doc-table thead th .sort-indicator {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  opacity: 0.5;
  transition: all 0.2s;
}

.doc-table thead th.sortable:hover .sort-indicator {
  opacity: 1;
}

.doc-table thead th.sorted-asc .sort-indicator svg {
  transform: rotate(0deg);
  opacity: 1;
  color: var(--accent);
}

.doc-table thead th.sorted-desc .sort-indicator svg {
  transform: rotate(180deg);
  opacity: 1;
  color: var(--accent);
}

.doc-table tbody tr {
  border-bottom: 1px solid #eee;
  transition: background 0.2s;
}

.doc-table tbody tr:hover {
  background: #ffebe1;
}

.doc-table tbody td {
  padding: 5px 16px;
  color: #333;
}

.doc-table tbody td strong {
  color: #111;
}

.doc-table tbody td small {
  color: #666;
  font-size: 0.85rem;
}

/* Document Link */
.doc-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
}

.doc-link:hover {
  color: var(--accent-hover);
  gap: 8px;
}

.doc-link svg {
  flex-shrink: 0;
}

/* Icon Button */
.doc-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  color: #666;
  text-decoration: none;
}

.doc-icon-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(255, 102, 0, 0.25);
}

.doc-icon-btn--danger:hover {
  background: #e74c3c;
  border-color: #e74c3c;
  box-shadow: 0 4px 10px rgba(231, 76, 60, 0.25);
}

.doc-icon-btn svg {
  display: block;
}

/* Document Pagination */
.doc-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 15px 20px;
  background: #f8f8f8;
  border-radius: 15px;
  flex-wrap: wrap;
}

.doc-pagination__info {
  font-size: 0.9rem;
  color: #666;
}

.doc-pagination__controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.doc-pagination__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  color: #555;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
}

.doc-pagination__btn:hover:not(.disabled) {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.doc-pagination__btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.doc-pagination__btn svg {
  flex-shrink: 0;
}

/* Document Status Pills */
.doc-status {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.doc-status--pending {
  color: #856404;
}

.doc-status--resolved {
  color: #0c5460;
}

.doc-status--signed {
  color: #155724;
}

.doc-status--answered {
  color: #155724;
}

.doc-status--unanswered {
  color: #721c24;
}

/* No data indicator */
.doc-no-data {
  color: #999;
  font-style: italic;
}

/* Empty table state */
.doc-table__empty {
  text-align: center;
  padding: 40px 20px !important;
  color: #999;
  font-style: italic;
}

/* Form styles */
.doc-form {
  width: 100%;
}

.doc-form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.doc-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--accent);
}

.doc-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.9rem;
  resize: vertical;
  transition: border-color 0.2s;
}

.doc-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.1);
}

/* Empty state */
.doc-empty-state {
  text-align: center;
  padding: 60px 20px;
  background: #f8f8f8;
  border-radius: 8px;
  margin: 20px 0;
}

.doc-empty-state svg {
  margin: 0 auto 20px;
  display: block;
}

.doc-empty-state p {
  color: #666;
  font-size: 1rem;
  margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 900px) {
  .doc-title {
    font-size: 1.3rem;
  }
  
  .doc-table {
    font-size: 0.85rem;
  }
  
  .doc-table thead th,
  .doc-table tbody td {
    padding: 10px 12px;
  }
  
  .filter-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .doc-header {
    padding: 16px 18px;
  }
  
  .doc-title {
    font-size: 1.1rem;
  }
  
  .doc-actions {
    width: 100%;
  }
  
  .doc-btn {
    flex: 1;
    justify-content: center;
  }
  
  .doc-pagination {
    flex-direction: column;
    align-items: stretch;
  }
  
  .doc-pagination__controls {
    justify-content: center;
  }
}

/* ====================
   REVIEW PAGE STYLES
   ==================== */

/* Review Container */
.review-container {
  max-width: 980px;
  margin: 20px auto;
  padding: 0;
}

/* Review Section */
.review-section {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.review-section--anexo {
  background: #fdfbf9;
}

.review-section__title {
  margin: 0 0 20px;
  font-size: 1.1rem;
  font-weight: 700;
  color: #2a2a2a;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 2px solid #f0f0f0;
}

.review-section__title svg {
  color: var(--accent);
  flex-shrink: 0;
}

/* Review Grid */
.review-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 30px;
}

.review-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.review-field--full {
  grid-column: 1 / -1;
}

.review-field__label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.review-field__value {
  font-size: 0.95rem;
  color: #333;
  line-height: 1.5;
}

.review-empty {
  color: #999;
  font-style: italic;
  font-size: 0.9rem;
}

/* Review Divider */
.review-divider {
  grid-column: 1 / -1;
  height: 1px;
  background: linear-gradient(to right, transparent, #ddd, transparent);
  margin: 8px 0;
}

.review-separator {
  height: 2px;
  background: linear-gradient(to right, #e0e0e0, #f0f0f0, #e0e0e0);
  margin: 25px 0;
  border-radius: 2px;
}

/* Manifest Cards */
.manifest-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 16px;
  transition: all 0.2s ease;
}

.manifest-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(255, 102, 0, 0.1);
}

.manifest-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-weight: 600;
}

.manifest-label input[type="checkbox"] {
  margin-top: 2px;
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.manifest-content {
  flex: 1;
}

.manifest-content p {
  margin: 8px 0 0;
  font-weight: 400;
  font-size: 0.92rem;
  line-height: 1.6;
  color: #444;
}

.manifest-badge {
  display: inline-block;
  padding: 3px 10px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  border-radius: 4px;
  margin-bottom: 6px;
}

.manifest-badge--warning {
  background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
}

/* Manifest Detail (textarea) */
.manifest-detail {
  margin-top: 16px;
}

.manifest-detail .form-label {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 8px;
  display: block;
  color: #555;
}

.manifest-detail textarea {
  width: 100%;
  min-height: 120px;
  padding: 12px 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.5;
  transition: border-color 0.2s, box-shadow 0.2s;
  resize: vertical;
}

.manifest-detail textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.1);
}

.manifest-detail textarea:disabled {
  background: #f5f5f5;
  cursor: not-allowed;
  opacity: 0.6;
}

/* Anexo Scroll */
.anexo-scroll {
  margin-top: 12px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  max-height: 400px;
  overflow-y: auto;
  font-size: 0.88rem;
  line-height: 1.6;
  white-space: pre-wrap;
  color: #444;
}

.anexo-scroll::-webkit-scrollbar {
  width: 8px;
}

.anexo-scroll::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 4px;
}

.anexo-scroll::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 4px;
}

.anexo-scroll::-webkit-scrollbar-thumb:hover {
  background: var(--accent-hover);
}

/* Responsive Review */
@media (max-width: 900px) {
  .review-container {
    margin: 15px;
  }
  
  .review-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  
  .review-section {
    padding: 18px;
  }
  
  .manifest-card {
    padding: 14px;
  }
}

@media (max-width: 680px) {
  .review-container {
    margin: 10px;
  }
  
  .review-section__title {
    font-size: 1rem;
  }
  
  .manifest-label {
    gap: 10px;
  }
}

/* ====================
   LOGIN PAGE STYLES
   ==================== */

/* Login Container */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 100px);
  padding: 20px;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

/* Login Header */
.login-header {
  background: black;
  padding: 40px 30px;
  text-align: center;
  border-bottom: 4px solid var(--accent);
  position: relative;
}

.login-icon {
  color: var(--accent);
  margin: 0 auto 16px;
  display: block;
  position: relative;
  animation: float 3s ease-in-out infinite;
  filter: drop-shadow(0 0 8px rgba(255, 102, 0, 0.6)) 
          drop-shadow(0 0 16px rgba(255, 102, 0, 0.4));
}

/* Suelo iluminado debajo del icono */
.login-header::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100px;
  transform: translateX(-50%);
  width: 200px;
  height: 10px;
  background: radial-gradient(ellipse at center, 
    rgba(255, 102, 0, 0.87) 0%, 
    rgba(255, 102, 0, 0.3) 40%, 
    transparent 70%);
  border-radius: 0 0 50% 50%;
  filter: blur(3px);
  animation: groundGlow 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { 
    transform: translateY(0px);
    filter: drop-shadow(0 0 8px rgba(255, 102, 0, 0.5)) 
            drop-shadow(0 0 16px rgba(255, 102, 0, 0.5));
  }
  50% { 
    transform: translateY(-10px);
    filter: drop-shadow(0 0 12px rgba(255, 102, 0, 0.5)) 
            drop-shadow(0 0 24px rgba(255, 102, 0, 0.5))
            drop-shadow(0 0 32px rgba(255, 102, 0, 0.5));
  }
}

@keyframes groundGlow {
  0%, 100% {
    opacity: 1;
    transform: translateX(-50%) scaleX(1.2);
    filter: blur(3px);
  }
  50% {
    opacity: 0.5;
    transform: translateX(-50%) scaleX(0.8);
    filter: blur(5px);
  }
}

.login-title {
  margin: 0 0 8px;
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.login-subtitle {
  margin: 0;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 400;
}

/* Login Form */
.login-form {
  padding: 35px 30px;
}

.login-field {
  margin-bottom: 24px;
}

.login-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.login-label svg {
  color: var(--accent);
  flex-shrink: 0;
}

.login-field input[type="email"],
.login-field input[type="password"],
.login-field input[type="text"] {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 25px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: #fafafa;
}

.login-field input:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 102, 0, 0.1);
}

.login-field input::placeholder {
  color: #aaa;
}

/* Login Error */
.login-error {
  display: block;
  margin-top: 6px;
  font-size: 0.85rem;
  color: #e74c3c;
  font-weight: 500;
}

.login-alert {
  padding: 12px 16px;
  background: #fff3f2;
  border: 1px solid #ffd4cf;
  border-radius: 8px;
  color: #a82a22;
  font-size: 0.9rem;
  margin-bottom: 20px;
}

/* Login Button */
.login-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: #fff;

  border: none;
  border-radius: 10px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 14px rgba(255, 102, 0, 0.25);
}

.login-btn svg {
  flex-shrink: 0;
}

.login-btn:hover {
  background: linear-gradient(135deg, #ec5f01 0%, var(--accent) 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 102, 0, 0.35);
}

.login-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(255, 102, 0, 0.25);
}

/* Responsive Login */
@media (max-width: 680px) {
  .login-container {
    padding: 15px;
    min-height: calc(100vh - 80px);
  }
  
  .login-card {
    max-width: 100%;
  }
  
  .login-header {
    padding: 30px 20px;
  }
  
  .login-title {
    font-size: 1.5rem;
  }
  
  .login-form {
    padding: 25px 20px;
  }
}