/**
 * BDE Public Person Login - Modern UI Styles
 */

/* Container */
.bde-login-container {
    max-width: 420px;
    margin: 60px auto;
    padding: 20px;
}

/* Login Box */
.bde-login-box {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    padding: 48px 40px;
    transition: box-shadow 0.3s ease;
}

.bde-login-box:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

/* Title */
.bde-login-title {
    font-size: 28px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 32px;
    text-align: center;
    letter-spacing: -0.5px;
}

/* Form */
.bde-login-form {
    width: 100%;
}

/* Form Group */
.bde-form-group {
    margin-bottom: 24px;
}

.bde-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 8px;
    letter-spacing: 0.2px;
}

.bde-form-group input[type="text"],
.bde-form-group input[type="password"] {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    color: #1a1a1a;
    background: #f8f9fa;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.bde-form-group input[type="text"]:focus,
.bde-form-group input[type="password"]:focus {
    background: #ffffff;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.bde-form-group input[type="text"]::placeholder,
.bde-form-group input[type="password"]::placeholder {
    color: #a0aec0;
}

/* Remember Me */
.bde-remember-group {
    margin-bottom: 20px;
}

.bde-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.bde-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0 10px 0 0;
    cursor: pointer;
    accent-color: #4f46e5;
}

.bde-checkbox-label span {
    font-size: 14px;
    color: #4a5568;
    font-weight: 500;
}

/* Message */
.bde-form-message {
    display: none;
    padding: 14px 16px;
    margin-bottom: 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

.bde-form-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.bde-form-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Login Button */
.bde-login-btn {
    position: relative;
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
}

.bde-login-btn:hover {
    background: linear-gradient(135deg, #4338ca 0%, #4f46e5 100%);
    box-shadow: 0 8px 16px rgba(79, 70, 229, 0.3);
    transform: translateY(-2px);
}

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

.bde-login-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.bde-login-btn.loading {
    background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%);
}

/* Button Loader */
.bde-btn-loader {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: bde-spin 0.8s linear infinite;
}

.bde-btn-loader.active {
    display: block;
}

@keyframes bde-spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Form Footer */
.bde-form-footer {
    text-align: center;
    margin-top: 24px;
}

.bde-forgot-link {
    font-size: 14px;
    font-weight: 500;
    color: #4f46e5;
    text-decoration: none;
    transition: color 0.2s ease;
}

.bde-forgot-link:hover {
    color: #4338ca;
    text-decoration: underline;
}

/* Logged In State */
.bde-login-container.logged-in .bde-login-box {
    text-align: center;
}

.bde-login-container.logged-in h2 {
    font-size: 28px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 16px;
}

.bde-login-container.logged-in p {
    font-size: 16px;
    color: #4a5568;
    margin: 0 0 28px;
}

.bde-logout-btn {
    display: inline-block;
    padding: 14px 32px;
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.bde-logout-btn:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 8px 16px rgba(239, 68, 68, 0.3);
    transform: translateY(-2px);
}

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

/* Responsive */
@media (max-width: 480px) {
    .bde-login-container {
        margin: 40px auto;
        padding: 15px;
    }

    .bde-login-box {
        padding: 36px 28px;
    }

    .bde-login-title {
        font-size: 24px;
        margin-bottom: 28px;
    }

    .bde-form-group input[type="text"],
    .bde-form-group input[type="password"] {
        padding: 12px 14px;
        font-size: 14px;
    }

    .bde-login-btn {
        padding: 14px;
        font-size: 15px;
    }
}
