{% extends "base.html" %}

{% block title %}Change Password - AISBF{% endblock %}

{% block content %}
<div class="container">
    <h1>Change Password</h1>
    <p>Update your account password</p>

    {% if success %}
    <div class="alert alert-success">{{ success }}</div>
    {% endif %}

    {% if error %}
    <div class="alert alert-error">{{ error }}</div>
    {% endif %}

    <div class="card">
        <h2>Password Settings</h2>
        
        <form method="POST" action="{{ url_for(request, '/dashboard/change-password') }}">
            <div class="form-group">
                <label for="current_password">Current Password</label>
                <input type="password" id="current_password" name="current_password" required>
            </div>

            <div class="form-group">
                <label for="new_password">New Password</label>
                <input type="password" id="new_password" name="new_password" required minlength="6">
            </div>

            <div class="form-group">
                <label for="confirm_password">Confirm New Password</label>
                <input type="password" id="confirm_password" name="confirm_password" required minlength="6">
            </div>

            <div style="margin-top: 1.5rem;">
                <button type="submit" class="btn btn-primary">Change Password</button>
            </div>
        </form>
    </div>
</div>

<style>
.card {
    background: #16213e;
    padding: 2rem;
    border-radius: 8px;
    margin-top: 1.5rem;
}

.card h2 {
    margin-bottom: 1.5rem;
    color: #e0e0e0;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #e0e0e0;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #0f3460;
    border-radius: 4px;
    background: #1a1a2e;
    color: #e0e0e0;
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}
</style>
{% endblock %}