/* ============================================================
   Villa Plumbing Field Portal — Round 16 fixes
   Additive layer covering five UX gaps:
     1) Mobile Project RFI access — full row tappable
     2) My Day sections collapsed by default with chevrons
     3) (no css needed) Accounting button routes to Hub
     4) + Create Reminder opens real modal
     5) Accounting Hub Invoice Review drawer
   Visual identity preserved (teal/navy/Barlow).
   ============================================================ */

/* ---- 1. Project RFI list: row-as-tap-target on mobile ---- */
.vrfi-table tbody tr[data-vrfi-row]{
  cursor:pointer;
  -webkit-tap-highlight-color:rgba(255,107,0,.18);
  touch-action:manipulation;
}
.vrfi-table tbody tr[data-vrfi-row]:hover{
  background:#f5fbfa;
}
.vrfi-table tbody tr[data-vrfi-row]:active{
  background:#FFF0E5;
}
/* Subject and number cells get tap affordance on mobile */
.vrfi-table tbody tr[data-vrfi-row] td:nth-child(2){
  color:#D95A00;
  font-weight:600;
}
@media (max-width:720px){
  /* Mobile: stack each row as a card that is fully tappable.
     Keep Open button visible too; both lead to the same detail. */
  .vrfi-table thead{display:none}
  .vrfi-table, .vrfi-table tbody, .vrfi-table tr, .vrfi-table td{display:block;width:100%}
  .vrfi-table tbody tr[data-vrfi-row]{
    border:1px solid #d8e8e5;
    border-radius:12px;
    margin:8px 0;
    padding:12px 14px;
    background:#fff;
    box-shadow:0 1px 2px rgba(20,19,16,.04);
  }
  .vrfi-table tbody tr[data-vrfi-row] td{
    padding:3px 0;
    border:0;
    font-size:13px;
  }
  .vrfi-table tbody tr[data-vrfi-row] td:first-child{
    font-family:'Barlow Condensed',sans-serif;font-size:15px;color:#141310;
  }
  .vrfi-table tbody tr[data-vrfi-row] td:nth-child(2){
    font-size:15px;font-weight:700;color:#141310;margin-bottom:4px;
  }
  .vrfi-open-btn{
    display:inline-flex;
    margin-top:6px;min-height:40px;padding:10px 18px;
    background:#FF6B00;color:#fff;border:0;border-radius:10px;
    font-family:'Barlow Condensed',sans-serif;font-size:14px;font-weight:700;
  }
  .vrfi-tap-hint{
    display:block;font-size:11px;color:#D95A00;font-style:italic;
    margin-top:6px;text-transform:uppercase;letter-spacing:.4px;font-weight:700;
  }
}
.vrfi-tap-hint{display:none}

/* ---- 2. My Day collapsible groups ---- */
.myday-group-hdr{
  cursor:pointer;
  user-select:none;
  -webkit-tap-highlight-color:rgba(255,107,0,.18);
  position:relative;
}
.myday-group-hdr:hover{background:rgba(255,107,0,.05)}
.myday-group-chev{
  margin-left:auto;
  display:inline-flex;align-items:center;justify-content:center;
  width:28px;height:28px;border-radius:8px;
  background:rgba(20,19,16,.06);color:#D95A00;
  font-size:14px;line-height:1;font-weight:700;
  transition:transform .18s ease;
  flex-shrink:0;
}
.myday-group.r16-collapsed .myday-group-chev{transform:rotate(-90deg)}
.myday-group.r16-collapsed .myday-group-body{display:none}
.myday-bulk-bar{
  display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap;
  margin:0 0 10px;
}
.myday-bulk-bar button{
  padding:6px 12px;border:1px solid #d8e8e5;background:#fff;
  color:#D95A00;border-radius:999px;cursor:pointer;
  font-family:'Barlow',sans-serif;font-size:12px;font-weight:600;
}
.myday-bulk-bar button:hover{background:#eef9f7;border-color:#FF6B00}

/* ---- 4. Create Reminder modal ---- */
.r16-modal-ov{
  position:fixed;inset:0;background:rgba(20,19,16,.62);
  display:none;align-items:flex-start;justify-content:center;
  z-index:15000;padding:6vh 1rem;overflow-y:auto;
  backdrop-filter:blur(4px);
}
.r16-modal-ov.show{display:flex}
.r16-modal{
  background:#fff;border-radius:18px;width:100%;max-width:520px;
  overflow:hidden;box-shadow:0 32px 80px rgba(0,0,0,.35);
  font-family:'Barlow',sans-serif;
}
.r16-modal h3{
  font-family:'Barlow Condensed',sans-serif;font-size:20px;font-weight:700;
  color:#fff;margin:0;
}
.r16-modal-hd{
  background:linear-gradient(135deg,#141310,#1A1916);
  padding:16px 20px;display:flex;align-items:center;gap:12px;
}
.r16-modal-hd .ic{
  width:38px;height:38px;border-radius:10px;background:rgba(255,107,0,.28);
  display:inline-flex;align-items:center;justify-content:center;font-size:18px;
}
.r16-modal-hd .x{
  margin-left:auto;background:rgba(255,255,255,.12);border:0;color:#fff;
  width:30px;height:30px;border-radius:8px;cursor:pointer;font-size:16px;
}
.r16-modal-bd{padding:18px 20px;display:flex;flex-direction:column;gap:12px}
.r16-modal-bd label{
  display:flex;flex-direction:column;gap:5px;font-size:12px;font-weight:700;
  color:#D95A00;text-transform:uppercase;letter-spacing:.4px;
}
.r16-modal-bd input,
.r16-modal-bd select,
.r16-modal-bd textarea{
  padding:11px 13px;border:1.5px solid #d8e8e5;border-radius:10px;
  font-family:'Barlow',sans-serif;font-size:14px;color:#1a2e2b;
  background:#fff;outline:none;transition:border .15s;
}
.r16-modal-bd input:focus,
.r16-modal-bd select:focus,
.r16-modal-bd textarea:focus{border-color:#FF6B00}
.r16-modal-bd textarea{min-height:64px;resize:vertical}
.r16-modal-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.r16-modal-ft{
  padding:14px 20px;border-top:1px solid #eef4f3;background:#fafcfc;
  display:flex;justify-content:flex-end;gap:8px;
}
.r16-modal-ft button{
  padding:10px 18px;border-radius:10px;font-family:'Barlow Condensed',sans-serif;
  font-size:14px;font-weight:700;cursor:pointer;border:0;letter-spacing:.3px;
}
.r16-btn-o{background:#fff;color:#1a2e2b;border:1.5px solid #d8e8e5}
.r16-btn-o:hover{border-color:#FF6B00;color:#FF6B00}
.r16-btn-p{background:#FF6B00;color:#fff}
.r16-btn-p:hover{background:#D95A00}
.r16-toast{
  position:fixed;left:50%;bottom:38px;transform:translateX(-50%);
  background:#0a564a;color:#fff;padding:12px 22px;border-radius:999px;
  box-shadow:0 14px 32px rgba(0,0,0,.40);
  font-family:'Barlow',sans-serif;font-size:14px;font-weight:700;
  z-index:15500;
}

/* ---- 5. Accounting Invoice Review drawer ---- */
.vhub-card{
  cursor:pointer;
  -webkit-tap-highlight-color:rgba(255,107,0,.18);
}
.vhub-card .ttl{
  color:#D95A00;
  text-decoration:underline;
  text-decoration-color:rgba(29,122,110,.25);
  text-underline-offset:3px;
}
.vhub-card:hover{
  border-color:#FF6B00 !important;
  box-shadow:0 6px 18px rgba(255,107,0,.14);
}
.vhub-card .review-cta{
  background:#141310;color:#fff;border:0;
  padding:9px 18px;border-radius:10px;
  font-family:'Barlow Condensed',sans-serif;font-weight:700;font-size:13px;
  cursor:pointer;letter-spacing:.4px;
}
.vhub-card .review-cta:hover{background:#1A1916}
.vinv-drawer-ov{
  position:fixed;inset:0;background:rgba(20,19,16,.62);
  display:none;z-index:14500;padding:0;
  backdrop-filter:blur(4px);
}
.vinv-drawer-ov.show{display:block}
.vinv-drawer{
  position:absolute;top:0;right:0;height:100vh;width:min(720px,100vw);
  background:#fff;box-shadow:-24px 0 60px rgba(0,0,0,.35);
  display:flex;flex-direction:column;font-family:'Barlow',sans-serif;
  animation:vinvSlide .22s ease-out;
}
@keyframes vinvSlide{from{transform:translateX(100%)} to{transform:translateX(0)}}
.vinv-hd{
  background:linear-gradient(135deg,#141310,#1A1916);
  padding:18px 20px;color:#fff;display:flex;gap:12px;align-items:flex-start;
}
.vinv-hd .ic{
  width:42px;height:42px;border-radius:10px;background:rgba(255,107,0,.28);
  display:inline-flex;align-items:center;justify-content:center;font-size:20px;flex-shrink:0;
}
.vinv-hd h3{
  font-family:'Barlow Condensed',sans-serif;font-size:20px;font-weight:700;
  margin:0;line-height:1.2;
}
.vinv-hd .sub{font-size:12px;opacity:.75;margin-top:3px}
.vinv-hd .x{
  margin-left:auto;background:rgba(255,255,255,.14);border:0;color:#fff;
  width:32px;height:32px;border-radius:8px;cursor:pointer;font-size:16px;flex-shrink:0;
}
.vinv-bd{flex:1;overflow-y:auto;padding:18px 20px}
.vinv-section{
  background:#f8fbfa;border:1px solid #eef4f3;border-radius:12px;
  padding:14px 16px;margin-bottom:14px;
}
.vinv-section h4{
  font-family:'Barlow Condensed',sans-serif;font-size:13px;font-weight:700;
  color:#D95A00;text-transform:uppercase;letter-spacing:.6px;margin:0 0 10px;
}
.vinv-grid{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;
}
.vinv-cell{display:flex;flex-direction:column;gap:3px}
.vinv-cell .l{font-size:10.5px;font-weight:700;color:#8aada8;text-transform:uppercase;letter-spacing:.4px}
.vinv-cell .v{font-family:'Barlow Condensed',sans-serif;font-size:15px;font-weight:700;color:#141310}
.vinv-attached{display:flex;flex-wrap:wrap;gap:6px}
.vinv-att{
  display:inline-flex;align-items:center;gap:5px;
  background:#fff;border:1px solid #d8e8e5;border-radius:999px;
  padding:5px 11px;font-size:12px;color:#1a2e2b;
}
.vinv-att.ok{border-color:#0a8b6f;color:#0a564a}
.vinv-att.miss{border-color:#b07a00;color:#7a5b00;background:#fff7e0}
.vinv-lily{
  background:linear-gradient(135deg,#eef9f7,#dff6ee);
  border:1px solid #FFD4B0;border-radius:12px;padding:14px 16px;margin-bottom:14px;
  font-size:13.5px;color:#141310;line-height:1.55;
}
.vinv-lily b{color:#D95A00}
.vinv-line{
  display:grid;grid-template-columns:1fr 80px 100px;gap:8px;
  padding:7px 0;border-bottom:1px dashed #d8e8e5;font-size:13px;
}
.vinv-line:last-child{border-bottom:0}
.vinv-line .qty{color:#4a6b65;text-align:right}
.vinv-line .amt{font-family:'Barlow Condensed',sans-serif;font-weight:700;text-align:right;color:#141310}
.vinv-totals{
  margin-top:8px;padding-top:8px;border-top:2px solid #d8e8e5;
  display:flex;flex-direction:column;gap:4px;font-size:13px;
}
.vinv-totals .row{display:flex;justify-content:space-between}
.vinv-totals .row.total{font-family:'Barlow Condensed',sans-serif;font-size:18px;color:#141310;font-weight:700}
.vinv-textarea{
  width:100%;min-height:70px;padding:10px 12px;
  border:1.5px solid #d8e8e5;border-radius:10px;
  font-family:'Barlow',sans-serif;font-size:13.5px;color:#1a2e2b;
  background:#fff;resize:vertical;outline:none;
}
.vinv-textarea:focus{border-color:#FF6B00}
.vinv-actions{
  padding:14px 20px;border-top:1px solid #eef4f3;background:#fafcfc;
  display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end;
}
.vinv-actions button{
  padding:10px 16px;border-radius:10px;cursor:pointer;border:0;
  font-family:'Barlow Condensed',sans-serif;font-size:13px;font-weight:700;
  letter-spacing:.4px;
}
.vinv-btn-o{background:#fff;color:#1a2e2b;border:1.5px solid #d8e8e5}
.vinv-btn-o:hover{border-color:#FF6B00;color:#FF6B00}
.vinv-btn-p{background:#FF6B00;color:#fff}
.vinv-btn-p:hover{background:#D95A00}
.vinv-btn-warn{background:#e76f51;color:#fff}
.vinv-btn-warn:hover{background:#c75a3f}
.vinv-btn-amber{background:#e9c46a;color:#141310}
.vinv-btn-amber:hover{background:#d4ad55}
.vinv-status{
  margin:0 0 12px;padding:10px 14px;border-radius:10px;
  background:#dff6ee;border:1px solid #0a8b6f;color:#0a564a;
  font-weight:600;font-size:13.5px;
}
.vinv-status.warn{background:#fff4d6;border-color:#b07a00;color:#5a3e00}
@media (max-width:720px){
  .vinv-drawer{width:100vw}
  .vinv-grid{grid-template-columns:1fr}
  .vinv-line{grid-template-columns:1fr 60px 80px}
}
