/* Admin: the /admin area (layouts/admin), as the A-Admin boards draw it.
   It reuses the club app's shell from layout.css (sidebar, content, the
   phone drawer). These rules give the menu the boards' look (the logo with
   the SERVIÇO tag, two groups, the way back at the bottom), drop the top bar
   on a laptop, make it the navy bar with "Menu" on a phone, and give
   Sightline and Mission Control the app's colours and type. */

.adm-brand { display: flex; align-items: center; gap: var(--space-2); padding: 0 6px; }
.adm-brand .brand { font-size: 22px; }
.adm-tag { margin-left: var(--space-1); padding: 3px var(--space-2); border-radius: 999px; background: var(--yellow); color: var(--navy-deep); font-size: .6875rem; font-weight: 700; line-height: 1.2; text-transform: uppercase; white-space: nowrap; }

.admin-app .sidebar { gap: 18px; width: 232px; padding: 20px 14px 0; }
.admin-app .sidebar nav { gap: 2px; }
.admin-app .sidebar nav .nav-label { margin: 0; padding: 14px 12px 4px; color: var(--faint); font-size: .6875rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.admin-app .sidebar nav .nav-label:first-child { padding-top: 4px; }
.admin-app .sidebar nav a, .adm-leave { display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 0 12px; border-radius: var(--radius); color: var(--on-navy-muted); font-size: var(--text-label); font-weight: 500; }
.admin-app .sidebar nav a svg { width: 18px; height: 18px; }
.admin-app .sidebar nav a.active { background: var(--blue); color: #fff; }
.admin-app .sidebar nav a.active::before { content: none; }
.adm-leave { gap: 6px; }
.adm-leave:hover { background: var(--navy-2); color: var(--on-navy); }
.admin-app .sidebar-bottom { padding-top: 12px; border-top: 1px solid var(--navy-3); }

/* The top bar is the phone's only: on a laptop the menu names the page. */
.adm-topbar { display: none; }
.adm-menu { padding: var(--space-2) 0; border: 0; background: none; color: var(--on-navy-muted); font: inherit; font-size: var(--text-label); font-weight: 600; cursor: pointer; }

.admin-main { width: 100%; max-width: 1200px; margin: 0; padding: 36px 40px 48px; }

@media (min-width: 701px) {
  .admin-app .main { width: calc(100% - 232px); margin-left: 232px; }
}

@media (max-width: 700px) {
  .admin-app .sidebar { width: 260px; padding-top: 26px; }
  .adm-topbar.topbar { display: flex; height: auto; padding: 16px 20px; border: 0; background: var(--navy); }
  .adm-topbar .adm-brand { padding: 0; }
  .admin-main { padding: 18px 16px 88px; }
}

/* Invitation requests (A-Admin boards). The tabs under the title, a line on
   how approving works, then one card of requests: who asked (name, email,
   club and association), their message, and on the right when and the
   answer. On a phone each request is its own card, without the email. */
.adm-requests .page-head { margin-bottom: 0; }
.adm-requests .page-head .eyebrow { margin: 0; font-weight: 400; letter-spacing: 0; }
.adm-requests .page-head h1 { margin-top: 2px; font-size: 1.875rem; letter-spacing: -.02em; }
.adm-tabs { margin: 22px 0 0; }
.adm-help { margin: 0; color: var(--muted); font-size: var(--text-small); line-height: 1.45; }
.adm-lead { margin: 16px 4px 12px; }
.adm-note { margin: 12px 4px 0; }
.adm-request { display: flex; align-items: flex-start; gap: 20px; padding: 18px 22px; border-top: 1px solid var(--line-soft); }
.adm-request:first-child { border-top: 0; }
.adm-request-who { flex: 0 0 220px; min-width: 0; }
.adm-request-name { color: var(--ink); font-size: .9375rem; font-weight: 700; }
.adm-request-name:hover { color: var(--blue); }
.adm-request-who small, .adm-request-state { display: block; margin-top: 3px; color: var(--muted); font-size: var(--text-small); overflow-wrap: anywhere; }
.adm-request-message { flex: 1; min-width: 0; margin: 0; font-size: var(--text-label); line-height: 1.5; overflow-wrap: anywhere; }
.adm-request-side { display: flex; flex-direction: column; align-items: flex-end; gap: var(--space-2); flex-shrink: 0; }
.adm-request-when { color: var(--muted); font-size: var(--text-small); white-space: nowrap; }
.adm-request-side .adm-request-state { margin: 0; }
.adm-request-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--space-2); }
.adm-request-actions form { margin: 0; }
.adm-request-actions .small-btn { padding: 0 14px; white-space: nowrap; }

@media (max-width: 700px) {
  .adm-requests .page-head .eyebrow, .adm-lead, .adm-note, .adm-request-who .adm-request-email, .adm-request-day { display: none; }
  .adm-requests .page-head h1 { margin: 0; font-size: 1.625rem; }
  .adm-tabs { margin-top: 14px; }
  .adm-request-list.panel { margin-top: 14px; overflow: visible; background: none; box-shadow: none; }
  .adm-request { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name when" "club club" "state state" "message message" "actions actions"; gap: 0 var(--space-2); margin-top: 12px; padding: 16px; border: 0; border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); }
  .adm-request:first-child { margin-top: 0; }
  .adm-request-who, .adm-request-side { display: contents; }
  .adm-request-name { grid-area: name; font-size: var(--text-body); }
  .adm-request-club { grid-area: club; margin-top: 2px; }
  .adm-request-when { grid-area: when; }
  .adm-request-side .adm-request-state { grid-area: state; margin-top: 2px; }
  .adm-request-message { grid-area: message; margin-top: 10px; }
  .adm-request-message:empty { display: none; }
  .adm-request-actions { grid-area: actions; flex-wrap: nowrap; justify-content: stretch; margin-top: 14px; }
  .adm-request-actions form:last-child { flex: 1; }
  .adm-request-actions .small-btn { min-height: 40px; font-size: var(--text-label); }
  .adm-request-actions form:last-child .btn { width: 100%; }
}

/* A request's own page: who asked beside where it stands and its answers
   (with the link to copy once approved), and below them, apart, Delete. */
.adm-request-page .page-head { margin-bottom: var(--space-5); }
.adm-request-page .page-head h1 { margin-top: 0; }
.adm-request-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); gap: 20px; align-items: start; }
.adm-request-facts, .adm-request-answer { padding: 20px 22px; }
.adm-request-answer h2 { margin: 0 0 var(--space-2); font-size: var(--text-body); }
.adm-request-answer .adm-request-actions { justify-content: flex-start; margin-top: var(--space-4); }
.adm-copy { display: flex; gap: var(--space-2); margin-top: var(--space-3); }
.adm-copy input { flex: 1; min-width: 0; }
.adm-request-delete { margin-top: 20px; }
.adm-request-delete form { margin: 0; }

@media (max-width: 700px) {
  .adm-request-split { grid-template-columns: minmax(0, 1fr); }
  .adm-request-facts, .adm-request-answer { padding: var(--space-4); }
  .adm-request-answer .adm-request-actions { flex-wrap: wrap; }
  .adm-request-answer .adm-request-actions form { flex: 1 1 100%; }
  .adm-request-answer .adm-request-actions .btn { width: 100%; }
}

/* Sightline in the app's colours: the blue accent, navy headings, and the
   interface's sans-serif for titles, like every operational heading. */
.sl {
  --sl-accent: var(--blue);
  --sl-muted: var(--muted);
  --sl-font: var(--font);
  --sl-font-heading: var(--font);
  --sl-series-1: var(--blue);
  --sl-series-2: var(--orange);
}

/* Sightline supplies its own stylesheet; keep its operational notes on the app scale. */
body .sl-stat-note, body .sl-fine-print { font-size: var(--text-small); line-height: 1.5; }
body .sl-title, body .sl-stat-value { font-weight: 700; letter-spacing: -.3px; }

/* The clubs and accounts lists and a club's page: plain tables in panels,
   a heading per list, and a search bar above the accounts. */
.adm-section { display: flex; align-items: center; gap: var(--space-2); margin: 28px 4px 12px; font-size: var(--text-body); }
.adm-table-panel { overflow-x: auto; }
.adm-table { white-space: normal; }
.adm-table th { white-space: nowrap; }
.adm-table td { padding: 14px 16px; border-bottom: 1px solid var(--line-soft); color: var(--ink); font-size: var(--text-label); vertical-align: top; }
.adm-table tr:last-child td { border-bottom: 0; }
.adm-table td small { display: block; margin-top: 2px; color: var(--muted); font-size: var(--text-small); overflow-wrap: anywhere; }
.adm-strong { color: var(--ink); font-weight: 700; }
a.adm-strong:hover { color: var(--blue); }
.adm-faint { color: var(--muted); }
.adm-club-line { display: block; }
.adm-club-line + .adm-club-line { margin-top: 4px; }
.adm-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); margin: 22px 0 14px; }
.adm-bar .list-toolbar { margin: 0; }
.adm-bar .list-toolbar > .search { width: 300px; max-width: 100%; min-height: 36px; }
.adm-request-page .adm-request-facts { margin-bottom: 0; }
