/* ============================================================
   NicoChat — página /app-mobile (reescrita à mão)
   Depende de css/styles.css (tokens, navbar, botões, footer)
   ============================================================ */

/* ---------- Hero ---------- */
.app-hero {
  padding: 72px 0 96px;
  background:
    radial-gradient(70% 90% at 78% 8%, rgba(0, 153, 255, 0.14), transparent 62%),
    radial-gradient(50% 60% at 5% 95%, rgba(0, 153, 255, 0.08), transparent 60%),
    var(--white);
  overflow: hidden;
}

.app-hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.app-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 153, 255, 0.09);
  color: var(--blue);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.875rem;
  padding: 7px 14px 7px 7px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.app-eyebrow img { width: 26px; height: 26px; border-radius: 8px; }

.app-hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--navy);
  font-size: clamp(2.25rem, 4.8vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}

.app-hero-sub {
  font-size: 1.125rem;
  color: var(--muted);
  max-width: 520px;
  margin-bottom: 32px;
}

/* ---------- Badges das lojas ---------- */
.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}
.store-badge {
  display: block;
  transition: transform 0.2s ease, filter 0.2s ease;
}
.store-badge img { height: 52px; width: auto; }
.store-badge:hover { transform: translateY(-2px); filter: brightness(1.08); }

.store-note {
  margin-top: 18px;
  font-size: 0.9375rem;
  color: var(--muted);
}
.store-note strong { color: var(--navy); }

/* ---------- Lista de destaques do hero ---------- */
.app-hero-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 28px;
}
.app-hero-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9375rem;
  color: var(--text);
}
.app-hero-list svg { width: 18px; height: 18px; color: var(--blue); flex: 0 0 auto; }

/* ---------- Palco do aparelho ---------- */
.device-stage {
  position: relative;
  display: flex;
  justify-content: center;
}
.device-stage::before {
  content: "";
  position: absolute;
  inset: 8% -12% 4%;
  background: radial-gradient(closest-side, rgba(0, 153, 255, 0.22), transparent 72%);
  filter: blur(6px);
  z-index: 0;
}
.device-stage .device { z-index: 1; }

/* Cartão de notificação flutuante */
.float-card {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px 16px;
  box-shadow: 0 18px 40px rgba(6, 11, 22, 0.16);
  animation: float-y 5s ease-in-out infinite;
}
.float-card-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(0, 153, 255, 0.12);
  color: var(--blue);
}
.float-card-icon svg { width: 19px; height: 19px; }
.float-card strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--navy);
  font-size: 0.875rem;
  line-height: 1.3;
}
.float-card span { font-size: 0.8125rem; color: var(--muted); }

.float-card-a { top: 8%; left: -6%; }
.float-card-b { bottom: 12%; right: -8%; animation-delay: -2.5s; }

@keyframes float-y {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@media (prefers-reduced-motion: reduce) {
  .float-card, .device-typing span { animation: none; }
}

/* ============================================================
   APARELHO (mockup 100% CSS)
   ============================================================ */
.device {
  position: relative;
  width: 100%;
  max-width: 300px;
  aspect-ratio: 9 / 19.2;
  padding: 11px;
  border-radius: 46px;
  background: linear-gradient(155deg, #3a4566 0%, #0b1020 42%, #10182c 100%);
  box-shadow:
    0 44px 80px -24px rgba(6, 11, 22, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.10) inset;
}
.device::after {
  content: "";
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 84px;
  height: 23px;
  background: #05070f;
  border-radius: 999px;
  z-index: 4;
}

.device-screen {
  position: relative;
  height: 100%;
  border-radius: 36px;
  overflow: hidden;
  background: var(--white);
  display: flex;
  flex-direction: column;
  font-size: 11px;
  line-height: 1.35;
  color: #101828;
}

/* Barra de status */
.device-status {
  flex: 0 0 auto;
  height: 42px;
  padding: 12px 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--white);
  font-size: 10.5px;
  font-weight: 700;
  color: #101828;
}
.device-status-icons { display: flex; align-items: center; gap: 4px; }
.device-status-icons i {
  display: block;
  width: 3px;
  border-radius: 1px;
  background: #101828;
}
.device-status-icons i:nth-child(1) { height: 5px; }
.device-status-icons i:nth-child(2) { height: 7px; }
.device-status-icons i:nth-child(3) { height: 9px; }
.device-status-icons i:nth-child(4) { height: 11px; }
.device-status-icons b {
  width: 17px;
  height: 9px;
  margin-left: 3px;
  border: 1.2px solid #101828;
  border-radius: 3px;
  position: relative;
}
.device-status-icons b::before {
  content: "";
  position: absolute;
  inset: 1.5px;
  right: 5px;
  background: #101828;
  border-radius: 1px;
}

/* Cabeçalho do app */
.device-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 14px 12px;
  background: var(--white);
}
.device-bar-chat { border-bottom: 1px solid #e7ecf3; }
.device-bar-back {
  width: 8px;
  height: 8px;
  border-left: 2px solid #667085;
  border-bottom: 2px solid #667085;
  transform: rotate(45deg);
  flex: 0 0 auto;
}
.device-bar h4 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  color: #101828;
  line-height: 1.2;
}
.device-bar p { font-size: 9.5px; color: #98a2b3; }
.device-bar-title { flex: 1; min-width: 0; }
.device-bar-title h4, .device-bar-title p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.device-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  color: #101828;
  flex: 1;
}

/* Avatar com iniciais */
.av {
  position: relative;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 10.5px;
  color: var(--white);
  background: var(--blue);
}
.av-sm { width: 24px; height: 24px; font-size: 9.5px; }
.av-1 { background: linear-gradient(135deg, #0099ff, #0062ff); }
.av-2 { background: linear-gradient(135deg, #ff8a3d, #ff3d00); }
.av-3 { background: linear-gradient(135deg, #22c55e, #0f9d58); }
.av-4 { background: linear-gradient(135deg, #a855f7, #6d28d9); }
.av-5 { background: linear-gradient(135deg, #f59e0b, #d97706); }

/* Selo de canal no avatar */
.av-ch {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 1.5px solid var(--white);
  display: grid;
  place-items: center;
}
.av-ch svg { width: 7.5px; height: 7.5px; color: var(--white); }
.ch-wa { background: #25d366; }
.ch-ig { background: linear-gradient(135deg, #f9ce34, #ee2a7b 55%, #6228d7); }
.ch-fb { background: #1877f2; }
.ch-tg { background: #29a9eb; }

/* Pílula de status */
.pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  background: rgba(34, 197, 94, 0.14);
  color: #0f9d58;
}
.pill::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.pill-blue { background: rgba(0, 153, 255, 0.14); color: var(--blue); }

/* Conversa */
.device-chat {
  flex: 1;
  overflow: hidden;
  padding: 12px 12px 6px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 7px;
  background:
    radial-gradient(circle at 20% 10%, rgba(0, 153, 255, 0.06), transparent 45%),
    #eef2f8;
}
.device-day {
  align-self: center;
  background: rgba(16, 24, 40, 0.06);
  color: #667085;
  font-size: 8.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  margin-bottom: 2px;
}
.msg {
  max-width: 82%;
  padding: 8px 10px;
  border-radius: 14px;
  font-size: 10.5px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.07);
}
.msg-in {
  align-self: flex-start;
  background: var(--white);
  border-bottom-left-radius: 5px;
  color: #344054;
}
.msg-out {
  align-self: flex-end;
  background: linear-gradient(135deg, #0099ff, #0072e5);
  color: var(--white);
  border-bottom-right-radius: 5px;
}
.msg-time {
  display: block;
  margin-top: 3px;
  font-size: 8px;
  opacity: 0.65;
  text-align: right;
}
.msg-tag {
  display: block;
  margin-bottom: 4px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--blue);
}
.msg-out .msg-tag { color: rgba(255, 255, 255, 0.8); }

.device-typing {
  align-self: flex-start;
  display: flex;
  gap: 3px;
  background: var(--white);
  padding: 9px 11px;
  border-radius: 14px;
  border-bottom-left-radius: 5px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.07);
}
.device-typing span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #c3ccd9;
  animation: typing 1.3s ease-in-out infinite;
}
.device-typing span:nth-child(2) { animation-delay: 0.18s; }
.device-typing span:nth-child(3) { animation-delay: 0.36s; }

@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-3px); opacity: 1; }
}

/* Ações rápidas do atendente */
.device-actions {
  flex: 0 0 auto;
  display: flex;
  gap: 6px;
  padding: 8px 12px;
  background: var(--white);
  border-top: 1px solid #e7ecf3;
  overflow: hidden;
}
.device-actions span {
  flex: 0 0 auto;
  font-size: 9px;
  font-weight: 600;
  color: #475467;
  background: #f2f5f9;
  border: 1px solid #e7ecf3;
  padding: 5px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.device-actions span.is-on {
  background: rgba(0, 153, 255, 0.10);
  border-color: rgba(0, 153, 255, 0.28);
  color: var(--blue);
}

/* Campo de mensagem */
.device-input {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 10px;
  background: var(--white);
}
.device-input i {
  flex: 1;
  height: 28px;
  border-radius: 999px;
  background: #f2f5f9;
  border: 1px solid #e7ecf3;
}
.device-input b {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--blue);
  display: grid;
  place-items: center;
}
.device-input b::before {
  content: "";
  width: 0;
  height: 0;
  border-left: 8px solid var(--white);
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  margin-left: 2px;
}

/* Busca */
.device-search {
  flex: 0 0 auto;
  margin: 0 14px 10px;
  height: 30px;
  border-radius: 10px;
  background: #f2f5f9;
  border: 1px solid #e7ecf3;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  font-size: 10px;
  color: #98a2b3;
}
.device-search svg { width: 12px; height: 12px; flex: 0 0 auto; }

/* Listas (contatos / espaços) */
.device-list {
  flex: 1;
  overflow: hidden;
  background: var(--white);
  padding: 0 14px;
}
.device-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f3f8;
}
.device-row:last-child { border-bottom: none; }
.device-row-main { flex: 1; min-width: 0; }
.device-row-main strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  color: #101828;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.device-row-main p {
  font-size: 9.5px;
  color: #98a2b3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.device-row-meta {
  flex: 0 0 auto;
  font-size: 8.5px;
  color: #98a2b3;
  text-align: right;
}
.device-chips { display: flex; gap: 4px; margin-top: 4px; flex-wrap: wrap; }
.device-chips span {
  font-size: 8px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(0, 153, 255, 0.10);
  color: var(--blue);
}
.device-chips span.chip-2 { background: rgba(255, 61, 0, 0.10); color: #e03600; }
.device-chips span.chip-3 { background: rgba(34, 197, 94, 0.12); color: #0f9d58; }

.device-badge {
  flex: 0 0 auto;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--blue);
  color: var(--white);
  font-size: 8.5px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

/* Cartão de espaço de trabalho */
.ws {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 12px;
  color: var(--white);
}

/* Barra de abas */
.device-tabs {
  flex: 0 0 auto;
  display: flex;
  background: var(--white);
  border-top: 1px solid #e7ecf3;
  padding: 8px 0 14px;
}
.device-tabs div {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 8.5px;
  font-weight: 600;
  color: #98a2b3;
}
.device-tabs div.is-active { color: var(--blue); }
.device-tabs svg { width: 16px; height: 16px; }

/* ============================================================
   RECURSOS
   ============================================================ */
.app-features { padding: 96px 0; background: var(--bg-soft); }

.app-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.app-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.app-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 153, 255, 0.35);
  box-shadow: var(--shadow-lg);
}
.app-card-icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: rgba(0, 153, 255, 0.10);
  color: var(--blue);
  margin-bottom: 18px;
}
.app-card-icon svg { width: 23px; height: 23px; }
.app-card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--navy);
  font-size: 1.125rem;
  margin-bottom: 8px;
}
.app-card p { font-size: 0.9688rem; color: var(--muted); }

/* ============================================================
   TELAS DO APP
   ============================================================ */
.app-screens { padding: 96px 0; }

.screens-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  align-items: start;
  justify-items: center;
}
.screen-item { max-width: 300px; }
.screen-item .device { margin: 0 auto 24px; }
.screen-item h3 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--navy);
  font-size: 1.125rem;
  text-align: center;
  margin-bottom: 6px;
}
.screen-item p {
  font-size: 0.9375rem;
  color: var(--muted);
  text-align: center;
}

/* ============================================================
   PASSOS
   ============================================================ */
.app-steps { padding: 96px 0; background: var(--bg-soft); }

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  counter-reset: step;
}
.step {
  position: relative;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-card);
}
.step::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.125rem;
  margin-bottom: 18px;
}
.step h3 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--navy);
  font-size: 1.125rem;
  margin-bottom: 8px;
}
.step p { font-size: 0.9688rem; color: var(--muted); }
.step a { color: var(--blue); font-weight: 600; }
.step a:hover { text-decoration: underline; }

/* ============================================================
   CTA FINAL
   ============================================================ */
.app-cta {
  padding: 88px 0;
  background:
    radial-gradient(80% 130% at 82% 8%, rgba(0, 153, 255, 0.28), transparent 55%),
    linear-gradient(135deg, var(--dark) 0%, var(--navy-3) 100%);
}
.app-cta-inner {
  display: flex;
  align-items: center;
  gap: 48px;
  justify-content: center;
}
.app-cta-icon {
  width: 108px;
  height: 108px;
  flex: 0 0 auto;
  border-radius: 26px;
  background: var(--white);
  padding: 14px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.35);
}
.app-cta-copy h2 {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--white);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  line-height: 1.15;
  margin-bottom: 12px;
  max-width: 560px;
}
.app-cta-copy p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 1.125rem;
  margin-bottom: 28px;
  max-width: 520px;
}
/* badges pretos sobre fundo escuro precisam de contorno */
.app-cta .store-badge img {
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.28);
}

/* ============================================================
   RESPONSIVO
   ============================================================ */
@media (max-width: 1024px) {
  .app-grid { grid-template-columns: repeat(2, 1fr); }
  .screens-row { grid-template-columns: 1fr; gap: 56px; }
  .steps-grid { grid-template-columns: 1fr; }
  .float-card-a { left: -2%; }
  .float-card-b { right: -2%; }
}

@media (max-width: 860px) {
  .app-hero { padding: 48px 0 72px; }
  .app-hero-inner { grid-template-columns: 1fr; gap: 56px; text-align: center; }
  .app-hero-sub { margin-left: auto; margin-right: auto; }
  .store-badges, .app-hero-list { justify-content: center; }
  .app-grid { grid-template-columns: 1fr; }
  .app-cta-inner { flex-direction: column; text-align: center; }
  .app-cta-copy h2, .app-cta-copy p { margin-left: auto; margin-right: auto; }
  .app-cta .store-badges { justify-content: center; }
}

@media (max-width: 560px) {
  .float-card { display: none; }
  .store-badge img { height: 46px; }
  .app-features, .app-screens, .app-steps { padding: 64px 0; }
}
