/* Global base styles shared by all active pages. */
@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&display=swap");

:root {
  --color-bg: #f5f7fa;
  --color-text: #3f4a5a;
  --transition-fast: 160ms ease;
  --color-accent: #2f6fed;
  --font-primary: "Manrope", sans-serif;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --lh-1: 1;
  --lh-tight: 1.1;
  --lh-heading: 1.2;
  --lh-title: 1.35;
  --lh-body: 1.5;
  --lh-relaxed: 1.6;
  --ls-kicker: 0.04em;
  --fs-1: 12px;
  --fs-2: 16px;
  --fs-3: 20px;
  --fs-4: 24px;
  --fs-5: 32px;
  --fs-6: 40px;
  --fs-7: 56px;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-primary);
}

.h1,
.h2,
.h3,
.h4,
.p1,
.p2,
.p3,
.label,
.caption,
.kicker,
.button-text {
  margin: 0;
}

.h1 {
  font-size: var(--fs-5);
  line-height: var(--lh-tight);
  font-weight: var(--fw-bold);
  color: var(--color-text);
}

.h2 {
  font-size: var(--fs-5);
  line-height: var(--lh-tight);
  font-weight: var(--fw-bold);
  color: var(--color-text);
}

.h3 {
  font-size: var(--fs-4);
  line-height: var(--lh-heading);
  font-weight: var(--fw-bold);
  color: var(--color-text);
}

.h4 {
  font-size: var(--fs-3);
  line-height: var(--lh-heading);
  font-weight: var(--fw-bold);
  color: var(--color-text);
}

.p1 {
  font-size: var(--fs-3);
  line-height: var(--lh-relaxed);
  color: rgba(63, 74, 90, 0.85);
}

.p2 {
  font-size: var(--fs-2);
  line-height: var(--lh-body);
  color: var(--color-text);
}

.p3 {
  font-size: var(--fs-2);
  line-height: var(--lh-body);
  color: var(--color-text);
}

.label {
  font-size: var(--fs-2);
  line-height: var(--lh-heading);
  font-weight: var(--fw-semibold);
  color: var(--color-text);
}

.caption {
  font-size: var(--fs-1);
  line-height: var(--lh-body);
  color: rgba(63, 74, 90, 0.76);
}

.kicker {
  font-size: var(--fs-2);
  line-height: var(--lh-heading);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-kicker);
  text-transform: uppercase;
}

.button-text {
  font-size: var(--fs-2);
  line-height: var(--lh-heading);
  font-weight: var(--fw-semibold);
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 130px;
  height: 44px;
  padding: 0 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-family: var(--font-primary);
  font-size: var(--fs-2);
  font-weight: var(--fw-semibold);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
  box-shadow: 0 6px 14px rgba(63, 74, 90, 0.16);
  white-space: nowrap;
  text-decoration: none;
  box-sizing: border-box;
}

.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(63, 74, 90, 0.2);
}

.primary-button:active,
.secondary-button:active {
  transform: translateY(0);
}

.primary-button {
  background: var(--color-accent);
  color: var(--color-bg);
}

.primary-button:hover {
  background: #285fcb;
}

.secondary-button {
  background: var(--color-bg);
  color: var(--color-accent);
  border-color: rgba(47, 111, 237, 0.35);
}

.secondary-button:hover {
  background: #eaf0fb;
}

.secondary-button:disabled,
.primary-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 6px 14px rgba(63, 74, 90, 0.16);
}

.input-field {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(63, 74, 90, 0.24);
  font-family: var(--font-primary);
  font-size: var(--fs-2);
  color: var(--color-text);
  background: #ffffff;
  box-sizing: border-box;
}

.input-field:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.18);
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.address-autocomplete-wrap {
  position: relative;
}

.address-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 50;
  background: #ffffff;
  border: 1px solid rgba(63, 74, 90, 0.2);
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(63, 74, 90, 0.12);
  max-height: 240px;
  overflow: auto;
}

.address-suggestion {
  width: 100%;
  border: 0;
  background: #ffffff;
  text-align: left;
  padding: 10px 12px;
  font-family: var(--font-primary);
  font-size: var(--fs-2);
  color: var(--color-text);
  cursor: pointer;
}

.address-suggestion + .address-suggestion {
  border-top: 1px solid rgba(63, 74, 90, 0.1);
}

.address-suggestion:hover {
  background: rgba(47, 111, 237, 0.08);
}

.address-suggestion.is-active {
  background: rgba(47, 111, 237, 0.14);
}

.form-label {
  font-size: var(--fs-2);
  font-weight: var(--fw-semibold);
}

.form-label.has-error {
  color: #c72a2a;
}

.field-error {
  margin-left: 6px;
  font-size: var(--fs-1);
  font-weight: var(--fw-bold);
  color: #c72a2a;
}

.textarea-field {
  min-height: 120px;
  height: auto;
  padding-top: 10px;
  padding-bottom: 10px;
  resize: vertical;
}

.hidden {
  display: none !important;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: 1px solid rgba(63, 74, 90, 0.14);
  box-shadow: 0 8px 20px rgba(63, 74, 90, 0.08);
}

.container {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
  box-sizing: border-box;
}

.header-inner {
  padding-top: 12px;
  padding-bottom: 12px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
}

.brand {
  display: inline-flex;
  align-items: center;
}

.brand-logo {
  height: 32px;
  width: auto;
  display: block;
}

.header-nav {
  display: flex;
  justify-content: center;
  gap: 28px;
  white-space: nowrap;
}

.header-nav a {
  color: var(--color-text);
  text-decoration: none;
  font-size: var(--fs-2);
  font-weight: var(--fw-semibold);
  white-space: nowrap;
}

.header-nav a:hover {
  color: var(--color-accent);
}

.button-group {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
  justify-content: flex-end;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  justify-self: end;
  margin-left: auto;
}

.header-auth-nav {
  display: inline-flex;
  align-items: center;
}

.header-auth-link {
  display: inline-flex;
  align-items: center;
  height: 44px;
  color: var(--color-text);
  text-decoration: none;
  font-size: var(--fs-2);
  font-weight: var(--fw-medium);
  line-height: 1;
}

.header-auth-link:hover {
  color: var(--color-accent);
}

.logout-link {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  font-family: var(--font-primary);
}

.profile-icon-link {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  border: 0;
  background: var(--color-bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: none;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.profile-icon-link:hover {
  border-color: rgba(47, 111, 237, 0.5);
  background: var(--color-bg);
  box-shadow: 0 8px 20px rgba(63, 74, 90, 0.12);
}

.profile-icon-link:focus-visible {
  outline: none;
  border-color: rgba(47, 111, 237, 0.62);
  background: rgba(47, 111, 237, 0.1);
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.18);
}

.profile-icon-img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(63, 74, 90, 0.24);
  border-radius: 10px;
  background: var(--color-bg);
  cursor: pointer;
  padding: 10px 9px;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--color-text);
}

.menu-toggle span + span {
  margin-top: 6px;
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: min(320px, 85vw);
  height: 100vh;
  background: var(--color-bg);
  border-left: 1px solid rgba(63, 74, 90, 0.14);
  box-shadow: -12px 0 28px rgba(63, 74, 90, 0.14);
  padding: 84px 20px 20px;
  box-sizing: border-box;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  z-index: 220;
}

.mobile-menu a {
  display: block;
  padding: 12px 0;
  color: var(--color-text);
  text-decoration: none;
  font-size: var(--fs-2);
  font-weight: var(--fw-semibold);
  white-space: nowrap;
}

.mobile-menu a:hover {
  color: var(--color-accent);
}

.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(63, 74, 90, 0.28);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 210;
}

.header-inner-compact {
  grid-template-columns: auto 1fr auto;
}

.header-inner-compact .header-nav,
.header-inner-compact .button-group {
  display: none;
}

.header-inner-compact .menu-toggle {
  display: block;
}

body.menu-open {
  overflow: hidden;
}

body.menu-open .menu-overlay {
  opacity: 1;
  visibility: visible;
}

body.menu-open .mobile-menu {
  transform: translateX(0);
}

@media (max-width: 980px) {
  .container {
    padding-left: 18px;
    padding-right: 18px;
  }

  .header-inner {
    grid-template-columns: auto 1fr auto;
    gap: 14px;
  }

  .header-nav {
    display: none;
  }

  .header-auth-nav {
    display: none;
  }

  .menu-toggle {
    display: block;
  }
}

@media (max-width: 640px) {
  .container {
    padding-left: 14px;
    padding-right: 14px;
  }

  .header-inner {
    grid-template-columns: auto 1fr;
    gap: 10px;
  }

  .brand-logo {
    height: 34px;
  }

  .header-actions {
    justify-content: flex-end;
  }

  .primary-button,
  .secondary-button {
    min-width: 106px;
    height: 42px;
    padding: 0 12px;
    font-size: var(--fs-2);
  }
}

@media (max-width: 420px) {
  .header-actions .secondary-button {
    display: none;
  }
}
