/* ═════════════════════════════════════════════════════════════════════════
   app-core.css — Shared styles for all FiveNines pages
   Login overlay · User chip · Page navigation
   Loaded alongside each page's own <style> block.
   ═════════════════════════════════════════════════════════════════════════ */

/* ── LOGIN OVERLAY ─────────────────────────────────────────────────────── */
#login-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: linear-gradient(135deg, #0a1628 0%, #152b54 100%);
  align-items: center;
  justify-content: center;
}
.login-card {
  background: #fff;
  border-radius: 16px;
  padding: 44px 40px;
  width: min(400px, 92vw);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
}
.login-logo  { text-align: center; margin-bottom: 24px; }
.login-title { font-size: 20px; font-weight: 700; color: #0f172a; text-align: center; margin-bottom: 4px; }
.login-sub   { font-size: 13px; color: #94a3b8; text-align: center; margin-bottom: 26px; }
.login-label { font-size: 12px; font-weight: 600; color: #374151; display: block; margin-bottom: 5px; }
.login-input {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  margin-bottom: 14px;
  box-sizing: border-box;
  transition: border-color 0.15s;
}
.login-input:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15); }
.login-error   { color: #dc2626; font-size: 12px; min-height: 16px; text-align: center; margin-bottom: 10px; }
.login-success { color: #059669; font-size: 12px; min-height: 16px; text-align: center; margin-bottom: 10px; }
.login-btn {
  width: 100%;
  padding: 12px;
  background: #1d4ed8;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.login-btn:hover    { background: #2563eb; }
.login-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.login-link {
  display: block;
  text-align: center;
  margin-top: 12px;
  font-size: 12px;
  color: #3b82f6;
  cursor: pointer;
  text-decoration: none;
  background: none;
  border: none;
  width: 100%;
  font-family: inherit;
}
.login-link:hover { color: #1d4ed8; text-decoration: underline; }

/* ── USER CHIP (in header) ─────────────────────────────────────────────── */
.user-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px 4px 5px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: background 0.15s;
}
.user-chip:hover { background: rgba(255, 255, 255, 0.15); }
.user-avatar-sm {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}
.user-chip-name { font-size: 12px; font-weight: 600; color: rgba(255, 255, 255, 0.8); }

/* ── PAGE NAV (top strip with the 5 section links) ─────────────────────── */
.page-nav {
  background: #0f2040;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  padding: 0 32px;
  display: flex;
  align-items: stretch;
  gap: 0;
  position: sticky;
  top: 64px;
  z-index: 99;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}
.page-nav a {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 18px;
  height: 42px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  white-space: nowrap;
}
.page-nav a:hover   { color: rgba(255, 255, 255, 0.85); background: rgba(255, 255, 255, 0.04); }
.page-nav a.active  { color: #fff; border-bottom-color: #3b82f6; background: rgba(59, 130, 246, 0.07); }

/* ── USER MENU (dropdown opened from user-chip) ────────────────────────── */
.fn-user-menu {
  position: fixed;
  min-width: 180px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
  padding: 6px;
  z-index: 1500;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: inherit;
}
.fn-user-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: none;
  border: none;
  border-radius: 7px;
  text-align: left;
  font-size: 13px;
  font-weight: 500;
  color: #1f2937;
  cursor: pointer;
  font-family: inherit;
  width: 100%;
}
.fn-user-menu-item:hover { background: #f1f5f9; }
.fn-user-menu-icon {
  width: 18px; height: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px;
  color: #475569;
}

/* ── EDIT NAME MODAL ───────────────────────────────────────────────────── */
.fn-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}
.fn-modal {
  background: #fff;
  border-radius: 14px;
  padding: 28px 26px 22px;
  width: min(400px, 92vw);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
  font-family: inherit;
}
.fn-modal-title { font-size: 18px; font-weight: 700; color: #0f172a; margin-bottom: 4px; }
.fn-modal-sub   { font-size: 12px; color: #64748b; margin-bottom: 18px; }
.fn-modal-label { font-size: 12px; font-weight: 600; color: #374151; display: block; margin-bottom: 5px; }
.fn-modal-input {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
  font-family: inherit;
}
.fn-modal-input:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15); }
.fn-modal-error { color: #dc2626; font-size: 12px; min-height: 16px; margin-top: 6px; }
.fn-modal-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}
.fn-modal-btn {
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s;
}
.fn-modal-btn-ghost   { background: #fff;    color: #475569; border-color: #d1d5db; }
.fn-modal-btn-ghost:hover   { background: #f1f5f9; }
.fn-modal-btn-primary { background: #1d4ed8; color: #fff; }
.fn-modal-btn-primary:hover { background: #1e40af; }
.fn-modal-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ── MOBILE TWEAKS ─────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .page-nav     { padding: 0 16px; }
  .page-nav a   { padding: 0 12px; }
  .user-chip-name { display: none; }
}
