:root {
  --brand: #198754; /* bootstrap success */
  --brand-dark: #146c43;
  --text: #0f172a;
  --muted: #64748b;
  --card: #ffffff;
  --border: rgba(15, 23, 42, 0.12);
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.1);
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius: 18px;
}

/* Layout width aligns header/table/footer */
.rates-shell {
  max-width: 980px;
}

/* Background + typography */
body {
  background: #ffffff;
  color: var(--text);
}

.hero-title {
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: clamp(28px, 3.4vw, 44px);
}

.hero-subtitle {
  color: var(--muted);
  font-size: clamp(14px, 1.4vw, 18px);
}

.topbar {
  background: #fff;
  border-bottom: 1px solid #dee2e6;
}

.brand-name {
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
}

.nav-link-custom {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}

.nav-link-custom:hover {
  color: var(--brand-dark);
}

/* Rates card */
.rates-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

/* Card top controls */
.rates-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 10px 16px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfbfc 100%);
  border-bottom: 1px solid var(--border);
}

/* Toggle (pill style) */
.rate-toggle {
  border: 1px solid rgba(25, 135, 84, 0.35);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.toggle-btn {
  border: 0 !important;
  padding: 5px 20px !important;
  /* font-weight: 700; */
  color: var(--brand-dark);
  background: transparent;
}

.btn-check:checked + .toggle-btn {
  background: var(--brand);
  color: #fff;
}

/* Currency pills (placeholder buttons) */
.currency-pills {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.currency-pill {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-weight: 700;
  border-radius: 12px;
  padding: 7px 10px;
}

/* Rounded table with border matching inner borders */
.table-card {
  border-top: 0;
  background: #fff;
}

.table-inner {
  /* border: none; */
  table-layout: fixed;
  width: 100%;
}

/* internal grid lines (like table-bordered but cleaner) */
.table-inner th,
.table-inner td {
  border: 1px solid var(--border);
}

.table-inner thead th {
  background: #fbfbfc;
  font-weight: 800;
  color: #111827;
  white-space: nowrap;
  font-size: 1rem;
}

/* first column
.table-inner td:first-child {
  white-space: nowrap;
}

.table-inner th:first-child {
  font-weight: 700;
  white-space: nowrap;
}

*/

/*
.table-inner {
  table-layout: auto;
  width: 100%;
  font-size: 0.95rem;
}
*/
.table-inner {
  table-layout: fixed;
  width: 100%;
  font-size: 0.95rem;
}

.table-inner th:first-child,
.table-inner td:first-child {
  width: 20%;
}

.table-inner th:not(:first-child),
.table-inner td:not(:first-child) {
  width: 13%;
}

/* row hover */
.table-hover tbody tr:hover {
  background-color: rgba(25, 135, 84, 0.05);
}

/* Footer */
.footer-wrap {
  /* Recommended footer color: clean modern mint */
  /* background: linear-gradient(180deg, #f4fcf8 0%, #cbcecc 100%); */
}

.footer-brand-name {
  font-weight: 800;
  color: var(--text);
}

.footer-link {
  color: var(--brand-dark);
  text-decoration: none;
  font-weight: 700;
}

.footer-link:hover {
  text-decoration: underline;
  color: var(--brand);
}

.footer-subtext {
  color: rgba(15, 23, 42, 0.6);
  font-size: 0.9rem;
}

/* Mobile tweaks */
@media (max-width: 576px) {
  .rates-card-top {
    flex-direction: column;
    align-items: stretch;
  }
  .currency-pills {
    justify-content: center;
  }
}

.currency-dd .dropdown-menu {
  width: var(--ddw, auto);
  min-width: var(--ddw, auto);
}

.name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0; /* critical */
}

.name-text {
  /*
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  */
  font-size: 0.875rem;
  font-weight: 650;
  color: #0f172a;
}

/* Logo sizing */
.brand img,
.footer-brand img {
  height: 3rem;
  width: auto;
}

body {
  background: #ffffff;
  color: var(--text);
  font-family:
    -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", system-ui,
    sans-serif;
} /* Smaller, tighter table text */

.py-5 {
  padding-top: 0px !important;
}

@media (max-width: 768px) {
  /* This would require JavaScript to hide/show columns based on selected currency dropdown */
  .table-inner {
    font-size: 0.8rem;
  }
  .table-inner th:first-child,
  .table-inner td:first-child {
    width: 30%; /* More space for names */
  }
}

@media (max-width: 768px) {
  /* This would require JavaScript to hide/show columns based on selected currency dropdown */
  .table-inner {
    font-size: 0.8rem;
  }
  .table-inner th:first-child,
  .table-inner td:first-child {
    width: 30%; /* More space for names */
  }
}

@media (max-width: 768px) {
  .table-card {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .table-inner {
    min-width: 600px;
  }
}
