﻿/* ============================================================
   INTEGRACAO -- integracao.css
   Design premium inspirado em landing.css
   ============================================================ */

/* Container centralizado (respeita sidebar) */
.intg-container {
     max-width: 1400px;
     margin-left: auto;
     margin-right: auto;
     padding-left: 48px;
     padding-right: 48px;
}

/* Hero / cabecalho da pagina */
.intg-hero {
     padding: 64px 0 56px;
     position: relative;
     overflow: hidden;
     background: linear-gradient(135deg,
               rgba(11, 105, 255, 0.05) 0%,
               rgba(124, 58, 237, 0.03) 45%,
               transparent 70%);
     border-bottom: 1px solid var(--border);
}

.intg-hero::before {
     content: '';
     position: absolute;
     top: -120px;
     right: -80px;
     width: 520px;
     height: 520px;
     border-radius: 50%;
     background: radial-gradient(circle, rgba(11, 105, 255, 0.08) 0%, transparent 65%);
     pointer-events: none;
}

html.dark-mode .intg-hero {
     background: linear-gradient(135deg,
               rgba(11, 105, 255, 0.1) 0%,
               rgba(124, 58, 237, 0.06) 45%,
               transparent 70%);
}

.intg-hero__badge {
     display: inline-flex;
     align-items: center;
     gap: 8px;
     background: rgba(11, 105, 255, 0.09);
     color: #0b69ff;
     border: 1px solid rgba(11, 105, 255, 0.22);
     padding: 6px 16px;
     border-radius: 20px;
     font-size: 0.75rem;
     font-weight: 700;
     text-transform: uppercase;
     letter-spacing: 0.07em;
     margin-bottom: 22px;
}

html.dark-mode .intg-hero__badge {
     background: rgba(11, 105, 255, 0.15);
     border-color: rgba(11, 105, 255, 0.3);
     color: #60a5fa;
}

.intg-hero h1 {
     font-size: 2.6rem;
     font-weight: 900;
     letter-spacing: -0.04em;
     color: var(--text);
     margin-bottom: 14px;
     line-height: 1.1;
}

.intg-hero p {
     font-size: 1.07rem;
     color: var(--muted);
     line-height: 1.65;
     max-width: 520px;
}

/* Area de conteudo */
.intg-content {
     padding-top: 52px;
     padding-bottom: 88px;
}

/* Grid de cards */
.intg-grid {
     display: flex;
     flex-direction: column;
     gap: 24px;
}

/* Card base */
.intg-card {
     background: var(--surface);
     border: 1px solid var(--border);
     border-radius: 18px;
     overflow: hidden;
     transition: box-shadow 0.22s ease, border-color 0.22s ease;
}

.intg-card:hover {
     box-shadow: 0 12px 40px rgba(0, 0, 0, 0.07);
     border-color: var(--border-2, #d4d4d8);
}

html.dark-mode .intg-card:hover {
     box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

/* Cabecalho do card */
.intg-card__head {
     display: flex;
     align-items: center;
     justify-content: space-between;
     padding: 26px 32px;
     border-bottom: 1px solid var(--border);
     gap: 20px;
     flex-wrap: wrap;
}

.intg-card__head-left {
     display: flex;
     align-items: center;
     gap: 16px;
}

.intg-card__icon {
     width: 50px;
     height: 50px;
     border-radius: 13px;
     display: flex;
     align-items: center;
     justify-content: center;
     font-size: 1.25rem;
     flex-shrink: 0;
}

.intg-card__icon--blue {
     background: rgba(11, 105, 255, 0.1);
     color: #0b69ff;
}

.intg-card__icon--green {
     background: rgba(34, 197, 94, 0.1);
     color: #22c55e;
}

.intg-card__icon--amber {
     background: rgba(245, 158, 11, 0.1);
     color: #f59e0b;
}

html.dark-mode .intg-card__icon--blue {
     background: rgba(11, 105, 255, 0.17);
}

html.dark-mode .intg-card__icon--green {
     background: rgba(34, 197, 94, 0.14);
}

html.dark-mode .intg-card__icon--amber {
     background: rgba(245, 158, 11, 0.14);
}

.intg-card__title {
     font-size: 1.07rem;
     font-weight: 700;
     color: var(--text);
     margin: 0 0 3px;
     letter-spacing: -0.01em;
}

.intg-card__sub {
     font-size: 0.82rem;
     color: var(--muted);
     margin: 0;
}

.intg-card__actions {
     display: flex;
     align-items: center;
     gap: 10px;
     flex-wrap: wrap;
}

.intg-card__body {
     padding: 30px 32px;
}

/* Status badge (pill) */
.intg-status {
     display: inline-flex;
     align-items: center;
     gap: 8px;
     padding: 7px 15px;
     border-radius: 20px;
     font-size: 0.82rem;
     font-weight: 700;
     letter-spacing: 0.01em;
}

.intg-status--connected {
     background: rgba(34, 197, 94, 0.1);
     color: #16a34a;
     border: 1px solid rgba(34, 197, 94, 0.25);
}

.intg-status--disconnected {
     background: rgba(239, 68, 68, 0.08);
     color: #dc2626;
     border: 1px solid rgba(239, 68, 68, 0.22);
}

html.dark-mode .intg-status--connected {
     background: rgba(34, 197, 94, 0.14);
     color: #4ade80;
}

html.dark-mode .intg-status--disconnected {
     background: rgba(239, 68, 68, 0.11);
     color: #f87171;
}

.intg-status__dot {
     width: 8px;
     height: 8px;
     border-radius: 50%;
     background: currentColor;
}

.intg-status--connected .intg-status__dot {
     animation: intg-pulse 1.8s ease-in-out infinite;
}

@keyframes intg-pulse {

     0%,
     100% {
          opacity: 1;
          transform: scale(1);
     }

     50% {
          opacity: 0.4;
          transform: scale(0.6);
     }
}

/* Estatisticas do card de status */
.intg-stats {
     display: grid;
     grid-template-columns: repeat(3, 1fr);
     gap: 1px;
     background: var(--border);
     border-radius: 12px;
     overflow: hidden;
     margin-bottom: 24px;
}

.intg-stat {
     background: var(--bg);
     padding: 22px 26px;
}

.intg-stat__lbl {
     display: block;
     font-size: 0.73rem;
     color: var(--muted);
     text-transform: uppercase;
     letter-spacing: 0.06em;
     font-weight: 600;
     margin-bottom: 7px;
}

.intg-stat__val {
     font-size: 1.1rem;
     font-weight: 800;
     color: var(--text);
     letter-spacing: -0.02em;
}

/* Mensagem de sincronizacao */
.intg-sync-msg {
     display: flex;
     align-items: center;
     gap: 12px;
     padding: 14px 20px;
     background: rgba(34, 197, 94, 0.07);
     border: 1px solid rgba(34, 197, 94, 0.2);
     border-radius: 10px;
     font-size: 0.9rem;
     color: #16a34a;
     font-weight: 500;
}

.intg-sync-msg--disconnected {
     background: rgba(239, 68, 68, 0.07);
     border-color: rgba(239, 68, 68, 0.2);
     color: #dc2626;
}

html.dark-mode .intg-sync-msg {
     background: rgba(34, 197, 94, 0.08);
     color: #4ade80;
     border-color: rgba(34, 197, 94, 0.18);
}

html.dark-mode .intg-sync-msg--disconnected {
     background: rgba(239, 68, 68, 0.11);
     color: #f87171;
     border-color: rgba(239, 68, 68, 0.18);
}

/* Botoes internos */
.intg-btn {
     display: inline-flex;
     align-items: center;
     gap: 8px;
     padding: 10px 20px;
     border-radius: 9px;
     font-size: 0.9rem;
     font-weight: 600;
     cursor: pointer;
     border: 1px solid transparent;
     transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease,
          box-shadow 0.2s ease, color 0.2s ease;
     white-space: nowrap;
     font-family: inherit;
}

.intg-btn--primary {
     background: #0b69ff;
     color: #fff;
     border-color: #0b69ff;
     box-shadow: 0 4px 12px rgba(11, 105, 255, 0.2);
}

.intg-btn--primary:hover {
     background: #0854cc;
     transform: translateY(-1px);
     box-shadow: 0 8px 18px rgba(11, 105, 255, 0.28);
}

.intg-btn--secondary {
     background: var(--surface);
     color: var(--text);
     border-color: var(--border);
}

.intg-btn--secondary:hover {
     background: var(--surface-2);
     border-color: var(--border-2, #d4d4d8);
}

.intg-btn--danger {
     background: transparent;
     color: #dc2626;
     border-color: rgba(239, 68, 68, 0.3);
}

.intg-btn--danger:hover {
     background: rgba(239, 68, 68, 0.07);
     border-color: rgba(239, 68, 68, 0.5);
}

html.dark-mode .intg-btn--danger {
     color: #f87171;
}

/* Formulario de conexao */
.intg-form {
     display: flex;
     flex-direction: column;
     gap: 20px;
}

.intg-form__row {
     display: grid;
     grid-template-columns: 1fr 270px;
     gap: 16px;
}

.intg-form__field {
     display: flex;
     flex-direction: column;
     gap: 8px;
}

.intg-form__label {
     font-size: 0.78rem;
     font-weight: 700;
     color: var(--text-2);
     text-transform: uppercase;
     letter-spacing: 0.06em;
}

.intg-form__input {
     width: 100%;
     padding: 13px 16px;
     font-size: 0.95rem;
     border: 1px solid var(--border);
     border-radius: 10px;
     background: var(--bg);
     color: var(--text);
     outline: none;
     transition: border-color 0.18s, box-shadow 0.18s;
     box-sizing: border-box;
     font-family: inherit;
}

.intg-form__input:focus {
     border-color: #0b69ff;
     box-shadow: 0 0 0 4px rgba(11, 105, 255, 0.1);
}

.intg-form__input::placeholder {
     color: var(--muted);
     font-size: 0.9rem;
}

html.dark-mode .intg-form__input {
     background: var(--surface-2);
     border-color: var(--border);
}

.intg-form__footer {
     display: flex;
     align-items: center;
     gap: 16px;
     flex-wrap: wrap;
}

.intg-form__hint {
     font-size: 0.82rem;
     color: var(--muted);
     display: flex;
     align-items: center;
     gap: 7px;
}

#integracao-error {
     display: flex;
     align-items: flex-start;
     gap: 8px;
     padding: 12px 16px;
     background: rgba(239, 68, 68, 0.06);
     border: 1px solid rgba(239, 68, 68, 0.2);
     border-radius: 10px;
     font-size: 0.87rem;
     color: #dc2626;
}

html.dark-mode #integracao-error {
     color: #f87171;
}

/* Instrucoes - steps */
.intg-steps {
     display: flex;
     flex-direction: column;
     margin-bottom: 24px;
}

.intg-step {
     display: flex;
     align-items: flex-start;
     gap: 18px;
     padding: 20px 0;
     border-bottom: 1px solid var(--border);
}

.intg-step:first-child {
     padding-top: 0;
}

.intg-step:last-child {
     border-bottom: none;
     padding-bottom: 0;
}

.intg-step__num {
     width: 36px;
     height: 36px;
     border-radius: 50%;
     background: rgba(11, 105, 255, 0.1);
     color: #0b69ff;
     font-size: 0.82rem;
     font-weight: 800;
     display: flex;
     align-items: center;
     justify-content: center;
     flex-shrink: 0;
     margin-top: 2px;
}

html.dark-mode .intg-step__num {
     background: rgba(11, 105, 255, 0.17);
     color: #60a5fa;
}

.intg-step__text {
     font-size: 0.97rem;
     color: var(--text-2);
     line-height: 1.65;
     margin: 0;
     padding-top: 5px;
}

.intg-step__text strong {
     color: var(--text);
}

/* Aviso tip */
.intg-tip {
     display: flex;
     gap: 14px;
     padding: 16px 20px;
     background: rgba(245, 158, 11, 0.07);
     border: 1px solid rgba(245, 158, 11, 0.25);
     border-radius: 12px;
}

.intg-tip i {
     color: #f59e0b;
     font-size: 1rem;
     margin-top: 3px;
     flex-shrink: 0;
}

.intg-tip p {
     font-size: 0.88rem;
     color: var(--text-2);
     line-height: 1.65;
     margin: 0;
}

.intg-tip p strong {
     color: var(--text);
}

/* Responsivo */
@media (max-width: 1100px) {
     .intg-container {
          padding-left: 36px;
          padding-right: 36px;
     }
}

@media (max-width: 768px) {
     .intg-hero {
          padding: 40px 0 34px;
     }

     .intg-hero h1 {
          font-size: 1.9rem;
     }

     .intg-content {
          padding-top: 36px;
          padding-bottom: 60px;
     }

     .intg-container {
          padding-left: 20px;
          padding-right: 20px;
     }

     .intg-stats {
          grid-template-columns: 1fr;
     }

     .intg-form__row {
          grid-template-columns: 1fr;
     }

     .intg-card__head {
          flex-direction: column;
          align-items: flex-start;
     }

     .intg-card__head,
     .intg-card__body {
          padding-left: 20px;
          padding-right: 20px;
     }
}