/* MANDA Jobs: the free app for invited trade businesses (24 Oct 2026). Phone first: one column, big taps, nothing that scrolls sideways.
   Same look as MANDA Network (navy and gold, Playfair Display and DM Sans). */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --navy: #1E3259; --navy-deep: #0E1A36; --navy-mid: #2A4A8A; --gold: #C8A96E; --gold-dark: #9E7A3A; --gold-lt: #FBF4E6;
  --surface: #F4F7FC; --card: #fff; --border: #D8E2F3; --text: #1C2D50; --text-soft: #5B6B90; --text-dim: #8794B3;
  --err: #C2262E; --err-bg: #FEF2F2; --ok: #15803D; --ok-bg: #F0FDF4; --warn: #B45309; --warn-bg: #FFFBEB; --urgent: #C2262E;
  --r: 18px; --shadow: 0 4px 22px rgba(14, 26, 54, .10);
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
}
html, body { height: 100%; }
body { font-family: 'DM Sans', -apple-system, system-ui, sans-serif; font-size: 15px; line-height: 1.45; color: var(--text); background: var(--navy-deep); -webkit-text-size-adjust: 100%; overflow-x: hidden; }
button, input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: var(--navy-mid); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
[hidden] { display: none !important; }

#app { min-height: 100%; display: flex; flex-direction: column; max-width: 640px; margin: 0 auto; background: var(--surface); position: relative; }
.bar { background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%); color: #fff; padding: calc(12px + var(--safe-t)) 16px 14px; display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 20; }
.bar .mark { width: 34px; height: 34px; flex: none; }
.bar .name { font-family: 'Playfair Display', serif; font-size: 19px; font-weight: 600; letter-spacing: .2px; line-height: 1.1; }
.bar .name small { display: block; font-family: 'DM Sans', sans-serif; font-size: 11px; font-weight: 500; letter-spacing: .6px; text-transform: uppercase; color: var(--gold); margin-top: 2px; }
.bar .sp { flex: 1; min-width: 0; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; padding: 5px 10px; border-radius: 999px; background: rgba(255,255,255,.14); color: #fff; white-space: nowrap; }
.chip.good { background: #DCFCE7; color: #166534; } .chip.warn { background: #FEF3C7; color: #92400E; } .chip.bad { background: #FEE2E2; color: #991B1B; }
main { flex: 1; padding: 14px 14px calc(92px + var(--safe-b)); }
.screen-pad { padding: 28px 18px; }

/* the sign-in card and the plain message screens */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); margin-bottom: 12px; }
.center { text-align: center; }
.big-ico { width: 64px; height: 64px; border-radius: 50%; margin: 4px auto 12px; display: flex; align-items: center; justify-content: center; font-size: 30px; background: var(--gold-lt); color: var(--gold-dark); }
.big-ico.good { background: #ECFDF5; color: #059669; } .big-ico.bad { background: var(--err-bg); color: var(--err); }
h1 { font-family: 'Playfair Display', serif; font-size: 23px; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
h2 { font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--text-dim); margin: 18px 4px 8px; }
p.soft, .soft { color: var(--text-soft); font-size: 14px; }
.field { margin-bottom: 12px; text-align: left; }
.field label { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--text-soft); margin-bottom: 5px; }
.field input, .field textarea { width: 100%; padding: 13px 14px; border-radius: 12px; border: 1.5px solid var(--border); background: #fff; min-height: 48px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(200,169,110,.2); }
.msg { font-size: 13px; min-height: 18px; margin: 4px 0 8px; text-align: center; }
.msg.err { color: var(--err); }

.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 50px; padding: 12px 16px; border-radius: 14px; border: none; font-weight: 700; font-size: 15px; background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: #fff; text-decoration: none; }
.btn:disabled { opacity: .6; cursor: default; }
.btn.ghost { background: #fff; color: var(--navy); border: 1.5px solid var(--border); }
.btn.green { background: linear-gradient(135deg, #22A455, #15803D); }
.btn.small { min-height: 42px; width: auto; padding: 9px 16px; font-size: 14px; }
.btn.danger-ghost { background: #fff; color: var(--err); border: 1.5px solid #F3C4C6; }
.row { display: flex; gap: 10px; } .row > * { flex: 1; min-width: 0; }
.link { background: none; border: none; color: var(--gold-dark); text-decoration: underline; text-underline-offset: 3px; font-weight: 600; padding: 10px; }

/* a job */
.job { background: var(--card); border: 1px solid var(--border); border-radius: var(--r); padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow); position: relative; }
.job.urgent { border-color: #F3C4C6; box-shadow: 0 4px 22px rgba(194, 38, 46, .12); }
.job-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.trade-ico { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex: none; }
.job-title { font-weight: 700; font-size: 16px; color: var(--navy); line-height: 1.2; }
.job-sub { font-size: 12.5px; color: var(--text-soft); }
.badge { font-size: 10.5px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; }
.badge.urgent { background: var(--err-bg); color: var(--urgent); } .badge.new { background: var(--gold-lt); color: var(--gold-dark); }
.badge.accepted { background: #FEF3C7; color: #92400E; } .badge.on_the_way { background: #DBEAFE; color: #1E40AF; } .badge.completed { background: #DCFCE7; color: #166534; } .badge.cancelled { background: #F3F4F6; color: #4B5563; }
.kinds { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.kind { font-size: 12px; font-weight: 600; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px; color: var(--text-soft); }
.desc { font-size: 15px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.where { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--text-soft); margin: 10px 0 12px; }
.contact { margin: 10px 0 4px; padding: 12px 14px; border-radius: 14px; background: var(--gold-lt); border: 1px solid #E8D5A8; display: flex; flex-direction: column; gap: 8px; }
.contact a { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; color: var(--navy); min-height: 40px; }
.contact i { font-size: 20px; color: var(--gold-dark); width: 24px; text-align: center; }
.contact .who { font-size: 12.5px; color: var(--text-soft); font-weight: 500; }
.note { font-style: italic; color: var(--text-soft); font-size: 13.5px; margin-top: 8px; }
.banner { display: flex; gap: 10px; align-items: flex-start; border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; font-size: 13.5px; line-height: 1.45; background: var(--warn-bg); border: 1px solid #FDE68A; color: #78350F; }
.banner.bad { background: var(--err-bg); border-color: #FECACA; color: #7F1D1D; } .banner.good { background: var(--ok-bg); border-color: #BBF7D0; color: #14532D; }
.banner i { font-size: 20px; margin-top: 1px; }
.empty { text-align: center; padding: 34px 18px; color: var(--text-soft); }
.empty .big-ico { margin-bottom: 14px; }
.sec-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.sec-row:last-child { border-bottom: none; }
.sec-row b { display: block; font-size: 15px; } .sec-row span { font-size: 13px; color: var(--text-soft); display: block; }
.switch { position: relative; width: 52px; height: 30px; flex: none; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; margin: 0; }
.switch .track { position: absolute; inset: 0; border-radius: 999px; background: #CBD5E1; transition: background .15s; pointer-events: none; }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .15s; }
.switch input:checked + .track { background: #16A34A; } .switch input:checked + .track::after { transform: translateX(22px); }
.switch input:focus-visible + .track { outline: 3px solid var(--gold); outline-offset: 2px; }
dl.kv { display: grid; grid-template-columns: 1fr; gap: 2px; } dl.kv dt { font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--text-dim); margin-top: 10px; } dl.kv dd { font-size: 15px; overflow-wrap: anywhere; }
.steps { list-style: none; counter-reset: s; } .steps li { counter-increment: s; display: flex; gap: 12px; padding: 8px 0; font-size: 14.5px; }
.steps li::before { content: counter(s); flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; }

/* the bottom bar */
nav.tabs { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 640px; z-index: 30; display: flex; background: #fff; border-top: 1px solid var(--border); padding-bottom: var(--safe-b); box-shadow: 0 -4px 20px rgba(14,26,54,.08); }
nav.tabs button { flex: 1; min-height: 62px; background: none; border: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11.5px; font-weight: 700; color: var(--text-dim); position: relative; }
nav.tabs button i { font-size: 23px; } nav.tabs button.on { color: var(--navy); } nav.tabs button.on i { color: var(--gold-dark); }
nav.tabs .count { position: absolute; top: 6px; left: calc(50% + 8px); min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--urgent); color: #fff; font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; }

/* sheets and the toast */
.sheet-bg { position: fixed; inset: 0; z-index: 60; background: rgba(14,26,54,.6); display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: #fff; width: 100%; max-width: 640px; border-radius: 24px 24px 0 0; padding: 20px 18px calc(20px + var(--safe-b)); max-height: 90vh; overflow-y: auto; }
.sheet h3 { font-family: 'Playfair Display', serif; font-size: 20px; color: var(--navy); margin-bottom: 6px; }
.sheet .row { margin-top: 14px; }
.toast { position: fixed; left: 50%; bottom: calc(80px + var(--safe-b)); transform: translateX(-50%) translateY(20px); z-index: 80; background: var(--navy-deep); color: #fff; padding: 12px 18px; border-radius: 14px; font-size: 14px; max-width: min(92vw, 520px); box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; text-align: center; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.lock { position: fixed; inset: 0; z-index: 100; background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; text-align: center; }
.lock .btn { max-width: 320px; } .lock .link { color: var(--gold); }
.spin { width: 28px; height: 28px; border: 3px solid var(--border); border-top-color: var(--gold-dark); border-radius: 50%; animation: sp .8s linear infinite; margin: 40px auto; }
@keyframes sp { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 2s; } .toast, .switch .track, .switch .track::after { transition: none; } }
