/* 2. Main Content Wrapper & Card */
.content-wrapper {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 1.5rem 4rem;
}

/* Main Container - Canvas Effect (Changed from login-page) */
.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;
}

@media (min-width: 768px) {
    .nav-links-desktop {
        display: flex;
    }

    .registration-page {
        display: flex;
        min-height: 550px;
        height: auto;
        max-width: 1024px;
    }
}

/* Left Sidebar - Dark Theme */
.sidebar-left {
    display: none;
    padding: 3rem;
    background: linear-gradient(135deg, var(--color-section-bg-dark) 0%, #002e48 100%);
    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;
    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);
}

.sidebar-heading {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-top: 0;
    color: var(--color-text-light);
}

.sidebar-quote {
    color: #b7c7dc;
    font-size: 1.125rem;
    font-weight: 300;
}

.sidebar-quote p:last-child {
    margin-top: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Form Area (Changed from container) */
.form-area {
    width: 100%;
    max-width: none;
    padding: 3rem;
    text-align: center;
    border-radius: var(--canvas-border-radius);
    box-shadow: none;
    display: flex;
    flex-direction: column;
    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;
    }
}

/* Form Header (h2 for dark theme page) */
.form-area h2 {
    color: var(--color-accent-blue);
    font-size: 2.25rem;
    margin-bottom: 0.75rem;
    padding-top: 0;
    text-align: center;
    font-weight: 800;
}

.text-gray-500 {
    color: var(--color-gray-500);
    margin-bottom: 2.5rem;
    font-size: 1rem;
}

/* Form Layout */
.signup-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    margin-bottom: 0;
    /* Adjusted for use with .signup-form gap */
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: center;
}

label {
    width: 85%;
    /* Match input width */
    margin-bottom: 0.25rem;
    /* Reduced margin */
    margin-left: 0;
    font-weight: 600;
    color: var(--color-text-light);
    /* Light text for dark background */
    font-size: 0.9rem;
}

/* Input Wrapper for positioning the icon */
.input-wrapper {
    position: relative;
    width: 85%;
}

/* Password Toggle Icon Styles */
.password-toggle {
    position: absolute;
    top: 50%;
    right: 0.8rem;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--color-gray-500);
    font-size: 1.1rem;
    transition: color 0.2s;
    padding: 0.4rem;
    margin-right: -0.4rem;
}

.password-toggle:hover {
    color: var(--color-accent-blue);
    /* Accent color on hover */
}

/* General Input Styles (Dark Theme) */
.form-input,
.form-area input:not([type="submit"]):not([type="checkbox"]) {
    width: 100%;
    padding: 0.8rem 1.2rem;
    border: 1px solid var(--color-gray-400);
    border-radius: 0.5rem;
    box-sizing: border-box;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: border-color 0.2s, box-shadow 0.2s;
    font-size: 1rem;
    background-color: var(--color-form-bg);
    /* Dark background for input */
    color: var(--color-text-light);
    /* Light text for input */
}

/* Special padding for password field to accommodate the icon */
#id_password {
    padding-right: 3rem;
}

.form-input:focus,
.form-area input:focus:not([type="submit"]):not([type="checkbox"]) {
    outline: none;
    border-color: var(--color-accent-blue);
    /* Accent color focus */
    box-shadow: 0 0 0 4px rgba(40, 137, 216, 0.3);
    /* Accent color shadow */
}

/* Submit Button - Elevated Primary Style (Dark Theme) */
.btn-submit {
    width: 85%;
    padding: 0.8rem;
    background-color: var(--color-accent-blue);
    /* Accent color */
    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;
    /* Reduced margin */
    margin-left: 2em;
    box-shadow: 0 8px 20px rgba(40, 137, 216, 0.3);
}

.btn-submit:hover:not(:disabled) {
    background-color: var(--color-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(40, 137, 216, 0.4);
}

.btn-submit:active:not(:disabled) {
    transform: scale(0.98);
    box-shadow: 0 4px 12px rgba(40, 137, 216, 0.2);
}

/* Messages/Alerts (Dark Theme) */
.messages {
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
}

.messages li {
    padding: 12px;
    border-radius: 8px;
    /* Slightly smaller radius for alerts */
    margin-bottom: 10px;
    font-weight: 600;
    list-style: none;
    text-align: left;
}

.alert-error,
.errorlist {
    background-color: var(--color-error-bg);
    color: var(--color-error);
    border: 1px solid var(--color-error);
    margin-bottom: 15px;
    padding: 12px;
    border-radius: 8px;
    width: 85%;
    margin-left: auto;
    margin-right: auto;
}

.errorlist {
    list-style: none;
    padding: 12px;
    text-align: left;
}

.alert-success {
    background-color: var(--color-success-bg);
    color: var(--color-success);
    border: 1px solid var(--color-success);
}

.alert-warning {
    background-color: var(--color-section-bg-light);
    color: var(--color-gray-500);
    border: 1px solid var(--color-gray-100);
}

/* Links/Footer - Dark Theme Link Style */
.links {
    margin-top: 0.1rem;
    font-size: 0.95em;
    padding-top: 20px;
    color: var(--color-gray-700);
    text-align: center;
}

.form-links-container {
    width: 85%;
    margin: 0 auto;
    display: flex;
    justify-content: flex-end;
}

.links-forgot {
    margin-top: 5px;
    font-size: 0.85em;
}

.links a {
    color: var(--color-accent-blue);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.links a:hover {
    color: var(--color-accent-hover);
    text-decoration: underline;
    text-underline-offset: 3px;
}