/* MU88 Parcel – shared styles (restored from Figma design) */
:root {
  --ink: #222222;
  --muted: #555555;
  --btn-bg: #EAEAEA;
  --btn-bg-hover: #E0E0E0;
  --green: #6CBE6C;
  --frame-w: 390px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #E9E9E9;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

.app {
  width: min(var(--frame-w), 100%);
  min-height: 100vh;
  margin: 0 auto;
  background: #FFFFFF;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.08);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 28px 40px 0;
}
.logo { font-size: 19px; font-weight: 800; letter-spacing: 0.5px; }
.menu-link { font-size: 14px; color: var(--ink); text-decoration: none; }

main { flex: 1; padding: 34px 40px 28px; display: flex; flex-direction: column; }

h1.page-title { font-size: 24px; font-weight: 800; margin-bottom: 10px; }
h2.section { font-size: 18px; font-weight: 800; margin: 36px 0 6px; }
p { font-size: 15px; line-height: 1.55; }
p.muted { color: var(--muted); }
p + p { margin-top: 14px; }

/* full-width grey pill button used across all screens */
.btn {
  display: block;
  width: 100%;
  background: var(--btn-bg);
  border: 0;
  border-radius: 10px;
  padding: 15px 16px;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  margin-top: 16px;
}
.btn:hover { background: var(--btn-bg-hover); }
.btn.green { background: var(--green); color: #FFFFFF; }
.btn.green:hover { background: #5FB15F; }

/* checkbox rows */
label.check {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  margin: 16px 0;
  cursor: pointer;
}
label.check input { width: 18px; height: 18px; accent-color: #222222; flex: none; }

/* form fields */
.field-label { font-size: 15px; margin-top: 20px; }
.text-input {
  width: 100%;
  border: 1px solid #CFCFCF;
  border-radius: 8px;
  background: #F7F7F7;
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  margin-top: 10px;
}
.text-input::placeholder { color: #9A9A9A; }

/* QR placeholder box (C-08) */
.qr-box {
  width: 216px;
  height: 216px;
  border: 1px solid #222222;
  margin: 28px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
  padding: 10px;
}
.qr-box canvas { width: 100%; height: 100%; display: none; }

/* parcel info lines (C-03/C-04/C-09...) */
.parcel { margin-top: 22px; }
.parcel .name { font-size: 18px; font-weight: 800; margin-bottom: 8px; }

footer {
  padding: 26px 40px 30px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

/* login screen (C-01, mirrors S-01) */
.app.login { background: #D6D6D6; box-shadow: 0 0 24px rgba(0, 0, 0, 0.12); }
.login-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 40px;
}
.login-title { font-size: 26px; font-weight: 800; text-align: center; margin-bottom: 44px; }
.login-input {
  width: 100%;
  border: 1px solid #C9C9C9;
  border-radius: 8px;
  background: #F2F2F2;
  padding: 13px 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  margin-bottom: 16px;
}
.login-input::placeholder { color: #9A9A9A; }
.login-btn { width: 42%; margin: 20px auto 0; }

/* ===== staff screens (S-01 – S-10, restored from client screenshots) ===== */
.app.staff { width: min(660px, 100%); background: #D9D9D9; box-shadow: 0 0 24px rgba(0, 0, 0, 0.12); }
.staff-main { flex: 1; padding: 18px 0 60px; }
.s-head { width: min(490px, 88%); margin: 0 auto; }
.back-link {
  display: inline-block;
  color: #1E6FE8;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  margin: 8px 0 6px;
}
.back-link:hover { text-decoration: underline; }
.staff-title { text-align: center; font-size: 28px; font-weight: 800; margin: 24px 0 40px; }
.s-wrap { width: min(410px, 80%); margin: 0 auto; }

.scan-panel {
  width: min(410px, 80%);
  margin: 0 auto;
  background: #EFEFEF;
  border-radius: 12px;
  height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9A9A9A;
  font-size: 16px;
}
.scan-panel.tall { height: 290px; }
.panel-caption { text-align: center; color: #8A8A8A; font-size: 15px; margin-top: 16px; }
.or-caption { text-align: center; font-size: 16px; margin: 36px 0 12px; }
.s-input {
  display: block;
  width: min(410px, 80%);
  margin: 14px auto 0;
  background: #F2F2F2;
  border: 1px solid #C9C9C9;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
}
.s-input::placeholder { color: #9A9A9A; }
.s-input.centered::placeholder { text-align: center; }
h2.s-section { text-align: center; font-size: 22px; font-weight: 800; margin: 46px 0 22px; }
.btn-green {
  display: block;
  margin: 28px auto 0;
  background: #5FC96A;
  color: #FFFFFF;
  border: 0;
  border-radius: 10px;
  padding: 13px 46px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  text-align: center;
}
.btn-green:hover { background: #53BD5E; }

/* dashboard (S-02) */
.dash-wrap { width: min(480px, 84%); margin: 0 auto; }
.dash-title { text-align: center; font-size: 30px; font-weight: 800; margin-top: 64px; }
.dash-welcome { text-align: center; color: #555555; font-size: 17px; margin: 10px 0 52px; }
.dash-btn {
  display: block;
  width: 100%;
  background: #E9EEFB;
  color: #4A72E8;
  border: 0;
  border-radius: 12px;
  padding: 18px;
  text-align: center;
  font-size: 16px;
  font-family: inherit;
  text-decoration: none;
  margin-bottom: 62px;
  cursor: pointer;
}
.dash-btn:hover { background: #DEE7FA; }
.logout-link { display: block; text-align: center; color: #E64C4C; font-size: 15px; text-decoration: none; margin-top: 40px; }
.logout-link:hover { text-decoration: underline; }

/* filter tabs (S-05) */
.tabs { display: flex; gap: 14px; justify-content: center; margin: 4px 0 36px; }
.tab { background: #EDEDED; color: #9A9A9A; border-radius: 4px; padding: 10px 20px; font-size: 15px; }
.tab.active { background: #6E6E6E; color: #FFFFFF; }
.tabs button.tab { border: 0; cursor: pointer; color: #555; }
.tabs button.tab.active { color: #fff; }
.tabs button.tab:hover { box-shadow: inset 0 0 0 2px #888; }
.slot-list { width: min(430px, 84%); margin: 0 auto; }
.slot-row { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; }
.slot-card { flex: 1; background: #FFFFFF; border-radius: 8px; padding: 12px 18px; }
.slot-card .time { font-weight: 700; font-size: 16px; }
.slot-card .sub { font-size: 14px; margin-top: 2px; }
.badge { flex: none; padding: 9px 18px; border-radius: 6px; color: #FFFFFF; font-weight: 700; font-size: 14px; }
.badge.upcoming { background: #3DA84A; }
.badge.inprogress { background: #2F7BE8; }
.badge.completed { background: #B9B9B9; }
.badge.noshow { background: #E5484D; }

/* white info cards (S-07 / S-08) */
.card-list { width: min(400px, 78%); margin: 0 auto; }
.info-card { background: #FFFFFF; border-radius: 8px; padding: 16px 20px 18px; margin-bottom: 30px; position: relative; }
.info-card .head { font-size: 16px; }
.info-card .line { font-size: 15px; margin-top: 4px; }
.status-ready { color: #3DA84A; }
.status-released { color: #9A9A9A; }
.status-unmatched { color: #E5484D; }
.overdue-red { color: #E5484D; }
.btn-contact {
  position: absolute;
  right: 16px;
  bottom: 14px;
  background: #6DBE77;
  color: #FFFFFF;
  border: 0;
  border-radius: 8px;
  padding: 8px 24px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
}
.search-input {
  display: block;
  width: min(400px, 78%);
  margin: 0 auto 36px;
  background: #F2F2F2;
  border: 1px solid #C9C9C9;
  border-radius: 8px;
  padding: 13px 14px;
  font-size: 15px;
  text-align: center;
  font-family: inherit;
}

/* issue handling (S-09) */
.issue-lines { width: min(490px, 88%); margin: 0 auto 8px; }
.issue-lines p { font-weight: 700; font-size: 16px; margin-bottom: 6px; }
.desc-card { background: #FFFFFF; border-radius: 8px; padding: 18px 20px; margin: 26px 0 18px; }
.desc-card .desc-label { font-weight: 700; font-size: 16px; margin-bottom: 4px; }
.notes-card { background: #F0F0F0; border-radius: 8px; padding: 28px 20px; text-align: center; font-size: 16px; margin-bottom: 30px; }
.btn-resolved {
  display: block;
  width: min(410px, 80%);
  margin: 0 auto 24px;
  background: #6E6BE5;
  color: #FFFFFF;
  border: 0;
  border-radius: 12px;
  padding: 20px;
  font-size: 16px;
  font-family: inherit;
  cursor: pointer;
}
.btn-close-issue {
  display: block;
  width: min(410px, 80%);
  margin: 0 auto;
  background: #6DB567;
  color: #FFFFFF;
  border: 0;
  border-radius: 12px;
  padding: 20px;
  font-size: 16px;
  font-family: inherit;
  cursor: pointer;
}

/* settings (S-10) */
.field-box {
  background: #FFFFFF;
  border-radius: 8px;
  padding: 14px 18px;
  margin: 0 auto 26px;
  width: min(400px, 78%);
  font-size: 16px;
}
.field-box .val { margin-top: 2px; }
.field-box .caret { font-size: 14px; margin-left: 10px; }

/* ===== admin screens (A-01 – A-08, restored from client screenshots) ===== */
.app.admin { width: min(1150px, 100%); background: #FFFFFF; }
.admin-main { flex: 1; padding: 26px 56px 56px; }
.admin-back {
  display: inline-block;
  color: #3333E8;
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  margin: 10px 0 2px;
}
.admin-back:hover { text-decoration: underline; }
.admin-title { text-align: center; font-size: 30px; font-weight: 800; margin: 4px 0 44px; }
.admin-title.align-left { text-align: left; }
.a-btn-green {
  display: inline-block;
  background: #7CC98B;
  color: #FFFFFF;
  border: 0;
  border-radius: 8px;
  padding: 12px 30px;
  font-size: 16px;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
}
.a-btn-green:hover { background: #6FBD7E; }
.a-btn-purple { background: #8178E8; color: #FFFFFF; }
.a-btn-purple:hover { background: #746BE0; }

/* A01 login */
.admin-login-title { text-align: center; font-size: 30px; font-weight: 800; margin: 72px 0 84px; }
.admin-login-form { margin-left: 9%; }
.a-input {
  display: block;
  width: min(440px, 100%);
  background: #D9D9D9;
  border: 0;
  border-radius: 3px;
  padding: 14px 16px;
  font-size: 16px;
  font-family: inherit;
  color: var(--ink);
  margin-bottom: 34px;
}
.a-input::placeholder { color: #8A8A8A; }
.admin-login-btn {
  display: block;
  width: min(370px, 100%);
  margin: 26px auto 0;
  text-align: center;
  font-size: 18px;
  padding: 14px 0;
}

/* A02 / A03 report pages */
.filter-row { display: flex; gap: 20px; margin-bottom: 26px; }
.filter-cell {
  flex: 1;
  background: #D9D9D9;
  border-radius: 6px;
  padding: 14px 0;
  text-align: center;
  font-size: 17px;
  cursor: pointer;
}
.filter-cell.active { background: #8178E8; color: #FFFFFF; }
a.filter-cell { text-decoration: none; color: var(--ink); }
a.filter-cell.active { color: #FFFFFF; }
.log-box {
  background: #D9D9D9;
  border-radius: 4px;
  min-height: 420px;
  padding: 24px 28px;
  color: #7A7A7A;
  font-size: 18px;
}
.log-box.bordered { border: 2px solid #2196F3; border-radius: 10px; }
.export-row { display: flex; justify-content: flex-end; margin-top: 28px; }

/* A04 / A05 stat tiles */
.select-date-btn { display: inline-block; align-self: flex-start; background: #D9D9D9; border: 0; border-radius: 8px; padding: 12px 34px; font-size: 17px; font-family: inherit; cursor: pointer; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-top: 56px; }
.stat-grid.two { grid-template-columns: repeat(2, 1fr); }
.stat-tile {
  background: #D9D9D9;
  border-radius: 8px;
  min-height: 115px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 17px;
  padding: 12px;
}
.stat-tile.align-left { display: block; padding: 26px 30px; text-align: left; }
.stat-tile.align-left .val { margin-top: 4px; }
.chart-box {
  border: 2px solid #2196F3;
  border-radius: 10px;
  background: #D9D9D9;
  min-height: 220px;
  padding: 22px 28px;
  color: #7A7A7A;
  font-size: 18px;
  margin-top: 46px;
}

/* A06 / A07 table pages */
.admin-head-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 44px; }
.admin-table { margin-top: 6px; }
.table-bar { background: #D9D9D9; border-radius: 8px; padding: 15px 20px; font-size: 17px; margin-bottom: 56px; }
.table-bar + .table-bar { margin-top: -34px; }
.table-bar.header { margin-bottom: 56px; }

/* A08 settings */
.settings-form { width: min(570px, 100%); margin: 0 auto; }
.settings-row { display: flex; align-items: center; margin-bottom: 32px; }
.settings-row .label { width: 130px; text-align: right; padding-right: 14px; font-size: 17px; flex: none; }
.settings-row .a-input { margin: 0; flex: 1; }
.settings-save-row { width: min(440px, 100%); margin: 30px 0 0 auto; text-align: right; }

/* Shared authentication, account controls and customer navigation. */
[hidden] { display: none !important; }
button, input, select { font: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid #2367ba; outline-offset: 3px; }
button:disabled { opacity: .6; cursor: wait; }
.auth-app { width: min(520px, 100%); }
.auth-header { padding: 28px 32px 0; display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.auth-header .logo { color: var(--ink); text-decoration: none; }
.auth-main { padding: 36px 32px; }
.account-form { display: flex; flex-direction: column; margin-top: 12px; }
.account-form label { font-size: 14px; font-weight: 600; margin: 18px 0 8px; }
.account-form input { width: 100%; padding: 12px 14px; border: 1px solid #bdbdbd; border-radius: 8px; background: #fafafa; color: var(--ink); }
.account-form .green, .dialog-actions .green { background: #337c3d; color: white; }
.account-form .green:hover, .dialog-actions .green:hover { background: #286332; }
.field-hint, .prototype-note { font-size: 12px; color: var(--muted); margin-top: 8px; }
.form-message { font-size: 14px; color: #a32020; margin-top: 14px; overflow-wrap: anywhere; }
.form-message:empty { display: none; }
.form-message.success { color: #276333; }
.auth-switch { text-align: center; margin-top: 24px; }
.auth-switch a { color: #286332; font-weight: 600; }
.demo-accounts { margin-top: 28px; padding: 14px; background: #f2f6f2; border-radius: 8px; font-size: 13px; }
.demo-accounts summary { cursor: pointer; font-weight: 600; }
.demo-accounts dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 14px 0; }
.demo-accounts dd { overflow-wrap: anywhere; }
.demo-accounts p { font-size: 13px; }
.prototype-note { margin-top: 20px; }
.language-control { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.language-control select { max-width: 100%; border: 1px solid #bdbdbd; background: #fff; border-radius: 6px; padding: 8px; color: var(--ink); }
.page-language { padding: 16px 24px 24px; }
.page-language .language-control { justify-content: center; }
.topbar { align-items: center; gap: 12px; }
.customer-menu { position: relative; flex: none; }
.menu-toggle { border: 0; padding: 10px 4px; background: transparent; cursor: pointer; }
.menu-panel { position: absolute; top: calc(100% + 8px); right: 0; width: min(238px, calc(100vw - 48px)); padding: 8px; background: #fff; border: 1px solid #ddd; border-radius: 10px; box-shadow: 0 8px 28px #0002; z-index: 10; }
.menu-panel a { display: block; padding: 12px; border-radius: 6px; color: var(--ink); text-decoration: none; font-size: 14px; }
.menu-panel a:hover, .menu-panel a[aria-current=page] { background: #edf5ed; color: #286332; }
.password-dialog { width: min(440px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); margin: auto; padding: 28px; border: 0; border-radius: 14px; box-shadow: 0 12px 60px #0004; overflow-y: auto; }
.password-dialog::backdrop { background: #0006; }
.password-dialog h2 { font-size: 22px; }
.dialog-actions { display: flex; gap: 12px; }
.dialog-actions .btn { flex: 1; }
.settings-message { width: min(400px, 100%); align-self: center; }
.account-toolbar { display: flex; justify-content: flex-end; gap: 24px; padding: 20px 28px 0; }
.account-toolbar a { color: #285c33; font-size: 14px; }
.account-actions { width: min(400px, 78%); margin: 0 auto; }
.settings-row .language-control { flex: 1; }
.field-error { color: #a32020; font-size: 13px; margin-top: 6px; }
.field-error:empty { display: none; }
[aria-invalid=true] { border-color: #a32020 !important; }
.staff .field-error { width: min(640px, 100%); margin: 8px auto 0; }
.app.staff { width: min(1180px, 100%); background: #f3f4f3; }
.staff-main { padding: 24px 40px 48px; }
.staff .s-head, .staff .issue-lines { width: 100%; }
.staff-title { margin: 20px 0 32px; text-align: left; }
.staff .back-link, .staff .account-toolbar a { min-height: 44px; display: inline-flex; align-items: center; }
.staff .dash-wrap { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.staff .dash-title { margin-top: 24px; }
.staff .dash-welcome { margin-bottom: 32px; }
.staff .dash-btn { margin: 0; min-height: 100px; display: flex; align-items: center; justify-content: center; font-weight: 600; }
.staff .logout-link { grid-column: 1 / -1; margin: 8px 0 0; min-height: 44px; }
.staff .card-list { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.staff .info-card { margin: 0; padding: 22px; border: 1px solid #e1e5e1; }
.staff .btn-contact { position: static; min-height: 44px; margin-top: 18px; }
.staff .slot-list { width: 100%; }
.staff .slot-row { gap: 24px; }
.staff .slot-card { padding: 20px 24px; }
.staff .badge { min-width: 130px; text-align: center; }
.staff .tabs { justify-content: flex-start; flex-wrap: wrap; }
.staff .tab { min-height: 44px; }
.staff .search-input { width: min(640px, 100%); min-height: 48px; text-align: left; }
.staff .scan-panel { width: 100%; background: #e6eae6; border: 2px dashed #b5bfb5; color: #526052; }
.staff .scan-panel.tall { width: min(720px, 100%); }
.staff .s-input { width: 100%; min-height: 48px; background: white; }
.staff .btn-green, .staff .btn-resolved, .staff .btn-close-issue { min-height: 48px; }
.staff .s-wrap { width: min(720px, 100%); }
.staff .field-box { width: min(640px, 100%); }
.staff .account-actions { width: min(640px, 100%); }
.intake-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.intake-panel { padding: 24px; background: white; border: 1px solid #e1e5e1; border-radius: 12px; }
.intake-panel .s-section { margin: 0 0 24px; font-size: 21px; text-align: left; }
.intake-panel .or-caption { margin: 24px 0 12px; }
.intake-panel label.or-caption { display: block; text-align: left; font-size: 14px; }
.settings-save-row { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 12px; }
.settings-row:has(.field-error:not(:empty)) { flex-wrap: wrap; }
.settings-row > .field-error { width: 100%; padding-left: 130px; }
@media (min-width: 1100px) { .staff .card-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .staff-main { padding: 20px 24px 36px; }
  .intake-grid, .staff .card-list, .staff .dash-wrap { grid-template-columns: 1fr; }
  .staff .slot-row { gap: 12px; flex-wrap: wrap; }
  .staff .slot-card { min-width: 160px; }
}
@media (max-width: 480px) {
  .admin-main { padding: 24px; }
  .settings-row { flex-wrap: wrap; gap: 10px; }
  .settings-row .label { text-align: left; width: 100%; }
  .settings-row .a-input { min-width: 0; width: 100%; }
  .settings-row .language-control span { display: none; }
  .settings-row > .field-error { padding-left: 0; }
  .filter-row { gap: 8px; flex-wrap: wrap; }
  .filter-cell { min-width: 110px; }
  .auth-header { padding: 24px 24px 0; }
  .auth-main { padding: 28px 24px; }
}
