.modal-custom {
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), 
                0 0 0 1px rgba(212, 175, 55, 0.1);
    color: var(--color-text-primary, #ffffff);
}

.password-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    align-items: center;
    justify-content: center;
}

.password-modal-overlay.show {
    display: flex;
    opacity: 1;
}

.password-modal-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.7) translateY(-50px);
    transition: transform 0.3s ease;
    position: relative;
}

.password-modal-overlay.show .password-modal-container {
    transform: scale(1) translateY(0);
}

.modal-custom::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        var(--color-primary, #d4af37) 0%,
        var(--color-primary-hover, #f1c40f) 50%,
        var(--color-primary, #d4af37) 100%);
    border-radius: 20px 20px 0 0;
}

.modal-header {
    padding: 1.5rem 1.5rem 0.5rem;
    position: relative;
}

.modal-title-container {
    text-align: center;
    width: 100%;
}

.modal-title-container .icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--color-primary, #d4af37), var(--color-primary-hover, #f1c40f));
    border-radius: 50%;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--color-background-primary, #1a1a1a);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.3);
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--color-primary, #d4af37) 0%, var(--color-primary-hover, #f1c40f) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-subtitle {
    color: var(--color-text-secondary, #bdc3c7);
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.4;
}

.modal-body {
    padding: 1rem 1.5rem 1.5rem;
}

.form-group {
    margin-bottom: 1.2rem;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--color-text-primary, #ffffff);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--color-text-primary, #ffffff);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary, #d4af37);
    background: rgba(30, 30, 30, 0.9) !important;
    box-shadow: 0 0 0 0.2rem rgba(212, 175, 55, 0.25);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-primary, #d4af37);
    font-size: 0.9rem;
    pointer-events: none;
    z-index: 1;
}

.form-group.focused .input-icon {
    color: var(--color-primary-hover, #f1c40f);
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-check-input {
    width: 1.2rem;
    height: 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    cursor: pointer;
}

.form-check-input:checked {
    background-color: var(--color-primary, #d4af37);
    border-color: var(--color-primary, #d4af37);
}

.form-check-label {
    color: var(--color-text-secondary, #bdc3c7);
    font-size: 0.9rem;
    cursor: pointer;
}

.btn-login {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, var(--color-primary, #d4af37) 0%, var(--color-primary-hover, #f1c40f) 100%);
    border: none;
    border-radius: 12px;
    color: var(--color-background-primary, #1a1a1a);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-transform: none;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
    background: linear-gradient(135deg, var(--color-primary-hover, #f1c40f) 0%, var(--color-primary, #d4af37) 100%);
}

.btn-login:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.btn-login.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn-login.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: var(--color-background-primary, #1a1a1a);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.register-link {
    text-align: center;
    margin-top: 1.5rem;
}

.register-link p {
    color: var(--color-text-secondary, #bdc3c7);
    font-size: 0.9rem;
    margin: 0;
}

.register-link a,
.register-link-btn,
.login-link-btn,
.forgot-password-link {
    color: var(--color-primary, #d4af37) !important;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.3s ease;
}

.register-link a:hover,
.register-link-btn:hover,
.login-link-btn:hover,
.forgot-password-link:hover {
    color: var(--color-primary-hover, #f1c40f) !important;
    text-decoration: underline;
}

.alert {
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 0.9rem;
}

.alert-danger {
    background: rgba(220, 53, 69, 0.1);
    border-color: rgba(220, 53, 69, 0.3);
    color: #f8d7da;
}

.alert-success {
    background: rgba(25, 135, 84, 0.1);
    border-color: rgba(25, 135, 84, 0.3);
    color: #d1e7dd;
}

.alert i {
    margin-right: 0.5rem;
}

.btn-close-white {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.btn-close-white:hover {
    opacity: 1;
}

@media (max-width: 768px) {
    .modal-dialog {
        margin: 1rem;
    }
    
    .modal-header {
        padding: 1rem 1rem 0.5rem;
    }
    
    .modal-body {
        padding: 0.5rem 1rem 1rem;
    }
    
    .modal-title {
        font-size: 1.3rem;
    }
    
    .modal-title-container .icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .form-control {
        padding: 0.65rem 0.875rem 0.65rem 2.25rem;
        font-size: 0.9rem;
    }
    
    .input-icon {
        left: 0.875rem;
        font-size: 0.8rem;
    }
    
    .btn-login {
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 576px) {
    .modal-lg {
        max-width: 95%;
    }
    
    .row .col-md-6 {
        margin-bottom: 0.5rem;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
}

.modal.fade .modal-dialog {
    transition: transform 0.3s ease-out;
    transform: translate(0, -50px);
}

.modal.show .modal-dialog {
    transform: none;
}

.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

body.modal-open .navbar {
    display: none !important;
}

.form-control:invalid {
    border-color: rgba(220, 53, 69, 0.5);
}

.form-control:valid {
    border-color: rgba(25, 135, 84, 0.5);
}

.form-loading {
    pointer-events: none;
    opacity: 0.7;
}

.form-loading .form-control {
    background: rgba(255, 255, 255, 0.03);
}

.form-group.focused .form-control {
    border-color: var(--color-primary, #d4af37);
    background: rgba(30, 30, 30, 0.9) !important;
    box-shadow: 0 0 0 0.2rem rgba(212, 175, 55, 0.25);
}

.form-control:hover:not(:focus) {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(30, 30, 30, 0.9) !important;
}

.password-modal-header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 20px 30px;
    border-radius: 20px 20px 0 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.password-modal-title {
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.password-modal-title i {
    font-size: 1.3rem;
    opacity: 0.9;
}

.password-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.password-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.password-modal-body {
    padding: 30px;
    color: white;
}

.password-modal-form-group {
    margin-bottom: 20px;
}

.password-modal-form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
}

.password-modal-form-label i {
    margin-right: 8px;
    opacity: 0.8;
}

.password-modal-form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-sizing: border-box;
}

.password-modal-form-control:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.password-modal-form-control::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.password-modal-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 16 16'%3e%3cpath d='m7.247 4.86-4.796 5.481c-.566.647-.106 1.659.753 1.659h9.592a1 1 0 0 0 .753-1.659l-4.796-5.48a1 1 0 0 0-1.506 0z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

.password-modal-btn {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    border: none;
    color: white;
    padding: 12px 25px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    min-width: 120px;
    justify-content: center;
}

.password-modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(79, 172, 254, 0.3);
    color: white;
    text-decoration: none;
}

.password-modal-btn:active {
    transform: translateY(0);
}

.password-modal-btn-danger {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
}

.password-modal-btn-danger:hover {
    box-shadow: 0 10px 25px rgba(255, 107, 107, 0.3);
}

.password-modal-alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.password-modal-alert-success {
    background: rgba(86, 171, 47, 0.2);
    border: 1px solid rgba(86, 171, 47, 0.3);
    color: #a8e6cf;
}

.password-modal-alert-danger {
    background: rgba(255, 107, 107, 0.2);
    border: 1px solid rgba(255, 107, 107, 0.3);
    color: #ffb3b3;
}

.password-modal-requirements {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    margin-top: 15px;
}

.password-modal-requirements h6 {
    color: white;
    margin-bottom: 10px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.password-modal-requirements ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.password-modal-requirements li {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    margin-bottom: 5px;
    padding-left: 20px;
    position: relative;
}

.password-modal-requirements li:before {
    content: "•";
    color: rgba(255, 255, 255, 0.6);
    position: absolute;
    left: 0;
}

.password-modal-requirements li.valid {
    color: #a8e6cf;
}

.password-modal-requirements li.valid:before {
    content: "✓";
    color: #a8e6cf;
}

.password-modal-footer {
    padding: 20px 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0 0 20px 20px;
}

@media (max-width: 768px) {
    .password-modal-container {
        width: 95%;
        margin: 20px;
    }
    
    .password-modal-header,
    .password-modal-body,
    .password-modal-footer {
        padding: 20px;
    }
    
    .password-modal-title {
        font-size: 1.3rem;
    }
}

@media (max-width: 576px) {
    .modal-lg {
        max-width: 95%;
    }
    
    .row .col-md-6 {
        margin-bottom: 0.5rem;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
}

.modal.fade .modal-dialog {
    transition: transform 0.3s ease-out;
    transform: translate(0, -50px);
}

.modal.show .modal-dialog {
    transform: none;
}

.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

body.modal-open .navbar {
    display: none !important;
}

.form-control:invalid {
    border-color: rgba(220, 53, 69, 0.5);
}

.form-control:valid {
    border-color: rgba(25, 135, 84, 0.5);
}

.form-loading {
    pointer-events: none;
    opacity: 0.7;
}

.form-loading .form-control {
    background: rgba(255, 255, 255, 0.03);
}

.form-group.focused .form-control {
    border-color: var(--color-primary, #d4af37);
    background: rgba(30, 30, 30, 0.9) !important;
    box-shadow: 0 0 0 0.2rem rgba(212, 175, 55, 0.25);
}

.form-control:hover:not(:focus) {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(30, 30, 30, 0.9) !important;
}