* {
    box-sizing: border-box;
}

body {
    margin: 0 auto;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
    background: radial-gradient(circle at top, #1a1a1a, #0b0b0b);
    color: #eaeaea;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
}

.page {
    display: flex;
    align-items: flex-start;
    gap: 60px;
    flex-direction: row-reverse;
}

.container {
    width: 100%;
    max-width: 1400px;
    background:
        radial-gradient(800px 420px at 10% 0%, rgba(108, 99, 255, .22), transparent 60%),
        radial-gradient(700px 400px at 90% 20%, rgba(72, 160, 233, .16), transparent 55%),
        #101010;
    border-radius: 16px;
    padding: 48px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.65);
}

h1 {
    margin: 0 0 6px;
    font-size: 1.9rem;
    font-weight: 600;
}

.subtitle {
    font-size: 0.95rem;
    color: #a0a0a0;
    margin-bottom: 32px;
}

.layout {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    min-width: 0;
}

form {
    flex: 2;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.a {
    color: #6c60f8;
}

.footer {
    margin-top: 32px;
    padding: 20px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.footer #form-contact>p:first-child {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 6px;
}

.footer>p {
    margin: 0;
    word-break: break-word;
}

.footer>p:first-of-type {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer a {
    color: #6c63ff;
    text-decoration: none;
    font-weight: 500;
    display: inline-block;
    padding: 2px 0;
    word-break: break-word;
}

.footer a:hover {
    color: #9b95ff;
    text-shadow: 0 0 8px rgba(108, 99, 255, 0.35);
}

.footer span {
    display: none;
}

.footer .footer-email a {
    color: rgba(255, 255, 255, 0.8);
}

.footer .footer-email a:hover {
    color: #ffffff;
}

.footer #form-contact {
    width: 100%;
    box-sizing: border-box;
}

.footer #form-contact input,
.footer #form-contact select,
.footer #form-contact textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

@media (min-width: 768px) {
    .footer {
        padding: 24px 0;
    }

    .footer>p:first-of-type {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
    }

    .footer span {
        display: inline;
    }
}

.chatbox {
    width: 100%;
    height: 400px;
    max-height: 520px;
    flex: 1;
    border: 1px solid #2a2a2a;
    border-radius: 14px;
    background:
        radial-gradient(800px 420px at 10% 0%, rgba(108, 99, 255, .22), transparent 60%),
        radial-gradient(700px 400px at 90% 20%, rgba(72, 160, 233, .16), transparent 55%),
        #101010;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    margin-top: 0;
}

.chatbox .topbar {
    padding: 10px 12px;
    border-bottom: 1px solid #242424;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    background: rgba(0, 0, 0, .18);
}

.chatbox .title {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.chatbox .title strong {
    font-size: 0.95rem;
    color: #fff;
}

.chatbox .title span {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, .65);
}

.chatbox .status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, .65);
    white-space: nowrap;
}

.chatbox .dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: rgba(16, 185, 129, .85);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, .15);
}

.chatbox .messages {
    flex: 1;
    min-height: 0;
    padding: 12px;

    display: flex;
    flex-direction: column;
    gap: 10px;

    overflow-y: auto;
}

.chatbox .msg {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    max-width: 92%;
}

.chatbox .msg.user {
    margin-left: auto;
    flex-direction: row-reverse;
}

.chatbox .avatar {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, .12);
    display: grid;
    place-items: center;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, .85);
    background: rgba(255, 255, 255, .06);
    flex: 0 0 auto;
}

.chatbox .bubble {
    padding: 10px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(255, 255, 255, .08);
    line-height: 1.4;
    font-size: 0.88rem;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.chatbox .msg.user .bubble {
    background: rgba(108, 99, 255, .22);
    border-color: rgba(108, 99, 255, .28);
}

.chatbox .meta {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, .55);
    margin: 4px 2px 0 2px;
}

.chatbox .typing {
    display: inline-flex;
    gap: 4px;
    align-items: center;
}

.chatbox .typing span {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .55);
    display: inline-block;
    animation: blink 1.1s infinite ease-in-out;
}

.chatbox .typing span:nth-child(2) {
    animation-delay: .15s;
}

.chatbox .typing span:nth-child(3) {
    animation-delay: .30s;
}

@keyframes blink {

    0%,
    80%,
    100% {
        transform: translateY(0);
        opacity: .35;
    }

    40% {
        transform: translateY(-3px);
        opacity: 1;
    }
}

.chatbox .quick {
    flex: 0 0 auto;
    padding: 10px;
    border-top: 1px solid #242424;
    background: rgba(0, 0, 0, .14);

    display: flex;
    flex-wrap: wrap;
    gap: 8px;

    max-height: 120px;
    overflow-y: auto;
    overflow-x: hidden;

    position: relative;
}

.chatbox .chip {
    flex: 0 0 auto;
    white-space: nowrap;

    border: 1px solid rgba(255, 255, 255, .14);
    background: rgba(255, 255, 255, .06);
    color: #eaeaea;

    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.8rem;

    cursor: pointer;
    transition: all .15s ease;
}

.chatbox .chip:hover {
    background: rgba(255, 255, 255, .09);
    border-color: rgba(255, 255, 255, .22);
}

@media (max-width: 768px) {
    .chatbox {
        height: 100dvh;
        border-radius: 0;
    }
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #cfcfcf;
}

.field-contact {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field-contact label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #cfcfcf;
    margin: 0;
}

.field-contact input {
    width: 100%;
    min-height: 200px;
    padding-top: 8px;
    padding-right: 14px;
    padding-left: 14px;
    padding-bottom: 150px;
    line-height: 1.15;
    box-sizing: border-box;
}

input,
select {
    background: #1c1c1c;
    border: 1px solid #2d2d2d;
    border-radius: 8px;
    padding: 12px 14px;
    color: #fff;
    font-size: 0.95rem;
}

input:focus,
select:focus {
    outline: none;
    border-color: #6c63ff;
}

input,
select {
    background-color: #1c1c1c;
    color: #fff;
}

input:focus,
select:focus {
    background-color: #1c1c1c;
    color: #fff;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #1c1c1c inset !important;
    -webkit-text-fill-color: #fff !important;
    caret-color: #fff;
}

.currency-input {
    display: flex;
    align-items: center;
    background: #1c1c1c;
    border: 1px solid #2d2d2d;
    border-radius: 8px;
    padding-left: 12px;
}

.currency-input span {
    color: #aaa;
    font-size: 0.95rem;
    margin-right: 6px;
}

.currency-input input {
    border: none;
    background: transparent;
    padding: 12px 8px;
    width: 100%;
    color: #fff;
}

.full {
    grid-column: 1 / -1;
}

.form-warning {
    font-size: 0.85rem;
    color: #cfcfcf;
    opacity: 0.85;
}

button {
    margin-top: 8px;
    padding: 15px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 999px;
    cursor: pointer;
    border: none;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
    box-shadow: 0 0 0 1px rgba(148, 144, 219, 0.45),
        0 0 12px rgba(110, 109, 131, 0.35);
}

button[type="submit"] {
    color: #fff;
    background:
        radial-gradient(800px 420px at 10% 0%, rgba(108, 99, 255, .22), transparent 60%),
        radial-gradient(700px 400px at 90% 20%, rgba(72, 160, 233, .16), transparent 55%),
        #101010;
}

button[type="reset"] {
    color: #fff;
    background:
        radial-gradient(700px 400px at 90% 20%, rgba(131, 184, 228, 0.16), transparent 55%),
        radial-gradient(800px 420px at 10% 0%, rgba(10, 135, 236, 0.22), transparent 60%);
}

#content {
    margin-top: 32px;
}

.result-card {
    background: #181818;
    border-radius: 14px;
    padding: 28px;
    border: 1px solid #2a2a2a;
}

.outside-text {
    width: 300px;
    padding: 34px;
    background:
        radial-gradient(800px 420px at 10% 0%, rgba(108, 99, 255, .22), transparent 60%),
        radial-gradient(700px 400px at 90% 20%, rgba(72, 160, 233, .16), transparent 55%),
        #101010;
    border: 1px solid #2a2a2a;
    border-radius: 14px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.outside-text h2 {
    margin: 0 0 16px;
    font-size: 1.05rem;
    font-weight: 600;
    color: #fff;
}

.outside-text ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.outside-text li+li {
    margin-top: 10px;
}

.outside-text a {
    display: block;
    padding: 10px 14px;
    border-radius: 10px;
    background: #1c1c1c;
    border: 2px solid #2d2d2d;
    color: #cfcfcf;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.outside-text a:hover {
    background: #222;
    border-color: #6c63ff;
    color: #fff;
    transform: translateX(4px);
}

.label-tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tooltip-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #6c60f8;
    border: 0.5px solid var(--color-border-secondary);
    color: var(--color-text-secondary);
    font-size: 11px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.tooltip-icon:focus {
    outline: none;
}

.tooltip-box {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
    min-width: 220px;
    max-width: 300px;
    width: max-content;
    padding: 10px 12px;
    background: #ffffff;
    color: #111827;
    border: 0.5px solid rgba(0, 0, 0, 0.2);
    font-size: 13px;
    line-height: 1.5;
    border-radius: 8px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
    z-index: 100;
    pointer-events: none;
    white-space: normal;
}

.tooltip-box::before {
    content: "";
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 8px;
    height: 8px;
    background: #ffffff;
    border-top: 0.5px solid rgba(0, 0, 0, 0.2);
    border-left: 0.5px solid rgba(0, 0, 0, 0.2);
}

.label-tooltip:hover .tooltip-box,
.label-tooltip.tooltip-open .tooltip-box {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

@media (max-width: 600px) {
    .tooltip-box {
        position: absolute;
        top: calc(100% + 10px);
        left: 0%;
        transform: translateX(-50%);

        width: max-content;
        max-width: 90vw;
        min-width: 0;

        border-radius: 12px;
        padding: 14px 16px;
        font-size: 14px;
    }

    .tooltip-box::before {
        display: none;
    }

    .label-tooltip:hover .tooltip-box {
        opacity: 0;
        visibility: hidden;
    }

    .label-tooltip.tooltip-open .tooltip-box {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}

.loading {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(0, 0, 0, .2);
    border-top-color: rgba(0, 0, 0, .6);
    border-radius: 50%;
    animation: spin .8s linear infinite;
    vertical-align: -2px;
    margin-right: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 1200px) {
    .outside-text {
        display: none;
    }
}

@media (max-width: 900px) {
    .layout {
        flex-direction: column;
    }

    form {
        grid-template-columns: 1fr 1fr;
    }

    .chatbox {
        flex: 0 0 auto;
        width: 100%;
        min-width: unset;
        margin-top: 0;
        height: 400px;
        max-height: 400px;
    }
}

@media (max-width: 600px) {
    body {
        padding: 16px 12px;
        align-items: flex-start;
    }

    .page {
        flex-direction: column;
        gap: 24px;
        width: 100%;
    }

    .container {
        padding: 24px 16px;
        border-radius: 12px;
    }

    h1 {
        font-size: 1.4rem;
    }

    form {
        grid-template-columns: 1fr;
    }

    .chatbox {
        flex: 0 0 auto;
        width: 100%;
        min-width: unset;
        margin-top: 0;
        height: 360px;
        max-height: 360px;
    }

    button {
        width: 100%;
    }
}

input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    background-color: transparent;
}