:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --panel: #ffffff;
  --text: #172033;
  --muted: #64748b;
  --accent: #0f6bff;
  --accent-dark: #073e9b;
  --accent-warm: #d4a017;
  --border: #d9e2ee;
  --hero-section-end: #c4c7ca;
  --hero-loading-gradient: linear-gradient(180deg, #061023 0%, #082770 52%, #0f6bff 100%);
  --header-top-block-height: 189px;
  --header-bar-max-width: 1003px;
  --brand-offset-y: 0px;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.1);
  --shadow-strong: 0 26px 70px rgba(15, 23, 42, 0.18);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(15, 107, 255, 0.1), transparent 34rem),
    linear-gradient(180deg, #f7f9fd 0%, #eef3f8 100%);
  color: var(--text);
}

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

.site-header {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100svh;
  padding: 0 clamp(20px, 4vw, 48px);
  color: #fff;
  overflow: hidden;
}

.site-header::before,
.site-header::after,
.footer-info::before,
.footer-info::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
}

.site-header::before {
  z-index: -1;
  bottom: auto;
  height: var(--header-top-block-height);
  background:
    linear-gradient(180deg, rgba(3, 8, 18, 0.96) 0%, rgba(6, 16, 35, 0.94) 50%, rgba(8, 39, 112, 0.9) 100%);
}

.site-header::after {
  z-index: -1;
  top: var(--header-top-block-height);
  background:
    linear-gradient(90deg, rgba(3, 8, 18, 0.46) 0%, rgba(3, 8, 18, 0.18) 44%, rgba(3, 8, 18, 0.38) 100%),
    linear-gradient(180deg, rgba(3, 8, 18, 0.18) 0%, rgba(3, 8, 18, 0.02) 42%, rgba(3, 8, 18, 0.24) 100%);
}

.header-backgrounds {
  position: absolute;
  inset: var(--header-top-block-height) 0 0;
  z-index: -2;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(3, 8, 18, 0.28) 0%, rgba(8, 39, 112, 0.08) 48%, rgba(3, 8, 18, 0.24) 100%),
    var(--hero-loading-gradient);
}

.header-background {
  position: absolute;
  inset: 0;
  filter: none;
  opacity: 0;
  transform: none;
  transition: opacity 1100ms ease, transform 6000ms ease;
}

.header-background img {
  display: block;
  width: 100%;
  height: 100vh;
  height: 100svh;
  object-fit: cover;
  object-position: center;
  transform: translateY(calc(-1 * var(--header-top-block-height)));
}

.header-background.is-active {
  opacity: 1;
  transform: none;
}

.top-bar,
.brand,
.nav-bar {
  width: 100%;
}

.main-layout {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.header-offices,
.brand-contact {
  width: min(var(--header-bar-max-width), 100%);
  margin: 0 auto;
}

.top-bar {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  min-height: 70px;
  gap: clamp(12px, 2vw, 24px);
  padding-inline: clamp(6px, 1.2vw, 14px);
  text-align: center;
  margin: 0 auto;
}

.top-bar::before,
.top-bar::after {
  position: absolute;
  inset: 0 calc(50% - 50vw);
  content: "";
}

.top-bar::before {
  z-index: -1;
  background: transparent;
}

.top-bar::after {
  content: none;
}

.brand {
  position: relative;
  grid-column: 2;
  transform: translateY(var(--brand-offset-y));
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 0;
  margin: 0;
  text-align: center;
  pointer-events: none;
}

.brand h1 {
  width: 100%;
  max-width: none;
  font-family: "Inter", Arial, Helvetica, sans-serif;
  font-size: clamp(2.12rem, 3.55vw, 3.55rem);
  font-weight: 800;
  line-height: 1.05;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.36);
}

.brand h1,
.section-heading h2,
.office-card h2 {
  margin: 0;
}

.eyebrow,
.office-label,
.last-updated {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
}

.eyebrow,
.office-label {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-contact {
  position: relative;
  grid-column: 1;
  z-index: 3;
  justify-self: start;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 13px;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  color: #ffe45c;
  font-size: clamp(1.64rem, 2.2vw, 2.08rem);
  font-weight: 900;
  line-height: 1;
  text-align: left;
}

.phone-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  border: 2px solid currentColor;
  border-radius: 999px;
  color: inherit;
  background: rgba(255, 228, 92, 0.12);
}

.phone-icon svg {
  width: 0.52em;
  height: 0.52em;
  fill: currentColor;
}

.brand-contact a {
  color: inherit;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
  text-shadow:
    0 2px 4px rgba(0, 0, 0, 0.72),
    0 0 18px rgba(0, 0, 0, 0.58);
}

.site-nav {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 5;
  display: none;
  width: max-content;
  min-width: 178px;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 2px;
  padding: 8px;
  background: rgba(4, 10, 24, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 10px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(12px);
}

.site-nav.is-open {
  display: flex;
}

.site-nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 10px 11px;
  border-radius: 7px;
  font-size: 0.9rem;
  line-height: 1.1;
  text-align: left;
  transition: background 180ms ease, color 180ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  outline: none;
  background: rgba(255, 255, 255, 0.12);
  text-decoration: none;
}

.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 12px;
  background: rgba(5, 12, 28, 0.48);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(14px);
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
}

.header-offices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  align-content: end;
  column-gap: clamp(40px, 6vw, 88px);
  height: calc(var(--header-top-block-height) - 70px);
  margin-top: 0;
  padding: 0 clamp(16px, 3vw, 28px) clamp(15px, 2vw, 24px);
}

.nav-bar {
  position: relative;
  grid-column: 3;
  z-index: 3;
  display: flex;
  justify-self: end;
  justify-content: flex-end;
  width: auto;
  margin: 0;
}

.office-card {
  border-radius: 20px;
  overflow: hidden;
}

.header-office {
  position: relative;
  padding: 9px 28px 8px;
  font-weight: 800;
  background: transparent;
  text-shadow:
    0 2px 4px rgba(0, 0, 0, 0.78),
    0 0 18px rgba(0, 0, 0, 0.72);
}

.header-office::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.22) 0%, rgba(0, 0, 0, 0.1) 42%, rgba(0, 0, 0, 0) 72%);
  pointer-events: none;
}

.hero-promos {
  position: absolute;
  top: var(--header-top-block-height);
  right: clamp(20px, 4vw, 48px);
  bottom: 0;
  left: clamp(20px, 4vw, 48px);
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: center;
  align-items: center;
  gap: clamp(18px, 4vw, 58px);
  width: min(1180px, calc(100% - clamp(40px, 8vw, 96px)));
  margin: 0 auto;
  pointer-events: none;
}

.hero-promo {
  min-width: 0;
  text-align: center;
  text-shadow:
    0 2px 7px rgba(0, 0, 0, 0.82),
    0 0 24px rgba(0, 0, 0, 0.78);
}

.hero-promo h2,
.hero-promo p {
  margin: 0;
}

.hero-promo h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.32rem, 2.45vw, 2.25rem);
  font-weight: 800;
  line-height: 1.12;
}

.hero-promo p {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.9);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1rem, 1.28vw, 1.28rem);
  font-weight: 700;
  line-height: 1.35;
}

.header-office h2,
.header-office p {
  margin: 0;
}

.header-office h2 {
  font-size: clamp(1.3rem, 2.08vw, 1.72rem);
  line-height: 1.25;
  white-space: nowrap;
}

.header-office-name-accent {
  color: #ffe45c;
}

.office-name--castorama {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.12em;
  text-align: left;
}

.office-name-castorama__brand {
  align-self: flex-start;
}

.header-office p {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  line-height: 1.2;
  white-space: nowrap;
}

.header-office p span {
  display: inline;
}

.header-office p span + span::before {
  content: " ";
}

.main-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 34px 24px;
  padding: 34px clamp(20px, 4vw, 48px) 56px;
}

.office-card--main {
  background: var(--panel);
  box-shadow: var(--shadow);
}

.rates-panel {
  grid-column: 1 / -1;
  width: min(855px, 100%);
  margin: 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.rates-intro {
  margin: -34px calc(50% - 50vw) 0;
  padding: clamp(42px, 5vw, 64px) clamp(20px, 4vw, 48px) 24px;
  background: linear-gradient(180deg, var(--hero-section-end) 0%, #ffffff 100%);
}

.rates-card {
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.section-heading {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  text-align: center;
}

.section-heading > div {
  width: 100%;
}

.section-heading .eyebrow,
.office-card--main .office-label,
.office-card--main p,
.last-updated {
  color: var(--muted);
}

.section-heading .eyebrow,
.office-card--main .office-label {
  color: var(--accent-dark);
}

.rates-panel .section-heading .eyebrow {
  color: #000;
}

.section-heading h2 {
  margin-top: 4px;
  font-size: clamp(1.7rem, 2.2vw, 2.2rem);
}

.rates-panel .section-heading h2 {
  color: #000;
  font-family: "Arial Black", Arial, sans-serif;
  font-weight: 900;
}

.rates-title-accent {
  color: #c62828;
}

.rates-note {
  margin: 8px 0 0;
  color: #000;
  font-family: "Arial Black", Arial, sans-serif;
  font-size: clamp(1.36rem, 1.76vw, 1.76rem);
  font-weight: 900;
}

.rates-toggle-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.toggle {
  display: inline-flex;
  padding: 4px;
  background: #edf2f8;
  border: 1px solid var(--border);
  border-radius: 999px;
}

.toggle-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
}

.toggle-button.is-active {
  background: #c62828;
  color: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.12);
}

.rates-list {
  display: grid;
  width: 100%;
  overflow: hidden;
  border-top: 1px solid rgba(9, 31, 76, 0.16);
  font-family: Arial, Helvetica, sans-serif;
  color: #001965;
}

.rates-header,
.rate-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) repeat(2, minmax(132px, 1fr));
  align-items: center;
  min-height: 44px;
  border-bottom: 1px solid rgba(9, 31, 76, 0.16);
}

.rates-header {
  min-height: 42px;
  color: #7d8494;
  font-size: 0.86rem;
  font-weight: 500;
}

.rate-row {
  background: rgba(255, 255, 255, 0.86);
}

.rate-row:nth-child(even) {
  background: rgba(9, 31, 76, 0.06);
}

.rates-header > *,
.rate-row > * {
  min-width: 0;
}

.rates-header > * {
  justify-self: center;
}

.rates-header > :first-child,
.currency-summary {
  justify-self: start;
  padding-left: clamp(10px, 2.2vw, 22px);
}

.currency-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  white-space: nowrap;
}

.currency-flag {
  width: 32px;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  flex: 0 0 auto;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.18);
}

.currency-code {
  color: #202a35;
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1;
}


.rate-cell {
  justify-self: center;
  color: #001965;
  text-align: center;
}

.rate-value {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.1;
}

.last-updated {
  margin-top: 12px;
  text-align: right;
  font-weight: 500;
}

.status-message {
  min-height: 1.5rem;
  margin: 8px 0 0;
  color: #c0392b;
  font-weight: 600;
}

.calculator-card {
  display: grid;
  gap: 16px;
  margin-top: 22px;
  padding: 20px;
  background: #fff;
  border: 1px solid rgba(9, 31, 76, 0.16);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.calculator-heading h3 {
  margin: 0;
  color: #07172f;
  font-size: 1.1rem;
  line-height: 1.2;
}

.calculator-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

.calculator-form label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #334155;
  font-size: 0.83rem;
  font-weight: 700;
}

.calculator-form select,
.calculator-form input {
  width: 100%;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: #07172f;
}

.calculator-submit,
.admin-button {
  min-height: 42px;
  padding: 10px 16px;
  border: 0;
  border-radius: 6px;
  background: #c62828;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.calculator-submit:hover,
.calculator-submit:focus-visible,
.admin-button:hover,
.admin-button:focus-visible {
  outline: none;
  background: #a61f1f;
}

.calculator-message {
  min-height: 1.4rem;
  margin: 0;
  color: #07172f;
  font-weight: 800;
}

.calculator-message--error {
  color: #c0392b;
}

.offices-panel {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.footer-info {
  grid-column: 1 / -1;
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(260px, 1.3fr) minmax(340px, 1.55fr) minmax(190px, 0.75fr);
  gap: clamp(22px, 4vw, 56px);
  align-items: center;
  min-height: 160px;
  width: 100vw;
  margin: 2px calc(50% - 50vw) 0;
  padding: 30px clamp(24px, 5vw, 64px);
  overflow: hidden;
  color: #fff;
  font-weight: 800;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.34);
}

.footer-info::before {
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(8, 39, 112, 0.9) 0%, rgba(6, 16, 35, 0.94) 50%, rgba(3, 8, 18, 0.96) 100%);
}

.footer-info::after {
  z-index: -1;
  background: linear-gradient(0deg, transparent 76%, rgba(244, 247, 251, 0.74) 100%);
}

.footer-info h2,
.footer-info p {
  margin: 0;
}

.footer-info h2 {
  margin-bottom: 10px;
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  line-height: 1.2;
}

.footer-company,
.footer-phones {
  display: grid;
  gap: 6px;
}

.footer-offices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 42px);
  text-align: center;
}

.footer-offices article {
  min-width: 0;
}

.footer-label {
  color: rgba(255, 255, 255, 0.96);
  font-size: clamp(1rem, 1.55vw, 1.36rem);
  line-height: 1.25;
}

.footer-info p:not(.footer-label) {
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.42;
}

.footer-phones {
  justify-items: end;
  text-align: right;
}

.footer-info a {
  color: #fff;
  text-decoration: none;
}

.office-card--main {
  display: grid;
  grid-template-rows: minmax(300px, 1fr) auto;
  min-height: clamp(390px, 39vw, 480px);
  border: 1px solid rgba(217, 226, 238, 0.9);
}

.office-map {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  background: #dfeafe;
  z-index: 0;
  pointer-events: none;
}

.office-map-shell {
  position: relative;
  min-height: 0;
  overflow: hidden;
  background: #dfeafe;
}

.office-map-preview,
.office-map {
  position: absolute;
  inset: 0;
}

.office-map-preview {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  cursor: pointer;
  overflow: hidden;
  background: #dfeafe;
  z-index: 1;
}

.office-map-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 180ms ease;
}

.office-map-preview:hover img,
.office-map-preview:focus-visible img {
  transform: scale(1.025);
}

.office-card--map-active .office-map-preview {
  display: none;
}

.office-card--map-active .office-map {
  position: absolute;
  z-index: 2;
  pointer-events: auto;
}

.office-content {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 4px;
  padding: 10px 18px 12px;
  overflow: hidden;
}

.office-card--main h2 {
  margin: 0;
  font-size: clamp(1.1rem, 1.7vw, 1.35rem);
  line-height: 1.2;
  text-align: center;
}

.office-card--main h2,
.office-card--main [id$="-address"] {
  display: none;
}

.office-card--main p:not(.office-label) {
  margin: 0;
  line-height: 1.25;
}

.office-card--main [id$="-address"] {
  text-align: center;
}

.office-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 18px;
  margin-top: 6px;
}

.directions-link {
  display: inline-flex;
  align-items: center;
  justify-self: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent-dark);
  font: inherit;
  text-decoration: none;
  font-weight: 800;
  text-align: center;
  cursor: pointer;
}

.directions-link--secondary {
  color: #315f97;
}

.main-layout[data-current-page="rates"],
.main-layout[data-current-page="contact"],
.main-layout[data-current-page="about"] {
  grid-template-columns: 1fr;
}

.main-layout[data-current-page="rates"] .rates-panel {
  width: min(930px, 100%);
  margin: 0 auto;
}

.main-layout[data-current-page="locations"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.main-layout[data-current-page="locations"] .offices-panel {
  grid-column: 1 / -1;
}

.page-panel {
  grid-column: 1 / -1;
  padding: 30px;
  background: var(--panel);
  border: 1px solid rgba(217, 226, 238, 0.9);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.contact-layout,
.contact-offices,
.about-grid {
  display: grid;
  gap: 18px;
}

.contact-layout,
.about-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.contact-card,
.about-grid article {
  padding: 22px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.contact-card h3,
.about-grid h3 {
  margin: 8px 0 10px;
  color: #07172f;
  font-size: 1.15rem;
  line-height: 1.3;
}

.contact-card p,
.about-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.contact-card a {
  color: var(--accent-dark);
  text-decoration: none;
}

body.admin-page {
  min-height: 100vh;
  background: #eef3f8;
}

.admin-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.admin-shell--login {
  display: grid;
  min-height: 100vh;
  place-items: center;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.admin-header h1,
.admin-login-card h1,
.admin-card h2 {
  margin: 0;
  color: #07172f;
}

.admin-header h1,
.admin-login-card h1 {
  font-size: clamp(1.7rem, 3vw, 2.35rem);
}

.admin-kicker,
.admin-label {
  margin: 0 0 5px;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-card {
  margin-bottom: 18px;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.admin-login-card {
  width: min(420px, 100%);
}

.admin-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.admin-status-grid strong {
  color: #07172f;
  line-height: 1.35;
}

.admin-error-detail {
  margin: 8px 0 0;
  color: #c0392b;
  font-size: 0.9rem;
  line-height: 1.4;
}

.admin-form {
  display: grid;
  gap: 14px;
}

.admin-form label {
  display: grid;
  gap: 6px;
  color: #334155;
  font-weight: 700;
}

.admin-form input,
.admin-table input {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: #07172f;
}

.admin-button--secondary {
  background: #334155;
}

.admin-button--secondary:hover,
.admin-button--secondary:focus-visible {
  background: #1f2937;
}

.admin-notice {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 8px;
  font-weight: 800;
}

.admin-notice--success {
  background: #e8f6ed;
  color: #166534;
}

.admin-notice--error {
  background: #fdecec;
  color: #991b1b;
}

.admin-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: #07172f;
  text-align: left;
  vertical-align: middle;
}

.admin-table th {
  color: #64748b;
  font-size: 0.82rem;
  text-transform: uppercase;
}

.admin-table--manual {
  min-width: 760px;
}

.admin-history,
.admin-empty {
  margin: 0;
  color: #334155;
}

.admin-history {
  display: grid;
  gap: 6px;
  padding-left: 20px;
}

.admin-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: -4px;
}

@media (max-width: 1080px) {
  .top-bar {
    min-height: 70px;
    gap: 12px;
  }

  .brand {
    width: auto;
  }

  .brand h1 {
    font-size: 2.45rem;
  }

  .site-nav {
    gap: 2px;
  }

  .site-nav a {
    padding: 7px 8px;
    font-size: 0.86rem;
  }

  .main-layout {
    grid-template-columns: 1fr 1fr;
  }

  .rates-panel {
    grid-column: 1 / -1;
  }

  .offices-panel {
    grid-template-columns: 1fr 1fr;
  }

}

@media (max-width: 860px) {
  .top-bar {
    gap: 10px;
  }

  .brand {
    width: auto;
  }

  .brand h1 {
    font-size: 1.86rem;
  }

  .site-nav a {
    padding: 7px 6px;
    font-size: 0.8rem;
  }
}

@media (max-width: 720px) {
  :root {
    --header-top-block-height: 302px;
  }

  .site-header {
    padding-top: 0;
    min-height: 100vh;
    min-height: 100svh;
  }

  .top-bar {
    grid-template-rows: auto auto;
    width: 100%;
    min-height: 124px;
    gap: 0 10px;
    row-gap: 18px;
    padding-top: 12px;
    padding-bottom: 8px;
    text-align: left;
  }

  .brand,
  .header-offices,
  .main-layout,
  .brand-contact,
  .nav-bar {
    width: 100%;
  }

  .main-layout,
  .header-offices,
  .offices-panel,
  .footer-info,
  .footer-offices {
    display: flex;
    flex-direction: column;
  }

  .nav-bar {
    position: relative;
    right: auto;
    bottom: auto;
    transform: none;
    align-items: center;
    justify-content: flex-end;
    width: auto;
    margin-top: 0;
    margin-left: 0;
  }

  .nav-toggle {
    display: flex;
    width: 34px;
    height: 34px;
    gap: 4px;
    border-radius: 8px;
    background: rgba(5, 12, 28, 0.28);
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 5;
    display: none;
    width: max-content;
    min-width: 158px;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 10px;
    background: rgba(4, 10, 24, 0.9);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(12px);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 9px 10px;
    border-radius: 7px;
    font-size: 0.82rem;
    text-align: left;
  }

  .brand {
    position: relative;
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: center;
    left: auto;
    transform: translateY(var(--brand-offset-y));
    pointer-events: none;
    width: 100%;
    max-width: calc(100vw - 30px);
    min-width: 0;
    margin-top: 0;
  }

  .brand h1 {
    width: 100%;
    font-size: clamp(1.38rem, 7.2vw, 2.08rem);
    line-height: 1.08;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
  }

  .brand-contact {
    grid-column: 1 / -1;
    grid-row: 1;
    width: auto;
    justify-self: center;
    justify-content: center;
    gap: 8px;
    padding: 0;
    font-size: clamp(1.3rem, 5.98vw, 1.638rem);
    text-align: center;
  }

  .header-offices {
    justify-content: center;
    gap: 11px;
    height: calc(var(--header-top-block-height) - 124px);
    margin-top: 0;
    padding-top: 8px;
    padding-bottom: 18px;
  }

  .header-office,
  .header-office:nth-child(2) {
    width: min(100%, 420px);
    margin: 0 auto;
    padding: 8px 18px;
    text-align: center;
  }

  .header-office--left,
  .header-office--right {
    justify-self: center;
    text-align: center;
  }

  .hero-promos {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 12px;
  }

  .hero-promo h2 {
    font-size: clamp(1.16rem, 5.4vw, 1.72rem);
  }

  .hero-promo p {
    margin-top: 5px;
    font-size: clamp(0.92rem, 4vw, 1.08rem);
  }

  .main-layout {
    gap: 18px;
  }

  .footer-info {
    align-items: stretch;
    min-height: 0;
    padding: 24px 20px;
    text-align: center;
  }

  .footer-company,
  .footer-phones {
    justify-items: center;
    text-align: center;
  }

  .footer-offices {
    gap: 14px;
  }

  .rates-panel {
    padding: 0;
  }

  .rates-intro {
    margin-top: -18px;
    padding: 34px 20px 20px;
  }

  .rates-card {
    padding: 0;
  }

  .rates-list {
    overflow-x: visible;
  }

  .rates-header,
  .rate-row {
    grid-template-columns: minmax(112px, 1fr) repeat(2, minmax(82px, 1fr));
  }

  .rates-header {
    font-size: 0.78rem;
  }

  .currency-summary {
    gap: 8px;
  }

  .currency-flag {
    width: 28px;
  }

  .currency-code,
  .rate-value {
    font-size: 0.92rem;
  }

  .rates-header > :first-child,
  .currency-summary {
    padding-left: 8px;
  }


  .calculator-form {
    grid-template-columns: 1fr;
  }

  .calculator-submit {
    width: 100%;
  }

  .admin-shell {
    width: min(100% - 24px, 1180px);
    padding-top: 18px;
  }

  .admin-header,
  .admin-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-status-grid {
    grid-template-columns: 1fr;
  }

  .contact-layout,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .page-panel {
    padding: 22px;
  }

  .main-layout[data-current-page="locations"] {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  :root {
    --header-top-block-height: 310px;
  }

  .top-bar {
    min-height: 130px;
    row-gap: 18px;
    padding-top: 10px;
  }

  .nav-bar {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
  }

  .header-offices {
    height: calc(var(--header-top-block-height) - 130px);
  }
}


.header-office--left {
  justify-self: start;
  text-align: left;
}

.header-office--right {
  justify-self: end;
  text-align: right;
}


@media (max-width: 720px) {
  .brand,
  .brand-contact,
  .header-office,
  .header-office--left,
  .header-office--right {
    justify-self: center;
    text-align: center;
  }

  .brand-contact {
    margin-right: auto;
    margin-left: auto;
  }

  .header-office h2,
  .header-office p {
    width: 100%;
    text-align: center;
  }

  .header-office p {
    white-space: nowrap;
    text-wrap: auto;
  }

  .header-office p span {
    display: block;
  }

  .header-office p span + span::before {
    content: none;
  }

  .header-office p.is-compact {
    font-size: 0.92rem;
  }

  .header-office p.is-tight {
    font-size: 0.84rem;
  }
}
