/* ============================================================
   Fixed-Term Deposit Portal – stylesheet
   Design tokens, fonts and base rules.

   BRAND COLOURS — replace the six {{COLOR_*}} values below.
   Everything else derives from them automatically.
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  /* ── BRAND PALETTE ─────────────────────────────────────────
     Replace these six values with the brand's colour palette.
     Naming convention (darkest → lightest):
       --blue-200  #005C3A   heading/strong accent
       --blue-300  #007348   active/pressed states
       --blue-400  #008050   hover states, links
       --blue-500  #00965E  primary action colour
       --blue-700  #BFE5D7  borders, subtle accents
       --blue-800  #EBF7F2  card background tint
  ── ─────────────────────────────────────────────────────── */
  --blue-200: #005C3A;
  --blue-300: #007348;
  --blue-400: #008050;
  --blue-500: #00965E;
  --blue-700: #BFE5D7;
  --blue-800: #EBF7F2;

  /* Greys — do not change unless redesigning the portal */
  --grey-000: #1A1A1A;
  --grey-100: #333333;
  --grey-300: #595959;
  --grey-500: #858585;
  --grey-600: #ADADAD;
  --grey-700: #D6D6D6;
  --grey-800: #EAEAEA;
  --grey-850: #F2F2F2;
  --grey-900: #F9F9F9;
  --white:    #FFFFFF;

  /* Semantic — success mapped to brand primary */
  --success-400: #008050;
  --success-500: #00965E;
  --success-800: #EBF7F2;
  --alert-200:   #452700;
  --alert-400:   #C77100;
  --alert-500:   #FFAB40;
  --alert-800:   #FFF7EC;
  --error-300:   #732C1C;
  --error-400:   #9C3B26;
  --error-500:   #C75046;
  --error-800:   #FAEEED;

  --heading-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --body-font:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --medium-font:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --figure-font:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --content-width: 640px;
  --shell-width:   1200px;
  --radius-input:  8px;
  --radius-btn:    50px;
  --radius-card:   12px;
}

/* ---------- Reset / base ---------- */
html {
  font-family: var(--body-font);
  background: var(--white);
  color: var(--grey-000);
  box-sizing: border-box;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
*, *:before, *:after { box-sizing: inherit; }
input, button, select, textarea { font-family: var(--body-font); }
body, h1, h2, h3, h4, h5, h6, p, ol, ul { margin: 0; padding: 0; font-weight: normal; }
ol, ul { list-style: none; }
img { max-width: 100%; height: auto; }

a, button.link {
  font-family: inherit;
  font-size: 16px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.25px;
  color: var(--blue-400);
  background: none;
  padding: 0;
  border: none;
}
a:hover, button.link:hover:not(:disabled) { text-decoration: underline; color: var(--blue-400); }
a:focus-visible, button.link:focus-visible {
  text-decoration: underline;
  color: var(--grey-000);
  outline: 2px solid var(--grey-000);
  outline-offset: 4px;
}

/* ---------- App shell ---------- */
.app { display: flex; flex-direction: column; min-height: 100vh; }
.main { flex: 1; background: var(--grey-900); padding: 40px 20px 64px; }
.content { max-width: var(--content-width); margin: 0 auto; }
.content--wide { max-width: 720px; }

/* ---------- Header ---------- */
.header { background: var(--white); border-bottom: 1px solid var(--grey-800); }
.header-inner {
  max-width: var(--shell-width); margin: 0 auto;
  height: 72px; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.header-logo { display: flex; flex-direction: column; align-items: flex-start; text-decoration: none; gap: 1px; }
.header-logo img { height: 30px; width: auto; display: block; }
.header-logo-ireland {
  font-family: var(--body-font);
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: 1px;
  color: var(--blue-400);
  padding-left: 25px;
  text-transform: uppercase;
  line-height: 1;
}

.btn-exit {
  font-family: var(--body-font);
  text-transform: uppercase; letter-spacing: 2px;
  font-weight: 600; font-size: 13px;
  color: var(--blue-500);
  background: transparent; border: 1px solid var(--blue-500);
  padding: 10px 22px; border-radius: var(--radius-btn); cursor: pointer;
}
.btn-exit:hover { background: var(--blue-800); color: var(--blue-400); }

/* ---------- Typography ---------- */
.eyebrow {
  font-family: var(--body-font); text-transform: uppercase;
  letter-spacing: 4px; font-size: 13px; color: var(--grey-300); margin-bottom: 14px;
}
h1.page-title {
  font-family: var(--heading-font); font-size: 32px; line-height: 36px;
  letter-spacing: -0.5px; color: var(--grey-000); margin-bottom: 8px;
}
h2.section-title {
  font-family: var(--heading-font); font-size: 24px; line-height: 28px;
  letter-spacing: -0.25px; color: var(--grey-000); margin: 36px 0 16px;
}
h3.sub-title {
  font-family: var(--heading-font); font-size: 20px; line-height: 24px;
  color: var(--grey-000); margin: 28px 0 12px;
}
.lead  { font-size: 16px; line-height: 24px; color: var(--grey-100); margin-bottom: 8px; }
.hint  { font-size: 14px; line-height: 21px; color: var(--grey-300); }
.muted { color: var(--grey-300); }
p + p  { margin-top: 12px; }

/* ---------- Card ---------- */
.card { background: var(--white); border: 1px solid var(--grey-800); border-radius: var(--radius-card); padding: 32px; margin-bottom: 20px; }
.card--pad-lg { padding: 40px; }

/* ---------- Banner / notification ---------- */
.banner {
  display: flex; gap: 12px; align-items: flex-start;
  border: 1px solid var(--blue-400); background: var(--blue-800);
  border-radius: var(--radius-input); color: var(--grey-100);
  padding: 16px 18px; font-size: 14px; line-height: 21px; margin-bottom: 24px;
}
.banner .banner-icon { flex: none; width: 20px; height: 20px; color: var(--blue-400); }

/* ---------- Form fields ---------- */
.field { margin-bottom: 22px; }
.field-label { display: block; font-family: var(--medium-font); font-size: 16px; color: var(--grey-000); margin-bottom: 6px; }
.field-label .optional { color: var(--grey-300); font-family: var(--body-font); font-size: 14px; }
.field-hint { font-size: 13px; line-height: 18px; color: var(--grey-300); margin: 6px 0 0; }

.input, .select, textarea.input {
  width: 100%; font-family: var(--body-font); font-size: 16px;
  color: var(--grey-000); background: var(--white);
  border: 1px solid var(--grey-700); border-radius: var(--radius-input);
  padding: 15px 18px; line-height: 22px;
}
.input:focus, .select:focus, textarea.input:focus {
  outline: none; border-color: var(--blue-400);
  box-shadow: 0 0 0 1px var(--blue-400);
}
.input::placeholder { color: var(--grey-500); }
.input:disabled, .select:disabled { background: var(--grey-850); color: var(--grey-300); }
textarea.input { resize: vertical; min-height: 120px; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23595959' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  padding-right: 42px; cursor: pointer;
}
.field-error .input, .field-error .select { border-color: var(--error-400); box-shadow: 0 0 0 1px var(--error-400); }
.error-text { display: flex; align-items: center; gap: 6px; color: var(--error-400); font-size: 13px; margin-top: 6px; }
.field-row { display: flex; gap: 16px; flex-wrap: wrap; }
.field-row > .field { flex: 1; min-width: 160px; }
.input-prefix { position: relative; }
.input-prefix > span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--grey-300); font-size: 16px; }
.input-prefix .input { padding-left: 28px; }

/* ---------- Segmented / radio choices ---------- */
.segmented { display: inline-flex; gap: 12px; flex-wrap: wrap; }
.seg-option {
  position: relative; border: 1px solid var(--grey-600);
  background: var(--white); border-radius: var(--radius-input);
  padding: 12px 30px; font-size: 16px; color: var(--grey-100);
  cursor: pointer; min-width: 96px; text-align: center; user-select: none;
}
.seg-option:hover { border-color: var(--blue-400); background: var(--blue-800); }
.seg-option input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg-option.is-selected, .seg-option:has(input:checked) {
  border-color: var(--blue-400); background: var(--blue-800);
  color: var(--grey-000); font-family: var(--medium-font);
  box-shadow: inset 0 0 0 1px var(--blue-400);
}

/* ---------- Checkboxes ---------- */
.agree { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; }
.agree input { width: 20px; height: 20px; accent-color: var(--blue-500); margin-top: 2px; flex: none; }
.agree label { font-size: 15px; line-height: 22px; color: var(--grey-100); }

/* ---------- Buttons ---------- */
.btn {
  font-family: var(--body-font); text-transform: uppercase;
  letter-spacing: 2px; font-weight: 600; font-size: 15px;
  border-radius: var(--radius-btn); padding: 15px 32px;
  cursor: pointer; border: 1px solid transparent;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 10px; text-decoration: none;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.btn:focus-visible { outline: 2px solid var(--grey-000); outline-offset: 2px; }
.btn--primary   { background: var(--blue-500); border-color: var(--blue-500); color: var(--white); }
.btn--primary:hover { background: var(--blue-400); border-color: var(--blue-400); color: var(--white); }
.btn--secondary { background: transparent; border-color: var(--blue-500); color: var(--blue-500); }
.btn--secondary:hover { background: var(--blue-800); border-color: var(--blue-400); color: var(--blue-400); }
.btn--tertiary  { background: transparent; border-color: var(--grey-700); color: var(--grey-100); }
.btn--tertiary:hover { background: var(--grey-850); }
.btn--full  { width: 100%; }
.btn--danger { background: var(--error-500); border-color: var(--error-500); color: var(--white); }
.btn--danger:hover { background: var(--error-400); border-color: var(--error-400); }
.btn:disabled { background: var(--grey-800); border-color: var(--grey-800); color: var(--grey-300); cursor: not-allowed; }

.btn-back {
  display: inline-flex; align-items: center; gap: 8px;
  background: none; border: none; padding: 0;
  color: var(--blue-400); font-size: 15px; font-weight: 600; cursor: pointer;
  margin-bottom: 20px; letter-spacing: 0.25px;
}
.btn-back:hover { text-decoration: underline; }
.btn-back svg { width: 16px; height: 16px; }
.form-actions { margin-top: 32px; }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  background: none; border: none; padding: 8px 0; cursor: pointer;
  color: var(--blue-400); font-weight: 600; font-size: 15px;
}
.btn-ghost.destructive { color: var(--error-400); }
.btn-ghost:hover { text-decoration: underline; }
.btn-ghost svg { width: 18px; height: 18px; }

/* ---------- Footer ---------- */
.footer { background: var(--grey-850); color: var(--grey-100); border-top: 1px solid var(--grey-800); }
.footer-inner { max-width: var(--shell-width); margin: 0 auto; padding: 40px 24px; }
.footer-legal { font-size: 13px; line-height: 20px; color: var(--grey-500); max-width: 820px; }
.footer-legal p + p { margin-top: 12px; }
.footer-brand { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--grey-700); }
.footer-copyright { margin-top: 16px; font-size: 12px; color: var(--grey-500); letter-spacing: 0.5px; }

/* ---------- Status badges / pills ---------- */
.pill { display: inline-block; font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--grey-850); color: var(--grey-100); font-family: var(--medium-font); }
.pill--live     { background: var(--blue-800); color: var(--blue-400); }
.pill--pending  { background: #FFF4CC; color: #7A5C00; }
.pill--review   { background: var(--blue-800); color: var(--blue-400); }
.pill--action   { background: var(--alert-800); color: var(--alert-400); border: 1px solid var(--alert-500); }
.pill--approved { background: var(--blue-800); color: var(--blue-400); }

/* ---------- Application status timeline ---------- */
.status-timeline { display: flex; gap: 0; margin: 0 0 28px; }
.st-step {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  position: relative;
}
.st-step::before {
  content: ''; position: absolute; top: 14px; left: calc(-50% + 14px); right: calc(50% + 14px);
  height: 2px; background: var(--grey-800);
}
.st-step:first-child::before { display: none; }
.st-step.is-done::before { background: var(--blue-500); }
.st-dot {
  width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--grey-700);
  background: var(--white); display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: var(--grey-300); z-index: 1; flex: none;
}
.st-step.is-done .st-dot    { background: var(--blue-500); border-color: var(--blue-500); color: var(--white); }
.st-step.is-active .st-dot  { background: var(--white); border-color: var(--blue-500); border-width: 3px; color: var(--blue-500); }
.st-label { font-size: 12px; color: var(--grey-300); margin-top: 8px; text-align: center; line-height: 16px; }
.st-step.is-done .st-label   { color: var(--blue-400); font-weight: 600; }
.st-step.is-active .st-label { color: var(--grey-000); font-weight: 600; }

/* ---------- Document list ---------- */
.doc-list { display: flex; flex-direction: column; gap: 12px; }
.doc-item {
  display: flex; align-items: center; gap: 14px;
  border: 1px solid var(--grey-800); border-radius: var(--radius-input);
  padding: 16px 20px; background: var(--white);
}
.doc-item.is-done { border-color: var(--blue-700); background: var(--blue-800); }
.doc-icon { flex: none; width: 40px; height: 40px; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.doc-icon--pending { background: var(--alert-800); color: var(--alert-400); }
.doc-icon--done    { background: var(--blue-800); color: var(--blue-500); }
.doc-info { flex: 1; min-width: 0; }
.doc-name { font-family: var(--medium-font); font-size: 15px; color: var(--grey-000); }
.doc-sub  { font-size: 13px; color: var(--grey-300); margin-top: 2px; }
.doc-action { flex: none; }

/* ---------- Utilities ---------- */
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.text-center { text-align: center; }
.hidden { display: none !important; }
.tag { display: inline-block; font-family: var(--medium-font); font-size: 13px; padding: 4px 10px; border-radius: 2px; background: var(--grey-850); color: var(--grey-100); }
