/* MeuDLive — Instalador CSS */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #0f172a;
    color: #e2e8f0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px 16px 64px;
}

/* ─── Cabeçalho ─────────────────────────────────────────────────────────────── */
.inst-header {
    text-align: center;
    margin-bottom: 32px;
}
.inst-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #f97316;
    letter-spacing: -0.5px;
}
.inst-header p {
    font-size: 14px;
    color: #94a3b8;
    margin-top: 6px;
}

/* ─── Stepper ────────────────────────────────────────────────────────────────── */
.inst-stepper {
    display: flex;
    gap: 0;
    margin-bottom: 32px;
    width: 100%;
    max-width: 680px;
}
.inst-step {
    flex: 1;
    text-align: center;
    position: relative;
}
.inst-step::after {
    content: '';
    position: absolute;
    top: 18px;
    right: -50%;
    width: 100%;
    height: 2px;
    background: #1e293b;
    z-index: 0;
}
.inst-step:last-child::after { display: none; }
.inst-step-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #1e293b;
    border: 2px solid #334155;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
    position: relative;
    z-index: 1;
    transition: all .3s;
}
.inst-step.active .inst-step-dot {
    background: #f97316;
    border-color: #f97316;
    color: #fff;
}
.inst-step.done .inst-step-dot {
    background: #22c55e;
    border-color: #22c55e;
    color: #fff;
}
.inst-step-label {
    font-size: 11px;
    color: #64748b;
    margin-top: 6px;
    display: block;
}
.inst-step.active .inst-step-label { color: #f97316; font-weight: 600; }
.inst-step.done .inst-step-label   { color: #22c55e; }

/* ─── Card de bloco ──────────────────────────────────────────────────────────── */
.inst-card {
    background: #1e293b;
    border-radius: 12px;
    padding: 28px 28px 24px;
    width: 100%;
    max-width: 680px;
    margin-bottom: 16px;
    border: 1px solid #334155;
}
.inst-card h2 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #f1f5f9;
}

/* ─── Formulário ─────────────────────────────────────────────────────────────── */
.inst-group {
    margin-bottom: 16px;
}
.inst-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 6px;
}
.inst-group input,
.inst-group select {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #334155;
    background: #0f172a;
    color: #f1f5f9;
    font-size: 14px;
    outline: none;
    transition: border-color .2s;
}
.inst-group input:focus,
.inst-group select:focus {
    border-color: #f97316;
}
.inst-group input.erro { border-color: #ef4444; }
.inst-group .hint {
    font-size: 11px;
    color: #64748b;
    margin-top: 4px;
}
.inst-cols {
    display: flex;
    gap: 12px;
}
.inst-cols .inst-group { flex: 1; }

/* ─── Botões ─────────────────────────────────────────────────────────────────── */
.inst-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 24px;
    border-radius: 8px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .2s, transform .1s;
}
.inst-btn:active { transform: scale(.97); }
.inst-btn-primary  { background: #f97316; color: #fff; }
.inst-btn-success  { background: #22c55e; color: #fff; }
.inst-btn-ghost    { background: transparent; color: #94a3b8; border: 1px solid #334155; }
.inst-btn:disabled { opacity: .5; cursor: not-allowed; }

/* ─── Alertas ────────────────────────────────────────────────────────────────── */
.inst-alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
    display: none;
    line-height: 1.6;
}
.inst-alert.show { display: block; }
.inst-alert-ok   { background: #14532d; border: 1px solid #22c55e; color: #86efac; }
.inst-alert-erro { background: #450a0a; border: 1px solid #ef4444; color: #fca5a5; }
.inst-alert-info { background: #1e3a5f; border: 1px solid #3b82f6; color: #93c5fd; }

/* ─── Log de requisitos / tabelas ────────────────────────────────────────────── */
.inst-log {
    background: #0f172a;
    border-radius: 8px;
    padding: 16px;
    font-family: monospace;
    font-size: 12px;
    max-height: 260px;
    overflow-y: auto;
    border: 1px solid #1e293b;
}
.inst-log-line {
    padding: 3px 0;
    border-bottom: 1px solid #1e293b;
    display: flex;
    gap: 8px;
    align-items: baseline;
}
.inst-log-line:last-child { border-bottom: none; }
.inst-log-line.ok   { color: #4ade80; }
.inst-log-line.warn { color: #facc15; }
.inst-log-line.fail { color: #f87171; font-weight: bold; }
.inst-log-icon { font-size: 11px; flex-shrink: 0; }

/* ─── Spinner ────────────────────────────────────────────────────────────────── */
.spin {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Tela de sucesso ────────────────────────────────────────────────────────── */
.inst-success {
    text-align: center;
    padding: 40px 20px;
}
.inst-success .icon { font-size: 64px; margin-bottom: 16px; }
.inst-success h2 { font-size: 24px; color: #22c55e; margin-bottom: 8px;}
.inst-success p  { color: #94a3b8; font-size: 14px; line-height: 1.7; }
.inst-success .inst-btn { margin-top: 24px; }

/* ─── Aviso de segurança ─────────────────────────────────────────────────────── */
.inst-warning-box {
    background: #422006;
    border: 1px solid #f97316;
    border-radius: 8px;
    padding: 14px 16px;
    font-size: 13px;
    color: #fdba74;
    margin-top: 12px;
    line-height: 1.6;
}
.inst-warning-box strong { color: #fb923c; }

/* ─── Rodapé ─────────────────────────────────────────────────────────────────── */
.inst-footer {
    font-size: 12px;
    color: #475569;
    margin-top: 24px;
    text-align: center;
}

/* ─── Responsivo ─────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .inst-card { padding: 20px 16px; }
    .inst-cols { flex-direction: column; gap: 0; }
    .inst-step-label { font-size: 10px; }
    .inst-stepper { gap: 0; }
}
