/* ==========================
   GLOBAL RESET & LAYOUT
   ========================== */
* {
  box-sizing: border-box;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f5f7fa;
  color: #222;
  line-height: 1.5;
}

/* ==========================
   HEADER & FOOTER
   ========================== */
header, footer {
  background-color: #1a3d7c;
  color: white;
  text-align: center;
  padding: 12px 10px;
}

header h1, footer p {
  margin: 0;
  font-weight: normal;
}

.site-header .container {
  max-width: 1200px;
  margin: 0 auto;
}

.season-info {
  margin-top: 8px;
  font-size: 0.9rem;
}

.season-label {
  color: #fff;
}

a.change-season {
  color: #ffeb3b;
  font-weight: 600;
  margin-left: 5px;
  text-decoration: none;
}

a.change-season:hover {
  color: #fff176;
  text-decoration: underline;
}

footer {
  margin-top: 40px;
}

.footer-links {
  margin-bottom: 10px;
}

footer a {
  color: white;
  margin: 0 8px;
  font-weight: 500;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

.copyright {
  font-size: 0.9rem;
  margin-top: 8px;
}

/* ==========================
   MAIN CONTENT AREAS
   ========================== */
main {
  min-height: 60vh;
}

.page-section {
  padding: 20px;
  max-width: 900px;
  margin: 0 auto;
}

.page-section.centered {
  text-align: center;
}

.page-section.narrow {
  max-width: 600px;
}

.page-section.wide {
  max-width: 1100px;
}

/* ==========================
   TYPOGRAPHY & TEXT HELPERS
   ========================== */
.section-title {
  text-align: center;
  font-size: 1.5rem;
  margin: 0 0 20px 0;
  color: #1a3d7c;
  font-weight: 600;
}

.highlight {
  color: #1a3d7c;
  font-weight: bold;
}

.muted {
  color: #666;
  font-size: 0.95rem;
}

.note {
  font-style: italic;
  color: #555;
  font-size: 0.9rem;
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}

/* ==========================
   LINKS
   ========================== */
a {
  color: #1a3d7c;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ==========================
   BUTTONS - ALL STYLES
   ========================== */
button,
.btn-submit,
.btn-cancel,
.btn-delete,
.btn-green,
.btn-logout,
.btn-action {
  border: none;
  border-radius: 5px;
  padding: 10px 18px;
  font-size: 1rem;
  cursor: pointer;
  display: inline-block;
  text-align: center;
  text-decoration: none;
  color: white;
  transition: background-color 0.2s ease-in-out;
  font-family: inherit;
  min-width: 200px;
  margin: 8px 4px;
}

/* Button color variants */
.btn-submit { 
  background-color: #0078d7; 
}
.btn-submit:hover { 
  background-color: #005fa3; 
}

.btn-cancel { 
  background-color: #c0392b; 
}
.btn-cancel:hover { 
  background-color: #992d22; 
}

.btn-delete { 
  background-color: #6f797f; 
}
.btn-delete:hover { 
  background-color: #527385; 
}

.btn-green { 
  background-color: #28a745; 
}
.btn-green:hover { 
  background-color: #1e7e34; 
}

.btn-logout {
  background-color: #c0392b;
}
.btn-logout:hover {
  background-color: #992d22;
}

/* Button size variants */
.btn-compact {
  padding: 6px 12px;
  min-width: auto;
  font-size: 0.95rem;
}

/* Disabled button state */
.btn-disabled {
  background-color: #ccc;
  color: #666;
  cursor: not-allowed;
  opacity: 0.6;
}

.btn-disabled:hover {
  background-color: #ccc;
  text-decoration: none;
}

/* ==========================
   FORMS - GENERAL
   ========================== */
form {
  margin-top: 15px;
}

.form-group {
  width: 100%;
  max-width: 400px;
  margin: 0 auto 15px auto;
  display: flex;
  flex-direction: column;
  text-align: left;
}

.form-group.short {
  max-width: 250px;
}

label {
  margin-bottom: 4px;
  font-weight: bold;
  color: #333;
  font-size: 0.95rem;
}

input[type="text"],
input[type="number"],
input[type="password"],
input[type="email"],
input[type="date"],
select,
.form-input,
.form-select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
}

input[type="number"] {
  max-width: 120px;
}

select {
  cursor: pointer;
}

input:focus,
select:focus {
  outline: 2px solid #0078d7;
  outline-offset: 2px;
}

.form-note {
  font-size: 0.9rem;
  color: #666;
  font-style: italic;
  max-width: 400px;
  margin: 0 auto 15px auto;
}

.form-actions {
  text-align: center;
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

/* ==========================
   FORM LAYOUTS
   ========================== */
/* Vertical stacked form (default for add/edit) */
.info-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

/* Inline horizontal form (for filters) */
.filter-form {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 20px auto;
}

.filter-form label {
  margin-bottom: 0;
}

.filter-form select,
.filter-form input {
  min-width: 200px;
}

/* Summary display (for delete confirmations) */
.form-summary {
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 15px;
  max-width: 400px;
  margin: 20px auto;
  text-align: left;
}

.form-summary p {
  margin: 8px 0;
}

/* ==========================
   TABLES
   ========================== */
.table-wrap {
  overflow-x: auto;
  margin-top: 20px;
  border-radius: 4px;
}

table,
.table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 auto;
  background: white;
  border-radius: 4px;
  overflow: hidden;
}

th, td {
  padding: 10px 12px;
  border: 1px solid #ddd;
  font-size: 0.95rem;
}

th {
  background-color: #1a3d7c;
  color: white;
  font-weight: 600;
  text-align: left;
}

/* Table alignment classes */
td.left, th.left { 
  text-align: left; 
}

td.cent, th.cent { 
  text-align: center; 
}

td.right, th.right { 
  text-align: right; 
}

td.bold {
  font-weight: bold;
}

/* Striped rows */
tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}

tbody tr:hover {
  background-color: #f0f4f8;
}

/* Special table rows */
tr.spacer td {
  padding: 8px 0;
  border: none;
  background: transparent;
}

th.group-heading {
  background-color: #2b5a9e;
  font-weight: bold;
  text-align: left;
}

/* ==========================
   MESSAGES & ALERTS
   ========================== */
.message-success,
.message-error,
.message-warning {
  max-width: 600px;
  margin: 20px auto;
  padding: 15px 20px;
  border-radius: 5px;
  text-align: center;
  font-weight: 500;
  font-size: 1rem;
}

.message-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.message-error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.message-warning {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.message-icon {
  margin-right: 6px;
}

/* ==========================
   MENU CONTAINERS
   ========================== */
.menu-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 30px auto;
  max-width: 320px;
}

.menu-container a,
.menu-container button {
  display: block;
  width: 100%;
  background-color: #0078d7;
  color: #fff;
  text-decoration: none;
  font-size: 1.05rem;
  padding: 14px 20px;
  border-radius: 5px;
  text-align: center;
  transition: background-color 0.2s ease-in-out;
  border: none;
  cursor: pointer;
  font-weight: 500;
}

.menu-container a:hover,
.menu-container button:hover {
  background-color: #005fa3;
  text-decoration: none;
}

/* Red logout/cancel buttons in menus */
.menu-container .btn-logout,
.menu-container a.btn-logout {
  background-color: #c0392b;
}

.menu-container .btn-logout:hover,
.menu-container a.btn-logout:hover {
  background-color: #992d22;
}

/* ==========================
   MOBILE RESPONSIVENESS
   ========================== */
@media (max-width: 700px) {
  .page-section {
    padding: 15px;
  }

  th, td {
    font-size: 0.85rem;
    padding: 8px;
  }

  .section-title {
    font-size: 1.3rem;
  }
}

@media (max-width: 600px) {
  .page-section {
    padding: 12px;
  }

  .form-group {
    max-width: 100%;
  }

  .filter-form {
    flex-direction: column;
  }

  .filter-form select,
  .filter-form input {
    min-width: 100%;
    max-width: 100%;
  }

  button,
  .btn-submit,
  .btn-cancel,
  .btn-green,
  .btn-delete {
    width: 100%;
    margin: 5px 0;
  }

  .menu-container {
    max-width: 280px;
    gap: 10px;
  }

  .form-actions {
    flex-direction: column;
    width: 100%;
  }

  .form-actions button,
  .form-actions a {
    width: 100%;
  }
}