/* ==========================================================================
   1. Reset & Global Base Styles
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: #FFFFFF;
    color: #111827;
    line-height: 1.5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 40px 20px;
}

/* Container Wrapper */
.container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ==========================================================================
   2. Main Centered SaaS Card Layout
   ========================================================================== */
.card {
    background-color: #FFFFFF;
    width: 550px;
    max-width: 100%;
    border: 1px solid #E5E7EB;
    border-radius: 18px;
    padding: 40px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 
                0 10px 15px -3px rgba(0, 0, 0, 0.03), 
                0 0 0 1px rgba(0, 0, 0, 0.01);
}

/* Header Config */
.header {
    text-align: center;
    margin-bottom: 32px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.logo-text {
    font-size: 22px;
    font-weight: 700;
    color: #0F172A;
    letter-spacing: -0.5px;
}

.logo-text span {
    color: #25D366;
}

.header h1 {
    font-size: 24px;
    font-weight: 700;
    color: #0F172A;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 14px;
    color: #4B5563;
    max-width: 380px;
    margin: 0 auto;
}

/* ==========================================================================
   3. Form Elements & Design Systems
   ========================================================================== */
.form-group {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
}

label, .radio-group-label {
    font-size: 14px;
    font-weight: 500;
    color: #0F172A;
    margin-bottom: 8px;
}

.required {
    color: #EF4444;
    margin-left: 2px;
}

.optional {
    color: #9CA3AF;
    font-size: 12px;
    font-weight: 400;
    margin-left: 4px;
}

/* Input Fields & System Interactivity */
input[type="text"],
input[type="tel"],
input[type="email"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    font-family: inherit;
    font-size: 14px;
    color: #111827;
    background-color: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:hover, select:hover, textarea:hover {
    border-color: #D1D5DB;
}

input:focus, select:focus, textarea:focus {
    border-color: #0F172A;
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08);
}

/* Specialized Select Dropdown Architecture */
.select-wrapper {
    position: relative;
    width: 100%;
}

.select-wrapper select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 40px;
    cursor: pointer;
}

.select-wrapper::after {
    content: "";
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 6px;
    background-color: #4B5563;
    clip-path: polygon(100% 0%, 0 0%, 50% 100%);
    pointer-events: none;
}

/* Textarea Specification */
textarea {
    resize: vertical;
    min-height: 90px;
}

/* ==========================================================================
   4. Custom Choice Fields (Radio UI Elements)
   ========================================================================== */
.radio-options {
    display: flex;
    gap: 24px;
    margin-top: 4px;
}

.radio-label {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    position: relative;
    user-select: none;
}

.radio-label input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.custom-radio {
    width: 18px;
    height: 18px;
    border: 1px solid #D1D5DB;
    border-radius: 50%;
    margin-right: 8px;
    display: inline-block;
    position: relative;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.radio-label:hover input ~ .custom-radio {
    border-color: #9CA3AF;
}

.radio-label input:checked ~ .custom-radio {
    border-color: #0F172A;
    background-color: #0F172A;
}

.radio-label input:checked ~ .custom-radio::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #FFFFFF;
}

/* ==========================================================================
   5. Technical File Upload Layout
   ========================================================================== */
.file-dropzone {
    display: flex;
    align-items: center;
    border: 1px dashed #E5E7EB;
    padding: 12px 16px;
    border-radius: 8px;
    background-color: #F9FAFB;
}

.file-dropzone input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.file-custom-btn {
    display: inline-block;
    padding: 6px 12px;
    background-color: #FFFFFF;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    margin-right: 12px;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.file-custom-btn:hover {
    background-color: #F3F4F6;
    border-color: #9CA3AF;
}

.file-name-text {
    font-size: 13px;
    color: #6B7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-grow: 1;
}

/* ==========================================================================
   6. Dynamic Visibility Conditions & System Feedback
   ========================================================================== */
.hidden-field {
    display: none;
}

.error-message {
    color: #EF4444;
    font-size: 12px;
    margin-top: 6px;
    display: none;
}

/* Error State Overrides */
input.invalid, select.invalid {
    border-color: #EF4444 !important;
}

input.invalid:focus, select.invalid:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

/* ==========================================================================
   7. Premium Actionable Conversion Elements
   ========================================================================== */
.submit-button {
    width: 100%;
    background-color: #25D366;
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 32px;
    box-shadow: 0 4px 6px -1px rgba(37, 211, 102, 0.2);
    transition: background-color 0.15s ease, transform 0.1s ease;
}

.submit-button:hover {
    background-color: #20BA5A;
}

.submit-button:active {
    transform: scale(0.99);
}

/* Footer Declarations */
.card-footer {
    text-align: center;
    font-size: 12px;
    color: #6B7280;
    margin-top: 24px;
}

.card-footer a {
    color: #4B5563;
    text-decoration: underline;
    transition: color 0.15s ease;
}

.card-footer a:hover {
    color: #111827;
}

/* ==========================================================================
   8. Standard Mobile Responsiveness
   ========================================================================== */
@media (max-width: 600px) {
    body {
        padding: 16px 8px;
    }

    .card {
        width: 95%;
        padding: 24px 16px;
        border-radius: 14px;
    }

    .header {
        margin-bottom: 24px;
    }

    .header h1 {
        font-size: 20px;
    }

    .radio-options {
        flex-direction: column;
        gap: 12px;
    }

    .submit-button {
        padding: 14px 16px;
        font-size: 15px;
    }
}