/* Reset básico */
* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body.tw-cadastro {
    font-family: Arial, Helvetica, sans-serif;
    background: linear-gradient(180deg, #eef5fb 0%, #f6f9fc 100%);
    color: #1f2937;
    min-height: 100vh;
}

/* Container */
.tw-cad-container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.tw-cad-header {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 20;
}

.tw-cad-header-content {
    min-height: 86px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.tw-cad-logo {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: inherit;
}

.tw-cad-logo-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #1f74e8 0%, #0e5fd1 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(31, 116, 232, 0.18);
}

.tw-cad-logo strong {
    display: block;
    font-size: 20px;
    line-height: 1.1;
    color: #18489b;
}

.tw-cad-logo span {
    display: block;
    font-size: 14px;
    color: #5b6b82;
    line-height: 1.2;
}

.tw-cad-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 14px;
    background: #eef4ff;
    color: #1762d1;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tw-cad-login:hover {
    background: #dfeaff;
}

/* Main */
.tw-cad-main {
    padding: 48px 0 64px;
}

/* Card */
.tw-cad-card {
    background: #ffffff;
    border: 1px solid #e6edf5;
    border-radius: 28px;
    padding: 38px 38px 34px;
    box-shadow: 0 18px 45px rgba(15, 44, 91, 0.08);
}

.tw-cad-title {
    margin-bottom: 28px;
}

.tw-cad-title span {
    display: inline-block;
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #1762d1;
}

.tw-cad-title h1 {
    margin: 0 0 12px;
    font-size: clamp(34px, 4vw, 54px);
    line-height: 1.05;
    font-weight: 800;
    color: #0f274f;
}

.tw-cad-title p {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
    color: #55657d;
    max-width: 760px;
}

/* Alerts */
.tw-cad-alert {
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 22px;
    font-size: 15px;
    line-height: 1.5;
    font-weight: 600;
}

.tw-cad-alert-success {
    background: #eaf8ee;
    border: 1px solid #b9e3c3;
    color: #1f6b35;
}

.tw-cad-alert-error {
    background: #fff0f0;
    border: 1px solid #f0c3c3;
    color: #b42318;
}

/* Form */
.tw-cad-form {
    width: 100%;
}

.tw-cad-section-label {
    margin: 28px 0 16px;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #6a7b92;
    border-top: 1px solid #edf2f7;
    padding-top: 18px;
}

/* Grids */
.tw-cad-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 20px;
    margin-bottom: 18px;
}

.tw-cad-grid-cnpj {
    grid-template-columns: minmax(0, 1.35fr) auto;
    align-items: end;
}

.tw-cad-grid-address {
    grid-template-columns: 180px minmax(0, 1fr) 160px;
}

.tw-cad-grid-city {
    grid-template-columns: minmax(0, 1fr) 120px;
}

/* Fields */
.tw-cad-field {
    width: 100%;
    min-width: 0;
}

.tw-cad-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 15px;
    font-weight: 700;
    color: #24364d;
}

.tw-cad-field input,
.tw-cad-field select,
.tw-cad-field textarea {
    width: 100%;
    min-width: 0;
    height: 54px;
    border: 1px solid #cfd9e6;
    border-radius: 16px;
    background: #f8fbff;
    padding: 0 16px;
    font-size: 16px;
    color: #14263f;
    outline: none;
    transition: all 0.2s ease;
}

.tw-cad-field textarea {
    min-height: 120px;
    height: auto;
    padding: 14px 16px;
    resize: vertical;
}

.tw-cad-field input::placeholder,
.tw-cad-field textarea::placeholder {
    color: #97a6ba;
}

.tw-cad-field input:focus,
.tw-cad-field select:focus,
.tw-cad-field textarea:focus {
    border-color: #1f74e8;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(31, 116, 232, 0.12);
}

/* Botões */
.tw-cad-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    border: 0;
    border-radius: 16px;
    padding: 0 22px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.tw-cad-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.tw-cad-btn-primary {
    width: 100%;
    margin-top: 8px;
    background: linear-gradient(135deg, #1f74e8 0%, #0e5fd1 100%);
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(31, 116, 232, 0.22);
}

.tw-cad-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 26px rgba(31, 116, 232, 0.26);
}

.tw-cad-btn-secondary {
    background: #eaf2ff;
    color: #1762d1;
    min-width: 190px;
}

.tw-cad-btn-secondary:hover {
    background: #dce9ff;
}

.tw-cad-field-button {
    display: flex;
}

.tw-cad-field-button .tw-cad-btn {
    width: 100%;
}

/* Subdomínio */
.tw-cad-subdomain {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tw-cad-subdomain input {
    flex: 1;
}

.tw-cad-subdomain span {
    white-space: nowrap;
    font-size: 15px;
    font-weight: 700;
    color: #586a82;
}

/* Status da consulta */
.tw-cad-status {
    margin-top: -4px;
    margin-bottom: 18px;
    min-height: 24px;
    font-size: 14px;
    font-weight: 600;
    color: #66778f;
}

.tw-cad-status-success {
    color: #1f7a38;
}

.tw-cad-status-error {
    color: #b42318;
}

/* Honeypot */
.tw-cad-honeypot {
    position: absolute !important;
    left: -99999px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Responsividade */
@media (max-width: 1024px) {
    .tw-cad-main {
        padding: 36px 0 54px;
    }

    .tw-cad-card {
        padding: 30px 26px 26px;
        border-radius: 24px;
    }

    .tw-cad-grid-address {
        grid-template-columns: 160px minmax(0, 1fr) 140px;
    }
}

@media (max-width: 860px) {
    .tw-cad-grid,
    .tw-cad-grid-cnpj,
    .tw-cad-grid-address,
    .tw-cad-grid-city {
        grid-template-columns: 1fr;
    }

    .tw-cad-field-button {
        width: 100%;
    }

    .tw-cad-btn-secondary {
        min-width: 0;
        width: 100%;
    }

    .tw-cad-subdomain {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .tw-cad-subdomain span {
        white-space: normal;
    }
}

@media (max-width: 640px) {
    .tw-cad-container {
        padding: 0 16px;
    }

    .tw-cad-header-content {
        min-height: auto;
        padding: 14px 0;
        flex-direction: column;
        align-items: stretch;
    }

    .tw-cad-login {
        width: 100%;
    }

    .tw-cad-main {
        padding: 22px 0 32px;
    }

    .tw-cad-card {
        padding: 22px 18px 20px;
        border-radius: 20px;
    }

    .tw-cad-title h1 {
        font-size: 38px;
    }

    .tw-cad-title p {
        font-size: 15px;
    }

    .tw-cad-field label {
        font-size: 14px;
    }

    .tw-cad-field input,
    .tw-cad-field select,
    .tw-cad-field textarea,
    .tw-cad-btn {
        height: 50px;
        font-size: 15px;
        border-radius: 14px;
    }

    .tw-cad-btn-primary {
        margin-top: 6px;
    }
}



