/* =========================================================
   LIA9017 — Gmail y conexión con Google
   ========================================================= */
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin 1s linear infinite; }

/* ---------- Tarjeta en Modo hoy ---------- */
.gm-card h2 { display: flex; align-items: center; gap: 8px; }
.gm-card h2 svg { color: #EA4335; }
.gm-card.gm-off { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.gm-card.gm-off > div { flex: 1; min-width: 220px; }
.gm-card.gm-off h2 { margin-bottom: 2px; }
.gm-logo { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: rgba(234,67,53,.14); color: #EA4335; }
.gm-logo svg { width: 24px; height: 24px; }
.gm-head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gm-acct { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); padding: 4px 9px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); }
.gm-acct svg { width: 13px; height: 13px; color: var(--ok); }
.gm-list { display: flex; flex-direction: column; gap: 6px; }
.gm-list li { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 6px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.gm-list li.is-client { border-color: rgba(91,192,242,.35); background: rgba(91,192,242,.06); }
.gm-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 4px; color: inherit; font: inherit; text-align: left; cursor: pointer; border-radius: 10px; }
.gm-open:hover .gm-txt b { text-decoration: underline; text-decoration-color: var(--line-strong); }
.gm-av { width: 36px; height: 36px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; font-weight: 600; color: #fff; background: linear-gradient(135deg, #EA4335, #FBBC05); }
.gm-av.lg { width: 48px; height: 48px; font-size: 19px; }
.gm-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.gm-txt strong { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.gm-txt b { font-weight: 500; font-size: 14px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.gm-txt small { font-size: 12px; color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.gm-crm { display: inline-flex; align-items: center; gap: 3px; font-style: normal; font-size: 10.5px; font-weight: 600; padding: 1px 7px; border-radius: 99px; color: #5BC0F2; background: rgba(91,192,242,.14); }
.gm-crm svg { width: 11px; height: 11px; }
.gm-imp { font-style: normal; color: #F5D524; }
.gm-when { font-size: 12px; color: var(--faint); white-space: nowrap; align-self: flex-start; padding-top: 4px; }
.gm-acts { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.gm-empty { justify-content: center; color: var(--muted); font-size: 14px; padding: 14px !important; }
.gm-empty svg { color: var(--ok); }

/* ---------- Detalle de correo ---------- */
.gm-loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 50px 20px; color: var(--muted); }
.gm-dh { display: flex; gap: 14px; align-items: flex-start; min-width: 0; }
.gm-dh h2 { font-size: 19px; line-height: 1.25; }
.gm-dh .pill { margin-top: 6px; }
.gm-body {
  margin: 0; padding: 16px; border-radius: 12px; max-height: 46vh; overflow: auto;
  background: var(--surface-2); border: 1px solid var(--line);
  font: 14px/1.6 var(--font); white-space: pre-wrap; word-break: break-word; color: var(--text);
}
.gm-atts { display: flex; flex-direction: column; gap: 6px; }
.gm-atts li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); flex-wrap: wrap; }
.gm-atts li > svg { width: 16px; height: 16px; color: var(--blue-300); }
.gm-att-name { flex: 1; min-width: 140px; display: flex; flex-direction: column; font-size: 13.5px; overflow: hidden; }
.gm-att-name small { color: var(--faint); font-size: 11.5px; }
.gm-atts select { padding: 7px 9px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text); font: inherit; font-size: 13px; max-width: 190px; }
.gm-atts select option { background: var(--navy-700); }

/* ---------- Correos en la ficha del CRM ---------- */
.gm-mini { display: flex; flex-direction: column; gap: 4px; }
.gm-mini-row { width: 100%; display: flex; align-items: center; gap: 10px; padding: 7px 8px; border: 0; border-radius: 10px; background: var(--surface-2); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.gm-mini-row:hover { background: rgba(255,255,255,.07); }
.gm-mini-row > svg { width: 15px; height: 15px; color: var(--blue-300); flex-shrink: 0; }
.gm-mini-row span { min-width: 0; display: flex; flex-direction: column; }
.gm-mini-row b { font-weight: 500; font-size: 13.5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.gm-mini-row small { font-size: 12px; color: var(--muted); }
.gm-mini-row em { font-style: normal; color: #EA4335; font-weight: 600; }

/* ---------- Portada: Continuar con Google ---------- */
.google-btn { background: #fff; color: #1F1F1F; border-color: #DADCE0; font-weight: 600; gap: 10px; }
.google-btn:hover { background: #F7F8F8; }
.google-btn svg { width: 20px; height: 20px; }
.google-btn:disabled { opacity: .6; }
.g-also { font-size: 12.5px; margin-top: -4px; }
.auth-or { display: flex; align-items: center; gap: 10px; color: var(--faint); font-size: 12.5px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line-strong); }
.g-setup code { font-size: 12.5px; padding: 1px 6px; border-radius: 6px; background: rgba(255,255,255,.07); user-select: all; }
.g-setup[hidden] { display: none; }

@media (max-width: 760px) {
  .gm-list li { flex-wrap: wrap; }
  .gm-acts { width: 100%; justify-content: flex-end; }
  .gm-when { display: none; }
}
