:root {
  --font-body: 'Inter', system-ui, sans-serif;
  --font-display: 'Fraunces', Georgia, serif;
  --bg: #f6efe2;
  --surface: #fbf6eb;
  --text: #1e2a2a;
  --muted: #5a6a6a;
  --primary: #094a43;
  --primary-soft: #d3e2de;
  --accent: #e07b53;
  --border: #d8cdb4;
  --radius-md: 12px;
  --radius-full: 999px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
}

.hub-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: color-mix(in oklab, var(--bg) 90%, white);
  border-bottom: 1px solid var(--border);
}
.hub-top-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}
.hub-brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: var(--primary);
  font-family: var(--font-display);
  font-size: 1.15rem;
  text-decoration: none;
  font-weight: 500;
}
.hub-back {
  font-size: .875rem;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}
.hub-back:hover { color: var(--primary); }

/* Language switcher (matches index.html) */
.lang-switcher { position: relative; }
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 36px;
  height: 36px;
  padding: 0 0.5rem;
  border: none;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.lang-toggle:hover {
  background: color-mix(in oklab, var(--text) 6%, transparent);
  color: var(--text);
}
.lang-flag {
  width: 20px;
  height: 15px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
  display: block;
}
.lang-chevron {
  width: 14px;
  height: 14px;
  opacity: 0.65;
  transition: transform 0.15s ease;
}
.lang-switcher.is-open .lang-chevron { transform: rotate(180deg); }
.lang-menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  min-width: 168px;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(30, 42, 42, 0.12);
  z-index: 200;
}
.lang-option {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
}
.lang-option:hover,
.lang-option[aria-selected="true"] {
  background: color-mix(in oklab, var(--primary) 10%, transparent);
}
.lang-option .lang-flag { width: 22px; height: 16px; }

@media (max-width: 640px) {
  .hub-top {
    flex-wrap: wrap;
    padding: 0.85rem 1rem;
  }
  .hub-brand span {
    font-size: 1rem;
  }
  .hub-top-right {
    width: 100%;
    order: 3;
    justify-content: space-between;
  }
  .hub-back {
    font-size: 0.8rem;
  }
  .hub-main {
    padding: 1rem 0.75rem 2rem;
  }
  .hub-card {
    margin: 1rem auto;
    padding: 1.25rem;
  }
  .pay-options {
    grid-template-columns: 1fr 1fr;
  }
  .opening-hours-grid {
    grid-template-columns: 1fr;
  }
}

.hub-main {
  max-width: 920px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}
.hub-card {
  max-width: 420px;
  margin: 2rem auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.75rem;
  box-shadow: 0 12px 32px rgba(20, 30, 30, .08);
}
.hub-application {
  max-width: 920px;
  margin: 1rem auto 3rem;
}
.hub-application-head {
  margin-bottom: 1.25rem;
}
.screen { display: none; }
.screen.is-active { display: block; }

h1 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  margin: 0 0 .5rem;
  color: var(--primary);
}
.hub-lede {
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.5;
  margin: 0 0 1.25rem;
}
.hub-hint {
  font-size: .75rem;
  color: var(--muted);
  margin: -.5rem 0 .75rem;
  text-align: left;
}
.hub-status {
  background: var(--primary-soft);
  border: 1px solid color-mix(in oklab, var(--primary) 20%, transparent);
  border-radius: var(--radius-md);
  padding: 1rem;
  font-size: .95rem;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}
.hub-switch {
  margin-top: 1rem;
  font-size: .9rem;
  color: var(--muted);
}
.hub-switch a { color: var(--primary); font-weight: 600; }
.hub-error {
  color: #b42318;
  font-size: .875rem;
  margin: .5rem 0;
}
.hub-actions {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

input, select, textarea {
  width: 100%;
  padding: .8rem 1rem;
  margin-bottom: .75rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font: inherit;
  background: #fff;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: .85rem 1.25rem;
  border: none;
  border-radius: var(--radius-full);
  font: inherit;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
}
.btn-sm { width: auto; padding: .55rem 1rem; font-size: .85rem; }
.btn-primary { background: var(--primary); color: #fbf6eb; }
.btn-accent { background: var(--accent); color: #fbf6eb; }
.btn-secondary { background: transparent; color: var(--primary); border: 1.5px solid var(--border); }
.hidden { display: none !important; }

/* Application form (from merchant landing) */
.apply-form {
  background: var(--surface);
  color: #1e2a2a;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: clamp(1.25rem, 3vw, 2rem);
  --form-text: #1e2a2a;
  --form-muted: #5a6a6a;
  --form-primary: #094a43;
  --form-primary-soft: #d3e2de;
  --form-border: #d8cdb4;
  --form-surface: #fff;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.form-grid .field { min-width: 0; }
@media (max-width: 580px) { .form-grid { grid-template-columns: 1fr; } }
.full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: .4rem; }
.field label, .form-section h3, .form-field-heading {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--form-primary);
}
.form-section { margin-top: 2rem; padding-top: 1.75rem; border-top: 1px solid var(--form-border); }
.form-section:first-of-type { margin-top: 0; padding-top: 0; border-top: none; }
.hp-field { position: absolute; left: -9999px; opacity: 0; }
.pay-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.25rem, 1fr)); gap: .6rem; margin-top: .5rem; }
.pay-option { display: block; cursor: pointer; min-width: 0; }
.pay-option input { position: absolute; opacity: 0; width: 0; height: 0; }
.pay-option-body {
  display: flex; align-items: center; gap: .55rem; padding: .65rem .75rem;
  border: 1.5px solid var(--form-border); border-radius: var(--radius-md);
  background: var(--form-surface); color: var(--form-text); font-size: .875rem; font-weight: 500;
}
.pay-option:has(input:checked) .pay-option-body {
  border-color: #c96740; border-width: 2px;
  box-shadow: 0 0 0 3px rgba(224, 123, 83, .42); background: #fff8f3;
}
.pay-option-icon { width: 22px; height: 22px; flex-shrink: 0; }
.pay-option-icon svg { width: 22px; height: 22px; display: block; }
.opening-hours-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; }
.opening-hours-grid .field label { text-transform: none; letter-spacing: .04em; font-weight: 600; }
.radio-group, .check-group { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; }
.radio-group label, .check-group label {
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: .875rem; font-weight: 500; text-transform: none; letter-spacing: normal; color: var(--form-text);
}
.photo-fields { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 700px) { .photo-fields { grid-template-columns: 1fr 1fr; } }
.file-upload { position: relative; width: 100%; min-width: 0; }
.file-upload-input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; z-index: 2; }
.file-upload-box {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem;
  width: 100%; min-height: 5.5rem; padding: .85rem; border: 1.5px dashed var(--form-border);
  border-radius: var(--radius-md); background: var(--form-surface); text-align: center; box-sizing: border-box;
}
.file-upload:hover .file-upload-box, .file-upload:focus-within .file-upload-box {
  border-color: var(--form-primary); background: color-mix(in oklab, var(--form-primary-soft) 45%, var(--form-surface));
}
.file-upload-icon { color: var(--form-primary); }
.file-upload-icon svg { width: 28px; height: 28px; }
.file-upload-prompt { font-size: .875rem; font-weight: 600; color: var(--form-primary); }
.file-upload-name { font-size: .75rem; color: var(--form-muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-field > label { word-break: break-word; line-height: 1.35; }
.form-note { font-size: .75rem; color: var(--form-muted); text-align: center; }
.form-error { color: #b42318; font-size: .875rem; margin-top: .75rem; text-align: center; }
.form-success { text-align: center; padding: 2rem 0; display: none; }
.apply-form .btn-outline { color: var(--form-primary); border: 1.5px solid var(--form-border); background: transparent; width: auto; }
.apply-form .btn-accent { background: var(--accent); color: #fbf6eb; width: auto; }
.apply-form .btn-lg { padding: 1rem 1.75rem; }
