/* ════════════════════════════════════════════════════════════════
   CL FLUX — Tela de Seleção de Empresa
   css/style-empresa.css
   Arquivo independente — não depende de nenhum outro CSS do projeto
   ════════════════════════════════════════════════════════════════ */

/* ── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg:           #080a10;
  --surface:      #10141f;
  --surface2:     #181d2e;
  --border:       rgba(255,255,255,.07);
  --border-focus: rgba(99,140,255,.55);
  --text:         #eef0f8;
  --text-muted:   #6b7399;
  --text-dim:     #3e4560;
  --accent:       #4f7bff;
  --accent-glow:  rgba(79,123,255,.22);
  --danger:       #ef4444;
  --success:      #22c55e;
  --radius-sm:    10px;
  --radius:       16px;
  --radius-lg:    22px;
  --font:         'Inter', system-ui, -apple-system, sans-serif;
  --transition:   .2s cubic-bezier(.4,0,.2,1);
}

html, body {
  height: 100%;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Fundo: grade e orbs ───────────────────────────────────── */
.clf-bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(79,123,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79,123,255,.035) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
}

.clf-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
  animation: clfOrbFloat 10s ease-in-out infinite alternate;
}
.clf-orb-1 {
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(79,123,255,.18), transparent 68%);
  top: -160px; right: -100px;
  animation-delay: 0s;
}
.clf-orb-2 {
  width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(120,80,255,.14), transparent 68%);
  bottom: -80px; left: -80px;
  animation-delay: -5s;
}

@keyframes clfOrbFloat {
  from { transform: scale(1)    translateY(0px); }
  to   { transform: scale(1.1)  translateY(-24px); }
}

/* ── Página principal ──────────────────────────────────────── */
.clf-page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px 64px;
  gap: 0;
}

/* ── Logo / Brand ──────────────────────────────────────────── */
.clf-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin-bottom: 40px;
  animation: clfFadeUp .55s ease both;
}

.clf-logo-wrap {
  width: 88px;
  height: 88px;
  border-radius: 26px;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  box-shadow: 0 12px 40px rgba(0,0,0,.45), 0 0 0 1px rgba(79,123,255,.08);
  overflow: hidden;
}

.clf-logo-wrap img {
  width: 68px;
  height: 68px;
  object-fit: contain;
}

.clf-app-name {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -.6px;
  color: var(--text);
}

.clf-app-sub {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 5px;
  text-align: center;
  line-height: 1.5;
}

/* ── Card central ──────────────────────────────────────────── */
.clf-card {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px 28px;
  box-shadow: 0 24px 60px rgba(0,0,0,.5);
  animation: clfFadeUp .55s .08s ease both;
}

/* ── Campo de busca ────────────────────────────────────────── */
.clf-field-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .7px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.clf-field-label i {
  font-size: 11px;
  color: var(--accent);
}

.clf-input-wrap {
  position: relative;
}

.clf-input-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 15px;
  pointer-events: none;
  transition: color var(--transition);
}

.clf-input {
  width: 100%;
  height: 52px;
  padding: 0 48px 0 46px;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 500;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
}

.clf-input::placeholder {
  color: var(--text-dim);
  font-weight: 400;
}

.clf-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.clf-input:focus + .clf-input-icon,
.clf-input-wrap:focus-within .clf-input-icon {
  color: var(--accent);
}

/* Botão limpar input */
.clf-input-clear {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 14px;
  padding: 4px;
  border-radius: 50%;
  display: none;
  line-height: 1;
  transition: color var(--transition);
}
.clf-input-clear:hover { color: var(--text); }
.clf-input-clear.show  { display: flex; align-items: center; justify-content: center; }

/* ── Resultado da busca ────────────────────────────────────── */
.clf-result {
  margin-top: 12px;
  min-height: 0;
  transition: min-height var(--transition);
}

/* Card de empresa encontrada */
.clf-empresa-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  background: var(--surface2);
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  animation: clfFadeUp .25s ease both;
  position: relative;
  overflow: hidden;
}

.clf-empresa-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--e-cor1, var(--accent)), var(--e-cor2, #7855ff));
  opacity: 0;
  transition: opacity var(--transition);
  border-radius: inherit;
}

.clf-empresa-card:hover {
  border-color: var(--e-cor1, var(--accent));
  box-shadow: 0 8px 30px rgba(0,0,0,.3), 0 0 20px var(--e-glow, var(--accent-glow));
  transform: translateY(-2px);
}

.clf-empresa-card:hover::before { opacity: .06; }
.clf-empresa-card:active        { transform: scale(.98); }

.clf-emp-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #fff;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.clf-emp-body {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.clf-emp-nome {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.clf-emp-url {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.clf-emp-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  margin-top: 4px;
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: .4px;
}

.clf-emp-arrow {
  color: var(--text-muted);
  font-size: 13px;
  position: relative;
  z-index: 1;
  transition: transform var(--transition), color var(--transition);
}
.clf-empresa-card:hover .clf-emp-arrow {
  transform: translateX(4px);
  color: var(--e-cor1, var(--accent));
}

/* Estado vazio / não encontrado */
.clf-not-found {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 0 8px;
  text-align: center;
  animation: clfFadeUp .25s ease both;
}
.clf-not-found.show { display: flex; }
.clf-not-found i    { font-size: 28px; color: var(--text-dim); }
.clf-not-found p    { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.clf-not-found strong { color: var(--text); }

/* Dica de atalho */
.clf-hint {
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
  margin-top: 14px;
  line-height: 1.6;
}
.clf-hint kbd {
  font-family: var(--font);
  font-size: 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 5px;
  color: var(--text-muted);
}

/* ── Divisor ───────────────────────────────────────────────── */
.clf-divider {
  width: 100%;
  max-width: 440px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
  animation: clfFadeUp .55s .14s ease both;
}
.clf-divider::before,
.clf-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.clf-divider span {
  font-size: 11px;
  color: var(--text-dim);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* ── Botão de contato ──────────────────────────────────────── */
.clf-btn-contato {
  width: 100%;
  max-width: 440px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
  animation: clfFadeUp .55s .18s ease both;
}
.clf-btn-contato i { font-size: 16px; color: #25d366; }
.clf-btn-contato:hover {
  border-color: #25d366;
  background: rgba(37,211,102,.06);
  color: var(--text);
}
.clf-btn-contato:active { transform: scale(.98); }

/* ── Rodapé ────────────────────────────────────────────────── */
.clf-footer {
  margin-top: 32px;
  text-align: center;
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.7;
  animation: clfFadeUp .55s .25s ease both;
}

/* ── Overlay de redirecionamento ───────────────────────────── */
.clf-redirect {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  animation: clfFadeIn .25s ease;
}
.clf-redirect.show { display: flex; }

.clf-redirect-icon {
  width: 76px;
  height: 76px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  color: #fff;
  animation: clfPulse 1.4s ease-in-out infinite;
}

.clf-redirect-nome {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.clf-redirect-url {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: -10px;
}

.clf-progress-bar {
  width: 180px;
  height: 3px;
  border-radius: 3px;
  background: var(--surface2);
  overflow: hidden;
}

.clf-progress-fill {
  height: 100%;
  border-radius: 3px;
  width: 0%;
  transition: width 1.8s cubic-bezier(.4,0,.2,1);
}

.clf-redirect-msg {
  font-size: 12px;
  color: var(--text-dim);
}

/* ── Animações ─────────────────────────────────────────────── */
@keyframes clfFadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0);    }
}

@keyframes clfFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes clfPulse {
  0%,100% { transform: scale(1);    box-shadow: 0 0 0 0   rgba(79,123,255,.4); }
  50%     { transform: scale(1.06); box-shadow: 0 0 0 14px rgba(79,123,255,0); }
}

/* ── Responsivo ────────────────────────────────────────────── */
@media (max-width: 480px) {
  .clf-card          { padding: 24px 18px 20px; border-radius: var(--radius); }
  .clf-app-name      { font-size: 22px; }
  .clf-logo-wrap     { width: 76px; height: 76px; border-radius: 22px; }
  .clf-logo-wrap img { width: 56px; height: 56px; }
}
