/* Beaver Networks asset register. Colours and type match the Beaver Broadband & Networks website. */
:root {
  --navy: #00354D;
  --navy-2: #0A4A66;
  --yellow: #FECC00;
  --orange: #E94E1A;
  --blue: #006A94;
  --tint: #EAF3F7;
  --line: #CFDEE6;
  --text: #0F2430;
  --muted: #3E5562;
  --on-navy: #D6E4EB;
  --red: #B42318;
  --green: #11733D;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: #F6FAFC; color: var(--text); font-family: var(--body); font-size: 16px; line-height: 1.5; }
a { color: var(--blue); }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); font-style: italic; font-weight: 800; text-transform: uppercase; margin: 0; color: var(--navy); }
h1 { font-size: clamp(32px, 5vw, 46px); line-height: 0.95; }
h2 { font-size: 26px; line-height: 1; }
h3 { font-size: 20px; font-weight: 700; }
p { margin: 0; }
.yellow { color: var(--yellow); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 14.5px; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: #fff; padding: 12px 16px; }
[hidden] { display: none !important; }

/* Top bar */
/* White like the website's header, so the logo's navy and yellow both show. */
.bar { background: #fff; color: var(--navy); position: sticky; top: 0; z-index: 5; border-bottom: 1px solid var(--line); box-shadow: 0 2px 10px rgba(0, 53, 77, 0.05); }
.bar__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 24px; padding-top: 10px; padding-bottom: 10px; }
.brand { color: var(--navy); text-decoration: none; display: flex; align-items: center; gap: 14px; }
.brand:hover { color: var(--navy); }
.brand__logo { height: 44px; width: auto; display: block; }
.brand__sub { font-size: 14px; color: var(--muted); font-weight: 600; padding-left: 14px; border-left: 2px solid var(--line); }
.nav { display: flex; flex-wrap: wrap; gap: 0 4px; font-weight: 600; }
.nav a { color: var(--navy); text-decoration: none; padding: 10px 12px; border-radius: 999px; }
.nav a:hover { color: var(--blue); }
.nav a[aria-current="page"] { background: var(--yellow); color: var(--navy); }

.main { padding-top: 28px; padding-bottom: 64px; outline: none; }
.head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 20px; }
.head__title { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.head__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.crumb { font-weight: 600; font-size: 14.5px; text-decoration: none; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; border-radius: 999px; padding: 10px 20px; border: 0; font: inherit; font-weight: 700; cursor: pointer; line-height: 1.2; }
.btn--yellow { background: var(--yellow); color: var(--navy); }
.btn--yellow:hover { background: #FFD933; color: var(--navy); }
.btn--navy { background: var(--navy); color: #fff; }
.btn--navy:hover { background: var(--navy-2); color: #fff; }
.btn--ghost { background: #fff; color: var(--navy); box-shadow: inset 0 0 0 2px var(--line); }
.btn--ghost:hover { box-shadow: inset 0 0 0 2px var(--blue); color: var(--navy); }
.btn--danger { background: #fff; color: var(--red); box-shadow: inset 0 0 0 2px #F1C4BF; }
.btn--danger:hover { box-shadow: inset 0 0 0 2px var(--red); color: var(--red); }
.btn--sm { padding: 6px 14px; font-size: 14.5px; }
.btn:disabled { opacity: 0.6; cursor: default; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--blue); text-decoration: underline; cursor: pointer; }

/* Panels and tiles */
.panel { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
.panel + .panel, .grid + .panel, .panel + .grid { margin-top: 20px; }
.panel h2 { margin-bottom: 14px; }
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); align-items: start; }
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 20px; }
.tile { background: var(--navy); color: #fff; border-radius: 18px; padding: 16px 18px; text-decoration: none; display: flex; flex-direction: column; gap: 2px; }
.tile:hover { background: var(--navy-2); color: #fff; }
.tile__n { font-family: var(--display); font-style: italic; font-weight: 800; font-size: 44px; line-height: 1; color: var(--yellow); font-variant-numeric: tabular-nums; }
.tile__l { color: var(--on-navy); font-weight: 600; font-size: 15px; }
.tile--alert .tile__n { color: #FF8A65; }

/* Search and filters */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 14px; }
.filters .field { flex: 1 1 150px; }
.filters .field--q { flex: 3 1 260px; }
.count { margin: 0 0 10px; color: var(--muted); font-size: 14.5px; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field > span { font-weight: 600; font-size: 14.5px; color: var(--navy); }
.field small { color: var(--muted); font-size: 13.5px; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=search], input:not([type]), select, textarea {
  font: inherit; color: var(--text); background: #fff; border: 2px solid var(--line); border-radius: 12px; padding: 9px 12px; width: 100%; min-width: 0;
}
input:focus, select:focus, textarea:focus { border-color: var(--blue); outline: none; }
textarea { min-height: 90px; resize: vertical; }
.form { display: flex; flex-direction: column; gap: 20px; }
.form fieldset { border: 1px solid var(--line); border-radius: 18px; background: #fff; padding: 18px 20px 20px; margin: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.form legend { font-family: var(--display); font-style: italic; font-weight: 800; text-transform: uppercase; color: var(--navy); font-size: 20px; padding: 0 6px; }
.form .full { grid-column: 1 / -1; }
.form__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.choice { display: flex; flex-wrap: wrap; gap: 10px; grid-column: 1 / -1; }
.choice label { flex: 1 1 220px; display: flex; gap: 10px; align-items: flex-start; border: 2px solid var(--line); border-radius: 14px; padding: 12px 14px; cursor: pointer; background: #fff; }
.choice label:has(input:checked) { border-color: var(--blue); background: var(--tint); }
.choice input { margin-top: 4px; accent-color: var(--blue); }
.choice b { display: block; color: var(--navy); }
.check { display: flex; gap: 8px; align-items: center; font-weight: 600; }
.check input { width: 18px; height: 18px; accent-color: var(--blue); }
.error { background: #FDECEA; color: var(--red); border-radius: 12px; padding: 10px 14px; font-weight: 600; }
.error:empty { display: none; }

/* Tables */
.tablewrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 18px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); background: var(--tint); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr.rowlink { cursor: pointer; }
tbody tr.rowlink:hover td { background: #F3F8FB; }
td a.strong { font-weight: 700; text-decoration: none; color: var(--navy); }
td a.strong:hover { text-decoration: underline; }
.empty { padding: 28px; text-align: center; color: var(--muted); }

/* Badges */
.badge { display: inline-block; font-size: 13px; font-weight: 700; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.st-in_use { background: #E2F4EA; color: var(--green); }
.st-in_stores { background: var(--tint); color: var(--blue); }
.st-faulty { background: #FFF1D6; color: #8A5300; }
.st-retired { background: #ECEFF1; color: #4A5A63; }
.st-lost { background: #FDECEA; color: var(--red); }
.kind { background: var(--navy); color: #fff; }
.kind--company { background: var(--yellow); color: var(--navy); }
.warn { color: #8A5300; font-weight: 700; }
.bad { color: var(--red); font-weight: 700; }

/* Details */
.dl { display: grid; grid-template-columns: minmax(120px, max-content) 1fr; gap: 8px 18px; margin: 0; }
.dl dt { color: var(--muted); font-weight: 600; font-size: 14.5px; }
.dl dd { margin: 0; overflow-wrap: anywhere; }
.pre { white-space: pre-wrap; }

/* History */
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.timeline li { border-left: 3px solid var(--yellow); padding-left: 12px; }
.timeline .when { font-size: 13.5px; color: var(--muted); }
.timeline .what { font-weight: 600; }
.changes { margin: 4px 0 0; padding-left: 18px; font-size: 14.5px; color: var(--muted); }
.changes del { color: #8A9AA3; }
.note { margin-top: 4px; background: var(--tint); border-radius: 10px; padding: 8px 12px; white-space: pre-wrap; }

/* Sign-in */
.login { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 24px 48px; min-height: calc(100vh - 92px); }
.login__art { flex: 0 1 300px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.login__art img { width: 100%; max-width: 260px; height: auto; }
.login__logo { width: 100%; max-width: 280px; height: auto; margin-top: 4px; }
.login__card { flex: 0 1 400px; background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 28px; display: flex; flex-direction: column; gap: 16px; box-shadow: 0 10px 30px rgba(0, 53, 77, 0.08); }

/* One-off password box */
.secret { background: var(--navy); color: #fff; border-radius: 16px; padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.secret code { font-size: 24px; color: var(--yellow); letter-spacing: 0.05em; user-select: all; }

/* Loading and toast */
.loading { display: flex; justify-content: center; padding: 80px 0; }
.spinner { width: 36px; height: 36px; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--blue); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--navy); color: #fff; padding: 12px 20px; border-radius: 999px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; z-index: 20; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Phones: tables become cards */
@media (max-width: 720px) {
  .brand__sub { display: none; }
  .brand__logo { height: 34px; }
  .nav a { padding: 8px 10px; }
  .tablewrap.cards { background: none; border: 0; overflow: visible; }
  .cards table, .cards tbody, .cards tr, .cards td { display: block; }
  .cards thead { display: none; }
  .cards tr { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 10px 14px; margin-bottom: 10px; }
  .cards td { border: 0; padding: 3px 0; }
  .cards td[data-l]::before { content: attr(data-l) ": "; color: var(--muted); font-size: 13.5px; font-weight: 600; }
  .dl { grid-template-columns: 1fr; gap: 0; }
  .dl dd { margin-bottom: 10px; }
}

/* Categories page */
.cats { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); align-items: start; }
.cats .panel + .panel { margin-top: 0; }
.cat__row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.cat__row--top h2 { margin: 0; font-size: 24px; }
.cat__actions { margin-left: auto; display: flex; gap: 6px; }
.cat__subs { list-style: none; margin: 12px 0 0; padding: 0; border-top: 1px solid var(--line); }
.cat__subs li { padding: 8px 0 8px 14px; border-bottom: 1px solid var(--line); }
.cat__name { font-weight: 600; }

/* Detail fields */
.cat__none { margin-top: 10px; }
.fieldform { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.fieldform input, .fieldform select { flex: 1 1 130px; width: auto; padding: 6px 10px; }
.fieldform .fieldform__wide { flex-basis: 100%; }
.fieldform__buttons { display: flex; gap: 6px; }
.fieldform button { white-space: nowrap; }
.unit { display: flex; align-items: center; gap: 8px; }
.unit input { flex: 1 1 auto; }
.unit span { font-weight: 600; color: var(--muted); }

/* Import page and hidden passwords */
.plain { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
td input[data-name] { padding: 6px 10px; min-width: 220px; }
td input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--blue); }
.secretval { letter-spacing: 0.05em; }
.masked:not(:focus) { -webkit-text-security: disc; }

/* Sites grouped by customer */
.sitegroup + .sitegroup { margin-top: 26px; }
.sitegroup__head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; font-size: 24px; }
.sitegroup__head a { color: var(--navy); text-decoration: none; }
.sitegroup__head a:hover { text-decoration: underline; }
.import-pick { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
@media (min-width: 721px) { .sitegroup table { table-layout: fixed; } .sitegroup th:first-child { width: 34%; } .sitegroup th:last-child { width: 14%; } }

/* Site photos */
.photos { margin-bottom: 0; }
.photos__head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.photos__head h2 { margin: 0; flex: 1; }
.gallery { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.gallery__item { margin: 0; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.gallery__open { padding: 0; border: 0; background: var(--tint); border-radius: 12px; overflow: hidden; cursor: zoom-in; aspect-ratio: 4 / 3; }
.gallery__open img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.2s; }
.gallery__open:hover img { transform: scale(1.03); }
.gallery__item figcaption { font-size: 14px; color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.gallery__more { aspect-ratio: 4 / 3; border: 0; border-radius: 12px; background: var(--navy); color: #fff; font: inherit; font-weight: 700; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.gallery__more:hover { background: var(--navy-2); }
.gallery__plus { font-family: var(--display); font-style: italic; font-weight: 800; font-size: 44px; line-height: 1; color: var(--yellow); }
.stage { border: 2px dashed var(--line); border-radius: 14px; padding: 14px; margin-bottom: 16px; display: flex; flex-direction: column; gap: 12px; }
.stage__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.stage__list li { display: flex; gap: 12px; align-items: flex-start; }
.stage__thumb { width: 96px; height: 72px; object-fit: cover; border-radius: 8px; background: var(--tint); flex: 0 0 auto; }
.stage__thumb--bad { display: flex; align-items: center; justify-content: center; color: var(--red); font-weight: 800; font-size: 24px; }
.stage__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.viewer { position: fixed; inset: 0; z-index: 30; background: #001B27; color: #fff; display: flex; flex-direction: column; }
.viewer__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; }
.viewer__tools { display: flex; flex-wrap: wrap; gap: 8px; }
.viewer__stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 8px; }
.viewer__stage img { max-width: calc(100% - 120px); max-height: 100%; object-fit: contain; border-radius: 6px; background: #fff; }
.viewer__nav { flex: 0 0 auto; width: 48px; height: 64px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, 0.12); color: #fff; font-size: 40px; line-height: 1; cursor: pointer; }
.viewer__nav:hover { background: rgba(255, 255, 255, 0.25); }
.viewer__caption { padding: 12px 16px 18px; text-align: center; color: var(--on-navy); }
.viewer__caption b { color: #fff; font-size: 17px; }
@media (max-width: 720px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .viewer__stage img { max-width: calc(100% - 80px); }
  .viewer__nav { width: 34px; }
}

/* Reminder recipients on the Categories page */
.cat__remind { margin-top: 12px; padding: 10px 12px; background: var(--tint); border-radius: 12px; font-size: 14.5px; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; }
.remwho { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.remwho__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 6px 12px; }
