:root {
    --re-primary: var(--ast-global-color-0, #0274be);
    --re-primary-dark: var(--ast-global-color-1, #0256a0);
    --re-primary-light: #e7f2fb;
    --re-surface: var(--ast-global-color-5, #ffffff);
    --re-bg: var(--ast-global-color-4, #f3f4f6);
    --re-border: var(--ast-border-color, #e0e0e0);
    --re-text-main: var(--ast-global-color-3, #1e293b);
    --re-text-sub: var(--ast-global-color-2, #64748b);
    --re-error: #b91c1c;
    --re-success: #047857;
    --re-radius: 6px;
    --re-shadow: 0 16px 40px rgba(2, 116, 190, 0.12);
}

.contact-form-section {
    margin: 24px 0 16px;
}

.rhenium-form-container {
    display: grid;
    grid-template-columns: minmax(260px, 0.34fr) minmax(0, 1fr);
    max-width: 1180px;
    margin: 32px auto;
    background: var(--re-surface);
    border: 1px solid var(--re-border);
    border-radius: var(--re-radius);
    box-shadow: var(--re-shadow);
    overflow: hidden;
    font-family: inherit;
    font-size: 16px;
    line-height: 1.6;
    color: var(--re-text-main);
}

.contact-form-section .rhenium-form-container {
    margin: 0 auto;
}

.rhenium-form-container--contact {
    display: block;
    max-width: none;
    margin: 0;
    box-shadow: none;
}

.rhenium-form-container--contact .rhenium-form-header {
    border-right: 0;
    border-bottom: 1px solid var(--re-border);
    padding: 26px 28px 20px;
}

.rhenium-form-container--contact .rhenium-form-panel {
    padding: 26px 28px 30px;
}

.rhenium-form-container--contact .rhenium-submit-btn {
    margin-top: 6px;
}

.rhenium-form-header {
    display: flex;
    flex-direction: column;
    padding: 30px 28px;
    background:
        linear-gradient(160deg, rgba(2, 116, 190, 0.10), rgba(17, 138, 126, 0.06)),
        #f8fbfc;
    border-right: 1px solid var(--re-border);
    text-align: left;
}

.rhenium-form-title {
    margin: 0;
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--re-text-main);
    letter-spacing: 0;
    line-height: 1.22;
}

.rhenium-form-subtitle {
    margin: 12px 0 24px;
    color: var(--re-text-sub);
    font-size: 0.94rem;
    line-height: 1.75;
}

.rhenium-form-tabs {
    display: grid;
    gap: 10px;
    background: transparent;
    padding: 0;
    position: relative;
    width: 100%;
    max-width: none;
    border: 0;
    box-shadow: none;
}

.rhenium-tab-btn {
    padding: 12px 14px;
    border: 1px solid rgba(220, 229, 233, 0.95);
    background: rgba(255, 255, 255, 0.78);
    color: var(--re-text-sub);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    border-radius: var(--re-radius);
    text-align: left;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.rhenium-tab-btn:hover {
    color: var(--re-primary);
}

.rhenium-tab-btn.active {
    background: var(--re-surface);
    color: var(--re-primary);
    border-color: rgba(2, 116, 190, 0.34);
    box-shadow: 0 10px 24px rgba(2, 116, 190, 0.12);
}

.rhenium-form-panel {
    display: none;
    padding: 30px 32px 34px;
    background: var(--re-surface);
    animation: rhenium-fadeIn 0.25s ease-out;
}

@keyframes rhenium-fadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rhenium-form-panel.active {
    display: block;
}

.rhenium-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px 24px;
    margin-bottom: 6px;
}

.rhenium-form-grid .rhenium-form-group {
    margin-bottom: 0;
}

.rhenium-form-group {
    margin-bottom: 18px;
}

.rhenium-form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--re-text-main);
    margin-bottom: 6px;
}

.rhenium-form-group label .required {
    color: var(--re-error);
    margin-left: 2px;
}

.rhenium-input,
.rhenium-select,
.rhenium-textarea {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--re-text-main);
    background: var(--re-surface);
    border: 1px solid var(--re-border);
    border-radius: var(--re-radius);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.rhenium-input::placeholder,
.rhenium-textarea::placeholder {
    color: var(--re-text-sub);
}

.rhenium-input:focus,
.rhenium-select:focus,
.rhenium-textarea:focus {
    outline: none;
    border-color: var(--re-primary);
    box-shadow: 0 0 0 2px var(--re-primary-light);
}

.rhenium-textarea {
    resize: vertical;
    min-height: 96px;
}

.rhenium-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.rhenium-radio-group,
.rhenium-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.rhenium-check-card {
    position: relative;
    cursor: pointer;
    margin: 0;
}

.rhenium-check-card input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.rhenium-check-content {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 14px;
    background: #fff;
    border: 1px solid var(--re-border);
    border-radius: var(--re-radius);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--re-text-sub);
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
    user-select: none;
}

.rhenium-check-card:hover .rhenium-check-content {
    border-color: var(--re-primary);
    color: var(--re-text-main);
}

.rhenium-check-card input:checked + .rhenium-check-content {
    background: var(--re-primary-light);
    border-color: var(--re-primary);
    color: var(--re-primary-dark);
    font-weight: 600;
    box-shadow: 0 6px 14px rgba(2, 116, 190, 0.12);
}

.rhenium-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto;
    min-width: 220px;
    padding: 14px 16px;
    background: var(--re-primary);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: var(--re-radius);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    margin-top: 4px;
    box-shadow: 0 12px 24px rgba(2, 116, 190, 0.2);
}

.rhenium-submit-btn:hover {
    background: var(--re-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 16px 32px rgba(2, 116, 190, 0.24);
}

.rhenium-submit-btn .btn-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.2s ease;
}

.rhenium-submit-btn:hover .btn-icon {
    transform: translateX(3px);
}

.rhenium-submit-btn.is-loading {
    opacity: 0.85;
    cursor: not-allowed;
    transform: none;
}

.rhenium-form-message {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: var(--re-radius);
    font-size: 0.9rem;
    text-align: center;
    display: none;
    border: 1px solid transparent;
}

.rhenium-form-message.is-success {
    background: #ecfdf5;
    color: var(--re-success);
    border-color: #a7f3d0;
}

.rhenium-form-message.is-error {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}

.rhenium-trading-note td {
    background: var(--re-bg);
}

@media (max-width: 768px) {
    .rhenium-form-container {
        display: block;
        max-width: 100%;
    }

    .rhenium-form-header {
        padding: 20px 20px 16px;
        border-right: 0;
        border-bottom: 1px solid var(--re-border);
        text-align: center;
    }

    .rhenium-form-title {
        font-size: 1.35rem;
    }

    .rhenium-form-subtitle {
        margin-bottom: 16px;
    }

    .rhenium-form-tabs {
        grid-template-columns: repeat(2, 1fr);
        gap: 0;
        padding: 3px;
        border: 1px solid var(--re-border);
        background: #ffffff;
    }

    .rhenium-tab-btn {
        border: 0;
        text-align: center;
    }

    .rhenium-form-panel {
        padding: 20px 20px;
    }

    .rhenium-form-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .rhenium-radio-group,
    .rhenium-checkbox-group {
        display: flex;
        flex-wrap: wrap;
    }

    .rhenium-check-content {
        padding: 8px 12px;
        font-size: 0.875rem;
    }

    .rhenium-submit-btn {
        width: 100%;
    }

    .rhenium-form-container--contact .rhenium-form-header,
    .rhenium-form-container--contact .rhenium-form-panel {
        padding-right: 20px;
        padding-left: 20px;
    }
}
