/* PCMA Daily Work Log. Same palette and feel as kb.pcma.org. */
:root { --mauve:#590044; --tan:#D2C3B9; --ink:#1F2937; --muted:#6B7280; --bg:#FAF8F6;
        --wash:#F1E7EE; --ok:#166534; --bad:#A80000; }
* { box-sizing:border-box; }
[hidden] { display:none !important; }
body { margin:0; font-family:"Aptos","Segoe UI",Arial,sans-serif; color:var(--ink); background:var(--bg); }
header { background:var(--mauve); color:#fff; padding:14px 22px; display:flex; align-items:center; justify-content:space-between; }
header h1 { font-size:18px; font-weight:600; margin:0; letter-spacing:.3px; }
#who { font-size:12px; opacity:.9; }
main { max-width:860px; margin:0 auto; padding:26px 18px 80px; }

.card { background:#fff; border:1.5px solid var(--tan); border-radius:8px; padding:16px 18px; margin:0 0 14px; }
.card h2 { margin:0 0 10px; color:var(--mauve); font-size:15px; font-weight:600; }
.card h2:not(:first-child) { margin-top:16px; }
.card p { font-size:14px; line-height:1.55; margin:0 0 10px; }
.card ul { font-size:14px; line-height:1.6; margin:0 0 10px; padding-left:20px; }
.muted { color:var(--muted); font-size:13px !important; }

.row { display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
.row.between { justify-content:space-between; }
.grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(200px, 1fr)); gap:10px 14px; margin:0 0 10px; }
.field { display:flex; flex-direction:column; gap:4px; font-size:12.5px; font-weight:600; }
.field input, .field select, #mbq { font-family:inherit; font-size:14px; font-weight:400; padding:8px 10px; border:1.5px solid var(--tan); border-radius:6px; background:#fff; width:100%; color:var(--ink); }
.field input:focus, .field select:focus, #mbq:focus { outline:none; border-color:var(--mauve); }

.pathrow { display:flex; align-items:stretch; margin:4px 0 10px; }
.pathroot { display:flex; align-items:center; white-space:nowrap; background:var(--wash); border:1.5px solid var(--tan); border-right:none; border-radius:6px 0 0 6px; padding:0 10px; font-size:13px; color:var(--mauve); font-weight:600; }
.pathrow input { flex:1; min-width:0; font-family:inherit; font-size:14px; padding:8px 10px; border:1.5px solid var(--tan); border-radius:0 6px 6px 0; background:#fff; color:var(--ink); }
.pathrow input:focus { outline:none; border-color:var(--mauve); }

.btn { display:inline-block; font-family:inherit; font-size:14px; border:none; border-radius:8px; padding:10px 16px; cursor:pointer; text-decoration:none; }
.btn:disabled { opacity:.55; cursor:default; }
.primary { background:var(--mauve); color:#fff; }
.primary:hover:not(:disabled) { filter:brightness(1.12); }
.ghost { background:#fff; color:var(--mauve); border:1.5px solid var(--mauve); padding:8px 14px; font-size:13px; }
.ghost:hover:not(:disabled) { background:var(--wash); }
.danger { background:#fff; color:var(--bad); border:1.5px solid var(--bad); padding:8px 14px; font-size:13px; }
.danger:hover { background:#FDECEC; }

.hint { background:#FFFBEB; border:1px solid #FDE68A; border-radius:6px; padding:9px 12px; margin:0 0 12px; color:#92400E; font-size:13px; }
.hint a { color:#92400E; font-weight:600; }
.saved { font-size:13px; color:var(--ok); }
.saved.bad { color:var(--bad); }

/* Enable / disable switch */
.switch { display:flex; align-items:center; gap:10px; cursor:pointer; font-size:15px; font-weight:600; user-select:none; }
.switch input { position:absolute; opacity:0; width:0; height:0; }
.track { position:relative; width:46px; height:26px; border-radius:13px; background:#C9C2BD; transition:background .15s; flex:none; }
.track::after { content:""; position:absolute; top:3px; left:3px; width:20px; height:20px; border-radius:50%; background:#fff; transition:left .15s; }
.switch input:checked + .track { background:var(--mauve); }
.switch input:checked + .track::after { left:23px; }
.switch input:focus-visible + .track { outline:2px solid var(--mauve); outline-offset:2px; }

.days { display:flex; gap:14px; flex-wrap:wrap; margin:0 0 12px; font-size:13.5px; }
.days label { cursor:pointer; user-select:none; }
.days input { accent-color:var(--mauve); vertical-align:-2px; margin-right:5px; }

/* Mailbox picker */
.chips { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:8px; }
.chip { background:var(--wash); border:1px solid var(--tan); border-radius:12px; padding:3px 10px; font-size:12.5px; }
.chip.bad { background:#FDECEC; border-color:#F0B4B4; color:var(--bad); }
.chip .tag { color:var(--muted); margin-left:6px; }
.chip button { background:none; border:none; padding:0; margin-left:6px; color:var(--mauve); cursor:pointer; font-size:13px; font-weight:700; font-family:inherit; }
#mbresults { margin:0 0 10px; }
#mbresults button { display:block; width:100%; text-align:left; background:#fff; border:1px solid #E5E7EB; border-radius:4px; padding:6px 9px; margin:4px 0 0; cursor:pointer; font-size:13px; font-family:inherit; color:var(--ink); }
#mbresults button:hover { border-color:var(--mauve); }

/* Last run summary */
.stats { display:flex; gap:8px; flex-wrap:wrap; margin:8px 0 0; }
.stat { background:var(--bg); border:1px solid var(--tan); border-radius:6px; padding:6px 10px; font-size:12.5px; }
.stat b { color:var(--mauve); font-size:15px; margin-right:4px; }
.problems { margin:8px 0 0; padding-left:20px; font-size:13px; color:var(--bad); }

.code { background:#F6F3F1; border:1px solid var(--tan); border-radius:6px; padding:8px 10px; font-family:Consolas,monospace; font-size:12px; overflow-x:auto; margin:0; }
.spin { display:inline-block; width:13px; height:13px; border:2px solid var(--tan); border-top-color:var(--mauve); border-radius:50%; animation:r .7s linear infinite; vertical-align:-2px; margin-right:6px; }
@keyframes r { to { transform:rotate(360deg); } }
