/* ══════════════════════════════════════════
   RESET & BASE
══════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: #f0f4fa;
  color: #1e293b;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }

/* ══════════════════════════════════════════
   NAVBAR
══════════════════════════════════════════ */
.navbar {
  background: linear-gradient(135deg, #0f2447 0%, #163060 100%);
  height: 64px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: 0 2px 20px rgba(15,36,71,0.25);
  padding: 0;
}

.navbar-container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Brand */
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-icon {
  width: 38px;
  height: 38px;
  background: rgba(255,255,255,0.15);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.brand-name {
  font-size: 18px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.3px;
  display: block;
  line-height: 1.2;
}

.brand-tagline {
  font-size: 10px;
  color: rgba(255,255,255,0.5);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: block;
  line-height: 1;
}

/* Nav links list */
.navbar-links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.navbar-links li {
  list-style: none;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  color: rgba(255,255,255,0.72);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 9px;
  transition: all 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
  border: 1.5px solid transparent;
}

.nav-link:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
}

.nav-link.active {
  color: #fff;
  background: rgba(255,255,255,0.13);
}

.nav-register-btn {
  color: #fff !important;
  background: rgba(255,255,255,0.12);
  border: 1.5px solid rgba(255,255,255,0.28) !important;
}

.nav-register-btn:hover {
  background: rgba(255,255,255,0.22) !important;
  border-color: rgba(255,255,255,0.45) !important;
}

.nav-logout {
  color: #fca5a5 !important;
}

.nav-logout:hover {
  background: rgba(220,38,38,0.18) !important;
  color: #fff !important;
}

/* Hamburger (mobile) */
.navbar-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 6px;
}

.navbar-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s;
}

/* ══════════════════════════════════════════
   FLASH MESSAGES
══════════════════════════════════════════ */
.messages-container {
  position: fixed;
  top: 72px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 420px;
  width: calc(100% - 40px);
}

.alert {
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  animation: slideInRight 0.35s cubic-bezier(0.34,1.56,0.64,1);
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(60px) scale(0.95); }
  to   { opacity: 1; transform: translateX(0)    scale(1);    }
}

@keyframes fadeOut {
  from { opacity: 1; transform: translateX(0); max-height: 100px; margin-bottom: 0; }
  to   { opacity: 0; transform: translateX(60px); max-height: 0; margin-bottom: -10px; }
}

.alert.hiding {
  animation: fadeOut 0.4s ease forwards;
}

.alert-success {
  background: #f0fdf4;
  border: 1px solid #86efac;
  color: #15803d;
}

.alert-error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}

.alert-warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

.alert-info {
  background: #eff6ff;
  border: 1px solid #93c5fd;
  color: #1e40af;
}

.alert-text {
  flex: 1;
  line-height: 1.5;
}

.alert-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: inherit;
  opacity: 0.5;
  line-height: 1;
  padding: 0;
  flex-shrink: 0;
  transition: opacity 0.15s;
}

.alert-close:hover { opacity: 1; }

/* ══════════════════════════════════════════
   MAIN CONTENT
══════════════════════════════════════════ */
.main-content {
  flex: 1;
}

/* Pages that need padding (not login/full-bleed pages) */
.main-content .page-wrapper {
  padding: 32px 20px;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}


.brand-icon img {
    height: 36px;
    width: auto;
    display: block;
}

.brand-icon img {
    height: 28px;
}


/* ══════════════════════════════════════════
   FOOTER
══════════════════════════════════════════ */
.footer {
  background: #0f2447;
  color: rgba(255,255,255,0.55);
  padding: 22px 32px;
  margin-top: auto;
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
}

.footer-text { font-size: 13px; }

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-size: 13px;
  color: rgba(255,255,255,0.45);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-links a:hover { color: #fff; }

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 768px) {

  .navbar-container { padding: 0 16px; }

  .navbar-toggle { display: flex; }

  .navbar-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0; right: 0;
    background: #0f2447;
    flex-direction: column;
    padding: 12px 16px 20px;
    gap: 4px;
    border-top: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  }

  .navbar-links.open { display: flex; }

  .navbar-links li { width: 100%; }

  .nav-link {
    display: flex;
    width: 100%;
    padding: 11px 16px;
    border-radius: 8px;
  }

  .messages-container {
    top: auto;
    bottom: 20px;
    right: 12px;
    left: 12px;
    max-width: 100%;
    width: auto;
  }

  .main-content { padding: 20px 12px; }

  .footer-container { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; flex-wrap: wrap; gap: 12px; }
}