/* Page background */
:root {
  --bg: #071d2a;
  --topbar: #1a2c38;
  --text: #e8f0f7;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial, sans-serif;
}

/* Fixed top bar */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 48px;              /* adjust if you want it taller/shorter */
  background: var(--topbar);
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
  z-index: 1000;
}

/* Inner layout: logo left, anything else to the right */
.topbar-inner {
  /* Remove centering */
  max-width: none;
  margin: 0;       /* removes auto-centering */
  padding: 0 16px;
  height: 100%;

  display: flex;
  align-items: center;
  justify-content: space-between;
}


/* Logo on far left */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-logo {
  height: 40px;              /* keeps it nicely sized inside a 64px bar */
  width: auto;
  display: block;
}

/* Right side container (empty for now) */
.topbar-right {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

/* Ensure content isn't hidden behind the fixed top bar */
.page {
  padding-top: 64px;         /* same as .topbar height */
}

/* Demo container */
.container {
  max-width: 1200px;
  margin: 24px auto;
  padding: 0 16px;
}

/* Topbar right link look */
.link-btn {
  background: transparent;
  border: 0;
  color: var(--text);
  font: inherit;
  cursor: pointer;
  padding: 8px 10px;
  opacity: 0.9;
}
.link-btn:hover { opacity: 1; }

/* Modal */
.modal { position: fixed; inset: 0; display: none; z-index: 2000; }
.modal.open { display: block; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.5); }
.modal-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: 10vh auto 0;
  background: #0c2432;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
  padding: 20px;
  border: 1px solid rgba(255,255,255,0.06);
}

.modal-title { margin: 0 0 8px; color: var(--text); }
.modal-close {
  position: absolute; top: 8px; right: 10px; background: transparent; border: 0;
  color: var(--text); font-size: 28px; line-height: 1; cursor: pointer; opacity: .8;
}
.modal-close:hover { opacity: 1; }

.tabs { display: flex; gap: 8px; margin: 8px 0 14px; }
.tab {
  flex: 1; padding: 10px 12px; cursor: pointer; background: #143040; border: 0;
  color: var(--text); border-radius: 10px; opacity: 0.8;
}
.tab.active { opacity: 1; outline: 2px solid rgba(255,255,255,0.12); }

.panel.hidden { display: none; }
.panel label { display: block; margin: 10px 0; color: var(--text); }
.panel input[type="email"],
.panel input[type="password"],
.panel input[type="text"] {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid #25485b;
  background: #0a1e2a; color: var(--text);
}
.checkbox { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; }
.checkbox input { margin-top: 3px; }

.primary-btn {
  width: 100%; padding: 12px; border-radius: 10px; border: 0; cursor: pointer;
  background: #1a2c38; color: var(--text); margin-top: 8px;
}
.primary-btn:hover { filter: brightness(1.1); }

.form-note { min-height: 20px; font-size: 13px; color: #b5d8f7; }

/* Auth trigger container */
.auth-trigger { position: relative; display: inline-flex; align-items: center; }

/* Avatar / initials chip */
.user-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 9999px;
  background: #111; color: #fff; font-weight: 600;
  border: 1px solid rgba(255,255,255,0.12);
  cursor: pointer;
}
.user-badge img {
  width: 100%; height: 100%; border-radius: 9999px; object-fit: cover; display: none;
}
.user-badge.has-photo img { display: block; }
.user-badge.has-photo .initials { display: none; }

/* Dropdown */
.user-menu {
  position: absolute; right: 0; top: calc(100% + 8px);
  min-width: 200px; padding: 8px;
  background: #0c0c0c; border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  z-index: 50;
}
.user-menu.hidden { display: none; }
.user-menu a, .user-menu button {
  width: 100%; text-align: left; padding: 10px 12px; border-radius: 8px;
  color: #eee; background: transparent; border: 0; cursor: pointer;
}
.user-menu a:hover, .user-menu button:hover {
  background: rgba(255,255,255,0.06);
}
.user-menu .muted { color: #aaa; font-size: 12px; padding: 8px 12px; cursor: default; }

