/* PolyHaul Freight - retro 1990s stylesheet. Light blue, no rounded corners. */

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0;
  background: #a9c4e2;
  /* faint diagonal pinstripe - vintage ledger paper feel */
  background-image: repeating-linear-gradient(45deg,
      rgba(255,255,255,0.10) 0, rgba(255,255,255,0.10) 1px,
      transparent 1px, transparent 7px);
  color: #002b55;
  font-family: Verdana, Geneva, Arial, sans-serif;
  font-size: 13px;
  line-height: 1.4;
}

a { color: #0033aa; }
a:visited { color: #0033aa; }
a:hover { color: #cc0000; }

/* Everything sits in a fixed old-school centered table-ish shell */
.page {
  width: 880px;
  max-width: 96%;
  margin: 16px auto;
  background: #eef4fb;
  /* thick vintage double frame */
  border: 3px solid #16375c;
  outline: 3px solid #eef4fb;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px #16375c, 6px 8px 0 rgba(11,31,58,0.35);
}

/* Flat vintage title bar - no gradient */
.masthead {
  background: #16375c;
  color: #ffffff;
  padding: 12px 16px 10px;
  border-bottom: 3px double #7fb0e6;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}
.masthead .brand { display: flex; align-items: center; gap: 12px; }
.masthead .brand img {
  width: 46px;
  height: 46px;
  display: block;
  border: 2px solid #ffcc33;
}
.masthead h1 {
  margin: 0;
  font-size: 26px;
  font-family: "Arial Black", Impact, Haettenschweiler, sans-serif;
  letter-spacing: -0.5px;
  text-transform: uppercase;
}
.masthead .tag {
  font-family: "Courier New", Courier, monospace;
  font-size: 10px;
  color: #a9ccf0;
  text-align: right;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Nav bar - monospace dispatch tabs */
.nav {
  background: #0f2a47;
  padding: 0;
  font-family: "Courier New", Courier, monospace;
  border-bottom: 3px solid #16375c;
}
.nav a {
  display: inline-block;
  padding: 6px 14px;
  margin: 0;
  background: #0f2a47;
  border-right: 1px solid #2b4a6f;
  color: #cfe3f5;
  text-decoration: none;
  font-weight: bold;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.nav a:hover { background: #ffcc33; color: #0f2a47; }

.content { padding: 14px; }

h2 {
  font-family: "Arial Black", Impact, Haettenschweiler, sans-serif;
  color: #16375c;
  border-bottom: 3px double #4a7bb5;
  padding-bottom: 4px;
  font-size: 19px;
  text-transform: uppercase;
  letter-spacing: -0.5px;
  margin-top: 0;
}
h3 { color: #16375c; font-size: 14px; margin-bottom: 4px; text-transform: uppercase; }

/* Beveled buttons / inputs */
input[type=text], input[type=password], select {
  border: 2px solid #6f9bcb;
  border-top-color: #4a7bb5;
  border-left-color: #4a7bb5;
  background: #ffffff;
  padding: 4px;
  font-family: Verdana, Arial, sans-serif;
  font-size: 13px;
}
button, input[type=submit] {
  background: #dce9f7;
  border: 2px solid #16375c;
  border-top-color: #ffffff;
  border-left-color: #ffffff;
  padding: 4px 16px;
  font-weight: bold;
  font-size: 12px;
  color: #002b55;
  cursor: pointer;
}
button:active, input[type=submit]:active {
  border: 2px solid #ffffff;
  border-top-color: #16375c;
  border-left-color: #16375c;
}

/* Data table - the loadboard */
table.loads {
  width: 100%;
  border-collapse: collapse;
  border: 2px solid #4a7bb5;
  background: #ffffff;
  font-size: 12px;
}
table.loads th {
  background: #2f5f9f;
  color: #ffffff;
  border: 1px solid #16375c;
  padding: 4px 6px;
  text-align: left;
  font-size: 11px;
}
table.loads td {
  border: 1px solid #a9c6e6;
  padding: 4px 6px;
}
table.loads tr:nth-child(even) td { background: #eaf2fb; }
table.loads tr:hover td { background: #ffffcc; }

.status-open { color: #007700; font-weight: bold; }
.status-covered { color: #999999; }
.status-hot { color: #cc0000; font-weight: bold; }

/* Info boxes */
.box {
  border: 2px solid #4a7bb5;
  border-top-color: #ffffff;
  border-left-color: #ffffff;
  background: #f4f9ff;
  padding: 10px;
  margin: 10px 0;
}

.footer {
  background: #b9d2ec;
  border-top: 2px solid #4a7bb5;
  padding: 8px 14px;
  font-size: 10px;
  color: #16375c;
  text-align: center;
}

.hero {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.hero .blurb { flex: 1; min-width: 300px; }

.gallery {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 12px 0;
}
.gallery figure {
  margin: 0;
  border: 2px solid #4a7bb5;
  border-top-color: #ffffff;
  border-left-color: #ffffff;
  background: #ffffff;
  padding: 4px;
  text-align: center;
}
.gallery figcaption { font-size: 10px; color: #16375c; padding-top: 3px; }

.login-wrap { width: 340px; margin: 0 auto; }
.login-wrap label { display: block; font-weight: bold; margin-top: 8px; }
.login-wrap input { width: 100%; }
.err {
  color: #cc0000;
  font-weight: bold;
  background: #ffe0e0;
  border: 1px solid #cc0000;
  padding: 6px;
  margin: 8px 0;
}
.hint { font-size: 11px; color: #555; }

.marquee-bar {
  background: #16375c;
  color: #ffff66;
  font-size: 11px;
  padding: 3px 0;
  overflow: hidden;
  white-space: nowrap;
}

/* ============================================================
   Landing v2 - real photos, slightly modern, still old vibes
   ============================================================ */

/* Split hero - solid text panel beside a full photo, NO gradient overlay */
.phero {
  display: flex;
  align-items: stretch;
  background: #0f2a47;
  border-bottom: 3px solid #16375c;
}
.phero .copy {
  width: 42%;
  flex-shrink: 0;
  padding: 22px 22px;
  color: #ffffff;
  background: #16375c;
  border-right: 3px double #7fb0e6;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.phero .photo {
  flex: 1;
  overflow: hidden;
}
.phero img.bg {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
}
.phero .kicker {
  font-family: "Courier New", Courier, monospace;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #ffcc33;
  margin-bottom: 10px;
  border-bottom: 1px dashed #4d7bb0;
  padding-bottom: 6px;
}
.phero h2 {
  font-family: "Arial Black", Impact, Haettenschweiler, sans-serif;
  font-size: 38px;
  line-height: 0.98;
  margin: 0 0 12px 0;
  color: #ffffff;
  border: none;
  text-transform: uppercase;
  letter-spacing: -1px;
}
.phero h2 em { color: #ffcc33; font-style: normal; }
.phero p {
  font-size: 13px;
  margin: 0 0 16px 0;
  color: #d8e6f6;
}
.btnrow a {
  display: inline-block;
  padding: 9px 18px;
  margin-right: 8px;
  font-weight: bold;
  font-size: 13px;
  text-decoration: none;
  border: 2px solid #0a1f38;
}
.btn-primary {
  background: #ffcc33;
  color: #3a2a00;
  border-top-color: #fff0b8 !important;
  border-left-color: #fff0b8 !important;
}
.btn-primary:hover { background: #ffd94d; color: #3a2a00; }
.btn-ghost {
  background: rgba(255,255,255,0.14);
  color: #ffffff;
  border-color: #bcd6f2;
}
.btn-ghost:hover { background: rgba(255,255,255,0.28); color: #ffffff; }

/* Stat strip - dispatch readout, monospace */
.stats {
  display: flex;
  background: #d7e6f7;
  color: #16375c;
  border-bottom: 3px double #16375c;
  font-family: "Courier New", Courier, monospace;
}
.stats div {
  flex: 1;
  text-align: center;
  padding: 9px 6px;
  border-right: 1px dashed #7fa8d4;
}
.stats div:last-child { border-right: none; }
.stats b {
  display: block;
  font-family: "Arial Black", Impact, sans-serif;
  font-size: 22px;
  color: #16375c;
  line-height: 1;
}
.stats span { font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: #40628a; }

/* Feature cards with real photos */
.cards {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 4px 0 14px 0;
}
.card {
  flex: 1;
  min-width: 220px;
  background: #ffffff;
  border: 2px solid #4a7bb5;
  border-top-color: #ffffff;
  border-left-color: #ffffff;
}
.card img {
  display: block;
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-bottom: 2px solid #4a7bb5;
}
.card .cap { padding: 8px 10px 10px; }
.card .cap h4 {
  margin: 0 0 4px 0;
  font-family: "Arial Black", Impact, sans-serif;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: -0.3px;
  color: #16375c;
}
.card .cap p { margin: 0; font-size: 11px; color: #33506e; }

/* Split feature (image + text) */
.split {
  display: flex;
  gap: 14px;
  align-items: stretch;
  margin: 14px 0;
}
.split img {
  width: 300px;
  height: 200px;
  object-fit: cover;
  border: 2px solid #4a7bb5;
  border-top-color: #ffffff;
  border-left-color: #ffffff;
}
.split .txt { flex: 1; }

.check { list-style: none; padding-left: 0; margin: 8px 0; }
.check li { padding: 3px 0 3px 20px; position: relative; }
.check li:before {
  content: "\25A0";
  color: #2f7f3f;
  position: absolute;
  left: 2px;
  font-size: 11px;
}

@media (max-width: 640px) {
  .phero .copy { position: static; width: auto; }
  .phero img.bg { height: 170px; }
  .phero h2 { font-size: 26px; }
  .split { flex-direction: column; }
  .split img { width: 100%; }
}

/* Expandable load rows */
table.loads tr.loadrow { cursor: pointer; }
table.loads tr.loadrow td.exp {
  width: 14px;
  text-align: center;
  font-family: "Courier New", monospace;
  font-weight: bold;
  color: #2f5f9f;
}
table.loads tr.loadrow.open td { background: #fff6cc; }
table.loads tr.loadrow.open td.exp { color: #cc0000; }
table.loads tr.detail td {
  background: #f4f9ff !important;
  border-top: none;
  padding: 0;
}
.detailbox {
  padding: 10px 14px 12px;
  border-left: 6px solid #ffcc33;
  font-family: Verdana, Arial, sans-serif;
}
.detailbox h4 {
  margin: 0 0 6px 0;
  font-family: "Arial Black", Impact, sans-serif;
  text-transform: uppercase;
  font-size: 13px;
  color: #16375c;
}
.detailgrid {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  margin-bottom: 8px;
}
.detailgrid div { font-size: 12px; min-width: 180px; }
.detailgrid b { color: #16375c; font-family: "Courier New", monospace; }
.detailbox .bigrate {
  font-family: "Arial Black", Impact, sans-serif;
  font-size: 20px;
  color: #007700;
}
.detailbox .book {
  display: inline-block;
  margin-top: 4px;
  padding: 6px 16px;
  background: #ffcc33;
  color: #3a2a00;
  border: 2px solid #16375c;
  border-top-color: #fff0b8;
  border-left-color: #fff0b8;
  font-weight: bold;
  font-size: 12px;
  text-decoration: none;
}
.detailbox .book:hover { background: #ffd94d; color: #3a2a00; }

/* Perpetual "loading" state inside an expanded load + download fallback */
.loadingwrap {
  padding: 14px 16px 16px;
  border-left: 6px solid #ffcc33;
  text-align: center;
}
.loadingwrap .spinmsg {
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
  color: #16375c;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}
/* Classic circular spinner (never completes) */
.spinner {
  width: 34px;
  height: 34px;
  margin: 4px auto 12px;
  border: 5px solid #cddff0;
  border-top-color: #2f5f9f;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.loadingwrap .fallback {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #a9c6e6;
  font-size: 11px;
  color: #555;
}
.dlbtn {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 12px;
  background: #dce9f7;
  border: 2px solid #16375c;
  border-top-color: #ffffff;
  border-left-color: #ffffff;
  color: #16375c;
  font-weight: bold;
  font-size: 11px;
  text-decoration: none;
  cursor: pointer;
}
.dlbtn:hover { background: #ffffcc; color: #16375c; }
