/* Planner/css/layout.css */
/* ==========================================================================
   4. Layout Principal (Header, Navigation, Main, Footer)
   ========================================================================== */

/* ---- Header ---- */
.app-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  z-index: 1020;
  backdrop-filter: blur(10px);
  width: 100%;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  z-index: 1011;
}

.logo-icon img {
  width: 42px;
  height: 32px;
  vertical-align: middle;
}

.logo h1 {
  font-size: 1.4rem;
  font-weight: 800;
  margin: 0;
  margin-top: 10px;
  color: var(--text-primary);
}

/* ---- Navigation (Desktop) ---- */


.nav-tabs {
  display: flex;
  gap: 0.5rem;
}

.nav-tab {
  background: none;
  border: none;
  padding: 0.75rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.2s ease-in-out, border-color 0.2s ease-in-out, background-color 0.2s ease-in-out;
  position: relative;
  border-bottom: 2px solid transparent;
}

.nav-tab:hover {
  color: white;
}

.nav-tab.active {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 600;
  border-image-slice: 1;
}

.nav-tab.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 4px;
  background: var(--gradient-accent);
  border-radius: 4px;
}

button[data-tab="inicio"] {
  display: none;
}

.hero-icon {
  display: block;
  margin: 0 auto 12px;
  width: 10rem;
  height: auto;
}

/* ---- Main Content ---- */
.main-content {
  flex: 1;
  padding: 2rem 0;
}

.tab-content {
  display: none;
  animation: fadeIn 0.5s ease-in-out;
}

.tab-content.active {
  display: block;
}

/* ---- Footer ---- */
.app-footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 2rem 0;
  margin: auto;
  color: var(--text-secondary);
  width: 100%;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-info,
.footer-links,
.social-links {
  flex: 1;
  min-width: 200px;
}

.footer-info {
  text-align: left;
}

.footer-copyright {
  font-size: 0.9rem;
  margin: 0;
}

.footer-location {
  font-size: 0.8rem;
  margin: 0.25rem 0 0 0;
  opacity: 0.7;
}

.footer-links ul {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease-in-out;
}

.footer-links a:hover {
  color: var(--primary-color);
}

.social-links {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

.social-links a {
  color: var(--text-secondary);
  font-size: 1.2rem;
  text-decoration: none;
  transition: color 0.2s ease-in-out, transform 0.2s ease-in-out;
}

.social-links a:hover {
  color: var(--primary-color);
  transform: scale(1.1);
}

.user-profile {
  position: relative;
  z-index: 1011;
}

.user-profile-icon {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-secondary);
}

.user-profile-icon:hover {
  border-color: var(--primary-color);
  color: var(--text-primary);
}

.user-profile-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.user-profile-text {
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1;
}

/* --- Dropdown do Usuário (Logado) --- */
.user-dropdown {
  display: none; /* Escondido por padrão */
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 220px;
  background-color: var(--bg-secondary);
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  animation: fadeIn 0.2s ease-out;
  z-index: 1010;
}

.user-dropdown.active {
  display: block; /* Exibido pelo JS */
}

.mobile-nav .user-profile {
  display: none;
}