/* timesheet-employee.css — mobile-first (base styles ARE the phone styles, unlike the main app's
   styles.css which shrinks a desktop layout down). Reuses styles.css's CSS variables (--brand,
   --ink, --line, --soft, --green, --red, --amber, --radius, --shadow) rather than redefining
   colors, so this page stays visually in the same family as the rest of the app. */

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--soft, #EAF1F8);
  color: var(--ink, #1e293b);
  -webkit-tap-highlight-color: transparent;
}
/* FT-20260928-05. viewport-fit=cover (in the .html) lets the iPhone Crew App draw edge to edge, so
   every edge is padded by the phone's safe area — keeps the header clear of the clock/notch/battery
   row. env() is 0 in a normal browser, so desktop and Android are unchanged. */
#emp-app { max-width: 480px; margin: 0 auto; min-height: 100vh;
  padding: calc(16px + env(safe-area-inset-top, 0px)) calc(16px + env(safe-area-inset-right, 0px))
           calc(60px + env(safe-area-inset-bottom, 0px)) calc(16px + env(safe-area-inset-left, 0px)); }

.emp-loading { padding: 60px 0; text-align: center; color: var(--muted, #64748b); }

/* ---- login ---- */
.emp-login {
  max-width: 340px; margin: 15vh auto 0; background: var(--panel, #fff);
  border: 1px solid var(--line, #e2e8f0); border-radius: var(--radius, 12px);
  box-shadow: var(--shadow, 0 1px 3px rgba(15,23,42,.08)); padding: 24px 20px; text-align: center;
}
.emp-login h1 { font-size: 20px; margin: 0 0 4px; }
.emp-sub { color: var(--muted, #64748b); font-size: 13px; margin: 0 0 18px; }
.emp-sub-small { color: rgba(255,255,255,.75); font-size: 12px; }
.emp-error {
  background: #fee2e2; color: #b91c1c; border-radius: 8px; padding: 8px 12px;
  font-size: 13px; margin-bottom: 14px; text-align: left;
}

/* ---- shared field/button styles (own, not app.js's — this page never loads app.js) ---- */
.emp-field { display: block; text-align: left; margin-bottom: 12px; }
.emp-field span { display: block; font-size: 12px; font-weight: 600; color: var(--muted, #64748b); margin-bottom: 4px; }
.emp-field input, .emp-field textarea {
  width: 100%; padding: 12px; border: 1px solid var(--line, #e2e8f0); border-radius: 8px;
  font-size: 16px; font-family: inherit; background: #fff;
}
.emp-btn {
  border: none; border-radius: 10px; padding: 14px 18px; font-size: 15px; font-weight: 700;
  cursor: pointer; width: 100%; transition: .15s;
}
.emp-btn-primary { background: var(--brand, #64748b); color: #fff; margin-top: 4px; }
.emp-btn-primary:active { opacity: .85; }
.emp-btn-link {
  background: none; border: none; color: var(--brand-d, #334155); font-size: 13px; font-weight: 600;
  padding: 6px 0; cursor: pointer; margin-right: 16px;
}
.emp-btn-link.emp-danger { color: var(--red, #dc2626); }

/* ---- header ---- */
.emp-header {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--bg, #0f1729); color: #fff; border-radius: var(--radius, 12px);
  padding: 16px 18px; margin-bottom: 14px;
}
.emp-name { font-size: 17px; font-weight: 700; }
.emp-logout { color: rgba(255,255,255,.8); font-size: 13px; text-decoration: underline; cursor: pointer; }

/* ---- clock card — the single biggest tap target on the page, on purpose ---- */
.emp-clock-card {
  background: var(--panel, #fff); border: 1px solid var(--line, #e2e8f0); border-radius: var(--radius, 12px);
  box-shadow: var(--shadow, 0 1px 3px rgba(15,23,42,.08)); padding: 20px; text-align: center; margin-bottom: 16px;
}
.emp-clock-status { font-size: 14px; color: var(--muted, #64748b); margin-bottom: 12px; }
.emp-clock-card.is-clocked .emp-clock-status { color: var(--green, #047857); font-weight: 600; }
.emp-btn-clock { font-size: 18px; padding: 22px; border-radius: 14px; }
.emp-btn-in { background: var(--green, #047857); color: #fff; }
.emp-btn-out { background: var(--red, #dc2626); color: #fff; }

/* ---- sections ---- */
.emp-section {
  background: var(--panel, #fff); border: 1px solid var(--line, #e2e8f0); border-radius: var(--radius, 12px);
  box-shadow: var(--shadow, 0 1px 3px rgba(15,23,42,.08)); padding: 18px; margin-bottom: 16px;
}
.emp-section-h { font-weight: 700; font-size: 15px; margin-bottom: 12px; }
.emp-empty { color: var(--muted, #64748b); font-size: 13px; padding: 8px 0; }

/* ---- entry list ---- */
.emp-entry { border-top: 1px solid var(--line, #e2e8f0); padding: 12px 0; }
.emp-entry:first-child { border-top: none; padding-top: 0; }
.emp-entry-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.emp-entry-date { font-weight: 600; font-size: 14px; }
.emp-entry-mid { font-size: 14px; color: var(--ink, #1e293b); }
.emp-entry-notes { font-size: 12px; color: var(--muted, #64748b); margin-top: 2px; }
.emp-entry-actions { margin-top: 6px; }

.emp-badge {
  display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700;
}
.emp-badge-submitted { background: #fef3c7; color: #b45309; }
.emp-badge-approved { background: #d1fae5; color: #047857; }
.emp-badge-rejected { background: #fee2e2; color: #b91c1c; }

/* ---- toast ---- */
.emp-toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 12px);
  background: var(--ink, #1e293b); color: #fff; padding: 10px 18px; border-radius: 20px;
  font-size: 13px; opacity: 0; transition: .25s; pointer-events: none; z-index: 999;
}
.emp-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---- widen up for tablet/desktop, rather than the main app's "shrink down" convention ---- */
@media (min-width: 600px) {
  #emp-app { max-width: 560px; padding-top: 32px; }
}

/* FT-20260920-01 — sign-in choice, the texted-code step, and the neutral notice that the
   "email me a link" flow shows whether or not that address has an account. The notice is
   deliberately NOT styled as an error or a success: it must read the same either way, because
   looking different is how a login screen turns into a way to find out who works here. */
.emp-notice {
  background: var(--soft, #EAF1F8);
  border: 1px solid var(--line, #e2e8f0);
  color: var(--ink, #1e293b);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
  margin-bottom: 14px;
  text-align: left;
}
.emp-choice { text-align: left; }
/* .emp-sub-small is WHITE — it belongs to the dark header, not this card. Inside the login panel
   it has to be re-coloured or it renders white on white. Caught before it shipped; the class name
   does not say where it is allowed to be used, which is the trap. */
.emp-choice .emp-sub-small { color: var(--muted, #64748b); margin: 6px 2px 0; line-height: 1.4; }
.emp-choice .emp-btn[disabled] { opacity: .45; cursor: not-allowed; }
#lg-code {
  letter-spacing: .45em;
  text-align: center;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

/* FT-20260920-11 — a tick and its sentence on one line, on a phone.
   NOT built on .emp-field: that class makes its <span> a block label (12px, 600, muted), which in
   a flex row collapses the sentence into a narrow column running off the edge of the card. */
.intake-check {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 10px 0; text-align: left;
}
.intake-check input { margin: 2px 0 0; flex: 0 0 auto; width: 18px; height: 18px; }
.intake-check span {
  flex: 1 1 auto; min-width: 0;
  font-size: 14px; font-weight: 400; line-height: 1.4;
  color: var(--ink, #1e293b);
}
/* The intake form is a form, not a login card — it needs the width. */
#emp-app .emp-login.intake-card { max-width: 560px; }

/* FT-20260920-12 — the home menu. Two columns on a phone, more when there is room.
   Big targets on purpose: this is used outdoors, in gloves, one-handed. */
.emp-tiles {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 4px;
}
@media (min-width: 560px) { .emp-tiles { grid-template-columns: repeat(3, 1fr); } }
.emp-tile {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start;
  gap: 4px; min-height: 96px; padding: 14px 12px; text-align: left; cursor: pointer;
  background: var(--panel, #fff); color: var(--ink, #1e293b);
  border: 1px solid var(--line, #e2e8f0); border-radius: var(--radius, 12px);
  box-shadow: var(--shadow, 0 1px 3px rgba(15,23,42,.08));
  font: inherit; -webkit-tap-highlight-color: transparent;
}
.emp-tile:active { transform: translateY(1px); }
.emp-tile-i { font-size: 22px; line-height: 1; }
.emp-tile-l { font-size: 15px; font-weight: 700; line-height: 1.2; }
.emp-tile-s { font-size: 12px; color: var(--muted, #64748b); line-height: 1.3; }
/* Clocked in is the one state worth seeing from across a room. */
.emp-tile.on { background: var(--green, #047857); border-color: var(--green, #047857); }
.emp-tile.on .emp-tile-l, .emp-tile.on .emp-tile-i { color: #fff; }
.emp-tile.on .emp-tile-s { color: rgba(255,255,255,.85); }

/* FT-20260921-02. My information: label above value, one row per ticked item. */
.emp-info-l { font-size: 12px; color: var(--muted, #64748b); margin-bottom: 2px; }
.emp-info-v { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.emp-info-none { font-weight: 400; font-style: italic; color: var(--muted, #64748b); }

/* FT-20260923-02. Portal calendar: month / week / day, sized for a phone. */
.emp-cal-bar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;justify-content:space-between;margin:4px 0 10px}
.emp-cal-title{font-weight:700;font-size:15px;flex:1 1 100%;order:3;text-align:center}
.emp-cal-nav,.emp-cal-views{display:flex;gap:6px}
.emp-cal-btn{border:1px solid var(--line,#e2e8f0);background:#fff;color:inherit;border-radius:8px;
  padding:7px 11px;font-size:13px;font-weight:600;min-height:38px;cursor:pointer}
.emp-cal-btn.on{background:var(--brand,#b87333);border-color:var(--brand,#b87333);color:#fff}
.emp-cal-grid-h{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:2px;font-size:10px;font-weight:700;
  text-transform:uppercase;color:var(--muted,#64748b);text-align:center;margin-bottom:2px}
.emp-cal-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:2px}
.emp-cal-cell{min-width:0;overflow:hidden;background:#fff;border:1px solid var(--line,#e2e8f0);border-radius:6px;min-height:62px;padding:3px}
.emp-cal-cell.dim{opacity:.45}
.emp-cal-cell.today{border-color:var(--brand,#b87333);border-width:2px}
.emp-cal-cell.has{cursor:pointer}
.emp-cal-dnum{font-size:11px;font-weight:700;color:var(--muted,#64748b)}
.emp-cal-chip{font-size:10px;line-height:1.25;border-radius:4px;padding:1px 3px;margin-top:2px;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:rgba(184,115,51,.15)}
.emp-cal-more{font-size:10px;color:var(--muted,#64748b);margin-top:1px}
.emp-cal-day{margin-bottom:14px}
.emp-cal-day-h{font-weight:700;font-size:13px;margin-bottom:6px}
.emp-cal-day.today .emp-cal-day-h{color:var(--brand,#b87333)}
.emp-cal-none{font-size:13px;color:var(--muted,#64748b);padding:4px 0 8px}

/* FT-20260923-06. A notification that arrives while the app is open. Sits over everything, stays
   until it is dismissed — a job-site phone gets glanced at, not watched. */
#emp-banner .emp-banner{position:fixed;left:10px;right:10px;top:calc(10px + env(safe-area-inset-top, 0px));z-index:900;display:flex;align-items:center;gap:10px;
  background:var(--brand,#b87333);color:#fff;border-radius:12px;padding:12px 12px;box-shadow:0 10px 30px rgba(0,0,0,.28)}
#emp-banner .emp-banner-body{flex:1;min-width:0}
#emp-banner .emp-banner-t{font-weight:700;font-size:15px}
#emp-banner .emp-banner-b{font-size:13px;opacity:.95;overflow-wrap:anywhere}
#emp-banner .emp-banner-open{background:#fff;color:var(--brand,#b87333);border:none;border-radius:8px;
  padding:8px 12px;font-weight:700;font-size:13px;min-height:38px}
#emp-banner .emp-banner-x{background:transparent;border:none;color:#fff;font-size:22px;line-height:1;padding:4px 6px}

/* FT-20260929-01. Message thread. Office on the left, you on the right — the layout every phone
   user already reads without being told. */
.emp-thread{max-height:55vh;overflow-y:auto;display:flex;flex-direction:column;gap:8px}
.emp-msg{max-width:85%;padding:9px 12px;border-radius:14px;font-size:15px;line-height:1.35}
.emp-msg.theirs{align-self:flex-start;background:#fff;border:1px solid var(--line,#e2e8f0);border-bottom-left-radius:4px}
.emp-msg.mine{align-self:flex-end;background:var(--brand,#64748b);color:#fff;border-bottom-right-radius:4px}
.emp-msg-b{overflow-wrap:anywhere}
.emp-msg-t{font-size:11px;opacity:.7;margin-top:3px}

/* FT-20260929-04. Privacy / Help links (App Store requirement). */
.emp-legal{margin-top:16px;font-size:13px;color:var(--muted,#64748b)}
.emp-legal a{color:var(--brand-d,#334155)}
/* FT-20260929-04. Month grid on a phone: repeat(7,1fr) is minmax(AUTO,1fr), so one long job name
   widened its column and pushed Wed-Sat off the right edge (seen in the App Store screenshots).
   minmax(0,1fr) keeps seven equal columns; each chip is cut with an ellipsis instead. */
.emp-cal-chip{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
