/*
 * Layoff ICU - Simple CSS
 * No frameworks, just clean styles
 */

/* Reset and base */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  margin: 0;
  padding: 0;
  background: #f9fafb;
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Typography */
h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: #111;
}

.site-title {
  color: inherit;
  text-decoration: none;
}

.site-title:hover {
  opacity: 0.8;
}

.subtitle {
  font-size: 1.1rem;
  color: #666;
  margin-bottom: 1rem;
}

.description {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.7;
  margin-bottom: 1rem;
  max-width: 800px;
}

.note {
  font-size: 0.9rem;
  color: #888;
  margin-bottom: 1.5rem;
}

/* Toolbar */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 1rem;
}

.toolbar .pagy-nav {
  margin: 0;
}

/* Forms */
select, input[type="text"] {
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background: #fff;
  color: #374151;
  height: 36px;
}

select {
  appearance: none;
  padding-right: 2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  cursor: pointer;
}

select:focus, input[type="text"]:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

input[type="text"] {
  width: 250px;
}

.year-form {
  margin-left: auto;
}

.search-form {
  display: flex;
  gap: 0.5rem;
}

button[type="submit"] {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #fff;
  background: #3b82f6;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

button[type="submit"]:hover {
  background: #2563eb;
}

/* Table */
table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

thead {
  background: #f3f4f6;
}

th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #374151;
  border-bottom: 1px solid #e5e7eb;
}

th a {
  color: inherit;
  text-decoration: none;
}

th a:hover {
  color: #3b82f6;
}

.sort-icon {
  display: inline-block;
  margin-left: 0.25rem;
  font-size: 0.7rem;
  color: #9ca3af;
}

td {
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  border-bottom: 1px solid #e5e7eb;
  color: #374151;
}

tbody tr:hover {
  background: #f9fafb;
}

tbody tr:last-child td {
  border-bottom: none;
}

/* Pagination (Pagy) */
.pagy-nav {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.pagy-nav .page {
  font-size: 0.85rem;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  color: #374151;
  background: #fff;
}

.pagy-nav .page a {
  display: block;
  padding: 0.4rem 0.6rem;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.pagy-nav .page:hover {
  background: #f3f4f6;
}

.pagy-nav .page.active,
.pagy-nav .page.disabled {
  padding: 0.4rem 0.6rem;
}

.pagy-nav .page.active {
  background: #3b82f6;
  color: #fff;
  border-color: #3b82f6;
}

.pagy-nav .page.disabled {
  color: #9ca3af;
  border-color: #e5e7eb;
}

.pagy-nav .page.disabled:hover {
  background: #fff;
}

.pagy-nav .page.gap {
  border: none;
  background: transparent;
  padding: 0.4rem 0.25rem !important;
}

.pagy-nav .page.gap:hover {
  background: transparent;
}

/* Bottom pagination */
.pagination {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {
  h1 {
    font-size: 1.75rem;
  }

  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .pagy-nav {
    justify-content: center;
  }

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

  input[type="text"] {
    width: 100%;
  }

  table {
    font-size: 0.8rem;
  }

  th, td {
    padding: 0.5rem;
  }
}
