:root {
  --blue: #0b57e3;
  --blue-soft: #e9f1ff;
  --ink: #061936;
  --muted: #60728d;
  --line: #dbe5f2;
  --surface: #ffffff;
  --back: #f3f7fd;
  --green: #087a58;
  --shadow: 0 8px 22px rgba(8, 32, 68, 0.08);
  font-family: Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--back);
  color: var(--ink);
}

body {
  padding-bottom: calc(76px + env(safe-area-inset-bottom));
}

button,
input,
select {
  font: inherit;
}

button {
  min-height: 44px;
  border: 1px solid var(--blue);
  border-radius: 8px;
  padding: 0 15px;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

button.outline {
  color: var(--blue);
  background: #fff;
}

button:disabled {
  opacity: 0.48;
  cursor: default;
}

a {
  color: inherit;
  text-decoration: none;
}

.mobile-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 62px;
  padding: 8px 15px;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.mobile-brand {
  min-width: 0;
  display: flex;
  gap: 8px;
  align-items: center;
}

.mobile-brand img {
  width: 43px;
  height: 43px;
  border-radius: 8px;
}

.mobile-brand span {
  display: grid;
  min-width: 0;
}

.mobile-brand strong {
  font-size: 18px;
  line-height: 1;
}

.mobile-brand strong span {
  display: inline;
  color: #10aab3;
}

.mobile-brand small {
  color: var(--muted);
  margin-top: 4px;
  font-size: 10px;
}

.account-button {
  max-width: 125px;
  min-height: 38px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  border-color: #d7e3f6;
  background: #fff;
  color: var(--blue);
  font-size: 13px;
}

.mobile-app {
  max-width: 520px;
  margin: 0 auto;
  padding: 14px 12px 28px;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

.welcome {
  overflow: hidden;
  margin-bottom: 20px;
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.welcome-image {
  position: relative;
  min-height: 226px;
  background:
    linear-gradient(0deg, rgba(4, 18, 43, 0.82), rgba(4, 18, 43, 0.16)),
    url("https://cdn.pixabay.com/photo/2021/11/09/21/19/port-6782391_1280.jpg") center / cover;
}

.welcome-copy {
  position: absolute;
  left: 18px;
  right: 16px;
  bottom: 18px;
  color: #fff;
}

.welcome-copy span {
  display: block;
  color: #bfe2ff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.welcome-copy h1 {
  margin: 7px 0;
  font-size: 28px;
  line-height: 1.08;
}

.welcome-copy p {
  max-width: 310px;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
}

.quick-search {
  padding: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.quick-search input {
  grid-column: 1 / -1;
}

input,
select {
  width: 100%;
  height: 47px;
  border: 1px solid #cad9ed;
  border-radius: 8px;
  padding: 0 13px;
  color: var(--ink);
  background: #fff;
}

.section-title {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  align-items: center;
  margin: 2px 2px 12px;
}

.section-title h2,
.mobile-panel h2 {
  margin: 0;
  font-size: 18px;
}

.segmented {
  display: flex;
  padding: 3px;
  border-radius: 8px;
  background: #e7eef8;
}

.segmented button {
  min-height: 35px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #415673;
  font-size: 12px;
}

.segmented button.active {
  background: var(--surface);
  color: var(--blue);
  box-shadow: 0 1px 5px rgba(12, 28, 55, 0.08);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 12px;
}

.metric-grid article {
  min-height: 88px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.metric-grid span {
  display: block;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 12px;
}

.metric-grid strong {
  font-size: 24px;
}

.mobile-panel {
  margin: 12px 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.panel-headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-headline > span {
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 11px;
  font-weight: 700;
}

.muted {
  margin: 5px 0 13px;
  color: var(--muted);
  font-size: 12px;
}

.mini-bars {
  height: 148px;
  display: flex;
  gap: 9px;
  align-items: end;
  overflow-x: auto;
}

.mini-bar {
  min-width: 47px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: end;
  gap: 5px;
  text-align: center;
}

.mini-bar strong {
  color: #314660;
  font-size: 10px;
}

.mini-bar i {
  display: block;
  min-height: 8px;
  border-radius: 5px 5px 0 0;
  background: linear-gradient(180deg, var(--blue), #69a5ff);
}

.mini-bar small {
  color: var(--muted);
  font-size: 10px;
}

.news-panel a {
  display: grid;
  gap: 5px;
  margin-top: 13px;
  padding: 12px;
  border: 1px solid #d9e6fa;
  border-radius: 7px;
  background: #f7faff;
}

.news-panel strong {
  font-size: 14px;
  line-height: 1.3;
}

.news-panel span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
}

.page-title {
  margin: 6px 3px 16px;
}

.page-title h1 {
  margin: 0 0 6px;
  font-size: 27px;
}

.page-title p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.mobile-search-card,
.account-card,
.support-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.mode-select button {
  flex: 1;
  height: auto;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr 112px;
  gap: 9px;
}

.result-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.result-summary article {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.result-summary span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 7px;
}

.result-summary strong {
  font-size: 16px;
  line-height: 1.3;
}

.result-summary article:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.mobile-results {
  display: grid;
  gap: 9px;
}

.mobile-result {
  display: grid;
  gap: 11px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.mobile-result h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.35;
}

.mobile-result dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 0;
}

.mobile-result dt {
  color: var(--muted);
  font-size: 11px;
}

.mobile-result dd {
  margin: 4px 0 0;
  font-size: 14px;
  font-weight: 700;
}

.mobile-result button {
  justify-self: start;
  min-height: 38px;
  font-size: 13px;
}

.empty-result {
  padding: 26px 12px;
  color: var(--muted);
  text-align: center;
}

.insight-menu {
  display: grid;
  gap: 9px;
}

.insight-menu a {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 16px 42px 16px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.insight-menu a::after {
  content: ">";
  position: absolute;
  top: 22px;
  right: 17px;
  color: var(--blue);
  font-weight: 700;
}

.insight-menu span {
  color: var(--muted);
  font-size: 13px;
}

.support-panel {
  margin-top: 20px;
  box-shadow: none;
  background: #eef5ff;
}

.support-panel h2 {
  margin: 0;
  font-size: 19px;
}

.support-panel a {
  padding: 13px;
  border-radius: 7px;
  color: #fff;
  background: var(--blue);
  text-align: center;
  font-weight: 700;
}

.support-panel a.green {
  background: var(--green);
}

.account-card label,
.mobile-sheet label {
  display: grid;
  gap: 6px;
  color: #415673;
  font-size: 13px;
  font-weight: 600;
}

.status {
  min-height: 18px;
  margin: 0;
  color: #be123c;
  font-size: 13px;
}

.signed-in strong {
  font-size: 17px;
  word-break: break-all;
}

.signed-in > span {
  color: var(--blue);
  font-weight: 700;
}

.access-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.access-tags span {
  padding: 7px 10px;
  border-radius: 999px;
  color: #07533f;
  background: #e3f8f1;
  font-size: 12px;
  font-weight: 700;
}

.mobile-plans {
  display: grid;
  gap: 10px;
  margin-top: 15px;
}

.mobile-plans article {
  display: grid;
  gap: 7px;
  padding: 15px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
}

.mobile-plans article > span {
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.mobile-plans article h2 {
  margin: 0;
  font-size: 18px;
}

.mobile-plans article strong {
  font-size: 22px;
}

.mobile-plans article strong small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.mobile-plans article p {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.mobile-plans .selected-plan {
  border-color: #8cb5ff;
  box-shadow: 0 8px 22px rgba(11, 87, 227, 0.08);
}

.sheet-copy {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.payment-sheet {
  overflow-y: auto;
}

#paidRegistrationForm,
.payment-instructions {
  display: grid;
  gap: 12px;
}

.payment-instructions[hidden] {
  display: none;
}

.advance-choice[hidden] {
  display: none;
}

.payment-choice {
  display: grid;
  gap: 5px;
  padding: 13px;
  border-radius: 8px;
  color: #fff;
  background: var(--blue);
}

.payment-choice span {
  font-size: 11px;
  text-transform: uppercase;
}

.payment-choice strong {
  font-size: 17px;
}

.activation-pending {
  margin: 0;
  padding: 11px;
  border-radius: 7px;
  color: #664d03;
  background: #fff5da;
  font-size: 13px;
  line-height: 1.45;
}

.payment-instructions article {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
}

.payment-instructions article span {
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.payment-instructions article h3 {
  margin: 7px 0;
  font-size: 16px;
}

.payment-instructions article p,
.receipt-note {
  margin: 0;
  color: #415673;
  font-size: 13px;
  line-height: 1.45;
}

.payment-link {
  padding: 13px;
  border-radius: 8px;
  color: #fff;
  background: var(--blue);
  text-align: center;
  font-size: 14px;
  font-weight: 700;
}

.payment-link.whatsapp-link {
  background: var(--green);
}

.desktop-site-link {
  display: block;
  margin: 18px 0 4px;
  padding: 13px;
  border: 1px solid #c8dbf8;
  border-radius: 8px;
  color: var(--blue);
  background: #fff;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
}

.bottom-nav {
  position: fixed;
  z-index: 30;
  bottom: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  height: calc(65px + env(safe-area-inset-bottom));
  padding: 5px 4px env(safe-area-inset-bottom);
  border-top: 1px solid var(--line);
  background: #fff;
}

.bottom-nav button {
  position: relative;
  min-height: 54px;
  padding: 25px 1px 0;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: #fff;
  font-size: 11px;
  font-weight: 600;
}

.bottom-nav button::before {
  position: absolute;
  left: 50%;
  top: 8px;
  transform: translateX(-50%);
  color: currentColor;
  font-size: 16px;
}

.bottom-nav [data-nav="home"]::before { content: "\2302"; }
.bottom-nav [data-nav="suppliers"]::before { content: "\25A3"; }
.bottom-nav [data-nav="buyers"]::before { content: "\2315"; }
.bottom-nav [data-nav="insights"]::before { content: "\25A5"; }
.bottom-nav [data-nav="account"]::before { content: "\25CB"; }

.bottom-nav button.active {
  color: var(--blue);
  background: #f3f7ff;
}

.mobile-sheet {
  width: min(520px, 100%);
  max-height: 92vh;
  margin: auto auto 0;
  padding: 18px 16px calc(20px + env(safe-area-inset-bottom));
  border: 0;
  border-radius: 14px 14px 0 0;
  background: #fff;
}

.mobile-sheet[open] {
  display: grid;
  gap: 12px;
}

.mobile-sheet::backdrop {
  background: rgba(4, 20, 43, 0.46);
}

.sheet-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 4px;
}

.sheet-head h2 {
  margin: 0;
  font-size: 20px;
}

.sheet-head button {
  min-height: 38px;
  color: var(--blue);
  background: #fff;
}

#mobileDetails {
  display: grid;
  gap: 9px;
  max-height: 60vh;
  overflow-y: auto;
}

.detail-record {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.detail-record strong {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
}

.detail-record p {
  margin: 0 0 7px;
  color: #314660;
  font-size: 12px;
  line-height: 1.45;
}

.detail-record small {
  color: var(--blue);
  font-weight: 700;
}

.page-actions {
  display: flex;
  gap: 9px;
  align-items: center;
  justify-content: space-between;
}

.page-actions span {
  color: var(--muted);
  font-size: 12px;
}

.mobile-whatsapp {
  position: fixed;
  z-index: 25;
  right: 14px;
  bottom: calc(76px + env(safe-area-inset-bottom));
  padding: 11px 14px;
  border-radius: 999px;
  color: #fff;
  background: #087a58;
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 700;
}

.mobile-whatsapp[hidden] {
  display: none;
}

@media (min-width: 560px) {
  .bottom-nav {
    left: calc(50% - 270px);
    right: calc(50% - 270px);
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
  }
}
