/* ================================================================
   Material Reuse — Member Portal
   Design language: sharp, flat, corporate — matching material-reuse.co.uk
   Brand: Ultra Azul #1653F3 · Navy #06183F · Hi-Vis Green #9EFF51
   Type:  Geologica (headings) · Inter (body)
   ================================================================ */

:root {
  --azul: #1653F3;
  --azul-dark: #0F3DBB;
  --navy: #06183F;
  --navy-2: #0A2461;
  --green: #9EFF51;
  --green-dark: #4CA31A;
  --yellow: #FFED4D;
  --orange: #FF883A;
  --bg: #F5F6F9;
  --card: #FFFFFF;
  --ink: #06183F;
  --muted: #5E6B85;
  --line: #DDE2EC;
  --radius: 8px;
  --radius-sm: 6px;
  --font-head: 'Geologica', sans-serif;
  --font-body: 'Inter', sans-serif;
}

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

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; letter-spacing: -0.015em; }
button { font-family: var(--font-body); cursor: pointer; }
input, select, textarea { font-family: var(--font-body); }

/* ---------- login ---------- */
.login-wrap {
  min-height: 100vh;
  background: var(--navy);
  display: flex; align-items: center; justify-content: center; padding: 32px;
}
.login-inner { width: 100%; max-width: 460px; }
.login-card {
  width: 100%; background: #fff; border-radius: var(--radius); overflow: hidden;
}
.login-logo {
  background: var(--navy); display: flex; justify-content: center;
  padding: 32px 48px; border-bottom: 3px solid var(--green);
}
.login-logo img { height: 56px; width: auto; max-width: 100%; }
.login-body { padding: 34px 48px 38px; }
.login-tag { color: var(--muted); margin: 0 0 24px; font-size: 13.5px; }
.login-tag strong { color: var(--navy); }
.login-field { margin-bottom: 16px; }
.login-field label {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--muted); display: block; margin-bottom: 6px;
}
.login-field input {
  width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 14px; font-size: 14px; background: #fff;
}
.login-field input:focus { outline: none; border-color: var(--azul); }
.login-error { color: #B42318; font-size: 12.5px; margin-bottom: 12px; display: none; }
.login-error.show { display: block; }
.login-btn { width: 100%; }
.login-note { margin-top: 18px; font-size: 12px; color: var(--muted); }
.login-foot { margin-top: 22px; font-size: 11.5px; color: var(--muted); text-align: center; letter-spacing: .02em; }

/* ---------- shell ---------- */
.shell { display: none; min-height: 100vh; }
.shell.active { display: grid; grid-template-columns: 250px 1fr; }

.sidebar {
  background: var(--navy); color: #fff; padding: 30px 0 24px;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.side-logo { display: flex; align-items: center; padding: 0 24px 30px; }
.side-logo img { height: 44px; width: auto; max-width: 100%; }
.nav { flex: 1; display: flex; flex-direction: column; }
.nav button {
  display: flex; align-items: center; width: 100%;
  background: none; border: 0; border-left: 3px solid transparent;
  color: #8FA0C4; font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .09em;
  padding: 13px 24px 13px 21px; text-align: left;
  transition: background .12s, color .12s, border-color .12s;
}
.nav button:hover { background: rgba(255,255,255,.05); color: #fff; }
.nav button.active { background: rgba(255,255,255,.06); color: #fff; border-left-color: var(--green); }
.nav button .ico { display: none; }
.nav .locked { opacity: .45; }
.nav .locked::after { content: 'Locked'; margin-left: auto; font-size: 9px; letter-spacing: .12em; border: 1px solid rgba(255,255,255,.3); padding: 1px 6px; }
.side-foot { font-size: 11px; color: #7488B4; padding: 18px 24px 0; border-top: 1px solid rgba(255,255,255,.1); line-height: 1.7; }
.side-foot a { color: var(--green); text-decoration: none; }

/* ---------- main ---------- */
.main { padding: 30px 40px 70px; max-width: 1180px; width: 100%; margin: 0 auto; }

.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 30px; gap: 16px; flex-wrap: wrap; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.topbar h1 { font-size: 24px; font-weight: 600; }
.topbar .crumb { color: var(--muted); font-size: 11.5px; margin-top: 3px; text-transform: uppercase; letter-spacing: .08em; }
.top-right { display: flex; align-items: center; gap: 14px; }

.tier-badge {
  font-family: var(--font-body); font-weight: 700; font-size: 10.5px;
  text-transform: uppercase; letter-spacing: .08em;
  padding: 6px 12px; border-radius: var(--radius-sm); white-space: nowrap;
}
.tier-domestic-free { background: #EDF1F8; color: var(--navy); border: 1px solid var(--line); }
.tier-domestic-plus { background: var(--green); color: var(--navy); }
.tier-community { background: var(--yellow); color: var(--navy); }
.tier-corporate-reuse-partner { background: var(--azul); color: #fff; }
/* topbar badge — always the house navy, whatever the tier */
.top-right .tier-badge { background: var(--navy); color: #fff; border: 0; }

.avatar {
  width: 38px; height: 38px; border-radius: var(--radius-sm);
  background: var(--azul); color: #fff; display: flex; align-items: center;
  justify-content: center; font-family: var(--font-head); font-weight: 600; font-size: 13px;
}
.logout-btn { background: none; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 9px 16px; font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.logout-btn:hover { border-color: var(--navy); color: var(--navy); }

/* ---------- cards & grids ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: 1fr 1fr; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) {
  .shell.active { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
}

.stat { position: relative; overflow: hidden; padding-top: 26px; }
.stat .big { font-family: var(--font-head); font-weight: 600; font-size: 30px; margin: 6px 0 2px; letter-spacing: -0.02em; }
.stat .lbl { font-size: 10.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.stat .sub { font-size: 12px; color: var(--muted); }
.stat .stripe { position: absolute; top: 0; left: 0; right: 0; height: 3px; }

.section-title { font-size: 16px; margin: 34px 0 16px; display: flex; align-items: center; gap: 10px; }
.section-title::before { content: ''; width: 20px; height: 3px; background: var(--green); flex: none; }
.section-title:first-child { margin-top: 0; }

/* ---------- badges / pills ---------- */
.pill { display: inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; padding: 3px 9px; border-radius: var(--radius-sm); }
.pill-green { background: #EDFBE1; color: #2F6B0C; border: 1px solid #CBEBA9; }
.pill-blue { background: #E9EFFE; color: var(--azul); border: 1px solid #C6D6FC; }
.pill-yellow { background: #FFF9DB; color: #86700A; border: 1px solid #F1E28E; }
.pill-orange { background: #FFF0E3; color: #A44D0E; border: 1px solid #FAD3AC; }
.pill-red { background: #FDECEC; color: #B42318; border: 1px solid #F5C6C2; }
.pill-navy { background: var(--navy); color: var(--green); border: 1px solid var(--navy); }

/* ---------- buttons ---------- */
.btn { border: 0; border-radius: var(--radius-sm); font-weight: 700; padding: 12px 20px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; transition: background .12s, border-color .12s, color .12s; }
.btn-primary { background: var(--azul); color: #fff; }
.btn-primary:hover { background: var(--azul-dark); }
.btn-green { background: var(--green); color: var(--navy); }
.btn-green:hover { background: #8DF03D; }
.btn-ghost { background: none; border: 1px solid var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--navy); }
.btn-sm { padding: 8px 14px; font-size: 11px; }
.btn:disabled { opacity: .4; cursor: not-allowed; }

/* ---------- warehouse ---------- */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.filters input, .filters select {
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 11px 14px;
  font-size: 13.5px; background: #fff; min-width: 160px;
}
.filters input { flex: 1; min-width: 220px; }
.filters input:focus, .filters select:focus { outline: none; border-color: var(--azul); }


/* ---------- passport modal ---------- */
.modal-bg {
  position: fixed; inset: 0; background: rgba(6,24,63,.6); z-index: 60;
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.modal {
  background: #fff; border-radius: var(--radius); max-width: 640px; width: 100%;
  max-height: calc(100vh - 48px); overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 32px;
}
.modal .close { float: right; background: none; border: 0; font-size: 20px; color: var(--muted); cursor: pointer; }
.modal-lg { max-width: 780px; }
.m-sub { font-size: 12.5px; color: var(--muted); margin: 2px 0 18px; line-height: 1.5; }
.m-section {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin: 26px 0 4px; padding-top: 18px; border-top: 1px solid var(--line);
}
.m-section h4 { font-family: var(--font-head); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--navy); }
.m-section .m-hint { font-size: 11.5px; color: var(--muted); text-align: right; }
.row-head { display: grid; gap: 8px; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; margin: 10px 0 6px; }
.row-editor { display: flex; flex-direction: column; gap: 8px; }
.row-line { display: grid; gap: 8px; align-items: center; }
.row-line input, .row-line select {
  width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 9px 10px; font: inherit; font-size: 13px; background: #fff; min-width: 0;
}
.row-line input:focus, .row-line select:focus { outline: none; border-color: var(--azul); }
.row-del {
  background: none; border: 1px solid var(--line); border-radius: var(--radius-sm);
  width: 100%; height: 37px; color: var(--muted); cursor: pointer; font-size: 14px; line-height: 1;
}
.row-del:hover { color: #C0392B; border-color: #C0392B; }
.row-add {
  align-self: flex-start; margin-top: 8px; background: none; cursor: pointer;
  border: 1px dashed var(--azul); color: var(--azul); border-radius: var(--radius-sm);
  padding: 8px 16px; font: inherit; font-size: 12.5px; font-weight: 600;
}
.row-add:hover { background: #F0F4FF; }
.modal-actions { display: flex; gap: 10px; align-items: center; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }
.check-line { display: flex; align-items: center; gap: 10px; font-size: 13.5px; padding: 10px 0 2px; }
.check-line input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--azul); }
.passport-head { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.passport-tile { font-family: var(--font-head); font-weight: 600; font-size: 10px; text-transform: uppercase; letter-spacing: .12em; text-align: center; line-height: 1.4; color: var(--green); background: var(--navy); border-radius: var(--radius-sm); width: 84px; height: 72px; display: flex; align-items: center; justify-content: center; flex: none; padding: 6px; }
.passport-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; margin: 18px 0; }
.passport-grid .f { border-bottom: 1px solid var(--line); padding-bottom: 9px; }
.passport-grid .f b { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 2px; }
.passport-grid .f span { font-size: 13.5px; }
.qr-box {
  display: flex; align-items: center; gap: 16px; background: var(--navy);
  color: #fff; border-radius: var(--radius-sm); padding: 16px 18px; margin-top: 8px;
}

/* ---------- tables ---------- */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); padding: 9px 12px; border-bottom: 1px solid var(--navy); }
td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }

/* ---------- orders ---------- */
.order-card { margin-bottom: 14px; }
.order-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.order-head h4 { font-size: 15px; }
.order-head .meta { font-size: 12px; color: var(--muted); }
.order-lines { font-size: 12.5px; color: var(--muted); margin: 8px 0; }
.order-foot { display: flex; gap: 22px; flex-wrap: wrap; font-size: 12.5px; margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--line); align-items: center; }
.order-foot .k { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); display: block; }

/* ---------- carbon ---------- */
.bar-chart { display: flex; align-items: flex-end; gap: 8px; height: 170px; padding-top: 10px; }
.bar-chart .bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bar-chart .bar i { width: 100%; max-width: 52px; background: var(--azul); display: block; }
.bar-chart .bar b { font-size: 10.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.bar-chart .bar span { font-size: 10px; color: var(--muted); }
.cat-row { display: flex; align-items: center; gap: 12px; margin-bottom: 11px; }
.cat-row .name { width: 190px; font-size: 12.5px; flex: none; }
.cat-row .track { flex: 1; height: 8px; background: #EDF0F6; overflow: hidden; }
.cat-row .fill { height: 100%; background: var(--navy); display: block; }
.cat-row .val { width: 90px; text-align: right; font-size: 12px; font-weight: 700; }
.equiv { display: flex; gap: 12px; flex-wrap: wrap; }
.equiv .eq { flex: 1; min-width: 150px; border: 1px solid var(--line); border-top: 3px solid var(--green); padding: 14px 16px; }
.equiv .eq b { font-family: var(--font-head); font-size: 20px; display: block; }
.equiv .eq span { font-size: 11.5px; color: var(--muted); }

/* ---------- projects ---------- */
.proj-card { margin-bottom: 14px; }
.progress { height: 6px; background: #EDF0F6; overflow: hidden; margin: 12px 0 5px; }
.progress i { display: block; height: 100%; background: var(--azul); }
.doc-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.doc-row:last-child { border-bottom: 0; }
.doc-row .ico { display: none; }
.doc-row .t { flex: 1; }
.doc-row .t span { display: block; font-size: 11.5px; color: var(--muted); }

/* ---------- membership ---------- */
.tier-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.tier-card { border: 1px solid var(--line); border-top: 3px solid var(--line); border-radius: var(--radius); padding: 24px 22px; background: #fff; display: flex; flex-direction: column; position: relative; }
.tier-card.current { border-color: var(--azul); border-top-color: var(--azul); }
.tier-card .flag { position: absolute; top: -10px; left: 18px; }
.tier-card h4 { font-size: 15px; margin-bottom: 2px; }
.tier-card .price { font-family: var(--font-head); font-weight: 600; font-size: 26px; margin: 10px 0 2px; letter-spacing: -0.02em; }
.tier-card .price span { font-size: 11px; color: var(--muted); font-weight: 400; text-transform: uppercase; letter-spacing: .07em; }
.tier-card ul { list-style: none; margin: 14px 0 18px; flex: 1; }
.tier-card li { font-size: 12.5px; padding: 5px 0 5px 20px; position: relative; border-bottom: 1px solid #F0F2F7; }
.tier-card li:last-child { border-bottom: 0; }
.tier-card li::before { content: ''; position: absolute; left: 2px; top: 11px; width: 8px; height: 8px; background: var(--green); }

/* ---------- settings ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.form-grid label, .form-col label { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); display: block; margin-bottom: 6px; }
.form-grid input, .form-col input, .form-grid select {
  width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 11px 13px; font-size: 13.5px; background: #fff;
}
.form-grid input:focus, .form-grid select:focus { outline: none; border-color: var(--azul); }
.form-grid input:disabled { background: var(--paper, #F6F7FB); color: var(--muted); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 13px 0; border-bottom: 1px solid var(--line); }
.toggle-row:last-child { border-bottom: 0; }
.toggle-row .t b { display: block; font-size: 13.5px; }
.toggle-row .t span { font-size: 12px; color: var(--muted); }
.switch { width: 42px; height: 22px; border-radius: var(--radius-sm); background: #D4DAE6; border: 0; position: relative; transition: background .15s; flex: none; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; background: #fff; transition: left .15s; }
.switch.on { background: var(--navy); }
.switch.on::after { left: 23px; background: var(--green); }

/* ---------- misc ---------- */
.upgrade-note {
  background: var(--navy); color: #fff;
  border-radius: var(--radius); padding: 36px 28px; text-align: center;
}
.upgrade-note h3 { color: #fff; margin-bottom: 8px; font-size: 19px; }
.upgrade-note p { color: #A8B7D8; max-width: 520px; margin: 0 auto 20px; font-size: 13.5px; }
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  background: var(--navy); color: #fff; padding: 14px 22px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 13px; box-shadow: 0 10px 34px rgba(0,0,0,.3);
  z-index: 100; display: flex; align-items: center; gap: 10px;
}
.toast .dot { width: 8px; height: 8px; background: var(--green); }
.empty { text-align: center; color: var(--muted); padding: 36px 0; font-size: 13.5px; }
.tagline-strip {
  background: var(--navy); color: #fff; border-radius: var(--radius); border-left: 4px solid var(--green);
  padding: 18px 24px; font-family: var(--font-head); font-weight: 500; font-size: 14.5px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.muted { color: var(--muted); }
.small { font-size: 12.5px; }

/* ================================================================
   Features: passports · project lifecycle · documents · requests
   ================================================================ */
.mp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.mp-card { background: var(--card); border: 1px solid var(--line); cursor: pointer; transition: border-color .15s, transform .15s; display: flex; flex-direction: column; }
.mp-card:hover { border-color: var(--azul); transform: translateY(-2px); }
.mp-photo { position: relative; height: 150px; background: var(--navy); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.mp-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mp-tile { font-family: var(--font-head); font-weight: 700; font-size: 34px; color: var(--green); letter-spacing: .06em; }
.mp-status { position: absolute; top: 10px; left: 10px; }
.mp-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.mp-ref { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.mp-body h4 { font-size: 15px; line-height: 1.3; }
.mp-foot { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.mp-hero { width: 96px; height: 96px; object-fit: cover; border: 1px solid var(--line); flex-shrink: 0; }
.mp-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.mp-thumbs img { width: 72px; height: 72px; object-fit: cover; border: 1px solid var(--line); cursor: pointer; }
.mp-thumbs.edit span { position: relative; display: inline-block; }
.mp-thumbs.edit .row-del { position: absolute; top: -8px; right: -8px; width: 22px; height: 22px; background: #fff; border: 1px solid var(--line); font-size: 11px; }
.qr-img { width: 88px; height: 88px; background: #fff; padding: 4px; flex-shrink: 0; }
.upload-btn { display: inline-block; padding: 10px 16px; border: 1px dashed var(--azul); color: var(--azul); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; cursor: pointer; }
.upload-btn:hover { background: #EEF3FF; }
.upload-btn input { display: none; }

/* lifecycle / status tracker */
.stages { display: flex; gap: 6px; }
.stage { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 12px 6px; border: 1px solid var(--line); background: #FAFBFD; text-align: center; }
.stage i { font-style: normal; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border: 2px solid var(--line); font-family: var(--font-head); font-weight: 700; font-size: 12px; color: var(--muted); background: #fff; }
.stage span { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; color: var(--muted); line-height: 1.3; }
.stage.done { background: #fff; border-color: var(--green-dark); }
.stage.done i { background: var(--green); border-color: var(--green); color: var(--navy); }
.stage.done span { color: var(--navy); }
.stage.now { background: var(--navy); border-color: var(--navy); }
.stage.now i { background: var(--navy); border-color: var(--green); color: var(--green); }
.stage.now span { color: #fff; }
.stages.compact .stage { padding: 8px 4px; gap: 5px; }
.stages.compact .stage i { width: 22px; height: 22px; font-size: 10px; }
.stages.compact .stage span { font-size: 9px; }

.cta-card { background: var(--navy); color: #fff; border-color: var(--navy); }
.cta-card h3 { color: #fff; margin-bottom: 8px; }
.cta-card .small { color: #B9C6E4; margin-bottom: 14px; }
.filters select, .filters input[type="date"] { min-width: 150px; }
.card .btn.btn-ghost[href] { text-decoration: none; }

@media (max-width: 900px) {
  .stages { flex-wrap: wrap; }
  .stage { flex: 1 1 30%; }
  .row-line { grid-template-columns: 1fr 1fr !important; }
  .grid.cols-2[style*="2fr 1fr"] { grid-template-columns: 1fr !important; }
}


/* public passport page (QR scans, logged out) */
.public-wrap { min-height: 100vh; background: var(--navy); display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; }
.public-card { width: 100%; max-width: 560px; background: #fff; border-top: 5px solid var(--green); }
.public-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 18px 24px; background: var(--navy); color: #fff; }
.public-head img { flex: 0 0 auto; }
.public-head .kicker { text-align: right; max-width: 45%; line-height: 1.5; }
@media (max-width: 480px) { .public-head { flex-direction: column; align-items: flex-start; gap: 8px; } .public-head .kicker { max-width: none; text-align: left; } }
.lockup-mini span { font-family: var(--font-head); font-weight: 700; font-size: 16px; line-height: 1.05; color: #fff; display: block; }
.public-head .kicker { font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--green); font-weight: 600; }
.public-photo { width: 100%; height: 300px; object-fit: cover; display: block; }
.public-body { padding: 22px 24px 26px; }
.public-body h2 { font-size: 22px; margin: 4px 0 4px; }
.side-foot a[onclick] { color: #B9C6E4; font-size: 11px; }

/* branded QR */
.qr-wrap { position: relative; display: inline-block; background: #fff; padding: 4px; flex-shrink: 0; }
.qr-wrap img:first-child { width: 100%; height: 100%; display: block; }
.qr-wrap .qr-mark { position: absolute; left: 39%; top: 39%; width: 22%; height: 22%; background: #fff; padding: 1px; }

/* "group" caption under the hotlinked wordmark so every lockup reads Material Reuse Group */
/* Official Material Reuse Group logo (frontend/assets/mrg-logo-group.png) */
.side-logo img.brand { height: 50px; width: auto; max-width: 100%; display: block; }
.login-logo img.brand { height: 60px; width: auto; max-width: 100%; }

/* softer edges on the newer components */
.stat, .proj-card, .order-card, .tier-card, .upgrade-note, .tagline-strip, .modal, .login-card, .public-card, .cta-card, .mp-card { border-radius: var(--radius); }
.mp-photo { border-radius: var(--radius) var(--radius) 0 0; }
.mp-hero, .mp-thumbs img, .qr-wrap, .public-photo, .passport-tile, .qr-box, .stage, .bar-chart .bar i, .cat-row .track, .cat-row .fill, .progress, .progress i, .row-line input, .row-line select, .row-add, .row-del, .upload-btn, .filters input, .filters select, .form-grid input, .form-grid select, .login-field input, .switch, .switch::after, .pill, .btn, .tier-badge, .logout-btn, .nav button, .toast, .empty { border-radius: var(--radius-sm); }
.stat .stripe { border-radius: var(--radius) var(--radius) 0 0; }
.mp-status .pill { border-radius: var(--radius-sm); }
.nav button.active, .nav button { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.public-photo { border-radius: 0; }

/* provenance timeline */
.timeline { border-left: 2px solid var(--line); margin: 4px 0 16px 6px; padding-left: 16px; display: flex; flex-direction: column; gap: 10px; }
.timeline .tl { position: relative; font-size: 13px; }
.timeline .tl i { position: absolute; left: -23px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--green); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.timeline.compact { gap: 6px; }
.timeline.compact .tl { font-size: 12px; }
/* scan-to-collect */
.scan-card { background: #F5F6F9; margin: 4px 0 14px; padding: 12px 14px; }
.scan-card h4 { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.scan-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13px; }
.scan-row:first-of-type { border-top: 0; }

/* password eye */
.pw-wrap { position: relative; }
.pw-wrap input { width: 100%; padding-right: 42px; }
.pw-eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--muted); cursor: pointer; padding: 6px; line-height: 0; }
.pw-eye:hover, .pw-eye.on { color: var(--azul); }
.login-card.register-mode .login-note { text-align: center; }
/* marketplace cards */
.mp-price { font-family: var(--font-head); font-weight: 600; font-size: 14px; color: var(--navy); }
.mp-buy { display: flex; gap: 6px; margin-top: 10px; }
.mp-buy .btn { flex: 1; justify-content: center; }
.mp-body { padding-bottom: 16px; }
.scan-sell { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 10px; }
/* assistant */
.chat-fab { position: fixed; right: 22px; bottom: 22px; z-index: 70; background: var(--navy); color: #fff; border: 0; border-radius: 999px; padding: 12px 18px 12px 14px; font-family: var(--font-head); font-weight: 600; font-size: 13px; display: flex; align-items: center; gap: 8px; box-shadow: 0 8px 24px rgba(6,24,63,.25); cursor: pointer; }
.chat-fab i { width: 10px; height: 10px; border-radius: 50%; background: var(--green); display: inline-block; }
.chat-panel { position: fixed; right: 22px; bottom: 76px; width: 380px; max-width: calc(100vw - 32px); height: 560px; max-height: calc(100vh - 100px); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 16px 48px rgba(6,24,63,.28); z-index: 70; display: flex; flex-direction: column; overflow: hidden; }
.chat-head { background: var(--navy); color: #fff; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; }
.chat-head b { font-family: var(--font-head); font-size: 14px; }
.chat-head span { font-size: 11px; color: #B9C6E4; display: block; }
.chat-head button { background: none; border: 0; color: #fff; font-size: 18px; cursor: pointer; }
.chat-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: #F5F6F9; }
.chat-msg { max-width: 86%; padding: 10px 12px; border-radius: var(--radius); font-size: 13px; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; }
.chat-msg.user { align-self: flex-end; background: var(--azul); color: #fff; border-bottom-right-radius: 3px; }
.chat-msg.bot { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 3px; }
.chat-msg.bot a { color: var(--azul); }
.chat-msg.typing { color: var(--muted); font-style: italic; }
.chat-sugg { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px; background: #F5F6F9; }
.chat-sugg button { font-size: 11px; padding: 5px 10px; border: 1px solid var(--line); background: #fff; border-radius: 999px; cursor: pointer; color: var(--navy); }
.chat-sugg button:hover { border-color: var(--azul); }
.chat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); background: #fff; }
.chat-form textarea { flex: 1; resize: none; height: 42px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); font: inherit; font-size: 13px; }
.chat-form textarea:focus { outline: none; border-color: var(--azul); }
@media (max-width: 640px) { .chat-panel { right: 8px; bottom: 70px; width: calc(100vw - 16px); height: calc(100vh - 90px); } }

/* membership plans */
.plans { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 8px 12px; }
.plan-table { width: 100%; border-collapse: separate; border-spacing: 8px 0; min-width: 760px; }
.plan-table th, .plan-table td { text-align: center; vertical-align: top; }
.plan-table th { padding: 22px 12px 16px; background: #F5F6F9; border-radius: var(--radius) var(--radius) 0 0; }
.plan-table th.current { background: var(--navy); color: #fff; }
.plan-table th.current .plan-price span, .plan-table th.current .plan-tag { color: #B9C6E4; }
.plan-table th.current .plan-name { color: var(--green); }
.plan-intro { font-family: var(--font-head); font-size: 26px; font-weight: 700; line-height: 1.15; text-align: left; color: var(--navy); }
.plan-name { font-family: var(--font-head); font-size: 16px; font-weight: 700; line-height: 1.25; }
.plan-price { font-family: var(--font-head); font-size: 22px; font-weight: 700; margin-top: 8px; }
.plan-price span { font-size: 12px; font-weight: 500; color: var(--muted); }
.plan-tag { font-size: 11px; color: var(--muted); margin-top: 6px; font-weight: 400; line-height: 1.4; }
.plan-table td { padding: 12px 10px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.plan-table td.feat-col { text-align: left; color: var(--navy); font-weight: 500; white-space: nowrap; }
.plan-table th.feat-col { background: transparent; }
.plan-table td.current { background: #F0F5FF; }
.plan-table tr.actions td { border-bottom: 0; padding: 16px 10px 12px; background: transparent; }
.plan-table i.tick { font-style: normal; display: inline-flex; width: 24px; height: 24px; border-radius: 50%; background: #E3ECFF; color: var(--azul); align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.plan-table i.dash { font-style: normal; color: #B9C6E4; }

/* sign-up plan choice */
.tier-choice { display: grid; gap: 8px; }
.tier-opt { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; cursor: pointer; background: #fff; }
.tier-opt:has(input:checked) { border-color: var(--azul); background: #F0F5FF; }
.tier-opt input { margin-top: 3px; }
.tier-opt-body { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.tier-opt-body b { font-family: var(--font-head); }
.tier-opt-price { font-weight: 600; color: var(--azul); font-size: 12px; }
.tier-opt-sub { font-size: 11.5px; color: var(--muted); }
/* quantity picker */
.qty-pick { display: inline-flex; align-items: stretch; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: #fff; }
.qty-pick button { border: 0; background: #F5F6F9; width: 28px; cursor: pointer; font-size: 15px; color: var(--navy); }
.qty-pick input { width: 40px; border: 0; text-align: center; font: inherit; font-size: 13px; -moz-appearance: textfield; }
.qty-pick input::-webkit-outer-spin-button, .qty-pick input::-webkit-inner-spin-button { -webkit-appearance: none; }
.mp-buy { flex-wrap: wrap; }
/* community installation evidence */
.evidence { margin-top: 10px; padding: 10px 12px; background: #F5F6F9; border-radius: var(--radius-sm); font-size: 13px; }
.evidence.warn { background: #FFF7E0; border: 1px solid #F5D77A; }
.mp-new { display: block; font-size: 10.5px; font-weight: 500; color: var(--green-dark, #1D7A05); text-align: right; }
.mp-price { text-align: right; }
.suggest { background: #F0F5FF; border: 1px solid #C9D8FF; border-radius: var(--radius-sm); padding: 10px 12px; line-height: 1.5; }
