:root {
  --ink: #16252b;
  --tape: #f4b400;
  --tape-dark: #c78f00;
  --paper: #f2f4f3;
  --line: #d5dcda;
  --ok: #1f7a4d;
  --danger: #b3261e;
}

body {
  font-family: 'Barlow', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
}

a:focus-visible, .btn:focus-visible, button:focus-visible {
  outline: 3px solid #0b57d0;
  outline-offset: 2px;
}

/* Brand mark: a small parcel with tape */
.pt-mark {
  display: inline-block;
  width: 28px;
  height: 28px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M3 9l4-6h18l4 6z' fill='%23c78f00'/%3E%3Crect x='3' y='9' width='26' height='20' rx='2' fill='%23f4b400'/%3E%3Crect x='13' y='9' width='6' height='20' fill='%2316252b'/%3E%3C/svg%3E") center / contain no-repeat;
}
.pt-brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: #fff;
  font-weight: 700;
  font-size: 1.2rem;
  text-decoration: none;
}
.pt-brand:hover { color: #fff; }

/* Navigation bar */
.pt-nav {
  background: var(--ink);
  border-bottom: 4px solid var(--tape);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .25rem 1.5rem;
  padding: .5rem 1rem;
}
.pt-links {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.pt-links a, .pt-user a {
  display: block;
  color: #c9d6da;
  padding: .5rem .75rem;
  border-bottom: 3px solid transparent;
  text-decoration: none;
}
.pt-links a:hover, .pt-user a:hover { color: #fff; }
.pt-links a.active { color: #fff; border-bottom-color: var(--tape); }
.pt-nav a:focus-visible { outline-color: var(--tape); }
.pt-user {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .25rem .5rem;
  color: #c9d6da;
}
.pt-role {
  background: var(--tape);
  color: var(--ink);
  font-weight: 600;
  padding: .1rem .6rem;
  border-radius: 3px;
  font-size: .85rem;
}

/* Page area */
.content-wrapper { background: var(--paper); }
.content-header { padding: 1.5rem .5rem 1rem; }
.content-header h1 { font-size: 1.75rem; font-weight: 700; margin: 0; }
.main-footer { background: transparent; border-top: 1px solid var(--line); color: #51656c; }

.card { border: 1px solid var(--line); border-radius: 6px; box-shadow: none; }
.card.card-outline.card-primary { border-top: 3px solid var(--ink); }

/* Forms and buttons */
label { font-weight: 600; margin-bottom: .25rem; }
.form-control {
  border-radius: 4px;
  border-color: #9fb0b5;
  height: calc(2.5rem + 2px);
}
.form-control:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(244, 180, 0, .45);
}
.btn { border-radius: 4px; font-weight: 600; }
.btn-primary, .btn-primary:focus {
  background: var(--tape);
  border-color: var(--tape);
  color: var(--ink);
}
.btn-primary:hover {
  background: var(--tape-dark);
  border-color: var(--tape-dark);
  color: var(--ink);
}

/* Alerts and tables */
.alert { border: 0; border-left: 5px solid; border-radius: 3px; }
.alert-danger { background: #fbe9e7; color: #7a1710; border-left-color: var(--danger); }
.alert-success { background: #e4f3ea; color: #145236; border-left-color: var(--ok); }
.table thead th { background: var(--ink); color: #fff; border: 0; }
.table td, .table th { vertical-align: middle; }

/* Login and register: the shipping label */
body.pt-auth {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.pt-label {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 2px;
}
.pt-label.wide { max-width: 480px; }
.pt-label-top { background: var(--ink); padding: 1rem 1.25rem; }
.pt-label-body { padding: 1.5rem 1.25rem 1.25rem; }
.pt-label-title { font-size: 1.6rem; font-weight: 700; margin: 0 0 1rem; }
.pt-perf { border: 0; border-top: 2px dashed var(--ink); margin: 0; }
.pt-label-stub { padding: 1rem 1.25rem 1.25rem; }
.pt-label-stub a { display: block; padding: .15rem 0; color: var(--ink); text-decoration: underline; }
.pt-barcode {
  height: 44px;
  margin-top: 1rem;
  background: repeating-linear-gradient(90deg,
    var(--ink) 0 2px, transparent 2px 4px,
    var(--ink) 4px 5px, transparent 5px 9px,
    var(--ink) 9px 12px, transparent 12px 14px);
}

@media (max-width: 576px) {
  .pt-user { margin-left: 0; width: 100%; }
}