/* Page layout for Q Systems (card C39): the sign-in panel, the frame every
   signed-in page shares under the top bar, and the JD library's filters and
   table. The components' own looks live in css/components/; this file only
   places them. Values come only from tokens.css. Laid out for a 13-inch
   laptop: no sideways scroll from 1024 wide, and pages fill the window up
   to 1680 (PRODUCT.md, Layout). */

/* The sign-in page (public/systems/auth/login.html) */
.q-login {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: var(--space-8) var(--gutter-page);
}

.q-login__panel {
  display: grid;
  gap: var(--space-5);
  width: 100%;
  max-width: var(--width-form);
  padding: var(--space-8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--surface-card);
  box-shadow: var(--shadow-sm);
}

.q-login__logo {
  display: block;
  width: auto;
  height: 34px;
}

.q-login__form,
.q-login__notice {
  display: grid;
  gap: var(--space-4);
}

.q-login__error {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  background: var(--status-danger-bg);
  color: var(--status-danger-fg);
  font-size: var(--text-body-sm);
}

/* The frame of a signed-in page, under the top bar */
.q-page {
  width: 100%;
  max-width: 1680px;
  margin: 0 auto;
  padding: var(--space-8) var(--gutter-page) var(--space-16);
}

.q-page__head {
  display: grid;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.q-page__lede {
  color: var(--text-muted);
}

/* The JD library's filters and results */
.q-library__filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.q-library__filters > * {
  flex: 0 1 220px;
}

.q-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--surface-card);
}

.q-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-body-md);
}

.q-table th {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
  background: var(--surface-sunken);
  color: var(--text-muted);
  font-size: var(--text-caption);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.02em;
  text-align: left;
  text-transform: uppercase;
}

.q-table td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-body);
}

.q-table tbody tr:last-child td {
  border-bottom: 0;
}

.q-table tbody tr:hover td {
  background: var(--surface-sunken);
}

.q-table td:first-child {
  color: var(--text-heading);
  font-weight: var(--weight-semibold);
}

.q-library__alert {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  background: var(--status-danger-bg);
  color: var(--status-danger-fg);
}

/* The home page's links to Q Systems' own pages (site-nav.js) */
.q-links ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.q-links a {
  font-weight: var(--weight-semibold);
}
