/* Reset and base styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  font-family: sans-serif;
  background: #f0f4f8;
}

/* Flexbox centering for login page */
body {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0;
}

/* Shared container styles */
.container, .login-container {
  max-width: 700px;
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  margin: auto;
  width: 100%;
}

/* Login container narrower width */
.login-container {
  width: 300px;
}

/* Input fields */
input {
  width: 100%;
  padding: 0.5rem;
  margin: 0.5rem 0;
}

/* General button styling */
button {
  background: #007acc;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-radius: 4px;
  width: 100%;
  font-size: 1rem;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #005fa3;
}

/* Navigation container */
nav {
  display: flex;
  justify-content: center;  /* center links by default */
  gap: 1rem;
  margin: 1rem 0;
}

/* Right align nav links when body has right-nav class */
body.right-nav nav {
  justify-content: flex-end;
}

/* Nav links styled as buttons */
nav a {
  display: inline-block;
  background: #007acc;
  color: white;
  border-radius: 4px;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

nav a:hover {
  background-color: #005fa3;
}

/* Logout link variant */
nav a.logout-link {
  background-color: #dc3545;
}

nav a.logout-link:hover {
  background-color: #b52a36;
}

/* Scorecard table */
table {
  border-collapse: collapse;
  width: 100%;
  margin-top: 1rem;
}

th, td {
  border: 1px solid #ccc;
  padding: 0.5rem 1rem;
  text-align: center;
}

/* Default blue header */
th {
  background-color: #007acc;
  color: white;
}

/* Red header for the top table only */
table.red-header th {
  background-color: #c62828; /* deep red */
  color: white;
}

/* Weekly total row */
.week-total {
  background-color: #eef6fb;
  font-weight: bold;
}

/* Updated weekly total for red-header table */
table.red-header .week-total {
  background-color: #f9d6d5; /* light red/pink */
}

/* Section headings */
h1 {
  margin-bottom: 1rem;
}

h2 {
  margin-top: 2rem;
  font-size: 1.25rem;
  color: #333;
}

/* Remove bottom margin on nav inside .page-welcome */
.page-welcome nav {
  margin-bottom: 0;
  margin-top: 1rem; /* Keep top margin */
}
