/* User Pages Styling - Profile, Login, Register */

/* Common Container Styles */
.profile-page-container,
.login-container,
.register-container {
    min-height: calc(100vh - 200px);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #e6f0fa 0%, #f8f9fa 100%);
}

/* Form Wrapper Styles */
.profile-form-wrapper,
.login-form-wrapper,
.register-container form {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(20, 83, 146, 0.15);
    padding: 40px;
    max-width: 600px;
    width: 100%;
    animation: fadeInUp 0.6s ease-out;
    box-sizing: border-box;
    overflow: hidden;
}

.profile-form-wrapper *,
.login-form-wrapper *,
.register-container form * {
    box-sizing: border-box;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Profile Media Section */
.media {
    display: flex;
    align-items: center;
    gap: 25px;
    padding: 25px;
    background: linear-gradient(135deg, #e6f0fa 0%, #f0f4f8 100%);
    border-radius: 15px;
    margin-bottom: 30px;
    transition: all 0.3s ease;
}

.media:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(20, 83, 146, 0.15);
}

.media .account-img {
    border: 5px solid white;
    box-shadow: 0 8px 20px rgba(20, 83, 146, 0.2);
    transition: all 0.3s ease;
}

.media .account-img:hover {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 12px 28px rgba(20, 83, 146, 0.3);
}

.media-body {
    flex: 1;
}

.account-heading {
    font-size: 2rem;
    font-weight: 700;
    color: #145392 !important;
    margin-bottom: 8px;
}

.media-body .text-secondary,
.profile-form-wrapper .text-secondary {
    font-size: 1.1rem;
    color: #6c757d !important;
    font-weight: 500;
}

/* Form Fieldset */
fieldset {
    border: none !important;
    padding: 0;
}

fieldset legend {
    font-size: 1.8rem;
    font-weight: 700;
    color: #145392 !important;
    padding-bottom: 15px;
    border-bottom: 3px solid #145392 !important;
    margin-bottom: 30px !important;
    width: 100%;
}

/* Form Groups */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    font-weight: 600;
    color: #2c3e50 !important;
    margin-bottom: 8px;
    font-size: 1rem;
}

/* Form Inputs */
.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    border: 2px solid #e0e6ed;
    border-radius: 10px;
    padding: 12px 18px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.form-control:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
    border-color: #145392;
    box-shadow: 0 0 0 0.2rem rgba(20, 83, 146, 0.15);
    background-color: white;
    outline: none;
}

/* File Upload Styling */
input[type="file"] {
    padding: 10px;
    border: 2px dashed #145392;
    border-radius: 10px;
    background: #f0f4f8;
    cursor: pointer;
    transition: all 0.3s ease;
}

input[type="file"]:hover {
    background: #e6f0fa;
    border-color: #1a6bb8;
}

/* Help Text */
.form-text,
form small.text-muted,
.form-wrapper small.text-muted,
.profile-form-wrapper small.text-muted,
.login-form-wrapper small.text-muted,
.register-container small.text-muted {
    color: #6c757d !important;
    font-size: 0.9rem;
    margin-top: 5px;
}

/* Submit Buttons */
.submit-button,
.btn-primary,
.btn-outline-info {
    padding: 14px 32px !important;
    font-size: 1.1rem !important;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    position: relative;
    width: auto !important;
    height: auto !important;
    min-width: 180px;
    white-space: nowrap;
    box-sizing: border-box;
}

.submit-button,
.btn-primary,
button[type="submit"] {
    background: linear-gradient(135deg, #145392 0%, #1a6bb8 100%);
    color: white !important;
    box-shadow: 0 4px 15px rgba(20, 83, 146, 0.3);
    text-decoration: none;
    display: inline-block;
}

.submit-button:hover,
.btn-primary:hover,
button[type="submit"]:hover {
    background: linear-gradient(135deg, #1a6bb8 0%, #145392 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(20, 83, 146, 0.4);
    color: white !important;
    text-decoration: none;
}

.btn-outline-info {
    background: white;
    border: 2px solid #145392;
    color: #145392 !important;
    box-shadow: 0 4px 15px rgba(20, 83, 146, 0.15);
}

.btn-outline-info:hover {
    background: #145392;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(20, 83, 146, 0.3);
}

/* Links */
a {
    color: #145392;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

a:hover {
    color: #1a6bb8;
    text-decoration: underline;
}

/* Border Top Section */
.border-top {
    border-top: 2px solid #e0e6ed !important;
    padding-top: 20px !important;
    margin-top: 30px;
}

/* Login Page Specific */
.login-container .form-wrapper {
    max-width: 500px;
}

.form-signin {
    width: 100%;
}

/* Register Page Specific */
.register-container {
    flex-direction: column;
}

/* Error Messages */
.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border: 2px solid #f5c6cb;
    border-radius: 10px;
    padding: 15px;
    color: #721c24;
}

.alert-danger ul {
    margin: 0;
    padding-left: 20px;
}

.alert-danger li {
    margin-bottom: 5px;
}

/* Success Messages */
.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 2px solid #c3e6cb;
    border-radius: 10px;
    padding: 15px;
    color: #155724;
}

/* Profile Form Specific */
.profile-form {
    margin-top: 20px;
}

.profile-form .form-group {
    display: block;
}

.profile-form .form-group[style*="display: flex"] {
    display: flex !important;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.profile-form .form-group .submit-button {
    flex: 0 1 auto;
}

/* Add Icons Before Labels (Optional Enhancement) */
.form-group label::before {
    content: "▸ ";
    color: #145392;
    font-weight: bold;
    margin-right: 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .profile-page-container,
    .login-container,
    .register-container {
        padding: 20px 10px;
    }

    .profile-form-wrapper,
    .login-form-wrapper,
    .register-container form {
        padding: 25px 20px;
        border-radius: 15px;
    }

    .media {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .account-heading {
        font-size: 1.5rem;
    }

    fieldset legend {
        font-size: 1.4rem;
    }

    .submit-button,
    .btn-primary,
    .btn-outline-info {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* Add subtle pattern background */
.profile-page-container::before,
.login-container::before,
.register-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(20, 83, 146, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(26, 107, 184, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.profile-form-wrapper,
.login-form-wrapper,
.register-container form {
    position: relative;
    z-index: 1;
}

/* Floating Label Effect (Optional) */
.form-group {
    position: relative;
}

/* Custom File Upload Button */
#id_image {
    display: block;
    width: 100%;
}

/* Profile Image Preview Enhancement */
.account-img {
    object-fit: cover;
}

