:root {
  --bg: #faf9f5;
  --surface: #ffffff;
  --surface-2: #f4f2ec;
  --line: #e7e3da;
  --line-2: #d9d4c8;
  --ink: #2f2c26;
  --ink-2: #5c574e;
  --muted: #948e82;
  --accent: #3b74d4;
  --accent-2: #2a59ad;
  --accent-soft: #e2ebfa;
  --accent-softer: #f1f5fc;
  --green-bg: #e3f4e7; --green-fg: #1f7a3d;
  --amber-bg: #fdf0d8; --amber-fg: #9a6a13;
  --blue-bg: #e2ebfa; --blue-fg: #2a59ad;
  --red-bg: #fbe4e2; --red-fg: #b3322a;
  --grey-bg: #ececec; --grey-fg: #6b6b6b;
  --r: 14px; --r-lg: 18px;
  --shadow: 0 1px 3px rgba(40,36,28,.06), 0 6px 18px rgba(40,36,28,.05);
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; }
.icon { flex: none; }
.muted { color: var(--muted); font-size: 14px; padding: 6px 0; }
.hint { color: var(--amber, #b45309); font-size: 13px; padding: 6px 2px 0; }

/* buttons + fields */
.btn { font: inherit; font-weight: 700; border: 1px solid var(--line-2); background: var(--surface);
  color: var(--ink); border-radius: var(--r); padding: 11px 16px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:disabled { opacity: .6; }
.btn-block { width: 100%; justify-content: center; padding: 14px; font-size: 15px; }
.iconbtn { border: 1px solid var(--line); background: var(--surface); border-radius: 12px;
  width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer; color: var(--ink-2); }
.label { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink-2); margin: 12px 0 6px; }
.field-wrap { position: relative; }
.field { width: 100%; font: inherit; padding: 12px 14px 12px 42px; border: 1px solid var(--line-2);
  border-radius: var(--r); background: var(--surface); color: var(--ink); }
.field:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-softer); }
.field-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.field-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  border: none; background: none; color: var(--accent-2); font-weight: 700; font-size: 13px; cursor: pointer; }

/* card */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }

/* brand */
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.brand-logo { width: 50px; height: 50px; border-radius: 15px; background: var(--accent); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 24px; }
.brand-logo.sm { width: 34px; height: 34px; border-radius: 10px; font-size: 17px; }
.brand-name { font-size: 19px; font-weight: 800; line-height: 1; }
.brand-sub { font-size: 12px; color: var(--muted); font-weight: 700; margin-top: 3px; }

/* login */
.login-screen { min-height: 100dvh; display: grid; place-items: center; padding: 28px 20px;
  background: linear-gradient(180deg, var(--accent-softer), var(--bg) 40%); }
.login-wrap { width: 100%; max-width: 410px; }
.login-h1 { font-size: 27px; font-weight: 800; letter-spacing: -.02em; }
.login-p { color: var(--ink-2); font-size: 15px; margin: 6px 0 22px; line-height: 1.5; }
.login-card { padding: 20px; }
.login-err { background: var(--red-bg); color: var(--red-fg); font-size: 13.5px; font-weight: 600;
  padding: 10px 12px; border-radius: 10px; margin: 14px 0 4px; }
.login-card .btn-block { margin-top: 18px; }
.login-note { display: flex; gap: 9px; align-items: center; margin-top: 16px; padding: 11px 13px;
  border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line);
  color: var(--ink-2); font-size: 13px; line-height: 1.45; }

/* app shell */
.app { max-width: 760px; margin: 0 auto; min-height: 100dvh; }
.app.has-nav { padding-bottom: 76px; }

/* bottom tab nav */
.bottomnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; max-width: 760px; margin: 0 auto;
  display: flex; background: var(--surface); border-top: 1px solid var(--line);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 18px rgba(40,36,28,.05); }
.navtab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; background: none;
  border: none; cursor: pointer; color: var(--muted); font-size: 11px; font-weight: 700; padding: 6px 0; border-radius: 10px; }
.navtab.on { color: var(--accent-2); }

/* profile */
.profile-card { display: flex; align-items: center; gap: 14px; padding: 16px; }
.profile-avatar { width: 52px; height: 52px; border-radius: 14px; background: var(--accent); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 20px; flex: none; }
.profile-name { font-size: 17px; font-weight: 800; }
.profile-sub { color: var(--muted); font-size: 13px; font-weight: 600; }
.stat-row { display: flex; gap: 10px; margin-top: 14px; }
.stat { flex: 1; background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px; text-align: center; box-shadow: var(--shadow); }
.stat-n { font-size: 24px; font-weight: 800; color: var(--accent-2); }
.stat-l { font-size: 12px; color: var(--ink-2); font-weight: 700; margin-top: 2px; }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: var(--bg); border-bottom: 1px solid var(--line); }
.brand-mini { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.screen-pad { padding: 16px; }
.screen-title { font-size: 22px; font-weight: 800; margin-bottom: 14px; }
.search-box { padding-left: 14px; margin-bottom: 16px; }
.empty { color: var(--muted); padding: 30px 0; text-align: center; }
.error-box { background: var(--red-bg); color: var(--red-fg); padding: 12px 14px; border-radius: 12px; margin-bottom: 12px; }

/* job list */
.job-section { margin-bottom: 18px; }
.job-section-h { font-size: 13px; font-weight: 800; color: var(--ink-2); text-transform: uppercase;
  letter-spacing: .04em; margin-bottom: 9px; display: flex; align-items: center; gap: 8px; }
.job-section-h .count { background: var(--surface-2); color: var(--muted); border-radius: 99px;
  padding: 1px 9px; font-size: 12px; }
.job-card { display: block; width: 100%; text-align: left; cursor: pointer; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow);
  padding: 14px; margin-bottom: 10px; }
.job-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.job-card-title { font-size: 16px; font-weight: 800; letter-spacing: -.01em; }
.job-card-sub { display: flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 13px; margin-top: 3px; }
.job-card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag { background: var(--accent-soft); color: var(--accent-2); font-size: 12px; font-weight: 700;
  border-radius: 8px; padding: 4px 9px; display: inline-flex; align-items: center; gap: 5px; }
.tag-quiet { background: var(--surface-2); color: var(--ink-2); }
.tag-entity { background: transparent; color: var(--ink-2); border: 1px solid var(--line-2); font-weight: 800; }

/* My Jobs date-window filter (Today / This week / This month / All) */
.range-tabs { display: flex; gap: 8px; margin-bottom: 16px; overflow-x: auto; }
.range-tab { font-size: 13px; font-weight: 700; border-radius: 99px; padding: 7px 14px; white-space: nowrap;
  background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line-2); cursor: pointer; }
.range-tab.on { background: var(--accent); color: #fff; border-color: var(--accent); }

/* chips */
.chip { font-size: 12px; font-weight: 800; border-radius: 99px; padding: 3px 10px; white-space: nowrap; }
.chip-blue { background: var(--blue-bg); color: var(--blue-fg); }
.chip-amber { background: var(--amber-bg); color: var(--amber-fg); }
.chip-green { background: var(--green-bg); color: var(--green-fg); }
.chip-red { background: var(--red-bg); color: var(--red-fg); }
.chip-grey { background: var(--grey-bg); color: var(--grey-fg); }

/* detail */
.detail-bar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; background: var(--bg); border-bottom: 1px solid var(--line); }
.detail-bar-title { flex: 1; min-width: 0; }
.detail-prop { font-size: 17px; font-weight: 800; letter-spacing: -.01em; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.detail-sub { display: flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 13px; margin-top: 1px; }
.section-card { margin-bottom: 14px; overflow: hidden; }
.section-h { display: flex; align-items: center; gap: 9px; padding: 13px 15px 11px; border-bottom: 1px solid var(--line); }
.section-h h3 { font-size: 15.5px; font-weight: 800; }
.section-ic { width: 28px; height: 28px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-2);
  display: grid; place-items: center; }
.section-body { padding: 6px 15px 12px; }
.datarow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0;
  border-bottom: 1px solid var(--line); }
.datarow:last-child { border-bottom: none; }
.datarow-l { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-2); font-size: 13.5px; font-weight: 600; }
.datarow-v { font-size: 14px; font-weight: 700; text-align: right; }
.notes { line-height: 1.6; color: var(--ink-2); font-size: 14.5px; padding: 4px 0; }

/* linen */
.linen-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; }
.linen-cell { border: 1px solid var(--line); background: var(--surface-2); border-radius: 12px;
  text-align: center; padding: 10px; opacity: .6; }
.linen-cell.on { border-color: var(--accent-soft); background: var(--accent-softer); opacity: 1; }
.linen-n { font-size: 21px; font-weight: 800; color: var(--muted); }
.linen-cell.on .linen-n { color: var(--accent-2); }
.linen-l { font-size: 12px; font-weight: 700; color: var(--ink-2); margin-top: 2px; }
.linen-total { display: flex; justify-content: space-between; align-items: center; margin-top: 12px;
  padding-top: 11px; border-top: 1px dashed var(--line-2); font-weight: 700; color: var(--ink-2); }
.linen-total b { font-size: 16px; color: var(--ink); }

/* banner */
.banner { display: flex; align-items: center; gap: 9px; padding: 11px 14px; border-radius: 12px;
  font-size: 14px; font-weight: 700; margin-bottom: 14px; }
.banner-amber { background: var(--amber-bg); color: var(--amber-fg); }
.banner-green { background: var(--green-bg); color: var(--green-fg); }

/* photos */
.photo-section-label { font-size: 13px; font-weight: 800; color: var(--ink-2); margin-bottom: 8px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.photo-tile { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--line); background: var(--surface-2); }
.photo-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-ph { width: 100%; height: 100%; background: var(--surface-2); }
.photo-del { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border: none;
  border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; display: grid; place-items: center; cursor: pointer; }
.photo-add { aspect-ratio: 1; border: 1.5px dashed var(--line-2); border-radius: 12px; background: var(--surface-2);
  color: var(--ink-2); display: grid; place-items: center; gap: 3px; font-size: 12px; font-weight: 700; cursor: pointer; }
.photo-add.accent { background: var(--accent-softer); color: var(--accent-2); border-color: var(--accent-soft); }
.photo-add:disabled { opacity: .6; }

/* sticky action bar */
.action-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--surface);
  border-top: 1px solid var(--line); padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 18px rgba(40,36,28,.06); }
.action-bar .btn-block { max-width: 760px; margin: 0 auto; }

/* bottom sheet */
.sheet-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(20,18,14,.4);
  display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 600px; background: var(--bg); border-radius: 20px 20px 0 0;
  max-height: 92dvh; display: flex; flex-direction: column; animation: sheet-up .18s ease-out; }
@keyframes sheet-up { from { transform: translateY(20px); opacity: .6; } to { transform: none; opacity: 1; } }
.sheet-h { display: flex; align-items: center; justify-content: space-between; padding: 16px;
  border-bottom: 1px solid var(--line); }
.sheet-h h3 { font-size: 17px; font-weight: 800; }
.sheet-body { padding: 16px; overflow-y: auto; }
.sheet-label { font-size: 12.5px; font-weight: 800; color: var(--ink-2); margin: 16px 0 8px; }
.sheet-foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.toggle { width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 15px 16px; border: 1.5px solid var(--line-2); border-radius: var(--r); background: var(--surface);
  color: var(--ink-2); font: inherit; cursor: pointer; }
.toggle.on { border-color: var(--green-fg); background: var(--green-bg); color: var(--green-fg); }
.toggle-label { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 800; }
.toggle-box { width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--line-2);
  display: grid; place-items: center; color: #fff; }
.toggle.on .toggle-box { background: var(--green-fg); border-color: var(--green-fg); }
.textarea { padding: 12px 14px; min-height: 84px; resize: vertical; font-family: inherit; }
.switch { width: 44px; height: 26px; border-radius: 99px; background: var(--line-2); position: relative; flex: none; transition: background .15s; }
.toggle.on .switch { background: var(--accent); }
.switch-knob { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 99px; background: #fff; transition: left .15s; }
.switch-knob.on { left: 21px; }
.pop { animation: sheet-up .15s ease-out; }

/* spinner */
.spinner-wrap { display: grid; place-items: center; padding: 60px 0; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line-2); border-top-color: var(--accent);
  border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
