/*
 * Bergstreme look for the Site App (front door, Warren 5 Oct 2026) - the supplier portal's design:
 * Poppins, an ink top bar with the white logo, light background, white cards. Phone first: one column of
 * content up to 560px, two-column tile grid, large tap targets, safe-area padding for notched phones.
 */
:root {
  --ink: #121212; --navy: #08336C; --text: #2E2E2E; --muted: #6B6B6B; --grey: #D6D3D1; --light: #F1F1F1;
  --pale: #E2EDF4; --white: #FFFFFF; --danger: #B3261E; --danger-bg: #FBEDEC; --green: #2E8B57; --amber: #D9822B;
  --radius: 14px; --radius-input: 10px;
  --shadow: 0 1px 2px rgba(18, 18, 18, .04), 0 4px 14px rgba(18, 18, 18, .06);
  --font: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; color-scheme: light; }
body { margin: 0; background: var(--light); color: var(--text); font-family: var(--font); font-size: 15px;
  line-height: 1.5; -webkit-font-smoothing: antialiased; min-height: 100vh; }
[hidden] { display: none !important; }
a { color: var(--navy); }

.bar { background: var(--ink); color: var(--white); display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px; }
.bar img { width: 128px; height: auto; display: block; }
.bar .who { font-size: 12px; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
.bar a.back { color: var(--white); text-decoration: none; font-size: 14px; opacity: .85; }

.wrap { width: 100%; max-width: 560px; margin: 0 auto;
  padding: 18px 16px calc(32px + env(safe-area-inset-bottom, 0px)); }
h1 { font-size: 22px; font-weight: 600; color: var(--ink); margin: 6px 0 2px; line-height: 1.25; }
.sub { color: var(--muted); margin: 0 0 16px; font-size: 14px; }
.sec { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  margin: 20px 2px 10px; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.t { background: var(--white); border: 1px solid var(--grey); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px; text-decoration: none; color: var(--text); display: flex; flex-direction: column; gap: 8px;
  min-height: 112px; position: relative; -webkit-tap-highlight-color: transparent; }
.t:active { transform: scale(.98); }
.t .ic { width: 38px; height: 38px; border-radius: 10px; background: var(--pale); display: grid; place-items: center; color: var(--navy); }
.t .ic svg { width: 21px; height: 21px; }
.t b { font-weight: 600; color: var(--ink); font-size: 15px; line-height: 1.25; }
.t span { font-size: 12px; color: var(--muted); line-height: 1.35; }
.badge { position: absolute; top: 12px; right: 12px; background: var(--danger-bg); color: var(--danger);
  font-size: 11px; font-weight: 600; border-radius: 20px; padding: 2px 8px; }
@media (max-width: 330px) { .grid { grid-template-columns: 1fr; } .t { min-height: 0; } }

.card { background: var(--white); border: 1px solid var(--grey); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px; margin-bottom: 14px; }
.card-title { font-size: 13px; font-weight: 600; color: var(--ink); margin: 0 0 12px; }
.field { margin-bottom: 14px; } .field:last-child { margin-bottom: 0; }
.field label, label.lbl { display: block; font-size: 13px; font-weight: 500; color: var(--text); margin-bottom: 6px; }
input[type=text], input[type=email], input[type=number], input[type=date], input[type=search], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; font: inherit; font-size: 16px; color: var(--text);
  background: var(--white); border: 1px solid #c9c9c9; border-radius: var(--radius-input); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--navy); outline-offset: 0; border-color: var(--navy); }
.btn { display: block; width: 100%; min-height: 50px; padding: 12px 16px; border: 0; border-radius: var(--radius-input);
  background: var(--navy); color: var(--white); font: inherit; font-weight: 600; font-size: 16px; cursor: pointer; text-align: center; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.secondary { background: var(--white); color: var(--navy); border: 1px solid var(--navy); }
.hint, .muted { font-size: 12px; color: var(--muted); }
.err { color: var(--danger); font-size: 13px; }
.foot { text-align: center; font-size: 12px; color: var(--muted); margin-top: 26px; }

/* ---- shared parts of the site pages (Confirm a delivery, Site attendance, My month) ---- */
.page-title { margin: 4px 0 2px; } .page-sub { color: var(--muted); font-size: 14px; margin: 0 0 16px; }
.card-title { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
textarea { min-height: 76px; resize: vertical; }
.tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.tab { flex: 1; min-height: 42px; padding: 8px; border-radius: var(--radius-input); border: 1px solid var(--grey); background: var(--white);
  color: var(--text); font: inherit; font-weight: 500; cursor: pointer; }
.tab.on { border: 2px solid var(--navy); color: var(--navy); background: var(--pale); }
.pick { display: block; width: 100%; text-align: left; background: var(--white); border: 1px solid var(--grey); border-radius: var(--radius-input);
  padding: 12px 14px; margin-bottom: 8px; color: var(--ink); font: inherit; font-size: 15px; font-weight: 500; cursor: pointer; }
.pick:active { transform: scale(.99); }
.pick small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; margin-top: 3px; }
.pill { display: inline-block; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; border-radius: 20px;
  padding: 2px 8px; margin-left: 6px; vertical-align: middle; background: var(--pale); color: var(--navy); }
.pill.part { background: #FDF0E1; color: var(--amber); } .pill.short { background: var(--danger-bg); color: var(--danger); }
.photos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.photos img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid var(--grey); }
.photo-btn, .ghost { display: block; width: 100%; min-height: 46px; margin-top: 10px; padding: 10px 12px; background: var(--white);
  border: 1px dashed var(--navy); color: var(--navy); border-radius: var(--radius-input); font: inherit; font-weight: 600; cursor: pointer; }
.submit-btn { display: block; width: 100%; min-height: 54px; padding: 14px; font: inherit; font-size: 17px; font-weight: 600; background: var(--navy);
  color: #fff; border: none; border-radius: var(--radius-input); cursor: pointer; box-shadow: var(--shadow); }
.submit-btn:disabled { opacity: .4; cursor: not-allowed; }
button.back { background: none; border: none; color: var(--navy); font: inherit; font-size: 14px; font-weight: 500; padding: 0 0 12px; cursor: pointer; }
.msg { font-size: 13px; margin-top: 10px; line-height: 1.5; }
.msg.err { color: var(--danger); }
.ok-msg { font-size: 14px; margin-top: 10px; color: var(--green); }
.stamp { background: var(--white); border: 1px solid var(--grey); border-radius: var(--radius); padding: 28px 20px; text-align: center; box-shadow: var(--shadow); }
.stamp .check { font-size: 42px; color: var(--green); }
.stamp h2 { font-size: 20px; font-weight: 600; color: var(--ink); margin: 6px 0 4px; }
.stamp p { color: var(--muted); font-size: 13px; margin: 3px 0; }
/* Take photo / From gallery side by side (deliveries) */
.photo-btns { display: flex; gap: 8px; }
.photo-btns .photo-btn { flex: 1; }
