/* Staff app (PWA) — sits on top of cb.css */
body.st { background: var(--cb-bg); min-height: 100vh; overscroll-behavior-y: contain; }
.st-app { max-width: 560px; margin: 0 auto; min-height: 100vh; padding-bottom: calc(76px + env(safe-area-inset-bottom)); }

.st-bar {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: rgba(243, 245, 250, .94); backdrop-filter: blur(10px);
}
.st-bar .st-bar-title { font-size: 18px; font-weight: 700; margin: 0; line-height: 1.2; }
.st-bar .st-bar-sub { font-size: 12.5px; color: var(--cb-muted); }
.st-bar .st-bar-end { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.st-back { width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--cb-line); background: #fff; display: inline-flex; align-items: center; justify-content: center; color: var(--cb-ink); flex: none; }

.st-main { padding: 6px 16px 20px; }

.st-tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: #fff; border-top: 1px solid var(--cb-line);
  padding-bottom: env(safe-area-inset-bottom);
}
.st-tabbar nav { max-width: 560px; margin: 0 auto; display: flex; height: 64px; }
.st-tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--cb-muted); }
.st-tabbar a i { font-size: 19px; }
.st-tabbar a.active { color: var(--cb-primary); }
.st-tabbar a.st-fab i { width: 48px; height: 48px; border-radius: 16px; background: var(--cb-primary); color: #fff; display: flex; align-items: center; justify-content: center; margin-top: -20px; box-shadow: 0 8px 18px rgba(29, 63, 196, .35); font-size: 20px; }

/* Shift hero */
.st-hero { background: linear-gradient(160deg, #1d3fc4 0%, #2a50e0 55%, #3b63f0 100%); color: #fff; border-radius: 22px; padding: 18px; box-shadow: 0 14px 30px rgba(29, 63, 196, .28); position: relative; overflow: hidden; }
.st-hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: rgba(255, 255, 255, .08); }
.st-hero .st-hero-top { display: flex; align-items: center; gap: 10px; font-size: 13px; opacity: .92; position: relative; z-index: 1; }
.st-hero .st-clock { font-size: 40px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; margin-top: 10px; font-variant-numeric: tabular-nums; position: relative; z-index: 1; }
.st-hero .st-date { font-size: 14px; opacity: .85; position: relative; z-index: 1; }
.st-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .16); font-size: 12.5px; font-weight: 600; color: #fff; }
.st-pill.is-in { background: #22c55e; }
.st-pill.is-done { background: rgba(255, 255, 255, .25); }

.st-punch { margin-top: 16px; position: relative; z-index: 1; }
.st-punch-btn {
  width: 100%; border: 0; border-radius: 16px; padding: 16px; font-size: 18px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 10px;
  background: #fff; color: var(--cb-primary); box-shadow: 0 6px 16px rgba(0, 0, 0, .12); transition: transform .08s ease, opacity .2s;
}
.st-punch-btn:active { transform: scale(.98); }
.st-punch-btn.is-out { background: #fff; color: var(--cb-red); }
.st-punch-btn:disabled { opacity: .6; }
.st-geo { margin-top: 10px; font-size: 13px; display: flex; align-items: center; gap: 8px; min-height: 20px; position: relative; z-index: 1; }
.st-geo .st-geo-dot { width: 9px; height: 9px; border-radius: 50%; background: #fbbf24; flex: none; box-shadow: 0 0 0 4px rgba(251, 191, 36, .25); }
.st-geo.is-inside .st-geo-dot { background: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, .3); }
.st-geo.is-outside .st-geo-dot { background: #f87171; box-shadow: 0 0 0 4px rgba(248, 113, 113, .3); }
.st-timer { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 14px; position: relative; z-index: 1; }
.st-timer > div { background: rgba(255, 255, 255, .13); border-radius: 12px; padding: 8px 10px; }
.st-timer small { display: block; font-size: 11px; opacity: .8; text-transform: uppercase; letter-spacing: .05em; }
.st-timer b { font-size: 16px; font-variant-numeric: tabular-nums; }
.st-note { background: rgba(255, 255, 255, .14); border-radius: 12px; padding: 10px 12px; font-size: 13.5px; margin-top: 14px; position: relative; z-index: 1; }

/* Quick actions */
.st-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0; }
.st-quick a { background: #fff; border: 1px solid var(--cb-line); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 8px; color: var(--cb-ink); box-shadow: var(--cb-shadow); }
.st-quick a i { width: 36px; height: 36px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; font-size: 16px; }
.st-quick a b { font-size: 14.5px; }
.st-quick a small { color: var(--cb-muted); font-size: 12px; margin-top: -6px; }
.st-ico-credit { background: var(--cb-green-50); color: var(--cb-green); }
.st-ico-debit { background: var(--cb-red-50); color: var(--cb-red); }
.st-ico-blue { background: var(--cb-primary-50); color: var(--cb-primary); }
.st-ico-violet { background: var(--cb-violet-50); color: var(--cb-violet); }

.st-section-title { display: flex; align-items: center; justify-content: space-between; margin: 18px 2px 10px; }
.st-section-title h2 { font-size: 15px; margin: 0; }
.st-section-title a { font-size: 13px; font-weight: 600; }

/* Day rows (attendance) */
.st-days { background: #fff; border: 1px solid var(--cb-line); border-radius: 16px; overflow: hidden; box-shadow: var(--cb-shadow); }
.st-day { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--cb-line-2); }
.st-day:last-child { border-bottom: 0; }
.st-day .st-day-date { width: 44px; text-align: center; flex: none; border-radius: 12px; background: var(--cb-line-2); padding: 5px 0; }
.st-day .st-day-date b { display: block; font-size: 17px; line-height: 1.1; }
.st-day .st-day-date small { display: block; font-size: 10.5px; color: var(--cb-muted); text-transform: uppercase; font-weight: 600; }
.st-day.is-today .st-day-date { background: var(--cb-primary-50); color: var(--cb-primary); }
.st-day .st-day-main { flex: 1; min-width: 0; }
.st-day .st-day-times { font-weight: 600; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.st-day .st-day-meta { font-size: 12.5px; color: var(--cb-muted); display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 2px; }
.st-day .st-day-total { text-align: right; font-weight: 700; font-size: 14px; white-space: nowrap; }

/* Entries */
.st-entry { background: #fff; border: 1px solid var(--cb-line); border-radius: 16px; padding: 12px 14px; margin-bottom: 10px; box-shadow: var(--cb-shadow); }
.st-entry-top { display: flex; align-items: flex-start; gap: 10px; }
.st-entry-top .st-entry-ico { width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex: none; }
.st-entry-top .st-entry-main { flex: 1; min-width: 0; }
.st-entry-top .st-entry-title { font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-entry-top .st-entry-sub { font-size: 12.5px; color: var(--cb-muted); }
.st-entry-amt { font-weight: 700; font-size: 16px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.st-entry-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.st-entry-foot .cb-thumbs img { width: 52px; height: 52px; }

/* Entry form */
.st-type { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.st-type label { position: relative; margin: 0; }
.st-type input { position: absolute; opacity: 0; }
.st-type span { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 10px; border: 2px solid var(--cb-line); border-radius: 16px; background: #fff; font-weight: 700; cursor: pointer; text-align: center; }
.st-type span small { font-weight: 500; color: var(--cb-muted); font-size: 12px; }
.st-type span i { font-size: 20px; }
.st-type .is-credit input:checked + span { border-color: var(--cb-green); background: var(--cb-green-50); color: var(--cb-green); }
.st-type .is-debit input:checked + span { border-color: var(--cb-red); background: var(--cb-red-50); color: var(--cb-red); }
.st-amount { position: relative; }
.st-amount span { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); font-size: 26px; font-weight: 700; color: var(--cb-muted); }
.st-amount input { font-size: 30px !important; font-weight: 700; padding-left: 40px; min-height: 64px; border-radius: 16px; font-variant-numeric: tabular-nums; }
.st-photos { display: flex; flex-wrap: wrap; gap: 10px; }
.st-photo-add { width: 84px; height: 84px; border: 2px dashed #c3cadc; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--cb-muted); font-size: 11.5px; font-weight: 600; cursor: pointer; background: #fff; }
.st-photo-add i { font-size: 20px; color: var(--cb-primary); }
.st-photo { width: 84px; height: 84px; border-radius: 14px; overflow: hidden; position: relative; border: 1px solid var(--cb-line); }
.st-photo img { width: 100%; height: 100%; object-fit: cover; }
.st-photo button { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(17, 26, 51, .7); color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.st-acc-list { margin-top: 6px; background: #fff; border: 1px solid var(--cb-line); border-radius: 12px; max-height: 260px; overflow-y: auto; display: none; }
.st-acc-list button { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 10px; border: 0; background: transparent; padding: 11px 14px; text-align: left; font-size: 14.5px; border-bottom: 1px solid var(--cb-line-2); }
.st-acc-list button:last-child { border-bottom: 0; }
.st-acc-list button:hover, .st-acc-list button:focus { background: var(--cb-primary-50); }
.st-acc-picked { display: none; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--cb-primary); background: var(--cb-primary-50); border-radius: 12px; font-weight: 600; color: var(--cb-primary); }
.st-acc-picked button { margin-left: auto; border: 0; background: transparent; color: var(--cb-primary); font-weight: 600; font-size: 13px; }
.st-submit { position: sticky; bottom: calc(72px + env(safe-area-inset-bottom)); padding-top: 10px; background: linear-gradient(to top, var(--cb-bg) 70%, transparent); }

/* Install banner */
.st-install { display: none; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--cb-line); border-radius: 14px; padding: 10px 12px; margin-bottom: 12px; box-shadow: var(--cb-shadow); font-size: 13.5px; }
.st-install.show { display: flex; }
.st-install img { width: 36px; height: 36px; border-radius: 9px; }

.st-toast { position: fixed; left: 50%; top: calc(14px + env(safe-area-inset-top)); transform: translateX(-50%); width: min(520px, calc(100vw - 24px)); z-index: 100; display: flex; flex-direction: column; gap: 8px; }
.st-toast .alert { margin: 0; box-shadow: var(--cb-shadow-lg); }

.st-month { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: #fff; border: 1px solid var(--cb-line); border-radius: 14px; padding: 6px; margin-bottom: 12px; }
.st-month b { font-size: 15px; }
.st-month a, .st-month span.st-disabled { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; color: var(--cb-ink); }
.st-month a:hover { background: var(--cb-line-2); }
.st-month .st-disabled { color: #c3cadc; }
