/* The Ark — staff screens.
   Brand: black #0F0F0F, red #E81D1D, white. One typeface throughout: EB Garamond, the
   serif the firm's own wordmark is set in. Figures are tabular everywhere they are added
   up, so columns line up down the page. */

/* The typeface is served from this same machine, not from Google.
   Three reasons: the screens then look right with no internet and on the office LAN; there
   is no moment on refresh where the page is drawn in Times and then redrawn in Garamond;
   and no request carrying a staff member's IP address leaves for a third party, which is
   one less thing to explain under the NDPA 2023.
   `font-display: swap` keeps text readable if a file is slow; the files are local, so in
   practice it never shows. */
@font-face {
  font-family: "EB Garamond"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/eb-garamond-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "EB Garamond"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/eb-garamond-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "EB Garamond"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/eb-garamond-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "EB Garamond"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/eb-garamond-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "EB Garamond"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("fonts/eb-garamond-latin-400-italic.woff2") format("woff2");
}

:root {
  --black: #0F0F0F;
  --red: #E81D1D;
  --red-soft: #FDEDED;
  --grey: #6B6B6B;
  --line: #E5E5E5;
  --line-soft: #F4F4F4;
  --bg: #FAFAFA;
  --white: #fff;
  --radius: 10px;
}

* { box-sizing: border-box; }

:root {
  --serif: "EB Garamond", Garamond, "Adobe Garamond Pro", Georgia, "Times New Roman", serif;
}

body {
  margin: 0;
  font-family: var(--serif);
  color: var(--black);
  background: var(--bg);
  font-size: 15.5px;          /* Garamond runs small; this matches the old sans at 14px */
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* anywhere figures are added up, they line up — and the digits are the same width, so a
   column of Naira reads straight down */
td.num, th.num, .value, .stat .value, input[type=number] {
  font-variant-numeric: tabular-nums lining-nums;
}

a { color: var(--black); text-decoration: none; }
a:hover { color: var(--red); }
h1, h2, h3 { margin: 0; font-weight: 500; }
input, select, textarea, button { font-family: inherit; font-size: 14px; }

/* ---------- login ----------
   One panel of ink, one of paper. The firm's name is set in a serif, so the platform is
   too: the same face throughout, stepping down in size rather than changing voice. */
.login { display: flex; min-height: 100vh; background: var(--white); }

.login-brand {
  position: relative; overflow: hidden;
  width: 44%; min-width: 380px; max-width: 620px;
  background: linear-gradient(168deg, #16161A 0%, #0F0F0F 46%, #0A0A0C 100%);
  color: var(--white);
  padding: clamp(44px, 5vw, 72px) clamp(36px, 4.4vw, 64px);
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
}
.login-brand > .brand-top { margin-top: clamp(8px, 4vh, 48px); }

/* --- the backdrop --- */
.brand-art { position: absolute; inset: 0; pointer-events: none; }
/* ruled paper, barely there: the ledger the whole thing is about */
.art-rules {
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(
    to bottom, rgba(255,255,255,.014) 0 1px, transparent 1px 52px);
  mask-image: linear-gradient(to bottom, transparent 4%, #000 26%, #000 58%, transparent 88%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 4%, #000 26%, #000 58%, transparent 88%);
}
/* a single warm light, off the top-left, so the panel is not a flat rectangle */
.art-glow {
  position: absolute; top: -20%; left: -24%; width: 84%; aspect-ratio: 1;
  background: radial-gradient(circle at 50% 50%,
    rgba(232,29,29,.17) 0%, rgba(232,29,29,.055) 40%, transparent 70%);
  filter: blur(18px);
}

/* --- the words --- */
.brand-top, .brand-middle, .brand-foot { position: relative; }
.brand-top { display: flex; flex-direction: column; gap: clamp(28px, 4vw, 44px); }
.brand-words { display: flex; flex-direction: column; }

.wordmark {
  font-size: clamp(30px, 3.4vw, 40px); font-weight: 400;
  letter-spacing: .12em; line-height: 1.15; margin: 0;
}
/* the firm, then the promise: two lines, each on its own, neither ever running past the
   edge — the tracking tightens as the type gets smaller so the block stays even */
.firm-line {
  margin-top: 14px;
  font-size: 13.5px; font-weight: 500; letter-spacing: .055em; line-height: 1.6;
  color: #D2D2D2; overflow-wrap: break-word;
}
.firm-line span { font-weight: 400; letter-spacing: .02em; color: #9A9A9A; }
.promise {
  margin-top: 6px;
  font-size: 13px; font-weight: 400; letter-spacing: .04em; line-height: 1.7;
  color: #8E8E8E; overflow-wrap: break-word;
}
/* each phrase holds together; only the separators are break points */
.promise .part { white-space: nowrap; }
.promise .sep { color: #5A5A5A; }

.brand-middle { display: flex; flex-direction: column; gap: 18px; }
.brand-foot { display: flex; flex-direction: column; gap: 2px; }
.brand-rule { width: 46px; height: 2px; background: var(--red); margin-top: 26px; }
.brand-say {
  margin: 0; max-width: 34ch;
  font-size: 15px; font-weight: 300; line-height: 1.75; color: #D8D8D8;
}

.brand-foot {
  font-size: 13px; font-weight: 400; letter-spacing: .05em; line-height: 1.7; color: #7C7C7C;
}
.brand-foot .version { color: #5A5A5A; }

.login-form { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 0 clamp(24px, 7vw, 96px); gap: 32px; }
/* the firm's own mark, as supplied: a white tile carrying the serif B and the red V */
.mark { width: 86px; height: 86px; flex-shrink: 0; display: block; object-fit: contain;
        background: #fff; }
/* kept for the sidebar, which uses the same two lines at a smaller size */
.tagline { font-size: 12px; font-weight: 400; letter-spacing: .06em; color: #9A9A9A; margin-top: 10px; }

/* ---------- app shell ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: 232px; flex-shrink: 0; background: var(--black); color: var(--white); padding: 26px 0; display: flex; flex-direction: column; gap: 26px; position: sticky; top: 0; height: 100vh; }
.sidebar .brand { padding: 0 20px; display: flex; align-items: center; gap: 11px; }
.sidebar .brand .mark { width: 34px; height: 34px; }
.sidebar .brand-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.sidebar #brand-name { font-size: 16px; font-weight: 500; letter-spacing: .04em; line-height: 1.2; }
.sidebar #brand-firm { font-size: 11.5px; font-weight: 400; letter-spacing: .02em; color: #8A8A8A;
                       line-height: 1.3; overflow-wrap: break-word; }
.sidebar nav { display: flex; flex-direction: column; }
.sidebar nav a { padding: 11px 20px; font-size: 15.5px; color: #B4B4B4; font-weight: 400; border-left: 3px solid transparent; }
.sidebar nav a:hover { color: var(--white); }
.sidebar nav a.active { color: var(--white); font-weight: 600; border-left-color: var(--red); background: #1C1C1C; }
.sidebar .me { margin-top: auto; padding: 16px 18px 0; border-top: 1px solid #262626; display: flex; align-items: center; gap: 9px; }
.sidebar .me .small { line-height: 1.3; }
.sidebar .me button { white-space: nowrap; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--red); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 68px; background: var(--white); border-bottom: 1px solid var(--line); padding: 0 28px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.content { padding: 22px 28px 40px; display: flex; flex-direction: column; gap: 18px; }

/* ---------- pieces ---------- */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.card-head { padding: 15px 20px; border-bottom: 1px solid #EFEFEF; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-body { padding: 16px 20px; }
.grid { display: grid; gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.muted { color: var(--grey); font-weight: 300; }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.label { font-size: 10px; font-weight: 500; letter-spacing: 1.2px; color: var(--grey); text-transform: uppercase; }
.stat { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; }
.stat .value { font-size: 28px; font-weight: 300; letter-spacing: -0.5px; }
.stat.alert { border-color: var(--red); }
.stat.alert .value, .stat.alert .label { color: var(--red); }

button, .btn {
  height: 38px; padding: 0 16px; border-radius: 6px; border: 1px solid var(--line);
  background: var(--white); color: var(--black); cursor: pointer; font-weight: 400;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
button:hover, .btn:hover { border-color: #B4B4B4; color: var(--black); }
.btn-primary, button.primary { background: var(--red); border-color: var(--red); color: #fff; font-weight: 500; }
.btn-primary:hover, button.primary:hover { background: #C41818; border-color: #C41818; color: #fff; }
button:disabled { opacity: .5; cursor: not-allowed; }
button.link { height: auto; padding: 0; border: none; background: none; color: var(--red); }
button.small { height: 30px; padding: 0 10px; font-size: 12px; }

input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], select, textarea {
  height: 40px; padding: 0 12px; border: 1px solid #D4D4D4; border-radius: 6px; background: #fff; width: 100%; font-weight: 300;
}
textarea { height: auto; padding: 10px 12px; }
select { padding-right: 8px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field .label { margin-bottom: 2px; }

table { width: 100%; border-collapse: collapse; }
thead tr { background: var(--bg); }
th { text-align: left; padding: 10px 16px; font-size: 10px; font-weight: 500; letter-spacing: 1.2px; color: var(--grey); border-bottom: 1px solid #EFEFEF; }
td { padding: 12px 16px; border-bottom: 1px solid var(--line-soft); font-weight: 300; vertical-align: middle; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr:hover { background: #FCFCFC; }
tbody tr.clickable { cursor: pointer; }

.pill { display: inline-flex; align-items: center; font-size: 11px; font-weight: 500; padding: 4px 9px; border-radius: 4px; background: #F0F0F0; color: var(--black); letter-spacing: .3px; }
.pill.red { background: var(--red-soft); color: var(--red); }
.pill.ghost { background: transparent; border: 1px solid var(--line); font-weight: 300; }
.chip { font-size: 12px; font-weight: 300; border: 1px solid var(--line); background: #fff; padding: 6px 13px; border-radius: 20px; cursor: pointer; }
.chip.on { background: var(--black); color: #fff; border-color: var(--black); font-weight: 400; }

.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); }
.tabs a, .tabs button { padding: 0 0 10px; border: none; background: none; height: auto; color: var(--grey); font-weight: 300; border-bottom: 2px solid transparent; border-radius: 0; }
.tabs a.active, .tabs button.active { color: var(--black); font-weight: 500; border-bottom-color: var(--red); }

.bar { height: 6px; background: #EFEFEF; border-radius: 3px; overflow: hidden; }
.bar > div { height: 6px; background: var(--red); }

.msg { padding: 11px 14px; border-radius: 6px; font-size: 13px; font-weight: 300; }
.msg.error { background: var(--red-soft); color: #A11212; }
.msg.ok { background: #F1F6F1; color: #1F5130; }
.msg.info { background: #F4F4F4; color: #3F3F3F; }

.empty { padding: 34px 20px; text-align: center; color: var(--grey); font-weight: 300; }
.spinner { width: 15px; height: 15px; border: 2px solid #E5E5E5; border-top-color: var(--red); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

dialog { border: none; border-radius: var(--radius); padding: 0; width: min(620px, 92vw); box-shadow: 0 18px 50px rgba(0,0,0,.18); }
dialog::backdrop { background: rgba(15,15,15,.45); }
dialog form { display: flex; flex-direction: column; }
dialog .card-body { display: flex; flex-direction: column; gap: 14px; max-height: 68vh; overflow: auto; }
dialog footer { padding: 14px 20px; border-top: 1px solid #EFEFEF; display: flex; justify-content: flex-end; gap: 10px; }

.notice { display: flex; gap: 10px; align-items: flex-start; font-size: 11.5px; font-weight: 300; color: var(--grey); line-height: 1.6; }
.notice .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); margin-top: 6px; flex-shrink: 0; }

.footer-note { padding: 0 28px 24px; }

@media (max-width: 880px) {
  .sidebar { position: fixed; left: -232px; z-index: 40; transition: left .2s; }
  .sidebar.open { left: 0; }
  .content { padding: 16px; }
  .topbar { padding: 0 16px; }
  .login-brand { display: none; }
}
