/* LTS MyTime Mobile V1.0.0.2.0.0 — design system. Mobile-first, no CDNs.
   Walmart "Me" reference layout, LTS navy branding. */
:root {
    /* ---- Design tokens (Worker B depends on these exact names) ---- */
    --navy: #1F3A5F;
    --navy-dark: #152A44;
    --blue: #2f80ed;
    --green: #1a7f37;
    --green-bg: #e6f4ea;
    --amber: #9a6700;
    --amber-bg: #fef3e2;
    --red: #c5221f;
    --red-bg: #fdecea;
    --bg: #f1f3f6;
    --card: #fff;
    --text: #17202a;
    --muted: #5f6368;
    --border: #e2e5ea;
    /* ---- Legacy aliases (kept for older views) ---- */
    --navy-soft: #e8eef6;
    --ink: #17202a;
    --line: #e2e5ea;
    --blue-bg: #e7f0fd;
    --radius: 14px;
    --tabbar-h: 64px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 16px;
    line-height: 1.45;
    padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 12px);
}
.app { max-width: 520px; margin: 0 auto; min-height: 100dvh; }

/* ---------- App bar (navy sticky header) ---------- */
.appbar {
    position: sticky; top: 0; z-index: 20;
    background: var(--navy); color: #fff;
    min-height: 60px;
    padding: calc(6px + env(safe-area-inset-top, 0px)) 6px 6px;
    display: flex; align-items: center; gap: 2px;
    box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
.appbar .ttl {
    flex: 1; min-width: 0; text-align: center;
    font-weight: 700; font-size: 17px; letter-spacing: .2px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.iconbtn {
    position: relative; flex: none;
    width: 44px; height: 44px; border: 0; border-radius: 12px;
    background: transparent; color: #fff; font-size: 22px; line-height: 1;
    display: inline-flex; align-items: center; justify-content: center;
    text-decoration: none; cursor: pointer;
}
.iconbtn:active { background: rgba(255,255,255,.16); }
.iconbtn .dot {
    position: absolute; top: 5px; right: 5px;
    min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
    background: #e02424; color: #fff; font-size: 12px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.appbar .avatar { background: #fff; color: var(--navy); border: 2px solid rgba(255,255,255,.45); }
.appbar .spacer { width: 44px; flex: none; }

/* ---------- Bottom tab bar ---------- */
.tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    max-width: 520px; margin: 0 auto;
    display: flex;
    background: #fff; border-top: 1px solid var(--border);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -2px 10px rgba(0,0,0,.06);
}
.tab {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    min-height: var(--tabbar-h); text-decoration: none; color: var(--muted);
    font-size: 11.5px; font-weight: 600;
}
.tab .ico { font-size: 22px; line-height: 1; }
.tab.on { color: var(--navy); }
.tab.on .ico { transform: scale(1.12); }

/* ---------- Cards / layout ---------- */
.page { padding: 14px 14px 8px; }
.card {
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 16px; margin-bottom: 12px; box-shadow: 0 1px 3px rgba(31,58,95,.07);
}
.card h2, .card h3 { margin: 0 0 10px; font-size: 17px; color: var(--navy); }
.card h2 { font-size: 19px; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.card-h h2, .card-h h3 { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.row { display: flex; align-items: center; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.divider { height: 1px; background: var(--border); margin: 12px -16px; }
.secttl { font-size: 15px; font-weight: 800; color: var(--navy); margin: 18px 2px 10px; text-transform: uppercase; letter-spacing: .4px; }

/* ---------- Buttons (pill base) ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 48px; padding: 12px 22px; border-radius: 999px; border: 0;
    background: var(--navy); color: #fff; font-size: 16px; font-weight: 700;
    text-decoration: none; cursor: pointer; width: 100%;
}
.btn:active { background: var(--navy-dark); transform: scale(.99); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-outline { background: #fff; color: var(--navy); border: 2px solid var(--navy); }
.btn-outline:active { background: var(--navy-soft); }
.btn-green { background: var(--green); color: #fff; }
.btn-green:active { background: #136b2d; }
.btn-block { width: 100%; }
.btn.danger { background: var(--red); }
.btn.ok { background: var(--green); }
.btn.secondary { background: #fff; color: var(--navy); border: 2px solid var(--navy); }
.btn.sm { min-height: 44px; padding: 8px 16px; font-size: 14px; width: auto; }
.btn.linklike { background: none; color: var(--blue); width: auto; min-height: 44px; padding: 8px; font-weight: 600; border-radius: 8px; }
.clock-btn {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    width: 100%; min-height: 120px; border-radius: 20px; border: 0; cursor: pointer; color: #fff;
    font-size: 24px; font-weight: 800; letter-spacing: .3px;
    box-shadow: 0 6px 18px rgba(0,0,0,.16);
}
.clock-btn.in { background: linear-gradient(160deg, #1e8a4c, #146636); }
.clock-btn.out { background: linear-gradient(160deg, #c0452f, #96301f); }
.clock-btn:active { transform: scale(.98); }
.clock-btn .sub { font-size: 14px; font-weight: 500; opacity: .92; }
.clock-cta {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; min-height: 64px; border-radius: 999px; border: 0; cursor: pointer;
    background: var(--navy); color: #fff; font-size: 19px; font-weight: 800; letter-spacing: .3px;
    box-shadow: 0 6px 18px rgba(21,42,68,.35);
}
.clock-cta:active { background: var(--navy-dark); transform: scale(.99); }
.clock-cta.out { background: #a53a28; }
.clock-cta .sub { font-size: 13px; font-weight: 500; opacity: .85; }

/* ---------- Badges / chips ---------- */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.b-green { background: var(--green-bg); color: var(--green); }
.b-amber { background: var(--amber-bg); color: var(--amber); }
.b-red { background: var(--red-bg); color: var(--red); }
.b-blue { background: var(--blue-bg); color: var(--blue); }
.b-grey { background: #eef1f4; color: var(--muted); }
.b-navy { background: var(--navy-soft); color: var(--navy); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--navy-soft); color: var(--navy); font-size: 13px; font-weight: 600; }

/* ---------- Notices ---------- */
.notice { border-radius: var(--radius); padding: 12px 14px; margin-bottom: 12px; font-size: 14.5px; font-weight: 500; border: 1px solid; }
.notice.ok { background: var(--green-bg); border-color: #bfe3c9; color: #14532d; }
.notice.warn { background: var(--amber-bg); border-color: #f0df9e; color: #6b4e00; }
.notice.err { background: var(--red-bg); border-color: #f3c1c1; color: #7c1a1f; }
.notice.info { background: var(--blue-bg); border-color: #bcd4f5; color: #174a8b; }

/* ---------- Forms ---------- */
label.f { display: block; font-size: 14px; font-weight: 600; color: var(--navy); margin: 12px 0 6px; }
input[type=text], input[type=password], input[type=email], input[type=date], input[type=time], input[type=number], select, textarea {
    width: 100%; min-height: 48px; padding: 10px 12px; font-size: 16px; border: 1.5px solid var(--border);
    border-radius: 10px; background: #fff; color: var(--text); font-family: inherit;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--navy); border-color: var(--navy); }
textarea { min-height: 88px; resize: vertical; }
.checkrow { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 0; font-size: 15.5px; }
.checkrow input[type=checkbox] { width: 24px; height: 24px; accent-color: var(--navy); flex: none; }
fieldset.days { border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px 12px; margin: 10px 0; }
fieldset.days legend { font-size: 13px; font-weight: 700; color: var(--navy); padding: 0 6px; }
.daygrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.daygrid .checkrow { min-height: 44px; background: var(--bg); border-radius: 8px; padding: 4px 10px; }
.seg { display: flex; background: var(--navy-soft); border-radius: 12px; padding: 4px; gap: 4px; margin-bottom: 14px; }
.seg button { flex: 1; min-height: 44px; border: 0; border-radius: 9px; background: transparent; font-size: 15px; font-weight: 600; color: var(--navy); cursor: pointer; }
.seg button.on { background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.seg a { flex: 1; min-height: 44px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 600; color: var(--navy); text-decoration: none; }
.seg a.on { background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.15); }

/* ---------- Shift cards ---------- */
.shift { border: 1px solid var(--border); border-left: 5px solid var(--navy); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; background: #fff; }
.shift .t { font-weight: 700; font-size: 16px; color: var(--navy); }
.shift .meta { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.shift.today { border-left-color: var(--green); background: #fbfefc; }
.shift.calledoff { opacity: .75; border-left-color: var(--amber); }
.shiftcard {
    display: flex; gap: 12px; align-items: stretch;
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
    padding: 12px; margin-bottom: 10px; box-shadow: 0 1px 3px rgba(31,58,95,.07);
}
.daybadge {
    flex: none; width: 60px; border-radius: 12px; background: var(--navy); color: #fff;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 8px 4px; text-align: center;
}
.daybadge .d { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; opacity: .85; }
.daybadge .n { font-size: 22px; font-weight: 800; line-height: 1.15; }
.shiftcard .body { flex: 1; min-width: 0; }
.shiftcard .role { font-weight: 700; font-size: 15.5px; color: var(--text); }
.shiftcard .time { font-size: 14px; color: var(--navy); font-weight: 600; margin-top: 2px; }
.shiftcard .meta { font-size: 13px; color: var(--muted); margin-top: 4px; }
.shiftcard .tags { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- Week calendar (multi-week schedule) ---------- */
.wkgrid { margin-bottom: 12px; }
.wkrow { display: flex; align-items: stretch; gap: 4px; margin-bottom: 4px; }
.wkno {
    flex: none; width: 34px; display: flex; align-items: center; justify-content: center;
    font-size: 10.5px; font-weight: 700; color: var(--muted);
}
.wkrow .day {
    flex: 1; min-height: 56px; border: 1.5px solid var(--border); background: #fff; border-radius: 10px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    font-size: 11px; color: var(--muted); cursor: pointer; padding: 4px 0; text-decoration: none; gap: 1px;
}
.wkrow .day b { font-size: 16px; color: var(--text); }
.wkrow .day .dw { font-size: 10px; text-transform: uppercase; letter-spacing: .3px; }
.wkrow .day.has { border-color: var(--green); }
.wkrow .day.has b { color: var(--green); }
.wkrow .day.today { background: var(--navy); border-color: var(--navy); color: #cfe0f4; }
.wkrow .day.today b { color: #fff; }
.wkrow .day.today.has { border-color: var(--navy); }
.wkrow .day.today.has b { color: #fff; }
.wkrow .day.sel { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; }
.wkrow .day .pips { display: flex; gap: 2px; }
.wkrow .day .pips i { width: 5px; height: 5px; border-radius: 50%; background: var(--green); }

/* ---------- Week strip (legacy) ---------- */
.weekstrip { display: flex; gap: 6px; margin-bottom: 12px; }
.wday { flex: 1; min-height: 56px; border: 1.5px solid var(--border); background: #fff; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 12px; color: var(--muted); cursor: pointer; padding: 4px 0; }
.wday b { font-size: 16px; color: var(--text); }
.wday.has { border-color: var(--navy); }
.wday.has b { color: var(--navy); }
.wday.today { background: var(--navy); border-color: var(--navy); color: #cfe0f4; }
.wday.today b { color: #fff; }

/* ---------- Bottom action sheet ---------- */
.sheet-scrim {
    position: fixed; inset: 0; z-index: 40; background: rgba(15,25,40,.5);
    opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.sheet {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 41;
    max-width: 520px; margin: 0 auto;
    background: #fff; border-radius: 20px 20px 0 0;
    padding: 8px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    transform: translateY(105%); transition: transform .25s ease;
    box-shadow: 0 -6px 24px rgba(0,0,0,.2);
    max-height: 82dvh; overflow-y: auto;
}
.sheet.open { transform: translateY(0); }
.sheet-scrim.open { opacity: 1; pointer-events: auto; }
.sheet-h {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 10px 0 6px; font-size: 17px; font-weight: 800; color: var(--navy);
    position: sticky; top: 0; background: #fff;
}
.sheet-h .iconbtn { color: var(--navy); }
.sheet-grab { width: 44px; height: 5px; border-radius: 3px; background: var(--border); margin: 4px auto 2px; }
.sheet-item {
    display: flex; align-items: center; gap: 12px; width: 100%;
    min-height: 60px; padding: 10px 4px; border: 0; border-bottom: 1px solid var(--border);
    background: none; text-align: left; cursor: pointer; font-size: 16px; color: var(--text);
    text-decoration: none; font-family: inherit;
}
.sheet-item .lbl { font-weight: 600; }
.sheet-item .sub { display: block; font-size: 13px; font-weight: 400; color: var(--muted); }
.sheet-item .go { margin-left: auto; color: var(--muted); flex: none; }
.sheet-item.danger .lbl { color: var(--red); }
.sheet-cancel {
    width: 100%; min-height: 52px; margin-top: 10px; border-radius: 999px; border: 0;
    background: var(--bg); color: var(--navy); font-size: 16px; font-weight: 700; cursor: pointer;
}

/* ---------- Menu list ---------- */
.mlist a { display: flex; align-items: center; gap: 14px; padding: 14px 4px; text-decoration: none; color: var(--text); font-size: 16px; font-weight: 600; min-height: 56px; border-bottom: 1px solid var(--border); }
.mlist a:last-child { border-bottom: 0; }
.mlist .ico { width: 40px; height: 40px; border-radius: 12px; background: var(--navy-soft); color: var(--navy); display: flex; align-items: center; justify-content: center; font-size: 20px; flex: none; }
.mlist .chev { margin-left: auto; color: var(--muted); }
.mlist .sub { display: block; font-size: 13px; font-weight: 400; color: var(--muted); }
.lst { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 12px; }
.lst a, .lst button.lstrow {
    display: flex; align-items: center; gap: 14px; width: 100%;
    min-height: 60px; padding: 12px 16px; text-decoration: none; color: var(--text);
    font-size: 16px; font-weight: 600; border: 0; border-bottom: 1px solid var(--border);
    background: #fff; cursor: pointer; font-family: inherit; text-align: left;
}
.lst a:last-child, .lst button.lstrow:last-child { border-bottom: 0; }
.lst .ico { width: 40px; height: 40px; border-radius: 12px; background: var(--navy-soft); color: var(--navy); display: flex; align-items: center; justify-content: center; font-size: 20px; flex: none; }
.lst .chev { margin-left: auto; color: var(--muted); flex: none; }
.lst .sub { display: block; font-size: 13px; font-weight: 400; color: var(--muted); }
.lst .trail { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.lst .nbadge { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--red); color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }

/* ---------- Avatar ---------- */
.avatar {
    width: 44px; height: 44px; border-radius: 50%; flex: none;
    background: var(--navy); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 17px; font-weight: 800; text-decoration: none; letter-spacing: .5px;
}
.avatar.lg { width: 64px; height: 64px; font-size: 24px; }

/* ---------- Detail rows ---------- */
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 15px; }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--muted); }
.kv .v { font-weight: 600; text-align: right; }

/* ---------- Hero (navy clock card) ---------- */
.hero {
    background: linear-gradient(160deg, var(--navy), var(--navy-dark)); color: #fff;
    border: 0; border-radius: 20px; padding: 20px; margin-bottom: 12px;
    box-shadow: 0 8px 22px rgba(21,42,68,.35);
}
.hero .status { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; opacity: .85; }
.hero .big { font-size: 26px; font-weight: 800; margin: 2px 0 4px; }
.hero .sub { font-size: 14px; opacity: .85; }
.hero .badge { background: rgba(255,255,255,.16); color: #fff; }
.hero a.link { color: #fff; font-weight: 600; font-size: 14.5px; }
.hero .clock-cta { margin-top: 14px; }

/* ---------- Footer ---------- */
.footer { text-align: center; color: var(--muted); font-size: 12.5px; padding: 18px 14px 8px; }
.footer a { color: var(--muted); text-decoration: none; }
.footer .ver { font-weight: 600; }
.verfoot { text-align: center; font-size: 11px; color: var(--muted); padding: 10px 14px 4px; opacity: .85; }
.verfoot a { color: var(--muted); text-decoration: none; }

/* ---------- Legacy top bar (kept for compatibility) ---------- */
.topbar {
    position: sticky; top: 0; z-index: 20;
    background: var(--navy); color: #fff;
    padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
    display: flex; align-items: center; gap: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
.topbar .brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; flex: 1; min-width: 0; }
.topbar .brand img { width: 34px; height: 34px; border-radius: 8px; background: #fff; padding: 3px; }
.bell { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; color: #fff; text-decoration: none; font-size: 22px; }
.bell .dot { position: absolute; top: 6px; right: 6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #e02424; color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.tabbar nav { max-width: 520px; margin: 0 auto; display: flex; }
.tabbar nav a, .tabbar > a.legacy {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    min-height: var(--tabbar-h); text-decoration: none; color: var(--muted); font-size: 11.5px; font-weight: 600;
}
.tabbar nav a .ico { font-size: 22px; line-height: 1; }
.tabbar nav a.on { color: var(--navy); }

/* ---------- Install gate ---------- */
.install-hero { background: linear-gradient(160deg, var(--navy), var(--navy-dark)); color: #fff; border-radius: 20px; padding: 28px 22px; text-align: center; margin-bottom: 14px; }
.install-hero img { width: 84px; height: 84px; border-radius: 20px; background: #fff; padding: 8px; margin-bottom: 12px; }
.install-hero h1 { margin: 0 0 6px; font-size: 22px; }
.install-hero p { margin: 0; opacity: .88; font-size: 14.5px; }
.step { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 15px; }
.step:last-child { border-bottom: 0; }
.step .n { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.oslabel { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; color: var(--navy); font-size: 16px; margin-bottom: 4px; }

/* ---------- Misc ---------- */
.greet { font-size: 22px; font-weight: 800; color: var(--navy); margin: 2px 0 12px; }
.empty { text-align: center; color: var(--muted); padding: 22px 10px; font-size: 14.5px; }
details.disc { border: 1px solid var(--border); border-radius: 12px; margin-bottom: 10px; background: #fff; overflow: hidden; }
details.disc summary { min-height: 52px; display: flex; align-items: center; gap: 10px; padding: 10px 14px; font-weight: 700; color: var(--navy); cursor: pointer; list-style: none; font-size: 15.5px; }
details.disc summary::-webkit-details-marker { display: none; }
details.disc .body { padding: 2px 14px 16px; border-top: 1px solid var(--border); }
.aup { background: #fff8e1; border: 2px solid #e6c200; border-radius: 12px; padding: 12px 14px; font-size: 13px; color: #5c4a00; margin-bottom: 14px; }
.sessdata { font-size: 12px; color: var(--muted); margin-top: 14px; }
.errbox { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 14px; margin-top: 12px; }
.errbox pre { white-space: pre-wrap; word-break: break-word; font-size: 12px; background: #f6f8fb; padding: 10px; border-radius: 8px; max-height: 320px; overflow: auto; }
.loginwrap { max-width: 520px; margin: 0 auto; padding: 24px 16px 40px; }
.loginlogo { text-align: center; margin-bottom: 18px; }
.loginlogo img { width: 76px; height: 76px; border-radius: 18px; }
.loginlogo .t { font-size: 22px; font-weight: 800; color: var(--navy); margin-top: 8px; }
.stafflink { display: block; text-align: center; margin-top: 18px; font-size: 13px; color: var(--muted); text-decoration: none; min-height: 44px; padding: 10px; }
