/* ==========================================================================
   Daleel client portal — brand theme
   Tokens, type scale and components taken from the visual identity in
   daleelclientui-visual-identity (src/index.css and src/App.tsx).
   ========================================================================== */

:root {
  /* Brand palette */
  --brand-green: #1a3a2a;
  --brand-green-mid: #2d5a3d;
  --brand-green-light: #4a7c59;
  --brand-green-deep: #111e17;
  --brand-gold: #c9913a;
  --brand-gold-light: #e8b46a;
  --brand-sand: #faf7f0;
  --brand-sand-dark: #f0ead8;
  --brand-ink: #1a1a18;
  --brand-muted: #6b6a5e;
  --brand-line: #e5e0d0;

  --surface: #ffffff;
  --surface-sunken: var(--brand-sand);

  --danger: #b3261e;
  --danger-soft: #fdecea;
  --success: var(--brand-green-light);
  --success-soft: #eaf3ed;
  --info-soft: #fdf4e6;

  /* Type */
  --font-display: "DM Serif Display", Georgia, "Times New Roman", serif;
  --font-body: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;

  /* Shape */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgb(26 58 42 / 6%);
  --shadow: 0 4px 16px rgb(26 58 42 / 8%);
  --shadow-lg: 0 16px 40px rgb(26 58 42 / 14%);

  --nav-height: 64px;
  --page-max: 1200px;
}

/* Arabic reads better a touch larger; the display serif has no Arabic cut, so
   headings fall back to a serif Arabic face rather than rendering in Latin. */
html[dir="rtl"] {
  --font-display: "Noto Naskh Arabic", "Amiri", Georgia, serif;
  --font-body: "Plus Jakarta Sans", "Noto Kufi Arabic", "Segoe UI", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--brand-ink);
  background: var(--brand-sand);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--brand-green);
}

h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
h3 { font-size: 1.375rem; }
h4 { font-size: 1.125rem; font-family: var(--font-body); font-weight: 600; }

p { margin: 0 0 1rem; }

a {
  color: var(--brand-green);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover { color: var(--brand-gold); }

/* Focus is always visible — the gold ring reads on both the sand and green grounds. */
:focus-visible {
  outline: 2px solid var(--brand-gold);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

img { max-width: 100%; display: block; }

/* ── Layout ─────────────────────────────────────────────────────────────── */

.shell {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.shell > main { flex: 1; }

.container {
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.section { padding-block: 4rem; }
.section--tight { padding-block: 2.5rem; }
.section--sand { background: var(--brand-sand); }
.section--white { background: var(--surface); }

.section--green {
  background: var(--brand-green);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.section--green h1,
.section--green h2,
.section--green h3 { color: #fff; }

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.eyebrow {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand-gold);
  margin-bottom: 0.5rem;
}

.lede {
  font-size: 1.125rem;
  color: var(--brand-muted);
  max-width: 60ch;
}

.section--green .lede { color: rgb(255 255 255 / 70%); }

.muted { color: var(--brand-muted); }

.stack { display: flex; flex-direction: column; gap: 1rem; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.row--between { justify-content: space-between; }
.row--end { justify-content: flex-end; }

.grid { display: grid; gap: 1.25rem; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.grid--cats { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }

/* ── Header ─────────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(26 58 42 / 96%);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgb(255 255 255 / 10%);
}

.site-header__inner {
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  color: #fff;
}

.brand:hover { color: #fff; }

.brand__mark {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--brand-gold);
  display: grid;
  place-items: center;
  color: #fff;
  flex: none;
}

.brand__name {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand__name strong {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand__name span {
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand-gold);
  margin-top: 2px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.site-nav a {
  color: rgb(255 255 255 / 72%);
  font-size: 0.9375rem;
  font-weight: 500;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] { color: #fff; }

.site-actions { display: flex; align-items: center; gap: 0.75rem; }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  color: #fff;
  padding: 0.5rem;
  cursor: pointer;
}

.site-header__mobile {
  display: none;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem 0 1.5rem;
  border-top: 1px solid rgb(255 255 255 / 10%);
}

.site-header__mobile a { color: rgb(255 255 255 / 80%); font-weight: 500; }
.site-header__mobile.is-open { display: flex; }

@media (max-width: 900px) {
  .site-nav { display: none; }
  .site-actions .btn--ghost-light { display: none; }
  .nav-toggle { display: block; }
}

/* Account chip */
.account-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgb(255 255 255 / 10%);
  border: 1px solid rgb(255 255 255 / 16%);
  border-radius: var(--radius-pill);
  padding: 0.3rem 0.85rem 0.3rem 0.3rem;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 500;
}

html[dir="rtl"] .account-chip { padding: 0.3rem 0.3rem 0.3rem 0.85rem; }

.account-chip:hover { color: #fff; background: rgb(255 255 255 / 16%); }

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand-gold);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex: none;
}

.avatar--lg { width: 72px; height: 72px; font-size: 1.5rem; }

/* ── Buttons ────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 0.7rem 1.25rem;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  text-align: center;
}

.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn--gold { background: var(--brand-gold); color: #fff; }
.btn--gold:hover:not(:disabled) { background: var(--brand-gold-light); color: #fff; box-shadow: 0 8px 20px rgb(201 145 58 / 30%); }

.btn--green { background: var(--brand-green); color: #fff; }
.btn--green:hover:not(:disabled) { background: var(--brand-green-mid); color: #fff; }

.btn--outline { background: transparent; border-color: var(--brand-line); color: var(--brand-green); }
.btn--outline:hover:not(:disabled) { border-color: var(--brand-gold); color: var(--brand-gold); }

.btn--ghost { background: transparent; color: var(--brand-muted); }
.btn--ghost:hover:not(:disabled) { color: var(--brand-green); background: var(--brand-sand-dark); }

.btn--ghost-light { background: transparent; color: rgb(255 255 255 / 82%); }
.btn--ghost-light:hover:not(:disabled) { color: #fff; }

.btn--danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn--danger:hover:not(:disabled) { background: var(--danger); color: #fff; }

.btn--sm { padding: 0.45rem 0.85rem; font-size: 0.8125rem; border-radius: var(--radius-sm); }
.btn--block { width: 100%; }

.link-arrow {
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ── Cards ──────────────────────────────────────────────────────────────── */

.card {
  background: var(--surface);
  border: 1px solid var(--brand-line);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.card--flush { padding: 0; overflow: hidden; }
.card--sand { background: var(--brand-sand); }

.card__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.card__title { font-family: var(--font-body); font-size: 1.0625rem; font-weight: 600; color: var(--brand-ink); margin: 0; }

/* Company card */
.company-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--brand-line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  height: 100%;
}

.company-card:hover {
  border-color: rgb(201 145 58 / 40%);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.company-card__media {
  aspect-ratio: 3 / 2;
  background: linear-gradient(135deg, var(--brand-green) 0%, var(--brand-green-light) 100%);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}

.company-card__media img { width: 100%; height: 100%; object-fit: cover; }

.company-card__monogram {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: rgb(255 255 255 / 90%);
}

.company-card__body { padding: 1.125rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }

.company-card__name {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--brand-ink);
  margin: 0;
  line-height: 1.35;
}

.company-card__meta {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  color: var(--brand-muted);
}

.company-card__excerpt {
  font-size: 0.875rem;
  color: var(--brand-muted);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Category tile */
.category-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  padding: 1.25rem 0.75rem;
  border: 1px solid var(--brand-line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  text-align: center;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover {
  border-color: rgb(201 145 58 / 60%);
  background: var(--brand-sand);
  box-shadow: 0 6px 18px rgb(201 145 58 / 12%);
}

.category-tile__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: var(--brand-sand-dark);
  display: grid;
  place-items: center;
  color: var(--brand-green);
  overflow: hidden;
}

.category-tile__icon img { width: 100%; height: 100%; object-fit: cover; }

.category-tile__label { font-size: 0.8125rem; font-weight: 600; color: var(--brand-ink); }
.category-tile__count { font-size: 0.6875rem; color: var(--brand-muted); }

/* ── Hero ───────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  background:
    linear-gradient(100deg, rgb(26 58 42 / 96%) 0%, rgb(26 58 42 / 82%) 45%, rgb(26 58 42 / 55%) 100%),
    linear-gradient(135deg, var(--brand-green-mid) 0%, var(--brand-green-deep) 100%);
  color: #fff;
  overflow: hidden;
  padding-block: 5.5rem 4.5rem;
}

html[dir="rtl"] .hero {
  background:
    linear-gradient(260deg, rgb(26 58 42 / 96%) 0%, rgb(26 58 42 / 82%) 45%, rgb(26 58 42 / 55%) 100%),
    linear-gradient(225deg, var(--brand-green-mid) 0%, var(--brand-green-deep) 100%);
}

/* The geometric field echoes the identity's tiled diamond motif. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0l30 30-30 30L0 30z' fill='%23c9913a'/%3E%3C/svg%3E");
  background-size: 60px 60px;
  pointer-events: none;
}

.hero > .container { position: relative; }

.hero__content { max-width: 640px; }

.hero h1 { color: #fff; margin-bottom: 1.25rem; }
.hero h1 em { color: var(--brand-gold); font-style: italic; }

.hero__lede {
  font-size: 1.125rem;
  color: rgb(255 255 255 / 72%);
  max-width: 34rem;
  margin-bottom: 2.25rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgb(201 145 58 / 20%);
  border: 1px solid rgb(201 145 58 / 40%);
  border-radius: var(--radius-pill);
  padding: 0.35rem 0.9rem;
  margin-bottom: 1.75rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-gold-light);
}

.pill__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-gold);
}

.hero__stats { display: flex; flex-wrap: wrap; gap: 2.5rem; margin-top: 2.5rem; }
.hero__stat-value { font-family: var(--font-display); font-size: 1.75rem; color: #fff; line-height: 1; }
.hero__stat-label {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgb(255 255 255 / 50%);
  margin-top: 0.35rem;
}

/* Search bar */
.searchbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  background: #fff;
  border-radius: var(--radius-xl);
  padding: 0.5rem;
  box-shadow: 0 18px 40px rgb(0 0 0 / 28%);
  max-width: 620px;
}

.searchbar__field {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding-inline: 1rem;
  flex: 1 1 190px;
  min-width: 0;
}

.searchbar__field svg { color: var(--brand-gold); flex: none; }

.searchbar__field input,
.searchbar__field select {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.9375rem;
  color: var(--brand-ink);
  padding-block: 0.6rem;
}

.searchbar__divider { width: 1px; background: var(--brand-line); align-self: stretch; }

.searchbar .btn { flex: none; border-radius: var(--radius-lg); }

@media (max-width: 640px) {
  .searchbar { border-radius: var(--radius-lg); }
  .searchbar__divider { display: none; }
  .searchbar .btn { width: 100%; }
}

/* Steps */
.step {
  background: rgb(255 255 255 / 5%);
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: var(--radius-lg);
  padding: 2rem;
  height: 100%;
}

.step__num {
  font-family: var(--font-display);
  font-size: 3.5rem;
  line-height: 1;
  color: rgb(201 145 58 / 28%);
  margin-bottom: 0.75rem;
}

.step h3 { font-family: var(--font-body); font-size: 1.25rem; font-weight: 600; color: #fff; }
.step p { color: rgb(255 255 255 / 62%); font-size: 0.9375rem; margin: 0; }

/* ── Forms ──────────────────────────────────────────────────────────────── */

.field { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1.125rem; }

.field > label,
.field-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--brand-ink);
}

.field__hint { font-size: 0.8125rem; color: var(--brand-muted); }

.input,
.select,
.textarea {
  width: 100%;
  font-family: inherit;
  font-size: 0.9375rem;
  color: var(--brand-ink);
  background: var(--surface);
  border: 1px solid var(--brand-line);
  border-radius: var(--radius);
  padding: 0.65rem 0.9rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.textarea { min-height: 110px; resize: vertical; }

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--brand-gold);
  box-shadow: 0 0 0 3px rgb(201 145 58 / 18%);
}

.input::placeholder,
.textarea::placeholder { color: #a8a496; }

.input.input--error,
.select.input--error { border-color: var(--danger); }

.field-error { font-size: 0.8125rem; color: var(--danger); }

.checkbox,
.radio {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  cursor: pointer;
}

.checkbox input,
.radio input { width: 16px; height: 16px; accent-color: var(--brand-green); }

.form-grid { display: grid; gap: 0 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--brand-line);
}

fieldset { border: 0; padding: 0; margin: 0 0 1.5rem; }

legend {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--brand-green);
  padding: 0;
  margin-bottom: 0.75rem;
}

/* Language tabs on translated forms */
.tabs { display: flex; gap: 0.35rem; border-bottom: 1px solid var(--brand-line); margin-bottom: 1.25rem; }

.tabs__btn {
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--brand-muted);
  padding: 0.6rem 1rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.tabs__btn[aria-selected="true"] { color: var(--brand-green); border-bottom-color: var(--brand-gold); }

.tab-panel[hidden] { display: none; }

/* Checkbox grid for category pickers */
.choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.5rem;
  max-height: 280px;
  overflow-y: auto;
  padding: 0.75rem;
  border: 1px solid var(--brand-line);
  border-radius: var(--radius);
  background: var(--brand-sand);
}

/* ── Auth pages ─────────────────────────────────────────────────────────── */

.auth {
  min-height: calc(100vh - var(--nav-height));
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  padding-block: 3rem;
}

.auth__card {
  width: 100%;
  max-width: 460px;
  margin-inline: auto;
  background: var(--surface);
  border: 1px solid var(--brand-line);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: var(--shadow);
}

.auth__card h1 { font-size: 1.875rem; margin-bottom: 0.35rem; }
.auth__card .lede { font-size: 0.9375rem; margin-bottom: 1.75rem; }

.auth__footer {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--brand-line);
  font-size: 0.9375rem;
  color: var(--brand-muted);
  text-align: center;
}

/* ── Alerts & badges ────────────────────────────────────────────────────── */

.alert {
  border-radius: var(--radius);
  padding: 0.85rem 1.1rem;
  font-size: 0.9375rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
}

.alert--success { background: var(--success-soft); border-color: rgb(74 124 89 / 35%); color: #1f4a30; }
.alert--error { background: var(--danger-soft); border-color: rgb(179 38 30 / 30%); color: #8c1d18; }
.alert--info { background: var(--info-soft); border-color: rgb(201 145 58 / 35%); color: #7a5518; }

.validation-summary { margin-bottom: 1rem; }
.validation-summary ul { margin: 0; padding-inline-start: 1.1rem; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border-radius: var(--radius-pill);
  padding: 0.2rem 0.65rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge--gold { background: var(--brand-gold); color: #fff; }
.badge--green { background: var(--success-soft); color: #1f4a30; }
.badge--neutral { background: var(--brand-sand-dark); color: var(--brand-muted); }
.badge--danger { background: var(--danger-soft); color: #8c1d18; }
.badge--outline { background: transparent; border: 1px solid var(--brand-line); color: var(--brand-muted); }

.tag {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 500;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  background: var(--brand-sand);
  border: 1px solid var(--brand-line);
  color: var(--brand-muted);
}

/* ── Tables ─────────────────────────────────────────────────────────────── */

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

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

.table th {
  text-align: start;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-muted);
  padding: 0.85rem 1rem;
  background: var(--brand-sand);
  border-bottom: 1px solid var(--brand-line);
  white-space: nowrap;
}

.table td { padding: 0.85rem 1rem; border-bottom: 1px solid var(--brand-line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--brand-sand); }

/* ── Empty & error states ───────────────────────────────────────────────── */

.state {
  text-align: center;
  padding: 3.5rem 1.5rem;
  border: 1px dashed var(--brand-line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.state__icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--brand-sand-dark);
  color: var(--brand-gold);
  display: grid;
  place-items: center;
  margin: 0 auto 1rem;
}

.state h3 { font-family: var(--font-body); font-size: 1.125rem; font-weight: 600; color: var(--brand-ink); }
.state p { color: var(--brand-muted); max-width: 44ch; margin-inline: auto; }

/* ── Pagination ─────────────────────────────────────────────────────────── */

.pagination { display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin-top: 2.5rem; }

.pagination__info { font-size: 0.875rem; color: var(--brand-muted); margin-inline: 0.75rem; }

/* Directional chevrons flip with the writing direction. */
html[dir="rtl"] .pagination svg { transform: scaleX(-1); }

/* ── Detail page ────────────────────────────────────────────────────────── */

.profile-hero {
  background: var(--brand-green);
  color: #fff;
  padding-block: 3rem;
  position: relative;
  overflow: hidden;
}

.profile-hero h1 { color: #fff; margin-bottom: 0.5rem; }

.profile-hero__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; }

.profile-logo {
  width: 96px;
  height: 96px;
  border-radius: var(--radius-lg);
  background: #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: none;
  box-shadow: var(--shadow);
}

.profile-logo img { width: 100%; height: 100%; object-fit: cover; }

.profile-logo__monogram { font-family: var(--font-display); font-size: 2.25rem; color: var(--brand-green); }

.detail-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 1.5rem; align-items: start; }

@media (max-width: 900px) { .detail-grid { grid-template-columns: 1fr; } }

.definition { display: grid; grid-template-columns: minmax(120px, auto) 1fr; gap: 0.65rem 1.25rem; font-size: 0.9375rem; }
.definition dt { color: var(--brand-muted); }
.definition dd { margin: 0; color: var(--brand-ink); word-break: break-word; }

.social-links { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.social-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--brand-line);
  border-radius: var(--radius-pill);
  padding: 0.35rem 0.9rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--brand-green);
}

.social-links a:hover { border-color: var(--brand-gold); color: var(--brand-gold); }

/* ── Filters ────────────────────────────────────────────────────────────── */

.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  align-items: end;
  background: var(--surface);
  border: 1px solid var(--brand-line);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 2rem;
}

.filters .field { margin-bottom: 0; }

/* ── Footer ─────────────────────────────────────────────────────────────── */

.site-footer { background: var(--brand-green-deep); color: rgb(255 255 255 / 45%); padding-block: 3.5rem 2rem; }

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(auto-fit, minmax(140px, 1fr));
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.site-footer h4 {
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.site-footer a { color: rgb(255 255 255 / 45%); font-size: 0.875rem; }
.site-footer a:hover { color: rgb(255 255 255 / 85%); }
.site-footer p { font-size: 0.8125rem; max-width: 32ch; }

.site-footer__base {
  border-top: 1px solid rgb(255 255 255 / 10%);
  padding-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.8125rem;
}

/* ── Utilities ──────────────────────────────────────────────────────────── */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-end { text-align: end; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.inline-form { display: inline; }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
