:root {
  --purple: #534AB7;
  --purple-dark: #3C3489;
  --purple-soft: #EEEDFE;
  --purple-line: #DCD9FA;
  --lime: #97C459;
  --lime-soft: #E4F2D3;
  --lime-ink: #2F5A0E;
  --lime-deep: #1E3A08;
  --amber-soft: #FAEEDA;
  --amber-ink: #633806;
  --red-soft: #FCEBEB;
  --red-ink: #A32D2D;
  --ink: #1E1A4D;
  --sub: #5B5880;
  --line: #E6E4F5;
  --bg: #F7F6FD;
  --card: #FFFFFF;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: Inter, system-ui, sans-serif;
  color: var(--ink);
  background: #ECEAF8;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--purple); }

.app {
  max-width: 480px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  position: relative;
}
.loading { margin: auto; color: var(--sub); }

.page { flex: 1; padding: calc(28px + env(safe-area-inset-top)) 20px 24px; display: flex; flex-direction: column; gap: 16px; }
.page.with-nav { padding-bottom: 96px; }

h1, h2, h3, .display { font-family: Manrope, Inter, sans-serif; letter-spacing: -0.3px; margin: 0; }
h1 { font-size: 30px; font-weight: 800; line-height: 1.15; }
h2 { font-size: 24px; font-weight: 800; }
h3 { font-size: 17px; font-weight: 700; }
.muted { color: var(--sub); }
.small { font-size: 13px; }
p { margin: 0; line-height: 1.5; }

.logo { display: inline-flex; align-items: center; gap: 6px; font-family: Manrope, sans-serif; font-weight: 800; font-size: 28px; letter-spacing: -1px; color: var(--purple); }
.logo::after { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--lime); margin-top: 10px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 20px; border-radius: 16px; border: none; cursor: pointer;
  font-family: Manrope, sans-serif; font-weight: 700; font-size: 16px; text-decoration: none;
  background: var(--purple); color: #fff; width: 100%;
}
.btn:hover { background: var(--purple-dark); }
.btn:disabled { opacity: .6; cursor: default; }
.btn.secondary { background: #fff; color: var(--purple-dark); border: 1.5px solid var(--purple-line); }
.btn.secondary:hover { background: var(--purple-soft); }
.btn.lime { background: var(--lime); color: var(--lime-deep); }
.btn.lime:hover { background: #86B44A; }
.btn.danger { background: #fff; color: var(--red-ink); border: 1.5px solid #F2CACA; }
.btn.small { min-height: 42px; font-size: 14px; border-radius: 12px; padding: 0 14px; }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.choice {
  display: flex; align-items: center; gap: 16px; padding: 20px; border-radius: 20px; text-align: left;
  background: #fff; color: var(--ink); border: 1.5px solid var(--purple-line); cursor: pointer; width: 100%;
}
.choice.primary { background: var(--purple); color: #fff; border-color: var(--purple); }
.choice .ic { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--purple-soft); color: var(--purple); }
.choice.primary .ic { background: var(--lime); color: var(--lime-deep); }
.choice .t { font-family: Manrope, sans-serif; font-weight: 700; font-size: 19px; display: block; }
.choice .s { font-size: 14px; color: var(--sub); display: block; margin-top: 3px; }
.choice.primary .s { color: #DCD9FA; }

.pill { display: inline-flex; align-items: center; font-size: 13px; padding: 5px 11px; border-radius: 999px; background: var(--purple-soft); color: var(--purple-dark); }
.pill.lime { background: var(--lime-soft); color: var(--lime-ink); }
.pill.amber { background: var(--amber-soft); color: var(--amber-ink); }
.pill.red { background: var(--red-soft); color: var(--red-ink); }
.pill.gray { background: #F1EFE8; color: #444441; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chip { flex-shrink: 0; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--purple-line); background: #fff; color: var(--purple-dark); font-weight: 500; font-size: 14px; cursor: pointer; }
.chip.on { background: var(--purple); border-color: var(--purple); color: #fff; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; }
.pad { padding: 14px 16px; }

.shift { display: block; width: 100%; text-align: left; padding: 0; overflow: hidden; cursor: pointer; color: var(--ink); }
.shift-head { background: var(--purple); color: #fff; padding: 9px 14px; display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 600; }
.shift-head .urgent { background: var(--lime); color: var(--lime-deep); font-size: 12px; padding: 2px 8px; border-radius: 6px; }
.shift-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.venue { font-family: Manrope, sans-serif; font-weight: 700; font-size: 16px; }
.pay { font-family: Manrope, sans-serif; font-weight: 800; font-size: 18px; color: var(--purple); white-space: nowrap; }
.pay small { font-size: 12px; font-weight: 500; color: var(--sub); }
.tags { display: flex; gap: 6px; flex-wrap: wrap; font-size: 12px; }
.tag { background: var(--purple-soft); color: var(--purple-dark); padding: 3px 8px; border-radius: 6px; }
.tag.gray { background: #F1EFE8; color: #444441; }

.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.avatar { width: 44px; height: 44px; border-radius: 14px; background: var(--purple); color: #fff; font-family: Manrope, sans-serif; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.avatar.round { border-radius: 50%; background: var(--purple-soft); color: var(--purple-dark); font-family: Inter, sans-serif; font-weight: 600; }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.stat b { display: block; font-family: Manrope, sans-serif; font-size: 22px; }
.stat span { font-size: 12px; color: var(--sub); }
.stat.hi { background: var(--lime-soft); border-color: var(--lime-soft); color: var(--lime-ink); }
.stat.hi span { color: var(--lime-ink); }

.section-title { font-size: 13px; font-weight: 600; color: var(--sub); margin-top: 4px; }
.empty { text-align: center; padding: 28px 16px; color: var(--sub); border: 1.5px dashed var(--purple-line); border-radius: 18px; background: #fff; }
.empty b { display: block; color: var(--ink); font-family: Manrope, sans-serif; font-size: 17px; margin-bottom: 4px; }

form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--sub); }
.field input, .field select, .field textarea {
  height: 48px; border-radius: 12px; border: 1.5px solid var(--purple-line); background: #fff; padding: 0 14px;
  font-size: 16px; font-weight: 500; color: var(--ink); width: 100%;
}
.field textarea { height: 90px; padding: 12px 14px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px var(--purple-soft); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; font-weight: 500; color: var(--ink); line-height: 1.4; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--purple); flex-shrink: 0; margin: 0; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: #fff; border: 1.5px solid var(--purple-line); border-radius: 14px; padding: 4px; gap: 4px; }
.seg button { border: none; background: none; border-radius: 10px; min-height: 42px; font-weight: 600; cursor: pointer; color: var(--sub); }
.seg button.on { background: var(--purple); color: #fff; }
.error { background: var(--red-soft); color: var(--red-ink); padding: 10px 12px; border-radius: 12px; font-size: 14px; }

.mode { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.mode.on { border: 2px solid var(--purple); }
.mode .t { font-weight: 600; font-size: 15px; display: block; }
.mode .s { font-size: 12px; color: var(--sub); display: block; margin-top: 2px; }
.mode.off .t { color: var(--sub); }
.radio { width: 20px; height: 20px; border-radius: 50%; border: 6px solid var(--purple); flex-shrink: 0; }

.nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px;
  display: flex; justify-content: space-around; background: #fff; border-top: 1px solid var(--line);
  padding: 8px 8px calc(10px + env(safe-area-inset-bottom)); z-index: 10;
}
.nav button { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 72px; min-height: 48px; justify-content: center; background: none; border: none; cursor: pointer; font-size: 12px; color: var(--sub); }
.nav button.on { color: var(--purple); font-weight: 600; }

.sheet-bg { position: fixed; inset: 0; background: rgba(30, 26, 77, .45); z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 480px; max-height: 92vh; overflow-y: auto; background: var(--bg); border-radius: 24px 24px 0 0; }
.sheet-hero { background: var(--purple); color: #fff; padding: 20px 20px 22px; border-radius: 24px 24px 24px 24px; display: flex; flex-direction: column; gap: 12px; }
.sheet-hero .close { align-self: flex-end; width: 40px; height: 40px; border-radius: 12px; border: none; background: #6A62C7; color: #fff; cursor: pointer; font-size: 20px; }
.sheet-hero .meta { color: #DCD9FA; font-size: 14px; }
.sheet-body { padding: 18px 20px calc(24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; }
.kv { padding: 4px 16px; }
.kv div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid #EFEEF8; font-size: 15px; }
.kv div:last-child { border-bottom: none; }
.kv span:first-child { color: var(--sub); }
.kv span:last-child { font-weight: 600; text-align: right; }
.earn { display: flex; justify-content: space-between; align-items: center; background: var(--purple-soft); border-radius: 14px; padding: 14px 16px; color: var(--purple-dark); font-size: 14px; }
.earn b { font-family: Manrope, sans-serif; font-size: 20px; color: var(--purple); }

.applicant { display: flex; flex-direction: column; gap: 10px; }
.applicant .who { display: flex; gap: 12px; align-items: center; }

.toast { position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 14px; font-size: 14px; z-index: 30; max-width: 90%; text-align: center; }
.foot { font-size: 12px; color: var(--sub); text-align: center; line-height: 1.5; }
.link-btn { background: none; border: none; color: var(--purple); font-weight: 600; cursor: pointer; padding: 4px; font-size: 15px; }

@media (min-width: 520px) {
  .app { margin: 24px auto; min-height: calc(100vh - 48px); border-radius: 28px; overflow: hidden; box-shadow: 0 8px 40px rgba(30, 26, 77, .08); }
  .nav { bottom: 24px; border-radius: 0 0 28px 28px; }
}
