/* ==========================================================================
   WP File Sharing — Estilos públicos
   ========================================================================== */

:root {
  --wfs-primary:       #3a7bd5;
  --wfs-primary-dark:  #2c60a8;
  --wfs-primary-light: #ebf2ff;
  --wfs-accent:        #5b8dd9;
  --wfs-success:       #28a745;
  --wfs-warning:       #ffc107;
  --wfs-danger:        #dc3545;
  --wfs-text:          #2d3748;
  --wfs-text-muted:    #718096;
  --wfs-border:        #e2e8f0;
  --wfs-bg:            #f7fafc;
  --wfs-white:         #ffffff;
  --wfs-radius:        8px;
  --wfs-radius-lg:     12px;
  --wfs-shadow:        0 2px 8px rgba(0,0,0,.08);
  --wfs-shadow-lg:     0 8px 24px rgba(0,0,0,.12);
  --wfs-transition:    .2s ease;
  --wfs-font:          -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ── Reset base ── */
.wfs-portal-wrap *,
.wfs-auth-wrap *,
.wfs-client-area * {
  box-sizing: border-box;
}

/* ── Neutralizar subrayados del tema ── */
.wfs-portal-wrap a,
.wfs-auth-wrap a,
.wfs-client-area a {
  text-decoration: none;
}
.wfs-portal-wrap a:hover,
.wfs-auth-wrap a:hover,
.wfs-client-area a:hover {
  text-decoration: none;
}

/* ── Forzar visibilidad contra temas que ocultan divs dentro de <a> ── */
.wfs-portal-wrap .wfs-folder-card,
.wfs-portal-wrap .wfs-home-card,
.wfs-client-area .wfs-folder-card {
  display:     flex !important;
  align-items: center !important;
}

.wfs-portal-wrap .wfs-folder-card-icon,
.wfs-portal-wrap .wfs-home-card-icon,
.wfs-client-area .wfs-folder-card-icon {
  display:         flex !important;
  visibility:      visible !important;
  opacity:         1 !important;
  width:           44px !important;
  height:          44px !important;
  min-width:       44px !important;
  flex-shrink:     0 !important;
  align-items:     center !important;
  justify-content: center !important;
  border-radius:   var(--wfs-radius) !important;
}

.wfs-portal-wrap .wfs-folder-card-info,
.wfs-portal-wrap .wfs-home-card-content,
.wfs-client-area .wfs-folder-card-info {
  display:    block !important;
  visibility: visible !important;
  opacity:    1 !important;
  flex:       1 !important;
  min-width:  0 !important;
}

/* ── Anti-tema: forzar layout del grupo input+botón contraseña ── */
.wfs-portal-wrap .wfs-input-group,
.wfs-auth-wrap .wfs-input-group,
.wfs-client-area .wfs-input-group {
  display:        flex !important;
  flex-direction: row !important;
  flex-wrap:      nowrap !important;
  align-items:    stretch !important;
  width:          100% !important;
}

.wfs-portal-wrap .wfs-input-group .wfs-input,
.wfs-auth-wrap .wfs-input-group .wfs-input,
.wfs-client-area .wfs-input-group .wfs-input {
  flex:      1 1 auto !important;
  min-width: 0 !important;
  width:     auto !important;
}

.wfs-portal-wrap .wfs-toggle-pass,
.wfs-auth-wrap .wfs-toggle-pass,
.wfs-client-area .wfs-toggle-pass {
  flex:       0 0 auto !important;
  display:    flex !important;
  width:      auto !important;
  min-width:  unset !important;
  max-width:  unset !important;
  align-self: auto !important;
}

/* ── Anti-tema: forzar estilos de inputs, toggle y botón primario ── */
.wfs-portal-wrap .wfs-input,
.wfs-auth-wrap .wfs-input,
.wfs-client-area .wfs-input {
  border: 1.5px solid #1a1a1a !important;
  background: var(--wfs-white) !important;
  color: var(--wfs-text) !important;
  box-shadow: none !important;
  outline: none !important;
}

.wfs-portal-wrap .wfs-input:focus,
.wfs-auth-wrap .wfs-input:focus,
.wfs-client-area .wfs-input:focus {
  border-color: #1a1a1a !important;
  box-shadow: 0 0 0 3px rgba(58,123,213,.15) !important;
}

.wfs-portal-wrap .wfs-input-group:focus-within .wfs-input,
.wfs-auth-wrap .wfs-input-group:focus-within .wfs-input {
  border-color: #1a1a1a !important;
  box-shadow: none !important;
}

.wfs-portal-wrap .wfs-toggle-pass,
.wfs-auth-wrap .wfs-toggle-pass {
  background: var(--wfs-white) !important;
  border: 1.5px solid #1a1a1a !important;
  border-left: none !important;
  color: var(--wfs-primary) !important;
  box-shadow: none !important;
}

.wfs-portal-wrap .wfs-input-group:focus-within .wfs-toggle-pass,
.wfs-auth-wrap .wfs-input-group:focus-within .wfs-toggle-pass {
  border-color: #1a1a1a !important;
}

.wfs-portal-wrap .wfs-toggle-pass:hover,
.wfs-portal-wrap .wfs-toggle-pass:active,
.wfs-auth-wrap .wfs-toggle-pass:hover,
.wfs-auth-wrap .wfs-toggle-pass:active {
  color: var(--wfs-primary-dark) !important;
}

.wfs-portal-wrap .wfs-btn-primary,
.wfs-auth-wrap .wfs-btn-primary {
  background: var(--wfs-primary) !important;
  color: #ffffff !important;
  border-color: var(--wfs-primary) !important;
}

.wfs-portal-wrap .wfs-btn-primary:hover,
.wfs-auth-wrap .wfs-btn-primary:hover {
  background: var(--wfs-primary-dark) !important;
  border-color: var(--wfs-primary-dark) !important;
  color: #ffffff !important;
}

/* =========================================================================
   AUTENTICACIÓN (Login / Registro)
   ========================================================================= */
.wfs-auth-wrap {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 16px;
  min-height: 60vh;
  background: var(--wfs-bg);
  font-family: var(--wfs-font);
}

.wfs-auth-card {
  background: var(--wfs-white);
  border-radius: var(--wfs-radius-lg);
  box-shadow: var(--wfs-shadow-lg);
  padding: 40px 36px;
  width: 100%;
  max-width: 440px;
}

.wfs-register-card {
  max-width: 520px;
}

.wfs-auth-header {
  text-align: center;
  margin-bottom: 28px;
}

.wfs-auth-header h2 {
  font-size: 1.5rem;
  color: var(--wfs-text);
  margin: 12px 0 0;
}

.wfs-logo img {
  max-height: 60px;
  width: auto;
}

.wfs-auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: .9rem;
  color: var(--wfs-text-muted);
}

/* Alertas */
.wfs-alert {
  padding: 12px 16px;
  border-radius: var(--wfs-radius);
  margin-bottom: 20px;
  font-size: .9rem;
  line-height: 1.5;
}

.wfs-alert-error {
  background: #fff5f5;
  border: 1px solid #fed7d7;
  color: #c53030;
}

.wfs-alert-success {
  background: #f0fff4;
  border: 1px solid #c6f6d5;
  color: #276749;
}

.wfs-alert-info {
  background: #ebf8ff;
  border: 1px solid #bee3f8;
  color: #2a69ac;
}

/* Formularios */
.wfs-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.wfs-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 480px) {
  .wfs-form-row { grid-template-columns: 1fr; }
  .wfs-auth-card { padding: 28px 20px; }
}

.wfs-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wfs-form-group label {
  font-size: .875rem;
  font-weight: 600;
  color: var(--wfs-text);
}

.wfs-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--wfs-border);
  border-radius: var(--wfs-radius);
  font-size: .95rem;
  color: var(--wfs-text);
  transition: border-color var(--wfs-transition), box-shadow var(--wfs-transition);
  background: var(--wfs-white);
  font-family: var(--wfs-font);
}

.wfs-input:focus {
  outline: none;
  border-color: var(--wfs-primary);
  box-shadow: 0 0 0 3px rgba(58,123,213,.15);
}

.wfs-input-group {
  display: flex;
  flex-direction: row;
  align-items: stretch;
}

.wfs-input-group .wfs-input {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: none;
  padding-right: 14px;
}

.wfs-input-group:focus-within .wfs-input {
  border-color: var(--wfs-primary);
  box-shadow: none;
}

.wfs-input-group:focus-within {
  border-radius: var(--wfs-radius);
  box-shadow: 0 0 0 3px rgba(58,123,213,.15);
}

.wfs-toggle-pass {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  padding: 0 12px;
  background: var(--wfs-white);
  border: 1.5px solid var(--wfs-border);
  border-left: none;
  border-radius: 0 var(--wfs-radius) var(--wfs-radius) 0;
  cursor: pointer;
  color: var(--wfs-text-muted);
  transition: color var(--wfs-transition), border-color var(--wfs-transition);
  line-height: 1;
}

.wfs-input-group:focus-within .wfs-toggle-pass {
  border-color: var(--wfs-primary);
}

.wfs-toggle-pass:hover { color: var(--wfs-primary); }

.wfs-form-check {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-direction: row;
  font-size: .875rem;
  color: var(--wfs-text);
  gap: 8px;
}

.wfs-form-check label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-weight: 400;
}

.wfs-link-small {
  font-size: .8rem;
  color: var(--wfs-primary);
  text-decoration: none;
  white-space: nowrap;
}

.wfs-link-small:hover { text-decoration: underline; }

.wfs-hint {
  font-size: .8rem;
  color: var(--wfs-text-muted);
  margin: 0;
}

.wfs-text-center { text-align: center; }

/* Medidor de fuerza de contraseña */
.wfs-password-strength {
  height: 4px;
  border-radius: 2px;
  background: var(--wfs-border);
  margin-top: 4px;
  transition: all .3s;
}
.wfs-strength-1 { background: var(--wfs-danger);  width: 25%; }
.wfs-strength-2 { background: var(--wfs-warning); width: 50%; }
.wfs-strength-3 { background: #fd7e14;             width: 75%; }
.wfs-strength-4 { background: var(--wfs-success);  width: 100%; }

/* Botones */
.wfs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--wfs-radius);
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none;
  transition: background var(--wfs-transition), color var(--wfs-transition), border-color var(--wfs-transition), transform var(--wfs-transition);
  font-family: var(--wfs-font);
  line-height: 1.2;
}

.wfs-btn:focus {
  outline: 3px solid rgba(58,123,213,.4);
  outline-offset: 2px;
}

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

.wfs-btn-primary:hover {
  background: var(--wfs-primary-dark);
  border-color: var(--wfs-primary-dark);
  color: var(--wfs-white);
  transform: translateY(-1px);
}

.wfs-btn-outline {
  background: transparent;
  color: var(--wfs-primary);
  border-color: var(--wfs-primary);
}

.wfs-btn-outline:hover {
  background: var(--wfs-primary-light);
  color: var(--wfs-primary-dark);
}

.wfs-btn-block {
  width: 100%;
  padding: 12px 20px;
  font-size: 1rem;
}

.wfs-btn-sm {
  padding: 6px 14px;
  font-size: .8rem;
}

/* =========================================================================
   PORTAL
   ========================================================================= */
.wfs-portal-wrap {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: var(--wfs-font);
  color: var(--wfs-text);
  background: var(--wfs-bg);
}

/* Header */
.wfs-portal-header {
  background: var(--wfs-white);
  border-bottom: 1px solid var(--wfs-border);
  box-shadow: var(--wfs-shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.wfs-portal-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.wfs-portal-brand {
  flex-shrink: 0;
}

.wfs-portal-brand img {
  max-height: 40px;
  width: auto;
}

.wfs-portal-site-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--wfs-primary);
}

.wfs-portal-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.wfs-nav-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--wfs-radius);
  text-decoration: none;
  color: var(--wfs-text-muted);
  font-size: .9rem;
  font-weight: 500;
  transition: background var(--wfs-transition), color var(--wfs-transition), box-shadow var(--wfs-transition);
  position: relative;
}

.wfs-nav-item:hover {
  background: var(--wfs-primary-light);
  color: var(--wfs-primary);
  text-decoration: none;
}

.wfs-nav-item.active {
  background: var(--wfs-primary-light);
  color: var(--wfs-primary);
  font-weight: 600;
  text-decoration: none;
  box-shadow: inset 0 -2px 0 var(--wfs-primary);
}

.wfs-nav-item .dashicons { font-size: 16px; width: 16px; height: 16px; }

.wfs-portal-user {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  flex-shrink: 0;
}

.wfs-user-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .875rem;
  color: var(--wfs-text-muted);
  font-weight: 500;
}

/* Main */
.wfs-portal-main {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 24px;
}

/* Footer */
.wfs-portal-footer {
  background: var(--wfs-white);
  border-top: 1px solid var(--wfs-border);
  text-align: center;
  padding: 16px;
  font-size: .8rem;
  color: var(--wfs-text-muted);
}

/* Responsive nav */
@media (max-width: 640px) {
  .wfs-portal-header-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 12px 16px;
    gap: 8px;
  }
  .wfs-portal-nav { flex-wrap: wrap; }
  .wfs-portal-main { padding: 20px 16px; }
}

/* ── Home: bienvenida ── */
.wfs-welcome-banner {
  display: flex;
  align-items: center;
  gap: 20px;
  background: linear-gradient(135deg, var(--wfs-primary) 0%, var(--wfs-accent) 100%);
  color: var(--wfs-white);
  border-radius: var(--wfs-radius-lg);
  padding: 28px 32px;
  margin-bottom: 32px;
}

.wfs-welcome-icon .dashicons {
  font-size: 48px;
  width: 48px;
  height: 48px;
  opacity: .85;
}

.wfs-welcome-text h2 {
  margin: 0 0 6px;
  font-size: 1.5rem;
  color: inherit;
}

.wfs-welcome-text p {
  margin: 0;
  opacity: .9;
  font-size: .95rem;
}

/* ── Home: tarjetas ── */
.wfs-home-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 36px;
}

.wfs-home-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--wfs-white);
  border: 1px solid var(--wfs-border);
  border-radius: var(--wfs-radius-lg);
  padding: 20px 24px;
  text-decoration: none;
  color: var(--wfs-text);
  box-shadow: var(--wfs-shadow);
  transition: box-shadow var(--wfs-transition), transform var(--wfs-transition), border-color var(--wfs-transition);
}

.wfs-home-card:hover {
  box-shadow: var(--wfs-shadow-lg);
  transform: translateY(-2px);
  border-color: var(--wfs-primary);
  color: var(--wfs-text);
}

.wfs-home-card-icon {
  width: 48px;
  height: 48px;
  background: var(--wfs-primary-light);
  border-radius: var(--wfs-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.wfs-home-card-icon .dashicons {
  font-size: 24px;
  width: 24px;
  height: 24px;
  color: var(--wfs-primary);
}

.wfs-home-card-content { flex: 1; }

.wfs-home-card-content h3 {
  margin: 0 0 4px;
  font-size: 1rem;
  color: var(--wfs-text);
}

.wfs-home-card-content p {
  margin: 0;
  font-size: .85rem;
  color: var(--wfs-text-muted);
}

.wfs-home-card-arrow {
  color: var(--wfs-text-muted);
  font-size: 20px;
  width: 20px;
  height: 20px;
  transition: transform var(--wfs-transition);
}

.wfs-home-card:hover .wfs-home-card-arrow { transform: translateX(4px); }

/* ── Sección reciente ── */
.wfs-recent-section h3 {
  font-size: 1.1rem;
  margin: 0 0 16px;
  color: var(--wfs-text);
}

/* =========================================================================
   CARPETAS — GRID
   ========================================================================= */
.wfs-folder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.wfs-folder-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--wfs-white);
  border: 1px solid var(--wfs-border);
  border-radius: var(--wfs-radius-lg);
  padding: 18px 20px;
  text-decoration: none;
  color: var(--wfs-text);
  box-shadow: var(--wfs-shadow);
  transition: all var(--wfs-transition);
  position: relative;
  overflow: hidden;
}

.wfs-folder-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--wfs-primary);
  opacity: 0;
  transition: opacity var(--wfs-transition);
}

.wfs-folder-card:hover {
  box-shadow: var(--wfs-shadow-lg);
  transform: translateY(-2px);
  border-color: var(--wfs-primary);
  color: var(--wfs-text);
}

.wfs-folder-card:hover::before { opacity: 1; }

.wfs-folder-worker { --wfs-primary: #6c5ce7; --wfs-primary-light: #f0eeff; }

.wfs-folder-card-icon {
  width: 44px;
  height: 44px;
  background: var(--wfs-primary-light);
  border-radius: var(--wfs-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.wfs-folder-card-icon .dashicons {
  color: var(--wfs-primary);
  font-size: 22px;
  width: 22px;
  height: 22px;
}

/* Carpeta pública (shared_all) → azul (usa el color primario por defecto) */
.wfs-fci-public {
  background: var(--wfs-primary-light) !important;
}
.wfs-fci-public .dashicons {
  color: var(--wfs-primary) !important;
}

/* Carpeta privada → amarillo/ámbar */
.wfs-fci-private {
  background: #fff7ed !important;
}
.wfs-fci-private .dashicons {
  color: #f59e0b !important;
}

/* Icono pequeño de subcarpeta (folder-view) */
.wfs-folder-icon-sm.wfs-ico-public  { color: var(--wfs-primary) !important; }
.wfs-folder-icon-sm.wfs-ico-private { color: #f59e0b !important; }

.wfs-folder-card-info { flex: 1; min-width: 0; }

.wfs-folder-card-name {
  margin: 0 0 4px;
  font-size: .95rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--wfs-text);
}

.wfs-folder-card-desc {
  margin: 0 0 6px;
  font-size: .8rem;
  color: var(--wfs-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wfs-folder-card-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: .75rem;
  color: var(--wfs-text-muted);
}

.wfs-folder-card-meta span {
  display: flex;
  align-items: center;
  gap: 3px;
}

.wfs-folder-card-meta .dashicons {
  font-size: 13px;
  width: 13px;
  height: 13px;
}

.wfs-folder-card-arrow {
  color: var(--wfs-border);
  font-size: 18px;
  flex-shrink: 0;
  transition: color var(--wfs-transition), transform var(--wfs-transition);
}

.wfs-folder-card:hover .wfs-folder-card-arrow {
  color: var(--wfs-primary);
  transform: translateX(3px);
}

/* Wrapper de tarjeta de carpeta con botón ZIP */
.wfs-folder-card-wrap {
  position: relative;
}

.wfs-folder-card-wrap .wfs-folder-card {
  width: 100%;
  padding-right: 52px; /* espacio para el botón ZIP */
}

.wfs-folder-zip-btn {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: var(--wfs-bg);
  border: 1px solid var(--wfs-border);
  border-radius: var(--wfs-radius);
  padding: 6px 8px;
  color: var(--wfs-text-light);
  text-decoration: none;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  transition: all var(--wfs-transition);
  z-index: 2;
}

.wfs-folder-zip-btn .dashicons {
  font-size: 18px;
  width: 18px;
  height: 18px;
}

.wfs-folder-zip-btn:hover {
  background: var(--wfs-primary-light);
  border-color: var(--wfs-primary);
  color: var(--wfs-primary);
}

/* Cabecera de carpeta con botón ZIP alineado */
.wfs-folder-view-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.wfs-folder-view-header-top h2 {
  margin: 0;
}

/* Grid de subcarpetas (pequeñas) */
.wfs-folder-grid-sm {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.wfs-folder-card-sm {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px 12px;
  gap: 8px;
}

.wfs-folder-icon-sm {
  font-size: 32px;
  width: 32px;
  height: 32px;
  color: var(--wfs-primary);
}

.wfs-folder-name-sm {
  font-size: .85rem;
  font-weight: 600;
  color: var(--wfs-text);
  word-break: break-word;
}

.wfs-folder-badge {
  background: var(--wfs-primary);
  color: #fff;
  font-size: .7rem;
  padding: 2px 8px;
  border-radius: 20px;
}

/* =========================================================================
   ÁREA CLIENTE / TRABAJADOR
   ========================================================================= */
.wfs-client-area {
  font-family: var(--wfs-font);
}

.wfs-area-header {
  margin-bottom: 28px;
}

.wfs-area-header h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.4rem;
  color: var(--wfs-text);
  margin: 0 0 6px;
}

.wfs-area-header p {
  margin: 0;
  color: var(--wfs-text-muted);
  font-size: .95rem;
}

/* =========================================================================
   VISTA DE CARPETA
   ========================================================================= */
.wfs-folder-view { font-family: var(--wfs-font); }

/* Breadcrumb */
.wfs-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 20px;
  font-size: .875rem;
}

.wfs-breadcrumb-item {
  color: var(--wfs-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: var(--wfs-radius);
  transition: background var(--wfs-transition);
}

.wfs-breadcrumb-item:hover { background: var(--wfs-primary-light); }

.wfs-breadcrumb-current {
  color: var(--wfs-text);
  font-weight: 600;
  cursor: default;
}

.wfs-breadcrumb-sep {
  color: var(--wfs-text-muted);
  font-size: 14px;
  width: 14px;
  height: 14px;
}

/* Cabecera carpeta */
.wfs-folder-view-header {
  margin-bottom: 28px;
}

.wfs-folder-view-header h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.4rem;
  color: var(--wfs-text);
  margin: 0 0 6px;
}

.wfs-folder-desc {
  color: var(--wfs-text-muted);
  margin: 0;
  font-size: .9rem;
}

/* Secciones */
.wfs-subfolders,
.wfs-files-section {
  margin-bottom: 32px;
}

.wfs-subfolders h3,
.wfs-files-section h3 {
  font-size: 1rem;
  color: var(--wfs-text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  font-size: .8rem;
  font-weight: 700;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--wfs-border);
}

/* Lista de archivos */
.wfs-files-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wfs-file-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background: var(--wfs-white);
  border: 1px solid var(--wfs-border);
  border-radius: var(--wfs-radius);
  transition: box-shadow var(--wfs-transition), border-color var(--wfs-transition);
}

.wfs-file-item:hover {
  border-color: var(--wfs-primary);
  box-shadow: var(--wfs-shadow);
}

/* Primer y último item con más radius */
.wfs-file-item:first-child { border-radius: var(--wfs-radius) var(--wfs-radius) 0 0; }
.wfs-file-item:last-child  { border-radius: 0 0 var(--wfs-radius) var(--wfs-radius); }
.wfs-file-item:only-child  { border-radius: var(--wfs-radius); }
.wfs-file-item + .wfs-file-item { border-top: none; }

.wfs-file-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: var(--wfs-radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--wfs-primary-light);
  gap: 2px;
}

.wfs-file-icon-wrap .dashicons {
  font-size: 18px;
  width: 18px;
  height: 18px;
  color: var(--wfs-primary);
}

.wfs-file-ext-label {
  font-size: .6rem;
  font-weight: 700;
  color: var(--wfs-primary);
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* Colores por tipo */
.wfs-file-ext-pdf .dashicons,  .wfs-file-ext-pdf  .wfs-file-ext-label  { color: #e53e3e; }
.wfs-file-ext-pdf  { background: #fff5f5; }
.wfs-file-ext-xls  .dashicons, .wfs-file-ext-xlsx .dashicons,
.wfs-file-ext-xls  .wfs-file-ext-label, .wfs-file-ext-xlsx .wfs-file-ext-label { color: #276749; }
.wfs-file-ext-xls, .wfs-file-ext-xlsx, .wfs-file-ext-csv { background: #f0fff4; }
.wfs-file-ext-doc  .dashicons, .wfs-file-ext-docx .dashicons,
.wfs-file-ext-doc  .wfs-file-ext-label, .wfs-file-ext-docx .wfs-file-ext-label { color: #2b6cb0; }
.wfs-file-ext-doc, .wfs-file-ext-docx { background: #ebf8ff; }
.wfs-file-ext-zip .dashicons, .wfs-file-ext-zip .wfs-file-ext-label { color: #744210; }
.wfs-file-ext-zip { background: #fffaf0; }

.wfs-file-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.wfs-file-name {
  font-size: .9rem;
  font-weight: 600;
  color: var(--wfs-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wfs-file-meta {
  font-size: .75rem;
  color: var(--wfs-text-muted);
}

.wfs-download-btn {
  flex-shrink: 0;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .wfs-file-item { flex-wrap: wrap; }
  .wfs-download-btn { width: 100%; justify-content: center; }
}

/* =========================================================================
   ESTADOS VACÍOS
   ========================================================================= */
.wfs-empty-state {
  text-align: center;
  padding: 48px 24px;
  background: var(--wfs-white);
  border: 2px dashed var(--wfs-border);
  border-radius: var(--wfs-radius-lg);
}

.wfs-empty-icon {
  font-size: 56px;
  width: 56px;
  height: 56px;
  color: var(--wfs-border);
  display: block;
  margin: 0 auto 16px;
}

.wfs-empty-state h3 {
  font-size: 1.1rem;
  color: var(--wfs-text-muted);
  margin: 0 0 8px;
}

.wfs-empty-state p {
  color: var(--wfs-text-muted);
  font-size: .9rem;
  margin: 0;
  max-width: 360px;
  margin: 0 auto;
}

.wfs-empty-state-sm {
  padding: 28px 16px;
}

.wfs-empty-icon-sm {
  font-size: 32px;
  width: 32px;
  height: 32px;
  color: var(--wfs-border);
  display: block;
  margin: 0 auto 8px;
}

/* Ocultar el honeypot */
.wfs-hp {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
}

/* Mensajes de error de página */
.wfs-error {
  color: var(--wfs-danger);
  padding: 12px 16px;
  background: #fff5f5;
  border: 1px solid #fed7d7;
  border-radius: var(--wfs-radius);
}

/* =========================================================================
   VALIDACIÓN DE FORMULARIOS — Errores inline y spinner
   ========================================================================= */

/* Campo con error */
.wfs-input.wfs-input-invalid {
  border-color: var(--wfs-danger) !important;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, .15) !important;
}

/* Mensaje de error debajo del campo */
.wfs-field-error {
  display: block;
  margin-top: 5px;
  font-size: .8rem;
  color: var(--wfs-danger);
  font-weight: 500;
}

/* Estado de carga del botón submit */
.wfs-btn:disabled {
  opacity: .7;
  cursor: not-allowed;
  transform: none !important;
}

/* Spinner animado (usado en botones y en descarga) */
@keyframes wfs-spin {
  to { transform: rotate(360deg); }
}

.wfs-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, .4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: wfs-spin .7s linear infinite;
  vertical-align: middle;
  margin-right: 4px;
}

.wfs-spinner-sm {
  width: 12px;
  height: 12px;
  border-color: rgba(58, 123, 213, .3);
  border-top-color: var(--wfs-primary);
}

.wfs-spinner-lg {
  width: 36px;
  height: 36px;
  border-width: 3px;
  border-color: rgba(58, 123, 213, .2);
  border-top-color: var(--wfs-primary);
}

/* =========================================================================
   BOTONES DE ARCHIVO — Acciones (Ver + Descargar)
   ========================================================================= */
.wfs-file-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Botón "Ver" — variante ghost (sin borde, más ligero que outline) */
.wfs-btn-ghost {
  background: transparent;
  color: var(--wfs-text-muted);
  border-color: transparent;
  padding: 6px 10px;
}

.wfs-btn-ghost:hover {
  background: var(--wfs-primary-light);
  color: var(--wfs-primary);
  border-color: transparent;
}

.wfs-btn-ghost .dashicons {
  font-size: 16px;
  width: 16px;
  height: 16px;
}

@media (max-width: 520px) {
  .wfs-file-item     { flex-wrap: wrap; }
  .wfs-file-actions  { width: 100%; justify-content: flex-end; margin-top: 4px; }
}

/* =========================================================================
   MODAL / LIGHTBOX DE IMÁGENES
   ========================================================================= */

/* Fondo oscuro — siempre en el DOM, invisible por defecto */
.wfs-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  align-items: center;
  justify-content: center;
}

.wfs-modal.wfs-modal-open {
  display: flex;
}

/* Bloquear scroll del body cuando el modal está abierto */
body.wfs-modal-active {
  overflow: hidden;
}

/* Overlay semitransparente */
.wfs-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .82);
  cursor: pointer;
  backdrop-filter: blur(3px);
}

/* Caja del modal */
.wfs-modal-box {
  position: relative;
  z-index: 1;
  background: #1a1a1a;
  border-radius: var(--wfs-radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
  display: flex;
  flex-direction: column;
  max-width: min(92vw, 1100px);
  max-height: 92vh;
  overflow: hidden;
  animation: wfs-modal-in .18s ease;
}

@keyframes wfs-modal-in {
  from { opacity: 0; transform: scale(.95); }
  to   { opacity: 1; transform: scale(1); }
}

/* Barra superior del modal */
.wfs-modal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: #111;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  min-height: 52px;
  flex-shrink: 0;
}

.wfs-modal-filename {
  font-size: .875rem;
  color: rgba(255, 255, 255, .75);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60%;
}

.wfs-modal-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Botón de descarga dentro del modal */
.wfs-modal-download-btn {
  color: rgba(255, 255, 255, .8) !important;
  border-color: rgba(255, 255, 255, .25) !important;
  font-size: .8rem !important;
}

.wfs-modal-download-btn:hover {
  background: rgba(255, 255, 255, .1) !important;
  color: #fff !important;
  border-color: rgba(255, 255, 255, .5) !important;
}

/* Botón cerrar */
.wfs-modal-close {
  background: transparent;
  border: none;
  cursor: pointer;
  color: rgba(255, 255, 255, .6);
  padding: 6px;
  border-radius: var(--wfs-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--wfs-transition), color var(--wfs-transition);
  line-height: 1;
}

.wfs-modal-close:hover {
  background: rgba(255, 255, 255, .1);
  color: #fff;
}

.wfs-modal-close .dashicons {
  font-size: 22px;
  width: 22px;
  height: 22px;
}

/* Cuerpo del modal — contenedor de la imagen */
.wfs-modal-body {
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  min-height: 200px;
  flex: 1;
}

/* Loader centrado */
.wfs-modal-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

/* Imagen dentro del modal */
.wfs-modal-img {
  max-width: 100%;
  max-height: calc(92vh - 100px);
  object-fit: contain;
  border-radius: 4px;
  cursor: zoom-in;
  transition: transform .25s ease;
  display: block;
}

/* Estado zoom (clic sobre la imagen) */
.wfs-modal-img.wfs-modal-img-zoom {
  max-width: none;
  max-height: none;
  cursor: zoom-out;
  transform: scale(1.6);
  transform-origin: center center;
}

/* Mensaje de error dentro del modal */
.wfs-modal-error {
  color: #fc8181;
  font-size: .9rem;
  text-align: center;
  padding: 20px;
}

/* =========================================================================
   MI CUENTA — Cambio de contraseña
   ========================================================================= */
.wfs-account-section {
  max-width: 520px;
  margin: 0 auto;
  padding: 32px 16px 48px;
}

.wfs-account-card {
  background: var(--wfs-white);
  border-radius: var(--wfs-radius-lg);
  box-shadow: var(--wfs-shadow);
  padding: 36px;
}

.wfs-account-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--wfs-border);
}

.wfs-account-card-header .dashicons {
  font-size: 1.6rem;
  width: 1.6rem;
  height: 1.6rem;
  color: var(--wfs-primary);
}

.wfs-account-card-header h2 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--wfs-text);
}

.wfs-chpass-notice {
  border-radius: var(--wfs-radius);
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: .9rem;
  font-weight: 500;
}

.wfs-chpass-success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}

.wfs-chpass-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

@media (max-width: 520px) {
  .wfs-account-card {
    padding: 24px 20px;
  }
}
