/* =========================================================
   Dollar Exchange - Stylesheet
   Design: deep ledger-navy + minted-teal accent, monospace
   for numbers (this is a money/rate product, numbers are
   the hero, not decoration).
   ========================================================= */

:root {
  --navy-950: #0b1220;
  --navy-900: #0f1b2d;
  --navy-800: #16263d;
  --navy-700: #203450;
  --line: #26405f;
  --ink: #e8eef5;
  --ink-dim: #9fb0c3;
  --teal: #2dd4a7;
  --teal-dim: #1a9c7c;
  --amber: #f2b544;
  --red: #ef5b5b;
  --radius: 10px;
  --mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--navy-950);
  color: var(--ink);
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

img, table { max-width: 100%; }


/* ---------- Top bar / header ---------- */
header.site-header {
  background: var(--navy-900);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 14px 20px;
  max-width: 1160px;
  margin: 0 auto;
}
.brand {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand .dot { color: var(--teal); }
.brand-logo-img {
  height: 52px;
  width: auto;
  max-width: 240px;
  object-fit: contain;
  display: block;
}
@media (max-width: 640px) {
  .brand-logo-img { height: 42px; max-width: 190px; }
}
nav.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  font-size: 13.5px;
  color: var(--ink-dim);
  order: 3;
  width: 100%;
}
nav.main-nav a:hover { color: var(--teal); }
.header-actions { display: flex; gap: 10px; align-items: center; flex-shrink: 0; }

@media (max-width: 640px) {
  .header-inner { padding: 12px 16px; }
  nav.main-nav { justify-content: flex-start; gap: 8px 14px; font-size: 12.5px; }
  .header-actions .btn { padding: 7px 12px; font-size: 12.5px; }
}

/* ---------- Mobile hamburger + slide-in drawer ---------- */
.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
}
.hamburger-btn span {
  display: block;
  width: 16px;
  height: 2px;
  background: var(--ink);
  margin: 0 auto;
  border-radius: 2px;
}
.hide-mobile { display: none; }
@media (min-width: 761px) {
  .hide-mobile { display: inline-block; }
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
  z-index: 90;
}
.drawer-overlay.open { opacity: 1; pointer-events: auto; }

.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 78%;
  max-width: 300px;
  background: var(--navy-900);
  border-left: 1px solid var(--line);
  transform: translateX(100%);
  transition: transform .28s ease;
  z-index: 100;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 24px rgba(0,0,0,0.35);
}
.mobile-drawer.open { transform: translateX(0); }
.drawer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.drawer-close {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.drawer-nav {
  display: flex;
  flex-direction: column;
  padding: 10px 8px;
}
.drawer-nav a {
  padding: 13px 14px;
  font-size: 15px;
  color: var(--ink-dim);
  border-radius: 8px;
}
.drawer-nav a:hover, .drawer-nav a:active { background: var(--navy-800); color: var(--teal); }
.drawer-nav hr { border: none; border-top: 1px solid var(--line); margin: 8px 6px; }

@media (max-width: 760px) {
  nav.main-nav { display: none; }
  .hamburger-btn { display: flex; }
}

.btn {
  display: inline-block;
  padding: 9px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .15s ease;
}
.btn-primary { background: var(--teal); color: var(--navy-950); }
.btn-primary:hover { background: var(--teal-dim); }
.btn-outline { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-outline:hover { border-color: var(--teal); color: var(--teal); }
.btn-block { width: 100%; text-align: center; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-danger { background: var(--red); color: #fff; }

/* ---------- Notice strip (scrolling marquee) ---------- */
.notice-strip {
  background: #182a1f;
  border-bottom: 1px solid #234a35;
  overflow: hidden;
  white-space: nowrap;
  padding: 9px 0;
}
.notice-track {
  display: inline-flex;
  width: max-content;
  animation: marquee-scroll 28s linear infinite;
}
.notice-item {
  color: #b7f0d3;
  font-size: 13.5px;
  padding-right: 60px;
  white-space: nowrap;
}
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.notice-strip:hover .notice-track { animation-play-state: paused; }
@media (max-width: 640px) {
  .notice-item { font-size: 12px; padding-right: 40px; }
  .notice-track { animation-duration: 20s; }
}

/* ---------- Hero / exchange widget ---------- */
.hero {
  padding: 56px 0 40px;
  background:
    radial-gradient(600px 300px at 15% 0%, rgba(45,212,167,0.08), transparent),
    var(--navy-950);
  border-bottom: 1px solid var(--line);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 880px) { .hero-grid { grid-template-columns: 1fr; } }

.eyebrow {
  font-family: var(--mono);
  color: var(--teal);
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.hero h1 {
  font-size: 40px;
  line-height: 1.15;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}
.hero p.lead { color: var(--ink-dim); font-size: 16px; max-width: 480px; }
.ticker {
  display: flex; gap: 18px; flex-wrap: wrap; margin-top: 24px;
}
.ticker .pair {
  font-family: var(--mono);
  font-size: 13px;
  background: var(--navy-800);
  border: 1px solid var(--line);
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--ink-dim);
  white-space: normal;
  word-break: break-word;
  max-width: 100%;
}
.ticker .pair b { color: var(--teal); }

@media (max-width: 640px) {
  .hero { padding: 36px 0 28px; }
  .hero h1 { font-size: 28px; }
  .hero p.lead { font-size: 14px; }
  .ticker .pair { font-size: 11.5px; padding: 6px 10px; }
}

/* Exchange card */
.exchange-card {
  background: var(--navy-800);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
}
.exchange-card h3 {
  margin: 0 0 16px;
  font-size: 15px;
  color: var(--ink-dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.field-group { margin-bottom: 14px; }
.field-group label {
  display: block; font-size: 12.5px; color: var(--ink-dim); margin-bottom: 6px;
}
.field-row { display: flex; gap: 10px; }
select, input[type=text], input[type=number], input[type=email], input[type=password], textarea {
  width: 100%;
  background: var(--navy-900);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 11px 12px;
  border-radius: 8px;
  font-size: 14.5px;
  font-family: var(--sans);
}
input[type=number] { font-family: var(--mono); }
select:focus, input:focus, textarea:focus {
  outline: none; border-color: var(--teal);
}
.swap-btn {
  align-self: center;
  background: var(--navy-700);
  border: 1px solid var(--line);
  color: var(--teal);
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 16px;
  margin: 4px auto;
}
.rate-line {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-dim);
  padding: 10px 0;
  border-top: 1px dashed var(--line);
  margin-top: 6px;
}
.rate-line b { color: var(--amber); }

/* ---------- Sections ---------- */
section { padding: 56px 0; }
.section-head { margin-bottom: 30px; }
.section-head .eyebrow { margin-bottom: 6px; }
.section-head h2 { font-size: 26px; margin: 0; letter-spacing: -0.01em; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 880px) { .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--navy-800);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
}
.card h4 { margin: 0 0 8px; font-size: 16px; }
.card p { color: var(--ink-dim); font-size: 14px; margin: 0; }

.reserve-card { display: flex; align-items: center; justify-content: space-between; }
.reserve-card .name { font-size: 13.5px; color: var(--ink-dim); }
.reserve-card .amount { font-family: var(--mono); color: var(--teal); font-weight: 700; }

.testimonial-card .stars { color: var(--amber); font-size: 14px; margin-bottom: 8px; }
.testimonial-card .name { color: var(--ink-dim); font-size: 13px; margin-top: 10px; }

.news-item { border-bottom: 1px solid var(--line); padding: 16px 0; }
.news-item .date { font-family: var(--mono); font-size: 12px; color: var(--teal); }
.news-item h4 { margin: 6px 0 0; font-size: 15.5px; font-weight: 600; }

/* ---------- Forms / auth pages ---------- */
.auth-wrap {
  max-width: 420px;
  margin: 60px auto;
  background: var(--navy-800);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 30px;
}
.auth-wrap h2 { margin-top: 0; font-size: 22px; }
.alert {
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 13.5px;
  margin-bottom: 16px;
}
.alert-success { background: #16311f; color: #a7e8b8; border: 1px solid #245a34; }
.alert-error { background: #3a1a1a; color: #f2a7a7; border: 1px solid #5c2626; }

/* ---------- Tables ---------- */
table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
table.data-table th, table.data-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
table.data-table th { color: var(--ink-dim); font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; }
table.data-table tbody tr:hover { background: var(--navy-700); }

.badge {
  font-family: var(--mono);
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: 20px;
  text-transform: uppercase;
}
.badge-pending { background: #3a2f13; color: var(--amber); }
.badge-processing { background: #17324a; color: #6cc4f2; }
.badge-completed { background: #16311f; color: var(--teal); }
.badge-cancelled { background: #3a1a1a; color: var(--red); }

/* ---------- Admin layout ---------- */
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 230px; background: var(--navy-900); border-right: 1px solid var(--line);
  padding: 20px 0; flex-shrink: 0;
}
.admin-sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px 20px;
}
.admin-sidebar-top .drawer-close { display: none; }
.admin-sidebar a {
  display: block; padding: 11px 20px; color: var(--ink-dim); font-size: 14px;
  border-left: 3px solid transparent;
}
.admin-sidebar a:hover, .admin-sidebar a.active { color: var(--teal); border-left-color: var(--teal); background: var(--navy-800); }
.admin-main { flex: 1; padding: 28px 32px; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.stat-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 28px; }
.stat-card { background: var(--navy-800); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.stat-card .label { font-size: 12.5px; color: var(--ink-dim); text-transform: uppercase; letter-spacing: .04em; }
.stat-card .value { font-family: var(--mono); font-size: 26px; color: var(--teal); margin-top: 6px; }

/* Mobile top bar (hidden on desktop) */
.admin-mobile-topbar {
  display: none;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--navy-900);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 90;
}
.admin-mobile-topbar .brand { font-family: var(--mono); font-weight: 700; font-size: 17px; }
.admin-mobile-topbar .brand .dot { color: var(--teal); }

.admin-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
  z-index: 95;
}
.admin-drawer-overlay.open { opacity: 1; pointer-events: auto; }

@media (max-width: 900px) {
  .admin-mobile-topbar { display: flex; }
  .admin-shell { flex-direction: column; }
  .admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 78%;
    max-width: 280px;
    transform: translateX(-100%);
    transition: transform .28s ease;
    z-index: 100;
    overflow-y: auto;
    box-shadow: 8px 0 24px rgba(0,0,0,0.35);
  }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-sidebar-top {
    padding: 14px 16px 18px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 8px;
  }
  .admin-sidebar-top .drawer-close { display: flex; align-items: center; justify-content: center; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .admin-main { padding: 20px 16px; }
}

/* ---------- Footer ---------- */
footer.site-footer {
  background: var(--navy-900);
  border-top: 1px solid var(--line);
  padding: 40px 0 24px;
  color: var(--ink-dim);
  font-size: 13.5px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; }
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h5 { color: var(--ink); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 12px; }
.footer-grid a { display: block; margin-bottom: 8px; }
.footer-grid a:hover { color: var(--teal); }
.footer-bottom { text-align: center; padding-top: 24px; margin-top: 24px; border-top: 1px solid var(--line); font-size: 12.5px; }

/* ---------- Rate cards (mobile-friendly rates.php) ---------- */
.rate-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.rate-card {
  background: var(--navy-800);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  overflow: hidden;
  max-width: 100%;
}
.rate-card-pair {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px dashed var(--line);
  min-width: 0;
}
.rate-card-cur {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 0;
  min-width: 0;
}
.rate-card-cur img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.rate-card-cur div {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1 1 0;
}
.rate-card-name {
  font-size: 13px;
  color: var(--ink);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  max-width: 100%;
}
.rate-card-arrow { color: var(--teal); font-size: 16px; flex-shrink: 0; }
.rate-card-label {
  font-size: 10.5px;
  color: var(--ink-dim);
  text-transform: uppercase;
  letter-spacing: .04em;
  flex-shrink: 0;
}
.rate-card-details {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.rate-card-detail {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}
.rate-card-value {
  font-family: var(--mono);
  font-size: 13.5px;
  color: var(--ink);
  text-align: right;
  min-width: 0;
  word-break: break-word;
  flex: 1 1 auto;
}
.rate-card-value.teal { color: var(--teal); font-weight: 700; }

@media (max-width: 560px) {
  .rate-cards { grid-template-columns: 1fr; }
}

/* ---------- Step indicator (exchange wizard) ---------- */
.step-indicator {
  display: flex;
  align-items: center;
  margin-bottom: 26px;
}
.step-indicator .step {
  display: flex;
  align-items: center;
  gap: 8px;
}
.step-indicator .step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--navy-700);
  border: 1px solid var(--line);
  color: var(--ink-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.step-indicator .step.active .step-num {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--navy-950);
}
.step-indicator .step.done .step-num {
  background: var(--teal-dim);
  border-color: var(--teal-dim);
  color: var(--navy-950);
}
.step-indicator .step-label {
  font-size: 12.5px;
  color: var(--ink-dim);
  white-space: nowrap;
}
.step-indicator .step.active .step-label { color: var(--ink); font-weight: 600; }
.step-indicator .step-line {
  flex: 1;
  height: 2px;
  background: var(--line);
  margin: 0 10px;
}
.step-indicator .step-line.done { background: var(--teal-dim); }

.recap-box {
  background: var(--navy-900);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  margin-top: 16px;
  text-align: right;
}
.recap-box .recap-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  padding: 4px 0;
}
.recap-box .recap-label { color: var(--ink-dim); }
.recap-box .recap-value { font-family: var(--mono); color: var(--teal); font-weight: 700; }

.text-center { text-align: center; }

/* ---------- Custom currency dropdown ---------- */
.custom-select {
  position: relative;
  flex: 1.3;
}
.cs-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: var(--navy-900);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 11px 12px;
  border-radius: 8px;
  font-size: 14.5px;
  font-family: var(--sans);
  cursor: pointer;
  text-align: left;
}
.cs-trigger:hover, .cs-trigger.open { border-color: var(--teal); }
.cs-trigger-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.cs-trigger-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink-dim);
}
.custom-select.has-value .cs-trigger-label { color: var(--ink); }
.cs-arrow {
  color: var(--ink-dim);
  font-size: 12px;
  flex-shrink: 0;
  transition: transform .15s ease;
}
.cs-trigger.open .cs-arrow { transform: rotate(180deg); color: var(--teal); }

.cs-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--navy-900);
  border: 1px solid var(--line);
  border-radius: 10px;
  max-height: 260px;
  overflow-y: auto;
  z-index: 40;
  box-shadow: 0 12px 28px rgba(0,0,0,0.45);
  display: none;
  padding: 6px;
}
.cs-panel.open { display: block; }
.cs-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 14px;
  color: var(--ink);
}
.cs-option:hover { background: var(--navy-800); }
.cs-option.selected { background: var(--navy-700); color: var(--teal); }
.cs-option img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.cs-panel::-webkit-scrollbar { width: 6px; }
.cs-panel::-webkit-scrollbar-thumb { background: var(--line); border-radius: 6px; }
.mt-0 { margin-top: 0; }
.small { font-size: 12.5px; color: var(--ink-dim); }