/* Common styles shared across all pages */

html {
  /* scrollbar-gutter: stable; */
  /* overflow-y: scroll; */
  width: 100vw; /* layout shift with scrollbar */
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu,
    Cantarell, sans-serif;
  background: #f7fafc;
  min-height: 100vh;
  color: #4a5568;
}

/* Header */
.header {
  background: #fff;
  border-bottom: 1px solid #d9d9d9;
  padding: 0 max(20px, calc((100% - 1400px) / 2 + 20px));
  display: flex;
  align-items: center;
  gap: 20px;
  justify-content: space-between;
  color: #262c30;
}

.header a {
  color: #444f55;
  font-weight: 400;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo:focus-visible {
  outline: 2px solid #ff6900;
  border-radius: 4px;
}

.divider {
  border-left: 2px solid #d9d9d9;
  height: 40px;
  margin-right: 20px;
}

.logo img {
  height: 40px;
  margin-top: 12px;
  margin-bottom: 12px;
  margin-right: 20px;
}

/* Navigation */
.main-nav {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.main-nav a {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 0px 24px;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;

  text-decoration: none;
  height: 40px;
  min-height: 40px;
  left: 16px;
  top: 160px;
}

.main-nav a:hover {
  background: #d8dadb;
  border-radius: 8px;
}

.main-nav a:focus-visible {
  outline: 2px solid #ff6900;
  outline-offset: 2px;
  border-radius: 4px;
}

.main-nav a[aria-current='page'] {
  color: #fff;
  font-weight: 600;
  border-radius: 8px;
  background-color: #252b2e;
}

.main-nav a[aria-current='page']:hover {
  background: #343c41;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 20px;
  background: #ff6900;
  color: #ffffff;
  text-decoration: none;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn:hover {
  background: #e65c00;
}

.btn-secondary {
  background: #f7fafc;
  color: #4a5568;
  border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
  background: #edf2f7;
  border-color: #cbd5e0;
}

/* Cards */
.card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 24px;
}

/* Form elements */
input[type='file'],
input[type='date'],
input[type='text'] {
  padding: 10px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.95rem;
  color: #4a5568;
  background: #ffffff;
  transition: border-color 0.2s ease;
}

input[type='file']:focus,
input[type='date']:focus,
input[type='text']:focus {
  outline: none;
  border-color: #ff6900;
}

/* Section headers */
.section-header {
  color: #2d3748;
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #ff6900;
}

/* Loading states */
.loading {
  text-align: center;
  padding: 40px;
  color: #a0aec0;
  font-style: italic;
}

/* Utility classes */
.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;
}

/* Nav toggle (hamburger) button — hidden on desktop */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  gap: 5px;
  border-radius: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

.nav-toggle:hover {
  background: #d8dadb;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #262c30;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.nav-toggle[aria-expanded='true'] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded='true'] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded='true'] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Responsive */
@media (max-width: 960px) {
  .header {
    padding: 16px 20px;
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: flex;
  }

  .main-nav {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    gap: 4px;
    padding-bottom: 12px;
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav a {
    width: 100%;
    justify-content: flex-start;
    padding: 12px 16px;
    font-size: 0.9rem;
  }
}
