/* ============================================
   Auth Controller Styles
   ============================================ */

/* Login Page Styles - Scoped to auth pages */
body.auth-page {
    font-family: sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #1e3c72 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

body.auth-page * {
    box-sizing: border-box;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

body.auth-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.login-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1100px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    min-height: 600px;
}

.login-left {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.login-left::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.login-left-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.logo-container {
    margin-bottom: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.logo-image {
    width: 140px;
    height: 140px;
    object-fit: contain;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.3));
    animation: float 3s ease-in-out infinite;
    transition: transform 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 1rem;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.logo-image:hover {
    transform: scale(1.05);
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Logo glow effect */
.logo-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 1;
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { 
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }
    50% { 
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

.logo-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
    color: #fff;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    animation: float 3s ease-in-out infinite;
}

.system-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 2;
}

.system-subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
    font-weight: 300;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 2;
}

.features-list {
    margin-top: 3rem;
    text-align: left;
    width: 100%;
}

.feature-item {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, background 0.3s ease;
}

.feature-item:hover {
    transform: translateX(10px);
    background: rgba(255, 255, 255, 0.15);
}

.feature-item i {
    font-size: 1.5rem;
    margin-right: 1rem;
    color: #64b5f6;
}

.feature-item span {
    font-size: 0.95rem;
    font-weight: 500;
}

.login-right {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: white;
}

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

.login-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #1e3c72;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: #6c757d;
    font-size: 0.95rem;
}

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

.login-captcha-group {
    margin-bottom: 1.25rem;
}

.login-captcha-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.login-captcha-question {
    flex: 0 0 auto;
    min-width: 7.25rem;
    padding: 0.45rem 0.65rem;
    border-radius: 8px;
    background: #eef2fb;
    color: #1e3c72;
    font-weight: 700;
    font-size: 0.9rem;
    text-align: center;
}

.login-captcha-input {
    border: 2px solid #e9ecef !important;
    border-radius: 8px !important;
    max-width: 6.5rem;
    padding: 0.45rem 0.6rem !important;
    font-size: 0.9rem !important;
}

.login-captcha-refresh {
    width: 2.15rem;
    height: 2.15rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: #f8f9fa;
    color: #2a5298;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.login-captcha-refresh:hover {
    background: #eef2fb;
    border-color: #2a5298;
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.form-label i {
    margin-right: 0.5rem;
    color: #2a5298;
}

.input-group {
    position: relative;
}

.input-group-text {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-right: none;
    border-radius: 10px 0 0 10px;
    padding: 0.75rem 1rem;
    color: #2a5298;
}

.form-control {
    border: 2px solid #e9ecef;
    border-left: none;
    border-radius: 0 10px 10px 0;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #2a5298;
    box-shadow: 0 0 0 0.2rem rgba(42, 82, 152, 0.15);
    outline: none;
}

.form-control::placeholder {
    color: #adb5bd;
}

.btn-login {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    border: none;
    padding: 0.875rem 2rem;
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 10px;
    color: white;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(30, 60, 114, 0.3);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 60, 114, 0.4);
    background: linear-gradient(135deg, #2a5298 0%, #1e3c72 100%);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login i {
    margin-right: 0.5rem;
}

.alert-danger {
    border-radius: 10px;
    border: none;
    background: #fee;
    color: #c33;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.text-danger {
    font-size: 0.85rem;
    margin-top: 0.25rem;
    display: block;
}

.copyright {
    margin-top: 2rem;
    text-align: center;
    color: #6c757d;
    font-size: 0.85rem;
}

.login-page-stack {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1100px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-designer-credit {
    margin: 1.25rem 0 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    letter-spacing: 0.02em;
}

.login-designer-credit a {
    color: #ffffff;
    font-weight: 600;
    text-decoration: underline;
}

.login-designer-credit a:hover {
    color: #e8f0ff;
}

/* ============================================
   Responsive Styles
   ============================================ */

@media (max-width: 992px) {
    .login-wrapper {
        grid-template-columns: 1fr;
        max-width: 500px;
    }

    .login-left {
        padding: 2rem;
        min-height: 300px;
    }

    .features-list {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
        margin-top: 2rem;
    }

    .feature-item {
        margin-bottom: 0;
    }

    .system-title {
        font-size: 1.5rem;
    }

    .logo-icon {
        font-size: 3.5rem;
    }

    .logo-image {
        width: 120px;
        height: 120px;
        margin-bottom: 1rem;
        padding: 0.75rem;
    }

    .logo-container::before {
        width: 150px;
        height: 150px;
    }
}

@media (max-width: 576px) {
    .login-wrapper {
        border-radius: 15px;
    }

    .login-left,
    .login-right {
        padding: 2rem 1.5rem;
    }

    .features-list {
        grid-template-columns: 1fr;
    }

    .login-header h2 {
        font-size: 1.5rem;
    }
}

/* ============================================
   Profile Page Styles
   ============================================ */

.profile-page-container {
    font-family: sans-serif;
}

/* Profile Header Card - Scoped to profile-page-container */
.profile-page-container .profile-header-card {
    position: relative;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    border-radius: 16px;
    padding: 3rem 2rem 4rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 24px rgba(30, 60, 114, 0.15);
    overflow: hidden;
}

.profile-page-container .profile-header-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.profile-page-container .profile-header-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.profile-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 4px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.profile-avatar:hover {
    transform: scale(1.05);
}

.avatar-initials {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    letter-spacing: 2px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.avatar-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
    background: #4caf50;
    border-radius: 50%;
    border: 3px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.avatar-badge i {
    color: white;
    font-size: 0.875rem;
}

.profile-header-info {
    flex: 1;
    min-width: 200px;
}

.profile-name {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin: 0 0 0.5rem 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.5px;
}

.profile-email {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-email i {
    font-size: 1rem;
    opacity: 0.8;
}

/* Profile Form Card - Scoped to profile-page-container */
.profile-page-container .profile-form-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 2rem;
}

.profile-page-container .card-header-section {
    background: linear-gradient(to right, #f8f9fa, #ffffff);
    padding: 2rem 2.5rem;
    border-bottom: 1px solid #e9ecef;
}

.profile-page-container .card-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e3c72;
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    letter-spacing: -0.3px;
}

.profile-page-container .card-title i {
    color: #2a5298;
}

.profile-page-container .card-subtitle {
    font-size: 0.9375rem;
    color: #6c757d;
    margin: 0;
    font-weight: 400;
}

.profile-page-container .card-body-section {
    padding: 2.5rem;
}

/* Form Sections - Scoped to profile-page-container */
.profile-page-container .form-section {
    margin-bottom: 2.5rem;
}

.profile-page-container .form-section:last-of-type {
    margin-bottom: 0;
}

.profile-page-container .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.profile-page-container .section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    display: flex;
    align-items: center;
    letter-spacing: -0.2px;
}

.profile-page-container .section-title i {
    color: #1e3c72;
    margin-right: 0.5rem;
}

.profile-page-container .section-badge {
    background: #e3f2fd;
    color: #1976d2;
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-page-container .section-description {
    font-size: 0.9375rem;
    color: #6c757d;
    margin: -0.75rem 0 1.5rem 0;
    line-height: 1.6;
}

/* Form Groups - Scoped to profile-page-container */
.profile-page-container .form-group-modern {
    margin-bottom: 1.5rem;
}

.profile-page-container .form-label-modern {
    display: block;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    letter-spacing: -0.1px;
}

.profile-page-container .form-label-modern i {
    color: #1e3c72;
    margin-right: 0.5rem;
    font-size: 0.875rem;
}

.profile-page-container .input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.profile-page-container .input-wrapper .input-icon {
    position: absolute;
    left: 1rem;
    color: #6c757d;
    pointer-events: none;
    z-index: 2;
    font-size: 0.9375rem;
}

.profile-page-container .form-control-modern {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    font-size: 0.9375rem;
    font-family: sans-serif;
    color: #2c3e50;
    background: #ffffff;
    border: 2px solid #e1e8ed;
    border-radius: 10px;
    transition: all 0.3s ease;
    outline: none;
}

.profile-page-container .form-control-modern::placeholder {
    color: #adb5bd;
    font-weight: 400;
}

.profile-page-container .form-control-modern:focus {
    border-color: #1e3c72;
    box-shadow: 0 0 0 4px rgba(30, 60, 114, 0.1);
    background: #ffffff;
}

.profile-page-container .form-control-modern:hover:not(:focus) {
    border-color: #cbd5e0;
}

.profile-page-container .password-input-wrapper {
    position: relative;
}

.profile-page-container .password-toggle {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: color 0.2s ease;
    outline: none;
}

.profile-page-container .password-toggle:hover {
    color: #1e3c72;
}

.profile-page-container .password-input-wrapper .form-control-modern {
    padding-right: 3.5rem;
}

.profile-page-container .form-text {
    display: block;
    font-size: 0.8125rem;
    color: #6c757d;
    margin-top: 0.5rem;
    line-height: 1.5;
}

.profile-page-container .validation-error {
    display: block;
    font-size: 0.8125rem;
    color: #dc3545;
    margin-top: 0.5rem;
    font-weight: 500;
}

/* Alert Styles - Scoped to profile-page-container */
.profile-page-container .alert-custom {
    background: #fff5f5;
    border: 1px solid #feb2b2;
    border-left: 4px solid #dc3545;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 2rem;
    color: #c53030;
    font-size: 0.9375rem;
    line-height: 1.6;
}

.profile-page-container .alert-custom i {
    color: #dc3545;
}

/* Action Buttons - Scoped to profile-page-container */
.profile-page-container .form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid #e9ecef;
}

.profile-page-container .btn-secondary-modern,
.profile-page-container .btn-primary-modern {
    padding: 0.875rem 2rem;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: sans-serif;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    letter-spacing: -0.1px;
    outline: none;
}

.profile-page-container .btn-secondary-modern {
    background: #f8f9fa;
    color: #495057;
    border: 2px solid #e9ecef;
}

.profile-page-container .btn-secondary-modern:hover {
    background: #e9ecef;
    border-color: #dee2e6;
    color: #212529;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.profile-page-container .btn-primary-modern {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(30, 60, 114, 0.3);
}

.profile-page-container .btn-primary-modern:hover {
    background: linear-gradient(135deg, #2a5298 0%, #1e3c72 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 60, 114, 0.4);
}

.profile-page-container .btn-primary-modern:active,
.profile-page-container .btn-secondary-modern:active {
    transform: translateY(0);
}

.profile-page-container .btn-secondary-modern i,
.profile-page-container .btn-primary-modern i {
    font-size: 0.875rem;
}

/* Password Section Special Styling - Scoped to profile-page-container */
.profile-page-container .password-section {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
    margin-top: 1rem;
}

.profile-page-container .password-section .section-header {
    border-bottom-color: #e1e8ed;
}

/* Responsive Design */
@media (max-width: 768px) {
    .profile-page-container {
        padding: 1rem;
    }

    .profile-page-container .profile-header-card {
        padding: 2rem 1.5rem 3rem;
        margin-bottom: 1.5rem;
    }

    .profile-page-container .profile-header-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .profile-page-container .profile-avatar {
        width: 100px;
        height: 100px;
    }

    .profile-page-container .avatar-initials {
        font-size: 2rem;
    }

    .profile-page-container .profile-name {
        font-size: 1.5rem;
    }

    .profile-page-container .profile-email {
        font-size: 1rem;
        justify-content: center;
    }

    .profile-page-container .card-header-section {
        padding: 1.5rem;
    }

    .profile-page-container .card-title {
        font-size: 1.5rem;
    }

    .profile-page-container .card-body-section {
        padding: 1.5rem;
    }

    .profile-page-container .form-actions {
        flex-direction: column-reverse;
    }

    .profile-page-container .btn-secondary-modern,
    .profile-page-container .btn-primary-modern {
        width: 100%;
    }

    .profile-page-container .password-section {
        padding: 1.5rem;
    }
}

@media (max-width: 576px) {
    .profile-page-container .profile-header-card {
        border-radius: 12px;
        padding: 1.5rem 1rem 2.5rem;
    }

    .profile-page-container .profile-form-card {
        border-radius: 12px;
    }

    .profile-page-container .card-header-section,
    .profile-page-container .card-body-section {
        padding: 1.25rem;
    }

    .profile-page-container .section-title {
        font-size: 1.125rem;
    }
}

/* Login captcha + designer credit — last so they win over Bootstrap .form-control */
body.auth-page .login-page-stack {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1100px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

body.auth-page .login-designer-credit {
    display: block;
    width: 100%;
    margin: 1.25rem 0 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.9rem;
}

body.auth-page .login-designer-credit a {
    color: #ffffff;
    font-weight: 600;
    text-decoration: underline;
}

body.auth-page .login-captcha-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 0.5rem !important;
}

body.auth-page .login-captcha-question {
    flex: 0 0 auto !important;
    white-space: nowrap;
    padding: 0.45rem 0.65rem;
    border-radius: 8px;
    background: #eef2fb;
    color: #1e3c72;
    font-weight: 700;
    font-size: 0.9rem;
}

body.auth-page .form-control.login-captcha-input {
    display: inline-block !important;
    width: 5.75rem !important;
    max-width: 5.75rem !important;
    flex: 0 0 5.75rem !important;
    border: 2px solid #e9ecef !important;
    border-radius: 8px !important;
    padding: 0.45rem 0.55rem !important;
}

body.auth-page .login-captcha-refresh {
    flex: 0 0 2.15rem !important;
    width: 2.15rem !important;
    height: 2.15rem !important;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: #f8f9fa;
    color: #2a5298;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

