/* Akku app header — single source of truth for the top bar on every page.
   Namespaced `ah-` so it never collides with page-level styles. Paired with
   /js/app-header.js, which injects the markup into <div id="appHeader"></div>. */
.ah-bar {
  background: #fff;
  height: 68px;
  box-sizing: border-box;
  padding: 0 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 4px solid #7C3AED;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0;
  z-index: 100;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.ah-logo { display: flex; align-items: center; margin-right: auto; flex-shrink: 0; }
.ah-logo img { height: 38px; display: block; }

.ah-nav { display: flex; align-items: center; gap: 10px; }
.ah-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 8px;
  font-size: 13px; font-weight: 600; line-height: 1;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  border: 1.5px solid #E5E7EB; color: #374151; background: #fff;
  transition: all 0.18s;
}
.ah-link svg { width: 15px; height: 15px; flex-shrink: 0; }
.ah-link:hover { background: #F5F3FF; border-color: #A78BFA; color: #7C3AED; }
.ah-link.active { background: #F5F3FF; border-color: #7C3AED; color: #5B21B6; cursor: default; }

/* profile */
.ah-prof { position: relative; margin-left: 8px; padding-left: 16px; border-left: 2px solid #E5E7EB; flex-shrink: 0; }
.ah-prof-toggle { display: flex; align-items: center; gap: 9px; cursor: pointer; padding: 5px 9px; border-radius: 8px; transition: background 0.18s; }
.ah-prof-toggle:hover { background: #F3F4F6; }
.ah-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, #7C3AED, #5B21B6);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; flex-shrink: 0;
}
.ah-avatar.lg { width: 42px; height: 42px; font-size: 16px; }
.ah-name { font-weight: 600; font-size: 13px; color: #1E1B4B; white-space: nowrap; }
.ah-arrow { font-size: 9px; color: #9CA3AF; transition: transform 0.2s; }
.ah-prof.open .ah-arrow { transform: rotate(180deg); }

.ah-dd {
  display: none; position: absolute; top: calc(100% + 8px); right: 0;
  background: #fff; border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.14), 0 0 0 1px rgba(0, 0, 0, 0.05);
  min-width: 250px; z-index: 999; overflow: hidden;
}
.ah-prof.open .ah-dd { display: block; }
.ah-dd-head { display: flex; align-items: center; gap: 11px; padding: 16px 18px; background: #F5F3FF; }
.ah-dd-head .nm { font-weight: 700; font-size: 14px; color: #1E1B4B; }
.ah-dd-head .em { font-size: 12px; color: #9CA3AF; }
.ah-dd-menu { padding: 6px; }
.ah-dd-item {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 10px 12px; border: none; background: none;
  font-size: 13px; font-weight: 600; color: #374151;
  border-radius: 8px; cursor: pointer; text-align: left;
}
.ah-dd-item svg { width: 15px; height: 15px; flex-shrink: 0; }
.ah-dd-item:hover { background: #F3F4F6; }
.ah-dd-item.danger { color: #DC2626; }
.ah-dd-item.danger:hover { background: #FEE2E2; }

.ah-link:focus-visible, .ah-dd-item:focus-visible, .ah-prof-toggle:focus-visible {
  outline: 3px solid #A78BFA; outline-offset: 2px;
}

/* shared change-password modal */
.ah-modal-overlay {
  display: none; position: fixed; inset: 0; background: rgba(30, 27, 75, 0.45);
  z-index: 2000; align-items: center; justify-content: center; padding: 20px;
}
.ah-modal-overlay.open { display: flex; }
.ah-modal {
  background: #fff; border-radius: 14px; width: 100%; max-width: 400px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3); overflow: hidden;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.ah-modal h3 { font-size: 16px; color: #1E1B4B; padding: 18px 20px; border-bottom: 1px solid #E5E7EB; }
.ah-modal-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.ah-modal-body label { font-size: 12px; font-weight: 700; color: #475569; text-transform: uppercase; letter-spacing: 0.4px; }
.ah-modal-body input {
  width: 100%; padding: 9px 11px; border: 1.5px solid #E5E7EB; border-radius: 8px;
  font-size: 14px; font-family: inherit; margin-top: 4px;
}
.ah-modal-body input:focus { outline: none; border-color: #7C3AED; box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12); }
.ah-modal-msg { font-size: 12.5px; min-height: 16px; }
.ah-modal-msg.err { color: #DC2626; } .ah-modal-msg.ok { color: #059669; }
.ah-modal-actions { display: flex; gap: 10px; padding: 14px 20px; border-top: 1px solid #E5E7EB; justify-content: flex-end; }
.ah-btn { font-size: 13px; font-weight: 600; padding: 9px 18px; border-radius: 8px; border: none; cursor: pointer; }
.ah-btn.primary { background: #7C3AED; color: #fff; } .ah-btn.primary:hover { background: #5B21B6; }
.ah-btn.primary:disabled { opacity: 0.5; cursor: wait; }
.ah-btn.ghost { background: #F3F4F6; color: #374151; }

@media (prefers-reduced-motion: reduce) {
  .ah-bar *, .ah-dd, .ah-arrow { transition: none !important; }
}
