/*!
 * G7Bill default template - design layer on top of Bootstrap 5.
 * 1. Tokens   2. Base   3. Public shell   4. Client-area shell   5. Page pieces   6. Print
 * A site template re-brands by overriding the --g7-* tokens in its own assets/custom.css.
 */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
  --g7-primary: #1d4ed8;
  --g7-primary-rgb: 29, 78, 216;
  --g7-primary-dark: #1e3a8a;
  --g7-accent: #f59e0b;
  --g7-ink: #0f172a;
  --g7-body: #334155;
  --g7-muted: #64748b;
  --g7-line: #e2e8f0;
  --g7-surface: #ffffff;
  --g7-canvas: #f5f7fb;
  --g7-radius: .625rem;
  --g7-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 16px rgba(15, 23, 42, .06);
  --g7-sidebar-w: 260px;
  --g7-topbar-h: 60px;

  --bs-primary: var(--g7-primary);
  --bs-primary-rgb: var(--g7-primary-rgb);
  --bs-link-color: var(--g7-primary);
  --bs-link-color-rgb: var(--g7-primary-rgb);
  --bs-link-hover-color: var(--g7-primary-dark);
  --bs-link-hover-color-rgb: 30, 58, 138;
  --bs-body-color: var(--g7-body);
  --bs-body-bg: var(--g7-canvas);
  --bs-border-color: var(--g7-line);
  --bs-border-radius: var(--g7-radius);
  --bs-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif;
  --bs-body-font-size: .9375rem;
}

/* 2. Base ------------------------------------------------------------------ */
html { scroll-behavior: smooth; }
body { min-height: 100vh; display: flex; flex-direction: column; }
h1, h2, h3, h4, h5, h6 { color: var(--g7-ink); font-weight: 650; letter-spacing: -.01em; }
a { text-decoration: none; }
a:hover { text-decoration: underline; }
.btn, .nav-link, .dropdown-item, .navbar-brand, .page-link { text-decoration: none !important; }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--g7-primary); outline-offset: 2px; }

.btn-primary {
  --bs-btn-bg: var(--g7-primary); --bs-btn-border-color: var(--g7-primary);
  --bs-btn-hover-bg: var(--g7-primary-dark); --bs-btn-hover-border-color: var(--g7-primary-dark);
  --bs-btn-active-bg: var(--g7-primary-dark); --bs-btn-active-border-color: var(--g7-primary-dark);
  --bs-btn-disabled-bg: var(--g7-primary); --bs-btn-disabled-border-color: var(--g7-primary);
}
.btn-outline-primary {
  --bs-btn-color: var(--g7-primary); --bs-btn-border-color: var(--g7-primary);
  --bs-btn-hover-bg: var(--g7-primary); --bs-btn-hover-border-color: var(--g7-primary);
  --bs-btn-active-bg: var(--g7-primary); --bs-btn-active-border-color: var(--g7-primary);
}
.form-control:focus, .form-select:focus { border-color: var(--g7-primary); box-shadow: 0 0 0 .2rem rgba(var(--g7-primary-rgb), .15); }
.table { --bs-table-bg: transparent; }
.table > thead th { color: var(--g7-ink); font-weight: 600; white-space: nowrap; }

/* 3. Public shell ---------------------------------------------------------- */
.g7-skip { position: absolute; left: -999px; }
.g7-skip:focus { left: 1rem; top: 1rem; z-index: 2000; background: #fff; padding: .5rem 1rem; border-radius: var(--g7-radius); }

.g7-header { background: var(--g7-surface); border-bottom: 1px solid var(--g7-line); position: sticky; top: 0; z-index: 1030; }
.g7-hotline { background: var(--g7-ink); color: #e2e8f0; font-size: .8125rem; padding: .35rem 0; text-align: right; }
.g7-hotline a { color: #fff; font-weight: 600; }
.g7-header .navbar { padding-block: .5rem; }
.g7-header .navbar-brand img { max-height: 44px; width: auto; }
.g7-header .nav-link { color: var(--g7-body); font-weight: 500; border-radius: .5rem; padding-inline: .75rem !important; }
.g7-header .nav-link:hover, .g7-header .nav-item.active > .nav-link, .g7-header .nav-link.show { color: var(--g7-primary); background: rgba(var(--g7-primary-rgb), .07); }
.g7-header .nav-link > i { opacity: .75; margin-right: .25rem; }
.g7-header .dropdown-menu { border-color: var(--g7-line); box-shadow: var(--g7-shadow); min-width: 15rem; }
.g7-header .dropdown-item { padding-block: .5rem; white-space: normal; }
.g7-header .dropdown-item > i { width: 1.25rem; color: var(--g7-muted); }
.g7-tools { gap: .25rem; }
.g7-tools .btn-icon { position: relative; color: var(--g7-body); border: 0; background: transparent; padding: .4rem .6rem; border-radius: .5rem; }
.g7-tools .btn-icon:hover { background: var(--g7-canvas); color: var(--g7-primary); }
.g7-tools .g7-count { position: absolute; top: 0; right: 0; font-size: .65rem; }
.g7-avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }

.g7-main { flex: 1 0 auto; }
.g7-hero-image { height: 280px; background: var(--g7-ink) center / cover no-repeat; }
.g7-pagehead { background: var(--g7-surface); border-bottom: 1px solid var(--g7-line); padding: 1.25rem 0; }
.g7-pagehead h1 { font-size: 1.5rem; margin: 0; }
.g7-content { padding: 1.75rem 0 3rem; }

.g7-footer { background: var(--g7-ink); color: #cbd5e1; margin-top: auto; font-size: .9rem; }
.g7-footer h2 { color: #fff; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 1rem; }
.g7-footer a { color: #cbd5e1; }
.g7-footer a:hover { color: #fff; }
.g7-footer-main { padding: 3rem 0 2rem; }
.g7-footer-bar { border-top: 1px solid rgba(255, 255, 255, .1); padding: 1rem 0; font-size: .8125rem; }
.g7-footer-bar .nav-link { padding: 0 .75rem 0 0; color: #cbd5e1; }
.g7-social a { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: 50%; background: rgba(255, 255, 255, .08); margin-right: .35rem; }
.g7-social a:hover { background: var(--g7-primary); }

.g7-top { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 1020; width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--g7-primary); color: #fff; box-shadow: var(--g7-shadow); opacity: 0; pointer-events: none; transition: opacity .2s; }
.g7-top.show { opacity: 1; pointer-events: auto; }

/* 4. Client-area shell ----------------------------------------------------- */
.g7-app { background: var(--g7-canvas); }
.g7-topbar { position: sticky; top: 0; z-index: 1030; height: var(--g7-topbar-h); background: var(--g7-surface); border-bottom: 1px solid var(--g7-line); display: flex; align-items: center; gap: .75rem; padding: 0 1rem; }
.g7-topbar .g7-brand img { max-height: 36px; width: auto; }
.g7-topbar .dropdown-toggle { color: var(--g7-body); text-decoration: none; }
.g7-shell { display: flex; flex: 1 0 auto; min-height: 0; }
.g7-sidebar { width: var(--g7-sidebar-w); flex: 0 0 var(--g7-sidebar-w); background: var(--g7-ink); color: #cbd5e1; --bs-offcanvas-width: var(--g7-sidebar-w); --bs-offcanvas-bg: var(--g7-ink); }
.g7-sidebar .offcanvas-body { padding: .75rem .5rem 2rem; }
.g7-sidemenu, .g7-sidemenu ul { list-style: none; margin: 0; padding: 0; }
.g7-sidemenu .nav-link { display: flex; align-items: center; gap: .65rem; color: #cbd5e1; padding: .55rem .75rem; border-radius: .5rem; font-size: .9rem; }
.g7-sidemenu .nav-link:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.g7-sidemenu .nav-link > i:first-child { width: 1.15rem; text-align: center; opacity: .8; }
.g7-sidemenu .nav-link .title { flex: 1; }
.g7-sidemenu .nav-link .arrow::after { content: "\203A"; display: inline-block; transition: transform .15s; }
.g7-sidemenu .nav-link[aria-expanded="true"] .arrow::after { transform: rotate(90deg); }
.g7-sidemenu > li.active > .nav-link { background: var(--g7-primary); color: #fff; }
.g7-sidemenu .sub-menu { padding: .15rem 0 .4rem 1.1rem; }
.g7-sidemenu .sub-menu .nav-link { font-size: .85rem; padding-block: .4rem; color: #94a3b8; }
.g7-sidemenu .sub-menu li.active > .nav-link { color: #fff; background: rgba(255, 255, 255, .08); }
.g7-app-main { flex: 1 1 auto; min-width: 0; padding: 1.25rem 1.5rem 2.5rem; }
.g7-app-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; margin-bottom: 1rem; }
.g7-app-head h1 { font-size: 1.4rem; margin: 0; }
.g7-app-head small { display: block; font-size: .875rem; font-weight: 400; color: var(--g7-muted); margin-top: .2rem; }
.g7-app-foot { padding: 1rem 1.5rem; font-size: .8125rem; color: var(--g7-muted); border-top: 1px solid var(--g7-line); background: var(--g7-surface); }
.page-breadcrumb { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .5rem; padding: 0; font-size: .8125rem; color: var(--g7-muted); }
.page-breadcrumb li > i { margin-left: .4rem; font-size: .7rem; }
@media (min-width: 992px) {
  /* Bootstrap makes .offcanvas-lg transparent above lg; the dark panel has to be restated. */
  .g7-sidebar.offcanvas-lg { background-color: var(--g7-ink) !important; position: sticky; top: var(--g7-topbar-h); height: calc(100vh - var(--g7-topbar-h)); overflow-y: auto; }
  body.g7-sidebar-closed .g7-sidebar { display: none; }
}
@media (max-width: 991.98px) { .g7-app-main { padding: 1rem; } }

/* 5. Page pieces ----------------------------------------------------------- */
/* Sign-in / activation / lock screens (standalone documents) */
.g7-login { background: var(--g7-ink) center / cover no-repeat fixed; }
.g7-login-wrap { flex: 1; display: grid; grid-template-columns: 1fr minmax(360px, 520px); min-height: 100vh; }
.g7-login-brand { padding: 2.5rem; display: flex; flex-direction: column; justify-content: space-between; color: #fff; background: linear-gradient(180deg, rgba(15, 23, 42, .55), rgba(15, 23, 42, .15) 40%, rgba(15, 23, 42, .6)); }
.g7-login-brand img { max-height: 64px; width: auto; }
.g7-login-note { max-width: 34rem; color: #e2e8f0; }
.g7-login-panel { background: var(--g7-surface); display: flex; flex-direction: column; justify-content: center; padding: 2.5rem; box-shadow: -8px 0 32px rgba(15, 23, 42, .25); }
.g7-login-card { width: 100%; max-width: 400px; margin: auto; }
.g7-login-card.wide { max-width: 720px; }
.g7-login-card h1 { font-size: 1.6rem; }
.g7-login-foot { font-size: .78rem; color: var(--g7-muted); text-align: center; padding-top: 1.5rem; }
.g7-login-wrap.single { grid-template-columns: 1fr; place-items: center; padding: 1.5rem; }
.g7-login-wrap.single .g7-login-panel { width: 100%; max-width: 760px; border-radius: var(--g7-radius); box-shadow: 0 16px 48px rgba(15, 23, 42, .35); }
@media (max-width: 767.98px) {
  .g7-login-wrap { grid-template-columns: 1fr; }
  .g7-login-brand { padding: 1.25rem 1.5rem; flex-direction: row; align-items: center; }
  .g7-login-brand img { max-height: 44px; }
  .g7-login-note { display: none; }
  .g7-login-panel { padding: 1.5rem; border-radius: 1rem 1rem 0 0; }
}
/* 404 / maintenance */
.g7-status { align-items: center; justify-content: center; padding: 1.5rem; }
.g7-status-box { max-width: 520px; text-align: center; background: var(--g7-surface); border: 1px solid var(--g7-line); border-radius: 1rem; box-shadow: var(--g7-shadow); padding: 2.5rem 2rem; }
.g7-status-box h1 { font-size: 1.5rem; }
.g7-status-code { font-size: 4.5rem; font-weight: 800; line-height: 1; color: var(--g7-primary); margin-bottom: 1rem; }
.g7-map { width: 100%; height: 100%; min-height: 360px; border: 0; border-radius: var(--g7-radius); }
.g7-auth { max-width: 460px; margin-inline: auto; }
.g7-card { background: var(--g7-surface); border: 1px solid var(--g7-line); border-radius: var(--g7-radius); box-shadow: var(--g7-shadow); }
.g7-section { padding: 3.5rem 0; }
.g7-eyebrow { font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--g7-primary); }
.g7-float { position: fixed; z-index: 1025; right: 0; padding: .5rem .75rem; border-radius: .5rem 0 0 .5rem; background: var(--g7-ink); color: #fff; box-shadow: var(--g7-shadow); }
.g7-float:hover { color: #fff; background: var(--g7-primary); }
.g7-cookie { position: fixed; inset: auto 1rem 1rem 1rem; z-index: 1040; max-width: 720px; margin-inline: auto; }

/* 6. Print ----------------------------------------------------------------- */
@media print {
  .g7-header, .g7-footer, .g7-topbar, .g7-sidebar, .g7-top, .g7-float, .g7-app-foot, .no-print { display: none !important; }
  body { background: #fff; }
  .g7-app-main, .g7-content { padding: 0; }
}

/* Wide row gutters must not give phones a sideways scroll. */
.g7-main { overflow-x: clip; }
