/*
 * Harbor. Navy and teal on a light sheet, shared by the customer portal
 * and the admin screens.
 */

:root {
  --ink: #17232e;
  --muted: #5c6c78;
  --navy: #1a3650;
  --teal: #0f6f68;
  --teal-dark: #0c5953;
  --line: #d5dee4;
  --sheet: #fff;
  --page: #f3f6f8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.4;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

.stripe {
  height: 6px;
  background: linear-gradient(#1a3650, #1a3650) 0 0 / 100% 4px no-repeat,
              linear-gradient(#0f6f68, #0f6f68) 0 4px / 100% 2px no-repeat;
  background-color: var(--teal);
}

.site, main, .banners {
  max-width: 90rem;
  margin: 0 auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.site {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-top: 1.15rem;
  padding-bottom: 0.2rem;
}

a.brand,
a.brand:hover,
a.brand:visited,
a.brand:focus {
  color: inherit;
  text-decoration: none;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}

.brand-name {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
}

.logo {
  height: 2.35rem;
  width: auto;
  display: block;
  flex: none;
}

.mark {
  font-family: "Source Serif 4", Palatino, serif;
  font-weight: 600;
  font-size: 1.45rem;
  letter-spacing: 0.03em;
  color: var(--navy);
  white-space: nowrap;
}

.product { color: var(--muted); white-space: nowrap; }

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
}

nav a {
  color: var(--navy);
  font-weight: 650;
  text-decoration: none;
}

nav a:hover { color: var(--teal-dark); }

nav form.button_to { display: inline-flex; margin: 0; }

button.signout {
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0.35rem 0.75rem;
  height: auto;
  font-weight: 500;
  color: var(--ink);
}

button.signout:hover { border-color: var(--navy); color: var(--ink); }

.banners { padding-top: 0.85rem; }

.notice, .alert {
  margin: 0 0 1rem;
  padding: 0.65rem 0.85rem;
  background: var(--sheet);
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
}

.alert {
  border-left-color: #9a3b4a;
  color: #7a2433;
}

.banners .notice,
.banners .alert { margin-bottom: 0; }

main { padding-top: 0.85rem; padding-bottom: 3rem; }

h1 {
  margin: 0;
  font-family: "Source Serif 4", Palatino, serif;
  font-weight: 600;
  font-size: 2.45rem;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--navy);
}

h1::after {
  content: "";
  display: block;
  height: 5px;
  margin: 0.7rem 0 0.85rem;
  background: linear-gradient(#1a3650, #1a3650) 0 0 / 100% 3px no-repeat,
              linear-gradient(#0f6f68, #0f6f68) 0 4px / 100% 1px no-repeat;
}

h2, h3 { color: var(--navy); font-weight: 650; }
h2 { margin: 1.4rem 0 0.55rem; font-size: 1.25rem; }
h3 { margin: 1.1rem 0 0.4rem; font-size: 1.05rem; }

.lede, .empty { margin: 0 0 1.15rem; color: var(--muted); }

main a { color: var(--teal-dark); }
main a:hover { color: var(--navy); }

main ul { padding-left: 1.2rem; }
main li { margin: 0.35rem 0; }

.filters, .sheet-form, main section {
  background: var(--sheet);
  border: 1px solid var(--line);
}

.filters { padding: 1rem 1.15rem 1.05rem; }

.sheet-form {
  max-width: 28rem;
  display: grid;
  gap: 0.85rem;
  padding: 1rem 1.15rem 1.15rem;
}

.sign-in {
  display: grid;
  grid-template-columns: minmax(0, 28rem) minmax(16rem, 22rem);
  gap: 1.25rem;
  align-items: stretch;
}

.sign-in .sheet-form { max-width: none; }

.access-invite {
  display: flex;
  flex-direction: column;
  background: var(--sheet);
  border: 1px solid var(--line);
  border-top: 4px solid var(--teal);
  padding: 1.15rem 1.2rem 1.25rem;
}

.access-invite h2 {
  margin: 0 0 0.45rem;
  font-family: "Source Serif 4", Palatino, serif;
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--navy);
}

.access-invite p {
  margin: 0 0 1.1rem;
  color: var(--ink);
}

a.access-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  margin-top: auto;
  min-width: 8.75rem;
  height: 42px;
  padding: 0 0.9rem;
  border-radius: 3px;
  background: var(--navy);
  color: #fff;
  font-weight: 650;
  text-decoration: none;
}

a.access-action:hover { background: #12283b; color: #fff; }

@media (max-width: 760px) {
  .sign-in { grid-template-columns: 1fr; }
}

main section {
  margin: 0 0 0.75rem;
  padding: 0.85rem 1rem;
}

main section form,
main section .button_to {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin: 0.35rem 0.5rem 0.35rem 0;
}

.group-label {
  margin: 0 0 0.55rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--navy);
}

.station-list {
  border: 1px solid #c5d0d6;
  border-radius: 3px;
  background: #fff;
  overflow: hidden;
}

.station-list label {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0;
  padding: 0.62rem 0.9rem;
  font-weight: 500;
  white-space: nowrap;
}

.station-list label:hover { background: #f3faf9; }

.station-list label.all {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f3faf9;
  font-weight: 650;
  color: var(--navy);
  border-bottom: 1px solid #d5dee4;
}

.station-list input {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--teal);
  flex: none;
}

.station-scroll {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
  background: #fff;
  max-height: 14rem;
  overflow-y: auto;
}

.station-scroll label {
  background: #fff;
  box-shadow: inset -1px -1px 0 #e6eef2;
}

.fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.85rem;
  margin-top: 1.25rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  font-size: 0.82rem;
  font-weight: 650;
}

.check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 650;
}

input[type="date"],
input[type="search"],
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
select {
  height: 40px;
  border: 1px solid #c5d0d6;
  background: #fff;
  border-radius: 3px;
  padding: 0 0.55rem;
  font-weight: 450;
}

.fields input[type="date"],
.fields select,
.sheet-form input[type="text"],
.sheet-form input[type="email"],
.sheet-form input[type="password"],
.sheet-form input[type="tel"],
.sheet-form input[type="date"],
.sheet-form select { width: 100%; }

.actions { display: flex; justify-content: flex-end; margin-top: 0.9rem; }

button, input[type="submit"], .exports a {
  height: 40px;
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0 0.75rem;
}

input.preview,
button.preview,
a.preview {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 8.75rem;
  height: 42px;
  border: 0;
  border-radius: 3px;
  background: var(--teal);
  color: #fff;
  font-weight: 650;
  text-decoration: none;
}

.sheet-form .preview { justify-self: start; }

button:hover, input[type="submit"]:hover, .exports a:hover {
  border-color: var(--teal);
  color: var(--teal-dark);
}

input.preview:hover,
button.preview:hover,
a.preview:hover {
  background: var(--teal-dark);
  color: #fff;
  border-color: transparent;
}

table.requests th,
table.requests td { padding-left: 0.55rem; padding-right: 0.55rem; }

td.request-actions {
  width: 1%;
  white-space: nowrap;
}

.request-actions-line {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  column-gap: 1.15rem;
  row-gap: 0.35rem;
}

@media (max-width: 760px) {
  td.request-actions { width: auto; white-space: normal; }
  .request-actions-line { flex-wrap: wrap; }
}

.request-actions-line form { display: inline-flex; margin: 0; }

.request-actions-line button.text-action,
.request-actions-line input.text-action,
.request-actions-line a.text-action {
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--teal);
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.request-actions-line button.text-action:hover,
.request-actions-line input.text-action:hover,
.request-actions-line a.text-action:hover {
  border: 0;
  background: none;
  color: var(--teal-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.company-page .actions { justify-content: flex-start; }
.company-page .filters { margin-bottom: 1.25rem; }
.company-page .filters .lede { margin-bottom: 0.85rem; }
.company-page h2 { margin-top: 1.75rem; }

.company-forms {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr));
  gap: 1.25rem;
  align-items: stretch;
  margin-bottom: 0.25rem;
}

.company-forms .filters {
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
}

.company-forms .actions {
  margin-top: auto;
  padding-top: 0.9rem;
}

.passwords { border-top: 4px solid var(--teal); }

.field .value {
  min-height: 40px;
  display: flex;
  align-items: center;
  font-size: 1rem;
  font-weight: 500;
}

.filters input[type="file"] {
  height: auto;
  padding: 0.4rem 0;
  border: 0;
  background: transparent;
  font-weight: 450;
}

.record-table { margin-bottom: 0.5rem; }

.record-table input[type="text"],
.record-table input[type="email"] {
  width: 100%;
  min-width: 11rem;
  height: 36px;
}

.record-table td.request-actions { width: auto; white-space: normal; }
.record-table .request-actions-line { flex-wrap: wrap; }

.results-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 1.45rem 0 0.8rem;
}

.total { margin: 0; }

.total strong {
  font-family: "Source Serif 4", Palatino, serif;
  font-size: 1.85rem;
  font-weight: 600;
  margin-right: 0.2rem;
  color: var(--navy);
}

.narrow {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.narrow input[type="search"] { width: 15rem; }
.narrow select { width: 5.2rem; }

.apply { font-weight: 600; }

.exports {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.65rem;
}

.exports .label {
  margin-right: 0.25rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.exports a {
  display: inline-flex;
  align-items: center;
  height: 34px;
  font-size: 0.92rem;
  color: inherit;
  text-decoration: none;
}

.export-note { margin: 0 0 0 0.35rem; color: var(--muted); font-size: 0.88rem; }

.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--sheet);
  border: 1px solid var(--line);
}

th, td {
  text-align: left;
  padding: 0.42rem 0.7rem;
  border-bottom: 1px solid #e3ebef;
  border-right: 1px solid #e7eef2;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  vertical-align: middle;
}

th:last-child, td:last-child { border-right: 0; }

th {
  background: #f4f7f8;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

th a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  font-weight: 700;
  color: #3d6d78;
  text-decoration: none;
}

th[aria-sort="ascending"] a,
th[aria-sort="descending"] a { color: var(--teal-dark); }

th a:hover { text-decoration: underline; text-underline-offset: 3px; }

.caret {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
}

th[aria-sort="ascending"] .caret { transform: rotate(180deg); }

td.tickets, th.num { text-align: right; }
th.num a { width: 100%; justify-content: flex-end; }

td.job { font-weight: 650; color: var(--navy); }

.kog {
  display: inline-block;
  min-width: 3.3rem;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  background: #e6eef2;
  color: var(--navy);
}

.kog.swwh { background: #f6e7c4; color: #6a4d0e; }
.kog.hrw { background: #f0ddd0; color: #6a3b22; }

tbody tr:nth-child(even) { background: #f7fafb; }
tbody tr:hover { background: #e7f3f2; }

.more { margin: 0.75rem 0 0; color: var(--muted); font-size: 0.92rem; }
.more a { margin-left: 0.75rem; font-weight: 650; }

code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.92em;
  background: #eef3f5;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
}

:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

@media print {
  .stripe, header, .no-print, .banners { display: none; }

  body { background: white; }
}
