/* ===== email.css - Gmail-mobile mock, light mode (the email container) =====
   Copies the real Gmail iOS UX so it reads as "your normal inbox": search bar
   with account avatar + Gemini spark, star rows, Compose FAB, bottom Mail/Meet
   nav. Agent work lives WITHIN Gmail's constraints - cleared intros in the main
   inbox, Intake/Filtered as real labels (folders) reached from the drawer. */
.gmail{flex:1;display:flex;flex-direction:column;min-height:0;background:#fff;position:relative;color:#202124}

/* ---------- top search bar ---------- */
.gmtop{display:flex;align-items:center;gap:10px;padding:8px 12px 8px 8px;flex-shrink:0}
.gmsearchbar{
  flex:1;display:flex;align-items:center;gap:10px;background:#F1F3F4;border-radius:999px;
  padding:7px 8px 7px 14px;min-width:0;
}
.gmsearchbar .gmmenu{display:flex;align-items:center;justify-content:center;flex-shrink:0}
.gmsearchbar .gmq{flex:1;color:#5F6368;font-size:14.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.gmsearchbar .gmsum{flex-shrink:0;color:#5F6368;display:flex;align-items:center}
.gmavwrap{
  width:32px;height:32px;border-radius:50%;padding:2px;flex-shrink:0;
  background:conic-gradient(from 90deg,#4285F4,#EA4335,#FBBC05,#34A853,#4285F4);
  display:flex;align-items:center;justify-content:center;
}
.gmavwrap .gmme{width:100%;height:100%;border:1.5px solid #fff}
.gmgemini{flex-shrink:0;font-size:19px;line-height:1;
  background:linear-gradient(135deg,#4285F4,#9B72CB,#D96570);-webkit-background-clip:text;background-clip:text;color:transparent}

/* ---------- inbox list ---------- */
.gmlist{flex:1;overflow-y:auto;padding-bottom:96px}
.gmcat{font-size:13px;color:#5F6368;font-weight:500;padding:14px 16px 6px}
.mrow{
  display:flex;gap:12px;padding:10px 12px 10px 16px;align-items:flex-start;cursor:default;
}
.mrow.tap{cursor:pointer}
.mrow.tap:active{background:#F5F5F5}
.mav{
  width:40px;height:40px;border-radius:50%;color:#fff;font-weight:500;font-size:17px;
  display:flex;align-items:center;justify-content:center;flex-shrink:0;
}
.mav.agent{font-size:16px;background:linear-gradient(135deg,#5B3FA8,#7C5CD6)}
.mrbody{flex:1;min-width:0}
.mrtop{display:flex;justify-content:space-between;align-items:baseline;gap:8px}
.mrsender{font-size:14.5px;color:#202124;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mrtime{font-size:12px;color:#5F6368;flex-shrink:0;display:flex;align-items:center;gap:6px}
.mrsubj{font-size:14px;color:#202124;margin-top:1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mrsnip{font-size:13px;color:#5F6368;line-height:1.35;margin-top:1px;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}
.mrow.unread .mrsender,.mrow.unread .mrsubj{font-weight:700}
.mrow.unread .mrtime{color:#202124;font-weight:700}
.mrsubjline{display:flex;align-items:center;gap:8px;min-width:0}
.mrsubjline .mrsubj{flex:1}
.mstar{flex-shrink:0;width:22px;height:22px;display:flex;align-items:center;justify-content:center}
.mchip{
  flex-shrink:0;font-size:11px;font-weight:500;color:#5F6368;background:#F1F3F4;
  padding:1px 8px;border-radius:6px;
}
/* agent line accent in snippets */
.mrsnip .ai{color:#5B3FA8;font-weight:600}

/* ---------- compose FAB + bottom nav ---------- */
.gmfab{
  position:absolute;right:14px;bottom:74px;z-index:20;
  display:flex;align-items:center;gap:9px;background:#C2E7FF;border:0;
  box-shadow:0 2px 6px rgba(60,64,67,.28);border-radius:16px;padding:14px 18px;cursor:pointer;
  font:inherit;font-size:14.5px;font-weight:600;color:#001D35;
}
.gmnav{
  position:absolute;left:0;right:0;bottom:0;height:60px;z-index:15;background:#F0F4F9;
  display:flex;align-items:flex-start;justify-content:space-around;padding:8px 40px 0;
  border-top:.5px solid #E4E6E9;
}
.gmnavitem{display:flex;flex-direction:column;align-items:center;gap:2px;font-size:11px;color:#444746;font-weight:600;position:relative}
.gmnavpill{display:flex;align-items:center;justify-content:center;width:56px;height:30px;border-radius:999px}
.gmnavitem.on .gmnavpill{background:#C2E7FF}
.gmnavbadge{position:absolute;top:-5px;right:2px;background:#D93025;color:#fff;font-size:9.5px;font-weight:700;border-radius:999px;padding:0 5px;height:15px;display:flex;align-items:center}

/* ---------- label drawer ---------- */
.gmdrawer{
  position:absolute;left:0;top:0;bottom:0;width:80%;max-width:290px;z-index:45;background:#fff;
  border-radius:0 16px 16px 0;box-shadow:2px 0 24px rgba(0,0,0,.22);display:flex;flex-direction:column;
  overflow-y:auto;padding:14px 0 20px;
}
@media (prefers-reduced-motion: no-preference){ .gmdrawer{animation:drawin .2s ease} }
@keyframes drawin{from{transform:translateX(-30px);opacity:.4}to{transform:none;opacity:1}}
.gmdtitle{font-family:ui-serif,Georgia,serif;font-size:20px;color:#5F6368;font-weight:600;padding:6px 20px 12px}
.gmlabel{display:flex;align-items:center;gap:16px;padding:11px 20px;font-size:14px;color:#202124;cursor:pointer;border-radius:0 999px 999px 0;margin-right:12px}
.gmlabel:active{background:#F1F3F4}
.gmlabel.on{background:#D3E3FD;font-weight:700;color:#041E49}
.gmlabel .gmlicon{width:22px;text-align:center;flex-shrink:0}
.gmlabel .gmlcount{margin-left:auto;font-size:12.5px;color:#5F6368}
.gmlabel.on .gmlcount{color:#041E49;font-weight:700}
.gmdsep{height:.5px;background:#E4E6E9;margin:8px 20px}

/* ---------- folder header ---------- */
.gmfhead{display:flex;align-items:center;gap:10px;padding:8px 14px;flex-shrink:0}
.gmback{color:#5F6368;font-size:24px;line-height:1;background:none;border:0;cursor:pointer;padding:6px 8px 6px 0;font-family:inherit;min-height:40px;min-width:34px}
.gmftitle{font-size:20px;font-weight:500;color:#202124}
.gmfnote{font-size:12px;color:#80868B;padding:2px 16px 8px;line-height:1.4}

/* ---------- conversation view ---------- */
.gmthread{flex:1;display:flex;flex-direction:column;min-height:0;background:#fff}
.gmthead{display:flex;align-items:center;justify-content:space-between;padding:6px 14px 2px;flex-shrink:0}
.gmtacts{display:flex;gap:16px;font-size:16px;color:#5F6368}
.gmsubjbar{display:flex;align-items:flex-start;gap:10px;padding:2px 18px 10px;border-bottom:.5px solid #EEE;flex-shrink:0}
.gmsubject{flex:1;font-size:19px;font-weight:400;color:#202124;line-height:1.3}
.gmsubjbar .mstar{margin-top:2px}
.gmbody{flex:1;overflow-y:auto;padding:8px 0 16px}
.mmsg{padding:12px 16px 14px;border-bottom:.5px solid #F1F1F1}
.mmsg.agentmsg{background:#FBFAFE}
.mmsg.private{background:#F7F4FD}
.mmhead{display:flex;align-items:flex-start;gap:10px}
.mmhead .mav{width:36px;height:36px;font-size:15px}
.mmwho{flex:1;min-width:0}
.mmline{display:flex;justify-content:space-between;align-items:baseline;gap:8px}
.mmname{font-size:14px;font-weight:700;color:#202124}
.mmsg.agentmsg .mmname,.mmsg.private .mmname{color:#5B3FA8}
.mmtime{font-size:11.5px;color:#5F6368;flex-shrink:0}
.mmto{font-size:11.5px;color:#80868B;margin-top:1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mmaddr{color:#5F6368}
.mmhead .mstar{margin-top:2px}
.mmbody{font-size:14px;line-height:1.5;color:#202124;margin:10px 2px 0}
.mmfoot{font-size:11.5px;color:#8A7FB0;font-style:italic;margin:8px 2px 0}
.mmatt{display:flex;align-items:center;gap:10px;margin:12px 2px 0;padding:9px 12px;border:1px solid #E4E6E9;border-radius:10px;max-width:240px}
.mmatticon{font-size:20px}
.mmattt{font-size:12.5px;font-weight:600;color:#202124}
.mmatts{font-size:11px;color:#5F6368;margin-top:1px}

/* private-thread banner */
.privbanner{
  display:flex;align-items:center;gap:8px;margin:0;padding:10px 16px;background:#F3EEFB;
  border-bottom:1px solid #E6DDF6;font-size:12px;color:#5B3FA8;line-height:1.35;
}
.privbanner b{font-weight:700}

/* ---------- reply / compose bar ---------- */
.gmreplybar{flex-shrink:0;display:flex;gap:10px;padding:10px 16px 26px;border-top:.5px solid #EEE}
.gmreply{
  flex:1;appearance:none;border:1px solid #DADCE0;background:#fff;border-radius:999px;
  padding:10px 14px;font:inherit;font-size:13.5px;font-weight:600;color:#5B3FA8;cursor:pointer;
  display:inline-flex;align-items:center;justify-content:center;gap:6px;
}
.gmreply .sp{font-weight:700}
.gmreply.ghost{color:#3C4043;flex:0 0 auto;padding:10px 20px}
.gmreply:active{background:#F5F1FC}
.gmcompose{flex-shrink:0;border-top:.5px solid #EEE;padding:12px 16px 24px;background:#FBFAFE}
.gmctitle{font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:#5B3FA8;margin-bottom:6px}
.gmcbody{font-size:14px;line-height:1.5;color:#202124;background:#fff;border:1px solid #E4E6E9;border-radius:10px;padding:11px 13px}
.gmsend{margin-top:10px;appearance:none;border:0;background:#0B57D4;color:#fff;border-radius:999px;padding:9px 22px;font:inherit;font-size:14px;font-weight:600;cursor:pointer}
.gmsend:active{opacity:.85}

/* ---------- digest report (HTML email body) ---------- */
.gmreport{flex:1;overflow-y:auto;padding:0 0 24px;background:#fff}
.repmast{padding:16px 18px 14px;border-bottom:.5px solid #EEE}
.repfrom{display:flex;align-items:center;gap:10px}
.repfrom .mav{width:36px;height:36px;font-size:15px}
.repfromt{flex:1;min-width:0}
.repfromn{font-size:14px;font-weight:700;color:#202124}
.repfroma{font-size:11.5px;color:#80868B}
.reptime{font-size:11.5px;color:#5F6368;flex-shrink:0}
.repcard-wrap{padding:14px 14px 0}
.repintro{font-size:13.5px;line-height:1.5;color:#3C4043;padding:14px 18px 4px}
.rcard{border:1px solid #E4E6E9;border-radius:14px;margin-bottom:12px;overflow:hidden;background:#fff}
.rcard>summary{list-style:none;cursor:pointer;padding:14px 15px;display:block}
.rcard>summary::-webkit-details-marker{display:none}
.rchead{display:flex;align-items:center;gap:9px}
.rcdot{width:9px;height:9px;border-radius:50%;flex-shrink:0}
.rcdot.green{background:#1E8E3E}.rcdot.amber{background:#B8860B}.rcdot.gray{background:#9AA0A6}
.rclabel{font-size:14.5px;font-weight:700;color:#202124}
.rccount{font-size:12px;color:#5F6368;font-weight:600}
.rcadd{font-size:11px;font-weight:700;color:#1E8E3E;background:#E6F4EA;border-radius:6px;padding:1px 7px}
.rcchev{margin-left:auto;color:#5F6368;font-size:13px;transition:transform .18s}
.rcard[open] .rcchev{transform:rotate(180deg)}
.rcsummary{font-size:13px;line-height:1.45;color:#5F6368;margin:8px 0 0;padding-left:18px}
.rcitems{padding:2px 15px 14px}
.ritem{border-top:.5px solid #F0F0F0;padding:11px 0 3px}
.ritem:first-child{border-top:0}
.ritemtop{display:flex;align-items:baseline;justify-content:space-between;gap:10px}
.ritemname{font-size:13.5px;font-weight:700;color:#202124}
.ritemname .org{font-weight:500;color:#5F6368}
.ritemline{font-size:12.5px;line-height:1.45;color:#5F6368;margin:3px 0 8px}
.ritemact{display:flex;gap:8px;align-items:center;margin-bottom:8px}
.rconnect{
  appearance:none;border:0;border-radius:999px;background:#0B57D4;color:#fff;
  font:inherit;font-size:12.5px;font-weight:700;padding:7px 16px;cursor:pointer;
  display:inline-flex;align-items:center;gap:6px;
}
.rconnect:active{opacity:.85}
.rconnect.ghost{background:#EDE7FA;color:#5B3FA8}
.rdone{font-size:12.5px;font-weight:600;color:#1E8E3E;display:inline-flex;align-items:center;gap:6px}
.ropen{appearance:none;border:1px solid #DADCE0;border-radius:999px;background:#fff;font:inherit;font-size:12.5px;font-weight:600;color:#3C4043;padding:7px 15px;cursor:pointer}

@media (prefers-reduced-motion: no-preference){
  .mailside{animation:slideup .25s ease}
}
@media (max-width:520px){
  .gmsubject{font-size:17px}
  .mmbody{font-size:13px}
  .gmsearchbar .gmq{font-size:13.5px}
}
