:root {
  --navy: #0a1b2a;
  --navy-deep: #061320;
  --accent: #2b6cb0;
  --accent-hover: #2c5282;
  --text: #1a202c;
  --muted: #718096;
  --card-bg: #ffffff;
  --error-bg: #fff5f5;
  --error-border: #fc8181;
  --error-text: #9b2c2c;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  height: 100%;
}

/* ---------- Login page ---------- */
.login-page {
  min-height: 100vh;
  /* Placeholder anchor background — swap the image URL in static/img/anchor.jpg
     and update the url() below when the real asset is added. */
  background: linear-gradient(rgba(6, 19, 32, 0.72), rgba(6, 19, 32, 0.82)),
              url("../img/anchor.jpg") center / cover no-repeat,
              var(--navy-deep);
}

.login-overlay {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--card-bg);
  border-radius: 12px;
  padding: 2.5rem 2rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.brand { text-align: center; margin-bottom: 1.75rem; }
.brand-mark { font-size: 2.25rem; line-height: 1; }
.brand-name {
  margin: 0.4rem 0 0;
  font-size: 1.9rem;
  letter-spacing: 0.5px;
  color: var(--navy);
}
.brand-tagline {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

form { display: flex; flex-direction: column; }
label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
input {
  padding: 0.7rem 0.8rem;
  margin-bottom: 1.1rem;
  border: 1px solid #cbd5e0;
  border-radius: 8px;
  font-size: 1rem;
}
input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.2);
}
button[type="submit"] {
  padding: 0.75rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease-in-out;
}
button[type="submit"]:hover { background: var(--accent-hover); }

.flash {
  background: var(--error-bg);
  border: 1px solid var(--error-border);
  color: var(--error-text);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
}
.flash p { margin: 0.15rem 0; }

.login-footer {
  margin-top: 1.5rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8rem;
  text-align: center;
}

/* ---------- Home page ---------- */
.home-page { background: #f4f6f9; min-height: 100vh; }

.topbar {
  background: var(--navy);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.topbar-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar-title { font-size: 1.25rem; margin: 0; font-weight: 600; }
.logout-form { display: flex; align-items: center; gap: 0.9rem; }
.topbar-user { color: rgba(255, 255, 255, 0.75); font-size: 0.9rem; }
.logout-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #fff;
  padding: 0.45rem 0.9rem;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s ease-in-out;
}
.logout-btn:hover { background: rgba(255, 255, 255, 0.12); }

.home-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: grid;
  gap: 1.5rem;
}
.panel {
  background: #fff;
  border-radius: 10px;
  padding: 1.5rem 1.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.panel h2 {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  color: var(--navy);
  border-bottom: 2px solid #edf2f7;
  padding-bottom: 0.6rem;
}
.link-list { list-style: none; margin: 0; padding: 0; }
.link-list li { margin: 0.4rem 0; }
.link-list a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.link-list a:hover { text-decoration: underline; }
