/* ─── SHARED NAV ─── */
.app-nav {
  padding: 24px 32px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.app-nav-logo {
  display: flex; align-items: center; gap: 12px; text-decoration: none;
}
.app-nav-logo img {
  width: 44px; height: 44px;
  filter: drop-shadow(0 2px 8px rgba(60,80,200,0.18));
}
.app-nav-brand h1 { font-size: 20px; font-weight: 700; color: var(--navy); margin: 0; }
.app-nav-brand p { font-size: 12px; color: var(--text-muted); margin-top: 1px; }

.app-nav-right { display: flex; align-items: center; gap: 8px; }

.app-nav-link {
  padding: 6px 10px; font-size: 13px; color: var(--text-muted);
  text-decoration: none; transition: color 0.15s; font-family: inherit;
  white-space: nowrap;
}
.app-nav-link:hover { color: var(--blue); }
.app-nav-link.active { color: var(--blue); font-weight: 600; }

.app-nav-login {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 14px; border-radius: 8px;
  font-size: 13px; color: #fff; cursor: pointer;
  background: var(--blue); border: 1px solid var(--blue);
  text-decoration: none; transition: all 0.15s; font-family: inherit;
  white-space: nowrap;
}
.app-nav-login:hover { background: var(--blue-light, #4478f5); border-color: var(--blue-light, #4478f5); }

/* Avatar */
.app-nav-avatar { position: relative; }
.app-nav-avatar img, .app-nav-avatar-initial {
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
  border: 2px solid var(--card-border); object-fit: cover;
  transition: border-color 0.15s;
}
.app-nav-avatar img:hover, .app-nav-avatar-initial:hover { border-color: var(--blue); }
.app-nav-avatar-initial {
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: #fff; background: var(--blue);
  border-color: rgba(255,255,255,0.6);
}

/* Dropdown */
.app-nav-dropdown {
  display: none; position: absolute; right: 0; top: 42px;
  background: #fff; border-radius: 12px; padding: 8px 0;
  box-shadow: 0 8px 30px rgba(20,30,80,0.15); min-width: 180px; z-index: 50;
  animation: navFadeUp 0.15s ease;
}
.app-nav-dropdown.open { display: block; }
.app-nav-dropdown .dd-item {
  display: block; padding: 10px 16px; font-size: 13px; color: var(--text);
  text-decoration: none; cursor: pointer; transition: background 0.1s;
  border: none; background: none; width: 100%; text-align: left; font-family: inherit;
}
.app-nav-dropdown .dd-item:hover { background: rgba(20,86,240,0.06); }
.dd-usage { padding: 10px 16px; border-bottom: 1px solid rgba(100,130,255,0.1); }
.dd-usage-label { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.dd-usage-bar { height: 6px; background: rgba(100,130,255,0.12); border-radius: 3px; overflow: hidden; }
.dd-usage-fill { height: 100%; background: var(--blue); border-radius: 3px; transition: width 0.3s; }

@keyframes navFadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Mobile */
@media (max-width: 640px) {
  .app-nav { padding: 16px 16px 0; gap: 8px; flex-wrap: wrap; }
  .app-nav-logo img { width: 32px; height: 32px; }
  .app-nav-brand h1 { font-size: 16px; }
  .app-nav-brand p { display: none; }
  .app-nav-right { gap: 4px; }
  .app-nav-link { padding: 6px 6px; font-size: 12px; }
  .app-nav-login { padding: 5px 10px; font-size: 12px; }
  .app-nav-avatar img, .app-nav-avatar-initial { width: 28px; height: 28px; font-size: 12px; }
}
