@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&display=swap');

/* ──────────────────────────────────────────────────────────────────────────────
   HSE Link-Up — "Cream Luxe" premium theme
   Light & airy ivory, deep-green serif headings, warm orange/gold accents.
   Class names preserved so all templates restyle without edits.
   ────────────────────────────────────────────────────────────────────────────── */

:root {
  /* Greens */
  --green:        #1e5631;   /* deep forest — headings, primary */
  --green-deep:   #143d22;   /* darker for nav/footers */
  --green-mid:    #2e7d32;
  --green-light:  #e9f1ea;   /* soft green wash */

  /* Warm accents */
  --orange:       #c96a1e;   /* burnt amber — buttons/accents */
  --orange-mid:   #d9812f;
  --orange-light: #f7ecdc;
  --gold:         #c2a24c;   /* hairline dividers, fine detail */
  --gold-soft:    rgba(194,162,76,0.35);

  /* Creams / paper */
  --cream:        #fbf6ec;   /* page background */
  --cream-2:      #f4ead7;   /* subtle panels */
  --cream-dark:   #ecdfc6;
  --paper:        #fffdf8;   /* cards — warm near-white */

  /* Ink */
  --text:         #23291f;
  --text-mid:     #5c6253;
  --text-light:   #8d9281;
  --white:        #ffffff;

  /* Lines & shapes */
  --line:         rgba(30,86,49,0.12);
  --radius:       18px;
  --radius-sm:    11px;
  --shadow:       0 6px 22px rgba(35,41,31,0.07);
  --shadow-card:  0 12px 34px rgba(35,41,31,0.13);
  --shadow-soft:  0 2px 10px rgba(35,41,31,0.05);

  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  background:
    radial-gradient(1200px 500px at 50% -200px, var(--cream-2), transparent 70%),
    var(--cream);
  color: var(--text);
  min-height: 100vh;
  padding-bottom: 48px;
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; color: var(--green); line-height: 1.15; }

a { color: var(--green); }

/* Gold hairline divider helper */
.hairline,
hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-soft) 20%, var(--gold-soft) 80%, transparent);
  margin: 22px 0;
}

/* ── Nav ──────────────────────────────────────────────────────────────────── */
.navbar {
  background: rgba(255,253,248,0.85);
  backdrop-filter: saturate(140%) blur(10px);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}
.navbar-logo img { height: 50px; display: block; }
.navbar-menu { display: none; flex-direction: column; gap: 2px; }
.navbar-menu.open {
  display: flex;
  position: absolute;
  top: 76px;
  right: 16px;
  background: var(--paper);
  padding: 10px;
  min-width: 210px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
}
.navbar-menu a {
  color: var(--green);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 10px 12px;
  border-radius: 8px;
}
.navbar-menu a:hover { background: var(--green-light); }
.hamburger { background: none; border: none; cursor: pointer; padding: 6px; }
.hamburger span { display: block; width: 26px; height: 2px; background: var(--green); margin: 5px 0; border-radius: 2px; transition: .3s; }

/* ── Hero banner ─────────────────────────────────────────────────────────── */
.hero {
  background:
    radial-gradient(700px 260px at 50% -60px, rgba(194,162,76,0.12), transparent 70%),
    transparent;
  color: var(--text);
  padding: 56px 20px 30px;
  text-align: center;
  position: relative;
}
.hero::after {
  content: "";
  display: block;
  width: 64px;
  height: 2px;
  margin: 20px auto 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.hero-tag {
  color: var(--orange);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2.5px;
}
.hero h1 { font-size: 2.4rem; margin: 12px 0 6px; font-weight: 600; }
.hero-sub { color: var(--text-mid); font-size: 1rem; }
.hero-sub strong { color: var(--orange); font-weight: 600; }

@media (min-width: 640px) { .hero h1 { font-size: 3rem; } }

/* ── Container ────────────────────────────────────────────────────────────── */
.container { max-width: 560px; margin: 0 auto; padding: 0 20px; }

/* ── Cards ────────────────────────────────────────────────────────────────── */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  margin: 16px 0;
  box-shadow: var(--shadow);
}
.card-row { display: flex; align-items: center; justify-content: space-between; }
.card-label { font-size: 1.02rem; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.card-label .icon { font-size: 1.2rem; }
.badge {
  background: var(--orange);
  color: var(--white);
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 0.82rem;
  font-weight: 700;
}
.badge-green { background: var(--green); }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  text-align: center;
  letter-spacing: 0.2px;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); filter: brightness(1.02); }
.btn:active { transform: translateY(0); }
.btn-orange { background: linear-gradient(180deg, var(--orange-mid), var(--orange)); color: var(--white); box-shadow: 0 6px 16px rgba(201,106,30,0.28); }
.btn-green  { background: linear-gradient(180deg, var(--green-mid), var(--green)); color: var(--white); box-shadow: 0 6px 16px rgba(30,86,49,0.25); }
.btn-outline { background: transparent; border: 1.5px solid var(--green); color: var(--green); }
.btn-outline:hover { background: var(--green-light); }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-block { display: block; width: 100%; }
.btn-connect {
  background: linear-gradient(180deg, var(--green-mid), var(--green));
  color: var(--white);
  border: none;
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s, filter .15s;
}
.btn-connect:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn-connect.connected { background: var(--text-light); cursor: default; box-shadow: none; }

/* ── Zone filter ──────────────────────────────────────────────────────────── */
.zone-section { margin: 18px 0 8px; }
.zone-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 2px; color: var(--text-mid); text-transform: uppercase; margin-bottom: 12px; }
.zone-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.zone-pill {
  background: var(--paper);
  color: var(--green);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all .15s;
}
.zone-pill:hover { border-color: var(--gold); }
.zone-pill.active { background: linear-gradient(180deg, var(--green-mid), var(--green)); color: var(--white); border-color: transparent; }

/* ── Search bar ───────────────────────────────────────────────────────────── */
.search-wrap { position: relative; margin: 14px 0; }
.search-wrap input {
  width: 100%;
  padding: 14px 16px 14px 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 1rem;
  background: var(--paper);
  color: var(--text);
  box-shadow: var(--shadow-soft);
}
.search-wrap input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(30,86,49,0.10); }
.search-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); font-size: 1.05rem; color: var(--text-light); pointer-events: none; }

/* ── Supplier directory card ──────────────────────────────────────────────── */
.dir-header { display: flex; align-items: center; justify-content: space-between; margin: 22px 0 12px; }
.dir-title { font-size: 0.74rem; font-weight: 700; letter-spacing: 2px; color: var(--text-mid); text-transform: uppercase; }
.dir-count { font-size: 0.85rem; color: var(--text-light); }

.supplier-card {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
  position: relative;
  background: var(--green-deep);
  min-height: 150px;
  border: 1px solid var(--line);
}
.supplier-card-bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0.5; }
.supplier-card::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,61,34,0.25), rgba(20,61,34,0.78));
  z-index: 0;
}
.supplier-card-content { position: relative; z-index: 1; padding: 16px; display: flex; align-items: flex-start; gap: 14px; }
.supplier-logo-wrap {
  flex-shrink: 0; width: 66px; height: 66px; border-radius: 50%; overflow: hidden;
  border: 2px solid rgba(255,255,255,0.85); background: var(--white); margin-top: 2px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}
.supplier-logo-wrap img { width: 100%; height: 100%; object-fit: cover; }
.supplier-logo-placeholder { width: 100%; height: 100%; background: var(--cream-dark); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.supplier-info { flex: 1; }
.supplier-name { font-family: var(--font-display); color: var(--white); font-size: 1.2rem; font-weight: 600; text-shadow: 0 1px 6px rgba(0,0,0,0.55); }
.supplier-company { color: rgba(255,255,255,0.88); font-size: 0.85rem; text-shadow: 0 1px 3px rgba(0,0,0,0.5); margin-bottom: 8px; }
.tag-badge {
  display: inline-block; background: rgba(201,106,30,0.95); color: var(--white);
  border-radius: 999px; padding: 3px 11px; font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.5px; margin-right: 5px; margin-bottom: 5px;
}
.supplier-card-top { position: absolute; top: 14px; right: 14px; z-index: 2; }
.supplier-expand { background: var(--paper); padding: 18px; display: none; border-top: 1px solid var(--line); }
.supplier-expand.open { display: block; }
.expand-toggle { background: none; border: none; color: rgba(255,255,255,0.92); font-size: 0.8rem; cursor: pointer; text-decoration: underline; margin-top: 8px; padding: 0; }
.expand-blurb { font-size: 0.92rem; color: var(--text-mid); margin-bottom: 12px; line-height: 1.6; }
.social-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.social-link {
  display: inline-flex; align-items: center; gap: 5px; color: var(--green); text-decoration: none;
  font-size: 0.84rem; font-weight: 600; padding: 5px 12px; border: 1px solid var(--line);
  border-radius: 999px; background: var(--green-light);
}
.social-link:hover { border-color: var(--gold); }
.accred-logos { display: flex; gap: 8px; margin-top: 12px; }
.accred-logos img { height: 34px; width: auto; }

/* ── Wall photos ──────────────────────────────────────────────────────────── */
.wall-section-header { display: flex; align-items: center; justify-content: space-between; margin: 8px 0 12px; }
.wall-title { font-size: 0.74rem; font-weight: 700; letter-spacing: 2px; color: var(--text-mid); text-transform: uppercase; }
.wall-count { font-size: 0.85rem; color: var(--text-light); }
.wall-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; }
.wall-photo-item { position: relative; aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow-soft); }
.wall-photo-item img { width: 100%; height: 100%; object-fit: cover; }
.wall-photo-name { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(20,61,34,0.7); color: var(--white); font-size: 0.7rem; padding: 4px 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Upload button ────────────────────────────────────────────────────────── */
.upload-card {
  background: var(--paper); border: 1px dashed var(--gold-soft); border-radius: var(--radius);
  padding: 16px 20px; margin: 10px 0; box-shadow: var(--shadow-soft);
  display: flex; align-items: center; justify-content: space-between; cursor: pointer;
}
.upload-card:hover { border-color: var(--gold); }
.upload-card label { display: flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; width: 100%; }
.upload-card input[type="file"] { display: none; }

/* ── Forms ────────────────────────────────────────────────────────────────── */
.form-section {
  margin: 18px 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-soft);
}
.form-section-title {
  font-family: var(--font-body);
  font-size: 0.74rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  color: var(--green); margin-bottom: 18px; padding-bottom: 10px;
  border-bottom: 1px solid var(--gold-soft);
}
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 0.88rem; font-weight: 600; color: var(--text-mid); margin-bottom: 7px; }
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%; padding: 13px 15px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 1rem; color: var(--text); background: var(--cream);
  appearance: none; transition: border-color .15s, box-shadow .15s;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { outline: none; border-color: var(--green); background: var(--white); box-shadow: 0 0 0 3px rgba(30,86,49,0.10); }
.form-group textarea { min-height: 96px; resize: vertical; }
.form-hint { font-size: 0.8rem; color: var(--text-light); margin-top: 5px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-error { color: #b23b2e; font-size: 0.82rem; margin-top: 5px; }

@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } }

/* ── Alerts / flash ───────────────────────────────────────────────────────── */
.alert { border-radius: var(--radius-sm); padding: 14px 18px; margin: 14px 0; font-size: 0.94rem; box-shadow: var(--shadow-soft); }
.alert-success { background: var(--green-light); color: var(--green); border-left: 4px solid var(--green); }
.alert-info    { background: #eef4ee; color: var(--green-deep); border-left: 4px solid var(--gold); }
.alert-error, .alert-danger { background: #fbece9; color: #b23b2e; border-left: 4px solid #b23b2e; }
.alert-warning { background: var(--orange-light); color: #9a531a; border-left: 4px solid var(--orange); }

/* ── My connections list ──────────────────────────────────────────────────── */
.connection-item { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.connection-item:last-child { border-bottom: none; }
.conn-logo { width: 46px; height: 46px; border-radius: 50%; overflow: hidden; background: var(--cream-dark); flex-shrink: 0; }
.conn-logo img { width: 100%; height: 100%; object-fit: cover; }
.conn-info .conn-name { font-weight: 700; font-size: 0.96rem; }
.conn-info .conn-zone { font-size: 0.8rem; color: var(--text-light); }

/* ── Admin ────────────────────────────────────────────────────────────────── */
.admin-body { background: var(--cream); }
.admin-nav {
  background: linear-gradient(180deg, var(--green), var(--green-deep));
  color: var(--cream);
  padding: 16px 24px; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 2px solid var(--gold-soft);
}
.admin-nav h1 { font-size: 1.15rem; color: var(--cream); }
.admin-nav a { color: var(--gold) !important; }
.admin-container { max-width: 1040px; margin: 28px auto; padding: 0 22px; }
.admin-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 22px; box-shadow: var(--shadow); }
.admin-card h2 { font-size: 1.3rem; font-weight: 600; margin-bottom: 16px; color: var(--green); }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th { background: var(--cream-2); text-align: left; padding: 11px 13px; font-size: 0.72rem; letter-spacing: 1px; text-transform: uppercase; color: var(--text-mid); }
td { padding: 11px 13px; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: none; }
.qr-box { text-align: center; }
.qr-box svg { width: 170px; height: auto; max-width: 100%; display: block; }
.qr-label { font-size: 0.75rem; font-weight: 600; margin-top: 8px; color: var(--text-mid); }

/* ── Misc ─────────────────────────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-muted { color: var(--text-light); }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; }
.gap-8 { gap: 8px; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

.page-title { font-size: 0.78rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--text-mid); margin: 24px 0 14px; }
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-light); }
.empty-state .empty-icon { font-size: 2.6rem; margin-bottom: 10px; opacity: 0.7; }

.font-mono { font-family: ui-monospace, "Cascadia Code", Consolas, "Courier New", monospace; }

/* ── Supplier profile / landing page ──────────────────────────────────────── */
.profile-banner { position: relative; height: 200px; overflow: hidden; }
.profile-banner-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.profile-banner-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,61,34,0.15), rgba(20,61,34,0.55)); }
.profile-banner-fallback { background: linear-gradient(135deg, var(--green), var(--green-deep)); }
.profile-back {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  background: rgba(255,253,248,0.9); color: var(--green); text-decoration: none;
  font-size: 0.82rem; font-weight: 600; padding: 7px 14px; border-radius: 999px;
  box-shadow: var(--shadow-soft);
}
.profile-head {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-card); padding: 22px; text-align: center;
  margin-top: -56px; position: relative; z-index: 1;
}
.profile-logo {
  width: 96px; height: 96px; border-radius: 50%; overflow: hidden; margin: -70px auto 12px;
  border: 4px solid var(--paper); background: var(--white); box-shadow: var(--shadow);
}
.profile-logo img { width: 100%; height: 100%; object-fit: cover; }
.profile-logo .supplier-logo-placeholder { font-size: 2.2rem; }
.profile-name { font-size: 1.7rem; margin: 0; }
.profile-location { color: var(--orange); font-weight: 600; font-size: 0.9rem; margin-top: 4px; }

.file-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-radius: var(--radius-sm); font-weight: 600; font-size: 0.92rem;
  text-decoration: none;
}
.file-row-unlocked { background: var(--green-light); color: var(--green); border: 1px solid var(--line); }
.file-row-unlocked span { color: var(--orange); font-size: 0.85rem; }
.file-row-unlocked:hover { border-color: var(--gold); }
.file-row-locked { background: var(--cream-2); color: var(--text-light); border: 1px dashed var(--gold-soft); }
.file-row-locked span { font-size: 0.82rem; }

/* Directory card link wrapper */
.supplier-card-content.as-link { text-decoration: none; cursor: pointer; }

/* ── Multi-step form indicator ────────────────────────────────────────────── */
.steps { display: flex; gap: 10px; margin: 18px 0 6px; }
.steps .step {
  flex: 1; display: flex; align-items: center; gap: 8px; justify-content: center;
  font-size: 0.82rem; font-weight: 600; color: var(--text-light);
  padding: 10px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--paper);
}
.steps .step.active { color: var(--green); border-color: var(--gold-soft); box-shadow: var(--shadow-soft); }
.steps .step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%; font-size: 0.78rem;
  background: var(--cream-2); color: var(--text-mid);
}
.steps .step.active .step-num { background: var(--orange); color: #fff; }

/* Tidy multi-input grids (tags / keywords) — wrap cleanly, no lone half-width fields */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
