:root {
  --black: #050505;
  --panel: #0b0b0b;
  --line: #574826;
  --gold: #d8b45d;
  --gold-light: #f5dda0;
  --gold-dark: #aa7920;
  --white: #f8f8f8;
  --green: #0cad4b;
  --bottom-safe-space: calc(142px + env(safe-area-inset-bottom));
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: "Segoe UI", Tahoma, sans-serif;
  padding-bottom: var(--bottom-safe-space);
}

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

.app-header {
  min-height: 230px;
  display: grid;
  grid-template-columns: 72px 1fr 72px;
  align-items: center;
  gap: 12px;
  padding: 15px clamp(18px, 4vw, 42px) 10px;
  background: #000;
}

.round-action {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #090909;
  background: radial-gradient(circle at 36% 30%, #fff1c4, #d5ad5a 70%, #98701f);
  box-shadow: 0 4px 10px rgba(0,0,0,.45);
}

.round-action svg { width: 36px; height: 36px; color: #000; fill: #000 !important; }
.round-action svg path { fill: #000 !important; }
.round-action.whatsapp { color: #050505; }
.round-action.whatsapp svg { width: 43px; height: 43px; fill: #050505; filter: none; }

.brand { min-width: 0; display: grid; place-items: center; }
.brand-logo { display: block; width: min(100%, 320px); height: auto; max-height: 120px; object-fit: contain; }

.welcome-strip,
.contact-ribbon,
.rates-table thead {
  background: linear-gradient(180deg, #f7dfa3 0%, #e4c272 42%, #b8872d 100%);
  color: #090909;
}

.welcome-strip {
  padding: 10px 16px;
  text-align: center;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(21px, 4vw, 33px);
  border-block: 2px solid #6e501a;
  margin-bottom: 10px;
}

.market-overview { padding: 12px clamp(10px, 3vw, 24px) 4px; max-width: 1040px; }
.market-tile { height: 100%; border: 2px solid #b5904b; text-align: center; background: #020202; }
.market-tile h2 { margin: 0; padding: 9px 3px; color: #060606; background: linear-gradient(#f3dda8,#c7973d); font-size: clamp(15px, 3.9vw, 28px); font-weight: 800; }
.market-tile strong { display: block; padding-top: 10px; font-size: clamp(21px, 5vw, 42px); font-weight: 500; font-variant-numeric: tabular-nums; }
.market-tile small { display: block; padding: 7px 2px 11px; color: #d8bd80; font-size: clamp(9px, 2.1vw, 18px); white-space: nowrap; }

.rate-board { width: min(100% - 20px, 1020px); margin: 12px auto 0; }
.rate-group { margin-bottom: 10px; border: 1px solid #b9903f; border-radius: 12px; overflow: hidden; background: var(--panel); }
.rates-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-variant-numeric: tabular-nums; }
.rates-table caption { display: none; }
.rates-table th, .rates-table td { padding: 12px 15px; border-bottom: 1px solid #302918; vertical-align: middle; }
.rates-table tr:last-child > * { border-bottom: 0; }
.rates-table thead th { padding-block: 9px; font-size: clamp(15px, 2.2vw, 20px); font-weight: 800; }
.rates-table thead th:first-child, .rates-table tbody th { text-align: left; }
.rates-table thead th:not(:first-child), .rates-table td { text-align: center; }
.rates-table thead th:first-child, .rates-table tbody th { width: 45%; }
.rates-table tbody th { color: #e6c77f; font-size: clamp(13px, 2.1vw, 19px); }
.rates-table td { font-size: clamp(16px, 2.8vw, 23px); font-weight: 700; }
.rates-table td small { color: #dcc07e; font-size: 12px; line-height: 1.1; }
.live-value { display: inline-block; padding: 3px 10px; border-radius: 5px; color: #fff; }

.contact-ribbon { width: min(100%, 1020px); margin: 0 auto var(--bottom-safe-space); display: grid; grid-template-columns: 1fr 1fr; border-block: 1px solid #6d4d12; }
.contact-ribbon a { min-height: 66px; display: flex; justify-content: center; align-items: center; gap: 12px; padding: 8px; text-transform: uppercase; font-size: clamp(16px, 3vw, 22px); }
.contact-ribbon a + a { border-left: 2px solid rgba(0,0,0,.55); }
.quick-contact-icon { width: 43px; height: 43px; flex: 0 0 43px; color: #111; fill: currentColor; }
.whatsapp-icon { width: 47px; height: 47px; flex-basis: 47px; filter: drop-shadow(0 2px 2px rgba(0,0,0,.18)); }
.contact-ribbon span { line-height: 1; white-space: nowrap; }

@media (max-width: 380px) {
  .contact-ribbon a { gap: 7px; font-size: 14px; }
  .quick-contact-icon { width: 36px; height: 36px; flex-basis: 36px; }
  .whatsapp-icon { width: 39px; height: 39px; flex-basis: 39px; }
}

.bottom-nav {
  position: fixed;
  z-index: 20;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 7px 4px calc(7px + env(safe-area-inset-bottom));
  background: #fff;
  color: #080808;
  border-top: 1px solid #c9c9c9;
  box-shadow: 0 -5px 14px rgba(0,0,0,.25);
}
.bottom-nav a { min-width: 0; min-height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; text-align: center; color: #050505; }
.bottom-nav .nav-icon { width: 38px; height: 38px; display: block; fill: currentColor; }
.bottom-nav b { font-size: clamp(10px, 2.4vw, 15px); line-height: 1; white-space: nowrap; }
.bottom-nav a:active { color: #9b711e; }

.live-marquee {
  position: fixed;
  z-index: 19;
  left: 0;
  right: 0;
  bottom: calc(79px + env(safe-area-inset-bottom));
  min-height: 36px;
  overflow: hidden;
  border-block: 1px solid #7c5b16;
  background: linear-gradient(180deg, #f7dfa3 0%, #e4c272 42%, #b8872d 100%);
  color: #090909;
  box-shadow: 0 -3px 10px rgba(0,0,0,.28);
  font-size: 16px;
  font-weight: 700;
  line-height: 34px;
  white-space: nowrap;
}
.live-marquee[hidden], .live-message-popup[hidden] { display: none; }
.live-marquee-track {
  display: inline-flex;
  min-width: max-content;
  will-change: transform;
  animation: live-marquee-scroll var(--marquee-duration, 14s) linear infinite;
}
.live-marquee-track span { padding-right: 64px; }
.live-marquee:hover .live-marquee-track { animation-play-state: paused; }

.live-message-popup {
  position: fixed;
  z-index: 40;
  left: 50%;
  bottom: calc(128px + env(safe-area-inset-bottom));
  width: min(calc(100% - 28px), 520px);
  padding: 17px 48px 17px 18px;
  transform: translateX(-50%);
  border: 2px solid #d8b45d;
  border-radius: 14px;
  background: #fff8e7;
  color: #090909;
  box-shadow: 0 10px 32px rgba(0,0,0,.5);
}
.live-message-popup p { margin: 0; font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
.live-message-close {
  position: absolute;
  top: 5px;
  right: 7px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #090909;
  font-size: 31px;
  line-height: 1;
  cursor: pointer;
}
.live-message-close:hover { background: #ead79e; }

@keyframes live-marquee-scroll {
  from { transform: translateX(100vw); }
  to { transform: translateX(-100%); }
}

.app-side-nav {
  position: fixed;
  z-index: 101;
  inset: 0 auto 0 0;
  width: 100%;
  max-width: none;
  display: flex;
  flex-direction: column;
  background: #080808;
  color: #f8f8f8;
  box-shadow: 12px 0 32px rgba(0,0,0,.48);
  transform: translateX(-105%);
  visibility: hidden;
  transition: transform .28s cubic-bezier(.22,1,.36,1), visibility 0s linear .28s;
}
.app-side-nav.open { transform: translateX(0); visibility: visible; transition-delay: 0s; }
.side-nav-backdrop { position: fixed; z-index: 100; inset: 0; border: 0; background: rgba(0,0,0,.68); opacity: 0; transition: opacity .2s ease-out; }
.side-nav-backdrop.open { opacity: 1; }
.side-nav-head { min-height: 104px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 10px 14px; color: #090909; background: #fff; }
.side-nav-logo { display: block; width: min(100%, 220px); height: auto; max-height: 90px; object-fit: contain; }
.side-nav-title { color: #090909; font-size: 20px; font-weight: 800; line-height: 1.2; }
.side-nav-close { width: 44px; height: 44px; border: 0; background: transparent; color: #090909; font-size: 38px; line-height: 1; cursor: pointer; }
.app-side-nav > nav { display: flex; flex-direction: column; padding: 12px 0; overflow-y: auto; }
.app-side-nav > nav a { min-height: 48px; display: flex; align-items: center; padding: 11px 22px; border-bottom: 1px solid #302918; color: #f1d38d; font-size: 16px; text-decoration: none; }
.app-side-nav > nav a:hover, .app-side-nav > nav a:focus-visible, .app-side-nav > nav a.active { background: #211b0f; color: #fff1c4; }
.side-nav-version { margin-top: auto; padding: 10px 16px; color: #fff; text-align: center; font-size: 13px; line-height: 1.2; }
.side-nav-contact { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid #574826; }
.side-nav-contact a { min-height: 56px; display: grid; place-items: center; padding: 9px; color: #090909; background: #d8b45d; text-align: center; font-size: 13px; font-weight: 700; }
.side-nav-contact a + a { border-left: 1px solid #70501b; }
body.menu-open { overflow: hidden; }

.app-footer { padding: 10px 10px 12px; text-align: center; font-size: 14px; color: #d7d7d7; background: #050505; }

.rate-badge { display: inline-block; width: auto; min-width: 0; max-width: 100%; padding: 3px 8px; border-radius: 5px; color: inherit; line-height: 1.2; white-space: nowrap; }
.rate-up, .rate-down { color: #fff !important; box-shadow: 0 3px 8px rgba(0,0,0,.35); }
.rate-up { background: #0cad4b !important; }
.rate-down { background: #c62828 !important; }
.rate-state { padding: 20px !important; text-align: center !important; color: #dcc07e; font-size: 15px !important; font-weight: 500 !important; }
.rate-status { width: min(100% - 20px, 1020px); margin: 0 auto 10px; text-align: center; color: #dcc07e; font-size: 13px; }
.rates-offline .rate-status { color: #ffb4a9; }
.high-value { color: #8ee9ad; }
.low-value { color: #ffaaa2; }

/* Shared shell for migrated legacy screens. Page-specific content styles remain isolated. */
.dikg-app body { min-height: 100vh; background: #050505 !important; color: #f8f8f8; padding-bottom: var(--bottom-safe-space); }
.dikg-app .ui-page { min-height: 100vh !important; background: #050505 !important; color: #f8f8f8; padding-bottom: var(--bottom-safe-space); }
.dikg-app body.booking-page,
.dikg-app body.booking-page > .ui-page,
.dikg-app body.booking-page [data-role="page"] {
  background: #050505 !important;
  background-color: #050505 !important;
  background-image: none !important;
}
.dikg-app .app-header { position: relative; z-index: 30; }
.dikg-app .bottom-nav { font-family: "Segoe UI", Tahoma, sans-serif; }
.dikg-app .bottom-nav a { text-decoration: none !important; }
.dikg-app .bottom-nav a.active { color: #9b711e !important; }
.dikg-app .app-footer { position: relative; z-index: 10; width: 100%;display: none; }

@media (max-width: 575.98px) {
  .app-header { min-height: 135px; grid-template-columns: 54px 1fr 54px; padding-inline: 14px; }
  .round-action { width: 52px; height: 52px; }
  .round-action svg { width: 29px; height: 29px; }
  .round-action.whatsapp svg { width: 35px; height: 35px; }
  .brand-logo { width: min(100%, 230px); max-height: 104px; }
  .market-overview { padding-inline: 7px; }
  .market-tile strong { letter-spacing: -.03em; }
  .rate-board { width: calc(100% - 14px); }
  .rate-group { border-radius: 0; margin-bottom: 9px; }
  .rates-table th, .rates-table td { padding: 11px 7px; }
  .rates-table thead th:first-child, .rates-table tbody th { width: 42%; }
  .futures-table thead th:first-child, .futures-table tbody th { width: 35%; }
  .live-value, .rate-badge { padding-inline: 6px; }
  .desktop-market-table { display: none; }
}

@media (min-width: 768px) {
  body { background: #f3f1ed; color: var(--white); padding-bottom: var(--bottom-safe-space); }
  .app-header { min-height: 145px; max-width: none; padding-inline: max(7vw, 40px); }
  .brand-logo { width: min(100%, 300px); max-height: 112px; }
  main { padding-bottom: 28px; }
  .welcome-strip { font-size: 19px; padding: 6px; }
  .market-overview { display: none; }
  .rate-board { margin-top: 16px; padding: 14px; border-radius: 14px; background: #080808; box-shadow: 0 12px 30px rgba(0,0,0,.28); }
  .contact-ribbon { border-radius: 0 0 14px 14px; overflow: hidden; }
  .bottom-nav { position: fixed; max-width: none; margin: 0; border-radius: 0; }
  .bottom-nav a { padding-block: 7px; }
  .bottom-nav .nav-icon { width: 34px; height: 34px; }
  .bottom-nav b { font-size: 14px; }
  .app-footer { background: #050505; }
}

@media (min-width: 1200px) {
  .app-side-nav { width: 340px; max-width: 340px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .live-marquee-track { display: block; min-width: 100%; animation: none; text-align: center; }
  .live-marquee-track span + span { display: none; }
}
@media (prefers-reduced-motion: reduce) { .app-side-nav, .side-nav-backdrop { transition: none; } }

:focus-visible { outline: 3px solid #f4cf72; outline-offset: 3px; }
