:root{
  --brand:#0d6efd;
  --bg:#f6f7fb;
  --card:#ffffff;
  --text:#111827;
}

.bg-soft{ background: var(--bg); }

.brand-dot{
  width: 42px; height: 42px; border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), #1f6feb);
  box-shadow: 0 8px 24px rgba(13,110,253,.25);
}

.rounded-4{ border-radius: 1rem !important; }

.pill{
  display:inline-flex;
  align-items:center;
  padding:.25rem .55rem;
  border-radius:999px;
  font-size:.85rem;
  font-weight:700;
  border:1px solid transparent;
}
.pill-ok{ background:#ecfdf5; border-color:#a7f3d0; color:#065f46; }
.pill-warn{ background:#fffbeb; border-color:#fde68a; color:#92400e; }
.pill-bad{ background:#fef2f2; border-color:#fecaca; color:#991b1b; }

.customer-login-body {
  min-height: 100vh;
  background: #f4f7fa;
}

.customer-login-page {
  padding: 72px 24px 84px;
  background:
    linear-gradient(180deg, #f4f7fa 0%, #ffffff 100%);
}

.customer-login-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(380px, 0.78fr);
  gap: 36px;
  align-items: start;
}

.customer-login-intro {
  padding-top: 22px;
}

.customer-login-intro h1 {
  max-width: 620px;
  margin: 0;
  color: #102033;
  font-size: clamp(2rem, 3.2vw, 2.75rem);
  line-height: 1.06;
}

.customer-login-intro p:not(.eyebrow) {
  max-width: 620px;
  margin: 14px 0 0;
  color: #54657a;
  font-size: 1rem;
}

.customer-access-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 28px;
}

.customer-access-item,
.customer-login-card,
.customer-flow-panel {
  border: 1px solid #dbe3ea;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(16, 32, 51, .10);
}

.customer-access-item {
  min-height: 108px;
  padding: 16px;
}

.customer-access-item span {
  display: block;
  color: #54657a;
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.customer-access-item strong {
  display: block;
  margin-top: 8px;
  color: #102033;
  font-size: 1.08rem;
  line-height: 1.25;
}

.customer-flow-panel {
  margin-top: 16px;
  padding: 20px;
  box-shadow: none;
}

.customer-flow-panel h2 {
  margin: 0 0 14px;
  color: #102033;
  font-size: 1.05rem;
  line-height: 1.3;
}

.customer-flow-step {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid #dbe3ea;
  color: #54657a;
  font-size: .92rem;
}

.customer-flow-step:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.customer-flow-step b {
  display: block;
  color: #102033;
  font-size: .94rem;
}

.step-num {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #edf4fb;
  color: #0a325c;
  font-weight: 900;
  font-size: .82rem;
}

.customer-login-card {
  overflow: hidden;
}

.customer-login-card-head {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 14px;
  align-items: center;
  padding: 26px 28px 18px;
  border-bottom: 1px solid #dbe3ea;
  background: #fff;
}

.portal-mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #0a325c;
  color: #fff;
  font-size: .86rem;
  font-weight: 900;
  letter-spacing: .06em;
}

.customer-login-card-head h2 {
  margin: 0;
  color: #102033;
  font-size: 1.72rem;
  line-height: 1.18;
}

.customer-login-card-head p {
  margin: 7px 0 0;
  color: #54657a;
  font-size: .94rem;
}

.customer-login-card-body {
  padding: 24px 28px 28px;
}

.customer-alert {
  margin-bottom: 18px;
  padding: 13px 14px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fef2f2;
  color: #991b1b;
  font-size: .92rem;
  font-weight: 750;
}

.customer-login-form {
  display: grid;
  gap: 15px;
}

.customer-field label {
  display: block;
  margin-bottom: 8px;
  color: #35465a;
  font-size: .86rem;
  font-weight: 850;
}

.customer-field input {
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid #bac7d4;
  border-radius: 6px;
  background: #fff;
  color: #102033;
  font: inherit;
  outline: none;
}

.customer-field input:focus {
  border-color: #1459a6;
  box-shadow: 0 0 0 3px rgba(20, 89, 166, .14);
}

.customer-primary-btn {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 6px;
  background: #1459a6;
  color: #fff;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(20, 89, 166, .24);
}

.customer-primary-btn:hover {
  background: #0a325c;
}

.customer-security-note {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #dbe3ea;
  color: #54657a;
  font-size: .82rem;
}

@media (max-width: 920px) {
  .customer-login-page {
    padding: 52px 18px 62px;
  }

  .customer-login-shell {
    grid-template-columns: 1fr;
  }

  .customer-login-intro {
    padding-top: 0;
  }

  .customer-login-card {
    order: -1;
  }

  .customer-access-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .customer-login-card-head,
  .customer-login-card-body {
    padding-left: 20px;
    padding-right: 20px;
  }

  .customer-login-card-head {
    grid-template-columns: 1fr;
  }
}

.customer-portal-body {
  min-height: 100vh;
  background: #f4f7fa;
}

.customer-portal-page {
  padding: 54px 24px 78px;
  background: linear-gradient(180deg, #f4f7fa 0%, #fff 100%);
}

.customer-portal-hero,
.customer-stat-grid,
.customer-dashboard-grid,
.customer-panel,
.customer-portal-page > .customer-alert {
  width: min(1120px, 100%);
  margin-left: auto;
  margin-right: auto;
}

.customer-portal-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.customer-portal-hero h1 {
  max-width: 760px;
  margin: 0;
  color: #102033;
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  line-height: 1.04;
}

.customer-portal-hero p:not(.eyebrow) {
  max-width: 720px;
  margin: 12px 0 0;
  color: #54657a;
}

.customer-portal-hero .customer-status {
  margin-right: 8px;
}

.customer-portal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  color: #54657a;
  font-size: .92rem;
  font-weight: 750;
}

.customer-secondary-btn,
.customer-primary-small {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 6px;
  font: inherit;
  font-size: .92rem;
  font-weight: 850;
  text-decoration: none;
}

.customer-secondary-btn {
  border: 1px solid #bac7d4;
  background: #fff;
  color: #0a325c;
}

.customer-primary-small {
  border: 1px solid #1459a6;
  background: #1459a6;
  color: #fff;
}

.customer-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.customer-stat-card,
.customer-panel {
  border: 1px solid #dbe3ea;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(16, 32, 51, .08);
}

.customer-stat-card {
  min-height: 112px;
  padding: 18px;
}

.customer-stat-card span,
.customer-kv-list span,
.customer-detail-grid span,
.customer-summary-grid span {
  display: block;
  color: #54657a;
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.customer-stat-card strong {
  display: block;
  margin-top: 10px;
  color: #102033;
  font-size: 2.1rem;
  line-height: 1;
}

.customer-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(280px, .42fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.customer-panel {
  padding: 24px;
  margin-bottom: 18px;
}

.customer-panel-head {
  margin-bottom: 18px;
}

.customer-panel-head h2,
.customer-table-head h2 {
  margin: 0;
  color: #102033;
  font-size: 1.55rem;
  line-height: 1.18;
}

.customer-panel-head p:not(.eyebrow),
.customer-table-head p {
  margin: 8px 0 0;
  color: #54657a;
}

.customer-kv-list {
  display: grid;
  gap: 14px;
}

.customer-kv-list div {
  padding-top: 14px;
  border-top: 1px solid #dbe3ea;
}

.customer-kv-list div:first-child {
  padding-top: 0;
  border-top: 0;
}

.customer-kv-list strong {
  display: block;
  margin-top: 4px;
  color: #102033;
  line-height: 1.35;
}

.customer-table-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.customer-search,
.customer-field select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid #bac7d4;
  border-radius: 6px;
  background: #fff;
  color: #102033;
  font: inherit;
  outline: none;
}

.customer-search {
  max-width: 270px;
}

.customer-search:focus,
.customer-field select:focus {
  border-color: #1459a6;
  box-shadow: 0 0 0 3px rgba(20, 89, 166, .14);
}

.customer-table-wrap {
  overflow-x: auto;
  border: 1px solid #dbe3ea;
  border-radius: 8px;
}

.customer-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
  background: #fff;
}

.customer-table th,
.customer-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #dbe3ea;
  color: #102033;
  text-align: left;
  vertical-align: top;
  font-size: .92rem;
}

.customer-table th {
  background: #edf4fb;
  color: #35465a;
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.customer-table tr:last-child td {
  border-bottom: 0;
}

.customer-link-cell a {
  color: #1459a6;
  font-weight: 900;
  text-decoration: none;
}

.customer-link-cell a:hover {
  text-decoration: underline;
}

.customer-status {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: .76rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.customer-status.is-delivered {
  border-color: #a7f3d0;
  background: #ecfdf5;
  color: #065f46;
}

.customer-status.is-active {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4f91;
}

.customer-status.is-assigned {
  border-color: #c7d2fe;
  background: #eef2ff;
  color: #3730a3;
}

.customer-status.is-muted {
  border-color: #dbe3ea;
  background: #f4f7fa;
  color: #54657a;
}

.customer-status.is-pending {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.customer-empty {
  color: #54657a !important;
  text-align: center !important;
}

.customer-detail-grid,
.customer-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid #dbe3ea;
  border-radius: 8px;
  background: #dbe3ea;
}

.customer-detail-grid > div,
.customer-summary-grid > div {
  min-height: 104px;
  padding: 16px;
  background: #fff;
}

.customer-detail-grid strong,
.customer-summary-grid strong {
  display: block;
  margin-top: 8px;
  color: #102033;
  line-height: 1.35;
}

.customer-detail-grid em {
  display: block;
  margin-top: 8px;
  color: #54657a;
  font-style: normal;
  font-size: .82rem;
}

.customer-detail-wide {
  grid-column: 1 / -1;
}

.customer-alert {
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fef2f2;
  color: #991b1b;
  font-size: .92rem;
}

.customer-alert.is-warning {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.customer-alert.is-info,
.customer-alert.is-light {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4f91;
}

.customer-alert.is-success {
  border-color: #a7f3d0;
  background: #ecfdf5;
  color: #065f46;
}

.customer-alert-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.customer-timeline {
  display: grid;
  gap: 12px;
}

.customer-route-point,
.customer-timeline-item {
  position: relative;
  padding: 15px 16px 15px 52px;
  border: 1px solid #dbe3ea;
  border-radius: 8px;
  background: #fff;
}

.customer-route-point::before,
.customer-timeline-item::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 18px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #1459a6;
}

.customer-timeline-item.is-recent::before {
  background: #c78b32;
}

.customer-timeline-item.is-expected {
  color: #54657a;
  background: #f8fafc;
}

.customer-route-point span,
.customer-timeline-time {
  display: block;
  margin-bottom: 5px;
  color: #54657a;
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.customer-route-point strong,
.customer-timeline-item strong {
  color: #102033;
}

.customer-timeline-terminal,
.customer-timeline-action {
  margin-top: 5px;
  color: #54657a;
  font-size: .88rem;
}

.customer-admin-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.customer-field small {
  display: block;
  margin-top: 7px;
  color: #54657a;
  font-size: .82rem;
}

.customer-fit-btn {
  width: auto;
  padding-left: 22px;
  padding-right: 22px;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

@media (max-width: 980px) {
  .customer-portal-hero,
  .customer-table-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .customer-portal-actions {
    justify-content: flex-start;
  }

  .customer-stat-grid,
  .customer-dashboard-grid,
  .customer-detail-grid,
  .customer-summary-grid,
  .customer-admin-form {
    grid-template-columns: 1fr;
  }

  .customer-detail-wide {
    grid-column: auto;
  }

  .customer-search {
    max-width: none;
  }
}

@media (max-width: 760px) {
  .customer-portal-page {
    padding: 42px 18px 58px;
  }

  .customer-panel {
    padding: 20px;
  }

  .customer-stat-card {
    min-height: 92px;
  }

  .customer-table {
    min-width: 720px;
  }
}
