/* ==========================================================
   e-Vakalatnama — shared header / footer chrome
   Lets the Bootstrap-based layouts (layouts, layouts_private,
   layouts_public) render the same header + footer partials as
   layouts_ui. Everything is scoped under .site-header /
   .site-footer so it wins over Bootstrap's .container / .nav / .btn.
   Mirrors the header + footer rules in ui/css/app.css.
   ========================================================== */

.site-header,
.site-footer {
  --chrome-gold: #C29B38;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.55;
}
.site-header *, .site-footer * { box-sizing: border-box; }

.site-header .container,
.site-footer .container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Brand ---------- */
.site-header .brand,
.site-footer .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -.01em;
  color: #fff;
}
.site-header .brand:hover, .site-footer .brand:hover { color: #fff; }
.site-header .brand__mark,
.site-footer .brand__mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--chrome-gold);
  color: var(--chrome-gold);
  font-size: 16px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: #1d332e;
  border-bottom: 1px solid #e3e1de;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.site-header .nav { display: flex; flex-wrap: nowrap; align-items: center; gap: 4px; margin: 0; padding: 0; }
.site-header .nav a {
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 500;
  color: #f1f7f4;
}
.site-header .nav a:hover { background: rgba(255,255,255,.14); color: #fff; }
.site-header .nav a.is-active { color: #fff; box-shadow: inset 0 -2px 0 var(--chrome-gold); border-radius: 0; }
.site-header .nav a.nav__signin {
  display: inline-flex; align-items: center; height: 36px; padding: 0 14px;
  color: #fff; border: 1px solid rgba(255,255,255,.35); background: transparent; margin-left: 8px;
}
.site-header .nav a.nav__signin:hover { background: rgba(255,255,255,.12); border-color: #fff; }

.site-header .nav-toggle {
  display: none;
  border: 1px solid #e3e1de;
  background: #fff;
  border-radius: 6px;
  width: 40px; height: 40px;
  font-size: 20px;
  cursor: pointer;
}

/* Account menu */
.site-header .account { position: relative; margin-left: 8px; }
.site-header .account__btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid #e3e1de;
  background: #fff;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  cursor: pointer;
  font: inherit; font-size: 14px; color: #222;
}
.site-header .avatar {
  display: grid; place-items: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #222;
  color: #fff;
  font-weight: 600; font-size: 13px;
  flex-shrink: 0;
}
.site-header .avatar--lg { width: 48px; height: 48px; font-size: 18px; }
.site-header .account__menu {
  position: absolute; right: 0; top: calc(100% + 8px);
  width: 260px;
  background: #fff;
  border: 1px solid #e3e1de;
  border-radius: 10px;
  box-shadow: 0 1px 0 rgba(34,34,34,.04), 0 12px 32px -18px rgba(34,34,34,.30);
  padding: 8px;
  display: none;
  color: #222;
}
.site-header .account.is-open .account__menu { display: block; }
.site-header .account__who { display: flex; gap: 12px; align-items: center; padding: 10px; border-bottom: 1px solid #e3e1de; margin-bottom: 6px; }
.site-header .account__who strong { display: block; font-size: 14px; }
.site-header .account__who span { font-size: 13px; color: #666; }
.site-header .account__menu a,
.site-header .account__menu button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 10px; border: 0; border-radius: 6px; background: none;
  text-decoration: none; font: inherit; font-size: 14px; color: #222; text-align: left; cursor: pointer;
}
.site-header .account__menu a:hover,
.site-header .account__menu button:hover { background: #f4f4f4; color: #222; box-shadow: none; }
.site-header .account__menu .danger { color: #1f5a44; }
.site-header .account__menu form { margin: 0; }

/* ---------- Footer ---------- */
.site-footer { background: #17302a; color: #cfdcd5; padding: 26px 0 0; margin-top: 40px; }
.site-footer .container.footer-grid { display: grid; grid-template-columns: 4fr 1fr 1fr; gap: 40px; align-items: start; }
.site-footer p { margin: 10px 0 0; font-size: 14px; }
.site-footer .footer-about p { color: #a9bdb3; }
.site-footer .footer-col { display: flex; flex-direction: column; gap: 5px; }
.site-footer .footer-col h4 { margin: 0 0 4px; font-family: inherit; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--chrome-gold); }
.site-footer .footer-col a { text-decoration: none; font-size: 14px; color: #cfdcd5; }
.site-footer .footer-col a:hover { color: #fff; text-decoration: underline; }
.site-footer .footer-bar {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
  margin-top: 24px; padding-top: 10px; padding-bottom: 10px;
  position: relative; font-size: 13px; color: #a9bdb3;
}
.site-footer .footer-bar::before { content: ""; position: absolute; top: 0; left: 24px; right: 24px; height: 1px; background: rgba(255,255,255,.12); }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .site-header .container, .site-footer .container { padding: 0 16px; }
  .site-header .nav-toggle { display: inline-grid; place-items: center; }
  .site-header .nav {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch;
    background: #fff; border-bottom: 1px solid #e3e1de;
    padding: 8px 16px 16px; display: none;
  }
  .site-header .nav.is-open { display: flex; }
  .site-header .nav a { color: #444; }
  .site-header .nav a:hover { background: #f4f4f4; color: #222; }
  .site-header .nav a.is-active { color: #222; box-shadow: inset 2px 0 0 #1f5a44; }
  .site-header .nav a.nav__signin { margin: 8px 0 0; color: #222; border-color: #e3e1de; }
  .site-header .account { margin: 8px 0 0; }
  .site-header .account__menu { position: static; width: auto; margin-top: 8px; }
  .site-footer .container.footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .site-footer .footer-bar { flex-direction: column; }
}
@media (max-width: 480px) {
  .site-header .brand { font-size: 19px; }
}

/* ---------- Sticky footer ----------
   Short pages (e.g. Pay) left a blank band under the footer.
   The body becomes a full-height column; content grows, footer sits at the bottom. */
body.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
body.app-shell > .app-main { flex: 1 0 auto; padding-bottom: 40px; }
body.app-shell > .site-footer { margin-top: 0; flex-shrink: 0; }
