/* =============================================================
   UAIZABBIX - Estilo inspirado em zabbix.com
   Paleta:
     --zbx-red       #D40000  (primaria)
     --zbx-red-dark  #A00000  (hover/pressed)
     --zbx-red-soft  #FFEBEB  (destaque suave)
     --zbx-ink       #1F2D3D  (texto principal)
     --zbx-ink-soft  #4B5563  (texto secundario)
     --zbx-bg        #FFFFFF
     --zbx-bg-alt    #F4F6F8
     --zbx-border    #DDE2E7
   ============================================================= */

:root {
    --zbx-red:       #D40000;
    --zbx-red-dark:  #A00000;
    --zbx-red-soft:  #FFEBEB;
    --zbx-ink:       #1F2D3D;
    --zbx-ink-soft:  #4B5563;
    --zbx-bg:        #FFFFFF;
    --zbx-bg-alt:    #F4F6F8;
    --zbx-border:    #DDE2E7;
    --zbx-success:   #1E8E3E;
    --zbx-error:     #C62828;
    --zbx-radius:    6px;
    --zbx-shadow:    0 2px 8px rgba(31, 45, 61, .08);
    --zbx-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--zbx-bg-alt);
    color: var(--zbx-ink);
    font-family: var(--zbx-font);
    font-size: 16px;
    line-height: 1.5;
}

a { color: var(--zbx-red); text-decoration: none; }
a:hover { color: var(--zbx-red-dark); text-decoration: underline; }

.uaiz-container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ----------- Header ----------- */
.uaiz-header {
    background: var(--zbx-bg);
    border-top: 4px solid var(--zbx-red);
    box-shadow: var(--zbx-shadow);
    position: sticky;
    top: 0;
    z-index: 10;
}
.uaiz-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
}
.uaiz-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--zbx-ink);
    font-weight: 700;
    font-size: 20px;
    letter-spacing: .3px;
}
.uaiz-logo:hover { text-decoration: none; }
.uaiz-logo img {
    height: 44px;
    width: auto;
    display: block;
}
.uaiz-logo__text { color: var(--zbx-red); }
.uaiz-nav a {
    margin-left: 18px;
    color: var(--zbx-ink-soft);
    font-weight: 500;
}
.uaiz-nav a:hover { color: var(--zbx-red); }

/* ----------- Hero ----------- */
.uaiz-hero {
    background: linear-gradient(135deg, var(--zbx-red) 0%, var(--zbx-red-dark) 100%);
    color: #fff;
    padding: 48px 0;
    margin-bottom: 32px;
}
.uaiz-hero h1 {
    margin: 0 0 8px;
    font-size: 32px;
    font-weight: 700;
}
.uaiz-hero h1 strong { color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,.15); }
.uaiz-hero p { margin: 0; opacity: .92; max-width: 720px; }

/* ----------- Form wrapper ----------- */
.uaiz-form-wrap {
    padding-bottom: 64px;
}
.uaiz-form {
    background: var(--zbx-bg);
    border: 1px solid var(--zbx-border);
    border-radius: var(--zbx-radius);
    box-shadow: var(--zbx-shadow);
    padding: 32px;
}
.uaiz-form fieldset {
    border: none;
    padding: 0 0 24px 0;
    margin: 0 0 24px 0;
    border-bottom: 1px solid var(--zbx-border);
}
.uaiz-form fieldset:last-of-type {
    border-bottom: none;
    margin-bottom: 8px;
}
.uaiz-form legend {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--zbx-red);
    font-weight: 700;
    padding: 0 0 12px 0;
}

/* Grid de campos */
.uaiz-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 20px;
}
.uaiz-field--full { grid-column: 1 / -1; }

.uaiz-field { display: flex; flex-direction: column; }
.uaiz-field label {
    font-size: 14px;
    font-weight: 600;
    color: var(--zbx-ink);
    margin-bottom: 6px;
}
.uaiz-field .req { color: var(--zbx-red); }

input[type="text"],
input[type="email"],
input[type="date"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--zbx-border);
    border-radius: var(--zbx-radius);
    background: #fff;
    color: var(--zbx-ink);
    font: inherit;
    transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--zbx-red);
    box-shadow: 0 0 0 3px rgba(212, 0, 0, .15);
}

/* Radio / Checkbox */
.uaiz-radio-group {
    display: inline-flex;
    gap: 24px;
    margin-top: 2px;
}
.uaiz-radio-group label,
.uaiz-checkbox label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: var(--zbx-ink-soft);
    cursor: pointer;
}
.uaiz-checkbox { padding: 8px 0; }
.uaiz-checkbox--lgpd {
    background: var(--zbx-red-soft);
    border: 1px solid #f5c2c2;
    border-radius: var(--zbx-radius);
    padding: 14px 16px;
}
.uaiz-checkbox--lgpd label { color: var(--zbx-ink); }

/* Mensagens */
.uaiz-err {
    color: var(--zbx-error);
    margin-top: 4px;
    font-size: 13px;
}
.uaiz-alert {
    border-radius: var(--zbx-radius);
    padding: 12px 16px;
    margin-bottom: 16px;
    border: 1px solid transparent;
}
.uaiz-alert--error {
    background: var(--zbx-red-soft);
    border-color: #f5c2c2;
    color: var(--zbx-red-dark);
}

/* Botoes */
.uaiz-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
}
.uaiz-btn {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid transparent;
    padding: 12px 22px;
    font: inherit;
    font-weight: 600;
    border-radius: var(--zbx-radius);
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s, transform .05s;
    display: inline-block;
    text-align: center;
}
.uaiz-btn:active { transform: translateY(1px); }
.uaiz-btn--primary {
    background: var(--zbx-red);
    color: #fff;
}
.uaiz-btn--primary:hover { background: var(--zbx-red-dark); }
.uaiz-btn--ghost {
    background: #fff;
    color: var(--zbx-red);
    border-color: var(--zbx-red);
}
.uaiz-btn--ghost:hover { background: var(--zbx-red-soft); }

/* Honeypot - escondido visualmente, acessivel para leitores */
.uaiz-hp {
    position: absolute !important;
    left: -10000px !important;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Pagina de obrigado */
.uaiz-thanks {
    background: var(--zbx-bg);
    border: 1px solid var(--zbx-border);
    border-radius: var(--zbx-radius);
    box-shadow: var(--zbx-shadow);
    padding: 40px;
    text-align: center;
    margin: 40px auto;
}
.uaiz-thanks h1 { color: var(--zbx-red); }

/* Footer */
.uaiz-footer {
    background: #1F2D3D;
    color: #cbd5e1;
    padding: 18px 0;
    text-align: center;
    margin-top: 40px;
}
.uaiz-footer small { font-size: 13px; }

/* Responsivo */
@media (max-width: 720px) {
    .uaiz-hero { padding: 32px 0; }
    .uaiz-hero h1 { font-size: 24px; }
    .uaiz-form { padding: 20px; }
    .uaiz-grid { grid-template-columns: 1fr; }
    .uaiz-header__inner { height: 64px; }
    .uaiz-logo img { height: 36px; }
    .uaiz-logo__text { font-size: 18px; }
}

/* ============================================================
   Modal de sucesso (popup interativo apos cadastro)
   ============================================================ */
.uaiz-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: uaiz-modal-in .25s ease-out;
}
.uaiz-modal[hidden] { display: none !important; }

.uaiz-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.uaiz-modal__card {
    position: relative;
    width: min(480px, 100%);
    background: #FFFFFF;
    border-radius: 16px;
    box-shadow: 0 25px 60px rgba(0,0,0,.35), 0 0 0 1px rgba(0,0,0,.05);
    overflow: hidden;
    transform-origin: center;
    animation: uaiz-card-pop .35s cubic-bezier(.2,.9,.32,1.2);
}

.uaiz-modal__hero {
    background: linear-gradient(135deg, #D40000 0%, #A00000 100%);
    padding: 28px 24px 56px;
    text-align: center;
    color: #fff;
    position: relative;
}
.uaiz-modal__hero::after {
    /* "ondas" decorativas embaixo do hero */
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -1px;
    height: 24px;
    background:
        radial-gradient(20px 20px at 25% 0, transparent 99%, #fff 100%),
        radial-gradient(20px 20px at 75% 0, transparent 99%, #fff 100%),
        #fff;
    background-size: 50% 100%, 50% 100%, 100% 100%;
    background-position: 0 0, 100% 0, 0 0;
    background-repeat: no-repeat;
}
.uaiz-modal__logo {
    display: block;
    max-height: 56px;
    width: auto;
    margin: 0 auto 8px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,.3));
}
.uaiz-modal__brand {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: .5px;
    margin: 4px 0 0;
}

/* Check animado */
.uaiz-modal__check {
    position: absolute;
    left: 50%;
    bottom: -36px;
    transform: translateX(-50%);
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(0,0,0,.18);
    z-index: 1;
}
.uaiz-modal__check svg {
    width: 44px;
    height: 44px;
    stroke: #1E8E3E;
    stroke-width: 4;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 60;
    stroke-dashoffset: 60;
    animation: uaiz-draw .55s .25s ease-out forwards;
}
.uaiz-modal__check--mail svg { stroke: #D40000; }

.uaiz-modal__body {
    padding: 56px 28px 24px;
    text-align: center;
}
.uaiz-modal__body h2 {
    margin: 0 0 8px;
    font-size: 22px;
    color: #1F2D3D;
    font-weight: 700;
}
.uaiz-modal__body p {
    margin: 0 0 12px;
    color: #4B5563;
    line-height: 1.55;
}
.uaiz-modal__body strong { color: #1F2D3D; }

.uaiz-modal__actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    padding: 0 24px 24px;
    flex-wrap: wrap;
}

.uaiz-modal__close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255,255,255,.18);
    color: #fff;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: background .15s, transform .15s;
    z-index: 2;
}
.uaiz-modal__close:hover { background: rgba(255,255,255,.32); transform: scale(1.08); }

@keyframes uaiz-modal-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes uaiz-card-pop {
    from { transform: scale(.85) translateY(20px); opacity: 0; }
    to   { transform: scale(1) translateY(0);     opacity: 1; }
}
@keyframes uaiz-draw {
    to { stroke-dashoffset: 0; }
}

@media (max-width: 480px) {
    .uaiz-modal__hero  { padding: 24px 16px 48px; }
    .uaiz-modal__body  { padding: 52px 20px 20px; }
    .uaiz-modal__body h2 { font-size: 20px; }
}
