/* ========================================
   SABEMARKET — MOBILE-FIRST DESIGN
======================================== */

:root {
  --background: #071126;
  --background-light: #0a1730;
  --card: #0d1d38;
  --card-light: #12294c;
  --blue: #1769e8;
  --blue-light: #35b9f3;
  --cyan: #37c7f4;
  --text: #f5f8ff;
  --muted: #94a8c8;
  --border: #20375b;
  --yes: #07547a;
  --yes-border: #0878a6;
  --no: #302957;
  --no-border: #514184;
  --success: #35d49a;
  --danger: #ff7373;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(
      ellipse at 50% 20%,
      #0b1c3b 0%,
      var(--background) 58%
    );
  color: var(--text);
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Arial,
    sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

a {
  color: var(--cyan);
  text-decoration: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

/* ========================================
   HOMEPAGE HEADER
======================================== */

.home-header {
  min-height: 88px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(117, 155, 207, 0.12);
  background: rgba(5, 14, 31, 0.85);
}

.home-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  color: var(--text);
  font-size: 25px;
  font-weight: 850;
  letter-spacing: -1px;
}

.brand-highlight {
  color: var(--cyan);
}

.home-logo {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 13px;
  background: var(--blue);
}

.home-avatar {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(80, 157, 255, 0.3);
  border-radius: 17px;
  background: linear-gradient(145deg, #087bff, #1554cb);
  color: white;
  font-size: 21px;
  font-weight: 800;
}

/* ========================================
   MAIN CONTENT
======================================== */

.home-main {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 26px 18px 125px;
}

.home-hero {
  padding: 18px 0 24px;
}

.home-eyebrow {
  margin: 0 0 12px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 2px;
  line-height: 1.5;
}

.home-hero h1 {
  margin: 0;
  max-width: 570px;
  color: var(--text);
  font-size: clamp(31px, 7vw, 48px);
  font-weight: 850;
  letter-spacing: -1.7px;
  line-height: 1.16;
}

.home-hero h1 span {
  color: var(--cyan);
}

/* ========================================
   BALANCE BANNER
======================================== */

.balance-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 142px;
  margin: 8px 0 28px;
  padding: 23px 20px;
  border: 1px solid rgba(89, 145, 224, 0.2);
  border-radius: 28px;
  background: linear-gradient(115deg, #173b6c, #102b50);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.balance-banner p {
  margin: 0 0 6px;
  color: #b6c9e6;
  font-size: 15px;
}

.balance-banner strong {
  display: block;
  color: white;
  font-size: clamp(22px, 5.4vw, 31px);
  font-weight: 850;
  letter-spacing: -0.7px;
  overflow-wrap: anywhere;
}

.account-button {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 17px;
  border: 1px solid rgba(118, 168, 237, 0.2);
  border-radius: 18px;
  background: #0a1a34;
  color: white;
  font-size: 14px;
  font-weight: 750;
}

/* ========================================
   CATEGORIES
======================================== */

.category-section {
  margin: 0 -18px 24px;
}

.category-list {
  display: flex;
  gap: 10px;
  padding: 3px 18px 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.category-list::-webkit-scrollbar {
  display: none;
}

.category-chip {
  min-height: 45px;
  flex-shrink: 0;
  padding: 0 17px;
  border: 1px solid rgba(112, 147, 196, 0.12);
  border-radius: 24px;
  background: #0b1a32;
  color: #c4d2e8;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s;
}

.category-chip.active {
  border-color: #438cf5;
  background: #174986;
  color: white;
  box-shadow: 0 0 0 2px rgba(48, 124, 240, 0.1);
}

/* ========================================
   SEARCH
======================================== */

.market-search {
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 36px;
  padding: 7px 9px 7px 15px;
  border: 1px solid var(--border);
  border-radius: 19px;
  background: #0c1b35;
}

.search-icon {
  flex-shrink: 0;
  color: var(--cyan);
  font-size: 26px;
  line-height: 1;
}

.market-search input {
  width: 100%;
  min-width: 0;
  padding: 9px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: white;
  font-size: 14px;
}

.market-search input::placeholder {
  color: #8da1c1;
  opacity: 1;
}

.market-search input:focus-visible {
  outline: none;
}

.market-search button {
  min-height: 38px;
  flex-shrink: 0;
  padding: 0 11px;
  border: 1px solid #263e63;
  border-radius: 11px;
  background: #102442;
  color: #cbd9f0;
  font-size: 12px;
  font-weight: 700;
}

/* ========================================
   MARKETS SECTION
======================================== */

.markets-section {
  min-width: 0;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 22px;
}

.section-heading .home-eyebrow {
  margin-bottom: 8px;
}

.section-heading h2 {
  margin: 0;
  font-size: 25px;
  line-height: 1.2;
  font-weight: 850;
  letter-spacing: -0.7px;
}

.text-button {
  flex-shrink: 0;
  padding: 8px 0 4px 8px;
  border: 0;
  background: transparent;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 700;
}

.markets-message {
  color: var(--muted);
  font-size: 14px;
}

.home-markets {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

/* ========================================
   MARKET CARD
======================================== */

.market-card {
  min-width: 0;
  padding: 20px 17px 18px;
  border: 1px solid rgba(90, 128, 182, 0.2);
  border-radius: 27px;
  background: linear-gradient(145deg, #102442, #0c1c36);
  box-shadow: 0 9px 24px rgba(0, 0, 0, 0.12);
}

.market-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 12px;
}

.market-category {
  display: inline-flex;
  align-items: center;
  min-height: 29px;
  padding: 4px 10px;
  border: 1px solid rgba(54, 131, 231, 0.18);
  border-radius: 9px;
  background: #152e52;
  color: #c4dcff;
  font-weight: 750;
}

.market-dot {
  color: #7188aa;
}

.market-closing {
  overflow-wrap: anywhere;
}

.market-title-link {
  display: block;
  margin-bottom: 17px;
  color: var(--text);
}

.market-title-link h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.38;
  font-weight: 800;
  letter-spacing: -0.35px;
}

.market-title-link:active {
  opacity: 0.8;
}

.market-description {
  margin: -7px 0 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.market-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
}

.market-live-label {
  color: #a7bad7;
  font-size: 12px;
  line-height: 1.4;
}

.market-outcomes {
  display: flex;
  align-items: stretch;
  gap: 9px;
}

.outcome-button {
  min-width: 78px;
  min-height: 65px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 16px;
  color: white;
  transition: transform 0.12s, filter 0.12s;
}

.outcome-button:active {
  transform: scale(0.97);
  filter: brightness(1.2);
}

.outcome-button strong {
  font-size: 16px;
  font-weight: 850;
}

.outcome-button span {
  font-size: 12px;
  font-weight: 750;
}

.outcome-yes {
  border-color: var(--yes-border);
  background: var(--yes);
}

.outcome-no {
  border-color: var(--no-border);
  background: var(--no);
}

.load-more-button {
  width: 100%;
  min-height: 50px;
  margin-top: 20px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: #102442;
  color: white;
  font-weight: 750;
}

/* ========================================
   FIXED BOTTOM NAVIGATION
======================================== */

.bottom-navigation {
  position: fixed;
  z-index: 100;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(101, 138, 190, 0.18);
  background: rgba(6, 15, 33, 0.97);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.bottom-nav-item {
  min-width: 0;
  min-height: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 7px 2px;
  border-radius: 16px;
  color: #93a7c7;
  font-size: 11px;
  font-weight: 700;
}

.nav-icon {
  font-size: 25px;
  line-height: 1.2;
}

.bottom-nav-item.active {
  background: #174986;
  color: white;
}

.home-toast {
  position: fixed;
  z-index: 200;
  right: 16px;
  bottom: calc(100px + env(safe-area-inset-bottom));
  left: 16px;
  max-width: 440px;
  margin: 0 auto;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #142847;
  color: white;
  font-size: 13px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s;
}

.home-toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   SIGNUP AND LOGIN
======================================== */

.auth-page {
  min-height: 100vh;
  padding: 28px 16px;
}

.auth-container {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}

.auth-card {
  padding: 25px 21px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--card);
}

.auth-card h1 {
  margin: 0 0 8px;
  font-size: 29px;
  line-height: 1.2;
}

.auth-card .subtitle {
  margin: 0 0 25px;
  color: var(--muted);
}

.auth-card form > label {
  display: block;
  margin: 17px 0 7px;
  color: #e1eaff;
  font-size: 13px;
  font-weight: 700;
}

.auth-card input:not([type="checkbox"]),
.auth-card select {
  width: 100%;
  min-height: 49px;
  padding: 12px 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: 0;
  background: var(--background-light);
  color: white;
}

.auth-card input::placeholder {
  color: #8295b4;
}

.password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrap input {
  padding-right: 65px !important;
}

.password-toggle {
  position: absolute;
  right: 10px;
  border: 0;
  background: transparent;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 750;
}

.consent-section {
  display: grid;
  gap: 15px;
  margin: 22px 0;
}

.consent-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #c3d1e7;
  font-size: 12px;
  line-height: 1.6;
}

.consent-option input {
  flex-shrink: 0;
  margin-top: 4px;
  accent-color: var(--blue);
}

.optional,
.field-hint {
  color: var(--muted);
  font-size: 12px;
}

.primary-button {
  width: 100%;
  min-height: 51px;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(110deg, #1769e8, #1689f6);
  color: white;
  font-weight: 800;
}

.primary-button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.auth-switch,
.footer-note {
  margin-top: 22px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.message {
  color: var(--cyan);
  font-size: 13px;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  margin: 0 auto 24px;
  color: white;
  font-size: 25px;
  font-weight: 850;
}

.brand-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--blue);
}

/* ========================================
   RESPONSIVE LAYOUT
======================================== */

@media (min-width: 600px) {
  .home-header {
    padding-right: max(24px, calc((100vw - 760px) / 2));
    padding-left: max(24px, calc((100vw - 760px) / 2));
  }

  .home-main {
    padding-right: 24px;
    padding-left: 24px;
  }

  .category-section {
    margin-right: -24px;
    margin-left: -24px;
  }

  .category-list {
    padding-right: 24px;
    padding-left: 24px;
  }

  .market-card {
    padding: 23px;
  }

  .market-title-link h3 {
    font-size: 22px;
  }
}

@media (max-width: 360px) {
  .home-main {
    padding-right: 13px;
    padding-left: 13px;
  }

  .home-brand {
    font-size: 21px;
  }

  .home-logo {
    width: 42px;
    height: 42px;
  }

  .balance-banner {
    padding: 18px 14px;
  }

  .account-button {
    padding: 0 11px;
    font-size: 12px;
  }

  .market-card {
    padding: 17px 13px;
  }

  .market-card-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .market-outcomes {
    width: 100%;
  }

  .outcome-button {
    flex: 1;
  }

  .bottom-navigation {
    padding-right: 5px;
    padding-left: 5px;
  }
}

/* HEADER: LOGO, BALANCE AND DEPOSIT */
.home-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 15px;
}

.home-brand {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: #f5f8ff;
  font-size: 20px;
  font-weight: 850;
  white-space: nowrap;
}

.home-logo {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 10px;
}

.header-account {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.header-balance {
  min-width: 0;
  text-align: right;
}

.balance-label {
  display: block;
  color: #94a8c8;
  font-size: 10px;
}

.header-balance strong {
  display: block;
  max-width: 120px;
  overflow: hidden;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deposit-button {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border: 1px solid #3998ff;
  border-radius: 11px;
  background: #1769e8;
  color: #fff;
  font-size: 25px;
  font-weight: 500;
  line-height: 1;
}

/* FIVE-TAB BOTTOM NAVIGATION */
.bottom-navigation {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 3px;
  padding: 8px 5px calc(8px + env(safe-area-inset-bottom));
}

.bottom-nav-item {
  min-width: 0;
  min-height: 66px;
  gap: 4px;
  padding: 7px 1px;
  font-size: 10px;
  white-space: nowrap;
}

.nav-icon {
  font-size: 22px;
}

@media (max-width: 360px) {
  .home-header {
    padding-right: 9px;
    padding-left: 9px;
  }

  .home-brand {
    gap: 5px;
    font-size: 17px;
  }

  .home-logo {
    width: 32px;
    height: 32px;
  }

  .header-account {
    gap: 5px;
  }

  .header-balance strong {
    max-width: 85px;
    font-size: 11px;
  }

  .deposit-button {
    width: 30px;
    height: 30px;
  }

  .bottom-nav-item {
    font-size: 9px;
  }

  .nav-icon {
    font-size: 20px;
  }
}

.payment-code-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.payment-code-row .payment-code {
  margin: 12px 0;
}

.copy-ussd-button {
  padding: 10px 14px;
  border: 1px solid #398bff;
  border-radius: 9px;
  background: #1769e8;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.copy-ussd-button:active {
  transform: scale(.97);
}

/* =========================================
   SABEMARKET — MARKET CARD REDESIGN
   Add at the bottom of style.css
========================================= */

/* Market list */
.home-markets {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 13px;
  width: 100%;
}

/* Individual market card */
.market-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 17px;
  border: 1px solid rgba(139, 163, 198, 0.18);
  border-radius: 19px;
  background: linear-gradient(
    145deg,
    #101f35 0%,
    #0b1729 100%
  );
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.13);
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.15s ease;
}

.market-card:active {
  transform: scale(0.995);
}

/* Category and status row */
.market-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 13px;
}

.market-category {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  max-width: 75%;
  padding: 4px 9px;
  overflow: hidden;
  border: 1px solid rgba(101, 146, 207, 0.18);
  border-radius: 7px;
  background: rgba(39, 67, 105, 0.35);
  color: #b7c9e2;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #9aabc2;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.7px;
}

.market-status::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38d99b;
  content: "";
}

/* Market title */
.market-title {
  margin: 0;
  color: #f4f7fc;
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.35px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

/* Optional description */
.market-description {
  margin: 8px 0 0;
  color: #9baec8;
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

/* Closing time */
.market-card-footer {
  margin-top: 13px;
  padding-top: 11px;
  border-top: 1px solid rgba(139, 163, 198, 0.11);
}

.market-closes {
  color: #899bb5;
  font-size: 11px;
  font-weight: 500;
}

/* YES / NO choices */
.market-outcomes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 15px;
}

.outcome-button {
  width: 100%;
  min-width: 0;
  min-height: 53px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 13px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #fff;
  transition:
    transform 0.15s ease,
    filter 0.15s ease,
    border-color 0.15s ease;
}

.outcome-button span {
  font-size: 13px;
  font-weight: 750;
}

.outcome-button strong {
  font-size: 16px;
  font-weight: 850;
  white-space: nowrap;
}

.outcome-button:active {
  transform: scale(0.97);
  filter: brightness(1.15);
}

/* YES — green */
.outcome-yes {
  border-color: rgba(53, 212, 154, 0.3);
  background: #123d35;
  color: #65e6b1;
}

.outcome-yes:hover {
  border-color: #35d49a;
  background: #174b3f;
}

/* NO — red */
.outcome-no {
  border-color: rgba(255, 115, 115, 0.28);
  background: #43272f;
  color: #ff9999;
}

.outcome-no:hover {
  border-color: #ff7373;
  background: #512b35;
}

/* Search and section spacing */
.markets-section {
  min-width: 0;
}

.section-heading {
  margin-bottom: 17px;
}

.section-heading h2 {
  font-size: 23px;
  letter-spacing: -0.5px;
}

.market-search {
  margin-bottom: 27px;
  border-radius: 15px;
}

/* Category buttons */
.category-chip {
  min-height: 39px;
  padding: 0 15px;
  border: 1px solid rgba(139, 163, 198, 0.16);
  border-radius: 22px;
  background: #0e1a2c;
  color: #b4c2d7;
  font-size: 13px;
  font-weight: 650;
}

.category-chip.active {
  border-color: #6286b6;
  background: #263e5e;
  color: #fff;
  box-shadow: none;
}

/* Load more */
.load-more-button {
  min-height: 47px;
  border-radius: 12px;
  border-color: rgba(139, 163, 198, 0.22);
  background: #122139;
  color: #dce7f6;
  transition: background 0.2s ease;
}

.load-more-button:hover {
  background: #1a2d49;
}

/* Keyboard accessibility */
.market-card:focus-visible {
  outline: 2px solid #7fb2ff;
  outline-offset: 3px;
}

.outcome-button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Larger phones and tablets */
@media (min-width: 600px) {
  .home-markets {
    gap: 15px;
  }

  .market-card {
    padding: 20px;
    border-radius: 21px;
  }

  .market-title {
    font-size: 20px;
  }

  .market-outcomes {
    gap: 12px;
  }

  .outcome-button {
    min-height: 56px;
    padding-right: 16px;
    padding-left: 16px;
  }
}

/* Small Android screens */
@media (max-width: 360px) {
  .market-card {
    padding: 14px 12px;
    border-radius: 16px;
  }

  .market-title {
    font-size: 16px;
  }

  .market-outcomes {
    gap: 7px;
  }

  .outcome-button {
    min-height: 48px;
    gap: 5px;
    padding: 9px 10px;
    border-radius: 10px;
  }

  .outcome-button span {
    font-size: 12px;
  }

  .outcome-button strong {
    font-size: 14px;
  }
}

/* =========================================
SABEMARKET — POLISHED FRONTEND UPGRADE
Add this block at the bottom of style.css
========================================= */

:root {
--background: #080f1d;
--background-light: #0d192b;
--card: #101d30;
--card-light: #172740;
--blue: #3478f6;
--blue-light: #64a0ff;
--cyan: #72b7ff;
--text: #f5f7fc;
--muted: #9baac0;
--border: rgba(153, 174, 204, 0.16);
--yes: #143b32;
--yes-border: #286d57;
--no: #432630;
--no-border: #78404c;
--success: #45d6a1;
--danger: #ff8494;
}

body {
background:
radial-gradient(ellipse at 50% 0%, rgba(37, 76, 128, 0.16), transparent 48%),
var(--background);
color: var(--text);
}

/* Header */
.home-header {
min-height: 70px;
padding: 12px 16px;
border-bottom: 1px solid rgba(153, 174, 204, 0.12);
background: rgba(8, 15, 29, 0.94);
}

.home-brand {
letter-spacing: -0.6px;
}

.brand-highlight {
color: #72b7ff;
}

.header-balance {
padding: 7px 10px;
border: 1px solid var(--border);
border-radius: 12px;
background: rgba(255, 255, 255, 0.035);
}

.balance-label {
font-size: 10px;
letter-spacing: 0.2px;
}

.header-balance strong {
font-size: 13px;
}

.deposit-button {
border-color: #4788ff;
border-radius: 12px;
background: linear-gradient(145deg, #438bff, #2163db);
box-shadow: 0 4px 12px rgba(40, 105, 225, 0.2);
}

/* Homepage introduction */
.home-main {
padding-top: 22px;
}

.home-hero {
padding-top: 12px;
padding-bottom: 24px;
}

.home-eyebrow {
color: #83bdff;
letter-spacing: 1.6px;
}

.home-hero h1 {
letter-spacing: -1.4px;
line-height: 1.12;
}

.home-hero h1 span {
color: #83bdff;
}

/* Categories */
.category-list {
gap: 9px;
padding-top: 5px;
padding-bottom: 10px;
scroll-snap-type: x proximity;
}

.category-chip {
min-height: 40px;
padding: 0 15px;
border-color: rgba(153, 174, 204, 0.15);
border-radius: 13px;
background: #111e31;
color: #bdc9da;
scroll-snap-align: start;
}

.category-chip.active {
border-color: #679cf5;
background: #254a7c;
color: #fff;
}

/* Search */
.market-search {
min-height: 54px;
border-color: var(--border);
border-radius: 15px;
background: #101b2d;
box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.market-search:focus-within {
border-color: #5b94e8;
box-shadow: 0 0 0 3px rgba(91, 148, 232, 0.1);
}

.market-search button {
border-color: #344a69;
border-radius: 10px;
background: #1b2d47;
color: #f1f6ff;
}

/* Section headings */
.section-heading {
align-items: center;
margin-bottom: 16px;
}

.section-heading h2 {
font-size: 23px;
letter-spacing: -0.55px;
}

.text-button {
padding: 9px 11px;
border: 1px solid var(--border);
border-radius: 10px;
background: #111e31;
color: #b8d5ff;
}

/* Market cards */
.home-markets {
gap: 14px;
}

.market-card {
padding: 17px;
border: 1px solid rgba(153, 174, 204, 0.15);
border-radius: 19px;
background: linear-gradient(155deg, #122139 0%, #0d1829 100%);
box-shadow: 0 7px 22px rgba(0, 0, 0, 0.13);
}

.market-card-top {
margin-bottom: 12px;
}

.market-category {
border-color: rgba(111, 165, 239, 0.2);
border-radius: 8px;
background: #192e4a;
color: #c4dcff;
}

.market-status {
letter-spacing: 0.35px;
}

.market-title,
.market-title-link h3 {
color: #f5f7fc;
font-size: 18px;
font-weight: 760;
line-height: 1.4;
letter-spacing: -0.3px;
}

.market-description {
color: #a2b1c7;
line-height: 1.6;
}

.market-card-footer {
border-top-color: rgba(153, 174, 204, 0.12);
}

.market-closes,
.market-closing {
color: #94a6c0;
font-size: 11px;
}

/* YES / NO buttons */
.market-outcomes {
gap: 9px;
}

.outcome-button {
min-height: 50px;
border-radius: 12px;
font-weight: 750;
}

.outcome-yes {
border-color: rgba(69, 214, 161, 0.28);
background: #143b32;
color: #69e6b5;
}

.outcome-no {
border-color: rgba(255, 132, 148, 0.27);
background: #432630;
color: #ffa1ad;
}

.outcome-yes:hover {
background: #1a4a3e;
}

.outcome-no:hover {
background: #542e3a;
}

/* Loading and empty states */
.markets-message {
padding: 10px 0;
color: #9baac0;
line-height: 1.6;
}

/* Load more */
.load-more-button {
border-color: var(--border);
border-radius: 13px;
background: #15243a;
color: #e5edfa;
}

/* Bottom navigation */
.bottom-navigation {
border-top-color: rgba(153, 174, 204, 0.15);
background: rgba(8, 15, 29, 0.97);
box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.12);
}

.bottom-nav-item {
border-radius: 13px;
transition: background 0.2s ease, color 0.2s ease;
}

.bottom-nav-item.active {
background: #1b3454;
color: #fff;
}

.bottom-nav-item.active .nav-icon {
color: #8bc2ff;
}

/* Toast notifications */
.home-toast {
border-color: rgba(153, 174, 204, 0.2);
border-radius: 13px;
background: #172740;
box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
}

/* Market details page */
.detail-page {
color: var(--text);
}

.detail-category {
border: 1px solid rgba(111, 165, 239, 0.2);
background: #192e4a;
color: #c4dcff;
}

.detail-stat,
.detail-trade-box {
border-color: var(--border);
border-radius: 17px;
background: linear-gradient(155deg, #122139, #0d1829);
}

.detail-outcome {
border-radius: 12px;
background: #15243a;
}

.detail-amount {
border-color: var(--border);
border-radius: 12px;
background: #091323;
}

.detail-confirm {
border-radius: 12px;
background: linear-gradient(110deg, #35d49a, #65e6b5);
box-shadow: 0 5px 14px rgba(53, 212, 154, 0.12);
}

.detail-bottom-nav {
border-top-color: var(--border);
background: rgba(8, 15, 29, 0.97);
}

/* Login and signup consistency */
.auth-card {
border-color: var(--border);
border-radius: 20px;
background: #101d30;
}

.auth-card input:not([type="checkbox"]),
.auth-card select {
border-color: var(--border);
border-radius: 11px;
background: #0b1728;
}

.primary-button {
border-radius: 12px;
background: linear-gradient(110deg, #3478f6, #438bff);
}

/* Mobile refinements */
@media (max-width: 360px) {
.home-hero h1 {
font-size: 30px;
}

.market-card {
padding: 14px 12px;
}

.market-title,
.market-title-link h3 {
font-size: 16px;
}

.header-balance {
padding: 6px 7px;
}
}

@media (min-width: 600px) {
.home-main {
padding-top: 30px;
}

.market-card {
padding: 21px;
}

.market-title,
.market-title-link h3 {
font-size: 20px;
}
}

/* =========================================
   SABEMARKET — HOMEPAGE & TRADING POLISH
   Add at the bottom of css/style.css
========================================= */

/* Theme */
:root {
  --sm-bg: #080f20;
  --sm-surface: #101b30;
  --sm-surface-light: #172640;
  --sm-border: #263750;
  --sm-text: #f4f7ff;
  --sm-muted: #9baac3;
  --sm-green: #28d69a;
  --sm-green-bg: #103e35;
  --sm-red: #ff7185;
  --sm-red-bg: #451e2c;
}

/* Homepage background */
body.home-page {
  background: var(--sm-bg);
  color: var(--sm-text);
}

/* Header */
.home-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 60px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--sm-border);
  background: rgba(8, 15, 32, 0.96);
  backdrop-filter: blur(12px);
}

.home-brand {
  color: var(--sm-text);
  font-size: 22px;
  font-weight: 850;
  letter-spacing: -0.7px;
  text-decoration: none;
}

.brand-highlight {
  color: var(--sm-green);
}

.deposit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--sm-green);
  color: #06281e;
  font-size: 27px;
  font-weight: 800;
  text-decoration: none;
}

/* Main layout */
.home-main,
main.home-main {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 18px 14px 100px;
  box-sizing: border-box;
}

/* Balance and account panels */
.balance-card,
.home-balance-card,
.account-balance-card {
  border: 1px solid var(--sm-border);
  border-radius: 18px;
  background: linear-gradient(135deg, #142640, #101b30);
  color: var(--sm-text);
}

#homeBalance {
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

/* Search */
#marketSearchForm {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 18px 0;
}

#marketSearchInput {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 12px 14px;
  box-sizing: border-box;
  border: 1px solid var(--sm-border);
  border-radius: 13px;
  outline: none;
  background: var(--sm-surface);
  color: var(--sm-text);
  font-size: 16px;
}

#marketSearchInput::placeholder {
  color: #7f90aa;
}

#marketSearchInput:focus {
  border-color: var(--sm-green);
}

/* Categories */
#categoryList {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  padding: 4px 0 12px;
  margin-bottom: 12px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

#categoryList::-webkit-scrollbar {
  display: none;
}

#categoryList [data-category] {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 9px 14px;
  border: 1px solid var(--sm-border);
  border-radius: 22px;
  background: var(--sm-surface);
  color: #b7c5dc;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}

#categoryList [data-category].active {
  border-color: var(--sm-green);
  background: var(--sm-green-bg);
  color: #65f0b7;
}

/* Market heading */
#marketsHeading {
  margin: 18px 0 14px;
  color: var(--sm-text);
  font-size: 23px;
  font-weight: 850;
  letter-spacing: -0.5px;
}

#marketsMessage {
  padding: 14px;
  border: 1px solid var(--sm-border);
  border-radius: 12px;
  background: var(--sm-surface);
  color: var(--sm-muted);
  font-size: 13px;
  line-height: 1.6;
}

/* Market grid */
#homeMarkets {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 13px;
}

/* Market card */
.market-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--sm-border);
  border-radius: 18px;
  background: var(--sm-surface);
  color: var(--sm-text);
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.market-card:focus-visible {
  outline: 2px solid var(--sm-green);
  outline-offset: 3px;
}

.market-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.market-category {
  display: inline-block;
  max-width: 75%;
  padding: 5px 9px;
  border-radius: 20px;
  background: #172846;
  color: #9fc2ff;
  font-size: 11px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.market-status {
  color: var(--sm-green);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.6px;
}

.market-title {
  margin: 0 0 9px;
  color: var(--sm-text);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.market-description {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 13px;
  color: var(--sm-muted);
  font-size: 13px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.market-card-footer {
  margin: 12px 0;
  color: #8596b0;
  font-size: 11px;
}

/* YES and NO buttons */
.market-outcomes {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.outcome-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  min-height: 47px;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 13px;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease;
}

.outcome-button strong {
  font-size: 14px;
  font-weight: 850;
}

.outcome-yes {
  border-color: rgba(40, 214, 154, 0.25);
  background: var(--sm-green-bg);
  color: #5af0b3;
}

.outcome-no {
  border-color: rgba(255, 113, 133, 0.25);
  background: var(--sm-red-bg);
  color: #ff9cab;
}

.outcome-button:active {
  transform: scale(0.98);
  filter: brightness(1.12);
}

/* Load more */
#loadMoreMarkets {
  display: block;
  width: 100%;
  min-height: 46px;
  margin: 20px 0;
  border: 1px solid var(--sm-border);
  border-radius: 13px;
  background: var(--sm-surface);
  color: var(--sm-text);
  font-weight: 750;
  cursor: pointer;
}

#loadMoreMarkets[hidden] {
  display: none !important;
}

/* General toast */
#homeToast {
  position: fixed;
  right: 14px;
  bottom: calc(84px + env(safe-area-inset-bottom));
  left: 14px;
  z-index: 100001;
  max-width: 460px;
  margin: 0 auto;
  padding: 14px 16px;
  border: 1px solid var(--sm-border);
  border-radius: 13px;
  background: #172640;
  color: var(--sm-text);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  font-size: 13px;
  line-height: 1.5;
}

#homeToast[hidden] {
  display: none !important;
}

/* Keep the page still while the trading popup is open */
body.sm-trade-open {
  overflow: hidden;
}

/* Trading popup responsive refinements */
.sm-trade-overlay {
  box-sizing: border-box;
}

.sm-trade-dialog {
  font-family: inherit;
}

.sm-trade-dialog button,
.sm-trade-dialog input {
  font-family: inherit;
}

.sm-trade-choice button,
.sm-trade-submit,
.sm-trade-close {
  -webkit-tap-highlight-color: transparent;
}

.sm-trade-submit:focus-visible,
.sm-trade-choice button:focus-visible,
.sm-trade-close:focus-visible {
  outline: 2px solid #8af5d0;
  outline-offset: 3px;
}

.sm-trade-message:empty {
  display: none;
}

/* Tablet and desktop */
@media (min-width: 650px) {
  .home-main,
  main.home-main {
    padding-right: 22px;
    padding-left: 22px;
  }

  #homeMarkets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .market-card {
    padding: 18px;
  }

  .market-title {
    font-size: 18px;
  }
}

@media (min-width: 1000px) {
  #homeMarkets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  .market-card,
  .outcome-button {
    transition: none;
  }
}

/* =========================================
   FIX SABEMARKET TRADING MODAL
========================================= */

/* Keep the popup hidden until YES or NO is clicked */
#tradeModal[hidden] {
  display: none !important;
}

#tradeModal.sm-trade-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 999999 !important;

  display: flex;
  align-items: center !important;
  justify-content: center !important;

  width: 100% !important;
  height: 100% !important;
  height: 100dvh !important;

  box-sizing: border-box;
  padding: 16px !important;

  overflow-y: auto !important;
  background: rgba(3, 8, 20, 0.88) !important;
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}

#tradeModal .sm-trade-dialog {
  position: relative !important;
  inset: auto !important;

  width: 100% !important;
  max-width: 440px !important;
  max-height: calc(100% - 24px) !important;

  flex: 0 1 auto !important;
  margin: auto !important;
  padding: 24px 18px !important;

  overflow-y: auto !important;
  box-sizing: border-box !important;

  border: 1px solid #293b57 !important;
  border-radius: 22px !important;
  background: #101b30 !important;
  color: #f4f7ff !important;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.55) !important;
}

#tradeModal .sm-trade-close {
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
  z-index: 2;

  width: 40px !important;
  height: 40px !important;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 1px solid #34445f !important;
  border-radius: 50% !important;
  background: #17243a !important;
  color: #fff !important;
  font-size: 26px !important;
}

#tradeModal .sm-trade-dialog h2 {
  margin: 16px 42px 10px 0 !important;
  font-size: 24px !important;
  line-height: 1.3;
}

#tradeModal .sm-trade-question {
  margin-bottom: 18px !important;
  color: #b8c7dd !important;
  font-size: 15px !important;
  line-height: 1.55 !important;
  overflow-wrap: anywhere;
}

#tradeModal .sm-trade-choice {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
  margin: 18px 0 !important;
}

#tradeModal .sm-trade-choice button {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 48px !important;
  padding: 10px !important;
  border-radius: 12px !important;
  font-size: 14px !important;
  font-weight: 800 !important;
}

#tradeModal .sm-trade-label {
  display: block !important;
  margin: 16px 0 8px !important;
  color: #b8c7dd !important;
  font-size: 13px !important;
}

#tradeModal #smTradeAmount {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 52px !important;
  margin: 0 !important;
  padding: 12px !important;

  box-sizing: border-box !important;
  border: 1px solid #34445f !important;
  border-radius: 12px !important;

  background: #080f20 !important;
  color: #fff !important;
  font-size: 18px !important;
}

#tradeModal .sm-trade-line {
  display: flex !important;
  justify-content: space-between !important;
  align-items: flex-start !important;
  gap: 12px !important;
  margin-top: 15px !important;

  color: #aab8d0 !important;
  font-size: 13px !important;
}

#tradeModal .sm-trade-line strong {
  max-width: 55% !important;
  color: #fff !important;
  text-align: right !important;
  overflow-wrap: anywhere;
}

#tradeModal .sm-trade-disclaimer {
  margin: 18px 0 !important;
  color: #91a2bd !important;
  font-size: 12px !important;
  line-height: 1.55 !important;
}

#tradeModal .sm-trade-submit {
  display: block !important;
  width: 100% !important;
  min-height: 52px !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: #28d69a !important;
  color: #06281e !important;
  font-size: 16px !important;
  font-weight: 800 !important;
}

#tradeModal .sm-trade-message {
  font-size: 13px !important;
  line-height: 1.6 !important;
  overflow-wrap: anywhere;
}

/* Prevent background scrolling while popup is open */
body.sm-trade-open {
  overflow: hidden !important;
}

@media (max-width: 380px) {
  #tradeModal.sm-trade-overlay {
    padding: 10px !important;
  }

  #tradeModal .sm-trade-dialog {
    padding: 20px 14px !important;
  }
}

/* =========================================
   SABEMARKET — SELECTED YES / NO INDICATOR
========================================= */

/* Smooth selection feedback */
#tradeModal .sm-trade-choice button {
  position: relative;
  min-height: 52px;
  border: 2px solid #34445f !important;
  border-radius: 12px !important;
  background: #17243a !important;
  color: #c4d0e3 !important;
  font-weight: 800 !important;
  transition: background 0.18s ease, border-color 0.18s ease,
              box-shadow 0.18s ease, transform 0.18s ease;
}

/* YES selected: green */
#tradeModal .sm-trade-choice button[data-outcome="YES"].selected {
  border: 2px solid #28d69a !important;
  background: #103e35 !important;
  color: #5af0b3 !important;
  box-shadow: inset 0 0 0 1px rgba(40, 214, 154, 0.2);
}

/* NO selected: red */
#tradeModal .sm-trade-choice button[data-outcome="NO"].selected {
  border: 2px solid #ff7185 !important;
  background: #451e2c !important;
  color: #ff9cab !important;
  box-shadow: inset 0 0 0 1px rgba(255, 113, 133, 0.2);
}

/* Make the active choice visibly raised */
#tradeModal .sm-trade-choice button.selected {
  transform: translateY(-1px);
}

/* Add a checkmark to the selected choice */
#tradeModal .sm-trade-choice button.selected::after {
  content: "✓";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-left: 7px;
  border-radius: 50%;
  background: currentColor;
  color: #101b30;
  font-size: 12px;
  vertical-align: middle;
}

/* Tap feedback */
#tradeModal .sm-trade-choice button:active {
  transform: scale(0.98);
}

/* Keyboard accessibility */
#tradeModal .sm-trade-choice button:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

/* =========================================
   TRADE SUCCESS CONFIRMATION POPUP
========================================= */

#tradeSuccessModal[hidden] {
  display: none !important;
}

.sm-success-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000001;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 16px;
  background: rgba(2, 7, 18, 0.88);
  backdrop-filter: blur(7px);
}

.sm-success-dialog {
  width: 100%;
  max-width: 390px;
  max-height: calc(100% - 24px);
  overflow-y: auto;
  box-sizing: border-box;
  padding: 26px 20px;
  border: 1px solid #293b57;
  border-radius: 22px;
  background: #101b30;
  color: #f4f7ff;
  text-align: center;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.5);
}

.sm-success-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #103e35;
  color: #5af0b3;
  font-size: 36px;
  font-weight: 900;
}

.sm-success-dialog h2 {
  margin: 0 0 10px;
  font-size: 23px;
  line-height: 1.3;
}

.sm-success-subtitle {
  margin: 0 0 20px;
  color: #aab8d0;
  font-size: 13px;
  line-height: 1.6;
}

.sm-success-market {
  margin-bottom: 18px;
  padding: 12px;
  border: 1px solid #263750;
  border-radius: 12px;
  background: #080f20;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.sm-success-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0;
  color: #aab8d0;
  font-size: 13px;
  text-align: left;
}

.sm-success-row strong {
  color: #fff;
  text-align: right;
  overflow-wrap: anywhere;
}

.sm-success-yes {
  color: #5af0b3 !important;
}

.sm-success-no {
  color: #ff9cab !important;
}

.sm-success-note {
  margin: 20px 0;
  color: #92a3be;
  font-size: 12px;
  line-height: 1.6;
}

#smSuccessDone,
#smSuccessPortfolio {
  display: block;
  width: 100%;
  min-height: 48px;
  margin-top: 10px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

#smSuccessDone {
  border: none;
  background: #28d69a;
  color: #06281e;
}

#smSuccessPortfolio {
  border: 1px solid #34445f;
  background: #17243a;
  color: #f4f7ff;
}

/* =========================================
   SABEMARKET — PREMIUM LOGIN PAGE POLISH
   Dark navy + electric blue fintech design
   ========================================= */

body.auth-page {
  --auth-bg: #080f20;
  --auth-card: #101a30;
  --auth-border: rgba(148, 163, 184, 0.14);
  --auth-blue: #3b82f6;
  --auth-blue-light: #60a5fa;
  --auth-text: #f8fafc;
  --auth-muted: #94a3b8;

  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  padding: 32px 18px;
  box-sizing: border-box;

  display: flex;
  align-items: center;
  justify-content: center;

  color: var(--auth-text);
  background:
    radial-gradient(
      ellipse at 50% 0%,
      rgba(37, 99, 235, 0.18),
      transparent 48%
    ),
    radial-gradient(
      circle at 100% 100%,
      rgba(29, 78, 216, 0.09),
      transparent 35%
    ),
    var(--auth-bg);

  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  -webkit-font-smoothing: antialiased;
}

/* Keep sizing predictable */
.auth-page *,
.auth-page *::before,
.auth-page *::after {
  box-sizing: border-box;
}

/* Main container */
.auth-page .auth-container {
  width: 100%;
  max-width: 430px;
  margin: auto;
}

/* Brand */
.auth-page .brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  width: fit-content;
  margin: 0 auto 30px;

  color: #f8fafc;
  text-decoration: none;

  font-size: 25px;
  font-weight: 800;
  letter-spacing: -1px;
}

.auth-page .brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 39px;
  height: 39px;
  border-radius: 12px;

  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #60a5fa);

  box-shadow: 0 5px 20px rgba(37, 99, 235, 0.28);

  font-size: 21px;
  font-weight: 800;
}

/* Login card */
.auth-page .auth-card {
  width: 100%;
  padding: 34px 30px 30px;

  background: linear-gradient(
    145deg,
    rgba(17, 29, 51, 0.98),
    rgba(12, 22, 41, 0.98)
  );

  border: 1px solid var(--auth-border);
  border-radius: 22px;

  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.28),
    0 1px 0 rgba(255, 255, 255, 0.025) inset;

  overflow: hidden;
}

/* Small welcome label */
.auth-page .eyebrow {
  margin: 0 0 12px;

  color: var(--auth-blue-light);

  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  line-height: 1.5;
}

/* Main heading */
.auth-page .auth-card h1 {
  margin: 0 0 12px;

  color: #f8fafc;

  font-size: clamp(26px, 6vw, 32px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -1.1px;
}

/* Supporting text */
.auth-page .subtitle {
  margin: 0 0 29px;

  color: var(--auth-muted);

  font-size: 14px;
  line-height: 1.75;
}

/* Form layout */
.auth-page #loginForm {
  display: flex;
  flex-direction: column;
  width: 100%;
}

/* Input labels */
.auth-page #loginForm > label {
  display: block;
  margin: 0 0 9px;

  color: #dbe5f4;

  font-size: 13px;
  font-weight: 650;
}

/* Email and password fields */
.auth-page #loginForm input {
  display: block;
  width: 100%;
  min-width: 0;
  height: 51px;

  padding: 0 15px;

  color: #f8fafc;
  background: #0a1427;

  border: 1px solid #263650;
  border-radius: 11px;
  outline: none;

  font-family: inherit;
  font-size: 14px;

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

/* Email spacing */
.auth-page #email {
  margin-bottom: 22px;
}

/* Input placeholders */
.auth-page #loginForm input::placeholder {
  color: #65758e;
  opacity: 1;
}

/* Focus state */
.auth-page #loginForm input:focus {
  border-color: var(--auth-blue);
  background: #0c192f;

  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.13);
}

/* Password field wrapper */
.auth-page .password-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  margin-bottom: 24px;
}

.auth-page .password-wrap input {
  padding-right: 75px;
  margin: 0;
}

/* Show / Hide password button */
.auth-page .password-toggle {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);

  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 43px;
  min-height: 36px;
  padding: 6px;

  color: var(--auth-blue-light);
  background: transparent;
  border: 0;
  border-radius: 7px;

  font-family: inherit;
  font-size: 12px;
  font-weight: 750;

  cursor: pointer;
  transition: background 0.2s ease;
}

.auth-page .password-toggle:hover {
  background: rgba(59, 130, 246, 0.12);
}

.auth-page .password-toggle:focus-visible {
  outline: 2px solid var(--auth-blue-light);
  outline-offset: 2px;
}

/* Primary login button */
.auth-page #loginButton {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  min-height: 52px;
  padding: 14px 18px;

  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #3b82f6);

  border: 1px solid rgba(147, 197, 253, 0.18);
  border-radius: 11px;

  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.19);

  font-family: inherit;
  font-size: 15px;
  font-weight: 750;
  letter-spacing: 0.1px;

  cursor: pointer;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease;
}

.auth-page #loginButton:hover {
  filter: brightness(1.1);
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.3);
}

.auth-page #loginButton:active {
  transform: scale(0.985);
}

.auth-page #loginButton:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 3px;
}

.auth-page #loginButton:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  box-shadow: none;
}

/* Authentication feedback */
.auth-page #authMessage {
  margin: 14px 0 0;

  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.auth-page #authMessage:empty {
  display: none;
}

/* Signup link section */
.auth-page .auth-switch {
  margin: 25px 0 0;
  padding-top: 21px;

  color: var(--auth-muted);
  border-top: 1px solid rgba(148, 163, 184, 0.12);

  text-align: center;
  font-size: 13px;
  line-height: 1.8;
}

.auth-page .auth-switch a {
  margin-left: 4px;

  color: var(--auth-blue-light);
  text-decoration: none;
  font-weight: 750;

  transition: color 0.2s ease;
}

.auth-page .auth-switch a:hover {
  color: #bfdbfe;
  text-decoration: underline;
}

/* Footer note */
.auth-page .footer-note {
  margin: 22px 0 0;

  color: #64748b;

  text-align: center;
  font-size: 12px;
  line-height: 1.6;
}

/* Keyboard accessibility */
.auth-page a:focus-visible {
  outline: 2px solid var(--auth-blue-light);
  outline-offset: 4px;
  border-radius: 4px;
}

/* Small mobile screens */
@media (max-width: 380px) {
  body.auth-page {
    padding: 22px 13px;
  }

  .auth-page .brand {
    margin-bottom: 23px;
    font-size: 23px;
  }

  .auth-page .auth-card {
    padding: 27px 20px 23px;
    border-radius: 18px;
  }

  .auth-page .auth-card h1 {
    font-size: 27px;
  }

  .auth-page .subtitle {
    font-size: 13px;
  }
}

/* Larger screens */
@media (min-width: 700px) {
  body.auth-page {
    padding: 45px 24px;
  }

  .auth-page .auth-card {
    padding: 38px 34px 32px;
  }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  .auth-page *,
  .auth-page *::before,
  .auth-page *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================
   SABEMARKET — PREMIUM SIGNUP PAGE
   Consistent dark navy and blue theme
   ============================================ */

/* Signup page layout */
body.auth-page:has(#signupForm) {
  align-items: flex-start;
  padding: 38px 18px 30px;
}

/* Signup container */
.auth-page:has(#signupForm) .auth-container {
  width: 100%;
  max-width: 490px;
  margin: 0 auto;
}

/* Brand spacing */
.auth-page:has(#signupForm) .brand {
  margin-bottom: 25px;
  font-size: 25px;
  letter-spacing: -0.8px;
}

/* Signup card */
.auth-page:has(#signupForm) .auth-card {
  padding: 32px 30px 27px;
  border: 1px solid rgba(96, 165, 250, 0.15);
  border-radius: 22px;
  background:
    linear-gradient(
      145deg,
      rgba(18, 31, 54, 0.98),
      rgba(11, 21, 39, 0.99)
    );
  box-shadow:
    0 24px 65px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

/* Heading */
.auth-page:has(#signupForm) .eyebrow {
  margin-bottom: 10px;
  color: #60a5fa;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
}

.auth-page:has(#signupForm) .auth-card h1 {
  margin-bottom: 10px;
  font-size: clamp(27px, 5vw, 32px);
  line-height: 1.2;
  letter-spacing: -1px;
}

.auth-page:has(#signupForm) .subtitle {
  margin-bottom: 26px;
  color: #9aabc2;
  font-size: 14px;
  line-height: 1.7;
}

/* Signup form layout */
.auth-page #signupForm {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 0;
}

/* Labels */
.auth-page #signupForm > label {
  margin: 0 0 8px;
  color: #dce6f5;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.5;
}

/* All signup text and date inputs */
.auth-page #signupForm > input,
.auth-page #signupForm .password-wrap input,
.auth-page #signupForm select {
  width: 100%;
  min-width: 0;
  height: 49px;
  padding: 0 14px;
  margin: 0 0 19px;

  color: #f8fafc;
  background-color: #0a1427;

  border: 1px solid #293953;
  border-radius: 10px;
  outline: none;

  font-family: inherit;
  font-size: 14px;

  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background-color 0.18s ease;
}

/* Placeholder */
.auth-page #signupForm input::placeholder {
  color: #71819a;
  opacity: 1;
}

/* Focus state */
.auth-page #signupForm > input:focus,
.auth-page #signupForm .password-wrap input:focus,
.auth-page #signupForm select:focus {
  border-color: #3b82f6;
  background-color: #0c192f;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.13);
}

/* Date input */
.auth-page #signupForm input[type="date"] {
  color-scheme: dark;
}

/* Dropdown */
.auth-page #signupForm select {
  cursor: pointer;
}

.auth-page #signupForm select:invalid {
  color: #71819a;
}

.auth-page #signupForm select option {
  color: #f8fafc;
  background: #101a30;
}

/* Password fields */
.auth-page #signupForm .password-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  margin: 0 0 19px;
}

.auth-page #signupForm .password-wrap input {
  margin: 0;
  padding-right: 76px;
}

/* Show/hide buttons */
.auth-page #signupForm .password-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);

  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 44px;
  min-height: 36px;
  padding: 5px;

  color: #60a5fa;
  background: transparent;
  border: 0;
  border-radius: 7px;

  font-family: inherit;
  font-size: 12px;
  font-weight: 750;

  cursor: pointer;
}

.auth-page #signupForm .password-toggle:hover {
  background: rgba(59, 130, 246, 0.12);
}

/* Optional label */
.auth-page #signupForm .optional {
  color: #7f91aa;
  font-size: 11px;
  font-weight: 500;
}

/* Affiliate field hint */
.auth-page #signupForm .field-hint {
  margin: -12px 0 23px;
  color: #8394ad;
  font-size: 12px;
  line-height: 1.6;
}

/* Consent panel */
.auth-page #signupForm .consent-section {
  display: flex;
  flex-direction: column;
  gap: 14px;

  margin: 0 0 24px;
  padding: 17px 15px;

  background: rgba(5, 13, 28, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 12px;
}

/* Each consent row */
.auth-page #signupForm .consent-option {
  display: flex;
  align-items: flex-start;
  gap: 11px;

  margin: 0;
  color: #b9c7da;

  font-size: 12px;
  font-weight: 400;
  line-height: 1.65;

  cursor: pointer;
}

/* Consent checkboxes */
.auth-page #signupForm .consent-option input[type="checkbox"] {
  flex: 0 0 17px;
  width: 17px;
  height: 17px;
  margin: 2px 0 0;

  accent-color: #3b82f6;
  cursor: pointer;
}

/* Consent links */
.auth-page #signupForm .consent-option a {
  color: #60a5fa;
  text-decoration: underline;
  text-decoration-color: rgba(96, 165, 250, 0.4);
  text-underline-offset: 3px;
}

.auth-page #signupForm .consent-option a:hover {
  color: #bfdbfe;
}

/* Create account button */
.auth-page #signupButton {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  min-height: 52px;
  padding: 14px 18px;

  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #3b82f6);

  border: 1px solid rgba(147, 197, 253, 0.2);
  border-radius: 11px;

  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.2);

  font-family: inherit;
  font-size: 15px;
  font-weight: 750;
  letter-spacing: 0.1px;

  cursor: pointer;

  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    filter 0.18s ease;
}

.auth-page #signupButton:hover {
  filter: brightness(1.1);
  box-shadow: 0 10px 27px rgba(37, 99, 235, 0.3);
}

.auth-page #signupButton:active {
  transform: scale(0.985);
}

.auth-page #signupButton:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  box-shadow: none;
}

/* Authentication message */
.auth-page #signupForm #authMessage {
  margin: 13px 0 0;
  font-size: 13px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.auth-page #signupForm #authMessage:empty {
  display: none;
}

/* Login link */
.auth-page:has(#signupForm) .auth-switch {
  margin-top: 23px;
  padding-top: 20px;

  color: #94a3b8;
  border-top: 1px solid rgba(148, 163, 184, 0.13);

  font-size: 13px;
  line-height: 1.8;
  text-align: center;
}

.auth-page:has(#signupForm) .auth-switch a {
  color: #60a5fa;
  font-weight: 750;
  text-decoration: none;
}

.auth-page:has(#signupForm) .auth-switch a:hover {
  color: #bfdbfe;
  text-decoration: underline;
}

/* Footer */
.auth-page:has(#signupForm) .footer-note {
  margin-top: 20px;
  color: #71819a;
  font-size: 12px;
  line-height: 1.7;
  text-align: center;
}

/* Mobile phones */
@media (max-width: 480px) {
  body.auth-page:has(#signupForm) {
    padding: 24px 13px 22px;
  }

  .auth-page:has(#signupForm) .brand {
    margin-bottom: 21px;
    font-size: 23px;
  }

  .auth-page:has(#signupForm) .auth-card {
    padding: 25px 19px 22px;
    border-radius: 18px;
  }

  .auth-page:has(#signupForm) .auth-card h1 {
    font-size: 27px;
  }

  .auth-page:has(#signupForm) .subtitle {
    font-size: 13px;
  }

  .auth-page #signupForm .consent-section {
    padding: 15px 12px;
    gap: 13px;
  }

  .auth-page #signupForm .consent-option {
    font-size: 11.5px;
  }
}

/* Small phones */
@media (max-width: 350px) {
  body.auth-page:has(#signupForm) {
    padding-right: 10px;
    padding-left: 10px;
  }

  .auth-page:has(#signupForm) .auth-card {
    padding-right: 15px;
    padding-left: 15px;
  }

  .auth-page:has(#signupForm) .auth-card h1 {
    font-size: 25px;
  }
}

/* Desktop */
@media (min-width: 768px) {
  body.auth-page:has(#signupForm) {
    padding-top: 45px;
    padding-bottom: 40px;
  }

  .auth-page:has(#signupForm) .auth-container {
    max-width: 490px;
  }
}

/* Accessibility */
.auth-page #signupForm input:focus-visible,
.auth-page #signupForm select:focus-visible,
.auth-page #signupForm button:focus-visible,
.auth-page a:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 3px;
}

/* Reduce animations when requested by the device */
@media (prefers-reduced-motion: reduce) {
  .auth-page:has(#signupForm) *,
  .auth-page:has(#signupForm) *::before,
  .auth-page:has(#signupForm) *::after {
    transition: none !important;
    animation: none !important;
  }
}