/* ============================================================
   work.css — MakerWork employee portal (mobile-first)
   Implements the "MakerWork" design handoff on top of common.css
   tokens. Multipage: fixed bottom tab bar links the /work routes.
   Load AFTER /common.css.
   ============================================================ */

body { background: var(--paper); color: var(--ink-900); font-size: 15px; }

/* ── Mobile shell ── */
.m-shell { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; background: var(--paper); }
.m-body { flex: 1; padding-bottom: 76px; }   /* room for fixed tab bar */

/* ── Top header bar ── */
.m-header { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--border-soft); background: var(--paper); position: sticky; top: 0; z-index: 50; }
.m-header-back { width: 36px; height: 36px; border-radius: 10px; border: none; background: none; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--ink-500); -webkit-tap-highlight-color: transparent; text-decoration: none; }
.m-header-back:active { background: var(--ink-100); }
.m-header-back svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.m-header-title { font-family: var(--font-display); font-weight: 700; font-size: 17px; color: var(--ink-900); }
.m-header-spacer { flex: 1; }
.m-header-action { background: none; border: none; cursor: pointer; color: var(--ink-400); font-family: var(--font-mono); font-size: 12px; padding: 6px 8px; border-radius: 6px; }
.m-header-action:hover { color: var(--accent-rust); }

/* ── Bottom tab bar (fixed) ── */
.m-tabs { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 480px; display: flex; align-items: stretch; border-top: 1px solid var(--border-soft); background: rgba(255,255,255,0.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); z-index: 100; padding-bottom: env(safe-area-inset-bottom, 0); }
.m-tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 0 9px; cursor: pointer; border: none; background: none; color: var(--ink-300); transition: color 120ms; -webkit-tap-highlight-color: transparent; text-decoration: none; }
.m-tab svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.m-tab span { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.04em; }
.m-tab.active { color: var(--brand-700); }
.m-tab.active span { font-weight: 600; }

/* ── Inputs ── */
.m-input { font-family: var(--font-body); font-size: 16px; color: var(--ink-700); background: var(--white); border: 1.5px solid var(--border); border-radius: 12px; padding: 13px 15px; outline: none; width: 100%; transition: border-color 120ms, box-shadow 120ms; -webkit-appearance: none; }
.m-input:focus { border-color: var(--brand-700); box-shadow: 0 0 0 3px rgba(61,79,68,0.08); }
.m-input::placeholder { color: var(--ink-300); }
.m-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-400); font-weight: 500; margin-bottom: 6px; display: block; }

/* ── Buttons ── */
.m-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 14px 18px; border-radius: 12px; border: none; font-family: var(--font-body); font-weight: 600; font-size: 15px; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background 120ms; text-decoration: none; }
.m-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.m-btn-primary { background: var(--brand-700); color: var(--paper); }
.m-btn-primary:active { background: var(--brand-800); }
.m-btn-primary:disabled { opacity: 0.55; cursor: not-allowed; }
.m-btn-ghost { background: var(--white); color: var(--ink-700); border: 1.5px solid var(--border); }
.m-btn-ghost:active { background: var(--ink-100); }
.m-btn-block { width: 100%; }

/* ── Login ── */
.m-login { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 56px 28px; min-height: 100vh; min-height: 100dvh; max-width: 420px; margin: 0 auto; }
.m-login-logo { height: 46px; margin-bottom: 22px; }
.m-login-title { font-family: var(--font-display); font-weight: 700; font-size: 24px; margin-bottom: 2px; text-align: center; color: var(--ink-900); }
.m-login-sub { font-size: 13px; color: var(--ink-400); margin-bottom: 30px; text-align: center; }
.m-login-form { width: 100%; display: flex; flex-direction: column; gap: 12px; }
.m-login-forgot { font-size: 13px; color: var(--brand-700); text-align: center; margin-top: 4px; cursor: pointer; font-weight: 500; background: none; border: none; }
.m-msg { font-size: 13px; text-align: center; padding: 10px 12px; border-radius: 10px; font-weight: 500; }
.m-msg-error { color: var(--accent-rust); background: #FBEBE3; }
.m-msg-info { color: var(--brand-700); background: var(--brand-050); }
.m-msg-warn { color: #9A7028; background: #FEF5E0; }

/* ── Page container ── */
.m-page { padding: 24px 20px; max-width: 600px; margin: 0 auto; }
.m-greeting { font-family: var(--font-display); font-weight: 700; font-size: 24px; letter-spacing: -0.015em; margin-bottom: 2px; color: var(--ink-900); }
.m-greeting-sub { font-size: 13px; color: var(--ink-400); margin-bottom: 22px; }
.m-section-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-400); margin-bottom: 10px; font-weight: 500; }

/* ── Primary CTA ── */
.m-cta { display: flex; align-items: center; gap: 14px; background: var(--brand-700); color: var(--paper); border-radius: 16px; padding: 20px; cursor: pointer; margin-bottom: 24px; -webkit-tap-highlight-color: transparent; transition: background 120ms, transform 160ms; border: none; width: 100%; text-align: left; text-decoration: none; }
.m-cta:active { background: var(--brand-800); }
.m-cta-icon { width: 44px; height: 44px; border-radius: 12px; background: rgba(246,244,237,0.15); display: flex; align-items: center; justify-content: center; flex: 0 0 44px; }
.m-cta-icon svg { width: 22px; height: 22px; fill: none; stroke: var(--paper); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.m-cta-text { flex: 1; }
.m-cta-title { font-family: var(--font-display); font-weight: 700; font-size: 17px; margin-bottom: 2px; }
.m-cta-desc { font-size: 12px; opacity: 0.7; }
.m-cta-arrow svg { width: 20px; height: 20px; opacity: 0.5; fill: none; stroke: var(--paper); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* ── Stats row ── */
.m-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 24px; }
.m-stat { background: var(--white); border-radius: 14px; padding: 16px; box-shadow: var(--shadow-1); }
.m-stat-label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-400); margin-bottom: 6px; font-weight: 500; }
.m-stat-value { font-family: var(--font-display); font-size: 24px; font-weight: 700; color: var(--ink-900); }
.m-stat.pending .m-stat-value { color: #9A7028; }
.m-stat.approved .m-stat-value { color: var(--brand-700); }

/* ── Claim card ── */
.m-claim { background: var(--white); border-radius: 14px; padding: 16px; box-shadow: var(--shadow-1); margin-bottom: 10px; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: box-shadow 120ms, transform 120ms; text-decoration: none; display: block; }
.m-claim:active { box-shadow: var(--shadow-2); }
.m-claim-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.m-claim-id { font-family: var(--font-mono); font-size: 12px; color: var(--ink-400); font-weight: 500; }
.m-claim-amount { font-family: var(--font-mono); font-size: 15px; font-weight: 700; color: var(--ink-900); }
.m-claim-desc { font-size: 14px; font-weight: 500; color: var(--ink-700); margin-bottom: 8px; line-height: 1.35; }
.m-claim-bottom { display: flex; align-items: center; gap: 8px; }
.m-claim-date { font-family: var(--font-mono); font-size: 11px; color: var(--ink-300); }

/* ── Badges ── */
.m-badge { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.04em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; font-weight: 600; white-space: nowrap; display: inline-block; }
.m-badge--approved, .m-badge--paid, .m-badge--paying.in.progress, .m-badge--paying { background: var(--brand-100); color: var(--brand-700); }
.m-badge--submitted, .m-badge--pending { background: #FEF5E0; color: #9A7028; }
.m-badge--rejected { background: #FBEBE3; color: var(--accent-rust); }
.m-badge--draft { background: var(--ink-100); color: var(--ink-400); }

/* ── Profile ── */
.m-profile-header { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.m-profile-avatar { width: 56px; height: 56px; border-radius: 999px; background: var(--brand-700); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; font-size: 20px; color: var(--paper); flex: 0 0 56px; }
.m-profile-name { font-family: var(--font-display); font-weight: 700; font-size: 20px; color: var(--ink-900); }
.m-profile-role { font-size: 13px; color: var(--ink-400); }
.m-card { background: var(--white); border-radius: 14px; box-shadow: var(--shadow-1); overflow: hidden; margin-bottom: 12px; }
.m-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border-soft); }
.m-row:last-child { border-bottom: none; }
.m-row-label { font-size: 13px; color: var(--ink-400); }
.m-row-value { font-size: 14px; font-weight: 500; color: var(--ink-900); text-align: right; }
.m-row-value.mono { font-family: var(--font-mono); font-size: 13px; }
.m-link { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border-soft); cursor: pointer; -webkit-tap-highlight-color: transparent; text-decoration: none; }
.m-link:last-child { border-bottom: none; }
.m-link span { font-size: 14px; color: var(--ink-700); font-weight: 500; }
.m-link svg { width: 16px; height: 16px; color: var(--ink-300); fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* ── Wizard stepper (mobile) ── */
.m-stepper { display: flex; align-items: center; justify-content: center; gap: 0; padding: 16px 20px 0; }
.m-step-dot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--border); background: var(--white); transition: all 160ms; }
.m-step-dot.active { border-color: var(--brand-700); background: var(--brand-700); width: 12px; height: 12px; }
.m-step-dot.done { border-color: var(--brand-300); background: var(--brand-300); }
.m-step-line { width: 34px; height: 2px; background: var(--border); margin: 0 4px; }
.m-step-line.done { background: var(--brand-300); }
.m-step-labels { display: flex; justify-content: space-between; padding: 8px 20px 0; max-width: 360px; margin: 0 auto; }
.m-step-label { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-300); text-align: center; flex: 1; }
.m-step-label.active { color: var(--brand-700); font-weight: 600; }

.m-item { background: var(--white); border-radius: 12px; box-shadow: var(--shadow-1); padding: 14px 16px; margin-bottom: 10px; }
.m-item-row { display: flex; align-items: center; justify-content: space-between; }
.m-item-label { font-size: 14px; font-weight: 500; color: var(--ink-700); }
.m-item-value { font-family: var(--font-mono); font-size: 14px; font-weight: 600; color: var(--ink-900); }
.m-item-meta { font-size: 12px; color: var(--ink-400); margin-top: 4px; }

.m-sig-pad { background: var(--white); border: 2px dashed var(--border); border-radius: 14px; min-height: 160px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 8px; color: var(--ink-300); cursor: pointer; margin-bottom: 12px; }
.m-sig-pad.signed { border-style: solid; border-color: var(--brand-300); background: var(--brand-050); }

.m-wizard-footer { position: sticky; bottom: 0; display: flex; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border-soft); background: var(--white); padding-bottom: calc(14px + env(safe-area-inset-bottom, 0)); }
.m-wizard-footer .m-btn { flex: 1; }

/* ── Empty state ── */
.m-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 56px 24px; text-align: center; color: var(--ink-400); }
.m-empty-icon { width: 56px; height: 56px; border-radius: 16px; background: var(--brand-050); color: var(--brand-700); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.m-empty-icon svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.m-empty-title { font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--ink-700); margin-bottom: 4px; }

/* ── Larger screens: center, keep mobile feel ── */
@media (min-width: 641px) {
  .m-claim { transition: box-shadow 160ms, transform 160ms; }
  .m-claim:hover { box-shadow: var(--shadow-2); transform: translateY(-1px); }
  .m-cta:hover { transform: translateY(-1px); }
}
