/* =========================================================
   Insurance Certificate Tracking System — Design System
   Professional corporate theme layered on Bootstrap 5.3
   ========================================================= */

:root {
  --navy-950: #071224;
  --navy-900: #0B1F3A;
  --navy-800: #10294D;
  --brand: #123E7B;
  --brand-dark: #0C2C5C;
  --brand-light: #EAF1FB;
  --accent: #D97706;
  --accent-dark: #B45309;
  --accent-light: #FDF3E3;
  --ink: #1E293B;
  --muted: #5B6B82;
  --bg: #F5F7FB;
  --line: #E3E8F0;
  --radius: 14px;
  --shadow-sm: 0 1px 3px rgba(11, 31, 58, .08);
  --shadow-md: 0 10px 30px -12px rgba(11, 31, 58, .25);
  --shadow-lg: 0 24px 60px -20px rgba(11, 31, 58, .35);
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: .975rem;
  line-height: 1.65;
}

h1, h2, h3, h4, h5 {
  font-family: 'Manrope', 'Inter', sans-serif;
  font-weight: 800;
  color: var(--navy-900);
  letter-spacing: -.015em;
}

a { text-decoration: none; }
::selection { background: rgba(18, 62, 123, .2); }

/* ---------- Top utility bar ---------- */
.topbar { background: var(--navy-950); color: #B9C6DC; font-size: .8rem; }
.topbar a { color: #DCE6F5; transition: color .15s; }
.topbar a:hover { color: #fff; }
.topbar i { color: var(--accent); margin-right: .4rem; }

/* ---------- Navbar ---------- */
.navbar-pro { background: #fff; padding-top: .9rem; padding-bottom: .9rem; transition: box-shadow .2s ease; }
.navbar-pro.scrolled { box-shadow: 0 6px 24px -12px rgba(11, 31, 58, .28); }
.brand-mark {
  width: 40px; height: 40px; border-radius: 10px; flex: 0 0 auto;
  background: linear-gradient(135deg, var(--brand), var(--navy-900));
  color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
}
/* Uploaded company logo (Admin > Settings) replaces the brand mark.
   Uses max-height + max-width (not a fixed height) so ANY upload size - wide
   lockups, tall marks, or huge files - scales down to fit the navbar neatly
   while preserving its aspect ratio. object-fit:contain guarantees it is never
   distorted even when both caps bind at once (e.g. an ultra-wide banner). */
.navbar-logo {
  height: auto; width: auto;
  max-height: 60px; max-width: 300px;
  flex: 0 0 auto;
  object-fit: contain; border-radius: 8px;
}
.footer-logo {
  height: 34px; width: auto; max-width: 150px; flex: 0 0 auto;
  object-fit: contain; border-radius: 6px;
}
.navbar-pro .navbar-brand { font-family: 'Manrope', sans-serif; font-weight: 800; color: var(--navy-900); letter-spacing: -.02em; font-size: 1.15rem; }
.navbar-pro .nav-link {
  color: #33415C !important; font-weight: 600; font-size: .925rem;
  padding: .5rem 1rem !important; position: relative; transition: color .15s;
}
.navbar-pro .nav-link:hover { color: var(--brand) !important; }
.navbar-pro .nav-link.active { color: var(--brand) !important; }
.navbar-pro .nav-link.active::after {
  content: ""; position: absolute; left: 1rem; right: 1rem; bottom: .15rem;
  height: 2px; border-radius: 2px; background: var(--accent);
}

/* ---------- Buttons ---------- */
.btn { border-radius: 9px; font-weight: 600; }
.btn-brand { background: var(--brand); border: 1px solid var(--brand); color: #fff; }
.btn-brand:hover, .btn-brand:focus { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn-accent { background: var(--accent); border: 1px solid var(--accent); color: #fff; }
.btn-accent:hover, .btn-accent:focus { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn-light-pro { background: #fff; border: 1px solid #fff; color: var(--navy-900); font-weight: 700; }
.btn-light-pro:hover, .btn-light-pro:focus { background: var(--brand-light); border-color: var(--brand-light); color: var(--brand-dark); }
.btn-outline-light-pro { border: 1px solid rgba(255,255,255,.45); color: #fff; }
.btn-outline-light-pro:hover, .btn-outline-light-pro:focus { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.75); }

/* ---------- Hero (home) ---------- */
.hero-pro {
  position: relative; color: #fff; overflow: hidden;
  background-color: var(--navy-950);
  background-image:
    radial-gradient(900px 420px at 85% -10%, rgba(217,119,6,.16), transparent 60%),
    radial-gradient(700px 500px at -10% 110%, rgba(30,90,180,.35), transparent 60%),
    linear-gradient(140deg, rgba(7,18,36,.92) 0%, rgba(11,31,58,.84) 45%, rgba(12,44,92,.72) 100%),
    url("../img/hero-bg.jpg");
  background-size: auto, auto, auto, cover;
  background-position: center, center, center, center 35%;
  background-repeat: no-repeat;
}
.hero-pro::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 78%);
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 78%);
}
.hero-pro > .container { position: relative; z-index: 1; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18);
  color: #DCE6F5; font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  padding: .45rem 1.05rem; border-radius: 999px;
}
.hero-eyebrow i { color: var(--accent); }
.hero-pro h1 { color: #fff; font-size: clamp(2.1rem, 4.2vw, 3.3rem); line-height: 1.15; }
.hero-pro .lead { color: #C4D0E4; }

/* Certificate mockup card */
.cert-mock { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.cert-mock-head {
  background: linear-gradient(135deg, var(--brand), var(--navy-900)); color: #fff;
  padding: 1.1rem 1.4rem; border-radius: var(--radius) var(--radius) 0 0;
  display: flex; align-items: center; gap: .75rem;
}
.cert-mock-head .icon-tile {
  width: 38px; height: 38px; border-radius: 9px; background: rgba(255,255,255,.14);
  display: flex; align-items: center; justify-content: center; font-size: 1.05rem;
}
.float-chip {
  position: absolute; z-index: 2; background: #fff; border-radius: 12px; box-shadow: var(--shadow-md);
  padding: .65rem .95rem; font-size: .82rem; font-weight: 600; color: var(--navy-900);
  display: flex; align-items: center; gap: .55rem;
}
.float-chip i { font-size: 1.15rem; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  background-color: var(--navy-950);
  background-image:
    linear-gradient(140deg, rgba(7,18,36,.94) 0%, rgba(12,44,92,.82) 100%),
    url("../img/hero-bg.jpg");
  background-size: auto, cover;
  background-position: center, center 35%;
  background-repeat: no-repeat;
  color: #fff; position: relative; overflow: hidden;
}
.page-hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 44px 44px;
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { color: #fff; font-size: clamp(1.9rem, 3.4vw, 2.7rem); }
.page-hero p { color: #C4D0E4; max-width: 640px; }
.breadcrumb-pro { background: transparent; margin-bottom: 0; font-size: .85rem; }
.breadcrumb-pro .breadcrumb-item a { color: #AFC0DA; }
.breadcrumb-pro .breadcrumb-item.active { color: #DCE6F5; }
.breadcrumb-pro .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,.35); }

/* ---------- Sections ---------- */
.section { padding: 4.5rem 0; }
.section-alt { background: #fff; }
.eyebrow {
  display: inline-block; color: var(--accent); font-weight: 700; font-size: .78rem;
  letter-spacing: .12em; text-transform: uppercase; margin-bottom: .6rem;
}
.section-title { font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
.section-lead { color: var(--muted); max-width: 640px; }

/* ---------- Stats strip ---------- */
.stat-strip { background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.stat-item { padding: 1.75rem 1rem; text-align: center; }
.stat-item .num { font-family: 'Manrope', sans-serif; font-size: 2rem; font-weight: 800; color: var(--brand); line-height: 1; }
.stat-item .lbl { color: var(--muted); font-size: .85rem; margin-top: .35rem; }

/* ---------- Cards ---------- */
.card-pro {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); height: 100%;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card-pro:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: #C9D6EA; }
.icon-tile-lg {
  width: 54px; height: 54px; border-radius: 13px; background: var(--brand-light); color: var(--brand);
  display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: 1.1rem;
}
.card-pro .card-body { padding: 1.6rem; }

/* ---------- Steps ---------- */
.step-num {
  width: 46px; height: 46px; border-radius: 50%; background: var(--brand); color: #fff;
  font-family: 'Manrope', sans-serif; font-weight: 800; font-size: 1.15rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 8px var(--brand-light); margin-bottom: 1rem;
}

/* ---------- CTA band ---------- */
.cta-band {
  background: radial-gradient(600px 300px at 90% 0%, rgba(217,119,6,.25), transparent 60%),
              linear-gradient(135deg, var(--navy-900), var(--brand-dark));
  color: #fff; border-radius: 18px; position: relative; overflow: hidden;
}
.cta-band h2 { color: #fff; }

/* ---------- Check lists ---------- */
.check-list li { display: flex; gap: .65rem; margin-bottom: .7rem; align-items: flex-start; }
.check-list i { color: var(--brand); margin-top: .15rem; }
.check-list-accent li i { color: var(--accent); }

/* ---------- About / values ---------- */
.value-card { border-left: 4px solid var(--accent); }

/* ---------- Contact ---------- */
.contact-info-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem 1.4rem; display: flex; gap: 1rem; align-items: flex-start; box-shadow: var(--shadow-sm);
}
.contact-info-card .icon-tile {
  flex: 0 0 auto; width: 46px; height: 46px; border-radius: 12px;
  background: var(--brand-light); color: var(--brand);
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
}

/* ---------- Forms ---------- */
.form-control, .form-select { border-color: var(--line); border-radius: 9px; padding: .65rem .9rem; font-size: .95rem; }
.form-control:focus, .form-select:focus { border-color: var(--brand); box-shadow: 0 0 0 .25rem rgba(18,62,123,.12); }
.form-label { font-weight: 600; font-size: .9rem; color: #33415C; }

/* ---------- Footer ---------- */
.footer-pro { background: var(--navy-950); color: #9FB0C9; font-size: .925rem; }
.footer-pro h5 { color: #fff; font-size: .9rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 1.1rem; }
.footer-pro a { color: #C4D0E4; transition: color .15s; }
.footer-pro a:hover { color: #fff; }
.footer-brand-mark {
  width: 42px; height: 42px; border-radius: 10px; flex: 0 0 auto;
  background: linear-gradient(135deg, var(--brand), #2C63B8); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
}
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); }

/* ---------- Badges / alerts tweaks ---------- */
.badge { font-weight: 600; }
.alert { border-radius: 10px; border: none; }

/* ---------- Certificate on-screen view (kept) ---------- */
.cert img { image-rendering: pixelated; }
@media (max-width: 575px) {
  .cert table td:first-child { white-space: normal !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  .section { padding: 3.25rem 0; }
  .navbar-pro .nav-link.active::after { display: none; }
  .float-chip { display: none !important; }
}

/* =========================================================
   Admin console layout (admin/admin_header.php / footer)
   Deliberately distinct from the public site chrome.
   ========================================================= */
.admin-body { background: var(--bg); }

.admin-sidebar {
  width: 250px;
  min-width: 250px;
  background: var(--navy-900);
  color: #cbd5e1;
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
}
.admin-brand {
  color: #fff;
  font-family: 'Manrope', 'Inter', sans-serif;
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
}
.admin-sidebar-logo { max-height: 32px; max-width: 150px; background: #fff; padding: 2px 6px; border-radius: 6px; }

.admin-link {
  color: #cbd5e1;
  text-decoration: none;
  padding: .25rem .75rem;
  border-radius: 8px;
  font-size: .9rem;
  line-height: 1.3;
}
.admin-link:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.admin-link.active { background: var(--brand); color: #fff; }

.admin-topbar {
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  z-index: 1020;
}

.admin-footer { background: var(--navy-900); color: #cbd5e1; }
.admin-footer a { color: #fff; text-decoration: none; }
.admin-footer a:hover { text-decoration: underline; }

.truncate { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
