/* The one look every page shares, agreed by the owner on 16 Nov 2026 (#123).
   Every staff, client and sign-in page loads this file after its own styles.

   Agreed here: the page background and text colours, the Inter typeface, the page
   title, boxes, form boxes and the gaps around a staff page's content.
   Not agreed yet, so not set here: buttons, whose colours tell staff what a button
   does, and the top row of each table.

   ":root" in front of a rule makes it outrank one Tailwind class, such as the
   bg-gray-100 or rounded a page puts on the same element. */

:root {
  --page-background: #f3f4f6;
  --text: #1f2937;
  --quiet-text: #6b7280;
  --box-line: #e5e7eb;
  --form-box-line: #d1d5db;
}

/* One background, one text colour and Inter on every page. */
:root body {
  background-color: var(--page-background);
  color: var(--text);
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
}

:root body .font-sans,
:root body button,
:root body input,
:root body select,
:root body textarea {
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
}

/* The page title: plain dark text, with an optional grey line under it. */
/* Some pages colour every <header> blue; the page title stays plain on those too. */
:root .page-title {
  margin: 0 0 24px;
  padding: 0;
  background: none;
  border: 0;
  text-align: left;
}

:root .page-title h1 {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
  margin: 0;
}

:root .page-title p {
  font-size: 14px;
  line-height: 1.5;
  color: var(--quiet-text);
  margin: 4px 0 0;
}

/* The column beside the staff menu. The menu is 64px wide; the content keeps an
   even gap on each side, as on the Pending review page. */
:root .page-area {
  margin-left: 64px;
  padding: 32px calc(20px + 4vw) 48px;
}

/* A box: a card or panel. */
:root .box {
  background-color: #fff;
  border: 1px solid var(--box-line);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

/* A form box: a one-line text box or a drop-down. */
:root input.form-box,
:root select.form-box {
  height: 38px;
  font-size: 14px;
  line-height: 1.5;
  padding: 0 12px;
  color: var(--text);
  background-color: #fff;
  border: 1px solid var(--form-box-line);
  border-radius: 6px;
}

/* A drop-down has one small grey arrow on the right, and room for it. */
:root select.form-box {
  padding-right: 36px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%239ca3af' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
}

/* A box for several lines of text: the same edges and text, its own height. */
:root textarea.form-box {
  font-size: 14px;
  line-height: 1.5;
  padding: 8px 12px;
  color: var(--text);
  background-color: #fff;
  border: 1px solid var(--form-box-line);
  border-radius: 6px;
}

/* A form box that cannot be changed is pale grey, so it reads as locked. */
:root .form-box:disabled,
:root .form-box[readonly] {
  background-color: #f9fafb;
  color: var(--quiet-text);
}

/* A form box with a wrong answer keeps its red edge. */
:root .form-box.border-red-500 {
  border-color: #ef4444;
}

:root .form-box:focus {
  border-color: #93c5fd;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Buttons, agreed by the owner on 16 Nov 2026 (#123). The colour says what the
   button does:
   - button-main: the page's main action, solid blue.
   - button-danger: deleting, or anything else that cannot be undone, solid red.
   - button-quiet: every other button, white with a grey outline.
   Add button-small for a button inside a table row.
   These rules outrank a Tailwind class on the same button, so a page cannot drift
   from them by accident. A layout class such as w-full still works, because
   these rules set no width, height or display. */
:root .button-main,
:root .button-danger,
:root .button-quiet {
  /* No display rule here: a page hides a button with Tailwind's hidden class. */
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: none;
  transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

:root .button-main {
  background-color: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

:root .button-main:hover {
  background-color: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff;
}

:root .button-danger {
  background-color: #dc2626;
  border-color: #dc2626;
  color: #fff;
}

:root .button-danger:hover {
  background-color: #b91c1c;
  border-color: #b91c1c;
  color: #fff;
}

:root .button-quiet {
  background-color: #fff;
  border-color: #d1d5db;
  color: #1f2937;
}

:root .button-quiet:hover {
  background-color: #f9fafb;
  border-color: #9ca3af;
  color: #1f2937;
}

:root .button-main:focus-visible,
:root .button-danger:focus-visible,
:root .button-quiet:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 1px;
}

:root .button-main:disabled,
:root .button-danger:disabled,
:root .button-quiet:disabled,
:root .button-main.cursor-not-allowed,
:root .button-danger.cursor-not-allowed,
:root .button-quiet.cursor-not-allowed {
  opacity: 0.6;
  cursor: not-allowed;
}

:root .button-small {
  font-size: 13px;
  padding: 4px 10px;
}

/* One agreed exception: on a concierge grant card, the Email button turns green
   and says Staged once the grant is in the email, so staff see it is done. */
:root .button-main.bg-green-600 {
  background-color: #16a34a;
  border-color: #16a34a;
}

:root .button-main.bg-green-600:hover {
  background-color: #22c55e;
  border-color: #22c55e;
}

/* A table of records, agreed by the owner on 16 Nov 2026 (#123). Add data-table to
   the <table>. The top row names the columns in small grey words on a pale band,
   without capitals; each row below has a thin line under it. */
:root .data-table {
  border-collapse: collapse;
  font-size: 14px;
  color: var(--text);
}

:root .data-table th {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--quiet-text);
  text-align: left;
  text-transform: none;
  letter-spacing: normal;
  background-color: #f9fafb;
  padding: 10px 14px;
  border: 0;
  border-bottom: 1px solid var(--box-line);
}

:root .data-table td {
  font-size: 14px;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid var(--box-line);
}

/* The last row sits on the box's own edge, so it needs no line of its own. */
:root .box .data-table tbody tr:last-child td {
  border-bottom: 0;
}
