/* ==========================================================================
   Burgess Fund Management DAC — Client Platform stylesheet
   ========================================================================== */
:root {
  --navy-900: #061527;
  --navy-800: #0a1f3d;
  --navy-700: #12335f;
  --gold-500: #b98a3c;
  --gold-400: #c9a24b;
  --gold-300: #d8b96e;
  --cream: #f6f5f0;
  --line: #e3e0d7;
  --ink: #1c2430;
  --ink-soft: #3c4656;
  --muted: #5a6473;
  --white: #fff;
  --green: #2e7d4f;
  --red: #b3392f;
  --amber: #b98a3c;

  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  --radius: 10px;
  --shadow: 0 8px 24px rgba(6, 21, 39, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--navy-700); text-decoration: none; }
a:hover { color: var(--gold-500); }

h1, h2, h3 { font-family: var(--serif); color: var(--navy-800); line-height: 1.2; }

/* ---------- Auth (login) ---------- */
.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background:
    radial-gradient(circle at 78% 22%, rgba(201, 162, 75, 0.16), transparent 40%),
    linear-gradient(120deg, #061527 0%, #0a1f3d 55%, #12335f 100%);
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(6, 21, 39, 0.4);
  padding: 2.25rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}
.brand__mark {
  width: 42px; height: 42px; flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 8px; background: var(--navy-800); color: var(--gold-400);
  font-family: var(--serif); font-weight: 700; font-size: 1.3rem;
}
.brand__name { font-family: var(--serif); font-weight: 700; font-size: 1.15rem; letter-spacing: 0.03em; color: var(--navy-800); line-height: 1.1; }
.brand__sub { font-size: 0.62rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold-500); }

.auth-card h1 { font-size: 1.5rem; margin-bottom: 0.4rem; }
.auth-card .sub { color: var(--muted); font-size: 0.92rem; margin-bottom: 1.5rem; }

/* ---------- Forms ---------- */
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--navy-800); margin-bottom: 0.35rem; }
.field input, .field select, .field textarea {
  width: 100%; font-family: inherit; font-size: 0.95rem; color: var(--ink);
  border: 1px solid var(--line); border-radius: 8px; padding: 0.7rem 0.85rem;
  background: var(--white); transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--gold-500); box-shadow: 0 0 0 3px rgba(185, 138, 60, 0.15);
}
.field textarea { resize: vertical; min-height: 80px; }
.field .hint { font-size: 0.78rem; color: var(--muted); margin-top: 0.25rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: inherit; font-size: 0.95rem; font-weight: 600; cursor: pointer;
  border: 1px solid transparent; border-radius: 8px; padding: 0.75rem 1.25rem;
  transition: all 0.15s ease;
}
.btn--primary { background: var(--gold-500); color: var(--navy-900); }
.btn--primary:hover { background: var(--gold-400); }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--navy-700); }
.btn--ghost:hover { background: var(--cream); }
.btn--danger { background: transparent; border-color: #e3c7c4; color: var(--red); }
.btn--danger:hover { background: #fbeae9; }
.btn--block { width: 100%; }
.btn--sm { padding: 0.45rem 0.75rem; font-size: 0.82rem; border-radius: 7px; }

.alert { padding: 0.8rem 1rem; border-radius: 8px; font-size: 0.88rem; margin-bottom: 1rem; display: none; }
.alert--error { background: #fbeae9; color: var(--red); display: block; }
.alert--ok { background: #e8f4ec; color: var(--green); display: block; }
.alert--warn { background: #faf1e2; color: #8a5b1a; display: block; }

/* ---------- App shell ---------- */
.app-top {
  background: var(--navy-900);
  color: #d7e0ec;
  position: sticky; top: 0; z-index: 50;
}
.app-top__bar {
  max-width: 1180px; margin: 0 auto; padding: 0 1.5rem;
  height: 64px; display: flex; align-items: center; gap: 1rem; justify-content: space-between;
}
.app-top .brand { margin: 0; }
.app-top .brand__name { color: var(--white); }
.app-nav { display: flex; align-items: center; gap: 0.25rem; }
.app-nav a {
  color: #c9d4e2; font-size: 0.92rem; font-weight: 500; padding: 0.5rem 0.8rem; border-radius: 8px;
}
.app-nav a:hover { background: rgba(255,255,255,0.08); color: var(--white); }
.app-nav a.active { color: var(--gold-300); font-weight: 600; }
.app-user { display: flex; align-items: center; gap: 0.75rem; }
.app-user__name { font-size: 0.9rem; color: #e5eaf2; }
.app-user__badge {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.2rem 0.5rem; border-radius: 999px; background: rgba(201,162,75,0.18); color: var(--gold-300);
}
.app-user__badge.admin { background: rgba(255,255,255,0.14); color: #fff; }

.container { max-width: 1180px; margin: 0 auto; padding: 2rem 1.5rem; }

.page-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.5rem; }
.page-head h1 { font-size: 1.6rem; }
.page-head .sub { color: var(--muted); font-size: 0.9rem; }

/* ---------- Cards ---------- */
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.5rem;
}
.card h2 { font-size: 1.1rem; margin-bottom: 1rem; }
.card h3 { font-size: 1rem; margin-bottom: 0.75rem; }

.grid { display: grid; gap: 1.25rem; }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: 1fr 1fr; }

.stat-card { background: var(--navy-800); color: #d7e0ec; border: none; }
.stat-card .label { font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: #aab7c9; }
.stat-card .value { font-family: var(--serif); font-size: 2rem; font-weight: 700; color: var(--gold-300); margin-top: 0.4rem; }
.stat-card .sub { font-size: 0.82rem; color: #aab7c9; margin-top: 0.25rem; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 0.7rem 0.8rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
tbody tr:hover { background: #faf8f3; }

/* ---------- Badges ---------- */
.badge { display: inline-block; font-size: 0.72rem; font-weight: 600; padding: 0.18rem 0.55rem; border-radius: 999px; }
.badge--verified { background: #e8f4ec; color: var(--green); }
.badge--pending { background: #faf1e2; color: #8a5b1a; }
.badge--unverified { background: #efeff2; color: var(--muted); }
.badge--admin { background: rgba(185,138,60,0.15); color: #8a5b1a; }

.pos { color: var(--green); font-weight: 600; }
.neg { color: var(--red); font-weight: 600; }

.muted { color: var(--muted); }
.small { font-size: 0.82rem; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 0.25rem; border-bottom: 1px solid var(--line); margin-bottom: 1.5rem; flex-wrap: wrap; }
.tabs button {
  background: none; border: none; font-family: inherit; font-size: 0.92rem; font-weight: 600;
  color: var(--muted); padding: 0.65rem 1rem; cursor: pointer; border-bottom: 2px solid transparent;
}
.tabs button.active { color: var(--navy-800); border-bottom-color: var(--gold-500); }

/* ---------- News ---------- */
.news-item { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.news-item:last-child { border-bottom: none; }
.news-item a { font-weight: 600; color: var(--navy-800); }
.news-item a:hover { color: var(--gold-500); }
.news-item .meta { font-size: 0.78rem; color: var(--muted); margin-top: 0.2rem; }
.news-item p { font-size: 0.88rem; color: var(--ink-soft); margin-top: 0.35rem; }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(6,21,39,0.55); display: none;
  align-items: flex-start; justify-content: center; padding: 2rem 1rem; z-index: 100; overflow: auto;
}
.modal-backdrop.open { display: flex; }
.modal { background: var(--white); border-radius: 14px; width: 100%; max-width: 640px; padding: 1.75rem; box-shadow: 0 24px 60px rgba(6,21,39,0.4); }
.modal h2 { margin-bottom: 1.25rem; }
.modal__actions { display: flex; gap: 0.75rem; justify-content: flex-end; margin-top: 1.25rem; }

.loading { color: var(--muted); padding: 1rem 0; }
.error-note { color: var(--red); }

/* ---------- Responsive ---------- */
@media (min-width: 640px) {
  .grid--2 { grid-template-columns: 1fr 1fr; }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}
