/* =====================================================================
   UI Flowbite — design system (CSS-only) aplicado sobre o Bootstrap 4.
   Escopo: tudo vive sob .ui-fb, então não afeta nenhuma outra tela.
   Piloto: tela de Cadastro. Não altera HTML lógico nem JavaScript.
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

.ui-fb {
    /* ---- Tokens (paleta Flowbite) ---- */
    --fb-primary:        #1a56db;   /* blue-700  */
    --fb-primary-hover:  #1e429f;   /* blue-800  */
    --fb-primary-ring:   rgba(26, 86, 219, .25);
    --fb-primary-text:   #1c64f2;   /* blue-600 (links) */

    --fb-gray-50:  #f9fafb;
    --fb-gray-100: #f3f4f6;
    --fb-gray-200: #e5e7eb;
    --fb-gray-300: #d1d5db;
    --fb-gray-400: #9ca3af;
    --fb-gray-500: #6b7280;
    --fb-gray-700: #374151;
    --fb-gray-900: #111827;

    --fb-radius:   .5rem;     /* 8px  */
    --fb-radius-lg:.75rem;    /* 12px */
    --fb-shadow:   0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);

    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    color: var(--fb-gray-900);
    -webkit-font-smoothing: antialiased;
}

/* ---------------------------------------------------------------- Card */
.ui-fb .card,
.ui-fb .card-painel {
    border: 1px solid var(--fb-gray-200);
    border-radius: var(--fb-radius-lg);
    box-shadow: var(--fb-shadow);
    background: #fff;
}

.ui-fb .card-header {
    background: #fff;
    border-bottom: 1px solid var(--fb-gray-100);
    padding: 1.5rem 1.5rem 1.25rem;
    border-top-left-radius: var(--fb-radius-lg);
    border-top-right-radius: var(--fb-radius-lg);
}

.ui-fb .card-body { padding: 1.25rem; }

.ui-fb .card-title,
.ui-fb h1.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--fb-gray-900);
    margin: 0;
    line-height: 1.25;
}

.ui-fb .card-subtitle {
    font-size: .95rem;
    font-weight: 400;
    color: var(--fb-gray-500);
}

.ui-fb .card-header span { color: var(--fb-gray-500); font-size: .85rem; font-weight: 500; }

/* ----------------------------------------------------------- Progress */
.ui-fb .progress {
    height: 8px;
    background: var(--fb-gray-200);
    border-radius: 999px;
    overflow: hidden;
}
.ui-fb .progress-bar {
    background: var(--fb-primary);
    border-radius: 999px;
}

/* -------------------------------------------------------------- Labels */
.ui-fb label {
    font-size: .875rem;
    font-weight: 500;
    color: var(--fb-gray-900);
    margin-bottom: .3rem;
    display: block;
}

/* -------------------------------------------------------------- Inputs */
.ui-fb .form-control {
    height: auto;
    padding: .5rem .75rem;
    font-size: .925rem;
    color: var(--fb-gray-900);
    background: var(--fb-gray-50);
    border: 1px solid var(--fb-gray-300);
    border-radius: var(--fb-radius);
    box-shadow: none;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.ui-fb .form-control::placeholder { color: var(--fb-gray-400); }
.ui-fb .form-control:focus {
    background: #fff;
    border-color: var(--fb-primary);
    box-shadow: 0 0 0 3px var(--fb-primary-ring);
    outline: none;
}

/* ------------------------------------------------------------- Buttons */
.ui-fb .btn-primary,
.ui-fb .btn-primary.btn-padrao {
    background: var(--fb-primary);
    border: 1px solid var(--fb-primary);
    border-radius: var(--fb-radius);
    font-weight: 700;
    font-size: .95rem;
    letter-spacing: .01em;
    box-shadow: none;
    transition: background .15s ease, box-shadow .15s ease;
}
.ui-fb .btn-primary:hover,
.ui-fb .btn-primary:focus,
.ui-fb .btn-primary:not(:disabled):not(.disabled):active {
    background: var(--fb-primary-hover);
    border-color: var(--fb-primary-hover);
    box-shadow: 0 0 0 3px var(--fb-primary-ring);
}
.ui-fb .btn-block { width: 100%; }

.ui-fb .btn-secondary {
    background: #fff;
    border: 1px solid var(--fb-gray-300);
    color: var(--fb-gray-700);
    border-radius: var(--fb-radius);
    font-weight: 600;
    box-shadow: none;
}
.ui-fb .btn-secondary:hover,
.ui-fb .btn-secondary:focus {
    background: var(--fb-gray-50);
    border-color: var(--fb-gray-400);
    color: var(--fb-gray-900);
}

/* ------------------------------------------------ Spinner inline em botões */
.ui-fb .btn-spinner {
    display: inline-block;
    width: 18px; height: 18px;
    border: 2.5px solid rgba(255,255,255,.45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ui-spin .6s linear infinite;
    vertical-align: -4px;
    margin-right: .5rem;
}
@keyframes ui-spin { to { transform: rotate(360deg); } }
.ui-fb .cta:disabled,
.ui-fb .btn:disabled { opacity: .9; cursor: default; }

/* ------------------------------------------------ Selects modernos (seta custom) */
.ui-fb select.form-control,
.ui-fb .field select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .7rem center;
    background-size: 16px 16px;
    padding-right: 2.25rem;
    cursor: pointer;
}

/* Validação visual de campo inválido */
.ui-fb .form-control.is-invalid {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220,38,38,.15);
}

/* -------------------------------------------------------------- Modal */
.ui-fb .modal-content { border: 0; border-radius: var(--fb-radius-lg); overflow: hidden; }
.ui-fb .modal-header,
.ui-fb .modal-footer { border-color: var(--fb-gray-100); }
.ui-fb .modal-title { font-weight: 700; color: var(--fb-gray-900); font-size: 1.1rem; }

/* Radius único para todos os botões (8px) */
.ui-fb .btn { border-radius: var(--fb-radius); }

/* Botões que são <a> não devem herdar o azul de link (.ui-fb a) */
.ui-fb a.btn { color: inherit; }
.ui-fb a.btn:hover { color: inherit; }
.ui-fb a.btn-primary, .ui-fb a.btn-success, .ui-fb a.btn-danger,
.ui-fb a.btn-info, .ui-fb a.btn-warning, .ui-fb a.btn-dark,
.ui-fb a.btn-primary:hover, .ui-fb a.btn-success:hover, .ui-fb a.btn-danger:hover,
.ui-fb a.btn-info:hover, .ui-fb a.btn-warning:hover, .ui-fb a.btn-dark:hover { color: #fff; }

/* ------------------------------------------ Tela de status (obrigado/erro/aguardando) */
.ui-fb .status-screen { text-align: center; padding: .5rem 0 1.25rem; }
.ui-fb .status-screen__icon { display: block; font-size: 56px; line-height: 1; margin-bottom: .85rem; }
.ui-fb .status-screen__title { font-size: 1.55rem; font-weight: 700; color: var(--fb-gray-900); margin: 0 0 .5rem; line-height: 1.2; }
.ui-fb .status-screen__subtitle { font-size: .98rem; color: var(--fb-gray-500); line-height: 1.55; margin: 0 auto; max-width: 27rem; }
.ui-fb .status-screen--sucesso    .status-screen__icon { color: #16a34a; }
.ui-fb .status-screen--erro       .status-screen__icon { color: #dc2626; }
.ui-fb .status-screen--aguardando .status-screen__icon { color: #f59e0b; }
.ui-fb .status-screen--aguardando .status-screen__title { color: #b45309; }

/* --------------------------------------------------------- Links/Text */
.ui-fb a { color: var(--fb-primary-text); }
.ui-fb a:hover { color: var(--fb-primary-hover); }
.ui-fb .text-primary { color: var(--fb-primary-text) !important; }
.ui-fb .text-muted   { color: var(--fb-gray-500) !important; }

/* -------------------------------------------------- Espaçamento campos */
.ui-fb .form-group { margin-bottom: .8rem; }

/* ----------------------------------------------------- Hero (título) */
.ui-fb .cad-hero { margin-bottom: 1.1rem; }
.ui-fb .cad-hero__title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--fb-gray-900);
    line-height: 1.2;
    margin: 0 0 .4rem;
}
.ui-fb .cad-hero__subtitle {
    font-size: 1rem;
    font-weight: 400;
    color: var(--fb-gray-500);
    margin: 0;
}

/* ------------------------------------------------ Card do plano (resumo) */
.ui-fb div.link-periodo {
    background: #eff6ff !important;          /* blue-50  */
    border: 1px solid #bfdbfe;               /* blue-200 */
    border-left: 4px solid var(--fb-primary);
    border-radius: var(--fb-radius);
    padding: 1rem 1.25rem;
    box-shadow: none;
    margin-bottom: 1.5rem !important;
}
.ui-fb div.link-periodo .tit {
    font-size: 1.05rem;
    font-weight: 400;                 /* "Plano" e demais em peso normal */
    color: var(--fb-gray-900);
    margin-bottom: .35rem !important;
}
.ui-fb div.link-periodo .plano-nome {
    font-weight: 700;                 /* só o nome em negrito */
    text-transform: uppercase;        /* e maiúsculo */
}
.ui-fb div.link-periodo small.text-muted { color: var(--fb-gray-400); }

/* Valor único/recorrente (cartão sem parcelamento — plano mensal) */
.ui-fb .valor-recorrente {
    display: flex;
    flex-direction: column;
    gap: .1rem;
    background: #f1f7ff;
    border: 1px solid #cfe1ff;
    border-radius: 10px;
    padding: .85rem 1rem;
}
.ui-fb .valor-recorrente__label {
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: var(--fb-gray-500);
}
.ui-fb .valor-recorrente__valor {
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--fb-gray-900);
    line-height: 1.1;
}

/* Título "Escolha o período" no dashboard */
.ui-fb .dash-escolha { font-size: 1rem; color: var(--fb-gray-700); margin-bottom: 1rem; }
.ui-fb .dash-escolha strong { font-weight: 600; }

/* ----------------------------------- Cards de seleção de período (dashboard) */
.ui-fb a.link-periodo {
    display: block;
    background: #fff;
    border: 1.5px solid var(--fb-gray-200);
    border-radius: var(--fb-radius-lg);
    padding: 1.1rem 1.25rem;
    margin-bottom: .85rem;
    color: var(--fb-gray-900);
    text-decoration: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.ui-fb a.link-periodo:hover {
    border-color: var(--fb-primary);
    box-shadow: 0 0 0 3px var(--fb-primary-ring);
    color: var(--fb-gray-900);
    text-decoration: none;
}
.ui-fb a.link-periodo .tit {
    display: block;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--fb-gray-900);
    margin-bottom: .2rem;
}
.ui-fb a.link-periodo .tit .desconto { font-size: .78rem; font-weight: 600; }
.ui-fb a.link-periodo .vl { display: block; color: var(--fb-gray-700); font-size: .9rem; line-height: 1.5; }
.ui-fb a.link-periodo .vl .text-primary { font-weight: 700; }

/* Badge do período (Mensal/Anual...) */
.ui-fb .badge-periodo {
    display: inline-block;
    vertical-align: middle;
    font-weight: 600;
    font-size: .7rem;
    letter-spacing: .02em;
    padding: .3em .6em;
    border-radius: .4rem;
    background: #1f2937;       /* slate-800 */
    color: #fff;
    margin-left: .35rem;
    position: relative;
    top: -1px;
}

/* ------------------------------------------------ Seções do formulário */
.ui-fb .form-section-head {
    margin: 1.2rem 0 .8rem;
    padding-bottom: .45rem;
    border-bottom: 1px solid var(--fb-gray-100);
}
.ui-fb .form-section-head:first-of-type { margin-top: .25rem; }
.ui-fb .form-section-head__title {
    display: block;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--fb-gray-900);
}
.ui-fb .form-section-head__hint {
    display: block;
    font-size: .85rem;
    color: var(--fb-gray-500);
    margin-top: .15rem;
}
