/* ==== Global layout & typography ==== */

:root {
  --brand: #2563eb;
  --ink: #0f172a;
  --muted: #64748b;
  --card: #f8fafc;
  --border: #e5e7eb;
  --bg-grad: linear-gradient(180deg, #eef2ff, transparent);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial, sans-serif;
  color: var(--ink);
  background: #fff;
}

/* Make images behave on mobile */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Page structure: header + main + footer fill height nicely */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.page-inner {
  flex: 1 0 auto;
}
.site-footer {
  flex-shrink: 0;
}

/* Reuse your existing “wrap” style everywhere */
.wrap,
.auth-wrap,
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Generic cards & buttons so all pages feel consistent */
.card,
.auth-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
}

.btn {
  display: inline-block;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid var(--brand);
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: #1e40af;
  border-color: #1e40af;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.25);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: none;
}

/* Handy utility: full-width buttons on narrow screens */
.btn-full {
  width: 100%;
  text-align: center;
}

/* Tables: make them scroll horizontally on small screens */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
}
.table-wrapper table {
  min-width: 600px; /* so it can scroll instead of squishing */
}

/* Headings & text spacing */
h1 {
  font-size: clamp(24px, 3vw, 34px);
  margin: 0 0 8px;
}
h2 {
  margin: 28px 0 8px;
}
h3 {
  margin: 18px 0 6px;
}
p {
  line-height: 1.6;
}

/* ==== Simple responsive header (for sidebar_menu.html) ==== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #0b1020;
  color: #e5e7eb;
}

.site-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: #e5e7eb;
  text-decoration: none;
}

.site-nav-toggle {
  display: none;
  border: none;
  background: transparent;
  color: #e5e7eb;
  font-size: 24px;
  cursor: pointer;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.site-nav a {
  color: #e5e7eb;
  text-decoration: none;
  font-size: 14px;
}
.site-nav a:hover {
  text-decoration: underline;
}

/* Mobile nav behavior */
@media (max-width: 768px) {
  .site-nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    inset: 56px 0 auto 0;
    background: #020617;
    padding: 10px 16px 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    border-bottom: 1px solid #1e293b;
    display: none; /* hidden by default */
  }

  .site-nav.is-open {
    display: flex;
  }
}

/* ==== Auth pages tuning (login / signup / forgot) ==== */

.auth-hero {
  background: var(--bg-grad);
  padding-top: 80px;
  padding-bottom: 120px;
}

@media (max-width: 600px) {
  .auth-hero {
    padding-top: 60px;
    padding-bottom: 80px;
  }
  .auth-card {
    padding: 16px;
  }
}

/* A little breathing room for content pages on small screens */
@media (max-width: 600px) {
  .wrap {
    padding: 16px 14px 32px;
  }

  .auth-wrap {
    padding: 0 14px;
  }

  .btn {
    width: 100%;
    text-align: center;
  }
}

/* Desktop vs mobile homepage hero */
.home-desktop {
  display: block;
}
.home-mobile {
  display: none;
}

@media (max-width: 640px) {
  .home-desktop {
    display: none;
  }
  .home-mobile {
    display: block;
  }
}