.form-control {
    width: 100%;
    padding: 0.85rem 1.25rem;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    background-color: #ffffff;
    color: var(--dark);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}


/* Login Page Styles */
.login-hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.login-container {
    max-width: 500px;
}

.login-card {
    padding: 3rem;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.login-title {
    font-size: 2rem;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: var(--grey);
}

.error-message {
    background: #fee2e2;
    color: #dc2626;
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
}


/* Django form field containers */
.form-with-validation>div {
    margin-bottom: 1.5rem;
}

.form-with-validation label {
    display: block;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.form-with-validation ul:not(.errorlist) {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0 0;
    color: var(--grey);
    font-size: 0.75rem;
    text-align: left;
}

.helptext {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--grey);
}

.form-with-validation ul:not(.errorlist) li {
    margin: 0.25rem 0;
    padding-left: 1rem;
    position: relative;
}

.form-with-validation ul:not(.errorlist) li::before {
    content: "•";
    position: absolute;
    left: 0;
}

.submit-button {
    width: 100%;
    justify-content: center;
    padding: 1rem;
    margin-top: 1.5rem;
}

.login-footer {
    text-align: center;
    margin-top: 2rem;
    border-top: 1px solid #f1f5f9;
    padding-top: 1.5rem;
}

.g_id_signin {
    display: flex;
    justify-content: center;
    margin-top: 0.5rem;
}

/* Specificity boost to override .hero p */
.hero .login-footer-text {
    font-size: 1rem;
    color: var(--grey);
    margin-bottom: 0;
    /* Reset margin from hero p */
}

.login-footer-link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

/* Django Error Lists */
.errorlist {
    list-style: none;
    padding: 1rem;
    margin: 0.5rem 0;
    color: #dc2626;
    font-size: 0.9rem;
    background: #fee2e2;
    border-radius: var(--radius);
}

.errorlist.nonfield {
    background: #fee2e2;
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}

.errorlist li {
    margin: 0.25rem 0;
}

/* Contact Success Page Styles */
.success-hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    text-align: center;
}

.success-container {
    max-width: 600px;
}

.success-card {
    padding: 4rem 3rem;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 2rem;
}

.success-title {
    font-size: 2.5rem;
    color: var(--dark);
    margin-bottom: 1.5rem;
}

.success-message {
    font-size: 1.2rem;
    color: var(--grey);
    margin-bottom: 3rem;
    line-height: 1.6;
}

.success-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Contact Page Styles */
.contact-hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.contact-container {
    max-width: 600px;
}

.contact-card {
    padding: 3rem;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.contact-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.contact-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.contact-title {
    font-size: 2rem;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.contact-subtitle {
    color: var(--grey);
}

.contact-submit-btn {
    width: 100%;
    justify-content: center;
    padding: 1rem;
}

/* Profile Page Styles */
.profile-container {
    background: white;
    padding: 3rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    max-width: 600px;
}

.profile-title {
    font-size: 2rem;
    margin-bottom: 2rem;
}

.profile-display {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e2e8f0;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid var(--primary);
    margin-bottom: 1.5rem;
}

.profile-name {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.profile-email {
    color: var(--grey);
    font-size: 1rem;
}

.profile-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e2e8f0;
}

.profile-section:last-child {
    border-bottom: none;
}

.profile-section-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.profile-form {
    text-align: left;
}

.profile-form-group,
.password-update-group {
    margin-bottom: 1rem;
}

.profile-form-label,
.password-update-label {
    display: block;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.profile-form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius);
    font-family: var(--font-main);
    font-size: 1rem;
}

.profile-btn-full {
    width: 100%;
}

.profile-btn-full-mt {
    width: 100%;
    margin-top: 1rem;
}

.avatar-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius);
}

.avatar-label {
    cursor: pointer;
    position: relative;
}

.avatar-radio {
    position: absolute;
    opacity: 0;
}

.avatar-img {
    width: 100%;
    border-radius: 50%;
    border: 3px solid transparent;
    transition: all 0.2s;
}

.avatar-img.selected {
    border-color: var(--primary);
}

.avatar-img:hover {
    border-color: var(--primary);
}