/* Northgate Fire & Security — shared demonstration styles */
:root {
  --navy: #102033;
  --navy-mid: #1a334d;
  --navy-soft: #2a4663;
  --ink: #1c2430;
  --muted: #5c6775;
  --line: #d5dbe3;
  --line-strong: #b7c0cc;
  --paper: #f3efe8;
  --cream: #faf7f2;
  --white: #ffffff;
  --red: #9f1d14;
  --red-bg: #f6e7e5;
  --amber: #8a6a12;
  --amber-bg: #f6efd8;
  --green: #1c5c40;
  --green-bg: #e4f0ea;
  --blue: #1d4e75;
  --blue-bg: #e4eef6;
  --shadow: 0 1px 2px rgba(16, 32, 51, 0.05), 0 10px 28px rgba(16, 32, 51, 0.07);
  --shadow-soft: 0 1px 2px rgba(16, 32, 51, 0.04);
  --radius: 14px;
  --radius-sm: 10px;
  --demo-h: 52px;
  --font: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --measure: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  font-size: 16px;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--navy); }
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; color: var(--navy); margin: 0 0 0.5em; }
h1 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
h2 { font-size: clamp(1.35rem, 2.2vw, 1.75rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 0.85em; }
ul { margin: 0 0 1em; padding-left: 1.15em; }
button, input, select, textarea { font: inherit; }
code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: rgba(16, 32, 51, 0.06);
  padding: 0.05em 0.35em;
  border-radius: 4px;
}

/* Demo chrome */
.demo-bar {
  position: relative;
  z-index: 50;
  background: var(--navy);
  color: #e8e0d6;
  min-height: var(--demo-h);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}
.demo-bar__inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0.4rem 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.demo-bar__brand { display: flex; align-items: center; gap: 0.6rem; min-width: 0; }
.demo-bar__pill {
  display: inline-block;
  background: #c9a227;
  color: #1a1404;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  flex: none;
}
.demo-bar__title {
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.demo-bar__nav { display: flex; flex-wrap: wrap; gap: 0.2rem; margin-left: auto; }
.demo-bar__link {
  color: #d9d3cb;
  text-decoration: none;
  font-size: 0.82rem;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
}
.demo-bar__link:hover { color: #fff; background: rgba(255,255,255,0.08); }
.demo-bar__link.is-active { color: #fff; background: var(--navy-soft); }
.demo-bar__reset {
  background: transparent;
  color: #e8e0d6;
  border: 1px solid rgba(232,224,214,0.3);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font-size: 0.78rem;
  cursor: pointer;
}
.demo-bar__reset:hover { background: rgba(255,255,255,0.08); color: #fff; }
.file-warn {
  background: var(--amber-bg);
  color: #4d3b08;
  padding: 0.6rem 1rem;
  font-size: 0.88rem;
  border-bottom: 1px solid #e4d7a8;
}
body.has-file-warn { padding-top: 0; }

/* Layout */
.wrap { max-width: var(--measure); margin: 0 auto; padding: 1.5rem 1.15rem 3rem; }
.wrap--wide { max-width: 1240px; }
.muted { color: var(--muted); }
.tiny { font-size: 0.8rem; color: var(--muted); }
.kicker {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.45rem;
}
.kicker--navy { color: var(--navy-soft); }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 1.15rem 1.2rem;
}
.card + .card { margin-top: 1rem; }
.grid-2, .grid-3, .grid-4 { display: grid; gap: 1rem; }
@media (min-width: 720px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: var(--navy);
  color: #fff;
  border: 1px solid var(--navy);
  border-radius: 999px;
  padding: 0.62rem 1.15rem;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.2;
}
.btn:hover { background: var(--navy-mid); color: #fff; }
.btn--ghost {
  background: transparent;
  color: var(--navy);
  border-color: var(--line-strong);
}
.btn--ghost:hover { background: var(--cream); color: var(--navy); }
.btn--red { background: var(--red); border-color: var(--red); }
.btn--red:hover { background: #7f160f; color: #fff; }
.btn--small { padding: 0.4rem 0.8rem; font-size: 0.86rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1rem; }

.pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  background: #eef1f5;
  color: var(--navy);
  white-space: nowrap;
}
.pill--ok { background: var(--green-bg); color: var(--green); }
.pill--due { background: var(--amber-bg); color: var(--amber); }
.pill--overdue { background: var(--red-bg); color: var(--red); }
.pill--neutral { background: var(--blue-bg); color: var(--blue); }

.toast {
  position: fixed;
  bottom: 1.2rem;
  left: 50%;
  transform: translate(-50%, 120%);
  background: var(--navy);
  color: #fff;
  padding: 0.75rem 1.1rem;
  border-radius: 999px;
  box-shadow: var(--shadow);
  z-index: 80;
  max-width: min(92vw, 42rem);
  text-align: center;
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }
.toast--ok { background: var(--green); }
.toast--warn { background: #7a4d0c; }

/* Forms */
.form label, .field-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0.7rem 0 0.3rem;
}
.form input[type="text"],
.form input[type="email"],
.form input[type="tel"],
.form input[type="date"],
.form input[type="time"],
.form input[type="number"],
.form select,
.form textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  background: var(--cream);
  color: var(--ink);
}
.form textarea { min-height: 6.5rem; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus {
  outline: 2px solid var(--navy);
  outline-offset: 1px;
  background: #fff;
}
.form-row { display: grid; gap: 0 1rem; }
@media (min-width: 640px) {
  .form-row--2 { grid-template-columns: 1fr 1fr; }
  .form-row--3 { grid-template-columns: 1fr 1fr 1fr; }
}
.help { font-size: 0.8rem; color: var(--muted); margin-top: 0.25rem; }
.notice {
  background: var(--cream);
  border: 1px solid var(--line);
  border-left: 3px solid var(--navy);
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  font-size: 0.9rem;
}
.notice--warn { border-left-color: var(--amber); background: var(--amber-bg); }
.notice--legal { border-left-color: var(--red); font-size: 0.86rem; }

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: inherit;
}
.logo > span { display: flex; flex-direction: column; justify-content: center; }
.logo__mark { width: 42px; height: 42px; flex: none; }
.logo__name { display: block; font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; color: var(--navy); }
.logo__sub { display: block; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.logo--light .logo__name { color: #f6f1ea; }
.logo--light .logo__sub { color: #c9c0b4; }

/* Website header */
.site-header {
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0.9rem 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.site-nav { display: flex; flex-wrap: wrap; gap: 0.2rem 1rem; }
.site-nav a { color: var(--navy); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.site-nav a:hover, .site-nav a.is-active { color: var(--red); }

.hero {
  background:
    radial-gradient(1200px 400px at 80% -10%, rgba(201, 162, 39, 0.12), transparent 50%),
    linear-gradient(160deg, var(--navy) 0%, #173049 55%, #1c3a4f 100%);
  color: #f3efe8;
  padding: 3.2rem 1.15rem 3.6rem;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(90deg, transparent, #000 30%, #000 80%, transparent);
  pointer-events: none;
}
.hero__inner { max-width: var(--measure); margin: 0 auto; position: relative; z-index: 1; display: grid; gap: 2rem; }
@media (min-width: 860px) {
  .hero__inner { grid-template-columns: 1.3fr 0.9fr; align-items: center; }
}
.hero h1 { color: #fff; max-width: 16ch; }
.hero p { color: #d9d3cb; font-size: 1.08rem; max-width: 42rem; }
.hero .btn { background: #f3efe8; color: var(--navy); border-color: #f3efe8; }
.hero .btn:hover { background: #fff; color: var(--navy); }
.hero .btn--ghost { background: transparent; color: #f3efe8; border-color: rgba(243,239,232,0.4); }
.hero .btn--ghost:hover { background: rgba(255,255,255,0.08); color: #fff; }
.hero-panel {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  backdrop-filter: blur(6px);
}
.hero-panel h2 { color: #fff; font-size: 1rem; margin-bottom: 0.8rem; }
.hero-panel ol { margin: 0; padding-left: 1.15rem; color: #d9d3cb; }
.hero-panel li { margin: 0.4rem 0; }

.section { padding: 2.6rem 0; }
.section--cream { background: var(--cream); }
.section-head { margin-bottom: 1.4rem; }

.service-card h3 { margin-bottom: 0.35rem; }
.service-card p { color: var(--muted); margin: 0; font-size: 0.95rem; }
.icon-dot {
  width: 36px; height: 36px; border-radius: 9px;
  background: var(--navy); color: #f3efe8;
  display: grid; place-items: center;
  font-weight: 800; font-size: 0.85rem;
  margin-bottom: 0.8rem;
}

.accr-list { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.accr {
  border: 1px dashed var(--line-strong);
  background: var(--cream);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  min-width: 8.5rem;
  text-align: center;
}
.accr strong { display: block; letter-spacing: 0.08em; font-size: 1.05rem; color: var(--navy); }
.accr span { font-size: 0.75rem; color: var(--muted); }

.site-footer {
  background: var(--navy);
  color: #c9c0b4;
  padding: 2rem 1.15rem 2.6rem;
  font-size: 0.9rem;
  margin-top: 2rem;
}
.site-footer__grid {
  max-width: var(--measure);
  margin: 0 auto;
  display: grid;
  gap: 1.4rem;
}
@media (min-width: 720px) { .site-footer__grid { grid-template-columns: 1fr 1.3fr; } }
.site-footer__name { color: #f3efe8; font-weight: 700; }
.site-footer__legal { color: #9aa3ad; }

/* Pricing */
.price-card { display: flex; flex-direction: column; height: 100%; }
.price-card .amount { font-size: clamp(1.05rem, 1.6vw, 1.35rem); font-weight: 800; color: var(--navy); letter-spacing: -0.03em; line-height: 1.2; }
.price-card .yearly { color: var(--muted); font-size: 0.92rem; margin-bottom: 0.8rem; }
.price-card ul { flex: 1; }
.price-card--bundle {
  background: var(--navy);
  color: #e8e0d6;
  border-color: var(--navy);
}
.price-card--bundle h3, .price-card--bundle .amount { color: #fff; }
.price-card--bundle .yearly, .price-card--bundle li { color: #d9d3cb; }

/* Admin */
.stat {
  padding: 1rem 1.1rem;
}
.stat .num { font-size: 2rem; font-weight: 800; letter-spacing: -0.04em; color: var(--navy); line-height: 1; }
.stat .label { color: var(--muted); font-size: 0.88rem; margin-top: 0.3rem; }
.stat--alert .num { color: var(--red); }
.table-wrap { overflow-x: auto; }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
table.data th, table.data td {
  text-align: left;
  padding: 0.65rem 0.55rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
table.data th {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
table.data tr:hover td { background: #fbf9f6; }

/* Engineer app — phone frame on desktop */
.app-shell {
  min-height: calc(100vh - var(--demo-h));
  display: flex;
  justify-content: center;
  padding: 1rem;
  background:
    radial-gradient(800px 300px at 50% 0%, rgba(16,32,51,0.08), transparent 55%),
    var(--paper);
}
.app-phone {
  width: 100%;
  max-width: 390px;
  background: #0c1622;
  border-radius: 32px;
  padding: 12px;
  box-shadow: 0 20px 50px rgba(16,32,51,0.18);
}
.app-screen {
  background: #f6f3ee;
  border-radius: 22px;
  min-height: 700px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.app-status {
  display: flex;
  justify-content: space-between;
  padding: 0.45rem 1rem 0.15rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--navy);
}
.app-top {
  padding: 0.3rem 1rem 0.9rem;
  background: linear-gradient(#f6f3ee, #f6f3ee 70%, transparent);
}
.app-top h1 { font-size: 1.35rem; margin: 0.15rem 0 0; }
.app-body { padding: 0 0.85rem 1.2rem; flex: 1; }
.job-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border-radius: 16px;
  padding: 0.9rem 1rem;
  margin-bottom: 0.7rem;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}
.job-card:hover { border-color: var(--navy-soft); }
.job-card__meta { display: flex; justify-content: space-between; gap: 0.5rem; align-items: center; margin-bottom: 0.35rem; }
.job-card__time { font-weight: 800; color: var(--navy); }
.job-card h2 { font-size: 1.02rem; margin: 0 0 0.15rem; }
.job-card p { margin: 0; font-size: 0.88rem; color: var(--muted); }
.check-item {
  display: flex;
  gap: 0.7rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem 0.75rem;
  margin-bottom: 0.45rem;
  align-items: flex-start;
}
.check-item input { margin-top: 0.2rem; accent-color: var(--navy); width: 1.1rem; height: 1.1rem; flex: none; }
.sig-box {
  background: #fff;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  overflow: hidden;
}
.sig-box canvas { display: block; width: 100%; height: 160px; touch-action: none; cursor: crosshair; background: #fff; }
.photo-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.photo-thumb {
  width: 86px; height: 86px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line);
}

/* Logbook */
.lb-hero {
  background: var(--navy);
  color: #f3efe8;
  padding: 1.4rem 1.15rem 1.6rem;
}
.lb-hero__inner { max-width: var(--measure); margin: 0 auto; display: grid; gap: 1rem; }
@media (min-width: 800px) {
  .lb-hero__inner { grid-template-columns: 1fr auto; align-items: center; }
}
.lb-hero h1 { color: #fff; margin: 0.2rem 0 0.4rem; }
.lb-hero p { color: #d9d3cb; margin-bottom: 0.4rem; }
.qr-card {
  background: #fff;
  color: var(--ink);
  border-radius: 16px;
  padding: 0.8rem;
  text-align: center;
  width: min(100%, 220px);
  justify-self: end;
}
.qr-card .qr { width: 180px; height: 180px; margin: 0 auto 0.4rem; }
.qr-card .qr svg { width: 100%; height: 100%; }
.qr-card p { color: var(--muted); font-size: 0.78rem; margin: 0; }
.history-item { padding: 0.8rem 0; border-bottom: 1px solid var(--line); }
.history-item:last-child { border-bottom: 0; }
.history-item h3 { font-size: 1rem; margin: 0 0 0.2rem; }

/* Success banner */
.banner-ok {
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid #c5decf;
  border-radius: 12px;
  padding: 0.8rem 1rem;
  margin-bottom: 1rem;
}

@media print {
  .demo-bar, .file-warn, .no-print, .site-header, .btn, .form, #ng-toast { display: none !important; }
  body { padding-top: 0; background: #fff; }
  .card { box-shadow: none; }
  a { color: inherit; text-decoration: none; }
}

@media (max-width: 720px) {
  .demo-bar__title { display: none; }
  .app-shell { padding: 0; }
  .app-phone { max-width: none; border-radius: 0; padding: 0; box-shadow: none; background: transparent; }
  .app-screen { border-radius: 0; min-height: calc(100vh - var(--demo-h)); }
  .qr-card { width: 100%; justify-self: stretch; }
}

@media (max-width: 900px) {
  .demo-bar__inner { gap: 0.45rem 0.7rem; }
  .demo-bar__nav { margin-left: 0; }
  .demo-bar__link { white-space: nowrap; }
}
