/* Punch Pad: tool-specific pieces only (tokens, shell, buttons, tables,
   modals, chips come from toolbox.css). Shared by index.html and me.html. */

/* ── Task cards (phone-first: big tap targets) ─────────────────────────── */
.pp-list{ display:flex; flex-direction:column; gap:10px; }
.pp-card{ background:var(--card); border:1px solid var(--line); border-left:5px solid var(--line); border-radius:0;
  box-shadow:var(--shadow); padding:13px 14px; cursor:pointer; display:flex; gap:12px; align-items:flex-start; }
.pp-card:hover{ border-color:var(--muted); }
.pp-card[data-pri="urgent"]{ border-left-color:var(--red); }
.pp-card[data-pri="high"]{ border-left-color:var(--brand-gold); }
.pp-card[data-pri="normal"]{ border-left-color:var(--navy); }
.pp-card[data-pri="low"]{ border-left-color:var(--muted); }
.pp-card.done{ opacity:.6; }
.pp-card .main{ flex:1; min-width:0; }
.pp-card .title{ font-weight:700; font-size:14.5px; line-height:1.3; }
.pp-card .meta{ display:flex; gap:6px 12px; flex-wrap:wrap; font-size:12px; color:var(--muted); margin-top:5px; align-items:center; }
.pp-card .chips{ display:flex; gap:6px; flex-wrap:wrap; margin-top:7px; }
.pp-card .side{ display:flex; flex-direction:column; align-items:flex-end; gap:6px; flex-shrink:0; }
.pp-card .num{ font-size:11px; color:var(--muted); font-weight:600; font-variant-numeric:tabular-nums; }
.pp-card .late{ color:var(--red); font-weight:700; }
.pp-card .note{ font-size:12.5px; background:var(--bg); border-radius:8px; padding:6px 9px; margin-top:7px; color:var(--ink); }
.pp-rank{ display:flex; flex-direction:column; gap:2px; }
.pp-rank button{ border:1px solid var(--line); background:#fff; border-radius:6px; width:26px; height:22px; cursor:pointer; color:var(--navy); font-size:11px; line-height:1; }
.pp-rank button:hover{ background:var(--bg); }

/* Work-order ticket: stub | perforation | form fields */
.pp-tix{ padding:0; gap:0; border-left:none; overflow:visible; position:relative; align-items:stretch; border-radius:10px; }
.pp-tix .stub{ width:64px; flex-shrink:0; border-radius:10px 0 0 10px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px;
  padding:12px 4px; background:var(--navy); color:#fff; border-right:2px dashed rgba(255,255,255,.55); position:relative; }
/* Punched notches at both ends of the perforation: the color behind the
   card, so they read as holes (white inside panels and modals). */
.pp-tix .stub::before, .pp-tix .stub::after{ content:""; position:absolute; right:-7px; width:12px; height:12px; border-radius:50%; background:var(--pp-notch, var(--bg)); }
.pp-tix .stub::before{ top:-7px; } .pp-tix .stub::after{ bottom:-7px; }
.panel, .modal{ --pp-notch:#fff; }
.pp-tix .stub .k{ font-size:10.5px; font-weight:700; letter-spacing:1.5px; opacity:.85; }
.pp-tix .stub .n{ font-family:ui-monospace, "SF Mono", Menlo, monospace; font-size:15px; font-weight:700; }
.pp-tix .stub .p{ font-size:10.5px; font-weight:700; opacity:.9; }
/* Stub color says when it's due, then what it is (Alison, Oct 16, 2026):
   overdue red, due today or tomorrow orange; otherwise work orders light
   blue, projects and event prep lavender, cleaning navy. Priority is the
   word under the number. Brand colors only, from toolbox.css tokens. */
.pp-tix[data-kind="ticket"] .stub{ background:var(--northshore); color:var(--navy); border-right-color:rgba(43,50,82,.35); }
.pp-tix[data-kind="project"] .stub, .pp-tix[data-kind="event"] .stub{ background:var(--brand-lavender); color:var(--navy); border-right-color:rgba(43,50,82,.35); }
.pp-tix[data-due="soon"] .stub{ background:var(--lunken); color:var(--navy); border-right-color:rgba(43,50,82,.35); }
.pp-tix[data-due="late"] .stub{ background:var(--red); color:#fff; border-right-color:rgba(255,255,255,.55); }
.pp-tix[data-pri="urgent"] .stub .p{ font-weight:800; text-decoration:underline; }
.pp-tix .main{ padding:11px 14px 12px 16px; border-radius:0 10px 10px 0; min-width:0; }
.pp-tix .tix-top{ display:flex; justify-content:space-between; align-items:center; gap:8px; margin-bottom:3px; }
.pp-tix .tix-kind{ font-size:11px; font-weight:700; color:var(--muted); letter-spacing:.4px; }
.pp-tix .tix-sub{ font-size:12px; color:var(--lavender-ink); font-weight:600; margin-top:2px; }
.pp-tix .stamp{ font-size:10.5px; font-weight:800; letter-spacing:.6px; border:2px solid currentColor; border-radius:5px; padding:1px 6px; transform:rotate(-3deg); color:var(--navy); white-space:nowrap; }
.pp-tix .stamp.s-done, .pp-tix .stamp.s-in_progress{ color:var(--green-ink); }
.pp-tix .stamp.s-stuck, .pp-tix .stamp.s-missed{ color:var(--red); }
.pp-tix .stamp.s-needs_feedback, .pp-tix .stamp.s-needs_approval{ color:var(--navy); border-color:var(--brand-gold); }
.pp-tix .stamp.s-cancelled{ color:var(--muted); }
.pp-tix .fields{ display:grid; grid-template-columns:repeat(auto-fill, minmax(104px, 1fr)); gap:6px 12px; margin-top:8px; padding-top:7px; border-top:1px dashed var(--line); }
.pp-tix .f label{ display:block; font-size:10.5px; font-weight:700; color:var(--muted); margin:0 0 1px; }
.pp-tix .f span{ font-size:12.5px; font-weight:600; color:var(--ink); }
.pp-tix .f span.late{ color:var(--red); }
.pp-tix .pp-rank{ padding:10px 8px 0 0; }
.pp-bar.proj i{ background:var(--brand-lavender); }
.pp-todo{ display:flex; gap:10px; align-items:center; padding:9px 10px; border:1px solid var(--line); border-radius:9px; margin-bottom:6px; cursor:pointer; background:#fff; font-size:13.5px; }
.pp-todo:hover{ border-color:var(--muted); }
.pp-todo .box{ width:18px; height:18px; border:2px solid var(--navy); border-radius:4px; flex-shrink:0; display:flex; align-items:center; justify-content:center; font-size:12px; color:#fff; }
.pp-todo.done .box{ background:var(--green-d); border-color:var(--green-d); }
.pp-todo.done .t{ text-decoration:line-through; color:var(--muted); }
.pp-todo .t{ flex:1; font-weight:600; }
.pp-todo .m{ font-size:12px; color:var(--muted); white-space:nowrap; }

/* Time used against the estimate */
.pp-bar{ height:6px; border-radius:999px; background:var(--bg); overflow:hidden; margin-top:7px; max-width:260px; }
.pp-bar i{ display:block; height:100%; background:var(--green); }
.pp-bar.over i{ background:var(--red); }

/* Status chips not in toolbox.css */
.chip.lav{ background:color-mix(in srgb, var(--brand-lavender) 22%, #fff); color:var(--lavender-ink); }
.chip.pink{ background:color-mix(in srgb, var(--brand-pink) 16%, #fff); color:var(--navy); }

/* ── Groups on the Punch List ─────────────────────────────────────────── */
.pp-group{ margin-bottom:22px; }
.pp-group-head{ display:flex; align-items:center; gap:10px; margin:0 0 10px; }
.pp-group-head h3{ margin:0; font-size:15px; }
.pp-group-head .count{ font-size:12px; color:var(--muted); font-weight:600; }
.pp-group-head img, .pp-avatar{ width:28px; height:28px; border-radius:50%; object-fit:cover; background:var(--bg); flex-shrink:0; }
.pp-avatar{ display:inline-flex; align-items:center; justify-content:center; font-size:11px; font-weight:700; color:var(--navy); }
.pp-where{ font-size:12px; color:var(--muted); }
.pp-cols{ display:grid; grid-template-columns:repeat(auto-fill, minmax(320px, 1fr)); gap:18px; align-items:start; }
.pp-toolbar{ display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin-bottom:16px; }
.pp-toolbar input[type=search]{ max-width:260px; }
.pp-toolbar select, .pp-report-filters select{ width:auto; min-width:160px; }

/* ── Task detail ──────────────────────────────────────────────────────── */
.pp-detail .head{ border-left:5px solid var(--navy); padding-left:12px; margin-bottom:10px; }
.pp-detail .head .num{ font-size:11.5px; color:var(--muted); font-weight:600; }
.pp-detail .head h3{ margin:2px 0 0; font-size:18px; }
.pp-check{ display:flex; flex-direction:column; gap:6px; margin:10px 0 14px; }
.pp-check label{ display:flex; gap:10px; align-items:flex-start; padding:10px 12px; border:1px solid var(--line); border-radius:10px; font-size:14px; cursor:pointer; background:#fff; }
.pp-check label.done{ background:var(--bg); color:var(--muted); text-decoration:line-through; }
.pp-check input{ width:20px; height:20px; margin:0; flex-shrink:0; accent-color:var(--green-d); }
.pp-actions{ display:flex; gap:8px; flex-wrap:wrap; margin:12px 0; }
.pp-actions .btn{ flex:1 1 auto; min-height:42px; }
.pp-ask{ border:1px solid var(--brand-gold); background:var(--brand-cream); border-radius:10px; padding:12px 14px; margin:10px 0; font-size:13.5px; }
.pp-ask .who{ font-weight:700; }
.pp-timeline{ border-top:1px solid var(--line); margin-top:14px; padding-top:10px; }
.pp-ev{ display:flex; gap:10px; padding:7px 0; font-size:13px; border-bottom:1px dashed var(--line); }
.pp-ev:last-child{ border-bottom:none; }
.pp-ev .when{ color:var(--muted); font-size:11.5px; white-space:nowrap; min-width:108px; }
.pp-ev .who{ font-weight:600; }
.pp-photo{ max-width:100%; max-height:280px; border-radius:10px; border:1px solid var(--line); margin:6px 0 10px; }
.pp-grid2{ display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.pp-grid2 input, .pp-grid2 select, .pp-grid2 textarea{ width:100%; }
@media (max-width:560px){ .pp-grid2{ grid-template-columns:1fr; } }

/* ── Court plan ───────────────────────────────────────────────────────── */
.pp-slots{ display:flex; gap:6px; flex-wrap:wrap; }
.pp-slot{ border:1px solid var(--line); background:#fff; border-radius:999px; padding:5px 11px; font:inherit; font-size:12px; font-weight:600; color:var(--navy); cursor:pointer; white-space:nowrap; }
.pp-slot:hover{ border-color:var(--navy); }
.pp-slot .q{ color:var(--muted); font-weight:500; margin-left:4px; }
.pp-heat{ display:grid; gap:2px; font-size:10.5px; color:var(--muted); }
.pp-heat .c{ height:18px; border-radius:3px; }
.pp-heat .h{ text-align:center; }

/* ── Productivity ─────────────────────────────────────────────────────── */
.pp-kpi-note{ font-size:12px; color:var(--muted); margin-top:4px; }
.val.bad{ color:var(--red); }
.val.good{ color:var(--green-ink); }
td.bad{ color:var(--red); font-weight:700; }
.pp-report-filters{ display:flex; gap:10px; flex-wrap:wrap; align-items:flex-end; margin-bottom:16px; }
.pp-report-filters .field{ margin:0; }

/* Centered columns after the first (Alison's table rule). */
table.pp-t th:not(:first-child), table.pp-t td:not(:first-child){ text-align:center; }
table.pp-t th.right, table.pp-t td.right{ text-align:right; }

/* ── Phone page ───────────────────────────────────────────────────────── */
.me-top{ background:var(--navy); color:#fff; padding:14px 16px; display:flex; align-items:center; gap:10px; position:sticky; top:0; z-index:20; }
.me-top h1{ font-size:16px; margin:0; color:#fff; }
.me-top .sub{ font-size:12.5px; color:#cfd6e6; margin-top:1px; }
.me-top .who{ margin-left:auto; font-size:12.5px; color:#cfd6e6; text-align:right; }
.me-top .who button{ background:none; border:none; color:#fff; text-decoration:underline; font:inherit; cursor:pointer; padding:0; }
.me-wrap{ max-width:720px; margin:0 auto; padding:14px 14px 80px; }
.me-card{ background:var(--card); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); padding:22px; max-width:420px; margin:24px auto; }
.me-card h2{ margin:0 0 6px; color:var(--navy); }
.me-card p{ color:var(--muted); margin:0 0 14px; }
.me-tabs{ display:flex; gap:6px; margin-bottom:14px; position:sticky; top:58px; background:var(--bg); padding:6px 0; z-index:10; }
.me-tabs button{ flex:1; border:1px solid var(--line); background:#fff; border-radius:999px; padding:9px 6px; font:inherit; font-size:13px; font-weight:700; color:var(--navy); cursor:pointer; }
.me-tabs button.active{ background:var(--navy); color:#fff; border-color:var(--navy); }
.me-now{ background:var(--card); border:2px solid var(--green); border-radius:var(--radius); padding:12px 14px; margin-bottom:14px; font-size:13.5px; }
.pin-wrap{ max-width:360px; margin:20px auto; text-align:center; }
.pin-wrap h2{ margin:14px 0 4px; }
.pin-wrap p{ color:var(--muted); margin:0 0 16px; font-size:14px; }
.pin-dots{ display:flex; gap:14px; justify-content:center; margin:8px 0; }
.pin-dots span{ width:16px; height:16px; border-radius:50%; border:2px solid var(--navy); }
.pin-dots span.filled{ background:var(--navy); }
.pin-msg{ min-height:38px; color:var(--ink); font-size:13px; font-weight:600; margin-bottom:8px; }
.keypad{ display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.keypad button{ height:64px; border-radius:12px; border:1px solid var(--line); background:#fff; font:inherit; font-size:22px; font-weight:700; color:var(--navy); cursor:pointer; }
.keypad button.small{ font-size:14px; }
@media (max-width:860px){
  textarea, input, select{ font-size:16px; } /* no iOS zoom */
  .modal{ padding:20px 18px; max-height:none; }
  .modal-backdrop{ padding:12px 8px; }
}

@media print{
  .sidebar, .topbar .filters, .hw-btn, .pp-noprint{ display:none !important; }
  .content{ padding:0 !important; }
}
/* New Project: one row per to-do (title, person, due date) */
.pp-todo-row{ display:grid; grid-template-columns:2fr 1.3fr 1fr; gap:8px; margin-bottom:8px; }
@media (max-width:640px){ .pp-todo-row{ grid-template-columns:1fr 1fr; } .pp-todo-row .pj-td-title{ grid-column:1/-1; } }

/* Purchase requests on a task */
.pp-buys{ margin:12px 0; display:flex; flex-direction:column; gap:6px; }
.pp-buy{ display:flex; gap:10px; align-items:flex-start; justify-content:space-between; padding:10px 12px; border:1px solid var(--line); border-radius:10px; background:#fff; font-size:13.5px; }
.pp-buy-main{ min-width:0; }
.pp-buy-meta{ font-size:12px; color:var(--muted); margin-top:2px; }
.pp-buy-link{ display:block; font-size:12.5px; margin-top:3px; word-break:break-all; }

/* Court Cleaning: five KPIs a row (the fifth is extra cleans a GM asked
   for), three on a narrow screen, two on a phone */
.pp-co-kpis{ grid-template-columns:repeat(5, minmax(0, 1fr)); }
@media (max-width:1100px){ .pp-co-kpis{ grid-template-columns:repeat(3, minmax(0, 1fr)); } }
.pp-co-bar{ display:flex; justify-content:space-between; align-items:center; gap:10px; flex-wrap:wrap; margin:0 0 14px; }
.pp-rq-courts{ display:grid; grid-template-columns:repeat(auto-fill, minmax(110px, 1fr)); gap:6px 10px; margin-top:6px; }
.pp-rq-courts label{ display:flex; gap:7px; align-items:center; font-size:13.5px; font-weight:500; }
.pp-rq-kind{ display:flex; gap:16px; flex-wrap:wrap; margin-top:4px; }
.pp-rq-kind label{ display:flex; gap:7px; align-items:center; font-size:14px; font-weight:500; }
.pp-co-of{ font-size:15px; color:var(--muted); font-weight:600; letter-spacing:0; }
.pp-co-sub{ font-size:11.5px; color:var(--muted); margin-top:3px; font-weight:500; }
.pp-co-court{ font-weight:700; text-decoration:none; color:var(--navy); }
.pp-co-t td a{ color:inherit; }
@media (max-width:760px){
  .pp-co-kpis{ grid-template-columns:repeat(2, minmax(0, 1fr)); gap:10px; }
  .pp-co-kpis .kpi{ padding:12px 13px; }
  .pp-co-kpis .val{ font-size:22px; }
  /* Status moves under the court's name so it shows without scrolling. */
  .pp-co-t th:last-child, .pp-co-t td:last-child{ display:none; }
  .pp-co-t td, .pp-co-h td{ white-space:nowrap; }
  .pp-co-h td:first-child{ white-space:normal; min-width:120px; }
}
.pp-co-mchip{ display:none; margin-top:5px; }
@media (max-width:760px){ .pp-co-mchip{ display:block; } }
