:root {
  --bg: #ede4f2;
  --bg-header: rgba(255, 252, 248, 0.88);
  --card: #fffdf8;
  --card2: #fff6e8;
  --gold: #c4a15a;
  --gold-deep: #1b2744;
  --gold-line: rgba(196, 161, 90, 0.45);
  --text: #1b2744;
  --muted: #8a8494;
  --buy: #16a34a;
  --sell: #dc2626;
  --navy: #1b2744;
  --border: #e6d3b0;
  --input: rgba(255, 253, 248, 0.9);
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, sans-serif;
}

.page {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--bg) url("../imgs/asawir-silk.jpg") no-repeat center top / cover;
}

.top {
  display: table;
  width: 100%;
  height: 9vh;
  background: var(--bg-header);
}

.top-cell {
  display: table-cell;
  width: 33.33%;
  vertical-align: middle;
}

.top-center {
  text-align: center;
}

.top-right {
  text-align: right;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.6vw;
  vertical-align: middle;
}

.brand-mark {
  width: 4.6vw;
  height: 4.6vw;
  object-fit: contain;
}

.brand-rule {
  width: 1px;
  height: 3.2vw;
  background: #251901;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1;
  text-align: left;
}

.brand-copy b {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  font-size: 1.7vw;
  letter-spacing: 0.08em;
  color: #1b2744;
}

.brand-mid {
  display: flex;
  align-items: center;
  margin-top: 0.2vh;
  color: #1b2744;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.62vw;
  letter-spacing: 0.22em;
}

.brand-mid i {
  width: 1.1vw;
  height: 1px;
  margin: 0 0.35vw;
  background: #251901;
}

.brand-copy small {
  margin-top: 0.35vh;
  color: #251901;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.48vw;
  letter-spacing: 0.04em;
}

.icon-btn {
  width: 2.2vw;
  height: 2.2vw;
  line-height: 2.05vw;
  border-color: #e6d3b0;
  background: linear-gradient(160deg, #fffaf0, #f3e2b8);
  color: #1b2744;
}

.user-wrap {
  display: inline-block;
}

.user-chip {
  background: #fffdf8;
  color: #1b2744;
  border-color: #e6d3b0;
}

.user-name,
.user-id {
  color: #1b2744;
}

.kyc {
  background: rgba(255, 252, 248, 0.78);
  color: #6b5a4a;
  text-align: left !important;
  overflow: hidden;
  padding: 0.55vh 0;
  border-bottom: 1px solid rgba(196, 161, 90, 0.35);
}

.kyc-marquee {
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
}

.kyc-track {
  display: inline-flex;
  align-items: center;
  width: max-content;
  animation: kyc-marquee 32s linear infinite;
  will-change: transform;
}

.kyc-item {
  display: inline-block;
  padding: 0 3rem;
  font-size: clamp(11px, 0.85vw, 14px);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.kyc-marquee:hover .kyc-track {
  animation-play-state: paused;
}

@keyframes kyc-marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.live-head,
#viewLive .tabs,
.layout {
  max-width: none;
}

.live-head {
  background: rgba(255, 252, 248, 0.94);
  border: 1px solid rgba(228, 214, 184, 0.9);
  border-radius: 1.2vw;
  margin: 0.8vh 1.4vw 0;
  padding: 0.9vh 1vw;
}

.live-head-title,
.live-head-sub,
.trade-info-text strong,
.trade-info-text span,
.products-head-left {
  color: #1b2744;
}

.trade-info {
  border-color: #efe4cf;
  background: #fffdf8;
}

.tabs {
  background: #fffdf8;
  border-color: #e6d3b0;
}

.tab {
  color: #1b2744;
}

.tab.on {
  background: linear-gradient(90deg, #1b2a4e, #152038);
  color: #fff;
}

.card {
  background: #fffdf8;
  border-color: #e6d3b0;
  box-shadow: 0 8px 18px rgba(27, 39, 68, 0.06);
}

.card-gold {
  background: #fff6e8;
}

.card-blue {
  background: #f3f7fd;
}

.card-lavender {
  background: #f4f1fa;
}

.card-title,
.card-price,
.prod,
.buy-val,
.sell-val {
  color: #1b2744;
}

.card-hl {
  border-top-color: rgba(196, 161, 90, 0.35);
}

.products-head-left svg {
  color: #1b2744;
}

.badge-buy,
.badge-sell {
  border: 0;
  border-radius: 999px;
  padding: 0.45vh 0.9vw;
}

.badge-buy {
  background: #1b2744;
  color: #fff;
}

.badge-sell {
  background: #f3d2cc;
  color: #1b2744;
}

.prod-row {
  display: table;
  background: #fffdf8;
  border-color: #e6d3b0;
}

.prod-name {
  display: inline-block;
  vertical-align: middle;
}

.prod-name b,
.prod-name small {
  display: block;
  color: #1b2744;
  font-weight: 700;
}

.prod-name small {
  font-size: 0.72vw;
  font-weight: 600;
  opacity: 0.85;
}

.icon-gold {
  background: #f8e7c4;
  border-color: #e4c98a;
}

.icon-silver {
  background: #eef2f8;
  border-color: #d5deea;
}

.metal-icon,
.metal-icon-sm {
  object-fit: cover;
  border-radius: 50%;
}

.nav-desktop {
  display: table;
}

.nav-mobile {
  display: none;
}

.bottom-wrap {
  left: 0;
  right: 0;
  width: auto;
  transform: none;
  padding: 0.6rem 0.8rem 1.1rem;
  background: transparent;
}

.bottom-nav {
  background: rgba(255, 252, 248, 0.96);
  border-color: #eadcc4;
  box-shadow: 0 10px 28px rgba(27, 39, 68, 0.08);
}

.nav-item {
  color: #1b2744;
}

.live-pill {
  background: linear-gradient(160deg, #fff4d2, #e4c16a);
  color: #1b2744;
}

/* Booking cards: in-flow on mobile only (scroll with content, not sticky) */
.mobile-dock-cards {
  display: none;
}

.modal-box,
.order-card,
.order-card-v2,
.login-card,
.drawer {
  background: #fffdf8;
  color: #1b2744;
}

.drawer {
  background: #f7f1ea url("../imgs/asawir-silk.jpg") no-repeat center top / cover;
}

.drawer-card,
.drawer-support {
  background: rgba(255, 253, 248, 0.92);
  color: #1b2744;
}

.mode-pill {
  background: #fff;
  border-color: #eadcc4;
}

.mode-pill .mode.on {
  color: #fff;
  background: #1b2744;
}

.bidask-v2 .bid {
  color: #dc2626;
}

.bidask-v2 .ask {
  color: #16a34a;
}

.btn-sell {
  background: #b4232c;
  color: #fff;
}

.btn-buy {
  background: #1b2744;
  color: #fff;
}

.order-product-icon {
  overflow: hidden;
  background: #f8e7c4;
  border-color: #e4c98a;
  line-height: 0;
}

.order-product-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.login-logo {
  width: 5vw;
  height: auto;
  max-height: 12vh;
}

/* Mobile: scrollable page + app-style dock + compact cards */
@media (max-width: 768px) {
  html,
  body,
  .page {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    height: auto !important;
    min-height: 100%;
    -webkit-overflow-scrolling: touch;
  }

  .page,
  .page.scrollable {
    overflow-y: auto !important;
    height: auto !important;
  }

  /* Always show bottom dock on mobile (ignore desktop nav-hidden) */
  body.nav-hidden .bottom-wrap {
    display: block !important;
  }

  .nav-desktop {
    display: none !important;
  }

  .nav-toggle {
    display: none !important;
  }

  .bottom-wrap {
    display: block !important;
    position: fixed !important;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0 0 calc(10px + env(safe-area-inset-bottom, 0px));
    overflow: visible;
    background: transparent;
    z-index: 200 !important;
    pointer-events: none;
  }

  /* Sidebar must cover bottom nav when open */
  .drawer-bg {
    z-index: 220 !important;
  }

  .drawer {
    z-index: 230 !important;
  }

  .bottom-wrap .bottom-nav {
    pointer-events: auto;
  }

  /* Scrollable booking cards (not fixed) — only on live rates content */
  .mobile-dock-cards {
    display: block !important;
    width: 100%;
    margin: 14px 0 8px;
    padding: 0;
    text-align: left;
  }

  .booking-wa {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid #e6d3b0;
    background: #ffffff;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(27, 39, 68, 0.06);
  }

  .booking-wa-ico {
    display: inline-flex;
    color: #c4a15a;
    flex-shrink: 0;
  }

  .booking-wa-copy {
    min-width: 0;
    flex: 1;
  }

  .booking-wa-copy small {
    display: block;
    color: #c4a15a;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
  }

  .booking-wa-copy b {
    display: block;
    margin-top: 2px;
    color: #1b2744;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .booking-call {
    position: relative;
    display: block;
    min-height: 132px;
    border-radius: 22px;
    border: 1px solid #e6d3b0;
    overflow: hidden;
    text-decoration: none;
    background: #fffdf8;
  }

  .booking-call-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
  }

  .booking-call-shade {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 132px;
    padding: 14px 16px;
    background: linear-gradient(90deg, rgba(255, 253, 248, 0.92) 0%, rgba(255, 253, 248, 0.55) 55%, rgba(255, 253, 248, 0.15) 100%);
  }

  .booking-call-kicker {
    color: #1b2744;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
  }

  .booking-call-title {
    margin-top: 4px;
    color: #1b2744;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: 0.02em;
  }

  .booking-call-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #1b2744;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    width: fit-content;
  }

  /* App BottomTab floating pill */
  .nav-mobile {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    width: 92% !important;
    max-width: none;
    height: 64px;
    margin: 0 auto;
    padding: 0 10px;
    border-radius: 32px;
    border: 1.5px solid #d9c08a;
    background: #fffefb;
    box-shadow: 0 6px 14px rgba(27, 39, 68, 0.1);
    overflow: visible;
    position: relative;
    box-sizing: border-box;
  }

  .nav-mobile .nav-item {
    display: flex !important;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: auto;
    height: 100%;
    padding: 0 2px;
    color: #1b2744 !important;
    font-size: 10px;
    font-weight: 500;
    white-space: normal;
    background: transparent;
    position: relative;
    overflow: visible;
  }

  .nav-mobile .nav-ico {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin: 0 0 3px;
    color: #1b2744;
  }

  .nav-mobile .nav-ico svg {
    display: block !important;
    margin: 0 !important;
  }

  .nav-mobile .nav-label {
    display: block;
    white-space: nowrap;
    line-height: 1.1;
    color: #1b2744;
  }

  /* Gold circle always on Live Rates — other tabs only bold/unbold label */
  .nav-live-mob {
    overflow: visible !important;
  }

  .nav-mobile .live-circle,
  .nav-mobile .nav-live-mob .nav-ico.live-circle {
    width: 52px;
    height: 52px;
    margin: -18px auto 2px;
    border-radius: 50%;
    border: 1.5px solid #c9a45c;
    background: linear-gradient(160deg, #fff4d2 0%, #f3d98a 48%, #e4c16a 100%);
    box-shadow: 0 3px 8px rgba(196, 161, 90, 0.35);
    color: #1b2744;
  }

  .nav-mobile .nav-label {
    font-weight: 500;
  }

  .nav-mobile .nav-item.on .nav-label {
    font-weight: 800;
  }

  .layout,
  .margin-page,
  .empty-screen,
  .notify-list,
  #viewOrders .layout,
  #viewLive .layout {
    padding-bottom: 96px !important;
  }

  .top {
    height: 72px;
    padding: 0;
  }

  .top-cell {
    padding: 0 8px;
  }

  .brand-lockup {
    gap: 8px;
    max-width: calc(100vw - 96px);
  }

  .brand-mark {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
  }

  .brand-rule {
    width: 1px;
    height: 36px;
  }

  .brand-copy b {
    font-size: 15px;
    letter-spacing: 0.1em;
  }

  .brand-mid {
    font-size: 8px;
    letter-spacing: 0.18em;
    margin-top: 1px;
  }

  .brand-mid i {
    width: 10px;
    margin: 0 4px;
  }

  .brand-copy small {
    font-size: 7px;
    letter-spacing: 0.02em;
    margin-top: 2px;
  }

  .icon-btn {
    width: 34px;
    height: 34px;
    line-height: 32px;
  }

  .live-head {
    margin: 8px 10px 0;
    padding: 8px 10px;
    border-radius: 14px;
  }

  .live-head-title {
    font-size: 13px;
    letter-spacing: 0.08em;
  }

  .live-head-sub {
    font-size: 10px;
  }

  .trade-info {
    margin-top: 6px;
    padding: 6px 8px;
  }

  .tabs,
  .tabs.tabs-one {
    margin: 8px 10px 0;
    padding: 2px;
    border-radius: 12px;
  }

  .tab {
    padding: 7px 12px;
    font-size: 11px;
  }

  .layout {
    padding: 8px 10px 110px;
  }

  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .card {
    min-height: 0;
    height: auto;
    padding: 8px 8px 6px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(27, 39, 68, 0.06);
  }

  .card-top {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    text-align: left;
  }

  .card-icon {
    display: block;
    width: auto;
    margin: 0;
    flex-shrink: 0;
  }

  .card-info {
    display: block;
    text-align: left;
    min-width: 0;
    flex: 1;
  }

  .metal-icon {
    width: 28px;
    height: 28px;
  }

  .card-title {
    font-size: 10px;
    letter-spacing: 0.04em;
    text-align: left;
  }

  .card-price {
    margin-top: 2px;
    font-size: 15px;
    line-height: 1.15;
  }

  .card-hl {
    margin-top: 6px;
    padding-top: 6px;
    font-size: 9px;
  }

  .card-hl i {
    margin-top: 1px;
    font-size: 10px;
  }

  .products-head {
    margin: 10px 0 6px;
  }

  .products-head-left {
    font-size: 12px;
  }

  .prod-row {
    padding: 10px 10px;
    border-radius: 12px;
  }

  .prod-name b {
    font-size: 14px;
    line-height: 1.2;
  }

  .prod-name small {
    margin-top: 3px;
    font-size: 11px !important;
    line-height: 1.35;
    font-weight: 600;
    color: #5a6b7c;
    opacity: 1;
    white-space: normal;
    word-break: break-word;
  }

  .metal-icon-sm {
    width: 22px;
    height: 22px;
  }

  .login-logo {
    width: 72px;
    max-width: 28vw;
    max-height: none;
  }
}
