/* Look of every customer page: a blue card with yellow accents over a very faint Elmanto Bank logo. */

:root {
  --eb-blue: #072a4a;          /* the dark navy of the "Elmanto Bank" lettering in the logo */
  --eb-blue-dark: #051f37;
  --eb-yellow: #ffc312;
  --eb-yellow-dark: #e6ae00;
  --eb-page: #e8eef5;
}

body.auth {
  margin: 0;
  min-height: 100vh;
  font-family: 'Varela Round', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  background: var(--eb-page);
  color: #fff;
}

/* the logo, very transparent, repeated over the whole page and fixed while the page scrolls */
body.auth::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  background: url('assets/logo-bg.png') center / 420px auto repeat;
  opacity: 0.04;
  transform: rotate(-12deg) scale(1.6);
  pointer-events: none;
}

.auth-wrap {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 12px;
}

.auth-nav,
.auth-card {
  width: 100%;
  background: var(--eb-blue);
  border-radius: 4px;
  box-shadow: 0 8px 30px rgba(5, 25, 45, 0.45);
}

.auth-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  align-items: center;
  padding: 10px 20px;
  margin-bottom: 12px;
  font-size: 0.95rem;
}
.auth-nav a { color: #fff; text-decoration: none; opacity: 0.85; }
.auth-nav a:hover, .auth-nav a.active { opacity: 1; color: var(--eb-yellow); }
.auth-nav .push { margin-left: auto; }

.auth-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}
.auth-title h1 { margin: 0; font-size: 1.7rem; font-weight: 400; }
.auth-title a { color: #fff; opacity: 0.8; font-size: 0.8rem; }

.auth-body { padding: 20px; }

.auth-foot {
  padding: 14px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  text-align: center;
  font-size: 0.95rem;
}

.auth-card a { color: var(--eb-yellow); }
.auth-card a:hover { color: #ffd95a; }
.auth-card label, .auth-card .form-label, .auth-card h2 { color: #fff; }
.auth-card .text-muted { color: rgba(255, 255, 255, 0.78) !important; }
.auth-card .form-text { color: rgba(255, 255, 255, 0.78); }

/* fields */
.auth-card .form-control,
.auth-card .form-select {
  border: 0;
  border-radius: 4px;
  font-family: inherit;
}
.auth-card .form-control:focus,
.auth-card .form-select:focus {
  box-shadow: 0 0 0 0.2rem rgba(255, 195, 18, 0.55);
}
.auth-card .input-group > .form-control { border-radius: 0 4px 4px 0; }
.auth-card .input-group-text.icon {
  background: var(--eb-yellow);
  border: 0;
  border-radius: 4px 0 0 4px;
  color: #111;
  width: 48px;
  justify-content: center;
}
.auth-card .form-check-input:checked { background-color: var(--eb-yellow); border-color: var(--eb-yellow); }
.auth-card .form-check-input:focus { box-shadow: 0 0 0 0.2rem rgba(255, 195, 18, 0.55); }

/* buttons: yellow with dark text */
.auth-card .btn-primary,
.auth-card .btn-yellow {
  background: var(--eb-yellow);
  border: 0;
  color: #111;
  font-family: inherit;
  padding: 0.5rem 1.5rem;
}
.auth-card .btn-primary:hover,
.auth-card .btn-yellow:hover { background: var(--eb-yellow-dark); color: #111; }
.auth-card .btn-primary:focus-visible,
.auth-card .btn-yellow:focus-visible { box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.6); }

/* a soft panel and the request list on the home page */
.auth-card .panel-soft {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  padding: 14px 16px;
}
.auth-card .table {
  --bs-table-color: #fff;
  --bs-table-bg: transparent;
  --bs-table-border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

@media (max-width: 480px) {
  .auth-title h1 { font-size: 1.4rem; }
}

/* Bootstrap's dark green is unreadable on the blue card */
.auth-card .text-success { color: #b4f0b4 !important; }

/* long forms (registration): two columns on wide screens, one on phones */
.two-col { display: grid; grid-template-columns: 1fr; }
@media (min-width: 768px) {
  .two-col { grid-template-columns: 1fr 1fr; column-gap: 16px; }
}
.two-col .full { grid-column: 1 / -1; }

/* ---- logged-in pages: white header bar ---------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: #fff; color: #111;
  border-bottom: 1px solid #d9dee5;
}
.site-header-in {
  max-width: 1100px; margin: 0 auto; padding: 8px 16px;
  min-height: 64px; display: flex; align-items: center; gap: 18px;
}
.site-header .brand img { height: 40px; display: block; }
.site-header .menu-btn {
  display: flex; align-items: center; gap: 8px; padding: 4px 8px;
  background: none; border: 0; color: #111; font: inherit; font-weight: 700; cursor: pointer;
}
.site-header .menu-btn .bi { font-size: 1.9rem; line-height: 1; }
.site-links { display: flex; align-items: center; margin-left: 4px; }
.site-links a {
  color: #111; text-decoration: none; padding: 0 12px; line-height: 1.1;
  border-left: 2px solid #111; font-size: 0.98rem;
}
.site-links a:last-child { border-right: 2px solid #111; }
.site-links a:hover { color: var(--eb-blue); text-decoration: underline var(--eb-yellow) 3px; text-underline-offset: 6px; }
.site-links a.active { font-weight: 700; color: var(--eb-blue); text-decoration: underline var(--eb-yellow) 3px; text-underline-offset: 6px; }
.site-right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.site-right .lang { color: #5a6672; font-size: 0.8rem; text-decoration: none; }
.btn-logoff {
  background: var(--eb-blue); color: #fff; text-decoration: none;
  border-radius: 999px; padding: 8px 22px; font-size: 0.9rem;
}
.btn-logoff:hover { background: #0d3a66; color: #fff; }
.site-menu { max-width: 1100px; margin: 0 auto; padding: 4px 16px 10px; display: flex; flex-direction: column; border-top: 1px solid #e3e7ec; }
.site-menu[hidden] { display: none; }
.site-menu a { color: #111; text-decoration: none; padding: 9px 4px; border-bottom: 1px solid #eef0f3; }
.site-menu a:last-child { border-bottom: 0; color: var(--eb-blue); font-weight: 700; }
@media (max-width: 820px) { .site-links { display: none; } }

/* forms under the header start near the top instead of being centred on the screen */
.auth-wrap.has-header { justify-content: flex-start; min-height: calc(100vh - 65px); padding-top: 32px; }

/* ---- home page: full page ------------------------------------------------------------------- */
.home { position: relative; z-index: 1; max-width: 1100px; margin: 0 auto; padding: 28px 16px 56px; color: #111; }
.home .alert { max-width: 640px; margin: 0 auto 18px; }
.welcome { text-align: center; margin-bottom: 8px; }
.welcome h1 { margin: 0; font-size: 1.9rem; font-weight: 400; color: var(--eb-blue); }
.welcome p { margin: 6px 0 0; color: #5a6672; }

.tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px 28px; margin: 30px 0 38px; }
.tile { width: 112px; text-align: center; color: #111; text-decoration: none; font-size: 0.86rem; line-height: 1.25; }
.tile .ico {
  width: 70px; height: 70px; margin: 0 auto 9px;
  display: flex; align-items: center; justify-content: center;
  background: #fff; border: 1px solid #cfd6de; border-radius: 14px;
  font-size: 1.9rem; color: var(--eb-blue); transition: border-color .15s, box-shadow .15s, transform .15s;
}
.tile:hover .ico { border-color: var(--eb-yellow); box-shadow: 0 4px 12px rgba(7, 42, 74, 0.18); transform: translateY(-2px); }
.tile.disabled { opacity: .42; pointer-events: none; }

.cards3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .cards3 { grid-template-columns: 1fr; } }
.hcard { background: #fff; border: 1px solid #d9dee5; border-radius: 14px; padding: 18px 20px; min-height: 240px; color: #111; box-shadow: 0 2px 8px rgba(7, 42, 74, 0.06); }
.hcard h2 { margin: 0 0 14px; font-size: 1.05rem; color: var(--eb-blue); font-weight: 700; }
.hcard .acct-no { font-size: 1.55rem; letter-spacing: .03em; color: var(--eb-blue); }
.hcard .state { margin: 10px 0 0; font-size: .95rem; }
.hcard .state.ok { color: #1a7f37; }
.hcard .state.wait { color: #8a5a00; }
.req-list { list-style: none; margin: 0; padding: 0; max-height: 270px; overflow: auto; }
.req-list li { padding: 8px 0; border-bottom: 1px solid #eef0f3; }
.req-list li:last-child { border-bottom: 0; }
.st { font-size: .8rem; padding: 1px 10px; border-radius: 999px; background: #e8eef5; color: var(--eb-blue); white-space: nowrap; }
.st-done { background: #dff3e4; color: #1a6b32; }
.st-failed { background: #fbe3e1; color: #a12622; }
.st-received, .st-new { background: #fff1cc; color: #7a5200; }
.fee-list { list-style: none; margin: 0 0 10px; padding: 0; }
.fee-list li { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid #eef0f3; }
.fee-list li:last-child { border-bottom: 0; }


/* small phones: keep the header on one line (hamburger without its label, tighter spacing) */
@media (max-width: 480px) {
  .site-header-in { gap: 8px; padding: 8px 12px; }
  .site-header .brand img { height: 34px; }
  .site-header .menu-btn span { display: none; }
  .btn-logoff { padding: 7px 14px; font-size: 0.85rem; }
  .welcome h1 { font-size: 1.5rem; }
}

/* ---- sticky footer on every page ---------------------------------------------------------------
   The page is a column as tall as the screen: header, content (takes the free space), footer. The footer
   is "sticky" at the bottom: at the screen bottom on short pages and pinned to it on long ones. */
body.auth { display: flex; flex-direction: column; min-height: 100vh; }
.auth-wrap, .auth-wrap.has-header { flex: 1 0 auto; min-height: 0; }
.home { flex: 1 0 auto; width: 100%; box-sizing: border-box; }
.site-footer {
  position: sticky; bottom: 0; z-index: 20; margin-top: auto;
  background: #fff; border-top: 1px solid #d9dee5;
  padding: 9px 16px; font-size: .78rem; color: #555; text-align: center;
}
.site-footer a { color: inherit; text-decoration: underline; }

/* ---- activation code box on the home page ---------------------------------------------------------- */
.btn-yellow { background: var(--eb-yellow); border: 0; color: #111; font-family: inherit; padding: .5rem 1.5rem; border-radius: 6px; }
.btn-yellow:hover { background: var(--eb-yellow-dark); color: #111; }
.home .code-card { max-width: 560px; margin: 0 auto 26px; min-height: 0; border-color: var(--eb-yellow); box-shadow: 0 4px 14px rgba(255, 195, 18, .25); }
.home .code-card h2 { display: flex; align-items: center; gap: 8px; }
.code-input { text-transform: uppercase; letter-spacing: .12em; font-size: 1.15rem; text-align: center; }

/* balance on the home card, statement page */
.hcard .acct-balance { margin: 6px 0 2px; font-size: 1.9rem; font-weight: 700; color: #111; line-height: 1.15; }
.hcard .acct-balance span { font-size: 1rem; font-weight: 600; color: var(--eb-blue); }
.stmt-card { min-height: 0; max-width: 980px; margin: 0 auto; }
.stmt-balance { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid #e3e7ec; }
.stmt-balance .lbl { color: var(--eb-blue); font-weight: 700; }
.stmt-balance .amt { font-size: 1.7rem; font-weight: 700; }
table.stmt { width: 100%; border-collapse: collapse; font-size: .93rem; }
table.stmt th { text-align: left; padding: 8px 10px; color: var(--eb-blue); border-bottom: 2px solid #d9dee5; font-weight: 700; }
table.stmt td { padding: 9px 10px; border-bottom: 1px solid #edf0f3; vertical-align: top; }
table.stmt .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.stmt th.num { text-align: right; }
table.stmt .nowrap { white-space: nowrap; }
table.stmt .pos { color: #1a7f37; }
table.stmt .neg { color: #b42318; }
.stmt-pager { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; font-size: .9rem; }
.stmt-pager a { color: var(--eb-blue); font-weight: 600; }

.transfer-balance { margin: 0 0 14px; padding: 10px 12px; border-radius: 8px; background: rgba(255,255,255,.1); }
.transfer-balance strong { font-size: 1.15rem; color: var(--eb-yellow); }
.transfer-balance .small { opacity: .8; }

.loans-card { margin-top: 20px; min-height: 0; }
.lst-approved { background: #e3ecfa; color: #1b4f9c; }
.lst-active { background: #fff1cc; color: #7a5200; }
.lst-overdue { background: #fbe3e1; color: #a12622; }
.lst-repaid { background: #dff3e4; color: #1a6b32; }
