/* MGRV Crew — mobile-first styles. Big touch targets, thumb-friendly. */
:root {
  --brand: #0b5cab;
  --brand-dark: #084a8a;
  --bg: #eef1f5;
  --card: #ffffff;
  --text: #1c2330;
  --muted: #6b7686;
  --ok: #1e7e34;
  --warn: #b7791f;
  --danger: #c0392b;
  --info: #0b5cab;
  --radius: 12px;
}
* { box-sizing: border-box; }
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: 84px; /* room for bottom nav */
}
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: var(--brand); color: #fff;
  padding: 12px 16px;
  font-size: 18px; font-weight: 700;
}
.topbar em { font-style: normal; font-weight: 400; opacity: .85; }
.userbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 16px; font-size: 13px; color: var(--muted);
  background: #fff; border-bottom: 1px solid #dde3ea;
}
.userbar-links a { margin-left: 12px; color: var(--brand); }
main { max-width: 640px; margin: 0 auto; }
.card {
  background: var(--card); border-radius: var(--radius);
  margin: 12px; padding: 16px;
  box-shadow: 0 1px 3px rgba(16, 30, 54, .08);
}
.card-narrow { max-width: 440px; margin-left: auto; margin-right: auto; }
h2 { margin: 0 0 12px; font-size: 20px; }
h3 { margin: 16px 0 8px; font-size: 16px; }
.muted { color: var(--muted); font-size: 14px; }
a { color: var(--brand); }

/* forms */
label { display: block; margin: 10px 0; font-weight: 600; font-size: 14px; }
input, select, textarea {
  display: block; width: 100%; margin-top: 6px;
  padding: 13px 12px; font-size: 16px; font-weight: 400;
  border: 1px solid #c4cdd8; border-radius: 10px; background: #fff; color: var(--text);
}
input[type="checkbox"] { display: inline-block; width: 22px; height: 22px; margin: 0 10px 0 0; vertical-align: middle; }
textarea { resize: vertical; }
.twocol { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.checkgroup { border: 1px solid #c4cdd8; border-radius: 10px; padding: 6px 12px; margin: 10px 0; }
.checkgroup legend { font-size: 14px; font-weight: 600; padding: 0 6px; }
.check { display: block; font-weight: 400; padding: 8px 0; font-size: 16px; }

/* buttons — min 48px touch targets */
.btn {
  display: block; width: 100%; margin: 10px 0 0;
  padding: 14px; min-height: 52px;
  font-size: 17px; font-weight: 700; text-align: center; text-decoration: none;
  color: #fff; background: var(--brand); border: 0; border-radius: 10px; cursor: pointer;
}
.btn:active { background: var(--brand-dark); }
.btn-secondary { background: #5b6b7f; }
.btn-danger { background: var(--danger); }
.btn-warn { background: var(--warn); }
.btn-ok { background: var(--ok); }
.btn-big { font-size: 22px; padding: 20px; }
.btn-inline { width: auto; margin: 0 0 0 8px; padding: 13px 18px; min-height: 52px; }
.btn-small { width: auto; margin: 0; padding: 8px 14px; min-height: 0; font-size: 15px; }
.btnrow { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mini {
  display: inline-block; padding: 8px 12px; font-size: 14px; font-weight: 600;
  color: var(--brand); background: #e8f0fa; border-radius: 8px; text-decoration: none; border: 0; cursor: pointer;
}
.mini-danger { color: var(--danger); background: #fbe9e7; }

/* lists */
.row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 12px 4px; border-bottom: 1px solid #e7ecf2;
}
.row:last-child { border-bottom: 0; }
.rowlink { text-decoration: none; color: inherit; display: block; }
.rowlink .row { padding: 14px 4px; }
.rowactions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
form.inline { display: inline; margin: 0; }
.dayhead { margin: 18px 0 4px; font-size: 15px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

/* badges */
.badge {
  display: inline-block; padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; white-space: nowrap;
}
.badge-ok { background: #e3f4e8; color: var(--ok); }
.badge-warn { background: #fdf3e0; color: var(--warn); }
.badge-danger { background: #fbe9e7; color: var(--danger); }
.badge-info { background: #e3eefb; color: var(--info); }
.badge-muted { background: #eef1f5; color: var(--muted); }

/* spec list */
.specs { margin: 0; }
.specs > div { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #e7ecf2; }
.specs dt { color: var(--muted); font-size: 14px; }
.specs dd { margin: 0; font-weight: 600; }

/* alerts */
.alert { padding: 12px 14px; border-radius: 10px; margin: 12px; font-size: 15px; }
.alert-error { background: #fbe9e7; color: #8f1d12; }
.alert-ok { background: #e3f4e8; color: #145722; }
.alert-info { background: #e3eefb; color: #0b4a8a; }
.card .alert { margin: 0 0 12px; }

/* search */
.searchrow { display: flex; margin-bottom: 6px; }
.searchrow input { margin-top: 0; }

/* dashboard tiles */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px; }
.tile {
  background: var(--card); border-radius: var(--radius); padding: 18px 10px;
  text-align: center; text-decoration: none; color: var(--text); font-weight: 700;
  box-shadow: 0 1px 3px rgba(16, 30, 54, .08); min-height: 88px;
}
.tile-ico { display: block; font-size: 28px; margin-bottom: 6px; }

/* time clock */
.clockcard { text-align: center; }
.clockstatus { font-size: 17px; font-weight: 600; margin: 6px 0 12px; }
.weeknav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.totalrow {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 4px 4px; font-size: 18px; border-top: 2px solid #dde3ea; margin-top: 8px;
}

/* temp password */
.temppw {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 26px; font-weight: 700; text-align: center;
  background: #f4f6f9; border: 2px dashed var(--brand); border-radius: 10px;
  padding: 14px; letter-spacing: .06em; user-select: all;
}

.backlink { display: block; margin: 4px 16px 16px; font-size: 15px; }

/* bottom tab bar */
.bottomnav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 10;
  display: flex; background: #fff; border-top: 1px solid #dde3ea;
  padding-bottom: env(safe-area-inset-bottom);
}
.bottomnav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 64px; text-decoration: none; color: var(--muted); font-size: 11px; font-weight: 600;
}
.bottomnav a.active { color: var(--brand); }
.nav-ico { font-size: 22px; line-height: 1.2; }

@media (min-width: 700px) {
  body { padding-bottom: 0; }
  .bottomnav { position: static; max-width: 640px; margin: 12px auto; border: 1px solid #dde3ea; border-radius: var(--radius); }
}
