/* Global Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap');

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--white);
  background: var(--bg);
}

/* =========================
   Base + Variables
========================= */
:root {
  --bg: #0b1623; /* unified dark navy background */
  --white: #ffffff;
  --muted: #d6d6d6;
  --line: rgba(255, 255, 255, 0.35);
}

* {
  box-sizing: border-box;
}

/* =========================
   Background + Overlay
========================= */
.bg-hero {
  background: var(--bg) !important; /* dark navy */
  min-height: 100vh;
  position: relative;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
}

.z2 {
  position: relative;
  z-index: 2;
}

/* =========================
   Navbar
========================= */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
}
.brand {
  font-family: inherit;
  font-weight: 600;
  font-size: 22px;
  color: var(--white);
  text-decoration: none;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 14px;
}
.nav-links a {
  color: var(--white);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 8px;
  border: 2px solid transparent;
}
.nav-links a.outline {
  border-color: var(--white);
  background: transparent;
}
.nav-links a.active {
  border-bottom: 2px solid var(--white);
}

.nav-links a.primary {
  background-color: #ffffff;
  color: #000000;
  font-weight: 600;
}
.nav-links a.primary:hover {
  background-color: #eaeaea;
}

/* =========================
   Account Button + Avatar
========================= */
.account-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 2px solid var(--white);
  border-radius: 8px;
  background: transparent;
  color: var(--white);
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
}
.account-btn:hover {
  background: rgba(255,255,255,0.1);
}

/* Avatar (image or initials) */
.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #ccc;
}
.avatar-fallback {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #666;
  color: #fff;
  font-size: 13px;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Larger avatar (account page, etc.) */
.avatar-large {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--white);
  background: #333;
  display: block;
}
.avatar-large.avatar-fallback {
  font-size: 24px;
}

/* =========================
   Dropdown
========================= */
.dropdown {
  position: relative;
}
.dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background-color: #111;
  min-width: 180px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  z-index: 1000;
}
.dropdown-content a {
  color: var(--white);
  padding: 10px 14px;
  text-decoration: none;
  display: block;
}
.dropdown-content a:hover {
  background-color: rgba(255,255,255,0.1);
}
.dropdown-content.show {
  display: block;
}

/* =========================
   Hero
========================= */
.hero {
  max-width: 800px;
  margin: 14vh auto 10vh;
  text-align: center;
  padding: 0 16px;
}
.main-title {
  font-family: inherit;
  font-size: 64px;
  font-weight: 600;
  margin: 0 0 8px;
  text-transform: lowercase;
}
.tag {
  font-size: 20px;
  margin: 0 0 8px;
}
.sub {
  color: var(--muted);
  margin: 0 0 24px;
}
.cta-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn {
  border: 2px solid var(--white);
  background: var(--white);
  color: #000;
  padding: 12px 18px;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 600;
}
.btn:hover { opacity: .9; }
.btn.ghost { background: transparent; color: var(--white); }
.btn.outline { background: transparent; color: var(--white); }

/* =========================
   Content
========================= */
.content {
  max-width: 980px;
  margin: 10vh auto;
  padding: 0 16px;
}
.page-title {
  font-family: inherit;
  font-size: 36px;
  margin: 0 0 20px;
}

/* =========================
   Cards
========================= */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.card {
  background: rgba(0,0,0,.35);
  backdrop-filter: saturate(120%) blur(2px);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
}
.card h3 { margin: 0 0 8px; }
.meta {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 8px;
}
.row {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

/* =========================
   Forms
========================= */
.field { margin-bottom: 14px; }
.field.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 14px;
}
input {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 2px solid var(--white);
  background: transparent;
  color: var(--white);
}
input::placeholder { color: #eee; }

/* =========================
   Modals
========================= */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.55);
  z-index: 9999;
}
.modal.hidden { display: none; }
.modal-card {
  background: rgba(10, 20, 40, 0.95);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  color: var(--white);
}
.modal-card input {
  background: rgba(255,255,255,0.05);
  border: 2px solid var(--white);
  color: var(--white);
}
.modal-card input::placeholder { color: #aaa; }

/* =========================
   Helpers
========================= */
.hidden { display: none; }
.notif-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: red;
  border-radius: 50%;
  margin-left: 6px;
}

/* ✅ Confirmation Modal Refined */
#confirmationModal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

#confirmationModal .modal-card {
  background: #0a0e2a; /* Dark navy background */
  border: 1px solid #1f2238;
  border-radius: 12px;
  padding: 32px 24px;
  width: 90%;
  max-width: 420px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  text-align: center;
  transition: all 0.3s ease;
}

#confirmationModal h3 {
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 16px;
}

#confirmationModal .muted,
#confirmationModal .modal-message {
  color: #cccccc;
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 24px;
}

#confirmationModal .btn {
  background-color: #0070f3; /* Professional blue button */
  border: none;
  color: #ffffff;
  font-weight: 500;
  border-radius: 8px;
  padding: 10px 16px;
  cursor: pointer;
  width: 100%;
  transition: background 0.25s ease;
}

#confirmationModal .btn:hover {
  background-color: #005ed1;
}

.modal.hidden {
  display: none !important;
}

/* === Footer === */
.site-footer {
  margin-top: 60px;
  padding: 20px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  border-top: 1px solid var(--line);
  background: var(--bg);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-fallback {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #444;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
}

.badge {
  background: #ff4757;
  color: white;
  font-size: 12px;
  border-radius: 50%;
  padding: 2px 6px;
  margin-left: 4px;
}
#notifList {
  max-height: 300px;
  overflow-y: auto;
}
#notifList p {
  margin: 0;
  padding: 8px;
  font-size: 14px;
}

/* =========================
   Spinner
========================= */
.spinner-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: var(--muted);
  font-size: 14px;
}

.spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #3498db;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 10px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}