/*
 * Application-wide styles. Plain CSS, no preprocessor.
 */

:root {
  --color-fg: #111;
  --color-muted: #666;
  --color-link: #0a4d8c;
  --color-border: #ddd;
  --color-bg-alt: #f7f7f8;
  --max-width: 1100px;
}

* { box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  color: var(--color-fg);
  line-height: 1.5;
  margin: 0;
  padding: 2rem 1.5rem;
  background: #fff;
}

main, .page-header, .tenders-table, .pagination, .empty-state, .landing, .message {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}

a { color: var(--color-link); }
a:hover { text-decoration: underline; }

.page-header h1 {
  margin: 0 0 0.25rem;
  font-size: 1.75rem;
}

.page-subtitle {
  margin: 0 0 2rem;
  color: var(--color-muted);
}

.tenders-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.tenders-table th,
.tenders-table td {
  text-align: left;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}

.tenders-table th {
  background: var(--color-bg-alt);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-muted);
}

.tenders-table td.numeric,
.tenders-table th.numeric {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.tender-title {
  font-weight: 500;
  text-decoration: none;
}

.tender-title:hover { text-decoration: underline; }

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.5rem;
  padding: 0.5rem 0;
}

.pagination-link {
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
}

.pagination-link.disabled {
  color: var(--color-muted);
  border-color: var(--color-border);
  background: var(--color-bg-alt);
  cursor: default;
}

.pagination-info { color: var(--color-muted); font-size: 0.9rem; }

.empty-state {
  padding: 2rem;
  background: var(--color-bg-alt);
  border-radius: 6px;
  color: var(--color-muted);
}

code {
  background: var(--color-bg-alt);
  padding: 0.1em 0.4em;
  border-radius: 3px;
  font-size: 0.9em;
}

.landing {
  max-width: 560px;
  padding: 2rem 0;
}

.landing-headline {
  font-size: 2rem;
  line-height: 1.15;
  margin: 0 0 1rem;
}

.landing-subhead {
  font-size: 1.1rem;
  color: var(--color-muted);
  margin: 0 0 2.5rem;
}

.landing-footnote {
  font-size: 0.85rem;
  color: var(--color-muted);
  margin-top: 2rem;
}

.signup-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-row {
  display: flex;
  flex-direction: column;
}

.form-label {
  font-weight: 500;
  margin-bottom: 0.35rem;
}

.form-input {
  font: inherit;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
}

.form-input:focus {
  outline: 2px solid var(--color-link);
  outline-offset: 1px;
  border-color: var(--color-link);
}

.form-hint {
  font-size: 0.85rem;
  color: var(--color-muted);
  margin: 0.35rem 0 0;
}

.form-submit {
  font: inherit;
  font-weight: 500;
  background: var(--color-link);
  color: #fff;
  border: 0;
  padding: 0.7rem 1.25rem;
  border-radius: 4px;
  cursor: pointer;
  align-self: flex-start;
}

.form-submit:hover { filter: brightness(1.1); }

.form-errors {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 0.75rem 1rem;
  border-radius: 4px;
}

.form-errors p { margin: 0.15rem 0; }

.message {
  max-width: 560px;
  padding: 3rem 0;
}

.message h1 {
  font-size: 1.6rem;
  margin: 0 0 0.75rem;
}

.message-hint {
  color: var(--color-muted);
  font-size: 0.95rem;
  margin-top: 1.5rem;
}
