:root {
  --bg: #F3F1EA; --card: #FFFFFF; --ink: #16202E; --muted: #586273; --line: #DAD6CB; --line2: #C9C4B6;
  --primary: #1D4ED8; --primary-soft: #E8EEFC; --warn: #8A3D06; --warn-soft: #FCE9D2; --warn-line: #E9B77E;
  --ok: #14532D; --ok-soft: #DDF3E4; --danger: #9B1C1C;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: Inter, system-ui, sans-serif; font-size: 16px; line-height: 1.4; -webkit-text-size-adjust: 100%; }
h1, h2, h3 { font-family: 'Space Grotesk', Inter, sans-serif; margin: 0; line-height: 1.1; }
h1 { font-size: 32px; } h2 { font-size: 20px; } h3 { font-size: 17px; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: default; }
a { color: var(--primary); }
.loading { padding: 40px; text-align: center; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; }
.err { background: #FDECEC; border: 1px solid #F1B5B5; color: var(--danger); padding: 12px 14px; border-radius: 12px; font-weight: 600; }
.note { background: var(--primary-soft); border: 1px solid #BFD0F7; padding: 12px 14px; border-radius: 12px; }

/* Buttons */
.btn { min-height: 48px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line2); background: var(--card); font-weight: 600; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.big { min-height: 60px; font-size: 18px; font-weight: 700; border-radius: 14px; width: 100%; }
.btn.ghost { background: transparent; }
.btn.sm { min-height: 40px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.btn.danger { color: var(--danger); }
.link { background: none; border: 0; padding: 12px 6px; text-decoration: underline; font-weight: 600; }

/* Forms */
label.f { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=search], select, textarea {
  min-height: 48px; border-radius: 12px; border: 1px solid var(--line2); background: #fff; padding: 10px 14px; width: 100%; font-weight: 500;
}
textarea { min-height: 120px; font-family: ui-monospace, Menlo, monospace; font-size: 14px; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid #7AA2F7; outline-offset: 2px; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 600; min-height: 44px; }
.check input { width: 22px; height: 22px; }

/* Brand */
.brand { display: flex; align-items: center; gap: 10px; font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 18px; letter-spacing: .02em; }
.brand img { width: 40px; height: 40px; border-radius: 10px; object-fit: contain; background: #fff; border: 1px solid var(--line); }
.lang { display: flex; border: 1px solid var(--line2); border-radius: 999px; overflow: hidden; }
.lang button { border: 0; background: #fff; min-height: 44px; padding: 0 14px; font-weight: 600; font-size: 14px; }
.lang button[aria-pressed=true] { background: var(--ink); color: #fff; }

/* Worker (phone) */
.phone { max-width: 480px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; padding: 20px 18px 24px; display: flex; flex-direction: column; gap: 16px; }
.phone .bottom { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding-top: 10px; }
.names { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.tile { min-height: 64px; border-radius: 14px; border: 1px solid var(--line); background: #fff; font-weight: 600; font-size: 17px; padding: 8px; }
.tile[aria-pressed=true], .opt[aria-pressed=true] { border: 2px solid var(--primary); background: var(--primary-soft); }
.opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.opt { min-height: 68px; border-radius: 14px; border: 1px solid var(--line); background: #fff; font-weight: 700; font-size: 17px; padding: 8px 12px; }
.joblist { display: flex; flex-direction: column; gap: 8px; }
.joblist .opt { text-align: left; min-height: 60px; font-weight: 600; }
.caps { font-size: 13px; font-weight: 700; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.chip { flex: none; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line2); background: #fff; font-weight: 600; font-size: 14px; }
.chip[aria-pressed=true] { background: var(--ink); border-color: var(--ink); color: #fff; }
.seg { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line2); border-radius: 12px; overflow: hidden; }
.seg button { border: 0; background: #fff; min-height: 48px; font-weight: 700; }
.seg button[aria-pressed=true] { background: var(--ink); color: #fff; }
.items { display: flex; flex-direction: column; gap: 8px; }
.item { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.item.on { border: 2px solid var(--primary); }
.item .nm { font-weight: 700; font-size: 17px; }
.item .left { font-size: 14px; color: var(--muted); }
.badge-low { display: inline-block; font-size: 13px; font-weight: 700; color: var(--warn); background: var(--warn-soft); border-radius: 6px; padding: 2px 8px; }
.stepper { display: flex; align-items: center; gap: 8px; flex: none; }
.stepper button { width: 48px; height: 48px; border-radius: 12px; border: 1px solid var(--line2); background: #fff; font-size: 24px; font-weight: 700; line-height: 1; }
.stepper button.plus { background: var(--primary); border-color: var(--primary); color: #fff; }
.stepper .n { width: 34px; text-align: center; font-size: 22px; font-weight: 700; }
.stepper .n.zero { color: var(--muted); }
.boxbtn { margin-top: 6px; min-height: 36px; padding: 0 10px; border-radius: 8px; border: 1px dashed #8A8576; background: transparent; font-size: 13px; font-weight: 600; }
.sticky { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--bg) 22%); padding: 22px 0 6px; display: flex; gap: 10px; }

.screen-ok { background: var(--ok); color: #fff; }
.screen-ok .card { color: var(--ink); }
.screen-ok .sub { color: var(--ok-soft); }
.screen-ok .btn.ghost { color: #fff; border: 2px solid #fff; }
.screen-ok .link { color: #fff; }
.screen-ok .box2 { background: #0F3F22; border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.screen-ok .box2 .caps { color: var(--ok-soft); }
.screen-warn { background: var(--warn-soft); }
.hero { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding-top: 16px; }
.hero h1 { font-size: 38px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.line { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.line b { font-size: 18px; }
.sep { height: 1px; background: #E4E0D6; }

/* Landing + admin */
.page { max-width: 1180px; margin: 0 auto; padding: 24px 18px 60px; display: flex; flex-direction: column; gap: 20px; }
.narrow { max-width: 460px; }
.top { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.tabs button { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-weight: 600; font-size: 15px; }
.tabs button[aria-pressed=true] { background: var(--ink); border-color: var(--ink); color: #fff; }
.banner { background: var(--warn-soft); border: 1px solid var(--warn-line); border-radius: 16px; padding: 18px 20px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; color: #6B2F05; }
.banner.good { background: var(--ok-soft); border-color: #A9D9B8; color: var(--ok); }
.banner h2 { font-size: 22px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; align-items: start; }
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { text-align: left; font-size: 13px; font-weight: 600; color: var(--muted); padding: 8px 8px; white-space: nowrap; }
td { padding: 10px 8px; border-top: 1px solid #E4E0D6; vertical-align: middle; }
td.num, th.num { text-align: right; }
td.acts { white-space: nowrap; text-align: right; }
tr.off td { color: var(--muted); }
tr.undone td { text-decoration: line-through; color: var(--muted); }
.pill { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 6px; padding: 2px 8px; }
.pill.order { background: var(--warn-soft); color: var(--warn); }
.pill.good { background: var(--ok-soft); color: var(--ok); }
.pill.blocked { background: #FDECEC; color: var(--danger); }
.formgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.logo-prev { width: 72px; height: 72px; border-radius: 14px; border: 1px solid var(--line); background: #fff; object-fit: contain; }
.linkbox { font-family: ui-monospace, Menlo, monospace; font-size: 15px; background: #fff; border: 1px solid var(--line2); border-radius: 12px; padding: 12px 14px; word-break: break-all; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600; z-index: 10; max-width: 90vw; }

/* Large, simple worker screens */
.phone { font-size: 19px; gap: 18px; }
.phone h1 { font-size: 34px; }
.phone .caps { font-size: 15px; }
.phone .opts { grid-template-columns: 1fr; gap: 12px; }
.phone .opt { min-height: 78px; font-size: 22px; text-align: left; padding: 10px 20px; }
.phone .names { grid-template-columns: 1fr 1fr; gap: 12px; }
.phone .tile { min-height: 76px; font-size: 21px; }
.phone .btn.big { min-height: 68px; font-size: 21px; }
.phone .link { font-size: 18px; min-height: 48px; }
.phone .item { padding: 14px 16px; }
.phone .item .nm { font-size: 21px; }
.phone .item .left { font-size: 16px; }
.phone .badge-low { font-size: 15px; }
.phone .stepper button { width: 58px; height: 58px; font-size: 30px; }
.phone .stepper .n { width: 40px; font-size: 28px; }
.phone .boxbtn { min-height: 44px; font-size: 16px; }
.phone .bigf { font-size: 26px; font-family: 'Space Grotesk', Inter, sans-serif; font-weight: 700; gap: 12px; line-height: 1.15; }
.phone .bigf input { min-height: 68px; font-size: 22px; font-family: Inter, sans-serif; border-width: 2px; }
.phone .line b { font-size: 21px; }
.phone .hero h1 { font-size: 44px; }
.phone .sticky .btn { min-height: 68px; font-size: 19px; }

.trial { background: var(--warn-soft); color: #6B2F05; border-bottom: 1px solid var(--warn-line); text-align: center; font-weight: 700; font-size: 15px; padding: 8px 12px; }
.banner.bad { background: #FDECEC; border-color: #F1B5B5; color: var(--danger); }

/* Laptop and desktop: worker screens use the wider space */
@media (min-width: 900px) {
  .phone { max-width: 860px; padding: 36px 32px 40px; }
  .phone .names { grid-template-columns: repeat(4, 1fr); }
  .phone .opts { grid-template-columns: 1fr 1fr; }
  .phone .items { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .phone .bottom { max-width: 420px; width: 100%; align-self: center; }
  .phone .sticky { max-width: 520px; width: 100%; align-self: center; }
  .phone .hero + .card, .phone .box2, .phone .card { max-width: 520px; width: 100%; align-self: center; }
  .phone form.stack { max-width: 520px; width: 100%; align-self: center; }
  .phone .bigf { max-width: 520px; }
}

/* ===== Professional admin look (manager panel + landing). Worker phone screens keep the large style. ===== */
.page {
  --bg: #F6F7F9; --line: #E3E6EB; --line2: #D0D5DD; --muted: #667085; --ink: #101828; --primary: #1F3A5F; --primary-soft: #EAF0F7;
  font-size: 14px; max-width: 1240px; gap: 16px; padding: 20px 28px 56px;
}
body:has(.page) { background: #F6F7F9; }
.page h1, .page h2, .page h3 { font-family: Inter, system-ui, sans-serif; letter-spacing: -.01em; }
.page h1 { font-size: 24px; font-weight: 700; }
.page h2 { font-size: 15px; font-weight: 650; }
.page .brand { font-family: Inter, system-ui, sans-serif; font-size: 16px; font-weight: 650; letter-spacing: 0; }
.page .brand img { width: 32px; height: 32px; border-radius: 6px; }
.page .top { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.page .btn { min-height: 36px; padding: 0 14px; border-radius: 8px; font-size: 14px; font-weight: 550; box-shadow: 0 1px 1px rgba(16,24,40,.04); }
.page .btn.primary { background: var(--primary); border-color: var(--primary); }
.page .btn.dark { background: var(--ink); border-color: var(--ink); }
.page .btn.big { min-height: 44px; font-size: 15px; border-radius: 8px; width: auto; }
.page .btn.sm { min-height: 30px; padding: 0 10px; font-size: 13px; border-radius: 6px; }
.page .btn.danger { color: #B42318; border-color: #F1C0BB; }
.page .btn:hover { filter: brightness(.97); }
.page .lang { border-radius: 8px; }
.page .lang button { min-height: 32px; padding: 0 12px; font-size: 13px; }
.page .tabs { gap: 0; border-bottom: 1px solid var(--line); width: 100%; }
.page .tabs button { min-height: 40px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; padding: 0 16px; font-size: 14px; font-weight: 550; color: var(--muted); margin-bottom: -1px; }
.page .tabs button[aria-pressed=true] { background: transparent; color: var(--ink); border-bottom-color: var(--primary); }
.page .tabs button:hover { color: var(--ink); }
.page .card { border-radius: 10px; padding: 18px 20px; box-shadow: 0 1px 2px rgba(16,24,40,.05); gap: 12px; }
.page .banner { border-radius: 8px; padding: 10px 14px; gap: 10px; }
.page .banner h2 { font-size: 14px; font-weight: 600; }
.page .banner .btn { min-height: 32px; }
.page .banner.good { background: #ECFDF3; border-color: #ABEFC6; color: #067647; }
.page .banner:not(.good):not(.bad) { background: #FFFAEB; border-color: #FEDF89; color: #93370D; }
.page .banner.bad { background: #FEF3F2; border-color: #FECDCA; color: #B42318; }
.page .err { border-radius: 8px; font-weight: 500; font-size: 14px; }
.page .note { border-radius: 8px; }
.page label.f { font-size: 13px; font-weight: 550; color: #344054; gap: 5px; }
.page input[type=text], .page input[type=email], .page input[type=password], .page input[type=number], .page input[type=date], .page input[type=search], .page select, .page textarea {
  min-height: 38px; border-radius: 8px; padding: 7px 12px; font-size: 14px; border-color: var(--line2);
}
.page textarea { min-height: 100px; }
.page input:focus-visible, .page select:focus-visible, .page textarea:focus-visible, .page button:focus-visible { outline: 2px solid #9DB6D6; outline-offset: 1px; }
.page .check { min-height: 32px; font-weight: 500; font-size: 14px; }
.page .check input { width: 16px; height: 16px; }
.page .chip { min-height: 30px; padding: 0 10px; font-size: 12.5px; font-weight: 550; border-radius: 6px; }
.page .chip[aria-pressed=true] { background: var(--primary); border-color: var(--primary); }
.page .grid2 { gap: 16px; }
.page .stack { gap: 16px; }
.page table { font-size: 13.5px; }
.page th { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 8px 10px; border-bottom: 1px solid var(--line); background: #FAFBFC; }
.page td { padding: 9px 10px; border-top: 1px solid #EEF0F3; }
.page tbody tr:hover td { background: #FAFBFC; }
.page .pill { font-size: 11.5px; border-radius: 999px; padding: 2px 9px; font-weight: 600; }
.page .pill.order { background: #FFFAEB; color: #B54708; }
.page .pill.good { background: #ECFDF3; color: #067647; }
.page .pill.blocked { background: #FEF3F2; color: #B42318; }
.page .logo-prev { width: 56px; height: 56px; border-radius: 8px; }
.page .linkbox { font-size: 13.5px; border-radius: 8px; padding: 9px 12px; background: #F9FAFB; }
.page .formgrid { gap: 12px; }
.page .toast { border-radius: 8px; font-weight: 500; font-size: 14px; }
.page .muted.small, .page .small { font-size: 13px; }
.trial { font-size: 13px; padding: 7px 12px; font-weight: 600; }

/* ===== Phone fit: nothing may leave the screen ===== */
html, body { max-width: 100%; overflow-x: hidden; }
.phone { width: 100%; overflow-x: hidden; }
.phone > * { min-width: 0; max-width: 100%; }
.item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 10px; }
.item > div:first-child { min-width: 0; }
.item .nm { overflow-wrap: anywhere; line-height: 1.15; }
.phone .item .nm { font-size: 19px; }
.phone .item .left, .phone .badge-low { font-size: 14px; }
.stepper { gap: 6px; }
@media (max-width: 430px) {
  .phone { padding: 14px 14px 20px; font-size: 18px; }
  .phone .stepper button { width: 50px; height: 50px; font-size: 26px; }
  .phone .stepper .n { width: 30px; font-size: 24px; }
  .phone .item { padding: 12px; }
  .phone .names { gap: 10px; }
  .phone .opt { font-size: 20px; }
}
