@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined&display=swap');

/* --- 1. RESET Y BASE --- */
* {
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  background-color: #f8f9fa;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  color: #333;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease;
}

/* --- 2. HEADER PROFESIONAL --- */
header {
  display: flex;
  width: 100%;
  height: 70px;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  background: #164B8A;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  position: relative;
  z-index: 1000;
}

.header nav ul {
  display: flex;
  align-items: center;
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.material-symbols-outlined {
  font-size: 24px;
  color: rgba(255, 255, 255, 0.9);
  transition: transform 0.2s ease, color 0.2s ease;
  cursor: pointer;
}

.abrirmenu a, .notificacion {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  transition: background-color 0.2s ease;
}

.abrirmenu a:hover, .notificacion:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

/* --- 3. MENÚS DESPLEGABLES --- */
.submenu, .subusuario {
  position: absolute;
  top: 75px;
  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);
  border: 1px solid rgba(0,0,0,0.05);
  min-width: 240px;
  z-index: 2000;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-10px) scale(0.98);
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.2s;
}

.submenu.show, .subusuario.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  visibility: visible;
}

.submenu { left: 20px; }
.subusuario { right: 20px; }

.submenu ul, .subusuario ul {
  display: flex;
  flex-direction: column;
  padding: 8px;
  margin: 0;
  gap: 4px;
}

.submenu ul li a, 
.subusuario button,
.subusuario li div {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 500;
  color: #4b5563;
  border-radius: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.2s, color 0.2s;
}

.submenu ul li a:hover, 
.subusuario button:hover {
  background-color: #f3f4f6;
  color: #111827;
}

/* --- PERFIL --- */
#userinfo {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #9ca3af;
  font-weight: 600;
  padding-bottom: 5px;
  border-bottom: 1px solid #eee;
  margin-bottom: 5px;
  cursor: default;
}

#btnSubirFoto { color: #164B8A; }
#btnSubirFoto:hover { background-color: rgba(22, 75, 138, 0.08); }

#btnBorrarFoto { color: #ef4444; }
#btnBorrarFoto:hover { background-color: #fef2f2; }

#logout {
  color: #ef4444;
  border-top: 1px solid #eee;
  margin-top: 4px;
  padding-top: 12px;
}
#logout:hover { background-color: #fef2f2; }

.usuario img#preview {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.8);
  transition: box-shadow 0.2s ease;
  display: block;
}
.usuario:hover img#preview { box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.2); }

/* --- TOASTS --- */
.toasts {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 3000;
}

.toast {
  background-color: #fff;
  color: #333;
  border-left: 4px solid #164B8A;
  border-radius: 6px;
  padding: 16px 20px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  font-size: 14px;
  font-weight: 500;
  animation: slideIn 0.3s ease forwards;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* --- FOOTER --- */
footer {
  text-align: center;
  padding: 20px 0;
  font-size: 13px;
  color: #fff;
  background: linear-gradient(to right, #C0993A, #d4af37);
  margin-top: auto;
  font-weight: 500;
  letter-spacing: 0.5px;
}