* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa;
    background-image: url('/assets/img/bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.6);
    z-index: -1;
}

.container {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 450px;
    padding: 40px 30px;
    position: relative;
    overflow: hidden;
}

.form-section {
    transition: opacity 0.3s ease;
}

.register-section {
    display: none;
}

.form-header {
    text-align: center;
    margin-bottom: 30px;
}

.form-header h1 {
    color: #0c2252;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 10px;
}

.form-header p {
    color: #7f8c8d;
    font-size: 16px;
    line-height: 1.5;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    color: #0c2252;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e1e5eb;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #1b3d87;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* Error Message Styling - FIXED */
.error-message {
    display: none;
    background-color: #f8d7da;
    color: #721c24;
    padding: 8px 12px;
    border-radius: 4px;
    margin-top: 5px;
    border: 1px solid #f5c6cb;
    font-size: 14px;
    width: 100%;
}

.error-message.show {
    display: block !important;
}

.success-message {
    display: none;
    background-color: #d4edda;
    color: #155724;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 15px;
    border: 1px solid #c3e6cb;
    text-align: center;
}

.success-message.show {
    display: block !important;
}

/* Server error/success messages */
.error-message.show,
.success-message.show {
    display: block !important;
}

.form-control.error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.2);
}

.btn-submit {
    width: 100%;
    background-color: #1b3d87;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 10px;
}

.btn-submit:hover {
    background-color: #2980b9;
}

.btn-submit:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

.form-footer {
    margin-top: 25px;
    text-align: center;
}

.forgot-password {
    color: #1b3d87;
    text-decoration: none;
    font-size: 14px;
    display: block;
    margin-bottom: 15px;
}

.forgot-password:hover {
    text-decoration: underline;
}

.toggle-link {
    color: #7f8c8d;
    font-size: 14px;
}

.toggle-link a {
    color: #1b3d87;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
}

.toggle-link a:hover {
    text-decoration: underline;
}

.back-to-login {
    color: #1b3d87;
    text-decoration: none;
    font-size: 14px;
    display: block;
    margin-bottom: 15px;
}

.back-to-login:hover {
    text-decoration: underline;
}

.info-message {
    background-color: #d1ecf1;
    color: #0c5460;
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-size: 14px;
    text-align: center;
}

.divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    border-bottom: 1px solid #e1e5eb;
}

.divider-text {
    padding: 0 10px;
    color: #7f8c8d;
    font-size: 14px;
}