/* SalonOps mobile UI — matches the Payroll employee portal phone screens.
   Place in the SalonOps web project (e.g., wwwroot/css/mobile-ui.css) and load it on every mobile page.
   Rule: mobile pages use only these classes and tokens. */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
  /* Great Clips brand */
  --jade: #048667; --dark-green: #073B3A; --lime: #9ACB3A; --sky: #BEE5E6; --mint: #DDF3C5; --photo-gray: #F2F2F2;
  --marigold: #E9A049; --peacock: #186E89; --red: #E12827;

  /* Roles */
  --bg: #FFFFFF; --page: #F2F2F2; --surface-subtle: #F4F6F6;
  --text: #073B3A; --text-muted: #56625F; --line: #EAEEED; --border: #DDE3E2; --border-strong: #B5BFBD;
  --primary: #048667; --primary-hover: #073B3A; --primary-tint: #E3F4F4;
  --ok-text: #006B34; --ok-bg: #DDF3C5;
  --info-text: #186E89; --info-bg: #E3F4F4; --info-border: #9FD3D4;
  --warn-text: #8A4B00; --warn-bg: #FBE9D2; --warn-soft: #FEF8EF; --warn-border: #E9A049;
  --bad-text: #B3201F; --bad-bg: #FBE0DE; --bad-soft: #FDF1F0;

  --font: 'Poppins', system-ui, 'Segoe UI', sans-serif;
  --radius: 12px; --radius-sm: 8px; --radius-pill: 999px;
  --tap: 48px;          /* min height for inputs, list rows */
  --tap-primary: 52px;  /* primary buttons */
  --tabbar-h: 60px;
  --pad: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; background: var(--page); }
body { font-family: var(--font); color: var(--text); font-size: 15px; line-height: 1.4; -webkit-text-size-adjust: 100%; }
a { color: var(--primary); }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; }
.muted, .sub { color: var(--text-muted); font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }

/* App shell: header · scrolling body · bottom tabs */
.m-app { max-width: 480px; margin: 0 auto; min-height: 100dvh; background: var(--bg); display: flex; flex-direction: column; }
.m-header { background: var(--primary); color: #fff; padding: 16px var(--pad) 14px; padding-top: calc(16px + env(safe-area-inset-top)); position: sticky; top: 0; z-index: 5; }
.m-header__context { font-size: 13px; opacity: .9; }
.m-header__title { font-size: 22px; font-weight: 700; margin: 2px 0 0; }
.m-header__sub { font-size: 13px; opacity: .95; }
.m-header__back { color: #fff; text-decoration: none; font-size: 14px; display: inline-flex; align-items: center; gap: 4px; min-height: 32px; }
.m-body { flex: 1; padding: 16px var(--pad) calc(var(--tabbar-h) + 24px); display: flex; flex-direction: column; gap: 14px; }
.m-tabs { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: #fff; border-top: 1px solid var(--border); z-index: 5; }
.m-tabs a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; color: var(--text); font-size: 13px; }
.m-tabs a[aria-current="page"] { color: var(--primary); font-weight: 700; }
.m-tabs .m-badge { position: relative; top: -2px; }

/* Text */
.m-section-title { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: #4E5B59; font-weight: 700; margin-top: 6px; }
.m-h2 { font-size: 18px; font-weight: 700; margin: 0; }

/* Cards & banners */
.m-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.m-card--subtle { background: var(--surface-subtle); border-color: transparent; }
.m-stat { background: var(--surface-subtle); border-radius: var(--radius); padding: 12px; }
.m-stat__label { font-size: 13px; color: var(--text-muted); }
.m-stat__value { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.m-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.m-banner { border-radius: 10px; padding: 10px 12px; font-size: 14px; font-weight: 600; }
.m-banner--warn { background: var(--warn-bg); color: var(--warn-text); }
.m-banner--ok { background: var(--ok-bg); color: var(--ok-text); }
.m-banner--bad { background: var(--bad-bg); color: var(--bad-text); }
.m-banner--info { background: var(--info-bg); color: var(--info-text); }

/* Lists */
.m-list { display: flex; flex-direction: column; }
.m-row { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--text); }
.m-row__main { flex: 1; min-width: 0; }
.m-row__title { font-weight: 600; }
.m-row__sub { font-size: 13px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-row__end { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.m-row__chevron { color: #7F8B89; font-size: 18px; }

/* Chips & badges */
.m-chip { display: inline-block; padding: 3px 9px; border-radius: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.m-chip--ok { background: var(--ok-bg); color: var(--ok-text); }
.m-chip--info { background: var(--info-bg); color: var(--info-text); }
.m-chip--warn { background: var(--warn-bg); color: var(--warn-text); }
.m-chip--bad { background: var(--bad-bg); color: var(--bad-text); }
.m-chip--grey { background: var(--line); color: var(--text); }
.m-badge { display: inline-block; min-width: 18px; padding: 0 6px; border-radius: var(--radius-pill); background: var(--marigold); color: var(--dark-green); font-size: 11px; font-weight: 700; text-align: center; }
.m-type { display: inline-block; padding: 1px 6px; border-radius: 4px; font-size: 11px; font-weight: 700; margin-left: 6px; background: var(--primary); color: #fff; vertical-align: 1px; }

/* Buttons */
.m-btn { min-height: var(--tap); padding: 0 16px; border: 1px solid var(--border-strong); background: #fff; color: var(--text); border-radius: var(--radius-sm); font: inherit; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; cursor: pointer; white-space: nowrap; }
.m-btn--primary { min-height: var(--tap-primary); background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; font-size: 16px; }
.m-btn--danger { background: var(--bad-bg); border: 2px solid var(--bad-text); color: var(--bad-text); font-weight: 600; }
.m-btn--block { width: 100%; }
.m-btn:disabled { opacity: .5; }
.m-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.m-seg .m-btn[aria-pressed="true"] { border: 2px solid var(--primary); background: var(--primary-tint); color: var(--dark-green); font-weight: 600; }
.m-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.m-sticky-actions { position: sticky; bottom: calc(var(--tabbar-h) + 8px); background: #fff; padding-top: 8px; }

/* Filters (horizontal scroll pills) */
.m-pills { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.m-pill { flex: none; min-height: 40px; padding: 0 14px; border: 1px solid #C7CFCE; border-radius: var(--radius-pill); background: #fff; color: var(--text); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.m-pill[aria-current="true"], .m-pill[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }

/* Forms */
.m-field { display: flex; flex-direction: column; gap: 6px; }
.m-field label { font-size: 13px; font-weight: 600; }
.m-field .hint { font-size: 13px; color: var(--text-muted); }
.m-field .error { font-size: 13px; color: var(--bad-text); font-weight: 600; }
.m-input, .m-select, .m-textarea { font: inherit; font-size: 16px; /* 16px prevents iOS zoom */ min-height: var(--tap); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 0 12px; background: #fff; color: var(--text); width: 100%; }
.m-textarea { min-height: 96px; padding: 10px 12px; resize: vertical; }
[aria-invalid="true"] { border: 2px solid var(--bad-text); }
.m-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.m-check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--primary); }

/* Bottom sheet (mobile drawer) */
.m-sheet-backdrop { position: fixed; inset: 0; background: rgba(7,59,58,.45); z-index: 20; }
.m-sheet { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 480px; max-height: 88dvh; overflow-y: auto; background: #fff; border-radius: 16px 16px 0 0; padding: 10px var(--pad) calc(20px + env(safe-area-inset-bottom)); z-index: 21; display: flex; flex-direction: column; gap: 14px; }
.m-sheet__grip { width: 40px; height: 4px; border-radius: 2px; background: #C7CFCE; margin: 0 auto 4px; }
.m-sheet__head { display: flex; justify-content: space-between; align-items: flex-start; }
.m-sheet__close { width: 40px; height: 40px; border: 1px solid #C7CFCE; background: #fff; border-radius: var(--radius-sm); font-size: 18px; }

/* Toast, empty, skeleton */
.m-toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar-h) + 16px); max-width: 440px; width: calc(100% - 40px); background: var(--dark-green); color: #fff; padding: 12px 16px; border-radius: 10px; font-size: 14px; z-index: 30; }
.m-empty { text-align: center; padding: 40px 16px; color: var(--text-muted); display: flex; flex-direction: column; gap: 10px; align-items: center; }
.m-empty__title { color: var(--text); font-weight: 700; font-size: 17px; }
.m-skeleton { background: linear-gradient(90deg, var(--line), #F6F8F8, var(--line)); background-size: 200% 100%; animation: msk 1.2s infinite; border-radius: 6px; height: 14px; }
@keyframes msk { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .m-skeleton { animation: none; } }
