/* 2. Main Content Wrapper (Fixed Header Offset REMOVED) */
.content-wrapper {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Reduced padding as the header is no longer fixed */
    padding: 2rem 1.5rem 4rem;
}

/* Tablet/Desktop Styles */
@media (min-width: 768px) {
    .registration-page {
        display: flex;
        min-height: 550px;
        height: auto;
        /* max-height: 85vh removed to allow natural growth and prevent internal scroll */
        max-width: 1024px;
    }
}

/* Mobile Specific Padding Adjustment (Reduced as fixed header offset is removed) */
@media (max-width: 767.98px) {
    .content-wrapper {
        padding-top: 2rem;
        /* Reduced to simple padding */
    }
}




/* Main Container - Canvas Effect */
.registration-page {
    width: 100%;
    max-width: 900px;
    background-color: var(--color-section-bg-light);
    border-radius: var(--canvas-border-radius);
    box-shadow: var(--canvas-shadow);
    border: 1px solid var(--color-gray-100);
    overflow: hidden;
}


/* Left Sidebar - Adapted to Dark Theme */
.sidebar-left {
    display: none;
    padding: 3rem;
    background: linear-gradient(135deg, var(--color-section-bg-dark) 0%, #002e48 100%);
    /* Adjusted second color for a nice dark gradient */
    color: var(--color-white);
}

@media (min-width: 768px) {
    .sidebar-left {
        display: flex;
        width: 40%;
        flex-direction: column;
        justify-content: space-between;
        border-top-left-radius: var(--canvas-border-radius);
        border-bottom-left-radius: var(--canvas-border-radius);
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;
    }
}

/* Sidebar Content Styles */
.sidebar-header {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
    gap: 0.75rem;
}

.sidebar-logo-img {
    width: 2.5rem;
    height: 2.5rem;
    object-fit: contain;
    /* Apply filter for dark theme logo */
    filter: invert(70%) sepia(35%) saturate(300%) hue-rotate(200deg) brightness(120%) contrast(100%);
}

.sidebar-title {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--color-accent-blue);
    /* Use accent blue */
}

.sidebar-heading {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-top: 0;
    color: var(--color-text-light);
    /* Use light text color */
}

.sidebar-quote {
    color: #b7c7dc;
    /* Lighter shade for quotes */
    font-size: 1.125rem;
    font-weight: 300;
}

.sidebar-quote p:last-child {
    margin-top: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Form Area */
.form-area {
    width: 100%;
    padding: 3rem;
    text-align: center;
    border-radius: var(--canvas-border-radius);
    box-shadow: none;
    display: flex;
    flex-direction: column;
    overflow-y: visible;
    /* Changed from auto to visible to remove internal scroll */
    color: var(--color-text-light);
}

@media (min-width: 768px) {
    .form-area {
        width: 60%;
        padding: 3rem 4rem;
        border-top-left-radius: 0;
        border-bottom-left-radius: 0;
    }
}

/* Custom scrollbar styling (REMOVED as requested) */

/* Form Header (h2 for signup) */
.form-area h2 {
    color: var(--color-accent-blue);
    /* Use accent blue for title */
    font-size: 2.25rem;
    margin-bottom: 0.75rem;
    padding-top: 0;
    text-align: center;
    font-weight: 800;
}

.form-area p.text-gray-500 {
    color: var(--color-gray-500);
    /* Use subtle gray */
    margin-bottom: 2.5rem;
    font-size: 1rem;
}

/* Form Layout */
.signup-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Form Group Grid */
.form-group-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

/* Tablet/Large Phone Layout for 2- and 3-column grid */
@media (min-width: 600px) {
    .form-group-grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .form-group-grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Specific Fix for 3-column layout on medium screens (e.g., small tablets in portrait) */
@media (min-width: 768px) and (max-width: 991px) {
    .form-group-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-group-grid-3>.form-group:last-child {
        grid-column: span 2;
    }
}


/* Label and Help Text */
.form-group {
    margin-bottom: 0;
    text-align: left;
    position: relative;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-light);
    /* Light text for labels */
    margin-bottom: 0.25rem;
}

.text-req {
    font-size: 0.7rem;
    color: var(--color-accent-blue);
    /* Use accent color */
}

.text-opt {
    font-size: 0.7rem;
    color: var(--color-gray-500);
}

.form-group .help-text {
    font-size: 0.75rem;
    color: var(--color-gray-500);
    margin-top: 0.35rem;
    opacity: 1;
}

/* Input/Select/Textarea Styling - Adapted for Dark Theme */
.form-area input:not([type="submit"]):not([type="checkbox"]),
.form-area select {
    margin-top: 0;
    display: block;
    width: 100%;
    padding: 0.8rem 1.2rem;
    border: 1px solid var(--color-gray-400);
    border-left: 4px solid var(--color-gray-100);
    /* Darker background border */
    border-radius: 0.5rem;
    box-sizing: border-box;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: border-color 0.2s, box-shadow 0.2s, border-left-color 0.2s;
    background-color: var(--color-form-bg);
    /* Very dark input background */
    color: var(--color-text-light);
    /* Light text color for input */
    font-size: 1rem;
}

/* Placeholder text color for dark theme */
.form-area input::placeholder {
    color: var(--color-gray-500);
    opacity: 0.7;
    /* Optional: make placeholder slightly transparent */
}

.form-group .feedback-success+input:not([type="submit"]):not([type="checkbox"]),
.form-group .feedback-success+select {
    border-left-color: var(--color-success);
}

.form-area input:focus,
.form-area select:focus {
    outline: none;
    border-color: var(--color-accent-blue);
    box-shadow: 0 0 0 3px var(--color-section-bg-dark), 0 0 0 6px rgba(40, 137, 216, 0.3);
    /* Accent Blue glow */
    border-left-color: var(--color-accent-blue);
    background-color: var(--color-form-bg);
    /* Keep background dark on focus */
}

/* Select element styling adaptation */
.form-area select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2394a3b8'%3e%3cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 10.94l3.71-3.71a.75.75 0 111.06 1.06l-4.25 4.25a.75.75 0 01-1.06 0L5.21 8.27a.75.75 0 01.02-1.06z' clip-rule='evenodd' /%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.25rem;
}

/* Password Toggle Styling */
.password-container {
    position: relative;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 1.2rem;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--color-gray-500);
    transition: color 0.2s;
    z-index: 10;
    padding: 0.2rem;
}

.password-toggle:hover {
    color: var(--color-accent-blue);
}


/* Checkbox Styling */
.checkbox-group {
    display: flex;
    align-items: center;
    padding-top: 0.25rem;
    /* Added margin-left for better mobile alignment */
    margin-left: 0.25rem;
}

.checkbox-group .h-5 {
    display: flex;
    align-items: center;
    height: 1.25rem;
}

.checkbox-group input[type="checkbox"] {
    height: 1.125rem;
    width: 1.125rem;
    color: var(--color-accent-blue);
    /* Accent color for checked box */
    border-color: var(--color-gray-400);
    background-color: var(--color-form-bg);
    /* Dark background for checkbox */
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.2s;
}

.checkbox-group input[type="checkbox"]:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--color-section-bg-light), 0 0 0 4px var(--color-accent-blue);
    /* Accent blue focus */
}

.checkbox-group .ml-3 {
    margin-left: 0.75rem;
    font-size: 0.9rem;
}

.checkbox-group label {
    font-weight: 500;
    color: var(--color-text-light);
}

.checkbox-group a {
    color: var(--color-accent-blue);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.checkbox-group a:hover {
    color: var(--color-accent-hover);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Submit Button - Elevated Primary Style (Adapted for Dark Theme) */
.btn-submit {
    width: 100%;
    padding: 0.8rem;
    background-color: var(--color-accent-blue);
    /* Accent blue button */
    color: var(--color-white);
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 700;
    font-size: 1.125rem;
    transition: all 0.2s ease;
    margin-top: 0.5rem;
    box-shadow: 0 10px 30px rgba(40, 137, 216, 0.25);
    /* Accent blue shadow */
}

.btn-submit:hover:not(:disabled) {
    background-color: var(--color-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(40, 137, 216, 0.35);
}

.btn-submit:active:not(:disabled) {
    transform: scale(0.98);
    box-shadow: 0 4px 12px rgba(40, 137, 216, 0.2);
}

.btn-submit:disabled {
    background-color: var(--color-gray-400);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Footer Text (Login Link) */
.login-text {
    text-align: center;
    font-size: 0.95rem;
    margin-top: 1.5rem;
}

.login-text p {
    color: var(--color-text-light);
    /* Light text for surrounding prose */
}

.login-text a {
    font-weight: 600;
    color: var(--color-accent-blue);
    /* Accent blue for link */
    text-decoration: none;
    transition: color 0.2s;
}

.login-text a:hover {
    color: var(--color-accent-hover);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Live Feedback and Error Messages (Adapted for Dark Theme) */
.feedback-error {
    color: var(--color-error);
    font-size: 0.8em;
    margin-top: 4px;
    font-weight: 600;
}

.feedback-success {
    color: var(--color-success);
    font-size: 0.8em;
    margin-top: 4px;
    font-weight: 600;
}

.error-message {
    color: var(--color-error);
    font-size: 0.85em;
    display: block;
    margin-top: 4px;
    font-weight: 600;
}

.alert-error {
    background-color: var(--color-error-bg);
    color: var(--color-error);
    border: 1px solid var(--color-error);
    padding: 12px;
    border-radius: 8px;
    /* Tighter radius for alerts */
    margin-bottom: 20px;
    font-weight: 600;
    list-style: none;
    text-align: left;
}

.alert-success {
    background-color: var(--color-success-bg);
    color: var(--color-success);
    border: 1px solid var(--color-success);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 600;
}

.messages {
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
}

.live-feedback {
    height: 1.5em;
}



/* -----------------------
           Small screen responsiveness 
           ----------------------- */

@media (max-width: 767.98px) {

    /* Form area padding */
    .form-area {
        padding: 1.5rem;
    }

    /* General container/page adjustments */
    .registration-page {
        max-width: 100%;
        margin: 0 auto;
        border-radius: 0.75rem;
        box-shadow: var(--canvas-shadow);
        height: auto;
    }

    /* Sidebar removal */
    .sidebar-left {
        display: none !important;
    }

    /* Typography */
    .form-area h2 {
        font-size: 2rem;
    }

    .form-area p.text-gray-500 {
        font-size: 0.95rem;
        margin-bottom: 2rem;
    }

    /* Grid simplification */
    .signup-form {
        gap: 1rem;
    }

    .form-group-grid,
    .form-group-grid-2,
    .form-group-grid-3 {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }

    /* Input size refinement */
    .form-area input:not([type="submit"]):not([type="checkbox"]),
    .form-area select {
        padding: 0.7rem 1rem;
        font-size: 0.95rem;
        border-radius: 0.5rem;
    }

    /* Button size refinement */
    .btn-submit {
        padding: 0.8rem;
        font-size: 1rem;
        border-radius: 0.5rem;
    }

    /* Navbar padding refinement for mobile menu */
    .dark-glassmorphism.navbar {
        padding-bottom: 0.5rem;
    }

    #mobile-menu {
        padding-bottom: 1rem;
    }
}